Communication method, apparatus, and system
A communication method comprises that an application function network element first obtains transport information for a data stream, where the transport information includes information about an ingress port for the data stream and information about an egress port for the data stream. The application function network element then determines, based on the transport information, that the data stream is a data stream between terminal devices. The data stream is carried in two sessions. One session is a first session corresponding to the information about the ingress port, and the other session is a second session corresponding to the information about the egress port. The application function network element then can trigger a core network device to initiate policy and charging control (PCC) rule configuration processes for the first session and the second session, so that the data stream can be created.
1 . A communication method implemented by an application function network element, wherein the communication method comprises:
obtaining transport information for a data stream, wherein the transport information comprises first information about an ingress port for the data stream and second information about an egress port for the data stream, wherein the first information comprises a first identifier of the ingress port, and wherein the second information comprises a second identifier of the egress port;
determining, based on the first identifier and the second identifier, that the data stream is between a first terminal device and a second terminal device, wherein the second identifier is of a first port on a first side of the second terminal device, and wherein the first identifier is of a second port on a second side of the first terminal device; and
sending, in response to the data stream being between the first terminal device and the second terminal device, third information for triggering a core network device to configure a first policy and charging control (PCC) rule for a first session corresponding to the first information and configure a second PCC rule for a second session corresponding to the second information.
2 . The communication method of claim 1 , wherein determining that the data stream is between the first terminal device and the second terminal device comprises determining, based on a first association between the second identifier and the first session and a second association between the first identifier and the second session, that the data stream is between the first terminal device and the second terminal device.
3 . The communication method of claim 1 , wherein the data stream is from the first terminal device to the second terminal device.
4 . The communication method of claim 1 , wherein before obtaining the transport information, the communication method further comprises:
determining that the first terminal device and the second terminal device are capable of communicating with each other; and
reporting, to a device in a time-sensitive networking network and based on first delay information of the first terminal device and second delay information of the second terminal device, a transmission delay between the second port and the first port.
5 . The communication method of claim 4 , wherein before obtaining the transport information, the communication method further comprises:
receiving the first delay information when the first terminal device establishes the first session; and
receiving the second delay information and indication information when the second terminal device establishes the second session, wherein the indication information indicates that the second port and the first port are a port pair,
wherein determining that the first terminal device and the second terminal device are capable of communicating with each other comprises determining, based on the indication information, that the first terminal device and the second terminal device are capable of communicating with each other.
6 . The communication method of claim 1 , wherein sending the third information for triggering the core network device to configure the first PCC rule comprises sending indication information to the core network device, and wherein the indication information indicates that the data stream is between the first terminal device and the second terminal device.
7 . The communication method of claim 1 , wherein sending the third information for triggering the core network device to configure the second PCC rule comprises sending indication information to the core network device, and wherein the indication information indicates that the data stream is between the first terminal device and the second terminal device.
8 . A communication apparatus, comprising:
a memory configured to store instructions; and
one or more processors coupled to the memory and configured to execute the instructions to cause the communication apparatus to:
obtain transport information for a data stream, wherein the transport information comprises first information about an ingress port for the data stream and second information about an egress port for the data stream, wherein the first information comprises a first identifier of the ingress port, and wherein the second information comprises a second identifier of the egress port;
determine, based on the first identifier and the second identifier, that the data stream is between a first terminal device and a second terminal device, wherein the second identifier is of a first port on a first side of the second terminal device, and wherein the first identifier is of a second port on a second side of the first terminal device; and
send, in response to the data stream being between the first terminal device and the second terminal device, third information for triggering a core network device to configure a first policy and charging control (PCC) rule for a first session corresponding to the first information and configure a second PCC rule for a second session corresponding to the second information.
9 . The communication apparatus of claim 8 , wherein the instructions further cause the communication apparatus to determine, based on a first association between the second identifier and the first session and a second association between the first identifier and the second session, that the data stream is between the first terminal device and the second terminal device.
10 . The communication apparatus of claim 8 , wherein the data stream is from the first terminal device to the second terminal device, wherein the first session is established by the first terminal device, and wherein the second session is established by the second terminal device.
11 . The communication apparatus of claim 8 , wherein before obtaining the transport information, the instructions further cause the communication apparatus to:
determine that the first terminal device and the second terminal device are capable of communicating with each other; and
report, based on first delay information of the first terminal device and second delay information of the second terminal device, a transmission delay between the second port and the first port to a device in a time sensitive networking.
12 . The communication apparatus of claim 11 , wherein before obtaining the transport information, the instructions further cause the communication apparatus to:
receive, when the first terminal device establishes the first session, the first delay information;
receive, when the second terminal device establishes the second session, the second delay information and indication information, wherein the indication information indicates that the second port and the first port are a port pair; and
determine, based on the indication information, that the first terminal device and the second terminal device are capable of communicating with each other.
13 . The communication apparatus of claim 8 , wherein the instructions further cause the communication apparatus to send indication information to the core network device, and wherein the indication information indicates that the data stream is between the first terminal device and the second terminal device.
14 . A computer program product comprising instructions that are stored on a non-transitory computer-readable storage medium and that, when executed by one or more processors, cause an application function network element to:
obtain transport information for a data stream, wherein the transport information comprises first information about an ingress port for the data stream and second information about an egress port for the data stream, wherein the first information comprises a first identifier of the ingress port, and wherein the second information comprises a second identifier of the egress port;
determine, based on the first identifier and the second identifier, that the data stream is between a first terminal device and a second terminal device, wherein the second identifier is of a first port on a first side of the second terminal device, and wherein the first identifier is of a second port on a second side of the first terminal device; and
send, in response to the data stream being between the first terminal device and the second terminal device, third information for triggering a core network device to configure a first policy and charging control (PCC) rule for a first session corresponding to the first information and configure a second PCC rule for a second session corresponding to the second information.
15 . The computer program product of claim 14 , wherein the instructions, when executed by the one or more processors, that cause the application function network element to determine that the data stream is between the first terminal device and the second terminal device, further cause the application function network element to determine, based on a first association between the second identifier and the first session and a second association between the first identifier and the second session, that the data stream is between the first terminal device and the second terminal device.
16 . The computer program product of claim 14 , wherein to obtain the transport information, the instructions, when executed by the one or more processors, further cause the application function network element to:
determine that the first terminal device and the second terminal device are capable of communicating with each other; and
report, to a device in a time-sensitive networking network and based on first delay information of the first terminal device and second delay information of the second terminal device, a transmission delay between the second port and the first port.
17 . The computer program product of claim 16 , wherein to obtain the transport information, the instructions, when executed by the one or more processors, further cause the application function network element to:
receive the first delay information when the first terminal device establishes the first session; and
receive the second delay information and indication information when the second terminal device establishes the second session, wherein the indication information indicates that the second port and the first port are a port pair.
18 . The computer program product of claim 17 , wherein the instructions, when executed by the one or more processors, further cause the application function network element to determine, based on the indication information, that the first terminal device and the second terminal device are capable of communicating with each other.
19 . The computer program product of claim 14 , wherein to send the third information, the instructions, when executed by the one or more processors, further cause the application function network element to send indication information to the core network device, and wherein the indication information indicates that the data stream is between the first terminal device and the second terminal device.
20 . The computer program product of claim 14 , wherein the data stream is from the first terminal device to the second terminal device.