Data transmission method and device

CN119586116AActive Publication Date: 2025-03-07HUAWEI TECH CO LTD

Patent Information

Application Number
CN202280097772.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2022-07-04
Publication Date
2025-03-07
Estimated Expiration
2042-07-04

AI Technical Summary

Technical Problem

In scenarios such as smart cars, smart transportation, smart terminals, smart homes, and smart manufacturing, end-to-end data transmission cannot be achieved due to different communication protocols between internal network devices and external network devices. In particular, the internal network devices do not support IP. Address, IP data packets sent by external network devices cannot be forwarded.

Method used

By obtaining the source and destination network addresses and transport layer port numbers in the data message, and converting them into corresponding communication protocol addresses and port numbers according to predefined or dynamically generated mapping relationships, a message suitable for the second communication protocol is generated. data packets to achieve cross-protocol data transmission.

Benefits of technology

It realizes end-to-end communication between internal network equipment and external network equipment, improves the reliability and efficiency of data transmission, ensures QoS parameter conversion between different protocols, and meets the service quality requirements of different equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119586116A_ABST
    Figure CN119586116A_ABST
Patent Text Reader

Abstract

The invention discloses a data transmission method and device. A first device acquires a first data message, the first data message comprising data and first information, the first information comprising a source network address, a destination network address, a source transport layer port number, and a destination transport layer port number, and the first information corresponding to a first communication protocol (S301); determining second information according to the first mapping relationship, the second information corresponding to a second communication protocol (S302); the first device generates a second data message, wherein the second data message comprises data, a communication protocol source address, a communication protocol destination address, a communication protocol source port number, and a communication protocol destination port number (S303); and sending the second data message (S304). According to the method, addressing forwarding can be performed on the second data message based on the address information corresponding to the second communication protocol, so that data carried in the second data message can be transmitted to the equipment corresponding to the destination network address, and end-to-end communication between the equipment corresponding to the source network address and the equipment corresponding to the destination network address can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Data transmission method and device Technical Field

[0001] The present application relates to the field of short-distance communication technology, and in particular to a data transmission method and device. Background Art

[0002] Currently, short-range wireless communication technology is widely used in scenarios such as smart cars, smart transportation, smart terminals, smart homes, and smart manufacturing. In these scenarios, devices can be networked based on the communication protocol adopted by short-range wireless communication technology (referred to as the short-range wireless communication protocol, such as the short-range wireless communication standard protocol specified by the Star Flash Alliance), forming an intranet (or private network). Devices within the intranet (referred to as intranet devices) can communicate with each other based on the addresses corresponding to the short-range wireless communication protocol (referred to as the short-range wireless communication protocol address).

[0003] When intranet devices transmit data packets to external devices, there may be a scenario where the external device uses a network address, such as an Internet Protocol (IP) address, to transmit data packets, but some intranet devices do not support this. In this scenario, there is a problem of being unable to support end-to-end communication between the external and internal devices.

[0004] Summary of the Invention

[0005] The present application provides a data transmission method and apparatus for implementing end-to-end communication between devices.

[0006] In a first aspect, a data transmission method is provided, including: a first device obtains 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, and a destination transport layer port number, and the first information corresponds to a first communication protocol; the first device determines 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, wherein the first mapping relationship is used to indicate: one or more of 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 one or more of 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.

[0007] 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, the communication protocol destination address, the communication protocol source port number, and the 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, 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, which can improve the reliability of data transmission.

[0008] In one possible design, the first mapping relationship is predefined. For example, a technician configures the first mapping relationship on the first device in advance.

[0009] 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 a network where the first device resides and is responsible for assigning address information corresponding to the second communication protocol to each node in the network, the first mapping relationship may be generated and stored after the address information corresponding to the second communication protocol is assigned to the first device.

[0010] In one possible design, the first mapping relationship comes from the second device, for example, sent by the second device to the first device. For example, the second device is a master node or management node in the network where the first device resides, responsible for assigning address information corresponding to the second communication protocol to each node in the network. In this case, the second device may generate the first mapping relationship and send it to the first device after assigning the address information corresponding to the second communication protocol to the first device.

[0011] Through any of the above three designs, the first device can obtain the first mapping relationship, provide support for conversion between the first information and the second information, and further improve the reliability of data transmission.

[0012] In one possible design, the first data packet also includes a first quality of service (QoS) indication field, the first QoS indication field includes a differentiated services code point (DSCP) or a traffic type (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 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 carried in the first data packet (i.e., the first QoS indication field) into QoS parameters corresponding to the second communication protocol (i.e., the second QoS indication field) based on the first mapping relationship, and carry it in the second data packet.

[0013] Through the above design, the conversion of QoS parameters between different protocols can be realized, which provides guarantee for QoS of data during transmission and can further improve the reliability of data transmission.

[0014] In one possible design, the first device can determine the layer 2 address (Layer 2 Identifier, L2ID) of the next hop node leading to the communication protocol destination address and the transport channel identifier (Transport 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 meets 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.

[0015] Through the above design method, the second data packet can be forwarded from the first device to the next hop node, and during forwarding, the second data packet can be carried on a transmission channel that can meet the QoS requirements of the second data packet to ensure the QoS of data transmission, which can further improve the reliability of communication.

[0016] 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 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 and the L2ID of the next hop node and the TCID of the transmission channel.

[0017] Through the above design method, 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 channel based on the information carried in the second data packet and the second mapping relationship, thereby improving transmission efficiency.

[0018] 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 the 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 a TCID for the transmission channel.

[0019] Through the above design method, when there is no transmission channel that meets the QoS requirements of the second data message, the first device can establish a transmission channel that meets the QoS requirements of the second data message, thereby realizing the carrying of the second data message, which can further improve the reliability of data transmission.

[0020] 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 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, as well as the L2ID of the next hop node and the TCID of the transmission channel.

[0021] Through the above design method, when the first device subsequently transmits a data packet 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.

[0022] In one possible design, the second communication protocol is a short-range wireless communication standard protocol specified by the Star Flash Alliance.

[0023] Through the above design, end-to-end communication can be achieved between devices in the Xingshan network and devices outside the Xingshan network.

[0024] In one possible design, the first communication protocol is the IP protocol. Accordingly, the source network address and the destination network address are of IP address type; and the source transport layer port number and the destination transport layer port number are of TCP / UDP port number type.

[0025] Through the above design, end-to-end transmission of IP data packets can be achieved.

[0026] In a second aspect, a data transmission method is provided, which is applied to a first device, and a protocol stack of a second communication protocol is deployed on the first device. The method includes: the first device transmits a first data message from the first protocol layer of the protocol stack to the second protocol layer of the protocol stack, the first data message 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, and the first information corresponds to the first communication protocol; the first device determines the second information according to the first mapping relationship at the second protocol layer of the protocol stack, and the second information corresponds to the second communication protocol, and the second information includes a source address of the communication protocol, a destination address of the communication protocol, a source port number of the communication protocol, and a destination transport layer port number of the communication protocol. protocol destination port number, wherein the first mapping relationship is used to indicate: one or more of 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 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.

[0027] Taking the short-range wireless communication standard protocol specified by the Star Flash Alliance as an example, the first protocol layer can be the application layer in the protocol stack of the short-range wireless communication standard protocol specified by the Star Flash Alliance, the second protocol layer can be the network layer in the protocol stack of the short-range wireless communication standard protocol specified by the Star Flash Alliance, and the third protocol layer can be the basic service layer in the protocol stack of the short-range wireless communication standard protocol specified by the Star Flash Alliance. In addition, the protocol stack of the short-range wireless communication standard protocol specified by the Star Flash Alliance can also include an access layer, and the first data message can actually be processed by the access layer and sent out through the access layer.

[0028] Through the above scheme, the conversion of the parameters of the first communication protocol and the parameters of the second communication protocol can be realized in the protocol stack of the second communication protocol (for example, the Star Flash protocol stack), and then the data packets of the first communication protocol can be carried in the network corresponding to the second communication protocol, and the end-to-end transmission of the data packets of the first communication protocol can be realized, which can improve the reliability of data transmission.

[0029] In a possible design, the first mapping relationship is predefined.

[0030] In one possible design, the first mapping relationship is generated by the first device at the second protocol layer of the protocol stack.

[0031] In one possible design, the first mapping relationship comes from the second device, for example, is sent by the second device to the first device.

[0032] In one possible design, the first data packet also includes a first quality of service QoS indication field, and the first QoS indication field 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.

[0033] 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, 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 meets the QoS requirements corresponding to the second QoS indication field. Furthermore, at the third protocol layer of the protocol stack, the first device can encapsulate the second data packet based on the L2ID and TCID to generate a third data packet; and the first device can send the third data packet at the third protocol layer of the protocol stack.

[0034] 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 at the second protocol layer of the protocol stack; 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 field and the L2ID of the next hop node and the TCID of the transmission channel.

[0035] 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 the communication protocol destination address at the second protocol layer of the protocol stack; 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 a 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.

[0036] 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 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, as well as the L2ID of the next hop node and the TCID of the transmission channel.

[0037] In one possible design, the second communication protocol is a short-range wireless communication standard protocol specified by the Star Flash Alliance.

[0038] In one possible design, the source network address and the destination network address are of the Internet Protocol (IP) address type; the source transport layer port number and the destination transport layer port number are of the Transmission Control Protocol (TCP) / User Datagram Protocol (UDP) port number type.

[0039] The beneficial effects corresponding to the various designs of the second aspect mentioned above can refer to the beneficial effects of the corresponding designs of the first aspect, and will not be repeated here.

[0040] According to a third aspect, a data transmission method is provided, including: a first device obtains a data packet, the data packet includes one or more of data, source address, destination address, source port number, destination port number, and QoS indication fields; the first device determines the layer 2 address 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 source address, destination address, source port number, destination port number, or one or more of the QoS indication fields; wherein the transmission channel meets the QoS requirements corresponding to the QoS indication field; the first device encapsulates the data packet according to the L2ID and TCID, and sends the encapsulated data packet.

[0041] Through the above scheme, the data message can be forwarded from the first device to the next hop node, and during forwarding, the data message is carried on a transmission channel that can meet the QoS requirements of the data message to ensure the QoS of data transmission and improve the reliability of communication.

[0042] It can be understood that this application does not limit the communication protocols corresponding to the source address, destination address, source port number, destination port number, and QoS indication field.

[0043] In one possible design, the communication protocol corresponding to the source address, destination address, source port number, destination port number, and QoS indication field corresponds to the IP protocol. For example, the type of the source address and destination address is an IP address, the type of the source port number and destination port number is a TCP / UDP port number, and the QoS parameter is DSCP or Traffic of Class.

[0044] In one possible design, the communication protocol corresponding to the source address, destination address, source port number, destination port number, and QoS indication field corresponds to the short-range wireless communication standard protocol specified by the Star Flash Alliance. For example, the type of the source address and destination address is the short-range wireless communication standard protocol address specified by the Star Flash Alliance, the type of the source port number and destination port number is the short-range wireless communication standard protocol port number specified by the Star Flash Alliance, and the QoS parameter is the ToS in the short-range wireless communication standard protocol specified by the Star Flash Alliance.

[0045] Of course, the above two protocols are only examples. In practice, there may be other communication protocols, which are not limited in this application.

[0046] 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 the source address, destination address, source port number, destination port number, or one or more of the QoS indication fields and the L2ID of the next hop node and the TCID of the transmission channel.

[0047] Through the above design method, 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 channel based on the information carried in the data packet and the second mapping relationship, thereby improving transmission efficiency.

[0048] 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 L2ID of the next hop node, and generates a TCID for the transmission channel.

[0049] Through the above design method, when there is no transmission channel that meets the QoS requirements of the data message, the first device can establish a transmission channel that meets the QoS requirements of the data message, thereby realizing the carrying of the data message, which can further improve the reliability of data transmission.

[0050] 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 the source address, destination address, source port number, destination port number, or one or more of the QoS indication fields, as well as the L2ID of the next hop node and the TCID of the transmission channel.

[0051] Through the above design method, when the first device subsequently transmits data packets with the same QoS requirements, destination address, and / or destination port number, etc., 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.

[0052] In one possible design, the source address and the destination address are of IP address type.

[0053] When the destination address is the address of the next-hop node (i.e., the transmission route is a single-hop route), the encapsulated data message includes the L2ID, TCID, source address, and destination address. This means that the source address and the destination address corresponding to the Starflash Alliance's short-range wireless communication standard protocol address do not need to be encapsulated in the data message. This saves header overhead.

[0054] When the destination address is not the address of the next-hop node (i.e., the transmission route is multi-hop), the encapsulated data message includes the L2ID, TCID, source address, destination address, the short-range wireless communication standard protocol address specified by the Star Flash Alliance corresponding to the source address, and the short-range wireless communication standard protocol address specified by the Star Flash Alliance corresponding to the destination address. This ensures transmission reliability.

[0055] In a fourth aspect, a data transmission device is provided, which is a first device or a chip in the first device, and the device includes modules / units / technical means for executing the method described in the above-mentioned first aspect or any possible design of the first aspect.

[0056] Exemplarily, the device may include:

[0057] an acquiring unit, configured to acquire a first data message, the first data message including 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;

[0058] A processing unit is used to determine second information based on the first mapping relationship, where the second information corresponds to a second communication protocol, and 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, wherein the first mapping relationship is used to indicate: 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 generate a second data message, wherein the second data message 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;

[0059] A sending unit is configured to send a second data message.

[0060] In a possible design, the first mapping relationship is predefined.

[0061] In one possible design, the first mapping relationship is generated by the device.

[0062] In one possible design, the first mapping relationship comes from the second device, for example, is sent by the second device to the apparatus.

[0063] 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 a flow identifier Flow label and a service type ToS; the second data packet also includes a second QoS indication field.

[0064] In one possible design, the processing unit 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 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 meets the QoS requirements corresponding to the second QoS indication field; then encapsulate the second data packet according to the L2ID and TCID to generate a third data packet; and the sending unit is used to send the third data packet.

[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 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 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 and the L2ID of the next hop node and the TCID of the transmission channel.

[0066] 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 the 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 a TCID of the transmission channel.

[0067] In one possible design, the processing unit is also used to: after generating the TCID of the transmission channel, generate a second mapping relationship 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, as well as the L2ID of the next hop node and the TCID of the transmission channel.

[0068] In one possible design, the second communication protocol is a short-range wireless communication standard protocol specified by the Star Flash Alliance.

[0069] In one possible design, the source network address and the destination network address are of the Internet Protocol IP address type; the source transport layer port number and the destination transport layer port number are of the TCP / UDP port number type.

[0070] In a fifth aspect, a data transmission device is provided, which is a first device or a chip in the first device, and the device includes modules / units / technical means for executing the method described in the above second aspect or any possible design of the second aspect.

[0071] Exemplarily, the device may include:

[0072] A first protocol layer module is used to transmit a first data message to a second protocol layer module, where the first data message includes data and first information, where 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, and the first information corresponds to a first communication protocol;

[0073] A 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, and 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, wherein the first mapping relationship is used to indicate: one or more of 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; generate a second data message, wherein the second data message 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;

[0074] The third protocol layer module is used to send a second data message.

[0075] In a possible design, the first mapping relationship is predefined.

[0076] In one possible design, the first mapping relationship is generated by the second protocol layer module.

[0077] In one possible design, the first mapping relationship comes from the second device, for example, is sent by the second device to the apparatus.

[0078] In one possible design, the first data packet also includes a first quality of service QoS indication field, and the first QoS indication field 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.

[0079] 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 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 meets 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; and the third protocol layer module is used to send the third data packet.

[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 and the TCID of the transmission channel between the 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 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 and the L2ID of the next hop node and the TCID of the transmission channel.

[0081] 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 the 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 a TCID of the transmission channel; the third protocol layer module is used to pass the TCID to the second protocol layer module.

[0082] In one possible design, the second protocol layer module is also used to generate a second mapping relationship 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, as well as the L2ID of the next hop node and the TCID of the transmission channel.

[0083] In one possible design, the second communication protocol is a short-range wireless communication standard protocol specified by the Star Flash Alliance.

[0084] In one possible design, the source network address and the destination network address are of the Internet Protocol (IP) address type; the source transport layer port number and the destination transport layer port number are of the Transmission Control Protocol (TCP) / User Datagram Protocol (UDP) port number type.

[0085] In the sixth aspect, a data transmission device is provided, which is a first device or a chip in the first device, and the device includes a module / unit / technical means for executing the method described in the third aspect or any possible design of the third aspect.

[0086] Exemplarily, the device may include:

[0087] An acquiring unit, configured to acquire a data message, wherein the data message includes one or more of data, source address, destination address, source port number, destination port number, and QoS indication field;

[0088] a processing unit, configured to determine, based on one or more of a source address, a destination address, a source port number, a destination port number, or a QoS indication field, a layer 2 address L2ID of a next hop node leading to the destination address and a TCID of a transmission channel between the apparatus and the next hop node; wherein the transmission channel satisfies a QoS requirement corresponding to the QoS indication field; and encapsulate a data packet based on the L2ID and the TCID;

[0089] The sending unit is used to send the encapsulated data message.

[0090] In one possible design, the processing unit is used 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 field and the L2ID of the next hop node and the TCID of the transmission channel.

[0091] 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 L2ID of the next hop node, and generate a TCID of the transmission channel.

[0092] In one possible design, the processing unit is also used to: after generating the TCID of the transmission channel, generate a second mapping relationship based on the source address, destination address, source port number, destination port number, or one or more of the QoS indication fields, as well as the L2ID of the next hop node and the TCID of the transmission channel.

[0093] In a possible design, the source address and the destination address are IP addresses, the source port number and the destination port number are TCP / UDP port numbers, and the QoS parameter is DSCP or Traffic of Class.

[0094] In one possible design, the source address and destination address are of the short-range wireless communication standard protocol address specified by the Star Flash Alliance, the source port number and destination port number are of the short-range wireless communication standard protocol port number specified by the Star Flash Alliance, and the QoS parameter is ToS in the short-range wireless communication standard protocol specified by the Star Flash Alliance.

[0095] In one possible design, the source address and the destination address are of IP address type.

[0096] The destination address is the address of the next hop node, and the encapsulated data message includes L2ID, TCID, source address, and destination address; or,

[0097] The destination address is not the address of the next hop node; the encapsulated data message includes L2ID, TCID, source address, destination address, the short-range wireless communication standard protocol address of the Star Flash Alliance specification corresponding to the source address, and the short-range wireless communication standard protocol address of the Star Flash Alliance specification corresponding to the destination address.

[0098] In the seventh aspect, a data transmission device is provided, comprising: at least one processor and an interface circuit; 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, and the processor is used to implement the method as described in the first aspect or any one of the designs of the first aspect through logic circuits or execution code instructions, or to implement the method as described in the second aspect or any one of the designs of the second aspect, or to implement the method as described in the third aspect or any one of the designs of the third aspect.

[0099] In an eighth aspect, a computer-readable storage medium is provided, in which a computer program or instruction is stored. When the computer program or instruction is executed by a communication device, the method as described in the first aspect or any one of the designs of the first aspect is implemented, or the method as described in the second aspect or any one of the designs of the second aspect is implemented, or the method as described in the third aspect or any one of the designs of the third aspect is implemented.

[0100] In the ninth aspect, a computer program product is provided, in which instructions are stored. When the computer program product is run on a computer, the computer executes the method described in the first aspect or any one of the designs of the first aspect, or executes the method described in the second aspect or any one of the designs of the second aspect, or executes the method described in the third aspect or any one of the designs of the third aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0101] Figures 1A to 1C are schematic diagrams of application scenarios provided by embodiments of the present application;

[0102] 2A and 2B are network architecture diagrams of a communication system provided in an embodiment of the present application;

[0103] FIG3 is a flow chart of a data transmission method provided in an embodiment of the present application;

[0104] FIG4 is a flowchart of another data transmission method provided in an embodiment of the present application;

[0105] FIG5 is a schematic diagram of a protocol stack of the Star Flash protocol provided in an embodiment of the present application;

[0106] FIG6 is a schematic diagram showing the relationship between relevant functional units in the Star Flash protocol stack;

[0107] 7A is a schematic diagram of an intranet device receiving an IP datagram sent by an extranet device in a single-hop scenario;

[0108] 7B is a schematic diagram of an intranet device sending an IP datagram to an extranet device in a single-hop scenario;

[0109] FIG8A is a schematic diagram of an intranet device receiving an IP data packet sent by an extranet device in a multi-hop scenario;

[0110] FIG8B is a schematic diagram of an intranet device sending an IP datagram to an extranet device in a multi-hop scenario;

[0111] FIG9 is a flowchart of another data transmission method provided in an embodiment of the present application;

[0112] FIG10 is a schematic structural diagram of a data transmission device provided in an embodiment of the present application;

[0113] FIG11 is a schematic structural diagram of another data transmission device provided in an embodiment of the present application;

[0114] FIG12 is a schematic structural diagram of another data transmission device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0115] See Figure 1A, which is a schematic diagram of a scenario provided by an embodiment of the present application. In the smart home application scenario, home appliances include mobile phones, personal computers (PCs), large screens (such as TVs), printers, air conditioners, smart curtains, smart door locks, smart lights, sub-routers, water heaters, etc.

[0116] Home devices can be networked based on short-range wireless communication technology, which is referred to as an intranet or private network in this application. Each home device in the intranet can be assigned a short-range wireless communication protocol address and communicate with each other in the intranet based on the short-range wireless communication protocol address.

[0117] Home devices communicate with the external network through a gateway. A gateway, for example, is a home gateway (HG) or customer premises equipment (CPE) with gateway functionality. Data packets sent by external network devices must be forwarded to home devices via the gateway, and data packets sent by home devices must also be forwarded to the external network via the gateway.

[0118] Generally, external network devices can transmit data packets based on IP addresses. Because different IP applications have different Quality of Service (QoS) requirements, the intranet is required to establish single-hop routing (such as Route 1 in Figure 1A) or multi-hop routing (such as Route 2 in Figure 1A) based on the QoS requirements of different IP applications.

[0119] However, in smart home application scenarios, some devices do not support IP addresses, such as refrigerators, smart curtains, smart lights, smart door locks, air conditioners, water heaters, etc., and cannot forward IP data packets based on IP addresses, resulting in the inability to support end-to-end communication between external network devices and internal network devices.

[0120] For example, in the scenario shown in Figure 1A, the refrigerator in router 2 does not support IP addresses, while the printer and sub-router 1 support IP addresses. When the printer needs to send an IP datagram to an external network device (such as a mobile phone / PC) or the external network device (such as a mobile phone / PC) needs to send an IP datagram to the printer, the IP datagram should be forwarded via the refrigerator. However, since the refrigerator does not support IP addresses, the IP datagram cannot be forwarded, resulting in the failure of end-to-end communication between the printer and the mobile phone / PC in the external network.

[0121] Refer to Figure 1B, which is another scenario schematic diagram provided for an embodiment of the present application. In the smart meter wireless meter reading scenario, multiple meters can form an intranet, and the business server is in the extranet. When the business server collects meter data, it needs to exchange data packets with the meters in the intranet. If the extranet device and the intranet device support data packets of different protocols respectively, there is also the problem of not being able to support end-to-end communication between the extranet device and the intranet device.

[0122] Refer to Figure 1C, which is another scenario diagram provided for an embodiment of the present application. In the wireless screen projection application scenario, for example, in-vehicle screen projection, the mobile phone needs to transmit data via the vehicle-mounted device and headphones, or for example, in the home theater scenario, the mobile phone needs to transmit data via the large-screen device (such as a TV) and the audio. In these scenarios, if different devices support data packets of different protocols, there is also the problem of not being able to support end-to-end communication.

[0123] It is understandable that the scenarios shown in FIG. 1A to FIG. 1C are merely examples, and there may be other application scenarios.

[0124] In scenarios such as those shown in Figures 1A to 1C above, since different devices (such as intranet devices and extranet devices) support addresses corresponding to different communication protocols, data packets between devices cannot be carried and transmitted, which in turn leads to the problem that end-to-end communication between devices cannot be carried out.

[0125] In view of this, an embodiment of the present application provides a data transmission solution for achieving end-to-end communication between devices in a scenario where different devices support addresses corresponding to different communication protocols.

[0126] The embodiments of the present application can be applied to various wireless communication scenarios, especially short-range wireless communication scenarios, such as but not limited to scenarios such as smart cars, smart transportation, smart terminals, smart homes and smart manufacturing. Among them, short-range wireless communication technology can include traditional short-range wireless communication technology, such as Bluetooth technology, Bluetooth Low Energy (BLE) technology, Wireless Fidelity (Wi-Fi) technology, Near Field Communication (NFC) technology, Ultra Wide Band (UWB) technology, general short-range communication technology, etc., and can also include evolving communication technologies or other communication technologies that may appear in the future, such as the short-range wireless communication technology specified by the Spark Alliance (referred to as SparkLink technology), SparkLink technology includes SparkLink Basic (SLB) technology, SparkLink Basic (SLE) technology, etc., which are not limited in this application.

[0127] Exemplarily, referring to FIG2A , a network architecture diagram of a communication system provided in an embodiment of the present application, in which device A and device B perform end-to-end communication, wherein device A is located in the extranet, device B is located in the intranet, a gateway connects the intranet and the extranet, the devices in the extranet support the first communication protocol, all devices of the intranet terminal support the second communication protocol, and 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 referred to as end-to-end communication based on the first communication protocol (such as IP end-to-end communication). In the network architecture shown in FIG2A , there is no intermediate node between the gateway and device B, that is, single-hop routing. Of course, there can be other nodes between device A and the gateway, and this application does not limit this.

[0128] For example, see Figure 2B, which is a network architecture diagram of another communication system provided in an embodiment of the present application. In this system, device A and device B perform end-to-end communication, wherein device A is located in the extranet, device B is located in the intranet, a gateway connects the intranet and the extranet, the devices in the extranet support the first communication protocol, all devices of the intranet terminal support the second communication protocol, and some devices (such as device B) support the first communication protocol. Unlike Figure 2A, in the scenario shown in Figure 2B, the gateway and device B cannot communicate directly, and they need to pass through other nodes, which is multi-hop routing. Intermediate node 1 and / or intermediate node 2 support the second communication protocol and may not support the first communication protocol.

[0129] It can be 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.

[0130] Referring to FIG3 , a data transmission method provided in an embodiment of the present application includes:

[0131] S301. The first device obtains 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.

[0132] The first device can be the source device of the first data message (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) of the first data message. In other words, the first device needs to send or forward the first data message. Taking the scenario shown in Figure 2A or Figure 2B as an example, when the first data message is a message sent by device A to device B, the first device can be a gateway; when the first data message is a message sent by device B to device A, the first device can be device B.

[0133] When the first device is a source device, the first device may obtain the first data packet by generating the first data packet; when the first device is an intermediate device, the first device may obtain the first data packet by receiving the first data packet from the source device or the intermediate device.

[0134] In general, in addition to data, a data message will carry address information used for routing addressing, such as the source address, destination address, source port number, destination port number, etc. This address information is generally carried in the header of the data message. In different communication protocols, the expression of address information can be different. For example, the source network address, destination network address, source transport layer port number, and destination transport layer port number in the embodiments of the present application are the corresponding expressions of the source address, destination address, source port number, and destination port number in the first communication protocol, respectively.

[0135] Exemplarily, when the first communication protocol is the IP protocol, the source network address, the destination network address, the source transport layer port number, and the destination transport layer port number can be the source IP address, the destination IP address, the source Transmission Control Protocol (TCP) / User Datagram Protocol (UDP) port number, and the destination TCP / UDP port number, respectively.

[0136] It is understandable that the IP protocol here is only an example. In actual applications, the first communication protocol can also be other protocols, and this application does not limit it.

[0137] S302. The first device determines 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.

[0138] It can be understood that the source network address, the destination network address, the source transport layer port number, and the destination transport layer port number are 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: the second communication protocol is a short-range wireless communication protocol, specifically the Star Protocol, then the communication protocol source address, the communication protocol destination address, the communication protocol source port number, and the communication protocol destination port number are the Star Flash source address, the Star Flash destination address, the Star Flash source port number, and the Star Flash destination port number, respectively. It can be understood that for the convenience of explanation, this application mainly uses the Star Flash Protocol as an example. The actual second communication protocol can also be other protocols, and this application does not limit it.

[0139] For ease of description, in the following text, the first communication protocol is mainly based on the IP protocol, and the second communication protocol is mainly based on the Star Flash protocol. In addition, for ease of description, in the embodiment of the present application, the address corresponding to the IP protocol can be referred to as the IP address, the port corresponding to the IP protocol can be referred to as the IP port, the address corresponding to the Star Flash protocol can be referred to as the Star Flash address or the Star Flash domain address (which can be represented by SLNA), and the port corresponding to the Star Flash protocol can be referred to as the Star Flash port or the Star Flash domain port.

[0140] 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 each item of information in the first information and each item of information in the second information.

[0141] In an embodiment of the present application, the mapping relationship between each item of information in the first information and the second information is specifically indicated by a first mapping relationship. For example, the first mapping relationship includes but is not limited to: a mapping relationship between a source network address and a source address of a communication protocol, a mapping relationship between a destination network address and a destination address of a communication protocol, a mapping relationship between a source transport layer port number and a source port number of a communication protocol, and a mapping relationship between a destination transport layer port number and a destination port number of a communication protocol. One or more of these.

[0142] In the embodiment of the present application, the first mapping relationship can be implemented in multiple ways. For example, Table 1 is a possible example of the first mapping relationship.

[0143] Table 1

[0144]

[0145] In specific implementation, a table can store multiple sets of mapping relationships, 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 the mapping relationships, as shown in Table 2.

[0146] Table 2

[0147]

[0148] Accordingly, the first device can determine the first mapping relationship by looking up the table (such as Table 1 or Table 2). For example, if the first data packet carries IP SA1, IP DA1, IP S-port1, and IP D-port2, the first device can determine the SLNA SA1, SLNA DA1, SLNA S-port1, and SLNA D-port2 corresponding to IP SA1, IP DA1, IP S-port1, and IP D-port2 by looking up the table.

[0149] It is understandable that the above Tables 1 and 2 are used to search for Star Flash parameters based on IP parameters or search for IP parameters based on Star Flash parameters, so Tables 1 and 2 can be called parameter mapping tables or address translation tables, etc. Of course, this is just an example and can be called other names.

[0150] S303. The first device generates a second data message, where the second data message 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 message 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.

[0151] Exemplarily, 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 message to obtain the second data message.

[0152] It should be noted that when the destination device (i.e., the device corresponding to the destination network address) supports the second communication protocol, the communication protocol destination address is the communication protocol address of the destination device. When the destination 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 (e.g., a gateway) that supports the second communication protocol and leads to the destination device.

[0153] Similarly, when the source device (i.e., the device corresponding to the source network address) supports the second communication protocol, the communication protocol source address can be the communication protocol address of the source device. When the source device (i.e., the device corresponding to the source network address) does not support the second communication protocol, the communication protocol source address can be the communication protocol address of a node (such as a gateway) that supports the second communication protocol and leads to the destination device.

[0154] Taking the scenario shown in Figure 2B as an example, and taking the second communication protocol as the SparkLink protocol and the first communication protocol as the IP protocol: The internal network is a network composed of the SparkLink protocol, so it can be called a SparkLink domain. The management node (M node) in the SparkLink domain can allocate SLNA and / or service addresses (including IP addresses) to the nodes in the SparkLink domain. An address mapping entry <L2ID, SLNA / service address> will be maintained on the M node; The address resolution node (Address Resolver) (referred to as the A node) in the SparkLink domain can synchronize the address mapping entry from the M node, or register the allocated SLNA or / and service address with the A node through the node address registration mechanism; The A node is responsible for the conversion function between non-SparkLink addresses and SparkLink addresses, and this virtual function can be implemented on the edge router or gateway device of the SparkLink network.

[0155] When device B in the SparkLink domain sends an IP data packet (the first data packet) to external network device A, the destination network address is the public IP address of the external network, and the source network address is the public / private IP address of device B; Device B can query the SparkLink address corresponding to the public / private IP address of device A with the destination address as device A from node A. Node B can encapsulate <CPE-SLNA, B-SLNA, A-IP, B-IP>; After receiving the SparkLink data packet (the second data packet) carrying <CPE-SLNA, B-SLNA, A-ip, B-IP>, the gateway hits CPE-SLNA and resolves the IP header address; If B-IP is a private IP, then convert B-IP to the public IP of the CPE for forwarding; If B-IP is a public IP, then forward directly.

[0156] On the contrary, when external network device A sends an IP data packet (the first data packet) to internal network device B, the IP destination address is the public IP address of device B in the SparkLink domain, and the source IP address is the public IP address of external network device A; After receiving this IP data packet (the first data packet), the gateway (the first device) checks that the destination network address is the IP address of device B in the SparkLink domain, then finds the SparkLink address B-SLNA of device B through address conversion, encapsulates the destination SLNA address as B-SLNA, encapsulates the source SLNA address as CPE-SLNA, and the encapsulated packet format is <B-SLNA, CPE-SLNA, B-IP, A-IP>.

[0157] A similar method can be used for port number conversion, which will not be described here.

[0158] It is understandable that for the sake of convenience, this document refers to a datagram encapsulating Star Flash protocol-related information (such as Star Flash source address, Star Flash destination address, Star Flash source port number, Star Flash destination port number, and / or Star Flash QoS parameters) as a Star Flash datagram. In practice, it can also have other names. For example, when a datagram carries both an IP address and a Star Flash address, the datagram can also be considered an IP datagram.

[0159] S304: The first device sends a second data message.

[0160] Since the address information carried in the second data message (such as the communication protocol source address, the communication protocol destination address, the communication protocol source port number, the communication protocol destination port number, etc.) is the address information corresponding to the second communication protocol, after the first device sends the second data message, the device that receives the second data message can address and forward the second data message based on the address information corresponding to the second communication protocol, so as to transmit the data carried in the second data message 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.

[0161] Taking the scenario shown in Figure 2B as an example, the first device is a gateway, the destination network address is the network address of device B, intermediate node 1 and intermediate node 2 support the Star Flash protocol but do not support the IP protocol, device B supports the IP protocol and the Star Flash protocol, and the first data packet is an IP data packet from device A (carrying source IP address, destination IP address, source TCP / UDP port number, destination TCP / UDP port number). After the gateway receives the IP data packet, it can convert it into a Star Flash data packet (i.e., a data packet carrying the Star Flash source address, Star Flash destination address, Star Flash source port number, and Star Flash destination port number) according to the first mapping relationship. After intermediate node 1 and intermediate node 2 receive the Star Flash data packet, they can forward the Star Flash data packet according to the address information carried in the Star Flash data packet (i.e., Star Flash source address, Star Flash destination address, Star Flash source port number, and Star Flash destination port number), and finally the Star Flash data packet can be forwarded to device B, thereby realizing end-to-end communication between device A and device B.

[0162] 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 message can be retained in the second data message. Taking the scenario shown in Figure 2B as an example, when device B sends an IP data message to device A, since device A does not support the Star Flash address, device B (the first device) can determine the Star Flash address of the gateway after generating an IP data message to device A, and use it as the Star Flash destination address, so that the intranet (i.e., the network established based on the Star Flash protocol) can route the message to the gateway based on the Star Flash destination address, and at the same time, the IP address of device B (i.e., the destination IP address) is retained in the message, and the gateway can route the message to device A based on the destination IP address.

[0163] 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, and this application does not impose any restrictions.

[0164] During specific implementation, when the intranet (i.e., the network established based on the second communication protocol) is initialized, a management node (M node) that assumes the management (Manager) role is required, and it is injected with the allocable address type and address space. The M node is responsible for the address allocation of the entire intranet. Considering the reliability of network management, there may be one or more backup M nodes in the network. The intranet also needs an address resolution (Address Resolver) node (which can be referred to as an A node) to provide a mapping query function between non-Star Flash addresses (such as IP addresses) and Star Flash network addresses. The two parties communicating based on non-Star Flash addresses can query each other's Star Flash network addresses from the A node, build Star Flash data packets based on the Star Flash network addresses, and perform addressing and forwarding through the Star Flash network addresses.

[0165] In an intranet, multiple nodes within a certain range form a communication domain. An intranet can include one or more communication domains, and different communication domains can have overlapping nodes (i.e., the same node can be in multiple communication domains simultaneously). Each communication domain includes a master node (or G-node) and at least one slave node (or T-node). It should be noted that the same node can have different roles in different communication domains. For example, the same node can be a G-node in one communication domain and a T-node in another.

[0166] During communication, the G node can act as an address allocation server, and the T node requests the G node to allocate a SparkLink address and an IP address. During the address allocation process, the G node can establish a mapping table of the SparkLink address and the IP address (such as <Layer 2 address (Layer 2 Identifier, L2ID), SLNA address, IP address>), record each node (where each node can 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 can be multiple table entries.

[0167] Therefore, when the first device is a G node, the first mapping relationship can be generated by the first device itself; when the first node is an A node, the first mapping relationship can be generated by the first node or sent by the G node to the first device; when the first node is a T node, the first mapping relationship can be sent by the G node or the A node to the T node. Of course, in addition, there can be other implementation methods. For example, technicians pre-define the first mapping relationship and then save the first mapping relationship in each node in the network. This application does not make any restrictions.

[0168] 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.

[0169] In a possible design, the first data packet further includes a first QoS indication field (for example, the first information further includes a first QoS indication field); the first mapping relationship is further used to indicate the mapping relationship between the first QoS indication field and the second QoS indication field; the second data packet further includes a second QoS indication field (for example, the second information further includes a first QoS indication field).

[0170] The first QoS indication field is the corresponding expression of the QoS parameter in the first communication protocol. For example, when the first communication protocol is the IP protocol, the first QoS indication field may include the Differentiated Services Code Point (DSCP) or the Traffic of Class (TC). DSCP is a QoS parameter defined in Internet Protocol version 4 (IPv4). This field was originally defined as the Type of Service (ToS) for specifying differentiated services (DiffServ). Traffic of Class is a QoS parameter defined in Internet Protocol version 6 (IPv6). The upper 6 bits of the Differentiated Services field (DS field) are reserved for classifying data packets. The remaining two bits in the DS field are used for explicit congestion notification (ECN).

[0171] The second QoS indication field is the corresponding expression of the QoS parameters in the second communication protocol. For example, when the second communication protocol is the Star Flash protocol, the second QoS indication field may include a flow identifier (Flow label) and a service type (Type of service, ToS), where the Flow label is used to indicate the traffic generated by a certain APP, or the traffic required by a certain type of QoS, which is allocated by the source node to ensure local uniqueness.

[0172] Through the above design, the conversion of QoS parameters between different protocols can be realized, which provides guarantee for QoS of data during transmission and can further improve the reliability of data transmission.

[0173] In one possible design, the first device also 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 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 meets 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.

[0174] It is understandable that when the first device sends the second data message to the device corresponding to the communication protocol destination address, it needs to perform addressing based on the communication protocol source address and / or the communication protocol destination address, determine the L2ID of the next hop node leading to the communication protocol destination address, and forward the second data message to the next hop node. If the next hop node corresponds to the communication protocol destination address, the message 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 the communication protocol destination address, continue to look for the next node to forward, and repeat this cycle until the second data message reaches the device corresponding to the communication protocol destination address.

[0175] Optionally, when the first device has multiple next-hop nodes (or multiple routing paths) leading to the destination address of the communication protocol, one of the next-hop nodes can be randomly selected for message forwarding, or a next-hop node can be selected for message forwarding based on the path QoS optimal principle, etc. This application does not impose any restrictions.

[0176] Furthermore, since different data packets may correspond to different QoS requirements (e.g., transmission bandwidth, latency, packet loss rate, etc.), multiple transmission channels can be established between two adjacent nodes to meet different QoS requirements. Different transmission channels can correspond to different QoS (e.g., different transmission resources are allocated, such as 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 the 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.

[0177] When nodes establish transmission channels with each other, they can establish the transmission channels based on QoS information, port number, L2ID, etc. 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.

[0178] In specific implementation, 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 ways are listed below.

[0179] Method 1: 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 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 field and the L2ID of the next hop node and the TCID of the transmission channel.

[0180] It can be understood that 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 channel based on the information carried in the second data packet.

[0181] In the embodiment of the present application, the second mapping relationship may be implemented in multiple ways. For example, Table 3 is a possible example of the second mapping relationship:

[0182] Table 3

[0183]

[0184] Similarly, in a 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.

[0185] After the first device obtains 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 the communication protocol source address, communication protocol destination address, communication protocol source port number, communication protocol destination port number, or one or more of the second QoS indication fields carried in the second data packet.

[0186] It is understandable that in practical applications, the second mapping relationship may be expressed by a single table or by multiple tables. For example, Table 4 and Table 5 are possible examples of the second mapping relationship:

[0187] Table 4

[0188] Number Communication Protocol Source Address Communication Protocol Destination Address Next Hop Node L2ID1 SLNA SA1 SLNA DA1 L2ID1

[0189] It is understandable that Table 4 can be called a forwarding table for finding the next hop node. Of course, this is just an example and can be called other names.

[0190] Table 5

[0191]

[0192] It is understandable that Table 5 can be called a transmission channel resolution table or a channel resolution table, which is used to find the transmission channel between the next hop node. Of course, this is just an example, and there may be other names in practice.

[0193] Similarly, Table 3 can be considered as a combination of a forwarding table and a transmission channel resolution table, for example, it can be called a forwarding table & transmission channel resolution table. Of course, this is just an example, and other names are possible.

[0194] After the first device obtains 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 field.

[0195] 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 the 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 a TCID for the transmission channel.

[0196] Different from the method 1, the method 2 is that when there is no transmission channel that meets the QoS requirement of the second data packet in the network, the first device can establish a transmission channel that meets the QoS requirement of the second data packet.

[0197] For example, after obtaining the second data message, the first device queries the existing second mapping relationship (such as Table 3) and does not find a transmission channel that meets the QoS requirements of the second data message. It then starts the transmission channel establishment process and generates the TCID of the transmission channel.

[0198] Taking the Spark protocol as an example, the third QoS field may be a Spark link quality index (SLQI), or a Spark service quality index, which is used to indicate the QoS level and corresponding QOS parameters, such as default priority, delay, packet loss rate, etc. Of course, in actual applications, the third QoS field may be replaced with other parameters (such as one or more of QoS level, priority, delay, packet loss rate, etc.), or the QoS parameters in the third QoS field may be further increased, which is not limited in this application.

[0199] Optionally, after the first device establishes the transmission channel, the first device may further generate a 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 established transmission channel. In this way, when the first device subsequently transmits a data packet containing 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, thereby avoiding the need to repeatedly establish the transmission channel, saving system resources, and improving data transmission efficiency.

[0200] Through the above design, the second data message can be forwarded from the first device to the next hop node, and the QoS requirements of the second data message on the transmission path can be met, thereby further improving the reliability of communication.

[0201] In one possible design, when the next hop node of the first device is the device corresponding to the destination network address (i.e., there is no intermediate node between the first device and the device corresponding to the destination network address, for example, in the scenario shown in FIG2A , the first device is a gateway, and the device corresponding to the destination network address is device B), 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, and / or the second QoS indication field, etc. can be omitted in the second data message, and the source network address, the destination network address, the source transport layer port number, and / or the destination transport layer port number, and / or the first QoS indication field, etc. can be directly carried. In this way, overhead can be saved.

[0202] In one possible design, before converting first information corresponding to a first communication protocol into second information corresponding to a second communication protocol, the first device may also convert information corresponding to other communication protocols to obtain the first information. For example, if the source network address and destination network address in the first information are both private IP addresses, the first device may first map the public IP address to the private IP address; alternatively, if the source network address and destination network address in the first information are both public IP addresses, the first device may first map the private IP address to the public IP address, and so on. This improves the applicability of the solution.

[0203] The above is a description of the method provided in the embodiment of the present application from the perspective of the first device. The following describes the above solution from the perspective of the protocol stack of the first device.

[0204] The first device provided in the embodiment of the present application is deployed with a protocol stack of the second communication protocol, and 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.

[0205] The first protocol layer: can deploy several applications (APP) / business instances and can be used to provide services for applications (also called applications or users).

[0206] The second protocol layer is used to provide information conversion functions between different transmission protocols (for example, storing a first mapping relationship and a second mapping relationship).

[0207] The third protocol layer: used to establish transmission channels between nodes and provide end-to-end information transmission services.

[0208] The fourth protocol layer: can provide a communication interface / means for communication between nodes. The access layer may include a variety of different access technologies. Different access technologies may correspond to different communication interfaces, such as cellular interface, WIFI interface, star flash interface, etc.

[0209] It should be understood that the above-mentioned protocol layer is only a framework structure division. Different communication systems may have their own layer division methods, or may have more specific and lower-level hierarchical divisions, which are not specifically limited here.

[0210] 4 is a flowchart of another data transmission method provided in an embodiment of the present application. The method can be applied to a first device, where a protocol stack of a second communication protocol is deployed. The method includes:

[0211] S401. A first device transmits a first data packet from a first protocol layer of a protocol stack to a second protocol layer of a protocol stack, where the first data packet includes data, a source network address, a destination network address, a source transport layer port number, and a destination transport layer port number, and the first data packet corresponds to a first communication protocol.

[0212] S402. The first device determines second information based on the first mapping relationship at the second protocol layer of the protocol stack, where the second information corresponds to the second communication protocol, and 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, wherein the first mapping relationship is used to indicate one or more of: 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;

[0213] S403. The first device generates a second data message at the second protocol layer of the protocol stack, wherein the second data message 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;

[0214] S404: The first device sends a second data packet at the third protocol layer of the protocol stack.

[0215] It can be understood that the second data message can actually be processed by the fourth protocol layer and sent out through the communication interface provided by the fourth protocol layer.

[0216] Furthermore, if the first information also carries QoS parameters of the first protocol layer, such as the first QoS indication field described above, a device at the second protocol layer of the protocol stack will also convert the first QoS indication field into QoS parameters of the second protocol layer, such as the second QoS field described above, and the second data packet also includes the second QoS indication field (for example, the second information also includes the first QoS indication field).

[0217] Furthermore, the first device may 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, 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 requirement corresponding to the second QoS indication field. Accordingly, 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 at the third protocol layer of the protocol stack based on the L2ID and TCID (for example, adding the L2ID and TCID to the header of the second data packet) to generate a third data packet, and then the first device sends the third data packet at the third protocol layer of the protocol stack.

[0218] Similarly, corresponding to method 1 above, when there is already a transmission channel in the network that meets the QoS requirements of the second data packet, the second protocol layer stores a second mapping relationship. 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 at the second protocol layer of the protocol stack.

[0219] Similarly, corresponding to method 2 above, when 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 the communication protocol destination address at the second protocol layer of the protocol stack; then, the first device maps the second QoS indication field to the 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, and 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.

[0220] Furthermore, the third protocol layer can also feed back the TCID of the generated transmission channel to the second protocol layer, and then the first device can generate a second mapping relationship at the second protocol layer of the protocol stack 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, as well as the L2ID of the next hop node and the TCID of the transmission channel for use when transmitting data packets next time.

[0221] For ease of understanding, the above solution is described in more detail below using the second communication protocol as the Star Flash Protocol as an example.

[0222] See Figure 5, which is a schematic diagram of the protocol stack of the Star Flash protocol provided in an embodiment of the present application. From top to bottom, it includes:

[0223] 1. Application layer (corresponding to the first protocol layer): Located above the network layer, it can deploy multiple apps / service instances and provide services to applications (also called applications or users). Optionally, the application layer can also provide support for protocols such as TCP / UDP, IPv4 / IPv6, etc.

[0224] 2. Network layer (corresponding to the second protocol layer): located above the basic service layer, it is used to provide information conversion functions between different transmission protocols (for example, conversion between first information corresponding to the first communication protocol and second information corresponding to the second communication protocol). For example, an IP adaptation function unit can be provided. The IP adaptation function unit is a logical functional entity used to convert relevant information of the IP protocol (such as IP address information) with relevant information of the Star Flash protocol (such as Star Flash address). Specifically, the information conversion function between different transmission protocols can be provided by maintaining the first mapping relationship and the second mapping relationship.

[0225] 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.

[0226] Exemplarily, the basic service layer may provide control plane functional units such as a QoS management functional unit, a connection management functional unit, a device discovery functional unit, a service discovery functional unit, a security management functional unit, and a measurement management functional unit.

[0227] 1) QoS management functional unit: The QoS management functional unit is a logical functional entity used to determine the service quality that the Star Flash wireless communication system needs to provide based on factors such as service transmission requirements and network conditions, ensuring that the transmission capacity of the Star Flash wireless communication system matches the service requirements.

[0228] For example, the QoS management function unit can be responsible for negotiating and determining QoS parameters. When the application layer of the sending end has service data to transmit, it submits information such as the service type, the port number, and the service-associated QoS parameters (Flow Label, ToS) to the QoS management function unit. The sending end QoS management function unit negotiates the QoS parameters required for transmission with the peer end QoS management function unit based on the received parameters and determines the SLQI.

[0229] 2) Connection Management Functional Unit: This is a logical functional entity that supports functions such as 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 functional unit can initiate the establishment or update of transmission channels according to the QoS parameters negotiated by the QoS management functional unit, and feed back information about the established or updated transmission channels (such as TCID) to the network layer (such as the IP adaptation functional unit) for storage and maintenance.

[0230] 3) Device discovery functional unit: It is a logical functional entity used to disclose its own existence or discover surrounding devices.

[0231] 4) Service management functional unit: It is a logical functional entity used for service management and maintenance within the device, as well as service discovery between devices.

[0232] 5) Measurement Management Functional Unit: The measurement management functional unit supports triggering access layer measurements of physical layer signal quality and optical measurements of existing transmission channel performance. It provides a unified measurement service interface for other functional units within the device (such as the QoS management functional unit, 5G convergence functional unit, etc.) or authorized applications. It allows the corresponding functional unit to provide the measurement management functional unit with the configuration information of the desired measurement and query the measurement results.

[0233] It can be understood that the above functional units of the control plane are only examples and not limitations, and there may be other functional units in practice.

[0234] In addition to providing control plane related functions, the basic service layer can also provide data plane (or user plane) functions. For example, by querying the first mapping relationship and the second mapping relationship maintained by the network layer IP adaptation function unit, the data message is mapped to the corresponding transmission channel for transmission.

[0235] 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. Different access technologies may correspond to different communication interfaces, such as SLB air interface, SLE air interface, etc.

[0236] It should be understood that the above-mentioned protocol layer is only a framework structure division. Different communication systems can have their own layer division methods, or they can have more specific and lower-level hierarchical divisions, which are not specifically limited here. For example, the functional modules of the above-mentioned network layer can also be integrated into the basic service layer, thereby omitting the network layer (i.e., the application layer is above the basic service layer). In addition, the names of the various protocol layers are only examples. In actual applications, other names can also be taken. As long as the function of the protocol layer is the same or similar to the function of the protocol layer in the embodiment of the present application, it can be considered as the protocol layer in the embodiment of the present application.

[0237] In an embodiment of the present 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.

[0238] The following table provides examples of parameters maintained by each protocol layer:

[0239] 1. Table entries maintained by the application layer (for application instances):

[0240] Table 6

[0241]

[0242] AID is an application identifier. The above table entry takes AID as an example for video casting, but is not limited thereto.

[0243] 2. Table entries maintained by the network layer (IP adaptation management unit) (first mapping relationship, second mapping relationship):

[0244] Table 7

[0245]

[0246] Maximum transmission unit (MTU): This is the maximum transmission unit for data transmission at the basic service layer. The MTU size must take into account the maximum buffer size at this layer. Application layer packets cannot exceed the MTU size.

[0247] Maximum Payload Size (MPS): It is the maximum transmission unit that the access layer can transmit. The basic service layer needs to split the SUD into multiple PDUs. The size of each PDU cannot exceed the size of the MPS.

[0248] Upper layer protocol identifier (PI): used to indicate the protocol type.

[0249] 3. Table entries maintained by the basic service layer (for transmission channels):

[0250] Table 8

[0251]

[0252] 4. Table entries maintained by the access layer (logical channel-oriented):

[0253] Table 9

[0254]

[0255] XQI: Transaction Quality Index (XQI); LCID: Logical Channel Identifier (LCID).

[0256] See Figure 6, which is a schematic diagram of the relationship between relevant functional units in the Star Flash protocol stack.

[0257] IP adaptation functional unit: After the first device obtains the IP data packet (i.e., the first data packet), it can perform a table lookup through the IP adaptation functional unit of the network layer based on the IP address (including source IP address, destination IP address), TCP / UDP port number (including source TCP / UDP port number, destination TCP / UDP port number), DSCP and other parameters carried in the IP data packet, to achieve conversion from IP address to Star Flash address, conversion from TCP / UDP port number to Star Flash port number, and conversion from DSCP to Flow label, ToS, etc.

[0258] QoS Management Unit: Responsible for negotiating and determining QoS parameters. When the application layer of the first device has service data to transmit, it submits information such as the service type, Star Flash port number, and service-associated QoS parameters (such as Flow Label, ToS) to the QoS Management Function Unit. Based on the received parameters, the QoS Management Function Unit negotiates the QoS parameters required for transmission with the QoS Management Function Unit of the peer end (such as the next-hop node) to determine the SLQI. This applies the QoS parameter mapping: <Source SLNA, Destination SLNA, Star Flash domain port number, Flow label, ToS, AID> → <Source SLNA, Destination SLNA, Star Flash port number, SLQI, AID>.

[0259] The connection management unit: In accordance with the QoS parameters negotiated by the QoS management unit, it initiates the establishment or update of the transmission channel, establishing a transmission channel that meets QoS requirements. The TCID of the established transmission channel is fed back to the IP adaptation function unit for storage and maintenance.

[0260] IP adaptation function unit: After receiving the TCID feedback from the connection management unit, it updates the table maintained by the network layer (IP adaptation management unit) so that after the first device subsequently receives an IP data packet, it can directly look up the table locally and forward it to realize the carrying of the data packet.

[0261] Through the above solution, the conversion between IP parameters and Star Flash parameters can be realized in the Star Flash protocol stack, and then the carrying of IP data packets in the Star Flash domain can be realized, thereby improving the reliability of data transmission.

[0262] In order to more clearly understand the technical solution provided by the embodiments of the present application, the data packet forwarding process is exemplified below with reference to the single-hop scenario shown in FIG2A and the multi-hop scenario shown in FIG2B .

[0263] Example 1: Single-hop scenario

[0264] Both end devices (such as device A and device B) support dual-protocol addresses (such as IP addresses and Star Flash addresses).

[0265] Initial conditions: Device B accesses the Star Flash network and applies for the Star Flash network address SLNA.

[0266] For example, after the T node in the Xingshan network is started, it discovers each other with the G node and establishes a management connection, which needs to meet the requirements of secure access. Device B can be 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 the G node to allocate an SLNA address. During the address allocation process, the G node can establish<L2ID,SLNA> In the mapping table, one L2ID can have multiple SLNAs, that is, multiple entries. In addition, the G node supports mutual query services between L2ID and SLNA addresses. Any T node can query address information from the address service of the G node.

[0267] See Figure 7A, which is a schematic diagram of an intranet device receiving an IP datagram sent by an extranet device. In this example, the gateway and the device in the StarFlash domain (such as device B) must meet the following requirements:

[0268] 1. Gateway:

[0269] External network device (device A) → gateway: Device A sends a public network IP datagram (i.e., message 1 shown in FIG7A ) to the gateway;

[0270] The gateway converts public network IP address information (such as public network IP address, public network TCP / UDP port number) into SparkLink address information (such as SLNA, SparkLink port number). Specifically, the gateway can first convert the public network IP address information into private network IP address information (such as 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.

[0271] The gateway analyzes information such as <IP address, TCP / UDP port number, DSCP> in the IP datagram, queries the transmission channel parsing table based on this information. If there is a corresponding table entry, it encapsulates the packet, generates and sends a SparkLink data packet (packet 2 shown in Figure 7A). If there is no corresponding table entry, it initiates QoS negotiation and transmission channel establishment, generates the corresponding table entry, and then encapsulates the packet based on the newly established transmission channel, generates and sends a SparkLink data packet; if the transmission channel establishment fails, it discards the packet.

[0272] It can be understood that since this is a single-hop scenario, the header of packet 2 can omit the SparkLink address (the header of packet 2 shown in Figure 7A), and in actual applications, the SparkLink address can also be encapsulated in packet 2.

[0273] 2. Device B:

[0274] Cooperate with the G node to perform QoS negotiation and transmission channel establishment, and generate table entries for the relevant transmission channel parsing table;

[0275] Receive the SparkLink data packet, and send the IP data packet (packet 3 shown in Figure 7A) to the IP protocol stack / IP application according to the SparkLink port number.

[0276] Refer to Figure 7B, which is a schematic diagram of an internal network device sending an IP data packet to an external network device. In this example, the following requirements need to be met for the gateway and devices within the SparkLink domain (such as device B):

[0277] 1. Device B:

[0278] The application layer generates a private network IP data packet (i.e., packet 1 shown in Figure 7B), and passes the private network IP data packet to the StarFlash protocol stack. The StarFlash 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 resolution table. If there is a corresponding entry, the IP data packet is encapsulated with a StarFlash header to generate a StarFlash data packet (i.e., the packet shown in Figure 7B) and sent. If there is no corresponding entry, a transmission connection needs to be established or an existing transmission connection needs to be reused according to information such as <IP address, TCP / UDP port number, DSCP>. If the establishment of the transmission connection is successful, the corresponding entry is created, the IP data packet is encapsulated with a StarFlash header, and sent; if the establishment of the transmission connection fails, the packet is discarded.

[0279] 2. Gateway:

[0280] Receives the StarFlash data packet and sends it up to the IP protocol stack;

[0281] 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., packet 3 shown in Figure 7B).

[0282] It can be understood that since this is a single-hop scenario, the header of packet 2 can omit the StarFlash address (the header of packet 2 shown in Figure 7B does not have it), and in actual applications, the StarFlash address can also be encapsulated in packet 2.

[0283] Through the above Example 1, end-to-end transmission of public network IP application data and end devices within the StarFlash domain can be achieved, and the bearing of IP data within the StarFlash domain can be realized. Within the StarFlash domain, packets are routed and forwarded through StarFlash address information. The characteristics of short StarFlash address length and support for flexible customization can be fully utilized to reduce the header overhead, improve the payload ratio, and improve the transmission efficiency.

[0284] Example 2. Multi-hop scenario

[0285] End devices (such as device A and device B) both support dual protocol addresses (such as IP address, StarFlash address).

[0286] Initial condition: After device B accesses the StarFlash network, it applies for a StarFlash network address SLNA.

[0287] Exemplarily, after the T node in the SparkLink network is started, it discovers the G node and establishes a management connection with it, which needs to meet requirements such as secure access. Device B can be either a G node or a T node, without limitation. Among them, the G node has IP capabilities and serves as an address allocation server. The T node needs to request the G node to allocate a SLNA address. During the address allocation process, the G node can establish a mapping table of <L2ID, SLNA>. One L2ID can have multiple SLNAs, that is, there are multiple table entries. In addition, the G node supports the mutual query service between the L2ID and the SLNA address. Any T node can query the address information from the address service of the G node.

[0288] Referring to Figure 8A, it is a schematic diagram of an internal network device receiving an IP data packet sent by an external network device. In this example, the following requirements need to be met for the gateway and the devices (such as device B) within the SparkLink domain:

[0289] 1. Gateway:

[0290] External network device (device A) → Gateway: Device A sends a public network IP data packet to the gateway (i.e., packet 1 shown in Figure 8A);

[0291] The gateway converts the public network IP address information (such as the public network IP address, public network TCP / UDP port number) into SparkLink address information (such as SLNA, SparkLink port number). Specifically, the gateway can first convert the public network IP address information into private network IP address information (such as the 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 the SLNA traffic into the SparkLink protocol stack.

[0292] The gateway analyzes information such as <IP address, TCP / UDP port number, DSCP> in the IP data packet, queries the forwarding table, transmission channel parsing table, etc. based on this information. If there is a corresponding table entry, it encapsulates the packet, generates and sends a SparkLink data packet (packet 2 shown in Figure 8A). If there is no corresponding table entry, it initiates QoS negotiation and transmission channel establishment, generates the corresponding table entry, and then encapsulates the packet based on the newly established transmission channel, generates and sends a SparkLink data packet; if the transmission channel establishment fails, the packet is discarded.

[0293] 2. Intermediate nodes 1 and 2:

[0294] After receiving the SparkLink data packet from device A, it makes necessary encapsulation of the SparkLink data packet (such as adding LCID, TCID, etc., which is specifically determined according to the requirements of the frame format), for example,逐级查找替换下一跳节点的LCID、TCID等 (this part seems to have some incorrect or unclear表述, please check), and finally forwards the packet to device B.

[0295] 3. Device B:

[0296] Cooperate with the G node to perform QoS negotiation and establish a transmission channel, and generate relevant entries;

[0297] Receive a SparkLink data packet (packet 4 shown in Figure 8A), and send the IP data packet (packet 5 shown in Figure 8A) to the IP protocol stack / IP application according to the SparkLink port number.

[0298] Refer to Figure 8B, which is a schematic diagram of an internal network device receiving an external network IP data packet. In this example, the following requirements need to be met for the gateway and devices within the SparkLink domain (such as device B):

[0299] 1. Device B:

[0300] The application layer generates a private network IP data packet (i.e., packet 1 shown in Figure 8B), and passes 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 send primitive interface and the private network IP data packet header, and queries the forwarding table, transmission channel parsing table, etc. If there is an entry, the IP data packet is encapsulated with a SparkLink packet header to generate a SparkLink data packet (i.e., packet 2 shown in Figure 8B) and sent. If there is no entry, a transmission connection needs to be established or an existing transmission connection needs to be reused according to information such as <IP address, TCP / UDP port number, DSCP>. If the establishment of the transmission connection is successful, the corresponding entry is created, the IP data packet is encapsulated with a SparkLink packet header, and sent; if the establishment of the transmission connection fails, the packet is discarded.

[0301] 2. Intermediate nodes 1 and 2:

[0302] Receive the SparkLink data packet from device B, perform necessary encapsulation on the SparkLink data packet (such as adding LCID, TCID, etc., which are determined according to the needs of the frame format), for example,逐级查找替换下一跳节点的LCID、TCID等 (this part seems to have some incorrect or unclear表述, but keeping it as is for now), and finally forward the packet to the gateway.

[0303] 3. Gateway:

[0304] Receive the SparkLink data packet (packet 4 shown in Figure 8B), convert the SparkLink address information into public network IP address information, and send an IP data packet to the external network (i.e., packet 5 shown in Figure 8B).

[0305] Through the above Example 2, end-to-end transmission of public network IP application data and end devices within the SparkLink domain can be achieved, and IP data can be carried within the SparkLink domain. Packets are routed and addressed for forwarding within the SparkLink domain through SparkLink address information, which can make full use of the characteristics of short SparkLink address length and support for flexible customization, reduce the packet header overhead, improve the payload ratio, and improve the transmission efficiency.

[0306] It should be noted that the above embodiments mainly take the address and port number corresponding to the second communication protocol to determine the transmission channel as an example (for example, the transmission channel is associated with the Star Flash address, Star Flash port number, etc.). In actual applications, the scheme of the first device determining the transmission channel can also be applied to other communication protocols (for example, the transmission channel can also be associated with the IP address, TCP / UDP port number, etc.).

[0307] For example, referring to FIG9 , which is a flowchart of another data transmission method provided in an embodiment of the present application, the method includes:

[0308] S901. The first device obtains a data message, which includes data, a source address, a destination address, a source port number, a destination port number, and a QoS indication field.

[0309] The specific implementation method can be referred to above S301 or S401 and will not be repeated here. The only difference is that here, there is no restriction on which communication protocol the source address, destination address, source port number, destination port number, QoS indication field, etc. correspond to.

[0310] For example, for the IP protocol, the source address and destination address types are IP addresses, the source port number and destination port number types are TCP / UDP port numbers, and the QoS parameter is DSCP or Traffic of Class.

[0311] For example, for the Star Flash protocol, the source address and destination address types are Star Flash addresses, the source port number and destination port number types are Star Flash port numbers, and the QoS parameter is ToS.

[0312] S902. The first device determines, based on one or more of the source address, the destination address, the source port number, the destination port number, or the QoS indicator field, a layer 2 address L2ID of a next hop node leading to the destination address and a TCID of a transmission channel between the first device and the next hop node; wherein the transmission channel meets the QoS requirement corresponding to the QoS indicator field;

[0313] Similarly, when 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 based on the second mapping relationship; wherein the second mapping relationship is used to indicate the mapping relationship between the source address, destination address, source port number, destination port number, or one or more of the QoS indication fields and the L2ID of the next hop node and the TCID of the transmission channel.

[0314] 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, and the L2ID of the next-hop node, and generates a TCID for 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, the L2ID of the next-hop node, and the TCID of the transmission channel for use in subsequent forwarding of the data packet.

[0315] S903: The first device encapsulates the data message according to the L2ID and the TCID, and sends the encapsulated data message.

[0316] The specific implementation method can be referred to above S404 and will not be repeated here.

[0317] Similarly, when the source address and destination address are of IP address type, if the destination address is the address of the next hop node, the Star Flash address can be omitted in the encapsulated data packet, for example, the encapsulated data packet includes L2ID, TCID, source address, and destination address; or, if the destination address is not the address of the next hop node, the IP address and the Star Flash address can be encapsulated in the data packet at the same time, for example, the encapsulated data packet includes L2ID, TCID, source address, destination address, the Star Flash address corresponding to the source address, and the Star Flash address corresponding to the destination address.

[0318] Through the above solution, the QoS requirements of data packets on the transmission path can be guaranteed, and the reliability of communication can be improved.

[0319] It should be understood that the various embodiments provided herein may be implemented individually or in combination with each other, and this application does not limit them.

[0320] The method provided by the embodiment of the present application is described above in conjunction with the accompanying drawings, and the device provided by the embodiment of the present application is described below in conjunction with the accompanying drawings.

[0321] Based on the same technical concept, an embodiment of the present application provides a data transmission device, which includes a module / unit / means for executing the method shown in Figure 3 or Figure 9. The module / unit / means can be implemented by software or hardware, or the corresponding software implementation can be executed by hardware.

[0322] Exemplarily, referring to FIG. 10 , the apparatus may include an acquiring unit 1001 , a processing unit 1002 , and a sending unit 1003 .

[0323] When the device is used to execute the method shown in Figure 3, the acquisition unit 1001 is used to obtain 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, and a destination transport layer port number, and the first information corresponds to a first communication protocol; the processing unit 1002 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, wherein the first mapping relationship is used to indicate: one or more of 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 one or more of 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 1003 is used to send the second data packet.

[0324] When the device is used to execute the method shown in Figure 9, the acquisition unit 1001 is used to obtain a data message, 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 one or more of the source address, destination address, source port number, destination port number, or QoS indication field; wherein the transmission channel meets the QoS requirements corresponding to the QoS indication field; the data message is encapsulated according to the L2ID and TCID; and the sending unit 1003 is used to send the encapsulated data message.

[0325] Based on the same technical concept, an embodiment of the present application provides a data transmission device, which includes a module / unit / means for executing the method shown in Figure 4. The module / unit / means can be implemented by software or hardware, or the corresponding software implementation can be executed by hardware.

[0326] Exemplarily, referring to FIG11 , the device may include:

[0327] A first protocol layer module 1101 is configured to transmit a first data packet to a second protocol layer module, where the first data packet includes data and first information, where 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, and the first information corresponds to a first communication protocol;

[0328] The second protocol layer module 1102 is used to determine second information based on the first mapping relationship, where the second information corresponds to the second communication protocol, and 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, wherein the first mapping relationship is used to indicate: 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 generate a second data message, wherein the second data message 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;

[0329] The third protocol layer module 1103 is configured to send a second data message.

[0330] It should be understood that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.

[0331] Referring to Figure 12, an embodiment of the present application 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 performed by the above-mentioned first device through logic circuits or execution code instructions.

[0332] It should be understood that the processors mentioned in the embodiments of the present application can be implemented by hardware or software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc. When implemented by software, the processor can be a general-purpose processor that is implemented by reading software code stored in a memory.

[0333] Exemplarily, the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.

[0334] It should be understood that the memory mentioned in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DR RAM).

[0335] 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, discrete hardware component, the memory (storage module) can be integrated into the processor.

[0336] It should be noted that the memory described herein is intended to include, but not be limited to, these and any other suitable types of memory.

[0337] Based on the same technical concept, an embodiment of the present application further provides a computer-readable storage medium, comprising a program or instructions, which, when executed on a computer, enables the method performed by the above-mentioned first device to be executed.

[0338] Based on the same technical concept, an embodiment of the present application further provides a computer program product comprising instructions. The computer program product stores instructions that, when run on a computer, enable the method performed by the above-mentioned first device to be executed.

[0339] Based on the same technical concept, embodiments of the present application further provide a terminal device, which is the first device described above or includes the first device described above. The terminal device can be a vehicle, drone, helicopter, airplane, ship, intelligent transportation equipment, or smart home device. Embodiments of the present application do not limit the specific form of the terminal device.

[0340] In this application, "at least one" means one or more, and "more" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. In the text description of this application, the character " / " generally indicates that the previous and next associated objects are in an "or" relationship; in the formula of this application, the character " / " indicates that the previous and next associated objects are in a "division" relationship. "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.

[0341] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0342] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0343] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0344] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0345] Obviously, those skilled in the art may make various modifications and variations to this application without departing from the scope of protection of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.

Claims

1. A data transmission method, characterized in that: include: The first device obtains a first data packet, where the first data packet includes data and first information, where 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, and the first information corresponds to a first communication protocol; The first device determines second information according to the first mapping relationship, where the second information corresponds to a second communication protocol, and 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, wherein the first mapping relationship is used to indicate: a mapping relationship between the source network address and the communication protocol source address, a mapping relationship between the destination network address and the communication protocol destination address, a mapping relationship between the source transport layer port number and the communication protocol source port number, and a mapping relationship between the destination transport layer port number and the communication protocol destination port number; The first device generates a second data message, wherein the second data message 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.

2. The method according to claim 1, wherein 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.

3. The method according to claim 1 or 2, wherein: The first data message further includes a first quality of service (QoS) indication field, wherein the first QoS indication field includes a differentiated services code point (DSCP) or a traffic type (Traffic of Class); The first mapping relationship is further used to indicate a mapping relationship between the first QoS indication field and the second QoS indication field; the second QoS indication field includes a flow identifier Flow label and a service type ToS; The second data packet also includes the second QoS indication field.

4. The method according to claim 3, wherein The first device sending the second data packet includes: The first device determines, 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 of a next hop node leading to the communication protocol destination address and a transmission channel identifier TCID of a transmission channel between the first device and the next hop node; wherein the transmission channel meets the QoS requirement 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; and the first device sends the third data packet.

5. The method according to claim 4, wherein The first device determines, 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, an L2ID of a next hop node leading to the communication protocol destination address and a TCID of a transmission channel between the first device and the next hop node, including: The first device determines, according to a second mapping relationship, an L2ID of a next-hop node leading to the communication protocol destination address and a TCID of a transmission channel between the first device and the next-hop node; wherein the second mapping relationship is used to indicate a 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; or 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 a TCID for the transmission channel.

6. The method according to claim 5, wherein 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 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, the L2ID of the next hop node, and the TCID of the transmission channel.

7. The method according to any one of claims 1 to 6, wherein: The second communication protocol is a short-range wireless communication standard protocol specified by the Star Flash Alliance.

8. The method according to any one of claims 1 to 7, wherein: The source network address and the destination network address are of the Internet Protocol (IP) address type; The type of the source transport layer port number and the destination transport layer port number is Transmission Control Protocol TCP / User Datagram Protocol UDP port number.

9. A data transmission method, characterized in that: Applied to a first device, where a protocol stack of a second communication protocol is deployed, the method includes: The first device transmits a first data packet from a first protocol layer of the protocol stack to a second protocol layer of the protocol stack, where the first data packet includes data and first information, where 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, and the first information corresponds to a first communication protocol; The first device determines, at the second protocol layer of the protocol stack, second information according to a first mapping relationship, where the second information corresponds to a second communication protocol, and 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, wherein the first mapping relationship is used to indicate: a mapping relationship between the source network address and the communication protocol source address, a mapping relationship between the destination network address and the communication protocol destination address, a mapping relationship between the source transport layer port number and the communication protocol source port number, and a mapping relationship between the destination transport layer port number and the communication protocol destination port number; The first device generates a second data message at the second protocol layer of the protocol stack, wherein the second data message 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 a third protocol layer of the protocol stack.

10. The method according to claim 9, wherein The first mapping relationship 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.

11. The method according to claim 9 or 10, wherein: The first data message further includes a first quality of service (QoS) indication field, wherein the first QoS indication field includes a differentiated services code point (DSCP) or a traffic type (Traffic of Class); The first mapping relationship is further used to indicate a mapping relationship between the first QoS indication field and the second QoS indication field; the second QoS indication field includes a flow identifier Flow label and a service type ToS; The second data packet also includes the second QoS indication field.

12. The method according to claim 11, wherein The method further comprises: The first device determines, at a second protocol layer of the protocol stack, a layer 2 address L2ID of a next hop node leading to the communication protocol destination address and a transmission channel identifier TCID of a 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 meets the QoS requirement corresponding to the second QoS indication field; The first device sending the second data packet at the third protocol layer of the protocol stack includes: 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; and the first device sends the third data packet at the third protocol layer of the protocol stack.

13. The method according to claim 12, wherein: The first device determines, at the second protocol layer of the protocol stack, an L2ID of a next hop node leading to the communication protocol destination address and a TCID of a 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, 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 TCID of the transmission channel between the first device and the next hop node according to a second mapping relationship; wherein the second mapping relationship is used to indicate a 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; or, 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 a TCID for 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.

14. The method according to claim 13, wherein 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 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, as well as the L2ID of the next hop node and the TCID of the transmission channel.

15. The method according to any one of claims 9 to 14, wherein: The second communication protocol is a short-range wireless communication standard protocol specified by the Star Flash Alliance.

16. The method according to any one of claims 9 to 15, wherein: The source network address and the destination network address are of the Internet Protocol (IP) address type; The type of the source transport layer port number and the destination transport layer port number is Transmission Control Protocol TCP / User Datagram Protocol UDP port number.

17. A data transmission method, characterized in that: include: The first device obtains a data message, where the data message includes data, a source address, a destination address, a source port number, a destination port number, and a QoS indication field; The first device determines, based on one or more of the source address, the destination address, the source port number, the destination port number, or the QoS indication field, a layer 2 address L2ID of a next hop node leading to the destination address and a TCID of a transmission channel between the first device and the next hop node; wherein the transmission channel meets the QoS requirement corresponding to the QoS indication field; The first device encapsulates the data message according to the L2ID and the TCID, and sends the encapsulated data message.

18. The method according to claim 17, wherein The first device determines, based on one or more of the source address, the destination address, the source port number, the destination port number, or the QoS indication field, an L2ID of a next hop node leading to the destination address of the communication protocol and a TCID of a transmission channel between the first device and the next hop node, including: The first device determines, according to a second mapping relationship, an L2ID of a next-hop node leading to the destination address and a TCID of a transmission channel between the first device and the next-hop node; wherein the second mapping relationship is used to indicate a mapping relationship between one or more of the source address, the destination address, the source port number, the destination port number, or the QoS indication field and the L2ID of the next-hop node and the TCID of the transmission channel; or The first device determines the L2ID of the next hop node leading to the destination address based on the source address and / or the destination address; the first device establishes a transmission channel with the next hop node based on the destination port number, the QoS indication field, and the L2ID of the next hop node, and generates a TCID for the transmission channel.

19. The method according to claim 18, wherein After the first device generates the TCID of the transmission channel, the method further includes: The first device generates the second mapping relationship according to one or more of the source address, the destination address, the source port number, the destination port number, or the QoS indication field, the L2ID of the next hop node, and the TCID of the transmission channel.

20. The method according to any one of claims 17 to 19, wherein: The types of the source address and the destination address are IP addresses, the types of the source port number and the destination port number are TCP / UDP port numbers, and the QoS parameter is DSCP or Traffic of Class; or, The types of the source address and the destination address are the short-distance wireless communication standard protocol addresses specified by the Star Flash Alliance, the types of the source port number and the destination port number are the short-distance wireless communication standard protocol port numbers specified by the Star Flash Alliance, and the QoS parameter is the service type ToS in the short-distance wireless communication standard protocol specified by the Star Flash Alliance.

21. The method according to any one of claims 17 to 20, wherein: The source address and the destination address are of IP address type; The destination address is the address of the next hop node; the encapsulated data message includes the L2ID, the TCID, the source address, and the destination address; or, The destination address is not the address of the next hop node; the encapsulated data message includes the L2ID, the TCID, the source address, the destination address, the short-range wireless communication standard protocol address specified by the Star Flash Alliance corresponding to the source address, and the short-range wireless communication standard protocol address specified by the Star Flash Alliance corresponding to the destination address.

22. A data transmission device, characterized in that: include: an acquiring unit, configured to acquire a first data packet, where the first data packet includes data and first information, where 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, and the first information corresponds to a first communication protocol; a processing unit, configured to determine second information based on the first mapping relationship, where the second information corresponds to a second communication protocol, and 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, wherein the first mapping relationship is used to indicate: a mapping relationship between the source network address and the communication protocol source address, a mapping relationship between the destination network address and the communication protocol destination address, a mapping relationship between the source transport layer port number and the communication protocol source port number, and a mapping relationship between the destination transport layer port number and the communication protocol destination port number; Generate a second data message, wherein the second data message 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; A sending unit, configured to send the second data message.

23. A data transmission device, characterized in that: include: a first protocol layer module, configured to transmit a first data packet to a second protocol layer module, wherein the first data packet includes 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, and the first information corresponds to a first communication protocol; The second protocol layer module is used to determine 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, wherein the first mapping relationship is used to indicate: 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 message, wherein the second data message 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 message.

24. A data transmission device, characterized in that: include: An acquiring unit, configured to acquire a data message, wherein the data message includes data, a source address, a destination address, a source port number, a destination port number, and a QoS indication field; a processing unit, configured to determine, based on one or more of the source address, the destination address, the source port number, the destination port number, or the QoS indication field, a layer 2 address L2ID of a next hop node leading to the destination address and a TCID of a transmission channel between the first device and the next hop node; wherein the transmission channel meets the QoS requirement corresponding to the QoS indication field; and encapsulate the data packet according to the L2ID and the TCID; The sending unit is used to send the encapsulated data message.

25. 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 to 8 through logic circuits or execute code instructions, or to implement the method as described in any one of claims 9 to 16, or to implement the method as described in any one of claims 17 to 21.

26. A computer-readable storage medium, characterized in that The storage medium stores a computer program or instruction. When the computer program or instruction is executed by the communication device, it implements the method according to any one of claims 1 to 8, or is used to implement the method according to any one of claims 9 to 16, or is used to implement the method according to any one of claims 17 to 21.

27. A computer program product, characterized in that The computer program product stores instructions, which, when executed on a computer, enable the computer to execute the method according to any one of claims 1 to 8, or the method according to any one of claims 9 to 16, or the method according to any one of claims 17 to 21.

Citation Information

Patent Citations

  • Communication method and terminal equipment

    CN113259970A

  • Data packet transmission method based on network service quality and related equipment

    CN113630902A

  • Switching method, storage medium and wireless communication device

    CN114449602A

  • Wireless communication method and wireless communication device

    CN114666899A

  • Device and method for realizing convertion between two different protocols

    CN1980223A

Cited By

  • Adaptive communication method and device based on gateway, equipment and storage medium

    CN119835349A