A data transmission method and apparatus
Patent Information
- Application Number
- CN202280097772.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-04
- Publication Date
- 2026-10-20
- Estimated Expiration
- 2042-07-04
AI Technical Summary
该场景下,存在无法支持外网设备与内网设备端到端通信的问题
Smart Images

Figure CN119586116B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of short-range communication technology, and in particular to a data transmission method and apparatus. Background Technology
[0002] Currently, short-range wireless communication technology is widely used in scenarios such as intelligent vehicles, intelligent transportation, intelligent terminals, smart homes, and intelligent manufacturing. In these scenarios, devices can form a network (or private network) based on the communication protocols used by short-range wireless communication technology (referred to as short-range wireless communication protocols, such as the short-range wireless communication standard protocol specified by the Starlight Alliance). Devices within the private network (referred to as private network devices) can communicate with each other based on the addresses corresponding to the short-range wireless communication protocol (referred to as short-range wireless communication protocol addresses).
[0003] When internal network devices transmit data packets with external network devices, the following scenario exists: the external network device uses network addresses to transmit data packets, such as Internet Protocol (IP) addresses, while some internal network devices do not support transmitting data packets using network addresses. In this scenario, there is a problem that end-to-end communication between external and internal network devices cannot be supported. Summary of the Invention
[0004] This application provides a data transmission method and apparatus for enabling end-to-end communication between devices.
[0005] In a first aspect, a data transmission method is provided, comprising: a first device acquiring a first data packet, the first data packet containing data and first information, the first information including a source network address, a destination network address, a source transport layer port number, and a destination transport layer port number, the first information corresponding to a first communication protocol; the first device determining second information according to a first mapping relationship, the second information corresponding to a second communication protocol, the second information including a communication protocol source address, a communication protocol destination address, a communication protocol source port number, and a communication protocol destination port number, wherein the first mapping relationship is used to indicate one or more of the following: a mapping relationship between a source network address and a communication protocol source address, a mapping relationship between a destination network address and a communication protocol destination address, a mapping relationship between a source transport layer port number and a communication protocol source port number, and a mapping relationship between a destination transport layer port number and a communication protocol destination port number; the first device generating a second data packet, wherein the second data packet includes one or more of data, a communication protocol source address, a communication protocol destination address, a communication protocol source port number, and a communication protocol destination port number; and the first device sending the second data packet.
[0006] In the above scheme, after receiving the first data packet corresponding to the first communication protocol, the first device converts it into a second data packet according to the first mapping relationship. Since the address information carried in the second data packet (such as the communication protocol source address, communication protocol destination address, communication protocol source port number, and communication protocol destination port number) is the address information corresponding to the second communication protocol, it is possible to address and forward the second data packet based on the address information corresponding to the second communication protocol, so as to transmit the data carried in the second data packet to the device corresponding to the destination network address. Ultimately, end-to-end communication between the device corresponding to the source network address and the device corresponding to the destination network address can be realized, which can improve the reliability of data transmission.
[0007] In one possible design, the first mapping relationship is predefined. For example, the technician configures the first mapping relationship onto the first device in advance.
[0008] In one possible design, the first mapping relationship is generated by the first device. For example, if the first device is a master node or management node in the network where it is located, and is responsible for allocating address information corresponding to the second communication protocol to each node in the network, then the first mapping relationship can be generated and saved after allocating address information corresponding to the second communication protocol to the first device.
[0009] In one possible design, the first mapping relationship originates from the second device, for example, it is sent from the second device to the first device. For instance, if the second device is a master node or management node in the network where the first device resides, responsible for allocating address information corresponding to the second communication protocol to each node in the network, then the second device can generate the first mapping relationship and send it to the first device after allocating the address information corresponding to the second communication protocol to the first device.
[0010] By using any of the three designs above, the first device can obtain the first mapping relationship, providing support for the conversion between the first information and the second information, and further improving the reliability of data transmission.
[0011] In one possible design, the first data packet further includes a first Quality of Service (QoS) indication field, which includes a Differentiated Services CodePoint (DSCP) or Traffic of Class. A first mapping relationship is also used to indicate the mapping relationship between the first QoS indication field and a second QoS indication field. The second QoS indication field includes a flow label and a Type of Service (ToS). The second data packet also includes a second QoS indication field. In other words, the first device can also convert the QoS parameters corresponding to the first communication protocol (i.e., the first QoS indication field) carried in the first data packet into QoS parameters corresponding to the second communication protocol (i.e., the second QoS indication field) based on the first mapping relationship, and carry them in the second data packet.
[0012] The above design enables the conversion of QoS parameters between different protocols, providing QoS guarantees for data during transmission and further improving the reliability of data transmission.
[0013] In one possible design, the first device can determine the Layer 2 address (L2ID) of the next-hop node leading to the communication protocol destination address and the Transport channel Identifier (TCID) of the transmission channel between the first device and the next-hop node based on one or more of the communication protocol source address, communication protocol destination address, communication protocol source port number, communication protocol destination port number, or the second QoS indication field; wherein the transmission channel satisfies the QoS requirements corresponding to the second QoS indication field; then, the second data packet is encapsulated according to the L2ID and TCID to generate a third data packet; and then the first device sends the third data packet.
[0014] The above design allows the second data packet to be forwarded from the first device to the next-hop node. During forwarding, the second data packet is carried on a transmission channel that meets the QoS requirements of the second data packet, thus ensuring the QoS of data transmission and further improving the reliability of communication.
[0015] In one possible design, the first device can determine the L2ID of the next-hop node leading to the communication protocol destination address and the TCID of the transmission channel between the first device and the next-hop node based on the second mapping relationship; wherein, the second mapping relationship is used to indicate the mapping relationship between one or more of the communication protocol source address, communication protocol destination address, communication protocol source port number, communication protocol destination port number, or second QoS indication field and the L2ID of the next-hop node and the TCID of the transmission channel.
[0016] With the above design, when there is already a transmission channel that meets the QoS requirements of the second data packet, the first device can determine the transmission channel that meets the QoS requirements of the second data packet from the existing transmission channels based on the information carried in the second data packet and the second mapping relationship, which can improve transmission efficiency.
[0017] In one possible design, the first device can determine the L2ID of the next-hop node leading to the communication protocol destination address based on the communication protocol source address and / or communication protocol destination address; the first device maps the second QoS indication field to the third QoS indication field, establishes a transmission channel with the next-hop node based on the communication protocol destination port number, the third QoS indication field, and the L2ID of the next-hop node, and generates the TCID of the transmission channel.
[0018] Through the above design, in the absence of a transmission channel that meets the QoS requirements of the second data packet, the first device can establish a transmission channel that meets the QoS requirements of the second data packet, thereby enabling the carrying of the second data packet and further improving the reliability of data transmission.
[0019] In one possible design, after the first device generates the TCID of the transmission channel, the first device can also generate a second mapping relationship based on one or more of the following: the communication protocol source address, the communication protocol destination address, the communication protocol source port number, the communication protocol destination port number, or the second QoS indication field, as well as the L2ID of the next hop node and the TCID of the transmission channel.
[0020] With the above design, when the first device transmits data packets with the same or similar second information, it can directly find the L2ID of the next-hop node and the TCID of the transmission channel that meet the transmission requirements through the second mapping relationship, so as to avoid repeatedly establishing the transmission channel, save system resources, and improve data transmission efficiency.
[0021] In one possible design, the second communication protocol is the short-range wireless communication standard protocol specified by the StarSpark Alliance.
[0022] The above design enables end-to-end communication between devices in the StarSpark network and devices outside the StarSpark network.
[0023] In one possible design, the first communication protocol is the IP protocol. Accordingly, the source network address and destination network address are of type IP address; the source transport layer port number and destination transport layer port number are of type TCP / UDP port number.
[0024] The above design enables end-to-end transmission of IP data packets.
[0025] Secondly, a data transmission method is provided, applied to a first device, wherein a protocol stack of a second communication protocol is deployed on the first device. The method includes: the first device transmitting a first data packet from a first protocol layer of the protocol stack to a second protocol layer of the protocol stack; the first data packet contains data and first information, the first information including a source network address, a destination network address, a source transport layer port number, and a destination transport layer port number, the first information corresponding to a first communication protocol; the first device determining second information at the second protocol layer of the protocol stack according to a first mapping relationship, the second information corresponding to a second communication protocol; the second information including a communication protocol source address, a communication protocol destination address, a communication protocol source port number, and a communication protocol source port number. The protocol destination port number, wherein the first mapping relationship is used to indicate one or more of the following: the mapping relationship between the source network address and the communication protocol source address, the mapping relationship between the destination network address and the communication protocol destination address, the mapping relationship between the source transport layer port number and the communication protocol source port number, and the mapping relationship between the destination transport layer port number and the communication protocol destination port number; the first device generates a second data packet at the second protocol layer of the protocol stack, wherein the second data packet includes one or more of the following: data, communication protocol source address, communication protocol destination address, communication protocol source port number, and communication protocol destination port number; the first device sends the second data packet at the third protocol layer of the protocol stack.
[0026] Taking the StarCraft Alliance-specificated short-range wireless communication standard protocol as an example, the first protocol layer can be the application layer in the protocol stack of the StarCraft Alliance-specificated short-range wireless communication standard protocol; the second protocol layer can be the network layer in the protocol stack of the StarCraft Alliance-specificated short-range wireless communication standard protocol; and the third protocol layer can be the basic service layer in the protocol stack of the StarCraft Alliance-specificated short-range wireless communication standard protocol. Furthermore, the protocol stack of the StarCraft Alliance-specificated short-range wireless communication standard protocol can also include an access layer, and the first data packet can actually be processed by the access layer and then sent out through the access layer.
[0027] The above scheme enables the conversion between parameters of the first communication protocol and parameters of the second communication protocol in the protocol stack of the second communication protocol (e.g., the StarSpark protocol stack). This allows the data packets of the first communication protocol to be carried in the network corresponding to the second communication protocol, achieving end-to-end transmission of the data packets of the first communication protocol and improving the reliability of data transmission.
[0028] In one possible design, the first mapping relationship is predefined.
[0029] In one possible design, the first mapping relationship is generated by the first device at the second protocol layer of the protocol stack.
[0030] In one possible design, the first mapping relationship comes from the second device, for example, it is sent from the second device to the first device.
[0031] In one possible design, the first data packet also includes a first Quality of Service (QoS) indication field, which includes DSCP or Traffic of Class; the first mapping relationship is also used to indicate the mapping relationship between the first QoS indication field and the second QoS indication field; the second QoS indication field includes Flow label and ToS; the second data packet also includes a second QoS indication field.
[0032] In one possible design, the first device can determine, at the second protocol layer of the protocol stack, the Layer 2 address (L2ID) of the next-hop node leading to the communication protocol destination address and the transmission channel identifier (TCID) of the transmission channel between the first device and the next-hop node, based on one or more of the communication protocol source address, communication protocol destination address, communication protocol source port number, communication protocol destination port number, or the second QoS indication field; wherein the transmission channel satisfies the QoS requirements corresponding to the second QoS indication field. Furthermore, the first device can encapsulate the second data packet based on the L2ID and TCID at the third protocol layer of the protocol stack to generate a third data packet; the first device then sends the third data packet at the third protocol layer of the protocol stack.
[0033] In one possible design, the first device can determine the L2ID of the next-hop node leading to the communication protocol destination address and the TCID of the transmission channel between the first device and the next-hop node based on the second protocol layer of the protocol stack according to the second mapping relationship; wherein, the second mapping relationship is used to indicate the mapping relationship between one or more of the communication protocol source address, communication protocol destination address, communication protocol source port number, communication protocol destination port number, or the second QoS indication field and the L2ID of the next-hop node and the TCID of the transmission channel.
[0034] In one possible design, the first device can determine the L2ID of the next-hop node leading to the communication protocol destination address at the second protocol layer of the protocol stack based on the communication protocol source address and / or communication protocol destination address; the first device maps the second QoS indication field to the third QoS indication field at the third protocol layer of the protocol stack, establishes a transmission channel with the next-hop node based on the communication protocol destination port number, the third QoS indication field, and the L2ID of the next-hop node, and generates the TCID of the transmission channel; the first device passes the TCID from the third protocol layer of the protocol stack to the second protocol layer of the protocol stack.
[0035] In one possible design, the first device can also generate a second mapping relationship at the second protocol layer of the protocol stack based on one or more of the following: communication protocol source address, communication protocol destination address, communication protocol source port number, communication protocol destination port number, or second QoS indication field, as well as the L2ID of the next hop node and the TCID of the transmission channel.
[0036] In one possible design, the second communication protocol is the short-range wireless communication standard protocol specified by the StarSpark Alliance.
[0037] In one possible design, the source network address and destination network address are of type Internet Protocol (IP) addresses; the source transport layer port number and destination transport layer port number are of type Transmission Control Protocol (TCP) / User Datagram Protocol (UDP) port numbers.
[0038] The beneficial effects of each design in the second aspect mentioned above can be referred to the beneficial effects of the corresponding designs in the first aspect, and will not be repeated here.
[0039] Thirdly, a data transmission method is provided, comprising: a first device acquiring a data packet, the data packet including data, a source address, a destination address, a source port number, a destination port number, and one or more of a QoS indication field; the first device determining, based on the source address, destination address, source port number, destination port number, or one or more of the QoS indication field, a Layer 2 address (L2ID) leading to the next-hop node at the destination address and a transmission channel (TCID) between the first device and the next-hop node; wherein the transmission channel satisfies the QoS requirements corresponding to the QoS indication field; the first device encapsulating the data packet according to the L2ID and TCID, and sending the encapsulated data packet.
[0040] The above scheme enables data packets to be forwarded from the first device to the next-hop node. During forwarding, the data packets are carried on a transmission channel that meets the QoS requirements of the data packets, thereby ensuring the QoS of data transmission and improving the reliability of communication.
[0041] It is understood that this application does not restrict the communication protocol corresponding to the source address, destination address, source port number, destination port number, and QoS indication fields.
[0042] In one possible design, the communication protocol corresponding to the source address, destination address, source port number, destination port number, and QoS indication fields corresponds to the IP protocol. For example, the source address and destination address are of type IP address, the source port number and destination port number are of type TCP / UDP port number, and the QoS parameter is DSCP or Traffic of Class.
[0043] In one possible design, the communication protocols corresponding to the source address, destination address, source port number, destination port number, and QoS indication fields correspond to the short-range wireless communication standard protocol specified by the StarSpark Alliance. For example, the source address and destination address are of the address type of the short-range wireless communication standard protocol specified by the StarSpark Alliance, the source port number and destination port number are of the port number type of the short-range wireless communication standard protocol specified by the StarSpark Alliance, and the QoS parameter is the ToS in the short-range wireless communication standard protocol specified by the StarSpark Alliance.
[0044] Of course, the above two protocols are just examples, and there may be other communication protocols in practice. This application does not impose any restrictions.
[0045] In one possible design, the first device can determine the L2ID of the next-hop node leading to the destination address and the TCID of the transmission channel between the first device and the next-hop node based on the second mapping relationship; wherein the second mapping relationship is used to indicate the mapping relationship between one or more of the source address, destination address, source port number, destination port number, or QoS indication fields and the L2ID of the next-hop node and the TCID of the transmission channel.
[0046] With the above design, when there is already a transmission channel that meets the QoS requirements of the data packet, the first device can determine the transmission channel that meets the QoS requirements of the data packet from the existing transmission channels based on the information carried in the data packet and the second mapping relationship, which can improve transmission efficiency.
[0047] In one possible design, the first device can determine the L2ID of the next-hop node leading to the destination address based on the source address and / or destination address; the first device establishes a transmission channel with the next-hop node based on the destination port number, QoS indication field, and the L2ID of the next-hop node, and generates the TCID of the transmission channel.
[0048] Through the above design, in the absence of a transmission channel that meets the QoS requirements of data packets, the first device can establish a transmission channel that meets the QoS requirements of data packets, thereby enabling the carrying of data packets and further improving the reliability of data transmission.
[0049] In one possible design, after the first device generates the TCID of the transmission channel, the first device can also generate a second mapping relationship based on one or more of the source address, destination address, source port number, destination port number, or QoS indication fields, as well as the L2ID of the next hop node and the TCID of the transmission channel.
[0050] With the above design, when the first device transmits data packets with the same QoS requirements, destination address, and / or destination port number, it can directly find the L2ID of the next-hop node and the TCID of the transmission channel that meet the transmission requirements through the second mapping relationship, so as to avoid repeatedly establishing the transmission channel, save system resources, and improve data transmission efficiency.
[0051] In one possible design, the source and destination addresses are of type IP addresses.
[0052] When the destination address is the address of the next-hop node (i.e., the transmission route is a single-hop route), the encapsulated datagram includes L2ID, TCID, source address, and destination address. This means that it is not necessary to encapsulate the short-range wireless communication standard protocol address corresponding to the source address and the short-range wireless communication standard protocol address corresponding to the destination address in the datagram. This saves header overhead.
[0053] When the destination address is not the address of the next-hop node (i.e., the transmission route is a multi-hop route), the encapsulated datagram includes L2ID, TCID, source address, destination address, the short-range wireless communication standard protocol address of the source address according to the StarSpark Alliance specification, and the short-range wireless communication standard protocol address of the destination address according to the StarSpark Alliance specification. This ensures transmission reliability.
[0054] Fourthly, a data transmission apparatus is provided, which is a first device or a chip in a first device, the apparatus including modules / units / technical means for performing the methods described in the first aspect or any possible design of the first aspect.
[0055] For example, the device may include:
[0056] The acquisition unit is used to acquire a first data packet, which contains data and first information. The first information includes a source network address, a destination network address, a source transport layer port number, a destination transport layer port number, and the first information corresponds to a first communication protocol.
[0057] The processing unit is configured to determine second information based on a first mapping relationship. The second information corresponds to a second communication protocol. The second information includes a communication protocol source address, a communication protocol destination address, a communication protocol source port number, and a communication protocol destination port number. The first mapping relationship indicates one or more of the following: a mapping relationship between a source network address and a communication protocol source address; a mapping relationship between a destination network address and a communication protocol destination address; a mapping relationship between a source transport layer port number and a communication protocol source port number; and a mapping relationship between a destination transport layer port number and a communication protocol destination port number. The processing unit then generates a second data packet, wherein the second data packet includes data, a communication protocol source address, a communication protocol destination address, a communication protocol source port number, and a communication protocol destination port number.
[0058] The sending unit is used to send the second data packet.
[0059] In one possible design, the first mapping relationship is predefined.
[0060] In one possible design, the first mapping is generated by the device.
[0061] In one possible design, the first mapping relationship comes from the second device, for example, it is sent to the device by the second device.
[0062] In one possible design, the first data packet also includes a first QoS indication field, which includes DSCP or Traffic of Class; the first mapping relationship is also used to indicate the mapping relationship between the first QoS indication field and the second QoS indication field; the second QoS indication field includes Flow label and Service Type ToS; the second data packet also includes a second QoS indication field.
[0063] In one possible design, a processing unit is configured to determine, based on one or more of the following: the communication protocol source address, the communication protocol destination address, the communication protocol source port number, the communication protocol destination port number, or the second QoS indication field, the Layer 2 address (L2ID) of the next-hop node leading to the communication protocol destination address, and the transmission channel identifier (TCID) of the transmission channel between the device and the next-hop node; wherein the transmission channel satisfies the QoS requirements corresponding to the second QoS indication field; then, a second data packet is encapsulated according to the L2ID and the TCID to generate a third data packet; and a sending unit is configured to send the third data packet.
[0064] In one possible design, the processing unit is configured to determine, based on a second mapping relationship, the L2ID of the next-hop node leading to the communication protocol destination address and the TCID of the transmission channel between the device and the next-hop node; wherein the second mapping relationship is used to indicate the mapping relationship between one or more of the communication protocol source address, communication protocol destination address, communication protocol source port number, communication protocol destination port number, or a second QoS indication field and the L2ID of the next-hop node and the TCID of the transmission channel.
[0065] In one possible design, the processing unit is used to determine the L2ID of the next-hop node leading to the communication protocol destination address based on the communication protocol source address and / or communication protocol destination address; map the second QoS indication field to the third QoS indication field; establish a transmission channel with the next-hop node based on the communication protocol destination port number, the third QoS indication field, and the L2ID of the next-hop node; and generate the TCID of the transmission channel.
[0066] In one possible design, the processing unit is further configured to: after generating the TCID of the transmission channel, generate a second mapping relationship based on one or more of the communication protocol source address, communication protocol destination address, communication protocol source port number, communication protocol destination port number, or a second QoS indication field, as well as the L2ID of the next hop node and the TCID of the transmission channel.
[0067] In one possible design, the second communication protocol is the short-range wireless communication standard protocol specified by the StarSpark Alliance.
[0068] In one possible design, the source network address and destination network address are of type Internet Protocol (IP) addresses; the source transport layer port number and destination transport layer port number are of type TCP / UDP port numbers.
[0069] Fifthly, a data transmission apparatus is provided, which is a first device or a chip in the first device, the apparatus including modules / units / technical means for performing the methods described in the second aspect or any possible design of the second aspect.
[0070] For example, the device may include:
[0071] The first protocol layer module is used to transmit the first data packet to the second protocol layer module. The first data packet contains data and first information. The first information includes the source network address, the destination network address, the source transport layer port number, and the destination transport layer port number. The first information corresponds to the first communication protocol.
[0072] The second protocol layer module is used to determine second information based on the first mapping relationship. The second information corresponds to a second communication protocol. The second information includes a communication protocol source address, a communication protocol destination address, a communication protocol source port number, and a communication protocol destination port number. The first mapping relationship indicates one or more of the following: a mapping relationship between a source network address and a communication protocol source address; a mapping relationship between a destination network address and a communication protocol destination address; a mapping relationship between a source transport layer port number and a communication protocol source port number; and a mapping relationship between a destination transport layer port number and a communication protocol destination port number. The module then generates a second data packet, which includes one or more of the following: data, a communication protocol source address, a communication protocol destination address, a communication protocol source port number, and a communication protocol destination port number.
[0073] The third protocol layer module is used to send the second data packet.
[0074] In one possible design, the first mapping relationship is predefined.
[0075] In one possible design, the first mapping relationship is generated by the second protocol layer module.
[0076] In one possible design, the first mapping relationship comes from the second device, for example, it is sent to the device by the second device.
[0077] In one possible design, the first data packet also includes a first Quality of Service (QoS) indication field, which includes DSCP or Traffic of Class; the first mapping relationship is also used to indicate the mapping relationship between the first QoS indication field and the second QoS indication field; the second QoS indication field includes Flow label and ToS; the second data packet also includes a second QoS indication field.
[0078] In one possible design, the second protocol layer module is used to determine the Layer 2 address (L2ID) of the next-hop node leading to the communication protocol destination address and the transmission channel identifier (TCID) of the transmission channel between the device and the next-hop node, based on one or more of the communication protocol source address, communication protocol destination address, communication protocol source port number, communication protocol destination port number, or the second QoS indication field; wherein the transmission channel satisfies the QoS requirements corresponding to the second QoS indication field; the third protocol layer module is used to encapsulate the second data packet according to the L2ID and TCID to generate a third data packet; the third protocol layer module is used to send the third data packet.
[0079] In one possible design, a second protocol layer module is used to determine the L2ID of the next-hop node leading to the communication protocol destination address and the TCID of the transmission channel between the device and the next-hop node based on a second mapping relationship; wherein the second mapping relationship is used to indicate the mapping relationship between one or more of the communication protocol source address, communication protocol destination address, communication protocol source port number, communication protocol destination port number, or second QoS indication field and the L2ID of the next-hop node and the TCID of the transmission channel.
[0080] In one possible design, the second protocol layer module is used to determine the L2ID of the next-hop node leading to the communication protocol destination address based on the communication protocol source address and / or communication protocol destination address; the third protocol layer module is used to map the second QoS indication field to the third QoS indication field, establish a transmission channel with the next-hop node based on the communication protocol destination port number, the third QoS indication field, and the L2ID of the next-hop node, and generate the TCID of the transmission channel; the third protocol layer module is used to pass the TCID to the second protocol layer module.
[0081] In one possible design, the second protocol layer module is further configured to generate a second mapping relationship based on one or more of the following: the communication protocol source address, the communication protocol destination address, the communication protocol source port number, the communication protocol destination port number, or the second QoS indication field, as well as the L2ID of the next-hop node and the TCID of the transmission channel.
[0082] In one possible design, the second communication protocol is the short-range wireless communication standard protocol specified by the StarSpark Alliance.
[0083] In one possible design, the source network address and destination network address are of type Internet Protocol (IP) addresses; the source transport layer port number and destination transport layer port number are of type Transmission Control Protocol (TCP) / User Datagram Protocol (UDP) port numbers.
[0084] In a sixth aspect, a data transmission apparatus is provided, which is a first device or a chip in a first device, the apparatus including modules / units / technical means for performing the methods described in the third aspect or any possible design of the third aspect.
[0085] For example, the device may include:
[0086] The acquisition unit is used to acquire data packets, which include one or more of the following fields: data, source address, destination address, source port number, destination port number, and QoS indication field.
[0087] The processing unit is configured to determine, based on one or more of the source address, destination address, source port number, destination port number, or QoS indication field, the Layer 2 address (L2ID) leading to the next-hop node at the destination address and the transmission channel (TCID) between the device and the next-hop node; wherein the transmission channel satisfies the QoS requirements corresponding to the QoS indication field; and encapsulate the data packet according to the L2ID and TCID.
[0088] The sending unit is used to send encapsulated data packets.
[0089] In one possible design, the processing unit is configured to determine the L2ID of the next-hop node leading to the destination address and the TCID of the transmission channel between the device and the next-hop node based on a second mapping relationship; wherein the second mapping relationship is used to indicate the mapping relationship between one or more of the source address, destination address, source port number, destination port number, or QoS indication fields and the L2ID of the next-hop node and the TCID of the transmission channel.
[0090] In one possible design, the processing unit is used to determine the L2ID of the next-hop node leading to the destination address based on the source address and / or destination address; establish a transmission channel with the next-hop node based on the destination port number, QoS indication field, and the L2ID of the next-hop node; and generate the TCID of the transmission channel.
[0091] In one possible design, the processing unit is further configured to: after generating the TCID of the transmission channel, generate a second mapping relationship based on one or more of the source address, destination address, source port number, destination port number, or QoS indication fields, as well as the L2ID of the next-hop node and the TCID of the transmission channel.
[0092] In one possible design, the source and destination addresses are of type IP addresses, the source and destination port numbers are of type TCP / UDP port numbers, and the QoS parameter is DSCP or Traffic of Class.
[0093] In one possible design, the source and destination addresses are of the short-range wireless communication standard protocol address specified by the StarSpark Alliance, the source and destination port numbers are of the short-range wireless communication standard protocol port numbers specified by the StarSpark Alliance, and the QoS parameter is the ToS in the short-range wireless communication standard protocol specified by the StarSpark Alliance.
[0094] In one possible design, the source and destination addresses are of type IP addresses.
[0095] The destination address is the address of the next-hop node, and the encapsulated datagram includes L2ID, TCID, source address, and destination address; or,
[0096] The destination address is not the address of the next-hop node; the encapsulated data packet includes L2ID, TCID, source address, destination address, the short-range wireless communication standard protocol address of the StarSpark Alliance specification corresponding to the source address, and the short-range wireless communication standard protocol address of the StarSpark Alliance specification corresponding to the destination address.
[0097] A seventh aspect provides a data transmission apparatus, comprising: at least one processor and an interface circuit; the interface circuit is configured to receive signals from other devices outside the apparatus and transmit or receive signals to the processor or transmit signals from the processor to other devices outside the apparatus, the processor being configured to implement the method as described in the first aspect or any design of the first aspect, or to implement the method as described in the second aspect or any design of the second aspect, or to implement the method as described in the third aspect or any design of the third aspect.
[0098] Eighthly, a computer-readable storage medium is provided, wherein a computer program or instructions are stored therein, which, when executed by a communication device, implement the method as described in the first aspect or any design of the first aspect, or are used to implement the method as described in the second aspect or any design of the second aspect, or are used to implement the method as described in the third aspect or any design of the third aspect.
[0099] Ninth aspect, a computer program product is provided, the computer program product storing instructions that, when run on a computer, cause the computer to perform the method as described in the first aspect or any design of the first aspect, or to perform the method as described in the second aspect or any design of the second aspect, or to perform the method as described in the third aspect or any design of the third aspect. Attached Figure Description
[0100] Figures 1A to 1C This is a schematic diagram illustrating an application scenario provided in the embodiments of this application;
[0101] Figures 2A-2B A network architecture diagram of the communication system provided in the embodiments of this application;
[0102] Figure 3 A flowchart illustrating a data transmission method provided in an embodiment of this application;
[0103] Figure 4 A flowchart illustrating another data transmission method provided in this application embodiment;
[0104] Figure 5 A schematic diagram of the protocol stack of the StarSpark protocol provided in an embodiment of this application;
[0105] Figure 6This is a schematic diagram showing the relationship between related functional units in the StarShine protocol stack;
[0106] Figure 7A This is a schematic diagram illustrating how an internal network device receives IP data packets sent by an external network device in a single-hop scenario.
[0107] Figure 7B This is a diagram illustrating the sending of IP data packets from an internal network device to an external network device in a single-hop scenario.
[0108] Figure 8A This is a diagram illustrating how an internal network device receives IP data packets sent by an external network device in a multi-hop scenario.
[0109] Figure 8B This is a diagram illustrating the sending of IP data packets from an internal network device to an external network device in a multi-hop scenario.
[0110] Figure 9 A flowchart illustrating another data transmission method provided in this application embodiment;
[0111] Figure 10 This is a schematic diagram of the structure of a data transmission device provided in an embodiment of this application;
[0112] Figure 11 This is a schematic diagram of another data transmission device provided in an embodiment of this application;
[0113] Figure 12 This is a schematic diagram of another data transmission device provided in an embodiment of this application. Detailed Implementation
[0114] See Figure 1A This is a schematic diagram of a scenario provided by an embodiment of this application. In smart home application scenarios, home devices include mobile phones, personal computers (PCs), large screens (such as televisions), printers, air conditioners, smart curtains, smart door locks, smart lights, sub-routers, water heaters, etc.
[0115] Home appliances can be networked based on short-range wireless communication technology, which this application refers to as an intranet or private network. Each home appliance in the intranet can be assigned a short-range wireless communication protocol address and communicate with each other within the intranet based on the short-range wireless communication protocol address.
[0116] Home appliances communicate with the external network through a gateway. A gateway can be a home gateway (HG) or customer premises equipment (CPE) with gateway functionality. Data packets sent by external network devices must be forwarded to home appliances via the gateway, and data packets sent by home appliances must also be forwarded to the external network via the gateway.
[0117] Generally, external network devices can transmit data packets based on IP addresses. However, since different IP applications have different Quality of Service (QoS) requirements, the internal network needs to establish single-hop routes (e.g., based on the QoS requirements of different IP applications) to meet those requirements. Figure 1A Route 1 shown) or multi-hop route (e.g.) Figure 1A Route 2 is shown.
[0118] However, in smart home applications, some devices do not support IP addresses, such as refrigerators, smart curtains, smart lights, smart door locks, air conditioners, and water heaters. They cannot forward IP data packets based on IP addresses, which makes it impossible to support end-to-end communication between external network devices and internal network devices.
[0119] For example, in Figure 1A In the scenario shown, the refrigerator in router 2 does not support IP addresses, while the printer and sub-router 1 do. When the printer needs to send IP data packets to an external network device (such as a mobile phone / PC) or when an external network device (such as a mobile phone / PC) needs to send IP data packets to the printer, the IP data packets should be forwarded through the refrigerator. However, since the refrigerator does not support IP addresses, it cannot forward the IP data packets, resulting in the failure of end-to-end communication between the printer and the mobile phone / PC on the external network.
[0120] See Figure 1B This is another scenario illustration provided by the embodiments of this application. In the scenario of wireless data collection of smart meters, multiple meters can form an intranet, and the business server is on the external network. When the business server collects data from the meters, it needs to exchange data packets with the meters in the intranet. If the external network device and the internal network device support data packets of different protocols, there will also be a problem that the end-to-end communication between the external network device and the internal network device cannot be supported.
[0121] See Figure 1C This is another scenario illustration provided by the embodiments of this application. In wireless screen projection application scenarios, such as in-vehicle screen projection, the mobile phone needs to transmit data through the in-vehicle equipment and headphones. Or, in a home theater scenario, the mobile phone needs to transmit data through a large-screen device (such as a TV) and speakers. In these scenarios, if different devices support data packets of different protocols, there will also be a problem of not being able to support end-to-end communication.
[0122] Understandable Figures 1A to 1C The scenarios shown are just examples; there may be other application scenarios in reality.
[0123] Such as the above Figures 1A to 1CThe scenario shown illustrates that because different devices (such as intranet devices and extranet devices) support addresses corresponding to different communication protocols, data packets cannot be carried and transmitted between devices, resulting in the inability to conduct end-to-end communication between devices.
[0124] In view of this, embodiments of this application provide a data transmission scheme for enabling end-to-end communication between devices in scenarios where different devices support addresses corresponding to different communication protocols.
[0125] The embodiments of this application can be applied to various wireless communication scenarios, especially short-range wireless communication scenarios, such as, but not limited to, smart vehicles, smart transportation, smart terminals, smart homes, and smart manufacturing. The short-range wireless communication technologies can include traditional short-range wireless communication technologies, such as Bluetooth, Bluetooth Low Energy (BLE), Wireless Fidelity (Wi-Fi), Near Field Communication (NFC), Ultra Wide Band (UWB), and general short-range communication technologies. They can also include evolving communication technologies or other communication technologies that may emerge in the future, such as the short-range wireless communication technology specified by the SparkLink Alliance (referred to as SparkLink technology). SparkLink technology includes SparkLink Basic (SLB) technology and SparkLink Basic (SLE) technology, etc., and this application does not impose any limitations.
[0126] For example, see Figure 2A This is a network architecture diagram of a communication system provided in an embodiment of this application. In this system, device A and device B perform end-to-end communication. Device A is located on an external network, and device B is located on an internal network. A gateway connects the internal and external networks. Devices on the external network support a first communication protocol, and all devices on the internal network support a second communication protocol. Some devices (such as device B) support the first communication protocol. Therefore, the end-to-end communication between device A and device B can also be called end-to-end communication based on the first communication protocol (such as IP end-to-end communication). Figure 2A In the network architecture shown, there is no intermediate node between the gateway and device B, which is a single-hop route. Of course, there can be other nodes between device A and the gateway, and this application does not impose any restrictions.
[0127] For example, see Figure 2BThis is a network architecture diagram of another communication system provided in an embodiment of this application. In this system, device A and device B perform end-to-end communication, where device A is located on an external network and device B is located on an internal network. A gateway connects the internal and external networks. Devices on the external network support a first communication protocol, and all devices on the internal network support a second communication protocol. Some devices (such as device B) support the first communication protocol. Figure 2A The difference is, Figure 2B In the scenario shown, the gateway and device B cannot communicate directly and must go through other nodes, which is a multi-hop routing. Intermediate node 1 and / or intermediate node 2 support the second communication protocol, but may not support the first communication protocol.
[0128] It is understood that the above is only an example. In actual applications, there may be fewer or more intermediate nodes between the gateway and device B, and this application does not impose any restrictions.
[0129] See Figure 3 This application provides a data transmission method, which includes:
[0130] S301. The first device acquires a first data packet. The first data packet contains data and first information. The first information includes a source network address, a destination network address, a source transport layer port number, a destination transport layer port number, and the first information corresponds to a first communication protocol.
[0131] The first device can be the source device of the first data packet (i.e., the device corresponding to the source network address), or it can be an intermediate device between the source device and the destination device (i.e., the device corresponding to the destination network address). In other words, the first device needs to send or forward the first data packet. Figure 2A or Figure 2B Taking the scenario shown as an example, when the first data packet is a packet sent from device A to device B, the first device can be a gateway; when the first data packet is a packet sent from device B to device A, the first device can be device B.
[0132] When the first device is a source device, the first device can obtain the first data packet by generating the first data packet; when the first device is an intermediate device, the first device can obtain the first data packet by receiving the first data packet from the source device or the intermediate device.
[0133] Generally, in addition to the data, data packets carry address information for routing, such as source address, destination address, source port number, and destination port number. This address information is usually carried in the header of the data packet. The representation of address information can differ across different communication protocols. For example, in the embodiments of this application, the source network address, destination network address, source transport layer port number, and destination transport layer port number are respectively represented in the first communication protocol.
[0134] For example, when the first communication protocol is the IP protocol, the source network address, destination network address, source transport layer port number, and destination transport layer port number can be the source IP address, destination IP address, source Transmission Control Protocol (TCP) / User Datagram Protocol (UDP) port number, and destination TCP / UDP port number, respectively.
[0135] It is understood that the IP protocol here is only an example. In practical applications, the first communication protocol can be other protocols, and this application does not impose any restrictions.
[0136] S302. The first device determines the second information according to the first mapping relationship. The second information corresponds to the second communication protocol. The second information includes the communication protocol source address, the communication protocol destination address, the communication protocol source port number, and the communication protocol destination port number.
[0137] It is understood that the source network address, destination network address, source transport layer port number, and destination transport layer port number are respectively the corresponding expressions of the source address, destination address, source port number, and destination port number of the data packet in the second communication protocol. For example, if the second communication protocol is a short-range wireless communication protocol, specifically the Star protocol, then the communication protocol source address, communication protocol destination address, communication protocol source port number, and communication protocol destination port number are respectively the Star Flash source address, Star Flash destination address, Star Flash source port number, and Star Flash destination port number. It is understood that, for the sake of convenience, this application mainly uses the Star Flash protocol as an example only; the actual second communication protocol can also be other protocols, and this application does not impose any restrictions.
[0138] For ease of description, the first communication protocol will primarily use the IP protocol as an example, and the second communication protocol will primarily use the StarScan protocol as an example. Furthermore, for ease of description, in the embodiments of this application, the address corresponding to the IP protocol can be called an IP address, the port corresponding to the IP protocol can be called an IP port, the address corresponding to the StarScan protocol can be called a StarScan address or StarScan domain address (which can be represented by SLNA), and the port corresponding to the StarScan protocol can be called a StarScan port or StarScan domain port.
[0139] Since the first information and the second information are different expressions of the same information under different communication protocols, there is a mapping relationship between the information in the first information and the information in the second information.
[0140] In this embodiment of the application, the mapping relationship between each piece of information in the first information and each piece of information in the second information is specifically indicated by the first mapping relationship. For example, the first mapping relationship includes, but is not limited to, one or more of the following: the mapping relationship between the source network address and the communication protocol source address, the mapping relationship between the destination network address and the communication protocol destination address, the mapping relationship between the source transport layer port number and the communication protocol source port number, and the mapping relationship between the destination transport layer port number and the communication protocol destination port number.
[0141] In the embodiments of this application, the first mapping relationship can be implemented in various ways. For example, Table 1 is a possible example of the first mapping relationship.
[0142] Table 1
[0143]
[0144] In the specific implementation, a table can store multiple sets of mapping relationships, each corresponding to different combinations of <source network address, destination network address, source transport layer port number, destination transport layer port number, communication protocol source address, communication protocol destination address, communication protocol source port number, communication protocol destination port number>. The first mapping relationship is one of these mapping relationships, as shown in Table 2.
[0145] Table 2
[0146]
[0147] Accordingly, the first device can determine the first mapping relationship by looking up a table (such as Table 1 or Table 2). For example, if IP SA1, IP DA1, IP S-port1, and IP D-port2 are carried in the first data packet, the first device can determine the SLNA SA1, SLNA DA1, SLNA S-port1, and SLNA D-port2 corresponding to IPSA1, IP DA1, IP S-port1, and IP D-port2 by looking up the table.
[0148] As is understandable, Tables 1 and 2 above are used to look up StarScan parameters based on IP parameters or vice versa; therefore, Tables 1 and 2 can be called parameter mapping tables or address translation tables, etc. Of course, this is just an example, and they can be called by other names in practice.
[0149] S303. A first device generates a second data packet, where the second data packet includes one or more of data, a communication protocol source address, a communication protocol destination address, a communication protocol source port number, and a communication protocol destination port number. In one design, the second data packet includes the aforementioned data, the communication protocol source address, the communication protocol destination address, the communication protocol source port number, and the communication protocol destination port number.
[0150] For example, the first device may encapsulate the communication protocol source address, the communication protocol destination address, the communication protocol source port number, and the communication protocol destination port number in the header of the first data packet to obtain the second data packet.
[0151] It should be noted that when a destination end device (i.e., the device corresponding to the destination network address) supports a second communication protocol, the communication protocol destination address is the communication protocol address of the destination end device. When the destination end device (i.e., the device corresponding to the destination network address) does not support the second communication protocol, the communication protocol destination address may be the communication protocol address of a node (such as a gateway) that supports the second communication protocol and leads to the destination end device.
[0152] Similarly, when a source end device (i.e., the device corresponding to the source network address) supports the second communication protocol, the communication protocol source address may be the communication protocol address of the source end device. When the source end device (i.e., the device corresponding to the source network address) does not support the second communication protocol, the communication protocol source address may be the communication protocol address of a node (such as a gateway) that supports the second communication protocol and leads to the destination end device.
[0153] Take Figure 2B the scenario shown in as an example, and take the second communication protocol as the StarFlash protocol and the first communication protocol as the IP protocol as examples: The internal network is a network formed based on the StarFlash protocol, so it can be referred to as a StarFlash domain. A management node (M node) in the StarFlash domain may assign SLNA and / or a service address (including an IP address) to nodes within the StarFlash domain, and an address mapping entry <L2ID, SLNA / service address> is maintained on the M node; an address resolution node (abbreviated as A node) in the StarFlash domain may synchronize the address mapping entry from the M node, or register the assigned SLNA and / or service address to the A node through a node address registration mechanism; the A node is responsible for the conversion function between non-StarFlash addresses and StarFlash addresses, and this virtual function may be implemented on a StarFlash network edge router or gateway device.
[0154] When device B within the StarSpark domain sends an IP datagram (the first datagram) to device A on the external network, the destination network address is the public IP address of the external network, and the source network address is device B's public / private IP address. Device B can query node A for the SLNA whose destination address is the StarSpark address corresponding to device A's public / private IP address, which is the gateway (CPE). Node B can then encapsulate the SLNA.<CPE-SLNA,B-SLNA,A-IP,B-IP> The gateway received the message carrying...<CPE-SLNA,B-SLNA,A-ip,B-IP> After receiving the Star Flash data packet (second data packet), it hits the CPE-SLNA and resolves the IP header address; if the B-IP is a private IP, it is converted to the CPE public IP and forwarded; if the B-IP is a public IP, it is forwarded directly.
[0155] Conversely, when external network device A sends an IP datagram (first datagram) to internal network device B, the destination IP address is the public IP address of device B within the StarSpark domain, and the source IP address is the public IP address of external network device A. Upon receiving this IP datagram, the gateway (first device) finds that the destination network address is the IP address of device B within the StarSpark domain. It then uses address translation to find the StarSpark address B-SLNA of device B. The gateway encapsulates the destination SLNA as B-SLNA and the source SLNA as CPE-SLNA, resulting in the encapsulated packet format as follows:<B-SLNA,CPE-SLNA,B-IP,A-IP> .
[0156] A similar method can be used to convert port numbers, which will not be elaborated here.
[0157] Understandably, for the sake of convenience, this article refers to data packets encapsulating StarScan protocol-related information (such as StarScan source address, StarScan destination address, StarScan source port number, StarScan destination port number, and / or StarScan QoS parameters) as StarScan data packets, although they may have other names. For example, if a data packet carries both an IP address and a StarScan address, then the data packet can also be considered an IP data packet.
[0158] S304, The first device sends the second data packet.
[0159] Since the address information carried in the second data packet (such as the communication protocol source address, communication protocol destination address, communication protocol source port number, communication protocol destination port number, etc.) is the address information corresponding to the second communication protocol, after the first device sends the second data packet, the device receiving the second data packet can address and forward the second data packet based on the address information corresponding to the second communication protocol, so as to transmit the data carried in the second data packet to the device corresponding to the destination network address, and finally realize end-to-end communication between the device corresponding to the source network address and the device corresponding to the destination network address, thereby improving the reliability of data transmission.
[0160] by Figure 2B Taking the scenario shown as an example, the first device is a gateway, the destination network address is the network address of device B, intermediate nodes 1 and 2 support the StarScan protocol but do not support the IP protocol, device B supports both the IP protocol and the StarScan protocol, and the first data packet is an IP data packet from device A (carrying the source IP address, destination IP address, source TCP / UDP port number, and destination TCP / UDP port number). After the gateway receives the IP data packet, it can convert it into a StarScan data packet (i.e., a data packet carrying the StarScan source address, StarScan destination address, StarScan source port number, and StarScan destination port number) according to the first mapping relationship. Then, after intermediate nodes 1 and 2 receive the StarScan data packet, they can forward the StarScan data packet according to the address information carried in the StarScan data packet (i.e., StarScan source address, StarScan destination address, StarScan source port number, and StarScan destination port number), and finally forward the StarScan data packet to device B, thereby realizing end-to-end communication between device A and device B.
[0161] Optionally, the source network address, destination network address, source transport layer port number, and / or destination transport layer port number, etc., in the first data packet can be retained in the second data packet. Figure 2B Taking the scenario shown as an example, when device B sends an IP data packet to device A, since device A does not support StarSignal addresses, device B (the first device) can determine the gateway's StarSignal address after generating the IP data packet to be sent to device A, and use it as the StarSignal destination address. This allows the intranet (i.e., the network built based on the StarSignal protocol) to route the packet to the gateway based on the StarSignal destination address. At the same time, the packet retains device B's IP address (i.e., the destination IP address), and the gateway can route the packet to device A based on the destination IP address.
[0162] In one possible design, the first mapping relationship is predefined; or, the first mapping relationship is generated by the first device; or, the first mapping relationship comes from the second device, for example, sent by the second device to the first device. This application does not impose any restrictions.
[0163] In specific implementations, when an internal network (i.e., a network established based on a second communication protocol) is initialized, a management node (M node) that assumes the Manager role is required, and it is injected with assignable address types and address spaces. The M node is responsible for address allocation for the entire internal network. Considering the reliability of network management, one or more backup M nodes may also exist in the network. The internal network further requires an Address Resolver node (which may be referred to as an A node for short) to provide mapping query functions between non-StarFlash addresses (such as IP addresses) and StarFlash network addresses. Two communicating parties based on non-StarFlash addresses can query each other's StarFlash network addresses from the A node, construct StarFlash data packets based on the StarFlash network addresses, and perform addressing and forwarding through the StarFlash network addresses.
[0164] In the internal network, multiple nodes located within a certain range may form a communication domain. The internal network may include one or more communication domains, and intersection nodes may exist between different communication domains (that is, the same node may be located in multiple different communication domains at the same time). Each communication domain includes one master node (or referred to as a G node) and at least one slave node (or referred to as a T node). It should be noted that the role of the same node in different communication domains may be different. For example, the same node may be a G node in one communication domain and a T node in another communication domain.
[0165] During communication, the G node may act as an address allocation server, and the T node requests the G node to allocate a StarFlash address and an IP address. In the process of allocating addresses, the G node may establish a mapping table of StarFlash addresses and IP addresses (for example, <Layer 2 Identifier (L2ID), SLNA address, IP address>, which records each node (where each node may be uniquely identified by its corresponding L2ID) and its corresponding SLNA address and IP address). The G node synchronizes the information in the mapping table with the A node in the network (or the nodes that have been allocated addresses register the allocated address information with the A node, that is, the A node establishes a mapping table of <L2ID, SLNA, IP address>). One L2ID corresponds to multiple SLNAs and / or multiple IP addresses, that is, there may be multiple entries.
[0166] Therefore, when the first device is a G node, the first mapping relationship may be generated by the first device itself; when the first node is an A node, the first mapping relationship may be generated by the first node, or sent to the first device by the G node; when the first node is a T node, the first mapping relationship may be sent to the T node by the G node or the A node. Certainly, in addition to this, other implementations are also possible, for example, a technician predefines the first mapping relationship and then saves the first mapping relationship in each node in the network, which is not limited in this application.
[0167] In this way, the first device can obtain the first mapping relationship, providing support for the conversion between the first information and the second information, and further improving the reliability of data transmission.
[0168] In one possible design, the first data packet also includes a first QoS indication field (e.g., the first information also includes a first QoS indication field); the first mapping relationship is also used to indicate the mapping relationship between the first QoS indication field and the second QoS indication field; the second data packet also includes a second QoS indication field (e.g., the second information also includes a first QoS indication field).
[0169] The first QoS indication field is the expression of the QoS parameter in the first communication protocol. For example, when the first communication protocol is IP, the first QoS indication field may include Differentiated Services Code Point (DSCP) or Traffic of Class. DSCP is a QoS parameter defined in Internet Protocol version 4 (IPv4), originally defined as Type of Service (ToS) to specify differentiated services (DiffServ). Traffic of Class is a QoS parameter defined in Internet Protocol version 6 (IPv6), reserving the high 6 bits of the Differential Service field (DS field) for packet classification. The remaining two bits of the DS field are used for Explicit Congestion Notification (ECN).
[0170] The second QoS indication field is the expression of the QoS parameter in the second communication protocol. For example, when the second communication protocol is the StarFlash protocol, the second QoS indication field may include a flow label and a type of service (ToS). The flow label is used to indicate the traffic generated by a certain APP or the traffic with a certain type of QoS requirement. It is assigned by the source node to ensure local uniqueness.
[0171] The above design enables the conversion of QoS parameters between different protocols, providing QoS guarantees for data during transmission and further improving the reliability of data transmission.
[0172] In one possible design, the first device further determines the L2ID of the next-hop node leading to the communication protocol destination address and the Transport channel Identifier (TCID) of the transmission channel between the first device and the next-hop node based on one or more of the communication protocol source address, communication protocol destination address, communication protocol source port number, communication protocol destination port number, or the second QoS indication field; wherein the transmission channel satisfies the QoS requirements corresponding to the second QoS indication field; the first device encapsulates the second data packet according to the L2ID and TCID to generate a third data packet; and the first device sends the third data packet.
[0173] Understandably, when the first device sends the second data packet to the device corresponding to the communication protocol destination address, it needs to perform addressing based on the communication protocol source address and / or communication protocol destination address to determine the L2ID of the next-hop node leading to the communication protocol destination address, so as to forward the second data packet to the next-hop node. If the next-hop node corresponds to the communication protocol destination address, the packet forwarding is complete. If the next-hop node does not correspond to the communication protocol destination address, the next-hop node can continue to perform addressing based on the source address and / or communication protocol destination address, and continue to find the next node for forwarding, in a loop, until the second data packet reaches the device corresponding to the communication protocol destination address.
[0174] Optionally, when there are multiple next-hop nodes (or multiple routing paths) leading to the destination address of the communication protocol for the first device, one of the next-hop nodes can be randomly selected for packet forwarding, or a next-hop node can be selected for packet forwarding based on the path QoS optimization principle, etc. This application does not impose any restrictions.
[0175] Furthermore, since different data packets can correspond to different QoS requirements (such as transmission bandwidth, latency, packet loss rate, etc.), multiple transmission channels can be established between adjacent nodes to meet these different QoS requirements. Different transmission channels can correspond to different QoS requirements (such as allocating different transmission resources, like time-frequency resources). In this way, when a node sends a data packet, it can carry the data packet on a transmission channel that can meet the QoS requirements of that data packet. Therefore, in addition to determining the next-hop node, the first device also needs to determine the transmission channel between the first device and the next-hop node.
[0176] When nodes establish a transmission channel, they can do so based on QoS information, port number, and L2ID. Therefore, when the first device sends the second data packet to the next-hop node, it can determine the TCID of the transmission channel that meets the QoS requirements corresponding to the second QoS indication field based on the communication protocol destination port number, the second QoS indication field, and the L2ID of the next-hop node.
[0177] In specific implementations, there are multiple ways for the first device to determine the L2ID of the next-hop node leading to the destination address of the communication protocol and the TCID of the transmission channel between the first device and the next-hop node. Two possible methods are listed below.
[0178] Method 1: The first device determines the L2ID of the next-hop node leading to the destination address of the communication protocol and the TCID of the transmission channel between the first device and the next-hop node according to the second mapping relationship; wherein, the second mapping relationship is used to indicate the mapping relationship between one or more of the communication protocol source address, communication protocol destination address, communication protocol source port number, communication protocol destination port number, or the second QoS indication field and the L2ID of the next-hop node and the TCID of the transmission channel.
[0179] Understandably, in Method 1, when there is already a transmission channel in the network that meets the QoS requirements of the second data packet, the first device can determine the transmission channel that meets the QoS requirements of the second data packet from the existing transmission channels based on the information carried in the second data packet.
[0180] In the embodiments of this application, the second mapping relationship can be implemented in various ways. For example, Table 3 shows a possible example of the second mapping relationship:
[0181] Table 3
[0182]
[0183] Similarly, in the specific implementation, a table can store multiple sets of mapping relationships, corresponding to different combinations of <communication protocol source address, communication protocol destination address, communication protocol source port number, communication protocol destination port number, second QoS indication field, L2ID, TCID>, and the second mapping relationship is one of the mapping relationships.
[0184] After the first device receives the second data packet, it can find the L2ID of the next-hop node leading to the communication protocol destination address and the TCID of the transmission channel between the first device and the next-hop node from Table 3 based on one or more of the communication protocol source address, communication protocol destination address, communication protocol source port number, communication protocol destination port number, or the second QoS indication field carried in the second data packet.
[0185] Understandably, in practical applications, the second mapping relationship can be represented not only by a single table but also by multiple tables. For example, Tables 4 and 5 are possible examples of the second mapping relationship.
[0186] Table 4
[0187] 1 SLNA SA1 SLNA DA1 L2ID1
[0188] Understandably, Table 4 can be called a forwarding table, used to find the next-hop node. Of course, this is just an example, and it can be called by other names in practice.
[0189] Table 5
[0190]
[0191] As is understandable, Table 5 can be called a transmission channel resolution table or channel resolution table, used to find the transmission channel between the node and the next hop. Of course, this is just an example, and it can be called by other names in practice.
[0192] Similarly, Table 3 can be viewed as a combination of a forwarding table and a transmission channel resolution table; for example, it could be called a forwarding table & transmission channel resolution table. Of course, this is just an example, and other names are possible in practice.
[0193] After the first device receives the second data packet, it can find the L2ID of the next-hop node leading to the communication protocol destination address from Table 4 based on the communication protocol source address and / or communication protocol destination address carried in the second data packet; and further find the TCID of the transmission channel between the first device and the next-hop node from Table 5 based on the L2ID of the next-hop node, the communication protocol source port number, the communication protocol destination port number, or one or more of the second QoS indication fields.
[0194] Method 2: The first device determines the L2ID of the next-hop node leading to the communication protocol destination address based on the communication protocol source address and / or communication protocol destination address; the first device maps the second QoS indication field to the third QoS indication field, establishes a transmission channel with the next-hop node based on the communication protocol destination port number, the third QoS indication field, and the L2ID of the next-hop node, and generates the TCID of the transmission channel.
[0195] Unlike Method 1, Method 2 allows the first device to establish a transmission channel that meets the QoS requirements of the second data packet when there is no transmission channel in the network that meets the QoS requirements of the second data packet.
[0196] For example, after the first device obtains the second data packet, it queries the existing second mapping relationship (as shown in Table 3). If it does not find a transmission channel that meets the QoS requirements of the second data packet, it initiates the transmission channel establishment process and generates the TCID of the transmission channel.
[0197] Taking the second communication protocol as the Spark protocol as an example, the third QoS field can be the Spark LinkQuality Index (SLQI), also known as the Spark Service Quality Index, used to indicate the QoS level and corresponding QoS parameters, such as default priority, latency, packet loss rate, etc. Of course, in practical applications, the third QoS field can also be replaced with other parameters (such as one or more of QoS level, priority, latency, packet loss rate, etc.), or the QoS parameters in the third QoS field can be further increased, which is not limited in this application.
[0198] Optionally, after the first device establishes a transmission channel, it can also generate a second mapping relationship based on one or more of the following: the communication protocol source address, the communication protocol destination address, the communication protocol source port number, the communication protocol destination port number, or the second QoS indication field, as well as the L2ID of the next-hop node and the TCID of the established transmission channel. In this way, when the first device subsequently transmits data packets with the same second information, it can directly find the L2ID of the next-hop node and the TCID of the transmission channel that meet the transmission requirements through the second mapping relationship, avoiding the need to repeatedly establish transmission channels, saving system resources, and improving data transmission efficiency.
[0199] The above design method enables the second data packet to be forwarded from the first device to the next-hop node while meeting the QoS requirements of the second data packet for the transmission path, thereby further improving the reliability of communication.
[0200] In one possible design, the next-hop node of the first device is the device corresponding to the destination network address (i.e., there are no intermediate nodes between the first device and the device corresponding to the destination network address, for example...). Figure 2A In the scenario shown, when the first device is a gateway and the device corresponding to the destination network address is device B), the second data packet can omit one or more of the following fields: communication protocol source address, communication protocol destination address, communication protocol source port number, communication protocol destination port number, and / or the second QoS indication field. Instead, it can directly carry the source network address, destination network address, source transport layer port number, and / or destination transport layer port number, and / or the first QoS indication field. This saves overhead.
[0201] In one possible design, before converting the first information corresponding to the first communication protocol into the second information corresponding to the second communication protocol, the first device can also convert information corresponding to other communication protocols to obtain the first information. For example, if both the source and destination network addresses in the first information are private IP addresses, the first device can first map the public IP address to a private IP address; or, if both the source and destination network addresses in the first information are public IP addresses, the first device can first map the private IP address to a public IP address, and so on. This improves the applicability of the solution.
[0202] The above description is from the perspective of a first device, illustrating the method provided in this application embodiment. The following description will examine the above solution from the perspective of the protocol stack of the first device.
[0203] The first device provided in this application embodiment has a protocol stack of a second communication protocol deployed on it. The protocol stack of the second communication protocol includes, from top to bottom, a first protocol layer, a second protocol layer, a third protocol layer, and a fourth protocol layer.
[0204] The first protocol layer can deploy several application (APP) / business instances, which can be used to provide services to applications (also known as applications or users).
[0205] The second protocol layer is used to provide information conversion functions between different transport protocols (for example, it stores the first mapping relationship and the second mapping relationship).
[0206] The third protocol layer is used to establish transmission channels between nodes and provide end-to-end information transmission services.
[0207] The fourth protocol layer can provide communication interfaces / means for communication between nodes. The access layer may include a variety of different access technologies, and different access technologies may correspond to different communication interfaces, such as cellular interfaces, WIFI interfaces, and star-flash interfaces.
[0208] It should be understood that the above protocol layer is only a framework for structural division. Different communication systems may have their own layer division methods, or more specific and lower-level layer divisions. No specific limitations are made here.
[0209] See Figure 4 The flowchart below illustrates another data transmission method provided in this application embodiment. This method can be applied to a first device, on which a protocol stack of a second communication protocol is deployed. The method includes:
[0210] S401. The first device transmits the first data packet from the first protocol layer of the protocol stack to the second protocol layer of the protocol stack. The first data packet contains data, source network address, destination network address, source transport layer port number, and destination transport layer port number. The first data packet corresponds to the first communication protocol.
[0211] S402. The first device determines the second information at the second protocol layer of the protocol stack according to the first mapping relationship. The second information corresponds to the second communication protocol. The second information includes the communication protocol source address, the communication protocol destination address, the communication protocol source port number, and the communication protocol destination port number. The first mapping relationship is used to indicate one or more of the following: the mapping relationship between the source network address and the communication protocol source address, the mapping relationship between the destination network address and the communication protocol destination address, the mapping relationship between the source transport layer port number and the communication protocol source port number, and the mapping relationship between the destination transport layer port number and the communication protocol destination port number.
[0212] S403. The first device generates a second data packet at the second protocol layer of the protocol stack, wherein the second data packet includes one or more of the following: data, communication protocol source address, communication protocol destination address, communication protocol source port number, and communication protocol destination port number;
[0213] S404. The first device sends the second data packet at the third protocol layer of the protocol stack.
[0214] Understandably, the second data packet can also be processed by the fourth protocol layer and sent out through the communication interface provided by the fourth protocol layer.
[0215] Furthermore, if the first information also carries QoS parameters of the first protocol layer, such as the first QoS indication field mentioned above, then a device will also convert the first QoS indication field into QoS parameters of the second protocol layer at the second protocol layer of the protocol stack, such as the second QoS field mentioned above. The second data packet also includes the second QoS indication field (for example, the second information also includes the first QoS indication field).
[0216] Furthermore, the first device can also determine, at the second protocol layer of the protocol stack, the L2ID of the next-hop node leading to the communication protocol destination address and the transmission channel identifier TCID of the transmission channel between the first device and the next-hop node based on one or more of the communication protocol source address, communication protocol destination address, communication protocol source port number, communication protocol destination port number, or the second QoS indication field; wherein the transmission channel satisfies the QoS requirements corresponding to the second QoS indication field. Correspondingly, the first device sends a second data packet at the third protocol layer of the protocol stack, including: the first device encapsulating the second data packet based on the L2ID and TCID at the third protocol layer of the protocol stack (e.g., adding L2ID and TCID to the header of the second data packet), generating a third data packet, and then sending the third data packet at the third protocol layer of the protocol stack.
[0217] Similarly, corresponding to Method 1 above, if there is already a transmission channel in the network that meets the QoS requirements of the second data packet, and the second protocol layer stores the second mapping relationship, then the first device can determine the L2ID of the next-hop node leading to the destination address of the communication protocol and the TCID of the transmission channel between the first device and the next-hop node based on the second mapping relationship in the second protocol layer of the protocol stack.
[0218] Similarly, corresponding to Method 2 above, if there is no transmission channel in the network that meets the QoS requirements of the second data packet, the first device can determine the L2ID of the next-hop node leading to the communication protocol destination address based on the communication protocol source address and / or communication protocol destination address at the second protocol layer of the protocol stack. Then, the first device maps the second QoS indication field to a third QoS indication field (such as SLQI) at the third protocol layer of the protocol stack, establishes a transmission channel with the next-hop node based on the communication protocol destination port number, the third QoS indication field, and the L2ID of the next-hop node, and generates the TCID of the transmission channel. Then, the first device can encapsulate the second data packet based on the L2ID and TCID at the third protocol layer of the protocol stack.
[0219] Furthermore, the third protocol layer can also feed back the TCID of the generated transmission channel to the second protocol layer. Then, the first device can generate a second mapping relationship in the second protocol layer of the protocol stack based on one or more of the communication protocol source address, communication protocol destination address, communication protocol source port number, communication protocol destination port number, or the second QoS indication field, as well as the L2ID of the next hop node and the TCID of the transmission channel, for use in the next transmission of data packets.
[0220] To facilitate understanding, the above scheme will be explained in more detail below, taking the StarScan protocol as the second communication protocol as an example.
[0221] See Figure 5This application provides a schematic diagram of the protocol stack for the StarSpark protocol. From top to bottom, it includes:
[0222] 1. Application Layer (corresponding to the first protocol layer): Located above the network layer, it can deploy several APP / service instances and can be used to provide services to applications (also known as applications or users). Optionally, the application layer can also be used to support protocols such as TCP / UDP and IPv4 / IPv6.
[0223] 2. Network Layer (corresponding to the second protocol layer): Located above the basic service layer, it provides information conversion functions between different transmission protocols (e.g., conversion between first information corresponding to the first communication protocol and second information corresponding to the second communication protocol). For example, it can provide an IP adaptation function unit, which is a logical functional entity used to convert relevant information of the IP protocol (such as IP address information) with relevant information of the StarScan protocol (such as StarScan address). Specifically, it can provide information conversion functions between different transmission protocols by maintaining a first mapping relationship and a second mapping relationship.
[0224] 3. Basic Service Layer (corresponding to the third protocol layer): Located above the access layer, it is used to establish transmission channels between nodes and provide end-to-end information transmission services.
[0225] For example, the basic service layer can provide control plane functional units such as QoS management functional unit, connection management functional unit, device discovery functional unit, service discovery functional unit, security management functional unit, and measurement management functional unit.
[0226] 1) QoS Management Function Unit: The QoS Management Function Unit is a logical functional entity used to determine the quality of service that the StarSpark wireless communication system needs to provide based on factors such as service transmission requirements and network conditions, so as to ensure that the transmission capacity of the StarSpark wireless communication system matches the service requirements.
[0227] For example, the QoS management function unit can be responsible for negotiating and determining QoS parameters. When the application layer at the sending end has service data to transmit, it submits information such as the service type, the Star Flash port number, and the QoS parameters (Flow Label, ToS) associated with the service to the QoS management function unit. The sending end's QoS management function unit then negotiates the QoS parameters required for transmission with the peer's QoS management function unit based on the received parameters, and determines the SLQI.
[0228] 2) Connection Management Function Unit: This is a logical functional entity that supports functions including establishing, updating, and deleting transmission channels; maintaining the mapping relationship between service ports and transmission channels; and maintaining the mapping relationship between transmission channels and access layer logical channels. For example, the Connection Management Function Unit can initiate the establishment or updating of transmission channels according to the QoS parameters negotiated by the QoS Management Function Unit, and feed back the information of the established or updated transmission channels (such as TCID) to the network layer (such as the IP Adaptation Function Unit) for storage and maintenance.
[0229] 3) Device discovery function unit: It is a logical functional entity used to disclose its own existence or discover surrounding devices.
[0230] 4) Service Management Function Unit: This is a logical functional entity used for service management and maintenance within the device, as well as service discovery between devices.
[0231] 5) Measurement Management Function Unit: The measurement management function unit supports measurements including triggering access layer measurements of physical layer signal quality, optical performance measurements of existing transmission channels, and provides a unified measurement service interface for other functional units within the device (such as the QoS management function unit, 5G convergence function unit, etc.) or authorized applications. It allows corresponding functional units to provide the measurement management function unit with the configuration information for desired measurements and to query the measurement results.
[0232] It is understandable that the functional units of the above control surfaces are only examples and not limitations, and there may be other functional units in practice.
[0233] In addition to providing control plane functions, the basic service layer also provides data plane (or user plane) functions. For example, by querying the first and second mapping relationships maintained by the network layer IP adaptation function unit, data packets are mapped to the corresponding transmission channels for transmission.
[0234] 4. Access Layer (corresponding to the fourth protocol layer): It can provide communication interfaces / means for communication between nodes. The access layer may include a variety of different access technologies, and different access technologies may correspond to different communication interfaces, such as SLB air interface, SLE air interface, etc.
[0235] It should be understood that the above-described protocol layers are merely a framework for structural division. Different communication systems may have their own layer division methods, or more specific and lower-level layer divisions; no specific limitations are made here. For example, the functional modules of the network layer mentioned above can also be integrated into the basic service layer, thus omitting the network layer (i.e., the application layer is above the basic service layer). Furthermore, the names of each protocol layer are merely examples; other names can be used in practical applications. As long as the function of a protocol layer is the same as or similar to the function of the protocol layers in the embodiments of this application, it can be considered a protocol layer in the embodiments of this application.
[0236] In this embodiment of the application, different protocol layers maintain different transmission parameters, wherein the parameters in the first mapping relationship and the second mapping relationship can be specifically stored and maintained at the network layer.
[0237] The following table provides examples of the parameters maintained by each protocol layer:
[0238] I. Application layer maintained table entries (application instance oriented):
[0239] Table 6
[0240]
[0241] Here, AID stands for Application Identifier. The above table uses AID as an example for video casting, but it is not limited to this.
[0242] II. Entries maintained by the network layer (IP adaptation management unit) (first mapping relationship, second mapping relationship):
[0243] Table 7
[0244]
[0245] Maximum Transmission Unit (MTU): This is the maximum transmission unit for data transmission at the basic service layer. The size of the MTU must take into account the maximum value of the buffer in this layer. Application layer data packets cannot exceed the MTU size.
[0246] Maximum Payload Size (MPS): This is the largest transmission unit that the access layer can transmit. The basic service layer needs to divide the SUD into multiple PDUs, and the size of each PDU cannot exceed the MPS.
[0247] Upper-layer protocol identifier (PI): Used to indicate the protocol type.
[0248] III. Table entries maintained by the basic service layer (for transport channels):
[0249] Table 8
[0250]
[0251] IV. Entries maintained by the access layer (for logical channels):
[0252] Table 9
[0253]
[0254] XQI: Transaction Quality Index; LCID: Logical Channel Identifier.
[0255] See Figure 6 This is a schematic diagram showing the relationship between related functional units in the StarSpark protocol stack.
[0256] IP Adaptation Functional Unit: After the first device obtains the IP data packet (i.e., the first data packet), it can use the IP address (including source IP address and destination IP address), TCP / UDP port number (including source TCP / UDP port number and destination TCP / UDP port number), DSCP and other parameters carried in the IP data packet to perform table lookup through the IP adaptation functional unit of the network layer, so as to realize the conversion of IP address to Star Flash address, TCP / UDP port number to Star Flash port number, and DSCP to Flow label and ToS, etc.
[0257] QoS Management Unit: Responsible for negotiating and determining QoS parameters. When the application layer of the first device needs to transmit service data, it submits information such as service type, stroboscopic port number, and service-related QoS parameters (e.g., Flow Label, ToS) to the QoS Management Unit. The QoS Management Unit then negotiates the required QoS parameters with the peer (next-hop node) QoS Management Unit based on the received parameters to determine the SLQI. That is, the application QoS parameter mapping is: <Source SLNA, Destination SLNA, stroboscopic port number, Flow label, ToS, AID> → <Source SLNA, Destination SLNA, stroboscopic port number, SLQI, AID>.
[0258] Connection Management Unit: Based on the QoS parameters negotiated by the QoS Management Unit, it initiates the establishment or update of the transmission channel to create a transmission channel that meets QoS requirements. It then feeds back the TCID of the established transmission channel to the IP Adaptation Function Unit for storage and maintenance.
[0259] IP Adaptation Function Unit: After receiving the TCID from the Connection Management Unit, it updates the table entries maintained by the network layer (IP Adaptation Management Unit), so that the first device can directly look up the table locally and forward the IP data packets it subsequently receives, thus enabling the carrying of the data packets.
[0260] The above scheme enables the conversion between IP parameters and StarSpark parameters in the StarSpark protocol stack, thereby enabling the carrying of IP data packets within the StarSpark domain and improving the reliability of data transmission.
[0261] To better understand the technical solutions provided in the embodiments of this application, the following will further combine... Figure 2A The single jump shown and Figure 2B The multi-hop scenario shown illustrates the data packet forwarding process.
[0262] Example 1: Single-hop scenario
[0263] End devices (such as device A and device B) all support dual protocol addresses (such as IP address and Star Flash address).
[0264] Initial conditions: Device B requests a StarNet address (SLNA) after connecting to the StarNet network.
[0265] For example, after a T node in a StarNet network starts up, it discovers each other with a G node and establishes a management connection, which requires meeting requirements such as secure access. Device B can be either a G node or a T node, without restriction. The G node has IP capabilities and acts as an address allocation server; the T node needs to request an SLNA address from the G node. During the address allocation process, the G node can establish...<L2ID,SLNA> The mapping table allows one L2ID to have multiple SLNAs, meaning multiple entries. Furthermore, G nodes support mutual query services between L2ID and SLNA addresses; any T node can query address information from the G node's address service.
[0266] See Figure 7A This is a schematic diagram illustrating how an internal network device receives IP data packets sent by an external network device. In this example, the gateway and devices within the StarFlash domain (such as device B) must meet the following requirements:
[0267] 1. Gateway:
[0268] External network device (Device A) → Gateway: Device A sends public IP data packets to the gateway (i.e., Figure 7A The message shown is 1);
[0269] The gateway converts public network IP address information (e.g., public network IP address, public network TCP / UDP port number) into SparkLink address information (e.g., SLNA, SparkLink port number). Specifically, the gateway may first convert the public network IP address information into private network IP address information (e.g., private network IP address, private network TCP / UDP port number), and then map the private network IP address information to the SparkLink address information. The gateway imports SLNA traffic into the SparkLink protocol stack.
[0270] The gateway parses information such as <IP address, TCP / UDP port number, DSCP> in the IP data packet, and queries the transmission channel parsing table based on these pieces of information. If a corresponding entry exists, the packet is encapsulated, and a SparkLink data packet is generated and sent( Figure 7A Packet 2 shown in). If no corresponding entry exists, QoS negotiation and transmission channel establishment are initiated, a corresponding entry is generated, then the packet is encapsulated based on the newly established transmission channel, and a SparkLink data packet is generated and sent; if the transmission channel establishment fails, the packet is discarded.
[0271] It can be understood that since this is a single-hop scenario, the SparkLink address may be omitted from the header of Packet 2( Figure 7A the header of Packet 2 as shown), and the SparkLink address may also be encapsulated in Packet 2 in practical applications.
[0272] 2. Device B:
[0273] Perform QoS negotiation and transmission channel establishment in coordination with the G node, and generate entries of the relevant transmission channel parsing table;
[0274] After receiving the SparkLink data packet, the IP data packet ( Figure 7A Packet 3 as shown) is sent up to the IP protocol stack / IP application according to the SparkLink port number.
[0275] See Figure 7B , which is a schematic diagram of an intranet device sending an IP data packet to an extranet device. In this example, the gateway and the device in the SparkLink domain (such as Device B) need to meet the following requirements:
[0276] 1. Device B:
[0277] The application layer generates a private network IP data packet (i.e., Figure 7B Packet 1 as shown in), and transmits the private network IP data packet to the SparkLink protocol stack. The SparkLink protocol stack obtains information such as <IP address, TCP / UDP port number, DSCP> from the sending primitive interface and the private network IP data packet header, and queries the transmission channel parsing table. If a corresponding entry exists, the IP data packet is encapsulated with a SparkLink packet header to generate a SparkLink data packet (i.e., Figure 7Bthe packet shown in ) and send it. If no corresponding entry exists, a transmission connection needs to be established or an existing transmission connection needs to be multiplexed according to information such as <IP address, TCP / UDP port number, DSCP>. If the transmission connection is successfully established, the corresponding entry is created, the IP data packet is encapsulated with a StarFlash packet header and sent; if the transmission connection fails to be established, the packet is discarded.
[0278] 2. Gateway:
[0279] Receive the StarFlash data packet and upload it to the IP protocol stack;
[0280] The gateway converts the StarFlash address information into public network IP address information, and sends the IP data packet to the external network (i.e. Figure 7B Packet 3 shown in ).
[0281] It can be understood that since this is a single-hop scenario, the StarFlash address can be omitted from the header of Packet 2 (the header of Packet 2 shown in Figure 7B does not have one), and the StarFlash address can also be encapsulated in Packet 2 in practical applications.
[0282] Through the above Example 1, end-to-end transmission of public network IP application data and end devices in the StarFlash domain can be realized, and the bearing of IP data in the StarFlash domain is realized. In the StarFlash domain, packets are forwarded by routing and addressing through StarFlash address information, which can make full use of the characteristics of short StarFlash address length and support for flexible customization, reduce packet header overhead, increase payload ratio, and improve transmission efficiency.
[0283] Example 2: Multi-hop scenario
[0284] End devices (such as Device A and Device B) all support dual protocol addresses (such as IP address and StarFlash address).
[0285] Initial condition: After Device B accesses the StarFlash network, it applies for the StarFlash network address SLNA.
[0286] Exemplarily, after the T node in the StarFlash network is started, it mutually discovers with the G node and establishes a management connection, which needs to meet requirements such as secure access. Device B may be the G node or the T node, which is not limited. The G node has IP capability and serves as an address allocation server, and the T node needs to request the G node to allocate an SLNA address. During the address allocation process, the G node can establish a <L2ID, SLNA> mapping table, and one L2ID can have multiple SLNAs, that is, multiple entries. In addition, the G node supports a mutual query service between L2ID and SLNA addresses, and any T node can query address information from the address service of the G node.
[0287] See Figure 8Ais a schematic diagram of an intranet device receiving an IP data packet sent by an extranet device. In this example, the gateway and the devices in the StarFlash domain (such as device B) need to meet the following requirements:
[0288] 1. Gateway:
[0289] Extranet device (device A) → Gateway: Device A sends a public network IP data packet to the gateway (i.e., Figure 8A Packet 1 shown in);
[0290] The gateway converts public network IP address information (e.g., public network IP address, public network TCP / UDP port number) into StarFlash address information (such as SLNA, StarFlash port number). Specifically, the gateway may first convert the public network IP address information into private network IP address information (e.g., private network IP address, private network TCP / UDP port number), and then map the private network IP address information to the StarFlash address information. The gateway imports SLNA traffic into the StarFlash protocol stack.
[0291] The gateway parses information such as <IP address, TCP / UDP port number, DSCP> in the IP data packet, and queries the forwarding table, transmission channel parsing table, etc. based on these information. If a corresponding entry exists, the packet is encapsulated, and a StarFlash data packet is generated and sent ( Figure 8A Packet 2 shown in). If no corresponding entry exists, QoS negotiation and transmission channel establishment are initiated, and a corresponding entry is generated. Then the packet is encapsulated based on the newly established transmission channel, and a StarFlash data packet is generated and sent; if the transmission channel establishment fails, the packet is discarded.
[0292] 2. Intermediate nodes 1 and 2:
[0293] Receive the StarFlash data packet from device A, perform necessary encapsulation on the StarFlash data packet (e.g., add LCID, TCID, etc., which is specifically determined according to the requirements of the frame format), for example, find and replace the LCID, TCID, etc. of the next-hop node step by step, and finally forward the packet to device B.
[0294] 3. Device B:
[0295] Perform QoS negotiation and transmission channel establishment in cooperation with the G node, and generate relevant entries;
[0296] Receive the StarFlash data packet (such as Figure 8A Packet 4 shown in), and upload the IP data packet (such as Figure 8A Packet 5 shown in) to the IP protocol stack / IP application according to the StarFlash port number.
[0297] Refer to Figure 8B which is a schematic diagram of an intranet device receiving an extranet IP data packet. In this example, the gateway and the devices in the StarFlash domain (such as device B) need to meet the following requirements:
[0298] 1. Device B:
[0299] The application layer generates a private network IP data packet (i.e., Figure 8B Packet 1 shown in), transmits the private network IP data packet to the StarFlash protocol stack, and the StarFlash protocol stack obtains information such as <IP address, TCP / UDP port number, DSCP> from the sending primitive interface and the header of the private network IP data packet, and queries the forwarding table, transmission channel parsing table and the like. If an entry exists, the IP data packet is encapsulated with a StarFlash packet header to generate a StarFlash data packet (i.e., Figure 8B Packet 2 shown in) and send it. If no entry exists, it is necessary to establish a transmission connection or multiplex an existing transmission connection according to the information such as <IP address, TCP / UDP port number, DSCP>. If the transmission connection is successfully established, a corresponding entry is created, the IP data packet is encapsulated with a StarFlash packet header and then sent; if the transmission connection fails to be established, the packet is discarded.
[0300] 2. Intermediate nodes 1 and 2:
[0301] The StarFlash data packet from Device B is received, and the StarFlash data packet is subjected to necessary encapsulation (such as adding LCID, TCID, etc., which is specifically determined according to the requirements of the frame format), for example, the LCID, TCID, etc. of the next-hop node are searched and replaced level by level, and the packet is finally forwarded to the gateway.
[0302] 3. Gateway:
[0303] The StarFlash data packet is received (such as Figure 8B Packet 4 shown in), the StarFlash address information is converted into public network IP address information, and the IP data packet is sent to the external network (i.e., Figure 8B Packet 5 shown in).
[0304] Through the foregoing second example, end-to-end transmission of public network IP application data and end devices in the StarFlash domain can be implemented, and the bearing of IP data in the StarFlash domain is realized. In the StarFlash domain, packets are routed, addressed and forwarded through StarFlash address information, which can fully utilize the features of short StarFlash address length and support for flexible customization, reduce packet header overhead, improve payload ratio, and increase transmission efficiency.
[0305] It should be noted that the foregoing embodiments mainly take determining the transmission channel by the address and port number corresponding to the second communication protocol as an example (for example, the transmission channel is associated with the StarFlash address, the StarFlash port number, etc.). In practical applications, the solution for the first device to determine the transmission channel may also be applied to other communication protocols (for example, the transmission channel may also be associated with the IP address, the TCP / UDP port number, etc.).
[0306] For example, refer to Figure 9The flowchart illustrates another data transmission method provided in this application embodiment, the method comprising:
[0307] S901, The first device acquires a data packet, which includes data, source address, destination address, source port number, destination port number, and QoS indication field.
[0308] For specific implementation details, please refer to S301 or S401 above; they will not be repeated here. The only difference is that here, the source address, destination address, source port number, destination port number, QoS indication field, etc., are not limited to any specific communication protocol.
[0309] For example, in the case of the IP protocol, the source and destination addresses are of type IP address, the source and destination port numbers are of type TCP / UDP port number, and the QoS parameter is DSCP or Traffic of Class.
[0310] For example, in the case of the StarFlash protocol, the source address and destination address are of type StarFlash address, the source port number and destination port number are of type StarFlash port number, and the QoS parameter is ToS.
[0311] S902, the first device determines the Layer 2 address (L2ID) leading to the next-hop node at the destination address and the TCID of the transmission channel between the first device and the next-hop node based on one or more of the source address, destination address, source port number, destination port number, or QoS indication field; wherein the transmission channel satisfies the QoS requirements corresponding to the QoS indication field.
[0312] Similarly, if there is already a transmission channel in the network that meets the QoS requirements of the data packet, the first device can determine the L2ID of the next-hop node leading to the destination address and the TCID of the transmission channel between the first device and the next-hop node according to the second mapping relationship; wherein, the second mapping relationship is used to indicate the mapping relationship between one or more of the source address, destination address, source port number, destination port number, or QoS indication field and the L2ID of the next-hop node and the TCID of the transmission channel.
[0313] If there is no transmission channel in the network that meets the QoS requirements of the second data packet, the first device can determine the L2ID of the next-hop node leading to the destination address based on the source address and / or destination address. The first device establishes a transmission channel with the next-hop node based on the destination port number, the QoS indication field, the L2ID of the next-hop node, and generates the TCID of the transmission channel. Furthermore, the first device also generates a second mapping relationship based on one or more of the source address, destination address, source port number, destination port number, or QoS indication field, as well as the L2ID of the next-hop node and the TCID of the transmission channel, for use in subsequent forwarding of data packets.
[0314] S903. The first device encapsulates the data packet according to the L2ID and TCID, and sends the encapsulated data packet.
[0315] For details on the specific implementation, please refer to S404 above; it will not be repeated here.
[0316] Similarly, when the source and destination addresses are of type IP address, if the destination address is the address of the next-hop node, the star address can be omitted in the encapsulated data packet. For example, the encapsulated data packet includes L2ID, TCID, source address, and destination address. Alternatively, if the destination address is not the address of the next-hop node, both IP address and star address can be encapsulated in the data packet. For example, the encapsulated data packet includes L2ID, TCID, source address, destination address, star address corresponding to the source address, and star address corresponding to the destination address.
[0317] The above scheme can guarantee the QoS requirements of data packets for the transmission path and improve the reliability of communication.
[0318] It should be understood that the various embodiments provided herein can be implemented individually or in combination, and this application does not impose any restrictions.
[0319] The methods provided by the embodiments of this application have been described above with reference to the accompanying drawings. The apparatus provided by the embodiments of this application will be described below with reference to the accompanying drawings.
[0320] Based on the same technical concept, embodiments of this application provide a data transmission apparatus, the apparatus including components for performing... Figure 3 or Figure 9 The module / unit / means of the method shown. This module / unit / means can be implemented in software, or in hardware, or the corresponding software can be implemented by hardware executing the software.
[0321] For example, see Figure 10 The device may include an acquisition unit 1001, a processing unit 1002, and a sending unit 1003.
[0322] When the device is used to perform Figure 3In the method shown, the acquisition unit 1001 is used to acquire a first data packet, which contains data and first information. The first information includes a source network address, a destination network address, a source transport layer port number, and a destination transport layer port number. The first information corresponds to a first communication protocol. The processing unit 1002 is used to determine second information according to a first mapping relationship. The second information corresponds to a second communication protocol. The second information includes a communication protocol source address, a communication protocol destination address, a communication protocol source port number, and a communication protocol destination port number. The first mapping relationship is used to indicate one or more of the following mapping relationships: the mapping relationship between the source network address and the communication protocol source address, the mapping relationship between the destination network address and the communication protocol destination address, the mapping relationship between the source transport layer port number and the communication protocol source port number, and the mapping relationship between the destination transport layer port number and the communication protocol destination port number. The processing unit 1002 is used to generate a second data packet, which includes one or more of the following: data, a communication protocol source address, a communication protocol destination address, a communication protocol source port number, and a communication protocol destination port number. The sending unit 1003 is used to send the second data packet.
[0323] When the device is used to perform Figure 9 In the method shown, the acquisition unit 1001 is used to acquire a data packet, which includes data, source address, destination address, source port number, destination port number, and QoS indication field; the processing unit 1002 is used to determine the Layer 2 address (L2ID) of the next-hop node leading to the destination address and the TCID of the transmission channel between the device and the next-hop node based on the source address, destination address, source port number, destination port number, or one or more of the QoS indication field; wherein the transmission channel meets the QoS requirements corresponding to the QoS indication field; the data packet is encapsulated according to the L2ID and TCID; and the sending unit 1003 is used to send the encapsulated data packet.
[0324] Based on the same technical concept, embodiments of this application provide a data transmission apparatus, the apparatus including components for performing... Figure 4 The module / unit / means of the method shown. This module / unit / means can be implemented in software, or in hardware, or the corresponding software can be implemented by hardware executing the software.
[0325] For example, see Figure 11 The device may include:
[0326] The first protocol layer module 1101 is used to transmit the first data packet to the second protocol layer module. The first data packet contains data and first information. The first information includes the source network address, the destination network address, the source transport layer port number, and the destination transport layer port number. The first information corresponds to the first communication protocol.
[0327] The second protocol layer module 1102 is used to determine second information according to the first mapping relationship. The second information corresponds to a second communication protocol. The second information includes a communication protocol source address, a communication protocol destination address, a communication protocol source port number, and a communication protocol destination port number. The first mapping relationship indicates one or more of the following: a mapping relationship between a source network address and a communication protocol source address, a mapping relationship between a destination network address and a communication protocol destination address, a mapping relationship between a source transport layer port number and a communication protocol source port number, and a mapping relationship between a destination transport layer port number and a communication protocol destination port number; and generates a second data packet, wherein the second data packet includes data, a communication protocol source address, a communication protocol destination address, a communication protocol source port number, and a communication protocol destination port number.
[0328] The third protocol layer module 1103 is used to send the second data packet.
[0329] It should be understood that all relevant content of each step involved in the above method embodiments can be referenced from the functional description of the corresponding functional module, and will not be repeated here.
[0330] See Figure 12 This application embodiment also provides a data transmission device, which includes at least one processor 1201 and an interface circuit 1202; the interface circuit 1202 is used to receive signals from other devices outside the device and send or receive signals to the processor 1201 or send signals from the processor 1201 to other communication devices outside the device, and the processor 1201 is used to implement the method executed by the first device through logic circuits or execution code instructions.
[0331] It should be understood that the processor mentioned in the embodiments of this application can be implemented in hardware or software. When implemented in hardware, the processor can be a logic circuit, integrated circuit, etc. When implemented in software, the processor can be a general-purpose processor, implemented by reading software code stored in memory.
[0332] For example, the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.
[0333] It should be understood that the memory mentioned in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate Synchronous DRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct RAM (DR RAM).
[0334] It should be noted that when the processor is a general-purpose processor, DSP, ASIC, FPGA, or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, the memory (storage module) can be integrated into the processor.
[0335] It should be noted that the memories described herein are intended to include, but are not limited to, these and any other suitable types of memories.
[0336] Based on the same technical concept, embodiments of this application also provide a computer-readable storage medium, including a program or instructions that, when run on a computer, cause the method performed by the first device described above to be executed.
[0337] Based on the same technical concept, this application embodiment also provides a computer program product containing instructions, which stores instructions that, when run on a computer, cause the method executed by the first device to be executed.
[0338] Based on the same technical concept, embodiments of this application also provide a terminal device, which is or includes the first device described above. The terminal device may be a vehicle, drone, helicopter, airplane, ship, intelligent transportation equipment, or smart home device, etc. Embodiments of this application do not limit the specific form of the terminal device.
[0339] In this application, "at least one" means one or more, and "more than one" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. In the textual description of this application, the character " / " generally indicates an "or" relationship between the preceding and following related objects; in the formulas of this application, the character " / " indicates a "division" relationship between the preceding and following related objects. "Including at least one of A, B, and C" can mean: including A; including B; including C; including A and B; including A and C; including B and C; including A, B, and C.
[0340] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0341] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in one or more blocks of the flowchart illustrations and / or one or more blocks of the block diagrams.
[0342] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowcharts and / or one or more block diagrams.
[0343] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide steps for implementing the functions specified in one or more flowcharts and / or one or more block diagrams.
[0344] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the scope of protection of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A data transmission method, characterized in that, include: The first device acquires a first data packet, which contains data and first information. The first information includes a source network address, a destination network address, a source transport layer port number, and a destination transport layer port number. The first information corresponds to a first communication protocol. The first device determines second information based on a first mapping relationship. The second information corresponds to a second communication protocol. The second information includes a communication protocol source address, a communication protocol destination address, a communication protocol source port number, and a communication protocol destination port number. The first mapping relationship indicates the mapping relationship between the source network address and the communication protocol source address, the mapping relationship between the destination network address and the communication protocol destination address, the mapping relationship between the source transport layer port number and the communication protocol source port number, and the mapping relationship between the destination transport layer port number and the communication protocol destination port number. The first device generates a second data packet, wherein the second data packet includes the data, the communication protocol source address, the communication protocol destination address, the communication protocol source port number, and the communication protocol destination port number; The first device sends the second data packet; The first communication protocol is the Internet Protocol, and the second communication protocol is the short-range wireless communication standard protocol specified by the Starlight Alliance. The first data packet further includes a first Quality of Service (QoS) indication field, which includes a Differentiated Service Code Point (DSCP) or Traffic of Class; the first mapping relationship is also used to indicate the mapping relationship between the first QoS indication field and the second QoS indication field; the second QoS indication field includes a Flow label and a Service Type (ToS); the second data packet also includes the second QoS indication field. The first device sends the second data packet, including: The first device determines the Layer 2 address (L2ID) of the next-hop node leading to the communication protocol destination address and the transmission channel identifier (TCID) of the transmission channel between the first device and the next-hop node based on one or more of the communication protocol source address, the communication protocol destination address, the communication protocol source port number, the communication protocol destination port number, or the second QoS indication field; wherein the transmission channel satisfies the QoS requirements corresponding to the second QoS indication field. The first device encapsulates the second data packet according to the L2ID and the TCID to generate a third data packet; the first device sends the third data packet; Wherein, the first device determines the L2ID of the next-hop node leading to the communication protocol destination address and the TCID of the transmission channel between the first device and the next-hop node based on one or more of the communication protocol source address, the communication protocol destination address, the communication protocol source port number, the communication protocol destination port number, or the second QoS indication field, including: The first device determines the L2ID of the next-hop node leading to the communication protocol destination address based on the communication protocol source address and / or the communication protocol destination address; the first device maps the second QoS indication field to a third QoS indication field, establishes a transmission channel with the next-hop node based on the communication protocol destination port number, the third QoS indication field, and the L2ID of the next-hop node, and generates the TCID of the transmission channel.
2. The method as described in claim 1, characterized in that, The first mapping is predefined; or, The first mapping relationship is generated by the first device; or, The first mapping relationship comes from the second device.
3. The method as described in claim 1 or 2, characterized in that, The first device determines the L2ID of the next-hop node leading to the communication protocol destination address and the TCID of the transmission channel between the first device and the next-hop node based on one or more of the communication protocol source address, the communication protocol destination address, the communication protocol source port number, the communication protocol destination port number, or the second QoS indication field, including: The first device determines the L2ID of the next-hop node leading to the destination address of the communication protocol and the TCID of the transmission channel between the first device and the next-hop node according to the second mapping relationship; wherein, the second mapping relationship is used to indicate the mapping relationship between the communication protocol source address, the communication protocol destination address, the communication protocol source port number, the communication protocol destination port number, or one or more of the second QoS indication fields and the L2ID of the next-hop node and the TCID of the transmission channel.
4. The method as described in claim 3, characterized in that, After the first device generates the TCID of the transmission channel, the method further includes: The first device generates the second mapping relationship based on one or more of the communication protocol source address, the communication protocol destination address, the communication protocol source port number, the communication protocol destination port number, or the second QoS indication field, as well as the L2ID of the next hop node and the TCID of the transmission channel.
5. The method according to any one of claims 1-4, characterized in that, The source network address and the destination network address are of type Internet Protocol (IP) addresses. The source transport layer port number and the destination transport layer port number are of type TCP / UDP port number.
6. A data transmission method, characterized in that, Applied to a first device, on which a protocol stack of a second communication protocol is deployed, the method includes: The first device transmits a first data packet from the first protocol layer of the protocol stack to the second protocol layer of the protocol stack. The first data packet contains data and first information. The first information includes a source network address, a destination network address, a source transport layer port number, and a destination transport layer port number. The first information corresponds to a first communication protocol. The first device determines second information based on a first mapping relationship at the second protocol layer of the protocol stack. The second information corresponds to a second communication protocol. The second information includes a communication protocol source address, a communication protocol destination address, a communication protocol source port number, and a communication protocol destination port number. The first mapping relationship indicates the mapping relationship between the source network address and the communication protocol source address, the mapping relationship between the destination network address and the communication protocol destination address, the mapping relationship between the source transport layer port number and the communication protocol source port number, and the mapping relationship between the destination transport layer port number and the communication protocol destination port number. The first device generates a second data packet at the second protocol layer of the protocol stack, wherein the second data packet includes the data, the communication protocol source address, the communication protocol destination address, the communication protocol source port number, and the communication protocol destination port number; The first device sends the second data packet at the third protocol layer of the protocol stack; The first communication protocol is the Internet Protocol, and the second communication protocol is the short-range wireless communication standard protocol specified by the Starlight Alliance. The first data packet further includes a first Quality of Service (QoS) indication field, which includes a Differentiated Service Code Point (DSCP) or Traffic of Class; the first mapping relationship is also used to indicate the mapping relationship between the first QoS indication field and the second QoS indication field; the second QoS indication field includes a Flow label and a Service Type (ToS); the second data packet also includes the second QoS indication field. The method further includes: The first device determines, at the second protocol layer of the protocol stack, the Layer 2 address (L2ID) of the next-hop node leading to the communication protocol destination address and the transmission channel identifier (TCID) of the transmission channel between the first device and the next-hop node, based on the communication protocol source address, the communication protocol destination address, the communication protocol source port number, the communication protocol destination port number, or one or more of the second QoS indication field; wherein the transmission channel satisfies the QoS requirements corresponding to the second QoS indication field. The first device sends the second data packet at the third protocol layer of the protocol stack, including: The first device encapsulates the second data packet according to the L2ID and the TCID at the third protocol layer of the protocol stack to generate a third data packet; the first device sends the third data packet at the third protocol layer of the protocol stack. Wherein, the first device, at the second protocol layer of the protocol stack, determines the L2ID of the next-hop node leading to the communication protocol destination address and the TCID of the transmission channel between the first device and the next-hop node based on one or more of the communication protocol source address, the communication protocol destination address, the communication protocol source port number, the communication protocol destination port number, or the second QoS indication field, including: The first device determines the L2ID of the next-hop node leading to the communication protocol destination address based on the communication protocol source address and / or the communication protocol destination address at the second protocol layer of the protocol stack; the first device maps the second QoS indication field to a third QoS indication field at the third protocol layer of the protocol stack, establishes a transmission channel with the next-hop node based on the communication protocol destination port number, the third QoS indication field, and the L2ID of the next-hop node, and generates the TCID of the transmission channel; the first device passes the TCID from the third protocol layer of the protocol stack to the second protocol layer of the protocol stack.
7. The method as described in claim 6, characterized in that, The first mapping is predefined; or, The first mapping relationship is generated by the first device at the second protocol layer of the protocol stack; or, The first mapping relationship comes from the second device.
8. The method as described in claim 6 or 7, characterized in that, The first device, at the second protocol layer of the protocol stack, determines the L2ID of the next-hop node leading to the communication protocol destination address and the TCID of the transmission channel between the first device and the next-hop node based on one or more of the communication protocol source address, the communication protocol destination address, the communication protocol source port number, the communication protocol destination port number, or the second QoS indication field, including: The first device determines the L2ID of the next-hop node leading to the destination address of the communication protocol and the TCID of the transmission channel between the first device and the next-hop node according to the second protocol layer of the protocol stack based on the second mapping relationship; wherein, the second mapping relationship is used to indicate the mapping relationship between one or more of the communication protocol source address, the communication protocol destination address, the communication protocol source port number, the communication protocol destination port number, or the second QoS indication field and the L2ID of the next-hop node and the TCID of the transmission channel.
9. The method as described in claim 8, characterized in that, After the first device passes the TCID from the third protocol layer of the protocol stack to the second protocol layer of the protocol stack, the method further includes: The first device generates the second mapping relationship at the second protocol layer of the protocol stack based on one or more of the communication protocol source address, the communication protocol destination address, the communication protocol source port number, the communication protocol destination port number, or the second QoS indication field, as well as the L2ID of the next hop node and the TCID of the transmission channel.
10. The method according to any one of claims 6-9, characterized in that, The source network address and the destination network address are of type Internet Protocol (IP) addresses. The source transport layer port number and the destination transport layer port number are of type TCP / UDP port number.
11. A data transmission device, characterized in that, include: The acquisition unit is used to acquire a first data packet, the first data packet containing data and first information, the first information including source network address, destination network address, source transport layer port number, destination transport layer port number, and the first information corresponding to a first communication protocol; The processing unit is configured to determine second information based on a first mapping relationship. The second information corresponds to a second communication protocol. The second information includes a communication protocol source address, a communication protocol destination address, a communication protocol source port number, and a communication protocol destination port number. The first mapping relationship indicates the mapping relationship between the source network address and the communication protocol source address, the mapping relationship between the destination network address and the communication protocol destination address, the mapping relationship between the source transport layer port number and the communication protocol source port number, and the mapping relationship between the destination transport layer port number and the communication protocol destination port number. Generate a second data packet, wherein the second data packet includes the data, the communication protocol source address, the communication protocol destination address, the communication protocol source port number, and the communication protocol destination port number; The sending unit is used to send the second data packet; The first data packet further includes a first Quality of Service (QoS) indication field, which includes a Differentiated Service Code Point (DSCP) or Traffic of Class; the first mapping relationship is also used to indicate the mapping relationship between the first QoS indication field and the second QoS indication field; the second QoS indication field includes a Flow label and a Service Type (ToS); the second data packet also includes the second QoS indication field. The sending unit is configured to: determine, based on one or more of the communication protocol source address, the communication protocol destination address, the communication protocol source port number, the communication protocol destination port number, or the second QoS indication field, a Layer 2 address (L2ID) leading to the next-hop node of the communication protocol destination address and a transmission channel identifier (TCID) of the transmission channel between the first device and the next-hop node; wherein the transmission channel satisfies the QoS requirements corresponding to the second QoS indication field; encapsulate the second data packet according to the L2ID and the TCID to generate a third data packet; and send the third data packet by the first device. The sending unit is configured to: determine the L2ID of the next-hop node leading to the communication protocol destination address based on the communication protocol source address and / or the communication protocol destination address; map the second QoS indication field to a third QoS indication field; establish a transmission channel with the next-hop node based on the communication protocol destination port number, the third QoS indication field, and the L2ID of the next-hop node; and generate the TCID of the transmission channel.
12. A data transmission device, characterized in that, include: The first protocol layer module is used to transmit the first data packet to the second protocol layer module. The first data packet contains data and first information. The first information includes the source network address, the destination network address, the source transport layer port number, and the destination transport layer port number. The first information corresponds to the first communication protocol. The second protocol layer module is used to determine second information based on a first mapping relationship. The second information corresponds to a second communication protocol. The second information includes a communication protocol source address, a communication protocol destination address, a communication protocol source port number, and a communication protocol destination port number. The first mapping relationship indicates the mapping relationship between the source network address and the communication protocol source address, the mapping relationship between the destination network address and the communication protocol destination address, the mapping relationship between the source transport layer port number and the communication protocol source port number, and the mapping relationship between the destination transport layer port number and the communication protocol destination port number. Generate a second data packet, wherein the second data packet includes the data, the communication protocol source address, the communication protocol destination address, the communication protocol source port number, and the communication protocol destination port number; The third protocol layer module is used to send the second data packet; The first data packet further includes a first Quality of Service (QoS) indication field, which includes a Differentiated Service Code Point (DSCP) or Traffic of Class; the first mapping relationship is also used to indicate the mapping relationship between the first QoS indication field and the second QoS indication field; the second QoS indication field includes a Flow label and a Service Type (ToS); the second data packet also includes the second QoS indication field. The second protocol layer module is further configured to determine, based on one or more of the communication protocol source address, the communication protocol destination address, the communication protocol source port number, the communication protocol destination port number, or the second QoS indication field, a Layer 2 address (L2ID) leading to the next-hop node of the communication protocol destination address and a transmission channel identifier (TCID) of the transmission channel between the first device and the next-hop node; wherein the transmission channel satisfies the QoS requirements corresponding to the second QoS indication field. The third protocol layer module is used to encapsulate the second data packet according to the L2ID and the TCID to generate a third data packet; the first device sends the third data packet at the third protocol layer of the protocol stack. The second protocol layer module is configured to: determine the L2ID of the next-hop node leading to the communication protocol destination address based on the communication protocol source address and / or the communication protocol destination address; the third protocol layer module is configured to: map the second QoS indication field to a third QoS indication field, establish a transmission channel with the next-hop node based on the communication protocol destination port number, the third QoS indication field, and the L2ID of the next-hop node, generate the TCID of the transmission channel, and transmit the TCID to the second protocol layer module.
13. A data transmission device, characterized in that, include: At least one processor and interface circuitry; The interface circuit is used to receive signals from other devices outside the device and send or receive signals to the processor or send signals from the processor to other devices outside the device. The processor is used to implement the method as described in any one of claims 1-5, or to implement the method as described in any one of claims 6-10, through logic circuits or execution code instructions.
14. A computer-readable storage medium, characterized in that, The storage medium stores a computer program or instructions that, when executed by a communication device, implement the method as described in any one of claims 1-5, or are used to implement the method as described in any one of claims 6-10.
15. A computer program product, characterized in that, The computer program product stores instructions that, when run on a computer, cause the computer to perform the method as described in any one of claims 1-5, or to perform the method as described in any one of claims 6-10.
Citation Information
Patent Citations
Communication method and terminal equipment
CN113259970A
Data packet transmission method based on network service quality and related equipment
CN113630902A
Device and method for realizing convertion between two different protocols
CN1980223A