WO2024007134A1 - 一种数据传输方法、装置 - Google Patents

一种数据传输方法、装置 Download PDF

Info

Publication number
WO2024007134A1
WO2024007134A1 PCT/CN2022/103759 CN2022103759W WO2024007134A1 WO 2024007134 A1 WO2024007134 A1 WO 2024007134A1 CN 2022103759 W CN2022103759 W CN 2022103759W WO 2024007134 A1 WO2024007134 A1 WO 2024007134A1
Authority
WO
WIPO (PCT)
Prior art keywords
communication protocol
address
port number
destination
source
Prior art date
Application number
PCT/CN2022/103759
Other languages
English (en)
French (fr)
Inventor
王雅莉
张旭东
王键
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2022/103759 priority Critical patent/WO2024007134A1/zh
Publication of WO2024007134A1 publication Critical patent/WO2024007134A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion
    • H04L69/085Protocols for interworking; Protocol conversion specially adapted for interworking of IP-based networks with other networks

Definitions

  • the present application relates to the field of short-distance communication technology, and in particular, to a data transmission method and device.
  • short-distance wireless communication technology is widely used in scenarios such as smart cars, smart transportation, smart terminals, smart homes, and smart manufacturing.
  • devices can be networked based on the communication protocol used by short-range wireless communication technology (referred to as short-range wireless communication protocol, such as the short-range wireless communication standard protocol specified by the Star Flash Alliance) to form an intranet (or so-called (referred to as a private network), devices within the intranet (referred to as intranet devices) can communicate with each other based on addresses corresponding to the short-range wireless communication protocol (referred to as short-range wireless communication protocol addresses).
  • short-range wireless communication protocol such as the short-range wireless communication standard protocol specified by the Star Flash Alliance
  • the external network device uses a network address to transmit data packets, such as an Internet Protocol (IP) address, and some internal network devices do not support the use of network addresses. address to transmit data packets.
  • IP Internet Protocol
  • This application provides a data transmission method and device for realizing end-to-end communication between devices.
  • a data transmission method including: a first device obtains a first data packet, the first data packet includes data and first information, and the first information includes a source network address, a destination network address, a source transmission layer port number, destination transport layer port number, the first information corresponds to the first communication protocol; the first device determines the second information according to the first mapping relationship, the second information corresponds to the second communication protocol, and the second information includes the communication protocol source address, Communication protocol destination address, communication protocol source port number, communication protocol destination port number, where 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 One or more of the mapping relationships between the source transport layer port number and the communication protocol source port number, the mapping relationship between the destination transport layer port number and the communication protocol destination port number; the first device generates the second Data packet, wherein the second data packet includes one or more of data, communication protocol source address, communication protocol destination address, communication protocol source port number, communication protocol destination
  • the first device After receiving the first data message corresponding to the first communication protocol, the first device converts it into a second data message according to the first mapping relationship. Since the address information carried in the second data message (such as communication protocol source address, communication protocol destination address, communication protocol source port number, communication protocol destination port number) is the address information corresponding to the second communication protocol, so it is possible to realize the processing of the second data based on the address information corresponding to the second communication protocol.
  • the message is addressed and forwarded to transmit the data carried in the second data message to the device corresponding to the destination network address, and ultimately realizes 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 data Transmission reliability.
  • the first mapping relationship is predefined.
  • the technician configures the first mapping relationship on the first device in advance.
  • the first mapping relationship is generated by the first device. For example, if the first device is the master node or management node in the network where the first device is located, and is responsible for allocating address information corresponding to the second communication protocol to each node in the network, you can allocate the address corresponding to the second communication protocol to the first device. After receiving the information, the first mapping relationship is generated and saved.
  • the first mapping relationship comes from the second device, for example, the second device sends it to the first device.
  • the second device is the master node or management node in the network where the first device is located and is responsible for allocating address information corresponding to the second communication protocol to each node in the network
  • the second device can allocate address information corresponding to the second communication protocol to the first device.
  • a first mapping relationship is generated and sent to the first device.
  • 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.
  • the first data packet also contains a first Quality of Service (QoS) indication field, and the first QoS indication field includes a Differentiated Services Code Point (DSCP) or flow 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 (Flow label), a service type (Type of service , ToS); the second data packet also includes a second QoS indication field.
  • the first device may also convert the QoS parameters corresponding to the first communication protocol carried in the first data packet (ie, the first QoS indication field) into QoS parameters corresponding to the second communication protocol based on the first mapping relationship. (ie, the second QoS indication field), and carried in the second data message.
  • QoS Quality of Service
  • DSCP Differentiated Services Code Point
  • QoS parameters can be converted between different protocols, providing guarantee for QoS during data transmission, and further improving the reliability of data transmission.
  • the first device may determine the path to the destination port based on one or more of the communication protocol source address, communication protocol destination address, communication protocol source port number, communication protocol destination port number, or second QoS indication field.
  • L2ID Layer 2 Identifier
  • TCID Transmission channel Identifier
  • the second data message can be forwarded from the first device to the next hop node, and during forwarding, the second data message can be carried on a transmission channel that can meet the QoS requirements of the second data message. , to ensure the QoS of data transmission, which can further improve the reliability of communication.
  • 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 according to the second mapping relationship; wherein, the first device The second mapping relationship is used to indicate 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 and the L2ID and transmission channel of the next hop node.
  • the mapping relationship between TCIDs is used to indicate 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 and the L2ID and transmission channel of the next hop node.
  • the first device when there is already a transmission channel that meets the QoS requirements of the second data packet, the first device can obtain the information from the existing transmission channel based on the information carried in the second data packet and the second mapping relationship. Determining a transmission channel that meets the QoS requirements of the second data message can improve transmission efficiency.
  • 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 first The third QoS indication field establishes a transmission channel with the next hop node based on the communication protocol destination port number, the third QoS indication field, and the L2ID of the next hop node, and generates the TCID of the transmission channel.
  • the first device when there is no transmission channel that meets the QoS requirements of the second data packet, the first device can establish a transmission channel that meets the QoS requirements of the second data packet, thereby realizing the transmission of the second data packet. Bearing can further improve the reliability of data transmission.
  • the first device can also generate the TCID 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 the second QoS.
  • One or more of the indication fields, the L2ID of the next hop node, and the TCID of the transmission channel generate a second mapping relationship.
  • the first device when the first device subsequently transmits a data message 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 to avoid problems. Repeatedly establishing transmission channels can save system resources and improve data transmission efficiency.
  • the second communication protocol is a short-distance wireless communication standard protocol specified by the Star Flash Alliance.
  • the first communication protocol is the IP protocol.
  • the type of source network address and destination network address is IP address; the type of source transport layer port number and destination transport layer port number is TCP/UDP port number.
  • a data transmission method is provided, applied to a first device.
  • a protocol stack of a second communication protocol is deployed on the first device.
  • the method includes: the first device transfers the first data message from the first protocol of the protocol stack. layer is passed to the second protocol layer of the protocol stack.
  • the first data packet contains data and first information.
  • the first information includes the source network address, the destination network address, the source transport layer port number, and the destination transport layer port number.
  • the first The 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, the second information corresponds to the second communication protocol, and the second information includes the communication protocol source address and the communication protocol destination address.
  • 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, One or more of the mapping relationships 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 is in the second protocol of the protocol stack
  • the layer generates a second data message, wherein the second data message includes one or more of data, communication protocol source address, communication protocol destination address, communication protocol source port number, and communication protocol destination port number; the first device
  • the third protocol layer of the protocol stack sends the second data message.
  • the first protocol layer may 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 may It is the network layer in the protocol stack of the short-range wireless communication standard protocol standardized by the Star Flash Alliance.
  • the third protocol layer may be the basic service layer in the protocol stack of the short-range wireless communication standard protocol standardized by the Star Flash Alliance.
  • the protocol stack of the short-distance wireless communication standard protocol standardized by the Starlight Alliance may also include an access layer, and the first data message may actually be processed by the access layer and sent out via the access layer.
  • the parameters of the first communication protocol and the parameters of the second communication protocol can be converted in the protocol stack of the second communication protocol (such as the Starlight protocol stack), and thus the data packets of the first communication protocol can be converted into
  • the bearer in the network corresponding to the second communication protocol realizes end-to-end transmission of the data packets of the first communication protocol, which can improve the reliability of data transmission.
  • the first mapping relationship is predefined.
  • the first mapping relationship is generated by the first device at the second protocol layer of the protocol stack.
  • the first mapping relationship comes from the second device, for example, the second device sends it to the first device.
  • 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 first QoS indication field and the first QoS indication field.
  • the first device can use 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 at the second protocol layer of the protocol stack.
  • One or more determine the layer 2 address L2ID of the next hop node leading to the destination address of the communication protocol, and the transmission channel identifier TCID of the transmission channel between the first device and the next hop node; wherein the transmission channel satisfies the second QoS indication QoS requirements corresponding to the field.
  • the first device can encapsulate the second data message according to the L2ID and TCID at the third protocol layer of the protocol stack to generate the third data message; the first device sends the third data message at the third protocol layer of the protocol stack.
  • the first device can determine the L2ID of the next-hop node leading to the communication protocol destination address and the L2ID between the first device and the next-hop node based on the second mapping relationship at the second protocol layer of the protocol stack.
  • TCID of the transmission channel wherein, the second mapping relationship is used to indicate 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 and the following The mapping relationship between the L2ID of a hop node and the TCID of the transmission channel.
  • 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 can The third protocol layer of the protocol stack 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 Generate 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.
  • the first device can also use 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 in the second protocol layer of the protocol stack.
  • One or more of them, as well as the L2ID of the next hop node and the TCID of the transmission channel generate a second mapping relationship.
  • the second communication protocol is a short-distance wireless communication standard protocol specified by the Star Flash Alliance.
  • the type of the source network address and the destination network address is an Internet Protocol IP address; the type of the source transport layer port number and the destination transport layer port number is a Transmission Control Protocol TCP/User Datagram Protocol UDP port number.
  • beneficial effects corresponding to the designs in the above second aspect can be referred to the beneficial effects corresponding to the designs in the first aspect, and will not be described again here.
  • a data transmission method including: a first device obtains a data packet, and the data packet includes one or more of data, source address, destination address, source port number, destination port number, and QoS indication field.
  • the first device determines the layer 2 address L2ID of the next hop node leading to the destination address, the first device based on one or more of the source address, destination address, source port number, destination port number, or QoS indication field.
  • the data packet can be forwarded from the first device to the next hop node, and during forwarding, the data packet is carried on a transmission channel that can meet the QoS requirements of the data packet to ensure the QoS of data transmission. , which can improve the reliability of communication.
  • this application does not limit the communication protocol corresponding to the source address, destination address, source port number, destination port number, and QoS indication field.
  • the communication protocol corresponding to the source address, destination address, source port number, destination port number, and QoS indication fields corresponds to the IP protocol.
  • the types of the source address and destination address are IP addresses, source port numbers, and destination
  • the type of port number is TCP/UDP port number
  • the QoS parameter is DSCP or Traffic of Class.
  • the communication protocol corresponding to the source address, destination address, source port number, destination port number, and QoS indication field corresponds to the short-distance wireless communication standard protocol specified by the Star Flash Alliance, for example, the type of source address and destination address It is the short-range wireless communication standard protocol address specified by the Star Flash Alliance.
  • the source port number and destination port number type are the short-range wireless communication standard protocol port numbers specified by the Star Flash Alliance.
  • the QoS parameters are the short-range wireless communication standard standardized by the Star Flash Alliance. ToS in standard protocol.
  • the first device can determine the L2ID of the next-hop node leading to the destination address and the TCID of the transmission channel between the first device and the next-hop node according to the second mapping relationship; wherein, the second mapping The 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.
  • the first device when there is already a transmission channel that meets the QoS requirements of the data packet, the first device can determine from the existing transmission channel that satisfies the data packet based on the information carried in the data packet and the second mapping relationship.
  • the transmission channel according to the QoS requirements can improve the transmission efficiency.
  • the first device can determine 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 can determine the L2ID of the next hop node based on the destination port number, QoS indication field, and the L2ID of the next hop node. Establish a transmission channel with the next hop node and generate the TCID of the transmission channel.
  • the first device when there is no transmission channel that meets the QoS requirements of the data packet, the first device can establish a transmission channel that meets the QoS requirement of the data packet, thereby realizing the bearing of the data packet, which can further improve the data transmission rate. Transmission reliability.
  • the first device may also generate the TCID based on 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 generate a second mapping relationship.
  • the first device 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 next hop node that meets the transmission requirements through the second mapping relationship.
  • L2ID and TCID of the transmission channel can avoid repeated establishment of transmission channels, which can save system resources and improve data transmission efficiency.
  • the source address and destination address are of type IP address.
  • the encapsulated data message includes L2ID, TCID, source address, and destination address, that is, the source address corresponding to the data message does not need to be encapsulated in the data message.
  • the short-range wireless communication standard protocol address specified by the Starlight Alliance and the destination address corresponds to the short-range wireless communication standard protocol address specified by the Starlight Alliance. In this way, header overhead can be saved.
  • the encapsulated data message includes L2ID, TCID, source address, destination address, and the short-distance short distance specified by the Starlight Alliance corresponding to the source address.
  • the wireless communication standard protocol address and the destination address correspond to the short-range wireless communication standard protocol address specified by the Starlight Alliance. In this way, transmission reliability can be guaranteed.
  • a fourth aspect provides a data transmission device.
  • the device is a first device or a chip in the first device.
  • the device includes a method for executing the method described in the above-mentioned first aspect or any possible design of the first aspect. modules/units/technical means.
  • the device may include:
  • the acquisition unit is used to acquire the first data message.
  • 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.
  • One message corresponds to the first communication protocol;
  • a processing unit configured to determine second information according to the first mapping relationship, the second information corresponding to the second communication protocol, and the second information includes the communication protocol source address, the communication protocol destination address, the communication protocol source port number, and the communication protocol destination port number
  • the first mapping relationship is used to indicate: 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, and the mapping relationship between the source transport layer port number and the communication protocol source port number. one or more of the mapping relationships between the destination transport layer port number and the communication protocol destination port number; generating a second data message, wherein the second data message includes data, communication protocol source address, communication One or more of the protocol destination address, communication protocol source port number, and communication protocol destination port number;
  • the sending unit is used to send the second data message.
  • the first mapping relationship is predefined.
  • the first mapping relationship is generated by the device.
  • the first mapping relationship comes from the second device, for example, the second device sends it to the device.
  • the first data packet also includes a first 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 first QoS indication field and the second QoS Mapping relationship between indication fields; the second QoS indication field includes flow label and service type ToS; the second data packet also includes a second QoS indication field.
  • the processing unit is configured to determine the communication protocol 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.
  • the processing unit is configured 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 according to the second mapping relationship; wherein, The second mapping relationship is used to indicate one or more of the communication protocol source address, communication protocol destination address, communication protocol source port number, communication protocol destination port number, or the second QoS indication field and the L2ID or transmission of the next hop node. Mapping relationship between TCIDs of channels.
  • the processing unit is configured to determine the L2ID of the next hop node leading to the communication protocol destination address based on the communication protocol source address and/or the communication protocol destination address; and map the second QoS indication field to the third QoS
  • the indication field establishes a transmission channel with the next-hop node based on the destination port number of the communication protocol, the third QoS indication field, and the L2ID of the next-hop node, and generates the TCID of the transmission channel.
  • the processing unit is also configured to: after generating the TCID of the transmission channel, perform the following steps according to 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.
  • One or more of the fields, the L2ID of the next hop node, and the TCID of the transmission channel generate a second mapping relationship.
  • the second communication protocol is a short-distance wireless communication standard protocol specified by the Star Flash Alliance.
  • the type of the source network address and the destination network address is an Internet Protocol IP address; the type of the source transport layer port number and the destination transport layer port number is a TCP/UDP port number.
  • a data transmission device is provided.
  • the device is a first device or a chip in the first device.
  • the device includes a method for executing the method described in the above second aspect or any possible design of the second aspect. modules/units/technical means.
  • the device may include:
  • the first protocol layer module is used to transmit the first data message to the second protocol layer module.
  • the first data message contains data and first information.
  • the first information includes a source network address, a destination network address, and a source transport layer. Port number, destination transport layer port number, the first information corresponds to the first communication protocol;
  • the second protocol layer module is used to determine second information 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 purpose. Port number, where 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 source transport layer port number and the communication protocol source port One or more of the mapping relationships between numbers, the mapping relationship between the destination transport layer port number and the communication protocol destination port number; generating a second data message, wherein the second data message includes data, communication protocol source One or more of the address, communication protocol destination address, communication protocol source port number, and communication protocol destination port number;
  • the third protocol layer module is used to send the second data message.
  • the first mapping relationship is predefined.
  • the first mapping relationship is generated by the second protocol layer module.
  • the first mapping relationship comes from the second device, for example, the second device sends it to the device.
  • 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 first QoS indication field and the first QoS indication field.
  • the second protocol layer module is used to determine the status according to one or more of the communication protocol source address, communication protocol destination address, communication protocol source port number, communication protocol destination port number, or the second QoS indication field. , determine the layer 2 address L2ID of the next hop node leading to the destination address of the communication protocol, and the transmission channel identifier TCID of the transmission channel between the device and the next hop node; 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 message according to the L2ID and TCID and generate the third data message; the third protocol layer module is used to send the third data message.
  • 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;
  • the second mapping relationship is used to indicate one or more of the communication protocol source address, communication protocol destination address, communication protocol source port number, communication protocol destination port number, or the second QoS indication field and the L2ID of the next hop node. , mapping relationship between TCIDs of transmission channels.
  • 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 according to the communication protocol destination port number, the third QoS indication field, and the L2ID of the next hop node, and generate the TCID of the transmission channel; The third protocol layer module is used to pass the TCID to the second protocol layer module.
  • the second protocol layer module is also used to determine the status according to one or more of the communication protocol source address, communication protocol destination address, communication protocol source port number, communication protocol destination port number, or the second QoS indication field. , and the L2ID of the next hop node and the TCID of the transmission channel to generate a second mapping relationship.
  • the second communication protocol is a short-distance wireless communication standard protocol specified by the Star Flash Alliance.
  • the type of the source network address and the destination network address is an Internet Protocol IP address; the type of the source transport layer port number and the destination transport layer port number is a Transmission Control Protocol TCP/User Datagram Protocol UDP port number.
  • a sixth aspect provides a data transmission device.
  • the device is a first device or a chip in the first device.
  • the device includes a method for executing the method described in the above third aspect or any possible design of the third aspect. modules/units/technical means.
  • the device may include:
  • the acquisition unit is used to acquire the data packet, which includes one or more of the data, source address, destination address, source port number, destination port number, and QoS indication field;
  • a processing unit configured to determine, based on one or more of the source address, destination address, source port number, destination port number, or QoS indication field, the layer 2 address L2ID of the next hop node to the destination address, the device and The TCID of the transmission channel between the next hop nodes; the transmission channel meets the QoS requirements corresponding to the QoS indication field; the data packet is encapsulated according to the L2ID and TCID;
  • the sending unit is used to send encapsulated data packets.
  • the processing unit is configured to determine the L2ID of the next-hop node leading to the destination address and the TCID of the transmission channel between the device and the next-hop node according to the second mapping relationship; wherein, the second mapping The 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.
  • 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; based on the destination port number, QoS indication field, L2ID of the next hop node and the next A one-hop node establishes a transmission channel and generates a TCID of the transmission channel.
  • the processing unit is also configured to: after generating the TCID of the transmission channel, based on one or more of the source address, destination address, source port number, destination port number, or QoS indication field, and the following The L2ID of the one-hop node and the TCID of the transmission channel generate a second mapping relationship.
  • the type of source address and destination address is IP address
  • the type of source port number and destination port number is TCP/UDP port number
  • the QoS parameter is DSCP or Traffic of Class.
  • the type of the source address and the 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 the destination port number is the short-range wireless communication standard protocol port specified by the Star Flash Alliance.
  • QoS parameters are ToS in the short-distance wireless communication standard protocol specified by the Star Flash Alliance.
  • the source address and destination address are of type IP address.
  • 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,
  • 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-distance wireless communication standard protocol address specified by the Starlight Alliance corresponding to the source address, and the destination address corresponding The short-distance wireless communication standard protocol address specified by the Star Flash Alliance.
  • a seventh aspect provides a data transmission device, including: at least one processor and an interface circuit; the interface circuit is used to receive signals from other devices other than the device and send or receive signals to the processor or send signals from the processor
  • the processor uses logic circuits or executes code instructions to implement the method as described in the first aspect or any design of the first aspect, or to implement the method as described in the second aspect or the second aspect.
  • a computer-readable storage medium is provided.
  • Computer programs or instructions are stored in the storage medium.
  • the implementation is as described in the first aspect or any design of the first aspect.
  • a computer program product is provided. Instructions are stored in the computer program product, and when it is run on a computer, it causes the computer to execute the method described in the first aspect or any design of the first aspect, or, Perform the method as described in the second aspect or any design of the second aspect, or perform the method as described in the third aspect or any design of the third aspect.
  • FIGS 1A to 1C are schematic diagrams of application scenarios provided by embodiments of the present application.
  • FIGS. 2A to 2B are network architecture diagrams of the communication system provided by embodiments of the present application.
  • Figure 3 is a flow chart of a data transmission method provided by an embodiment of the present application.
  • Figure 4 is a flow chart of another data transmission method provided by an embodiment of the present application.
  • Figure 5 is a schematic diagram of the protocol stack of the Starlight protocol provided by the embodiment of the present application.
  • Figure 6 is a schematic diagram of the relationship between relevant functional units in the Starlight protocol stack
  • Figure 7A is a schematic diagram of an internal network device receiving an IP data packet sent by an external network device in a single-hop scenario
  • Figure 7B is a schematic diagram of an internal network device sending an IP data packet to an external network device in a single-hop scenario
  • Figure 8A is a schematic diagram of an internal network device receiving an IP data packet sent by an external network device in a multi-hop scenario
  • Figure 8B is a schematic diagram of an internal network device sending an IP data packet to an external network device in a multi-hop scenario
  • Figure 9 is a flow chart of another data transmission method provided by an embodiment of the present application.
  • Figure 10 is a schematic structural diagram of a data transmission device provided by an embodiment of the present application.
  • Figure 11 is a schematic structural diagram of another data transmission device provided by an embodiment of the present application.
  • Figure 12 is a schematic structural diagram of another data transmission device provided by an embodiment of the present application.
  • FIG. 1A is a schematic diagram of a scenario provided by an embodiment of the present application.
  • home devices 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.
  • Home devices can be networked based on short-distance 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.
  • the Home devices communicate with the external network through gateways.
  • the gateway is, for example, a Home Gateway (HG) or a customer premise equipment (Customer Premise Equipment, CPE) with a gateway function, etc.
  • Data packets sent by external network devices need to be forwarded to home devices via the gateway, and data packets sent by home devices also need to be forwarded to the external network via the gateway.
  • HG Home Gateway
  • CPE Customer Premise Equipment
  • external network devices can transmit data packets based on IP addresses. Since different IP applications have different requirements for Quality of Service (QoS), the intranet is required to establish single-hop routing (such as Route 1 shown in Figure 1A) or multi-hop routing (such as Figure 1A) according to different IP application QoS requirements. Route 2) shown in 1A.
  • QoS Quality of Service
  • IP addresses such as refrigerators, smart curtains, smart lights, smart door locks, air conditioners, water heaters, etc.
  • IP addresses such as refrigerators, smart curtains, smart lights, smart door locks, air conditioners, water heaters, etc.
  • the refrigerator in Route 2 does not support IP addresses
  • the printer and sub-router 1 support IP addresses.
  • the printer needs to send IP data packets to external network devices (such as mobile phones/PCs) or external networks
  • a device such as a mobile phone/PC
  • the IP data packet should be forwarded through the refrigerator.
  • the refrigerator does not support IP addresses
  • the IP data packet cannot be forwarded.
  • the end-to-end communication between the printer and the mobile phone/PC in the external network fails.
  • FIG. 1B is a schematic diagram of another scenario provided by an embodiment of the present application.
  • multiple meters can form an internal network
  • the business server can form an external network.
  • the business server collects data from the meters, it needs to communicate with the internal network.
  • the electricity meter in the network exchanges data packets, if the external network device and the internal network device respectively support data packets of different protocols, there is also the problem of being unable to support end-to-end communication between the external network device and the internal network device.
  • FIG. 1C is a schematic diagram of another scenario provided by an embodiment of the present application.
  • a wireless screen projection application scenario for example, a car-mounted screen projection
  • the mobile phone needs to transmit data through the vehicle-mounted device and the headset, or for example, in a home theater scenario, the mobile phone needs to transmit data via Large-screen devices (such as TVs) and speakers transmit data.
  • Large-screen devices such as TVs
  • speakers transmit data.
  • different devices support data packets of different protocols, there is also the problem of being unable to support end-to-end communication.
  • embodiments of the present application provide a data transmission solution for realizing end-to-end communication between devices in a scenario where different devices support addresses corresponding to different communication protocols.
  • Embodiments of the present application can be applied to various wireless communication scenarios, especially short-distance wireless communication scenarios, including but not limited to scenarios such as smart cars, smart transportation, smart terminals, smart homes, and smart manufacturing.
  • short-range wireless communication technology can include traditional short-range wireless communication technology, such as Bluetooth (Bluetooth) technology, Bluetooth Low Energy (BLE) technology, Wireless Fidelity (Wi-Fi) technology, Near Field Communication (NFC) technology, Ultra Wide Band (UWB) technology, universal short-range communication technology, etc., may also include evolving communication technologies or other communication technologies that may appear in the future, such as star flash
  • the short-distance wireless communication technology standardized by the alliance referred to as SparkLink technology
  • StarLight technology includes SparkLink Basic (SLB) technology, SparkLow low-power access (SparkLink Basic, SLE) technology, etc. , this application is not limited.
  • FIG. 2A is a network architecture diagram of a communication system provided by an embodiment of the present application.
  • device A and device B conduct end-to-end communication, where device A is located on the external network and device B is located on the internal network.
  • the gateway connects the internal network and the external network.
  • the devices in the external network support the first communication protocol. All devices on the internal network terminal support the second communication protocol.
  • Some devices (such as device B) support the first communication protocol. Therefore, device A and The end-to-end communication of device B may also be called end-to-end communication based on the first communication protocol (such as IP end-to-end communication).
  • the gateway there is no intermediate node between the gateway and device B, which is a single-hop route. Of course, there may be other nodes between device A and the gateway, which are not limited in this application.
  • FIG. 2B is a network architecture diagram of another communication system provided by an embodiment of the present application.
  • device A and device B communicate end-to-end.
  • Device A is located on the external network
  • device B is located on the internal network.
  • the gateway connects the internal network and the external network.
  • the devices in the external network support the first communication protocol
  • the internal network terminal All devices support the second communication protocol, and some devices (such as device B) support the first communication protocol.
  • the gateway and device B cannot communicate directly and need to pass through other nodes, which is a multi-hop route.
  • the intermediate node 1 and/or the intermediate node 2 supports the second communication protocol and may not support the first communication protocol.
  • a data transmission method is provided according to an embodiment of the present application.
  • the method includes:
  • the first device obtains a first data packet.
  • the first data packet includes 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.
  • One piece of information corresponds to the first communication protocol.
  • the first device can be the source device of the first data packet (i.e., the device corresponding to the source network address), or it can be between the source device and the destination device (i.e., the device corresponding to the destination network address) of the first data packet. intermediate equipment. In other words, the first device needs to send or forward the first data packet.
  • the first device may be a gateway, and the first data packet is sent by device B to device A.
  • the first device may be device B.
  • the first device 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 The first data packet may be received from a source device or an intermediate device.
  • data packets will also carry address information used for routing, such as source address, destination address, source port number, destination port number, etc.
  • address information is generally carried in the header of the data packet.
  • the expression form of address information can be different.
  • the source network address, destination network address, source transport layer port number, and destination transport layer port number in the embodiment of the present application are respectively the corresponding values of the source address, destination address, source port number, and destination port number in the first communication 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, and the source Transmission Control Protocol (Transmission Control Protocol) respectively.
  • the IP protocol here is only an example.
  • the first communication protocol can also be other protocols, which is not limited by this application.
  • the first device determines 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.
  • the source network address, destination network address, source transport layer port number, and destination transport layer port number are respectively the source address, destination address, source port number, and destination port number of the data message corresponding to the second communication protocol.
  • the second communication protocol is a short-distance wireless communication protocol, specifically a star protocol
  • the communication protocol source address, communication protocol destination address, communication protocol source port number, and communication protocol destination port number are the star flash source address and star flash respectively.
  • 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.
  • the first communication protocol will mainly take the IP protocol as an example
  • the second communication protocol will mainly take the Star Flash protocol as an example.
  • the address corresponding to the IP protocol may be called an IP address
  • the port corresponding to the IP protocol may be called an IP port
  • the address corresponding to the StarLight protocol may be called a StarLight address or StarLight domain.
  • Address can be represented by SLNA
  • the port corresponding to the StarLight protocol can be called a StarLight port or StarLight domain port.
  • first information and the second information are different expression forms 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.
  • the mapping relationship between each item of information in the first information and each item of information in the second information is specifically indicated through the first mapping relationship.
  • the first mapping relationship includes but is not limited to: source network address and Mapping relationship between communication protocol source addresses, mapping relationship between destination network address and communication protocol destination address, mapping relationship between source transport layer port number and communication protocol source port number, destination transport layer port number and communication protocol purpose One or more mapping relationships between port numbers.
  • the first mapping relationship may be implemented in multiple ways.
  • Table 1 is a possible example of the first mapping relationship.
  • mapping relationships can be stored in a table, corresponding to different ⁇ 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 > combination, the first mapping relationship is one set of mapping relationships, as shown in Table 2, for example.
  • the first device can determine the first mapping relationship by looking up the table (such as Table 1 or Table 2), for example, IP SA1, IP DA1, IP S-port1, IP D-port2 carried in the first data message, then By looking up the table, the first device can determine the SLNA SA1, SLNA DA1, SLNA S-port1, and SLNA D-port2 corresponding to the IP SA1, IP DA1, IP S-port1, and IP D-port2.
  • the table such as Table 1 or Table 2
  • IP SA1, IP DA1, IP S-port1, IP D-port2 carried in the first data message
  • Tables 1 and 2 are used to search for StarLight parameters based on IP parameters or to search for IP parameters based on StarLight parameters. Therefore, Tables 1 and 2 can be called parameter mapping tables or address translation tables, etc. Of course, this is just an example, and other names can actually be used.
  • the first device generates a second data packet, where the second data packet includes one or more of data, communication protocol source address, communication protocol destination address, communication protocol source port number, and communication protocol destination port number.
  • the second data message includes the above data, communication protocol source address, communication protocol destination address, communication protocol source port number, and communication protocol destination port number.
  • the first device may encapsulate the communication protocol source address, communication protocol destination address, communication protocol source port number, and communication protocol destination port number in the header of the first data message to obtain the second data message.
  • the communication protocol destination address is the communication protocol address of the destination device.
  • the communication protocol destination address may be the communication protocol address of a node (such as a gateway) that supports the second communication protocol leading to the destination device.
  • the communication protocol source address may be the communication protocol address of the source device.
  • the communication protocol source address may be the communication protocol address of a node (such as a gateway) that supports the second communication protocol leading to the destination device.
  • the internal network is a network based on the StarLight protocol, so it can be called a StarLight domain.
  • the management node (M node) in the Star Flash domain can assign SLNA and/or service addresses (including IP addresses) to nodes in the Star Flash domain.
  • An address mapping table entry ⁇ L2ID, SLNA/service address> will be maintained on the M node;
  • the Address Resolver (A node for short) in the Starlight domain can synchronize address mapping entries from the M node, or register the assigned SLNA or/and service address with the A node through the node address registration mechanism; the A node Responsible for the conversion function between non-StarLight addresses and StarLight addresses.
  • This virtual function can be implemented on the edge router or gateway device of the StarLight network.
  • the destination network address is the public IP address of the external network
  • the source network address is the public/private network of device B.
  • the corresponding Starlight address is the SLNA of the gateway (CPE).
  • Node B can encapsulate ⁇ CPE-SLNA,B-SLNA,A -IP,B-IP>; after the gateway receives the StarLight data message (second data message) carrying ⁇ CPE-SLNA,B-SLNA,A-ip,B-IP>, it hits CPE-SLNA and parses IP header address; if B-IP is a private IP, convert B-IP to CPE public IP for forwarding; if B-IP is a public IP, forward directly.
  • the IP destination address is the public IP address of device B in the Star Flash domain, and the source IP address is that of external network device A.
  • Public network IP address after the gateway (first device) receives this IP data message (first data message), it finds that the destination network address is the IP address of device B in the Star Flash domain, and then finds device B through address translation. If the starlight address is B-SLNA, then the encapsulation destination SLNA address is B-SLNA, the encapsulation source SLNA address is CPE-SLNA, then the encapsulation message format is ⁇ B-SLNA, CPE-SLNA, B-IP, A-IP> .
  • this article will encapsulate information related to the Starlight protocol (such as Starlight source address, Starlight destination address, Starlight source port number, Starlight destination port number, and/or Starlight QoS parameters).
  • the data packet is called a star flash data packet, and may actually have other names.
  • a data packet carries an IP address and a star flash address, the data packet can also be considered an IP data packet.
  • the first device sends the second data message.
  • the first device After sending 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 transfer the data carried in the second data message. Transmit to the device corresponding to the destination network address, and ultimately achieve end-to-end communication between the device corresponding to the source network address and the device corresponding to the destination network address, improving the reliability of data transmission.
  • the address information such as communication protocol source address, communication protocol destination address, communication protocol source port number, communication protocol destination port number, etc.
  • the first device is a gateway, and the destination network address is the network address of device B.
  • Intermediate node 1 and intermediate node 2 support the StarLight protocol but not the IP protocol.
  • Device B supports the IP protocol and StarLight protocol.
  • 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), then the gateway receives the IP data packet After the message, according to the first mapping relationship, it can be converted into a starlight data message (that is, a data message carrying a starlight source address, a starlight destination address, a starlight source port number, and a starlight destination port number), and then After intermediate node 1 and intermediate node 2 receive the starlight data message, they can use the address information carried in the starlight data message (i.e.
  • StarLight data message forwards the StarLight data message, and finally the StarLight data message can be forwarded to Device B, thereby realizing end-to-end communication between Device A and Device B.
  • the source network address, destination network address, source transport layer port number, and/or destination transport layer port number in the first data message can be retained in the second data message.
  • device B the first device
  • the StarLight address of the gateway can be determined and used as the StarLight destination address, so that the internal network (that is, the network established based on the StarLight protocol) can route the packet to the gateway based on the StarLight destination address.
  • the packet contains Keep the IP address of device B (that is, the destination IP address), and the gateway can route the packet to device A based on the destination IP address.
  • the first mapping relationship is predefined; or the first mapping relationship is generated by the first device; or the first mapping relationship is from the second device, for example, it is sent by the second device to the first device.
  • this application does not limit it.
  • a management node that assumes the role of manager is required, and it is injected with allocable address types and address spaces.
  • 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 requires an Address Resolver node (which can be referred to as A node) to provide mapping query functions between non-StarLight addresses (such as IP addresses) and StarLight network addresses. The two parties communicating based on non-StarLight addresses can query each other's StarLight network addresses from node A, construct a StarLight data message based on the StarLight network address, and perform addressing and forwarding through the StarLight network address.
  • multiple nodes located within a certain range can form a communication domain.
  • the intranet may include one or more communication domains, and there may be intersection nodes between different communication domains (that is, the same node can be located in multiple different communication domains at the same time).
  • Each communication domain includes a master node (also known as G node) and at least one slave node (also known as T node).
  • G node also known as G node
  • T node slave node
  • the same node can have different roles in different communication domains.
  • the same node can be a G node in one communication domain and a G node in another.
  • the communication domain is T node.
  • the G node can serve as an address allocation server, and the T node requests the allocation of a StarLight address and IP address from the G node.
  • the G node can establish a mapping table between the StarLight address and the IP address (such as ⁇ Layer 2 Identifier, L2ID), SLNA address, IP address>, and record each node (where each node Through its corresponding L2ID unique identification) 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 node that has been assigned an address registers with the A node that it has been assigned The address information, that is, node A 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 entries.
  • the first mapping relationship may be generated by the first device itself; when the first node is the A node, the first mapping relationship may be generated by the first node, or sent by the G node to the A device; when the first node is a T node, the first mapping relationship may be sent by the G node or the A node to the T node.
  • technicians may pre-define the first mapping relationship and then save the first mapping relationship in each node in the network. This application does not limit this.
  • 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.
  • the first data packet also includes a first QoS indication field (for example, the first information also includes a first QoS indication field); the first mapping relationship is also used to indicate that the first QoS indication field and the second Mapping relationship between QoS indication fields; the second data packet also includes a second QoS indication field (for example, the second information also includes a first QoS indication field).
  • a first QoS indication field for example, the first information also includes a first QoS indication field
  • the first mapping relationship is also used to indicate that the first QoS indication field and the second Mapping relationship between QoS indication fields
  • the second data packet also includes a second QoS indication field (for example, the second information also includes a first QoS indication field).
  • the first QoS indication field is the corresponding expression form of the QoS parameter in the first communication protocol.
  • the first QoS indication field may include a Differentiated Services Code Point (DSCP). Or flow type (Traffic of Class), where DSCP is the QoS parameter defined in Internet Protocol version 4 (IPv4). This field was originally defined as the type of service (ToS) and is used to specify differentiated services (DiffServ). Traffic of Class is a QoS parameter defined in Internet Protocol version 6 (IPv6).
  • IPv6 Internet Protocol version 6
  • the high 6 bits in the Differentiated Services field (DS field) are reserved and used to classify data packets. The remaining two bits in the DS field are used for Explicit Congestion Notification (ECN).
  • ECN Explicit Congestion Notification
  • the second QoS indication field is the corresponding expression form of the QoS parameter in the second communication protocol.
  • the second QoS indication field may include a flow label (Flow label) and a service type (Type of service). , ToS), where 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 distributed by the source node to ensure local uniqueness.
  • QoS parameters can be converted between different protocols, providing guarantee for QoS during data transmission, and further improving the reliability of data transmission.
  • the first device further determines the path to the destination port 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.
  • the first device encapsulates the second data message according to the L2ID and TCID, and generates a third data message; the first device sends the third data message.
  • the first device when it sends the second data message to the device corresponding to the communication protocol destination address, it needs to address according to the communication protocol source address and/or the communication protocol destination address to determine the path leading to the communication protocol destination address.
  • the L2ID of the next-hop node to forward the second data packet to the next-hop node. If the next hop node corresponds to the communication protocol destination address, the message forwarding is completed. If the next hop node does not correspond to the communication protocol destination address, the next hop node can continue to address based on the source address and/or the communication protocol destination address, and continue. Find the next node to forward, and repeat this cycle until the second data message reaches the device corresponding to the destination address of the communication protocol.
  • 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 packet forwarding, or based on The path QoS optimal principle selects a next hop node for packet forwarding, etc. This application does not impose restrictions.
  • different data packets can correspond to different QoS requirements (such as transmission bandwidth, delay, packet loss rate, etc.)
  • QoS requirements such as transmission bandwidth, delay, packet loss rate, etc.
  • multiple transmission channels can be established between two adjacent nodes.
  • Different transmission channels can correspond to different QoS (for example, allocating different transmission resources, such as time-frequency resources).
  • the first device 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.
  • the transmission channel can be established based on QoS information, port number, L2ID, etc. Therefore, when sending the second data packet to the next-hop node, the first device can determine the QoS 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. TCID of the required transmission channel.
  • the first device determines the L2ID of the next-hop node leading to the destination address of the communication protocol and the TCID of the transmission channel between the first device and the next-hop node. Two possible methods are listed below. Way.
  • 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 according to the second mapping relationship; wherein the second mapping relationship is used for Indicates 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 and the L2ID of the next hop node or the TCID of the transmission channel. Mapping relations.
  • Method 1 when there is already a transmission channel that meets the QoS requirements of the second data packet in the network, the first device can determine from the existing transmission channel based on the information carried in the second data packet. A transmission channel that meets the QoS requirements of the second data message.
  • the second mapping relationship can be implemented in a variety of ways.
  • Table 3 is a possible example of the second mapping relationship:
  • mapping relationships can be stored in a table, corresponding to different ⁇ communication protocol source address, communication protocol destination address, communication protocol source port number, communication protocol destination port number, and second QoS indication field. , L2ID, TCID> combination, the second mapping relationship is one of the mapping relationships.
  • the first device After the first device obtains the second data packet, it may use the communication protocol source address, communication protocol destination address, communication protocol source port number, communication protocol destination port number, or second QoS indication field carried in the second data packet. One or more of them 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.
  • the second mapping relationship can be represented by multiple tables in addition to one table.
  • Table 4 and Table 5 are possible examples of the second mapping relationship.
  • Table 4 can be called a forwarding table, used to find the next hop node.
  • Table 4 can be called a forwarding table, used to find the next hop node.
  • this is just an example, and other names can actually be used.
  • Table 5 can be called a transmission channel analysis table or a channel analysis table, which is used to find the transmission channel with the next hop node.
  • Table 5 can be called a transmission channel analysis table or a channel analysis table, which is used to find the transmission channel with the next hop node.
  • this is just an example, and other names can actually be used.
  • Table 3 can be regarded as a combination of the forwarding table and the transmission channel analysis table, for example, it can be called the forwarding table & transmission channel analysis table.
  • the forwarding table & transmission channel analysis table can actually be used.
  • the first device After the first device obtains the second data message, it can find 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 message.
  • the L2ID of the next hop node further search the first device and the next hop from Table 5 based on one or more of the L2ID of the next hop node, the communication protocol source port number, the communication protocol destination port number, or the second QoS indication field.
  • 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, Establish a transmission channel with the next-hop node based on the destination port number of the communication protocol, the third QoS indication field, and the L2ID of the next-hop node, and generate a TCID of the transmission channel.
  • Method 2 is that when there is no transmission channel that meets the QoS requirements of the second data packet in the network, the first device can establish a transmission channel that meets the QoS requirements of the second data packet.
  • 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, and then starts the establishment of the transmission channel. Process to generate the TCID of the transmission channel.
  • the existing second mapping relationship such as Table 3
  • the third QoS field may be Spark link quality index (SLQI), or Spark link quality index, which is used to indicate the QoS level and corresponding QOS parameters. , such as default priority, delay, packet loss rate, etc.
  • the third QoS field can also 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 can also be Further additions are possible and are not limited by this application.
  • the first device may also use one 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. or more, and the L2ID of the next hop node and the TCID of the established transmission channel to generate a second mapping relationship.
  • the first device subsequently transmits a data packet with the same second information, it can directly find the L2ID of the next hop node and the TCID of the transmission channel that meet the transmission requirements through the second mapping relationship, so as to avoid repeatedly establishing the transmission channel. It can save system resources and improve data transmission efficiency.
  • the second data message can be forwarded from the first device to the next hop node, and the QoS requirements of the transmission path of the second data message can be met, further improving the reliability of communication.
  • the communication protocol source address, communication protocol destination address, communication protocol source port number, communication protocol destination port number and/or can be omitted from the second data message. or one or more of the second QoS indication field, etc., but directly carries the source network address, destination network address, source transport layer port number, and/or destination transport layer port number, and/or the first QoS indication field wait. In this way, expenses can be saved.
  • 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 the destination network address in the first information are both private IP addresses, the first device can also map the public IP address to the private IP address first; or, the source network address in the first information and the destination network address are both public IP addresses, the first device can also map the private IP address to the public IP address first, and so on. In this way, the applicability of the solution can be improved.
  • a protocol stack of the second communication protocol is deployed on the first device provided by the embodiment of the present application.
  • the protocol stack of the second communication protocol includes a first protocol layer, a second protocol layer, a third protocol layer and a fourth protocol layer from top to bottom. protocol layer.
  • First protocol layer Several applications (Application, APP)/business instances can be deployed, which can be used to provide services for applications (also called applications or users).
  • applications also called applications or users.
  • the second protocol layer used to provide information conversion functions between different transmission protocols (for example, storing a first mapping relationship and a second mapping relationship).
  • the third protocol layer used to establish transmission channels between nodes and provide end-to-end information transmission services.
  • 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 cellular interfaces, WIFI interface, star flash interface, etc.
  • protocol layer is only a framework structural division. Different communication systems may have their own layer division methods, or may have more specific and lower level divisions, which are not specifically limited here.
  • FIG. 4 there is a flow chart of another data transmission method provided by an embodiment of the present application.
  • This method can be applied to a first device, and a protocol stack of the second communication protocol is deployed on the first device.
  • the method includes:
  • the first device transmits the first data packet from the first protocol layer of the protocol stack to the second protocol layer of the protocol stack.
  • the first data packet includes data, source network address, destination network address, and source transport layer port. number, the destination transport layer port number, and the first data message 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.
  • the second information corresponds to the second communication protocol.
  • the second information includes the communication protocol source address, the communication protocol destination address, and the communication protocol source port. number, communication protocol destination port number, where 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 source transport layer port number One or more of the mapping relationships between 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 message at the second protocol layer of the protocol stack, where the second data message includes data, communication protocol source address, communication protocol destination address, communication protocol source port number, and communication protocol destination port. one or more of the numbers;
  • the first device sends the second data message at the third protocol layer of the protocol stack.
  • 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.
  • the first information also carries QoS parameters of the first protocol layer, such as the first QoS indication field described above
  • a device will also convert the first QoS indication field into the third QoS indication field in the second protocol layer of the protocol stack.
  • the QoS parameters of the second protocol layer are, for example, the second QoS field mentioned above, and the second data message also includes a second QoS indication field (for example, the second information also includes a first QoS indication field).
  • the first device may also perform a request in the second protocol layer of the protocol stack based on one or more of the communication protocol source address, communication protocol destination address, communication protocol source port number, communication protocol destination port number, or the second QoS indication field. and determine the L2ID of the next-hop node leading to the destination address of the communication protocol and the transmission channel identifier TCID of the transmission channel between the first device and the next-hop node; wherein the transmission channel satisfies the QoS requirement corresponding to the second QoS indication field.
  • the first device sends the second data message at the third protocol layer of the protocol stack, including: the first device encapsulates the second data message according to the L2ID and TCID at the third protocol layer of the protocol stack (for example, in the second data message L2ID and TCID are added to the header of the message to generate a third data message, and then the first device sends the third data message at the third protocol layer of the protocol stack.
  • the first device when there is already a transmission channel that meets the QoS requirements of the second data message in the network, and the second protocol layer stores the second mapping relationship, the first device is in the second layer of the protocol stack.
  • the protocol layer may 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 according to the second mapping relationship.
  • the first device when there is no transmission channel in the network that meets the QoS requirements of the second data message, can use the second protocol layer of the protocol stack according to the communication protocol source address and/or communication protocol.
  • the destination address determines the L2ID of the next hop node leading to the destination address of the communication protocol; then, the first device maps the second QoS indication field to a third QoS indication field (such as SLQI) at the third protocol layer of the protocol stack, according to the communication
  • the protocol destination port number, the third QoS indication field, and the L2ID of the next hop node establish a transmission channel with the next hop node and generate the TCID of the transmission channel. Then the first device can use the L2ID and TCID in the third protocol layer of the protocol stack. Encapsulate the second data packet.
  • 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 use the communication protocol source address, communication protocol destination address, and communication protocol source port in the second protocol layer of the protocol stack. number, 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 to generate a second mapping relationship for use when transmitting the data message next time.
  • FIG. 5 is a schematic diagram of the protocol stack of the StarLight protocol provided by the embodiment of the present application. Included from top to bottom:
  • Application layer Located above the network layer, several APP/business instances can be deployed and can be used to provide services for applications (also called applications or users). Optionally, the application layer can also be used to provide support for TCP/UDP, IPv4/IPv6 and other protocols.
  • Network layer located above the basic service layer, used to provide information conversion functions between different transmission protocols (for example, the first information corresponding to the first communication protocol and the third information corresponding to the second communication protocol) conversion between two information).
  • an IP adaptation functional unit can be provided.
  • the IP adaptation functional unit is a logical functional entity that is used to combine information related to the IP protocol (such as IP address information) with information related to the StarLight protocol (such as the StarLight address). Make the conversion.
  • the information conversion function between different transmission protocols can be provided by maintaining the first mapping relationship and the second mapping relationship.
  • 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.
  • the basic service layer may provide control plane functional units such as QoS management functional unit, connection management unit, device discovery functional unit, service discovery functional unit, security management functional unit, and measurement management functional unit.
  • control plane functional units such as QoS management functional unit, connection management unit, device discovery functional unit, service discovery functional unit, security management functional unit, and measurement management functional unit.
  • the QoS management functional unit is a logical functional entity that is used to determine the service quality that the Star Flash wireless communication system needs to provide based on business transmission requirements and network conditions and other factors to ensure the transmission of the Star Flash wireless communication system Capabilities match business needs.
  • the QoS management functional unit may be responsible for the negotiation and determination of QoS parameters.
  • the application layer of the sending end has business data that needs to be transmitted, the business type, starlight port number, business-related QoS parameters (Flow Label, ToS) and other information are submitted to the QoS management functional unit.
  • the QoS management functional unit of the sending end is based on the received Negotiate the QoS parameters required for transmission with the peer QoS management functional unit to determine the SLQI.
  • Connection management functional unit It is a logical functional entity that supports functions including establishment, update, and deletion of transmission channels, maintenance of mapping relationships between service ports and transmission channels, and maintenance of mapping relationships between transmission channels and access layer logical channels.
  • the connection management functional unit can start the establishment or update of the transmission channel according to the QoS parameters negotiated by the QoS management functional unit, and feed back the established or updated transmission channel information (such as TCID) to the network layer (such as IP adaptation Functional unit) storage and maintenance.
  • Device discovery functional unit It is a logical functional entity used to disclose its own existence or discover peripheral devices.
  • 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.
  • Measurement management functional unit supports triggering access layer measurement of physical layer signal quality, optical measurement of existing transmission channel performance, and other functional units within the device (such as QoS management functional unit, 5G convergence Functional units, etc.) or authorized applications provide a unified measurement service interface.
  • the corresponding functional unit is allowed to provide the configuration information of desired measurement to the measurement management functional unit and query the measurement results.
  • control plane is only examples and not limiting, and other functional units may actually be present.
  • 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 functional unit, the data message is mapped to the corresponding transmission channel for transmission.
  • data plane or user plane
  • Access layer (corresponding to the fourth protocol layer): It can provide communication interfaces/means for communication between nodes.
  • the access layer may include a variety of different access technologies, and different access technologies may correspond to different Communication interface, such as SLB air interface, SLE air interface, etc.
  • protocol layer is only a framework structural division. Different communication systems may have their own layer division methods, or may have more specific and lower level divisions, which are not specifically limited here.
  • the above-mentioned functional modules of the network layer can also be integrated into the basic service layer, thus eliminating the network layer (that is, the application layer is above the basic service layer).
  • the names of each protocol layer are only examples, and other names can be used in actual applications. As long as the functions of the protocol layer are the same or similar to those of the protocol layer in the embodiments of this application, they can be considered as the names in the embodiments of this application. protocol layer.
  • different protocol layers maintain different transmission parameters
  • the parameters in the first mapping relationship and the second mapping relationship may be specifically stored and maintained at the network layer.
  • AID is the application identifier (Application Identifier).
  • Application Identifier the application identifier
  • AID is used for video casting as an example, but the actual situation is not limited to this.
  • MTU Maximum transmission unit
  • MPS Maximum Payload Size
  • Upper layer protocol indicator (Protocol Identifier, PI): used to indicate the protocol type.
  • XQI Transaction Quality Index
  • LCID Logical Channel Identifier
  • FIG. 6 is a schematic diagram of the relationship between relevant functional units in the StarLight protocol stack.
  • IP adaptation functional unit After the first device obtains the IP data message (i.e., the first data message), it can use the IP address (including the source IP address and the destination IP address) and the TCP/UDP port carried in the IP data message. (including source TCP/UDP port number, destination TCP/UDP port number), DSCP and other parameters, look up the table through the IP adaptation functional unit of the network layer to realize the conversion of IP address to StarLight address, and TCP/UDP port Number to starlight port number conversion, and DSCP to Flow label, ToS, etc.
  • QoS management unit responsible for the negotiation and determination of QoS parameters.
  • the service type, starlight port number, service-related QoS parameters (such as Flow Label, ToS) and other information are submitted to the QoS management functional unit.
  • the QoS management functional unit is based on the received The received parameters negotiate the QoS parameters required for transmission with the QoS management functional unit of the opposite end (such as the next-hop node) to determine the SLQI.
  • QoS parameter mapping ⁇ source SLNA, destination SLNA, Starlight domain port number, Flow label, ToS, AID> ⁇ ⁇ source SLNA, destination SLNA, Starlight port number, SLQI, AID>.
  • Connection management unit According to the QoS parameters negotiated by the QoS management unit, start the establishment or update of the transmission channel to establish a transmission channel that meets QoS requirements. Feed back the TCID of the established transmission channel to the IP adaptation functional unit for storage and maintenance.
  • IP adaptation functional unit After receiving the TCID fed back by the connection management unit, it updates the table entries maintained by the network layer (IP adaptation management unit), so that after the first device subsequently receives the IP data message, it can directly look up the table and forward it locally. , to realize the carrying of data packets.
  • the conversion between IP parameters and StarLight parameters can be realized in the StarLight protocol stack, thereby enabling IP data packets to be carried within the StarLight domain and improving the reliability of data transmission.
  • Both end devices (such as device A and device B) support dual-protocol addresses (such as IP address, StarLight address).
  • Device B applies for the StarLight network address SLNA after connecting to the StarLight network.
  • Device B can be a G node or a T node, with no restrictions.
  • the G node has IP capabilities, and as an address allocation server, the T node needs to request the allocation of an SLNA address from G.
  • the G node can establish a mapping table of ⁇ L2ID, SLNA>.
  • One L2ID can have multiple SLNAs, that is, multiple entries.
  • the G node supports mutual query services between L2ID and SLNA addresses. Any T node can query the address service of the G node for address information.
  • FIG. 7A is a schematic diagram of an internal network device receiving an IP data packet sent by an external network device.
  • the gateway and the devices in the StarLight domain need to meet the following requirements:
  • Device A sends a public network IP data message to the gateway (i.e. message 1 shown in Figure 7A);
  • the gateway converts public network IP address information (such as public network IP address, public network TCP/UDP port number) into Starlight address information (such as SLNA, Starlight port number). Specifically, the gateway can first convert the public IP address information into private IP address information (such as private IP address, private TCP/UDP port number), and then map the private IP address information to the StarLight address information. The gateway imports SLNA traffic into the StarLight protocol stack.
  • public network IP address information such as public network IP address, public network TCP/UDP port number
  • Starlight address information such as SLNA, Starlight port number
  • the gateway parses the ⁇ IP address, TCP/UDP port number, DSCP> and other information in the IP data message, and queries the transmission channel analysis table based on this information. If there is a corresponding entry, it encapsulates the message, generates and sends starlight data message (message 2 shown in Figure 7A). If the corresponding entry does not exist, QoS negotiation and transmission channel establishment are initiated, and the corresponding entry is generated, and then the message is encapsulated based on the newly created transmission channel, and a StarLight data message is generated and sent; if the transmission channel establishment fails, Discard the message.
  • the starlight address can be omitted from the header of message 2 (the header of message 2 shown in Figure 7A). In practical applications, the starlight address can also be encapsulated in the message. 2 in.
  • the IP data message (Message 3 shown in Figure 7A) is sent to the IP protocol stack/IP application according to the StarLight port number.
  • FIG. 7B is a schematic diagram of an internal network device sending an IP data packet to an external network device.
  • the gateway and the devices in the StarLight domain need to meet the following requirements:
  • the application layer generates a private IP data message (i.e., message 1 shown in Figure 7B), and passes the private IP data message to the Star Flash protocol stack.
  • the Star Flash protocol stack sends the primitive interface and private IP data Obtain ⁇ IP address, TCP/UDP port number, DSCP> and other information from the message header, and query the transmission channel analysis table. If a corresponding entry exists, the IP data message is encapsulated in a Starlight message header, a Starlight data message (i.e., the message shown in Figure 7B) is generated and sent. If there is no corresponding entry, you need to establish a transmission connection based on ⁇ IP address, TCP/UDP port number, DSCP> and other information or reuse an existing transmission connection. If the transmission connection is successfully established, the corresponding table entry is used, and the IP data message is encapsulated in a Starlight header and sent; if the transmission connection fails to be established, the message is discarded.
  • the gateway converts the starlight address information into public network IP address information and sends an IP data message to the external network (i.e. message 3 shown in Figure 7B).
  • the starlight address can be omitted from the header of message 2 (the header of message 2 shown in Figure 7B does not have it). In practical applications, the starlight address can also be encapsulated in the message. In article 2.
  • Both end devices (such as device A and device B) support dual-protocol addresses (such as IP address, StarLight address).
  • Device B applies for the StarLight network address SLNA after connecting to the StarLight network.
  • Device B can be a G node or a T node, with no restrictions.
  • the G node has IP capabilities, and as an address allocation server, the T node needs to request the allocation of an SLNA address from G.
  • the G node can establish a mapping table of ⁇ L2ID, SLNA>.
  • One L2ID can have multiple SLNAs, that is, multiple entries.
  • the G node supports mutual query services between L2ID and SLNA addresses. Any T node can query the address service of the G node for address information.
  • FIG. 8A is a schematic diagram of an internal network device receiving an IP data packet sent by an external network device.
  • the gateway and the devices in the StarLight domain need to meet the following requirements:
  • Device A sends a public network IP data message to the gateway (i.e. message 1 shown in Figure 8A);
  • the gateway converts public network IP address information (such as public network IP address, public network TCP/UDP port number) into Starlight address information (such as SLNA, Starlight port number). Specifically, the gateway can first convert the public IP address information into private IP address information (such as private IP address, private TCP/UDP port number), and then map the private IP address information to the StarLight address information. The gateway imports SLNA traffic into the StarLight protocol stack.
  • public network IP address information such as public network IP address, public network TCP/UDP port number
  • Starlight address information such as SLNA, Starlight port number
  • the gateway parses the ⁇ IP address, TCP/UDP port number, DSCP> and other information in the IP data message, and queries the forwarding table, transmission channel analysis table, etc. based on this information. If there is a corresponding table entry, it encapsulates the message, generates and Send a starlight data message (message 2 shown in Figure 8A). If the corresponding entry does not exist, QoS negotiation and transmission channel establishment are initiated, and the corresponding entry is generated, and then the message is encapsulated based on the newly created transmission channel, and a StarLight data message is generated and sent; if the transmission channel establishment fails, Discard the message.
  • the starlight data message After receiving the starlight data message from device A, encapsulate the starlight data message as necessary (such as adding LCID, TCID, etc., which are determined according to the needs of the frame format), such as searching and replacing the LCID of the next hop node step by step. , TCID, etc., and finally forwards the message to device B.
  • necessary such as adding LCID, TCID, etc., which are determined according to the needs of the frame format
  • the IP data message (message 5 as shown in Figure 8A) is sent to the IP protocol stack/IP application according to the Starlight port number. .
  • FIG. 8B is a schematic diagram of an internal network device receiving an external network IP data message.
  • the gateway and the devices in the StarLight domain need to meet the following requirements:
  • the application layer generates a private IP data message (i.e., message 1 shown in Figure 8B), and passes the private IP data message to the Star Flash protocol stack.
  • the Star Flash protocol stack sends the primitive interface and private IP data Obtain ⁇ IP address, TCP/UDP port number, DSCP> and other information from the message header, and query the forwarding table, transmission channel analysis table, etc. If an entry exists, the IP data message is encapsulated in a Starlight message header, a Starlight data message (i.e., message 2 shown in Figure 8B) is generated and sent. If there is no entry, you need to establish a transmission connection based on ⁇ IP address, TCP/UDP port number, DSCP> and other information or reuse an existing transmission connection. If the transmission connection is successfully established, the corresponding table entry is used, and the IP data message is encapsulated in a Starlight header and sent; if the transmission connection fails to be established, the message is discarded.
  • the starlight data message After receiving the starlight data message from device B, encapsulate the starlight data message as necessary (such as adding LCID, TCID, etc., which are determined according to the needs of the frame format), such as searching and replacing the LCID of the next hop node step by step. , TCID, etc., and finally forward the message to the gateway.
  • necessary such as adding LCID, TCID, etc., which are determined according to the needs of the frame format
  • searching and replacing the LCID of the next hop node step by step. TCID, etc.
  • the above embodiments mainly use 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 StarLight address, StarLight port number, etc.).
  • the solution for a device to determine a transmission channel can also be applied to other communication protocols (for example, the transmission channel can also be associated with an IP address, TCP/UDP port number, etc.).
  • Figure 9 is a flow chart of another data transmission method provided by an embodiment of the present application.
  • the method includes:
  • the first device obtains a data packet, which includes data, source address, destination address, source port number, destination port number, and QoS indication field.
  • the type of the source address and destination address is IP address
  • the type of source port number and destination port number is TCP/UDP port number
  • the QoS parameter is DSCP or Traffic of Class.
  • the type of the source address and destination address is StarLight address
  • the type of the source port number and destination port number is StarLight port number
  • the QoS parameter is ToS.
  • the first device determines the layer 2 address L2ID of the next hop node leading to the destination address and the first device based on one or more of the source address, destination address, source port number, destination port number, or QoS indication field.
  • TCID of the transmission channel between it and the next hop node where the transmission channel meets the QoS requirements corresponding to the QoS indication field;
  • the first device can determine the L2ID of the next hop node leading to the destination address, the first device and the next hop node based on the second mapping relationship.
  • 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 can determine the L2ID of the next hop node leading to the destination address based on the destination port. number, QoS indication field, and L2ID of the next-hop node to establish a transmission channel with the next-hop node and generate the TCID of the transmission channel. Further, the first device also generates a second mapping relationship based on one or more of the source address, destination address, source port number, destination port number, or QoS indication field, as well as the L2ID of the next hop node and the TCID of the transmission channel. , for subsequent forwarding of data packets.
  • the first device encapsulates the data packet according to the L2ID and TCID, and sends the encapsulated data packet.
  • the starlight address can be omitted from the encapsulated data packet, for example, the encapsulated data packet
  • the 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 Starlight address can be encapsulated in the data packet at the same time, for example, in the encapsulated data packet Including L2ID, TCID, source address, destination address, the StarLight address corresponding to the source address, and the StarLight address corresponding to the destination address.
  • embodiments of the present application provide a data transmission device, which includes modules/units/means for executing the method shown in Figure 3 or Figure 9.
  • This module/unit/means can be implemented by software, or implemented by hardware, or it can also be implemented by hardware executing corresponding software.
  • the device may include an acquisition unit 1001, a processing unit 1002 and a sending unit 1003.
  • the obtaining unit 1001 is used to obtain a first data message.
  • the first data message contains data and first information.
  • the first information includes a source network address, a destination network address, source transport layer port number, destination transport layer port number, the first information corresponds to the first communication protocol;
  • the processing unit 1002 is used to determine the second information according to the first mapping relationship, the second information corresponds to the second communication protocol, and the second
  • the information includes communication protocol source address, communication protocol destination address, communication protocol source port number, communication protocol destination port number, where the first mapping relationship is used to indicate: the mapping relationship between the source network address and the communication protocol source address, the destination network address One or more of the mapping relationships between the destination address of the communication protocol and the destination address of the communication protocol, 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 one or more of data, communication protocol source address, communication
  • the acquisition unit 1001 is used to acquire a data packet, which includes data, source address, destination address, source port number, destination port number, and QoS indication field;
  • the processing unit 1002 is configured to determine the layer 2 address L2ID of the next hop node leading to the destination address, the device based on one or more of the source address, destination address, source port number, destination port number, or QoS indication field.
  • embodiments of the present application provide a data transmission device, which includes modules/units/means for executing the method shown in Figure 4.
  • This module/unit/means can be implemented by software, or implemented by hardware, or it can also be implemented by hardware executing corresponding software.
  • the device may include:
  • the first protocol layer module 1101 is used to transfer the first data message to the second protocol layer module.
  • the first data message contains data and first information.
  • the first information includes the source network address, the destination network address, and the source transmission layer port number, destination transport layer port number, and the first information corresponds to the first communication protocol;
  • the second protocol layer module 1102 is used to determine 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.
  • the destination port number where 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 source transport layer port number and the communication protocol source One or more of the mapping relationships between port numbers, the mapping relationship between the destination transport layer port number and the communication protocol destination port number; generating a second data message, wherein the second data message includes data, communication protocol One or more of the source address, communication protocol destination address, communication protocol source port number, and communication protocol destination port number;
  • the third protocol layer module 1103 is used to send the second data message.
  • an embodiment of the present application also provides a data transmission device.
  • the device includes at least one processor 1201 and an interface circuit 1202; the interface circuit 1202 is used to receive signals from other devices other than the device and send or receive them to
  • the processor 1201 may send signals from the processor 1201 to other communication devices outside the device, and the processor 1201 may implement the method executed by the first device through logic circuits or execution of code instructions.
  • the processor mentioned in the embodiments of this application can be implemented by hardware or software.
  • the processor may be a logic circuit, an integrated circuit, or the like.
  • the processor may be a general-purpose processor implemented by reading software code stored in memory.
  • the processor can be a central processing unit (Central Processing Unit, CPU), or other general-purpose processor, digital signal processor (Digital Signal Processor, DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC) , off-the-shelf programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • CPU Central Processing Unit
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field Programmable Gate Array
  • a general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
  • non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), electrically removable memory. Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory. Volatile memory may be Random Access Memory (RAM), which is used as an external cache.
  • RAM Random Access Memory
  • RAM static random access memory
  • DRAM dynamic random access memory
  • DRAM synchronous dynamic random access memory
  • SDRAM double data rate synchronous dynamic random access memory
  • Double Data Eate SDRAM, DDR SDRAM enhanced synchronous dynamic random access memory
  • Enhanced SDRAM, ESDRAM synchronous link dynamic random access memory
  • Synchlink DRAM, SLDRAM direct memory bus random access memory
  • Direct Rambus RAM Direct Rambus RAM
  • the processor is a general-purpose processor, DSP, ASIC, FPGA or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component
  • the memory storage module
  • embodiments of the present application also provide a computer-readable storage medium, including a program or instructions.
  • the program or instructions When the program or instructions are run on a computer, the method performed by the above-mentioned first device is executed.
  • embodiments of the present application also provide a computer program product containing instructions.
  • the computer program product stores instructions.
  • the method executed by the first device is executed.
  • embodiments of the present application also 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, a drone, a helicopter, an airplane, a ship, an intelligent transportation device, or a smart home device, etc.
  • the embodiments of this application do not limit the specific form of the terminal device.
  • “at least one” refers to one or more, and “plurality” refers to two or more.
  • “And/or” describes the relationship between associated objects, indicating that there can be three relationships, for example, A and/or B, which can mean: A exists alone, A and B exist simultaneously, and B exists alone, where A, B can be singular or plural.
  • the character “/” generally indicates that the related objects before and after are an “or” relationship; in the formula of this application, the character “/” indicates that the related objects before and after are a kind of "division” Relationship.
  • “Including at least one of A, B and C” may mean: including A; including B; including C; including A and B; including A and C; including B and C; including A, B and C.
  • embodiments of the present application may be provided as methods, systems, or computer program products. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment that combines software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
  • computer-usable storage media including, but not limited to, disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions may also be stored in a computer-readable memory that causes a computer or other programmable data processing apparatus to operate in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction means, the instructions
  • the device implements the functions specified in a process or processes of the flowchart and/or a block or blocks of the block diagram.
  • These computer program instructions may also be loaded onto a computer or other programmable data processing device, causing a series of operating steps to be performed on the computer or other programmable device to produce computer-implemented processing, thereby executing on the computer or other programmable device.
  • Instructions provide steps for implementing the functions specified in a process or processes of a flowchart diagram and/or a block or blocks of a block diagram.

Abstract

本申请公开了一种数据传输方法、装置。第一设备获取第一数据报文,第一数据报文中包含数据和第一信息,第一信息包括源网络地址、目的网络地址、源传输层端口号、目的传输层端口号,第一信息对应第一通信协议(S301);根据第一映射关系确定第二信息,第二信息对应第二通信协议(S302);第一设备生成第二数据报文,其中第二数据报文中包括数据、通信协议源地址、通信协议目的地址、通信协议源端口号、通信协议目的端口号(S303);发送第二数据报文(S304)。该方法可以基于第二通信协议对应的地址信息对第二数据报文进行寻址转发,以将第二数据报文中承载的数据传输至目的网络地址对应的设备,可以实现源网络地址对应的设备与目的网络地址对应的设备端到端通信。

Description

一种数据传输方法、装置 技术领域
本申请涉及短距离通信技术领域,尤其涉及一种数据传输方法、装置。
背景技术
目前,在智能车、智能运输、智能终端、智能家居和智能制造等场景中,短距离无线通信技术应用广泛。在这些场景中,设备可以基于短距离无线通信技术所采用的通信协议(简称短距离无线通信协议,例如星闪联盟规范的短距离无线通信标准协议)进行组网,形成一个内网(或者称之为私网),内网内的设备(简称内网设备)之间可以基于短距离无线通信协议对应的地址(简称短距离无线通信协议地址)相互通信。
当内网设备与外网设备传输数据报文时,存在如下场景:外网设备采用网络地址传输数据报文,例如互联网协议(Internet Protcol,IP)地址,而某些内网设备不支持采用网络地址传输数据报文。该场景下,存在无法支持外网设备与内网设备端到端通信的问题。
发明内容
本申请提供一种数据传输方法、装置,用于实现设备与设备端到端通信。
第一方面,提供一种数据传输方法,包括:第一设备获取第一数据报文,第一数据报文中包含数据和第一信息,第一信息包括源网络地址、目的网络地址、源传输层端口号、目的传输层端口号,第一信息对应第一通信协议;第一设备根据第一映射关系确定第二信息,第二信息对应第二通信协议,第二信息包括通信协议源地址、通信协议目的地址、通信协议源端口号、通信协议目的端口号,其中第一映射关系用于指示:源网络地址和通信协议源地址之间的映射关系、目的网络地址和通信协议目的地址之间的映射关系、源传输层端口号和通信协议源端口号之间的映射关系、目的传输层端口号和通信协议目的端口号之间的映射关系中的一个或多个;第一设备生成第二数据报文,其中第二数据报文中包括数据、通信协议源地址、通信协议目的地址、通信协议源端口号、通信协议目的端口号中的一个或多个;第一设备发送第二数据报文。
在上述方案中,第一设备在收到对应第一通信协议的第一数据报文后,根据第一映射关系将其转换为第二数据报文,由于第二数据报文中携带的地址信息(如通信协议源地址、通信协议目的地址、通信协议源端口号、通信协议目的端口号)是第二通信协议对应的地址信息,因此可以实现基于第二通信协议对应的地址信息对第二数据报文进行寻址转发,以将第二数据报文中承载的数据传输至目的网络地址对应的设备,最终实现源网络地址对应的设备与目的网络地址对应的设备端到端通信,可以提高数据传输的可靠性。
一种可能的设计中,第一映射关系是预先定义的。例如,技术人员提前将第一映射关系配置到第一设备上。
一种可能的设计中,第一映射关系是第一设备生成的。例如,第一设备是第一设备所在网络中的主节点或管理节点,负责为网络中各节点分配对应第二通信协议的地址信息,则可以在为第一设备分配对应第二通信协议的地址信息后,生成第一映射关系并保存。
一种可能的设计中,第一映射关系是来自第二设备的,例如是第二设备发送给第一设 备的。例如,第二设备是第一设备所在网络中的主节点或管理节点,负责为网络中各节点分配对应第二通信协议的地址信息,则第二设备可以在为第一设备分配对应第二通信协议的地址信息后,生成第一映射关系并发送给第一设备。
通过以上三种设计中的任一设计,可以实现第一设备获得第一映射关系,为第一信息与第二信息之间的转换提供支持,可以进一步提高数据传输的可靠性。
一种可能的设计中,第一数据报文中还包含第一服务质量(Quality of Service,QoS)指示字段,第一QoS指示字段包括区分服务编码点(Differentiated Services Code Point,DSCP)或流类型(Traffic of Class);第一映射关系还用于指示第一QoS指示字段与第二QoS指示字段之间的映射关系;第二QoS指示字段包括流标识(Flow label)、业务类型(Type of service,ToS);第二数据报文中还包括第二QoS指示字段。换而言之,第一设备还可以基于第一映射关系将第一数据报文中携带的对应第一通信协议的QoS参数(即第一QoS指示字段)转换为对应第二通信协议的QoS参数(即第二QoS指示字段),并将其携带在第二数据报文中。
通过上述设计,可以实现QoS参数在不同协议之间的转换,为数据在传输过程中的QoS提供保障,可以进一步提高数据传输的可靠性。
一种可能的设计中,第一设备可以根据通信协议源地址、通信协议目的地址、通信协议源端口号、通信协议目的端口号、或第二QoS指示字段中的一个或多个,确定通往通信协议目的地址的下一跳节点的层2地址(Layer 2 Identifier,L2ID)、第一设备与下一跳节点之间的传输通道的传输通道标识(Transport channel Identifier,TCID);其中传输通道满足第二QoS指示字段对应的QoS需求;然后根据L2ID和TCID封装第二数据报文,生成第三数据报文;进而第一设备发送第三数据报文。
通过上述设计方式,可以实现将第二数据报文从第一设备转发至下一跳节点,且在转发时将第二数据报文承载在能够满足第二数据报文QoS需求的传输通道上传输,以保证数据传输的QoS,可以进一步提高通信的可靠性。
一种可能的设计中,第一设备可以根据第二映射关系确定通往通信协议目的地址的下一跳节点的L2ID、第一设备与下一跳节点之间的传输通道的TCID;其中,第二映射关系用于指示通信协议源地址、通信协议目的地址、通信协议源端口号、通信协议目的端口号、或第二QoS指示字段中的一个或多个与下一跳节点的L2ID、传输通道的TCID之间的映射关系。
通过上述设计方式,在已经有满足第二数据报文的QoS需求的传输通道的情况下,第一设备可以依据第二数据报文中携带的信息和第二映射关系从已有的传输通道中确定满足第二数据报文的QoS需求的传输通道,可以提高传输效率。
一种可能的设计中,第一设备可以根据通信协议源地址和/或通信协议目的地址确定通往通信协议目的地址的下一跳节点的L2ID;第一设备将第二QoS指示字段映射为第三QoS指示字段,根据通信协议目的端口号、第三QoS指示字段、下一跳节点的L2ID与下一跳节点建立传输通道,并生成传输通道的TCID。
通过上述设计方式,在没有满足第二数据报文的QoS需求的传输通道的情况下,第一设备可以建立满足第二数据报文的QoS需求的传输通道,进而实现对第二数据报文的承载,可以进一步提高数据传输的可靠性。
一种可能的设计中,在第一设备生成传输通道的TCID之后,第一设备还可以根据通信协议源地址、通信协议目的地址、通信协议源端口号、通信协议目的端口号、或第二QoS 指示字段中的一个或多个、以及下一跳节点的L2ID、传输通道的TCID生成第二映射关系。
通过上述设计方式,第一设备后续在传输具有相同或类似第二信息的数据报文时,就可以通过第二映射关系直接找到满足传输要求的下一跳节点的L2ID、传输通道的TCID,以免重复建立传输通道,可以节省系统资源,提高数据传输效率。
一种可能的设计中,第二通信协议为星闪联盟规范的短距离无线通信标准协议。
通过上述设计,可以实现星闪网络中的设备与星闪网络外的设备端到端通信。
一种可能的设计中,第一通信协议为IP协议。相应的,源网络地址、目的网络地址的类型为IP地址;源传输层端口号、目的传输层端口号的类型为TCP/UDP端口号。
通过上述设计,可以实现对IP数据报文进行端到端传输。
第二方面,提供一种数据传输方法,应用于第一设备,第一设备上部署有第二通信协议的协议栈,方法包括:第一设备将第一数据报文从协议栈的第一协议层传递至协议栈的第二协议层,第一数据报文中包含数据和第一信息,第一信息包括源网络地址、目的网络地址、源传输层端口号、目的传输层端口号,第一信息对应第一通信协议;第一设备在协议栈的第二协议层根据第一映射关系确定第二信息,第二信息对应第二通信协议,第二信息包括通信协议源地址、通信协议目的地址、通信协议源端口号、通信协议目的端口号,其中第一映射关系用于指示:源网络地址和通信协议源地址之间的映射关系、目的网络地址和通信协议目的地址之间的映射关系、源传输层端口号和通信协议源端口号之间的映射关系、目的传输层端口号和通信协议目的端口号之间的映射关系中的一个或多个;第一设备在协议栈的第二协议层生成第二数据报文,其中第二数据报文中包括数据、通信协议源地址、通信协议目的地址、通信协议源端口号、通信协议目的端口号中的一个或多个;第一设备在协议栈的第三协议层发送第二数据报文。
以第二通信协议为星闪联盟规范的短距离无线通信标准协议为例,第一协议层可以是星闪联盟规范的短距离无线通信标准协议的协议栈中的应用层,第二协议层可以是星闪联盟规范的短距离无线通信标准协议的协议栈中的网络层,第三协议层可以是星闪联盟规范的短距离无线通信标准协议的协议栈中的基础服务层。另外,星闪联盟规范的短距离无线通信标准协议的协议栈中还可以包括接入层,第一数据报文实际还可以经由接入层的处理,并经由接入层发送出去。
通过上述方案,可以在第二通信协议的协议栈(例如星闪协议栈)中实现第一通信协议的参数与第二通信协议的参数的转换,进而可以实现第一通信协议的数据报文在第二通信协议对应的网络中的承载,实现对第一通信协议的数据报文的端到端传输,可以提高数据传输的可靠性。
一种可能的设计中,第一映射关系是预先定义的。
一种可能的设计中,第一映射关系是第一设备在协议栈的第二协议层生成的。
一种可能的设计中,第一映射关系是来自第二设备的,例如是第二设备发送给第一设备的。
一种可能的设计中,第一数据报文中还包含第一服务质量QoS指示字段,第一QoS指示字段包括DSCP或Traffic of Class;第一映射关系还用于指示第一QoS指示字段与第二QoS指示字段之间的映射关系;第二QoS指示字段包括Flow label、ToS;第二数据报文中还包括第二QoS指示字段。
一种可能的设计中,第一设备可以在协议栈的第二协议层根据通信协议源地址、通信 协议目的地址、通信协议源端口号、通信协议目的端口号、或第二QoS指示字段中的一个或多个,确定通往通信协议目的地址的下一跳节点的层2地址L2ID、第一设备与下一跳节点之间的传输通道的传输通道标识TCID;其中传输通道满足第二QoS指示字段对应的QoS需求。进而,第一设备可以在协议栈的第三协议层根据L2ID和TCID封装第二数据报文,生成第三数据报文;第一设备在协议栈的第三协议层发送第三数据报文。
一种可能的设计中,第一设备可以在协议栈的第二协议层根据第二映射关系确定通往通信协议目的地址的下一跳节点的L2ID、第一设备与下一跳节点之间的传输通道的TCID;其中,第二映射关系用于指示通信协议源地址、通信协议目的地址、通信协议源端口号、通信协议目的端口号、或第二QoS指示字段中的一个或多个与下一跳节点的L2ID、传输通道的TCID之间的映射关系。
一种可能的设计中,第一设备可以在协议栈的第二协议层根据通信协议源地址和/或通信协议目的地址确定通往通信协议目的地址的下一跳节点的L2ID;第一设备在协议栈的第三协议层将第二QoS指示字段映射为第三QoS指示字段,根据通信协议目的端口号、第三QoS指示字段、下一跳节点的L2ID与下一跳节点建立传输通道,并生成传输通道的TCID;第一设备将TCID从协议栈的第三协议层传递至协议栈的第二协议层。
一种可能的设计中,第一设备还可以在协议栈的第二协议层根据通信协议源地址、通信协议目的地址、通信协议源端口号、通信协议目的端口号、或第二QoS指示字段中的一个或多个、以及下一跳节点的L2ID、传输通道的TCID生成第二映射关系。
一种可能的设计中,第二通信协议为星闪联盟规范的短距离无线通信标准协议。
一种可能的设计中,源网络地址、目的网络地址的类型为互联网协议IP地址;源传输层端口号、目的传输层端口号的类型为传输控制协议TCP/用户数据报协议UDP端口号。
上述第二方面各设计对应的有益效果可以参考第一方面对应设计的有益效果,此处不再赘述。
第三方面,提供一种数据传输方法,包括:第一设备获取数据报文,数据报文中包括数据、源地址、目的地址、源端口号、目的端口号、QoS指示字段中的一个或多个;第一设备根据源地址、目的地址、源端口号、目的端口号、或QoS指示字段中的一个或多个,确定通往目的地址的下一跳节点的层2地址L2ID、第一设备与下一跳节点之间的传输通道的TCID;其中传输通道满足QoS指示字段对应的QoS需求;第一设备根据L2ID和TCID封装数据报文,并发送封装后的数据报文。
通过上述方案,可以实现将数据报文从第一设备转发至下一跳节点,且在转发时将数据报文承载在能够满足数据报文QoS需求的传输通道上传输,以保证数据传输的QoS,可以提高通信的可靠性。
可以理解的,本申请不限制源地址、目的地址、源端口号、目的端口号、QoS指示字段对应的通信协议。
一种可能的设计中,源地址、目的地址、源端口号、目的端口号、QoS指示字段对应的通信协议对应IP协议,例如,源地址和目的地址的类型为IP地址,源端口号和目的端口号的类型为TCP/UDP端口号,QoS参数为DSCP或Traffic of Class。
一种可能的设计中,源地址、目的地址、源端口号、目的端口号、QoS指示字段对应的通信协议对应星闪联盟规范的短距离无线通信标准协议,例如,源地址和目的地址的类型为星闪联盟规范的短距离无线通信标准协议地址,源端口号和目的端口号的类型为星闪 联盟规范的短距离无线通信标准协议端口号,QoS参数为星闪联盟规范的短距离无线通信标准协议中的ToS。
当然,以上两种协议仅为示例,实际还可以有其它通信协议,本申请不做限制。
一种可能的设计中,第一设备可以根据第二映射关系确定通往目的地址的下一跳节点的L2ID、第一设备与下一跳节点之间的传输通道的TCID;其中,第二映射关系用于指示源地址、目的地址、源端口号、目的端口号、或QoS指示字段中的一个或多个与下一跳节点的L2ID、传输通道的TCID之间的映射关系。
通过上述设计方式,在已经有满足数据报文的QoS需求的传输通道的情况下,第一设备可以依据数据报文中携带的信息和第二映射关系从已有的传输通道中确定满足数据报文的QoS需求的传输通道,可以提高传输效率。
一种可能的设计中,第一设备可以根据源地址和/或目的地址确定通往目的地址的下一跳节点的L2ID;第一设备根据目的端口号、QoS指示字段、下一跳节点的L2ID与下一跳节点建立传输通道,并生成传输通道的TCID。
通过上述设计方式,在没有满足数据报文的QoS需求的传输通道的情况下,第一设备可以建立满足数据报文的QoS需求的传输通道,进而实现对数据报文的承载,可以进一步提高数据传输的可靠性。
一种可能的设计中,在第一设备生成传输通道的TCID之后,第一设备还可以根据源地址、目的地址、源端口号、目的端口号、或QoS指示字段中的一个或多个、以及下一跳节点的L2ID、传输通道的TCID生成第二映射关系。
通过上述设计方式,第一设备后续在传输具有相同QoS需求、目的地址、和/或目的端口号等的数据报文时,就可以通过第二映射关系直接找到满足传输要求的下一跳节点的L2ID、传输通道的TCID,以免重复建立传输通道,可以节省系统资源,提高数据传输效率。
一种可能的设计中,源地址和目的地址的类型为IP地址。
当目的地址为下一跳节点的地址(即传输路由为单跳路由),封装后的数据报文中包括L2ID、TCID、源地址、目的地址,即可以不在数据报文中封装源地址对应的星闪联盟规范的短距离无线通信标准协议地址、目的地址对应的星闪联盟规范的短距离无线通信标准协议地址。如此,可以节省报头开销。
当目的地址不为下一跳节点的地址(即传输路由为多跳路由);封装后的数据报文中包括L2ID、TCID、源地址、目的地址、源地址对应的星闪联盟规范的短距离无线通信标准协议地址、目的地址对应的星闪联盟规范的短距离无线通信标准协议地址。如此,可以保证传输可靠性。
第四方面,提供一种数据传输装置,该装置为第一设备或第一设备中的芯片,该装置包括用于执行上述第一方面或第一方面任一种可能的设计中所述的方法的模块/单元/技术手段。
示例性的,该装置可以包括:
获取单元,用于获取第一数据报文,第一数据报文中包含数据和第一信息,第一信息包括源网络地址、目的网络地址、源传输层端口号、目的传输层端口号,第一信息对应第一通信协议;
处理单元,用于根据第一映射关系确定第二信息,第二信息对应第二通信协议,第二 信息包括通信协议源地址、通信协议目的地址、通信协议源端口号、通信协议目的端口号,其中第一映射关系用于指示:源网络地址和通信协议源地址之间的映射关系、目的网络地址和通信协议目的地址之间的映射关系、源传输层端口号和通信协议源端口号之间的映射关系、目的传输层端口号和通信协议目的端口号之间的映射关系中的一个或多个;生成第二数据报文,其中第二数据报文中包括数据、通信协议源地址、通信协议目的地址、通信协议源端口号、通信协议目的端口号中的一个或多个;
发送单元,用于发送第二数据报文。
一种可能的设计中,第一映射关系是预先定义的。
一种可能的设计中,第一映射关系是该装置生成的。
一种可能的设计中,第一映射关系是来自第二设备的,例如是第二设备发送给该装置的。
一种可能的设计中,第一数据报文中还包含第一QoS指示字段,第一QoS指示字段包括DSCP或Traffic of Class;第一映射关系还用于指示第一QoS指示字段与第二QoS指示字段之间的映射关系;第二QoS指示字段包括流标识Flow label、业务类型ToS;第二数据报文中还包括第二QoS指示字段。
一种可能的设计中,处理单元,用于根据通信协议源地址、通信协议目的地址、通信协议源端口号、通信协议目的端口号、或第二QoS指示字段中的一个或多个,确定通往通信协议目的地址的下一跳节点的层2地址L2ID、该装置与下一跳节点之间的传输通道的传输通道标识TCID;其中传输通道满足第二QoS指示字段对应的QoS需求;然后根据L2ID和TCID封装第二数据报文,生成第三数据报文;发送单元,用于发送第三数据报文。
一种可能的设计中,处理单元,用于可以根据第二映射关系确定通往通信协议目的地址的下一跳节点的L2ID、该装置与下一跳节点之间的传输通道的TCID;其中,第二映射关系用于指示通信协议源地址、通信协议目的地址、通信协议源端口号、通信协议目的端口号、或第二QoS指示字段中的一个或多个与下一跳节点的L2ID、传输通道的TCID之间的映射关系。
一种可能的设计中,处理单元,用于根据通信协议源地址和/或通信协议目的地址确定通往通信协议目的地址的下一跳节点的L2ID;将第二QoS指示字段映射为第三QoS指示字段,根据通信协议目的端口号、第三QoS指示字段、下一跳节点的L2ID与下一跳节点建立传输通道,并生成传输通道的TCID。
一种可能的设计中,处理单元,还用于:在生成传输通道的TCID之后,根据通信协议源地址、通信协议目的地址、通信协议源端口号、通信协议目的端口号、或第二QoS指示字段中的一个或多个、以及下一跳节点的L2ID、传输通道的TCID生成第二映射关系。
一种可能的设计中,第二通信协议为星闪联盟规范的短距离无线通信标准协议。
一种可能的设计中,源网络地址、目的网络地址的类型为互联网协议IP地址;源传输层端口号、目的传输层端口号的类型为TCP/UDP端口号。
第五方面,提供一种数据传输装置,该装置为第一设备或第一设备中的芯片,该装置包括用于执行上述第二方面或第二方面任一种可能的设计中所述的方法的模块/单元/技术手段。
示例性的,该装置可以包括:
第一协议层模块,用于将第一数据报文传递至第二协议层模块,第一数据报文中包含 数据和第一信息,第一信息包括源网络地址、目的网络地址、源传输层端口号、目的传输层端口号,第一信息对应第一通信协议;
第二协议层模块,用于根据第一映射关系确定第二信息,第二信息对应第二通信协议,第二信息包括通信协议源地址、通信协议目的地址、通信协议源端口号、通信协议目的端口号,其中第一映射关系用于指示:源网络地址和通信协议源地址之间的映射关系、目的网络地址和通信协议目的地址之间的映射关系、源传输层端口号和通信协议源端口号之间的映射关系、目的传输层端口号和通信协议目的端口号之间的映射关系中的一个或多个;生成第二数据报文,其中第二数据报文中包括数据、通信协议源地址、通信协议目的地址、通信协议源端口号、通信协议目的端口号中的一个或多个;
第三协议层模块,用于发送第二数据报文。
一种可能的设计中,第一映射关系是预先定义的。
一种可能的设计中,第一映射关系是第二协议层模块生成的。
一种可能的设计中,第一映射关系是来自第二设备的,例如是第二设备发送给该装置的。
一种可能的设计中,第一数据报文中还包含第一服务质量QoS指示字段,第一QoS指示字段包括DSCP或Traffic of Class;第一映射关系还用于指示第一QoS指示字段与第二QoS指示字段之间的映射关系;第二QoS指示字段包括Flow label、ToS;第二数据报文中还包括第二QoS指示字段。
一种可能的设计中,第二协议层模块,用于根据通信协议源地址、通信协议目的地址、通信协议源端口号、通信协议目的端口号、或第二QoS指示字段中的一个或多个,确定通往通信协议目的地址的下一跳节点的层2地址L2ID、该装置与下一跳节点之间的传输通道的传输通道标识TCID;其中传输通道满足第二QoS指示字段对应的QoS需求;第三协议层模块,用于根据L2ID和TCID封装第二数据报文,生成第三数据报文;第三协议层模块用于发送第三数据报文。
一种可能的设计中,第二协议层模块,用于根据第二映射关系确定通往通信协议目的地址的下一跳节点的L2ID、该装置与下一跳节点之间的传输通道的TCID;其中,第二映射关系用于指示通信协议源地址、通信协议目的地址、通信协议源端口号、通信协议目的端口号、或第二QoS指示字段中的一个或多个与下一跳节点的L2ID、传输通道的TCID之间的映射关系。
一种可能的设计中,第二协议层模块,用于根据通信协议源地址和/或通信协议目的地址确定通往通信协议目的地址的下一跳节点的L2ID;第三协议层模块,用于将第二QoS指示字段映射为第三QoS指示字段,根据通信协议目的端口号、第三QoS指示字段、下一跳节点的L2ID与下一跳节点建立传输通道,并生成传输通道的TCID;第三协议层模块,用于将TCID传递至第二协议层模块。
一种可能的设计中,第二协议层模块,还用于根据通信协议源地址、通信协议目的地址、通信协议源端口号、通信协议目的端口号、或第二QoS指示字段中的一个或多个、以及下一跳节点的L2ID、传输通道的TCID生成第二映射关系。
一种可能的设计中,第二通信协议为星闪联盟规范的短距离无线通信标准协议。
一种可能的设计中,源网络地址、目的网络地址的类型为互联网协议IP地址;源传输层端口号、目的传输层端口号的类型为传输控制协议TCP/用户数据报协议UDP端口号。
第六方面,提供一种数据传输装置,该装置为第一设备或第一设备中的芯片,该装置包括用于执行上述第三方面或第三方面任一种可能的设计中所述的方法的模块/单元/技术手段。
示例性的,该装置可以包括:
获取单元,用于获取数据报文,数据报文中包括数据、源地址、目的地址、源端口号、目的端口号、QoS指示字段中的一个或多个;
处理单元,用于根据源地址、目的地址、源端口号、目的端口号、或QoS指示字段中的一个或多个,确定通往目的地址的下一跳节点的层2地址L2ID、该装置与下一跳节点之间的传输通道的TCID;其中传输通道满足QoS指示字段对应的QoS需求;根据L2ID和TCID封装数据报文;
发送单元,用于发送封装后的数据报文。
一种可能的设计中,处理单元,用于根据第二映射关系确定通往目的地址的下一跳节点的L2ID、该装置与下一跳节点之间的传输通道的TCID;其中,第二映射关系用于指示源地址、目的地址、源端口号、目的端口号、或QoS指示字段中的一个或多个与下一跳节点的L2ID、传输通道的TCID之间的映射关系。
一种可能的设计中,处理单元,用于根据源地址和/或目的地址确定通往目的地址的下一跳节点的L2ID;根据目的端口号、QoS指示字段、下一跳节点的L2ID与下一跳节点建立传输通道,并生成传输通道的TCID。
一种可能的设计中,处理单元,还用于:在生成传输通道的TCID之后,根据源地址、目的地址、源端口号、目的端口号、或QoS指示字段中的一个或多个、以及下一跳节点的L2ID、传输通道的TCID生成第二映射关系。
一种可能的设计中,源地址和目的地址的类型为IP地址,源端口号和目的端口号的类型为TCP/UDP端口号,QoS参数为DSCP或Traffic of Class。
一种可能的设计中,源地址和目的地址的类型为星闪联盟规范的短距离无线通信标准协议地址,源端口号和目的端口号的类型为星闪联盟规范的短距离无线通信标准协议端口号,QoS参数为星闪联盟规范的短距离无线通信标准协议中的ToS。
一种可能的设计中,源地址和目的地址的类型为IP地址。
目的地址为下一跳节点的地址,封装后的数据报文中包括L2ID、TCID、源地址、目的地址;或者,
目的地址不为下一跳节点的地址;封装后的数据报文中包括L2ID、TCID、源地址、目的地址、源地址对应的星闪联盟规范的短距离无线通信标准协议地址、目的地址对应的星闪联盟规范的短距离无线通信标准协议地址。
第七方面,提供一种数据传输装置,包括:至少一个处理器和接口电路;接口电路用于接收来自装置之外的其它装置的信号并发送或接收至处理器或将来自处理器的信号发送给装置之外的其它装置,处理器通过逻辑电路或执行代码指令用于实现如第一方面或第一方面任一种设计中所述的方法,或者,用于实现如第二方面或第二方面任一种设计中所述的方法,或者,用于实现如第三方面或第三方面任一种设计中所述的方法。
第八方面,提供一种计算机可读存储介质,存储介质中存储有计算机程序或指令,当计算机程序或指令被通信装置执行时,实现如第一方面或第一方面任一种设计中所述的方法,或者,用于实现如第二方面或第二方面任一种设计中所述的方法,或者,用于实现如 第三方面或第三方面任一种设计中所述的方法。
第九方面,提供一种计算机程序产品,计算机程序产品中存储有指令,当其在计算机上运行时,使得计算机执行如第一方面或第一方面任一种设计中所述的方法,或者,执行如第二方面或第二方面任一种设计中所述的方法,或者,执行如第三方面或第三方面任一种设计中所述的方法。
附图说明
图1A~图1C为本申请实施例提供的应用场景示意图;
图2A~图2B为本申请实施例提供的通信系统的网络架构图;
图3为本申请实施例提供的一种数据传输方法的流程图;
图4为本申请实施例提供的另一种数据传输方法的流程图;
图5为本申请实施例提供的星闪协议的协议栈的示意图;
图6为星闪协议栈中相关功能单元的关系示意图;
图7A为单跳场景下内网设备接收外网设备发送的IP数据报文的示意图;
图7B为单跳场景下内网设备向外网设备发送IP数据报文的示意图;
图8A为多跳场景下内网设备接收外网设备发送的IP数据报文的示意图;
图8B为多跳场景下内网设备向外网设备发送IP数据报文的示意图;
图9为本申请实施例提供的另一种数据传输方法的流程图;
图10为本申请实施例提供的一种数据传输装置的结构示意图;
图11为本申请实施例提供的另一种数据传输装置的结构示意图;
图12为本申请实施例提供的另一种数据传输装置的结构示意图。
具体实施方式
参见图1A,为本申请实施例提供的一种场景示意图。在智能家居应用场景中,家居设备有手机、个人计算机(Personal Computer,PC)、大屏(如电视机)、打印机、空调、智能窗帘、智能门锁、智能灯、子路由器、热水器等。
家居设备可以基于短距离无线通信技术进行组网,本申请将之称为内网或私网。内网中的各个家居设备可以被分配短距离无线通信协议地址,并基于短距离无线通信协议地址在内网中相互通信。
家居设备通过网关和外网通信。网关例如是家庭网关(Home Gateway,HG)或具有网关功能的用户端设备(Customer Premise Equipment,CPE)等。外网设备发送的数据报文需经由网关转发至家居设备,家居设备发送的数据报文也需经由网关转发至外网。
一般的,外网设备可以基于IP地址传输数据报文。由于不同的IP应用对服务质量(Quality of Service,QoS)需求不同,则要求内网根据不同的IP应用QoS需求建立单跳路由(例如图1A所示的路由1)或多跳路由(例如图1A所示的路由2)。
然而,在智能家居应用场景中,有一些设备不支持IP地址,例如冰箱、智能窗帘、智能灯、智能门锁、空调、热水器等,无法基于IP地址对IP数据报文进行转发,导致无法支持外网设备与内网设备端到端通信。
例如,在图1A所示的场景中,路由2中的冰箱不支持IP地址,打印机和子路由器1 支持IP地址,当打印机需要向外网设备(如手机/PC)发送IP数据报文或者外网设备(如手机/PC)发送IP数据报文需要向打印机发送IP数据报文时,IP数据报文应当经由冰箱转发,但由于冰箱不支持IP地址,因此无法实现对IP数据报文的转发,导致打印机和外网中手机/PC的端到端通信失败。
参见图1B,为本申请实施例提供的另一种场景示意图,在智能电表无线集抄场景中,多个电表可以组成内网,业务服务器在外网,业务服务器收集电表的数据时,需要与内网中的电表交互数据报文,如果外网设备和内网设备分别支持不同协议的数据报文,则同样存在无法支持外网设备与内网设备端到端通信的问题。
参见图1C,为本申请实施例提供的另一种场景示意图,无线投屏应用场景中,具体例如车载投屏,手机需要经由车载设备与耳机传输数据,或者具体例如家庭影院场景,手机需要经由大屏设备(如电视)与音响传输数据,这些场景下,如果不同设备分别支持不同协议的数据报文,则同样存在无法支持端到端通信的问题。
可以理解的是,图1A~图1C所示的几种场景仅为示例,实际还可以有其它应用场景。
诸如上述图1A~图1C所示的场景,由于不同设备(如内网设备与外网设备)支持不同通信协议对应的地址,导致设备与设备之间数据报文无法承载和传输,进而导致设备与设备之间无法进行端对端通信的问题。
鉴于此,本申请实施例提供一种数据传输方案,用于在不同设备支持不同通信协议对应的地址的场景下,实现设备与设备端对端通信。
本申请实施例可以应用于各种无线通信场景,尤其是短距离无线通信场景,例如包括但不限于是智能车、智能运输、智能终端、智能家居和智能制造等场景。其中,短距离无线通信技术,可以包括传统的短距离无线通信技术,例如蓝牙(Bluetooth)技术、蓝牙低能耗(Bluetooth Low Energy,BLE)技术、无线保真(Wireless Fidelity,Wi-Fi)技术、近场通讯(Near Field Communication,NFC)技术、超宽带(Ultra Wide Band,UWB)技术、通用短距通信技术等,也可以包括正在演进的通信技术或者未来可能出现的其他通信技术,例如星闪联盟规范的短距离无线通信技术(简称星闪(SparkLink)技术),星闪技术包括星闪基础接入(SparkLink Basic,SLB)技术、星闪低功耗接入(SparkLink Basic,SLE)技术等,本申请不做限制。
示例性的,参见图2A,为本申请实施例提供的一种通信系统的网络架构图,该系统中,设备A和设备B进行端到端的通信,其中设备A位于外网,设备B位于内网,网关连通内网和外网,外网中的设备支持第一通信协议,内网终端的所有设备支持第二通信协议,部分设备(如设备B)支持第一通信协议,因此设备A和设备B的端到端通信也可以称为基于第一通信协议的端到端通信(如IP端到端通信)。在图2A所示的网络架构中,网关与设备B之间没有中间节点,即为单跳路由。当然,设备A与网关之间还可以有其它节点,本申请不做限制。
示例性的,参见图2B,为本申请实施例提供的另一种通信系统的网络架构图。该系统中,设备A和设备B进行端到端的通信,其中设备A位于外网,设备B位于内网,网关连通内网和外网,外网中的设备支持第一通信协议,内网终端的所有设备支持第二通信协议,部分设备(如设备B)支持第一通信协议。与图2A不同的是,图2B所示场景中,网关与设备B之间不能直接通信,还需要经过其它节点,即为多跳路由。中间节点1和/或中间节点2支持第二通信协议,可以不支持第一通信协议。
可以理解的,以上仅为示例,实际应用中,网关与设备B之间可以有更少或更多的中间节点,本申请不做限制。
参见图3,为本申请实施例提供的一种数据传输方法,该方法包括:
S301、第一设备获取第一数据报文,第一数据报文中包含数据和第一信息,第一信息包括源网络地址、目的网络地址、源传输层端口号、目的传输层端口号,第一信息对应第一通信协议。
第一设备可以第一数据报文的源端设备(即源网络地址对应的设备),也可以是第一数据报文的源端设备和目的端设备(即目的网络地址对应的设备)之间的中间设备。换而言之,第一设备需要对第一数据报文进行发送或转发。以图2A或图2B所示的场景为例,当第一数据报文是设备A发送给设备B的报文时,第一设备可以是网关,第一数据报文是设备B发送给设备A的报文时,第一设备可以是设备B。
当第一设备为源端设备时,第一设备获取第一数据报文的方式可以是生成第一数据报文;当第一设备为中间设备时,第一设备获取第一数据报文的方式可以是从源端设备或中间设备接收第一数据报文。
一般的,数据报文中除了数据之外,会携带用于路由寻址的地址信息,例如源地址、目的地址、源端口号、目的端口号等,这些地址信息一般承载在数据报文的报头。在不同的通信协议中,地址信息的表达形式可以不同。例如,本申请实施例中的源网络地址、目的网络地址、源传输层端口号、目的传输层端口号分别为源地址、目的地址、源端口号、目的端口号在第一通信协议中对应的表达形式。
示例性的,第一通信协议是IP协议时,源网络地址、目的网络地址、源传输层端口号、目的传输层端口号可以分别是源IP地址、目的IP地址、源传输控制协议(Transmission Control Protocol,TCP)/用户数据报协议(User Datagram Protocol,UDP)端口号、目的TCP/UDP端口号。
可以理解的,此处IP协议仅为示例,在实际应用中,第一通信协议还可以是其它协议,本申请不做限制。
S302、第一设备根据第一映射关系确定第二信息,第二信息对应第二通信协议,第二信息包括通信协议源地址、通信协议目的地址、通信协议源端口号、通信协议目的端口号。
可以理解的,源网络地址、目的网络地址、源传输层端口号、目的传输层端口号分别为数据报文的源地址、目的地址、源端口号、目的端口号在第二通信协议中对应的表达形式。例如:第二通信协议为短距离无线通信协议,具体例如是星协议,则通信协议源地址、通信协议目的地址、通信协议源端口号、通信协议目的端口号分别为星闪源地址、星闪目的地址、星闪源端口号、星闪目的端口号。可以理解的,本申请为阐述方便,主要以星闪协议仅为示例,实际第二通信协议还可以是其它协议,本申请不做限制。
为了便于描述,后文中,第一通信协议主要以IP协议为例,第二通信协议主要以星闪协议为例。另外,为了便于描述,本申请实施例中IP协议对应的地址可以称为IP地址,IP协议对应的端口可以称为IP端口,星闪协议对应的地址,可以称为星闪地址或星闪域地址(可以用SLNA表示),星闪协议对应的端口可以称为星闪端口或星闪域端口。
由于第一信息与第二信息是同一信息在不同通信协议下的不同表达形式,因此第一信息中的各项信息和第二信息中的各项信息存在映射关系。
在本申请实施例中,具体通过第一映射关系指示第一信息中的各项信息和第二信息中 的各项信息的映射关系,例如第一映射关系包括但不限于是:源网络地址和通信协议源地址之间的映射关系、目的网络地址和通信协议目的地址之间的映射关系、源传输层端口号和通信协议源端口号之间的映射关系、目的传输层端口号和通信协议目的端口号之间的映射关系中的一个或多个。
在本申请实施例中,第一映射关系可以有多种实现方式,例如,表1为第一映射关系的一种可能的示例。
表1
Figure PCTCN2022103759-appb-000001
在具体是实现时,一个表格中可以存储多组映射关系,分别对应不同的<源网络地址、目的网络地址、源传输层端口号、目的传输层端口号、通信协议源地址、通信协议目的地址、通信协议源端口号、通信协议目的端口号>组合,第一映射关系为其中一组映射关系,例如表2所示。
表2
Figure PCTCN2022103759-appb-000002
相应的,第一设备可以通查表(如表1或表2)确定第一映射关系,例如第一数据报文中携带的IP SA1、IP DA1、IP S-port1、IP D-port2,则第一设备通过查表,可以确定与IP SA1、IP DA1、IP S-port1、IP D-port2对应的SLNA SA1、SLNA DA1、SLNA S-port1、SLNA D-port2。
可以理解的,上述表1、表2用于基于IP参数查找星闪参数或基于星闪参数查找IP参数,因此表1、表2可以称为参数映射表或地址转换表等。当然,此处仅为举例,实际还可以有其它名称。
S303、第一设备生成第二数据报文,其中第二数据报文中包括数据、通信协议源地址、通信协议目的地址、通信协议源端口号、通信协议目的端口号中的一个或多个。一种设计中,第二数据报文包含上述数据、通信协议源地址、通信协议目的地址、通信协议源端口号以及通信协议目的端口号。
示例性的,第一设备可以在第一数据报文的报头中封装通信协议源地址、通信协议目的地址、通信协议源端口号、通信协议目的端口号,得到第二数据报文。
需要说明的是,当目的端设备(即目的网络地址对应的设备)支持第二通信协议时,通信协议目的地址是目的端设备的通信协议地址。当目的端设备(即目的网络地址对应的设备)不支持第二通信协议时,通信协议目的地址可以是通往目的端设备的支持第二通信协议的节点(如网关)的通信协议地址。
类似的,当源端设备(即源网络地址对应的设备)支持第二通信协议时,通信协议源地址可以是源端设备的通信协议地址。当源端设备(即源网络地址对应的设备)不支持第二通信协议时,通信协议源地址可以是通往目的端设备的支持第二通信协议的节点(如网关)的通信协议地址。
以图2B所示的场景为例,且以第二通信协议为星闪协议、第一通信协议以IP协议为例:内网为基于星闪协议组成的网络,因此可以称为一个星闪域。星闪域中的管理节点(M节点)可向星闪域内的节点分配SLNA和/或服务地址(含IP地址),M节点上会维护一个地址映射表项<L2ID,SLNA/服务地址>;星闪域中的地址解析节点(Address Resolver)(简称A节点)可从M节点同步地址映射表项,或者通过节点地址注册机制向A节点注册已被分配的SLNA或/和服务地址;A节点负责非星闪地址与星闪地址的转换功能,该虚拟功能可实现在星闪网络边缘路由器或网关设备上。
当星闪域内设备B向外网设备A发送IP数据报文(第一数据报文)时,则目的网络地址为外网的公网IP地址,源网络地址为设备B的公网/私网IP地址;设备B可以向节点A查询目的地址为设备A的公网/私网IP地址对应的星闪地址为网关(CPE)的SLNA,节点B可以封装<CPE-SLNA,B-SLNA,A-IP,B-IP>;网关收到携带<CPE-SLNA,B-SLNA,A-ip,B-IP>的星闪数据报文(第二数据报文)后,命中CPE-SLNA,解析IP报头地址;若B-IP是私网IP,则将B-IP转换为CPE公网IP进行转发;若B-IP是公网IP,则直接转发。
相反,当外网设备A向内网设备B发送IP数据报文(第一数据报文)时,IP目的地址为星闪域内设备B的公网IP地址,源IP地址为外网设备A的公网IP地址;网关(第一设备)收到这个IP数据报文(第一数据报文)后,查看到目的网络地址为星闪域内设备B的IP地址,则通过地址转换查到设备B的星闪地址B-SLNA,则封装目的SLNA地址为B-SLNA,封装源SLNA地址为CPE-SLNA,则封装报文格式为<B-SLNA,CPE-SLNA,B-IP,A-IP>。
对于端口号的转换也可以采用类似的方法,此处不再赘述。
可以理解的,本文为了方面描述,将封装有星闪协议相关信息(如星闪源地址、星闪目的地址、星闪源端口号、星闪目的端口号、和/或星闪QoS参数)的数据报文称为星闪数据报文,实际还可以有其它名称。例如,当数据报文中即携带IP地址由携带星闪地址,则该数据报文也可以认为是IP数据报文。
S304、第一设备发送第二数据报文。
由于第二数据报文中携带的地址信息(如通信协议源地址、通信协议目的地址、通信协议源端口号、通信协议目的端口号等)是第二通信协议对应的地址信息,因此第一设备在发送第二数据报文后,接收到第二数据报文的设备可以基于第二通信协议对应的地址信息对第二数据报文进行寻址转发,以将第二数据报文中承载的数据传输至目的网络地址对应的设备,最终实现源网络地址对应的设备与目的网络地址对应的设备端到端通信,提高 了数据传输的可靠性。
以图2B所示的场景为例,第一设备为网关,目的网络地址为设备B的网络地址,中间节点1和中间节点2支持星闪协议且不支持IP协议,设备B支持IP协议和星闪协议,第一数据报文是来自设备A的IP数据报文(携带源IP地址、目的IP地址、源TCP/UDP端口号、目的TCP/UDP端口号),则网关收到该IP数据报文之后,根据第一映射关系,可以将其转换为星闪数据报文(即携带星闪源地址、星闪目的地址、星闪源端口号、星闪目的端口号的数据报文),进而中间节点1和中间节点2收到星闪数据报文之后,可以根据星闪数据报文中携带的地址信息(即星闪源地址、星闪目的地址、星闪源端口号、星闪目的端口号)对星闪数据报文进行转发,最终可以将星闪数据报文转发至设备B,进而实现设备A与设备B端到端通信。
可选的,第一数据报文中源网络地址、目的网络地址、源传输层端口号、和/或目的传输层端口号等,可以保留在第二数据报文中。以图2B所示的场景为例,当设备B向设备A发送IP数报文时,由于设备A不支持星闪地址,因此设备B(第一设备)在生成发往设备A的IP数据报文之后,可以确定出网关的星闪地址,将其作为星闪目的地址,使得内网(即基于星闪协议组建的网络)可以依据星闪目的地址将报文路由至网关,同时报文中保留设备B的IP地址(即目的IP地址),网关可以依据目的IP地址将报文路由至设备A。
一种可能的设计中,第一映射关系是预先定义的;或者,第一映射关系是第一设备生成的;或者,第一映射关系是来自第二设备的,例如是第二设备发送给第一设备的,本申请不做限制。
在具体实施时,内网(即基于第二通信协议组建的网络)初始化时,需要有承担管理(Manager)角色的管理节点(M节点),它被注入可分配的地址类型及地址空间。M节点承担整个内网的地址分配的工作。考虑网络管理的可靠性,网络中可以还存在备份的一个或者多个M节点。内网中还需要地址解析(Address Resolver)节点(可以简称A节点),提供非星闪地址(如IP地址)与星闪网络地址的映射查询功能。基于非星闪地址通信的双方,可以从A节点查询到彼此的星闪网络地址,构建基于星闪网络地址的星闪数据报文,并通过星闪网络地址进行寻址转发。
内网中,位于一定范围内的多个节点可以组成一个通信域。内网可以包括一个或多个通信域,不同通信域之间可以存在交集节点(即同一个节点可以同时位于多个不同的通信域中),每个通信域中包括一个主节点(或者称为G节点)和至少一个从节点(或者称为T节点),应注意,同一个节点在不同的通信域中的角色可以不同,例如同一个节点可以在一个通信域中为G节点且在另一个通信域中为T节点。
在通信时,G节点可以作为地址分配服务器,T节点向G节点请求分配星闪地址和IP地址。G节点在分配地址的过程中,可以建立星闪地址和IP地址的映射表(例如<层2地址(Layer 2 Identifier,L2ID),SLNA地址,IP地址>,记录每个节点(其中每个节点可以通过其对应的L2ID唯一标识)和其对应的SLNA地址和IP地址),G节点将映射表中的信息与网络中的A节点同步(或已被分配地址的节点向A节点注册已被分配的地址信息,即A节点建立<L2ID,SLNA,IP地址>的映射表),一个L2ID对应多个SLNA和/或多个IP地址,即可以有多个表项。
因此,当第一设备为G节点时,第一映射关系可以是第一设备自身生成;当第一节点 为A节点时,第一映射关系可以是第一节点生成,或者由G节点发送给第一设备;当第一节点为T节点时,第一映射关系可以是G节点或A节点发送给T节点。当然,除此之外,还可以有其它实现方式,例如技术人员预先定义好第一映射关系,然后在网络中各个节点中保存第一映射关系,本申请不做限制。
如此,可以实现第一设备获得第一映射关系,为第一信息与第二信息之间的转换提供支持,可以进一步提高数据传输的可靠性。
一种可能的设计中,第一数据报文中还包含第一QoS指示字段(例如第一信息还包含第一QoS指示字段);第一映射关系还用于指示第一QoS指示字段与第二QoS指示字段之间的映射关系;第二数据报文中还包括第二QoS指示字段(例如第二信息还包含第一QoS指示字段)。
其中,第一QoS指示字段为QoS参数在第一通信协议中对应的表达形式,例如第一通信协议为IP协议时,第一QoS指示字段可以包括区分服务编码点(Differentiated Services Code Point,DSCP)或流类型(Traffic of Class),其中,DSCP为互联网协议第4版(IPv4)中定义的QoS参数,该字段最初定义为服务类型(ToS),用于指定差异化服务(DiffServ),Traffic of Class为互联网协议第6版(IPv6)中定义的QoS参数,保留差分服务字段(DS字段)中的高6位,用于对数据包进行分类。DS字段中的其余两位用于显式拥塞通知(ECN)。
第二QoS指示字段为QoS参数在第二通信协议中对应的表达形式,例如第二通信协议为星闪协议时,第二QoS指示字段可以包括流标识(Flow label)、业务类型(Type of service,ToS),其中Flow label用于指示某个APP产生的流量,或者某类QoS要求的流量,由源节点分配,保证本地唯一性。
通过上述设计,可以实现QoS参数在不同协议之间的转换,为数据在传输过程中的QoS提供保障,可以进一步提高数据传输的可靠性。
一种可能的设计中,第一设备还根据通信协议源地址、通信协议目的地址、通信协议源端口号、通信协议目的端口号、或第二QoS指示字段中的一个或多个,确定通往通信协议目的地址的下一跳节点的L2ID、第一设备与下一跳节点之间的传输通道的传输通道标识(Transport channel Identifier,TCID);其中传输通道满足第二QoS指示字段对应的QoS需求;第一设备根据L2ID和TCID封装第二数据报文,生成第三数据报文;第一设备发送第三数据报文。
可以理解的,第一设备在将第二数据报文发送给通信协议目的地址对应的设备时,需要根据通信协议源地址和/或通信协议目的地址进行寻址,确定通往通信协议目的地址的下一跳节点的L2ID,以将第二数据报文转发给下一跳节点。若下一跳节点对应通信协议目的地址,则报文转发完成,若下一跳节点不对应通信协议目的地址,则下一跳节点可以继续根据源地址和/或通信协议目的地址寻址,继续寻找下一节点转发,以此循环,直至第二数据报文到达通信协议目的地址对应的设备为止。
可选的,当第一设备通往通信协议目的地址的下一跳节点有多个(或者说路由路径有多条)时,可以随机选择其中一个下一跳节点进行报文转发,或者是根据路径QoS最优原则选择一个下一跳节点进行报文转发等,本申请不做限制。
进一步的,由于不同的数据报文可以对应不同的QoS需求(例如传输带宽、时延、丢包率等),为满足不同的QoS需求,相邻两个节点之间可以建立多条传输通道,不同传输通道可以对应不同的QoS(例如分配不同的传输资源,如时频资源),这样,节点在发送 数据报文时,可以将数据报文承载在可以满足该数据报文的QoS需求的传输通道上。因此,第一设备除了确定下一跳节点之外,还需要确定第一设备与下一跳节点之间的传输通道。
节点与节点建立传输通道时,可以基于QoS信息、端口号以及L2ID等建立传输通道。因此第一设备在将第二数据报文发送给下一跳节点时,可以根据通信协议目的端口号、第二QoS指示字段、下一跳节点的L2ID,确定满足第二QoS指示字段对应的QoS需求的传输通道的TCID。
在具体实现时,第一设备确定通往通信协议目的地址的下一跳节点的L2ID、第一设备与下一跳节点之间的传输通道的TCID的方式有多种,以下列举两种可能的方式。
方式1、第一设备根据第二映射关系确定通往通信协议目的地址的下一跳节点的L2ID、第一设备与下一跳节点之间的传输通道的TCID;其中,第二映射关系用于指示通信协议源地址、通信协议目的地址、通信协议源端口号、通信协议目的端口号、或第二QoS指示字段中的一个或多个与下一跳节点的L2ID、传输通道的TCID之间的映射关系。
可以理解的,方式1中是网络中已经有满足第二数据报文的QoS需求的传输通道的情况下,第一设备可以依据第二数据报文中携带的信息从已有的传输通道中确定满足第二数据报文的QoS需求的传输通道。
在本申请实施例中,第二映射关系可以有多种实现方式,例如,表3为第二映射关系的一种可能的示例:
表3
Figure PCTCN2022103759-appb-000003
类似的,在具体是实现时,一个表格中可以存储多组映射关系,对应不同的<通信协议源地址、通信协议目的地址、通信协议源端口号、通信协议目的端口号、第二QoS指示字段、L2ID、TCID>组合,第二映射关系为其中一组映射关系。
当第一设备获得第二数据报文之后,可以依据第二数据报文中携带的信协议源地址、通信协议目的地址、通信协议源端口号、通信协议目的端口号、或第二QoS指示字段中的一个或多个从表3中查找到通往通信协议目的地址的下一跳节点的L2ID、第一设备与下一跳节点之间的传输通道的TCID。
可以理解的,在实际应用中,第二映射关系除了可以通过一个表格来表现之外,还可以通过为多个表格来表现,例如,表4和表5为第二映射关系的一种可能的示例:
表4
编号 通信协议源地址 通信协议目的地址 下一跳节点的L2ID
1 SLNA SA1 SLNA DA1 L2ID1
可以理解的,表4可以称为转发表,用于查找下一跳节点。当然,此处仅为举例,实际还可以有其它名称。
表5
Figure PCTCN2022103759-appb-000004
可以理解的,表5可以称为传输通道解析表或通道解析表,用于查找与下一跳节点之间的传输通道。当然,此处仅为举例,实际还可以有其它名称。
类似的,表3可以视为转发表和传输通道解析表的结合,例如可以称为转发表&传输通道解析表。当然,此处仅为举例,实际还可以有其它名称。
当第一设备获得第二数据报文之后,可以依据第二数据报文中携带的信协议源地址和/或通信协议目的地址从表4中查找到通往通信协议目的地址的下一跳节点的L2ID;再进一步依据下一跳节点的L2ID、通信协议源端口号、通信协议目的端口号、或第二QoS指示字段中的一个或多个从表5中查找到第一设备与下一跳节点之间的传输通道的TCID。
方式2、第一设备根据通信协议源地址和/或通信协议目的地址确定通往通信协议目的地址的下一跳节点的L2ID;第一设备将第二QoS指示字段映射为第三QoS指示字段,根据通信协议目的端口号、第三QoS指示字段、下一跳节点的L2ID与下一跳节点建立传输通道,并生成传输通道的TCID。
与方式1不同的是,方式2是在网络中没有满足第二数据报文的QoS需求的传输通道的情况下,第一设备可以建立满足第二数据报文的QoS需求的传输通道。
例如,第一设备在获得第二数据报文之后,通过查询已有的第二映射关系(如表3),没有找满足第二数据报文的QoS需求的传输通道,则启动传输通道的建立流程,生成传输通道的TCID。
以第二通信协议是星闪协议为例,第三QoS字段可以是星闪质量指示(Spark link quality index,SLQI),或者称为星闪服务质量索引,用于指示QoS等级和对应的QOS参数,例如默认优先级、时延、丢包率等。当然,实际应用中,第三QoS字段还可以替换为其它参数(例如QoS等级、优先级、时延、丢包率等中的一项或多项),或者第三QoS字段中的QoS参数还可以有进一步的增加,本申请不做限制。
可选的,在第一设备建立传输通道之后,第一设备还可以根据通信协议源地址、通信协议目的地址、通信协议源端口号、通信协议目的端口号、或第二QoS指示字段中的一个或多个、以及下一跳节点的L2ID、以及建立好的传输通道的TCID生成第二映射关系。这样,后续第一设备在传输具有相同第二信息的数据报文时,就可以通过第二映射关系直接 找到满足传输要求的下一跳节点的L2ID、传输通道的TCID,以免重复建立传输通道,可以节省系统资源,提高数据传输效率。
通过上述设计方式,可以实现将第二数据报文从第一设备转发至下一跳节点,且满足第二数据报文对传输路径的QoS需求,进一步提高了通信的可靠性。
一种可能的设计中,当第一设备的下一跳节点为目的网络地址对应的设备(即第一设备与目的网络地址对应的设备之间没有中间节点,例如图2A所示的场景中,第一设备为网关,目的网络地址对应的设备为设备B)时,第二数据报文中可以省去通信协议源地址、通信协议目的地址、通信协议源端口号、通信协议目的端口号和/或第二QoS指示字段等中的一项或多项,而是直接携带源网络地址、目的网络地址、源传输层端口号、和/或目的传输层端口号、和/或第一QoS指示字段等。如此,可以节省开销。
一种可能的设计中,第一设备在将对应第一通信协议的第一信息转换为对应第二通信协议的第二信息之前,还可以对其它通信协议对应的信息进行转换,进而得到第一信息。例如,第一信息中的源网络地址和目的网络地址均为私网IP地址,则第一设备还可以先将公网IP地址映射为私网IP地址;或者,第一信息中的源网络地址和目的网络地址均为公网IP地址,则第一设备还可以先将私网IP地址映射为公网IP地址进,等等。如此,可以提高方案的适用性。
以上是以第一设备的角度来描述本申请实施例提供的方法。以下,从第一设备的协议栈的角度,来对上述方案进行描述。
本申请实施例提供的第一设备上部署有第二通信协议的协议栈,第二通信协议的协议栈从上至下依次包括第一协议层、第二协议层、第三协议层和第四协议层。
第一协议层:可以部署若干应用程序(Application,APP)/业务实例,可用于为应用程序(也称为应用或用户)提供服务。
第二协议层:用于提供不同传输协议之间的信息转换功能(例如保存有第一映射关系和第二映射关系)。
第三协议层:用于在节点和节点之间建立传输通道,并提供端到端的信息传输服务。
第四协议层:可以为节点与节点之间的通信提供通信接口/手段,接入层可能包含多种不同的接入技术,不同的接入技术可能对应不同的通信接口,例如蜂窝接口,WIFI接口,星闪接口等。
应理解,上述协议层只是一种框架性的结构划分,不同的通信系统可以有各自的层划分方式,也可以有更具体和下位的层次划分,这里不做具体限定。
参见图4,为本申请实施例还提供的另一种数据传输方法的流程图,该方法可以应用于第一设备,第一设备上部署有第二通信协议的协议栈,方法包括:
S401、第一设备将第一数据报文从协议栈的第一协议层传递至协议栈的第二协议层,第一数据报文中包含数据、源网络地址、目的网络地址、源传输层端口号、目的传输层端口号,第一数据报文对应第一通信协议;
S402、第一设备在协议栈的第二协议层根据第一映射关系确定第二信息,第二信息对应第二通信协议,第二信息包括通信协议源地址、通信协议目的地址、通信协议源端口号、通信协议目的端口号,其中第一映射关系用于指示:源网络地址和通信协议源地址之间的映射关系、目的网络地址和通信协议目的地址之间的映射关系、源传输层端口号和通信协 议源端口号之间的映射关系、目的传输层端口号和通信协议目的端口号之间的映射关系中的一个或多个;
S403、第一设备在协议栈的第二协议层生成第二数据报文,其中第二数据报文中包括数据、通信协议源地址、通信协议目的地址、通信协议源端口号、通信协议目的端口号中的一个或多个;
S404、第一设备在协议栈的第三协议层发送第二数据报文。
可以理解的,第二数据报文实际还可以经由第四协议层的处理,并经由第四协议层提供的通信接口发送出去。
进一步的,如果第一信息中还携带第一协议层的QoS参数,如上文所述的第一QoS指示字段,则一设备在协议栈的第二协议层还将第一QoS指示字段转换为第二协议层的QoS参数,如上文所述的第二QoS字段,第二数据报文中还包括第二QoS指示字段(例如第二信息还包含第一QoS指示字段)。
进一步的,第一设备还可以在协议栈的第二协议层根据通信协议源地址、通信协议目的地址、通信协议源端口号、通信协议目的端口号、或第二QoS指示字段中的一个或多个,确定通往通信协议目的地址的下一跳节点的L2ID、第一设备与下一跳节点之间的传输通道的传输通道标识TCID;其中传输通道满足第二QoS指示字段对应的QoS需求。相应的,第一设备在协议栈的第三协议层发送第二数据报文,包括:第一设备在协议栈的第三协议层根据L2ID和TCID封装第二数据报文(例如在第二数据报文的报头添加L2ID和TCID),生成第三数据报文,进而第一设备在协议栈的第三协议层发送第三数据报文。
类似的,对应上文方式1,网络中已经有满足第二数据报文的QoS需求的传输通道的情况下,第二协议层存储有第二映射关系,则第一设备在协议栈的第二协议层可以根据第二映射关系确定通往通信协议目的地址的下一跳节点的L2ID、第一设备与下一跳节点之间的传输通道的TCID。
类似的,对应上文方式2,网络中没有满足第二数据报文的QoS需求的传输通道的情况下,第一设备可以在协议栈的第二协议层根据通信协议源地址和/或通信协议目的地址确定通往通信协议目的地址的下一跳节点的L2ID;然后,第一设备在协议栈的第三协议层将第二QoS指示字段映射为第三QoS指示字段(如SLQI),根据通信协议目的端口号、第三QoS指示字段、下一跳节点的L2ID与下一跳节点建立传输通道,并生成传输通道的TCID,进而第一设备可以在协议栈的第三协议层根据L2ID和TCID封装第二数据报文。
进一步的,第三协议层还可以将生成传输通道的TCID反馈给第二协议层,进而第一设备可以在协议栈的第二协议层根据通信协议源地址、通信协议目的地址、通信协议源端口号、通信协议目的端口号、或第二QoS指示字段中的一个或多个、以及下一跳节点的L2ID、传输通道的TCID生成第二映射关系,以供下次传输数据报文时使用。
为了便于理解,下面以第二通信协议为星闪协议为例,对上述方案进行更加详细的说明。
参见图5,本申请实施例提供的星闪协议的协议栈的示意图。从上至下依次包括:
1、应用层(对应第一协议层):位于网络层之上,可以部署若干APP/业务实例,可用于为应用程序(也称为应用或用户)提供服务。可选的,应用层还可用于为TCP/UDP、IPv4/IPv6等协议提供支持。
2、网络层(对应第二协议层):位于基础服务层之上,用于提供不同传输协议之间的 信息转换功能(例如对应第一通信协议的第一信息与对应第二通信协议的第二信息之间转换)。比如,可以提供IP适配功能单元,IP适配功能单元是一个逻辑上的功能实体,用于将IP协议的相关信息(如IP地址信息)与星闪协议的相关信息(如星闪地址)进行转换。具体可以通过维护第一映射关系、第二映射关系来提供不同传输协议之间的信息转换功能。
3、基础服务层(对应第三协议层):位于接入层之上,用于在节点和节点之间建立传输通道,并提供端到端的信息传输服务。
示例性的,基础服务层可以提供QoS管理功能单元、连接管理单元、设备发现功能单元、服务发现功能单元、安全管理功能单元、测量管理功能单元等控制面的功能单元。
1)QoS管理功能单元:QoS管理功能单元是一个逻辑上的功能实体,用于根据业务传输需求以及网络状况等因素确定星闪无线通信系统需要提供的业务质量,确保星闪无线通信系统的传输能力与业务需求相匹配。
例如,QoS管理功能单元可以负责QoS参数的协商与确定。当发送端的应用层有业务数据需要传输时,将业务类型、星闪端口号、业务关联的QoS参数(Flow Label,ToS)等信息递交给QoS管理功能单元,发送端QoS管理功能单元基于接收到的参数与对端QoS管理功能单元进行传输所需的QoS参数协商,确定SLQI。
2)连接管理功能单元:是一个逻辑上的功能实体,支持包括传输通道建立、更新和删除,业务端口与传输通道的映射关系维护,传输通道与接入层逻辑信道的映射关系维护等功能。例如,连接管理功能单元可以按照QoS管理功能单元协商后的QoS参数,启动传输通道的建立或更新,并将建立或更新好的传输通道的信息(如TCID)反馈给网络层(如IP适配功能单元)存储维护。
3)设备发现功能单元:是一个逻辑上的功能实体,用于公开自身存在或发现周边设备。
4)服务管理功能单元:是一个逻辑上的功能实体,用于设备内部的服务管理及维护,以及设备之间的服务发现。
5)测量管理功能单元:测量管理功能单元支持包括触发接入层测量物理层信号质量,光里面向已有传输通道性能的测量,为设备内部的其他功能单元(例如QoS管理功能单元、5G融合功能单元等)或授权应用提供统一的测量服务接口。允许相应功能单元向测量管理功能单元提供期望测量的配置信息并对测量结果进行查询。
可以理解的,以上几种控制面的功能单元仅为示例而非限定,实际还可以有其它功能单元。
基础服务层除了可以提供控制面的相关功能之外,另外还可以提供数据面(或者称用户面)的功能。例如,通过查询网络层IP适配功能单元维护的第一映射关系、第二映射关系,将数据报文映射到对应传输通道上传输。
4、接入层(对应第四协议层):可以为节点与节点之间的通信提供通信接口/手段,接入层可能包含多种不同的接入技术,不同的接入技术可能对应不同的通信接口,例如SLB空口,SLE空口等。
应理解,上述协议层只是一种框架性的结构划分,不同的通信系统可以有各自的层划分方式,也可以有更具体和下位的层次划分,这里不做具体限定。例如,上述网络层的功能模块也可以集成在基础服务层中,进而省去网络层(即基础服务层之上为应用层)。另外,各协议层的名称仅为示例,在实际应用中还可以取其它名字,只要协议层的功能和本 申请实施例中协议层的功能相同或类似,则可以认为是本申请实施例中的协议层。
在本申请实施例中,不同的协议层维护不同的传输参数,其中第一映射关系和第二映射关系中的参数可以具体可以在网络层进行存储和维护。
以下,通过表格的形式对各协议层维护的参数进行举例:
一、应用层维护的表项(面向应用实例):
表6
Figure PCTCN2022103759-appb-000005
其中,AID为应用标识(Application Identifier),上述表项中是以AID为视频投频为例,实际不限于此。
二、网络层(IP适配管理单元)维护的表项(第一映射关系、第二映射关系):
表7
Figure PCTCN2022103759-appb-000006
最大传输单元(Maximum transmission unit,MTU):是基础服务层数据传输的最大传输单元。MTU的大小需要考虑本层缓存(Buffer)的最大值。应用层的数据包不能超过MTU的大小。
最大载荷大小(Maximum Payload Size,MPS):是接入层能够传输的最大传输单元, 基础服务层需要将SUD切分为多个PDU,每个PDU的大小不能超过MPS的大小。
上层协议指示(Protocol Identifier,PI):用于指示协议类型。
三、基础服务层维护的表项(面向传输通道):
表8
Figure PCTCN2022103759-appb-000007
四、接入层维护的表项(面向逻辑信道):
表9
Figure PCTCN2022103759-appb-000008
XQI:业务服务质量索引(Transaction Quality Index,XQI);LCID:逻辑信道标识(Logical Channel Identifier,LCID)。
参见图6,为星闪协议栈中相关功能单元的关系示意图。
IP适配功能单元:第一设备获得IP数据报文(即第一数据报文)后,可根据IP数据报文中携带的IP地址(包括源IP地址、目的IP地址)、TCP/UDP端口号(包括源TCP/UDP端口号、目的TCP/UDP端口号)、DSCP等参数,通过网络层的IP适配功能单元进行查表,实现IP地址到星闪地址的转换,以及TCP/UDP端口号到星闪端口号的转换、以及DSCP到Flow label、ToS的转换等。
QoS管理单元:负责QoS参数的协商与确定。当第一设备的应用层有业务数据需要传输时,将业务类型、星闪端口号、业务关联的QoS参数(如Flow Label,ToS)等信息递交给QoS管理功能单元,QoS管理功能单元基于接收到的参数与对端(如下一跳节点)QoS管理功能单元进行传输所需的QoS参数协商,确定SLQI。即应用QoS参数映射:< 源SLNA,目的SLNA,星闪域端口号,Flow label,ToS,AID>→<源SLNA,目的SLNA,星闪端口号,SLQI,AID>。
连接管理单元:按照QoS管理单元协商后的QoS参数,启动传输通道的建立或更新,建立满足QoS需求的传输通道。将建立好的传输通道的TCID反馈给IP适配功能单元存储维护。
IP适配功能单元:收到连接管理单元反馈的TCID后,更新网络层(IP适配管理单元)维护的表项,使得第一设备后续接收到IP数据报文后,可以直接本地查表转发,实现对数据报文的承载。
通过上述方案,可以在星闪协议栈中实现IP参数与星闪参数的转换,进而可以实现IP数据报文在星闪域内的承载,提高数据传输的可靠性。
为了更加清楚地理解本申请实施例提供的技术方案,以下再结合图2A所示单跳和图2B所示的多跳场景对数据报文的转发过程进行举例。
示例1、单跳场景
端设备(如设备A和设备B)均支持双协议地址(如IP地址、星闪地址)。
初始条件:设备B接入星闪网络后申请星闪网络地址SLNA。
示例性的,星闪网络中的T节点启动后,与G节点相互发现,建立管理连接,需要满足安全接入等要求。其中设备B可以是G节点,也可以是T节点,不做限制。其中,G节点有IP能力,且作为地址分配服务器,T节点需要向G请求分配SLNA地址。分配地址过程中,G节点可以建立<L2ID,SLNA>的映射表,一个L2ID可以有多个SLNA,即有多个表项。另外,G节点支持L2ID与SLNA地址之间的相互查询服务,任何T节点可以向G节点的地址服务查询地址信息。
参见图7A,为内网设备接收外网设备发送的IP数据报文的示意图。该示例中,对网关和星闪域内的设备(如设备B)需满足如下要求:
1、网关:
外网设备(设备A)→网关:设备A向网关发送公网IP数据报文(即图7A中所示的报文1);
网关将公网IP地址信息(例如公网IP地址、公网TCP/UDP端口号)转换为星闪地址信息(如SLNA、星闪端口号)。具体的,网关可以先将公网IP地址信息转换为私网IP地址信息(例如私网IP地址、私网TCP/UDP端口号),然后将私网IP地址信息映射到星闪地址信息。网关将SLNA流量导入星闪协议栈。
网关解析IP数据报文中的<IP地址、TCP/UDP端口号,DSCP>等信息,依据这些信息查询传输通道解析表,若存在对应的表项,则封装报文,生成并发送星闪数据报文(图7A中所示的报文2)。若不存在对应的表项,则发起QoS协商和传输通道建立,并生成对应的表项,然后基于新建的传输通道封装报文,生成并发送星闪数据报文;若传输通道建立失败,则丢弃报文。
可以理解的,由于此处是单跳场景,所以报文2的报头可以省去星闪地址(图7A所示的报文2的报头),实际应用中也可以将星闪地址封装在报文2中。
2、设备B:
配合G节点进行QoS协商和传输通道建立,生成相关传输通道解析表的表项;
收到星闪数据报文,根据星闪端口号,将IP数据报文(图7A所示的报文3)上送给IP协议栈/IP应用。
参见图7B,为内网设备向外网设备发送IP数据报文的示意图。该示例中,对网关和星闪域内的设备(如设备B)需满足如下要求:
1、设备B:
应用层生成私网IP数据报文(即图7B中所示的报文1),将私网IP数据报文传递给星闪协议栈,星闪协议栈从发送原语接口及私网IP数据报文头中获取<IP地址、TCP/UDP端口号,DSCP>等信息,查询传输通道解析表。若存在对应表项,则将IP数据报文封装星闪报文头,生成星闪数据报文(即图7B中所示的报文)并发送。若不存在对应表项,则需要根据<IP地址、TCP/UDP端口号,DSCP>等信息建立传输连接或者复用已有的传输连接。若建立传输连接成功,则对应的表项,并将IP数据报文封装星闪报文头,并发送;若建立传输连接失败,则丢弃报文。
2、网关:
收到星闪数据报文,上送到IP协议栈;
网关将星闪地址信息转换为公网IP地址信息,向外网发送IP数据报文(即图7B中所示的报文3)。
可以理解的,由于此处是单跳场景,所以报文2的报头可以省去星闪地址(图7B所示的报文2的报头没有),实际应用中也可以将星闪地址封装在报文2中。
通过上述示例1,可以实现公网IP应用数据与星闪域内端设备的端到端传输,实现IP数据在星闪域内的承载。星闪域内通过星闪地址信息进行路由寻址转发报文,可充分使用星闪地址长度短和支持灵活自定义特点,降低报文头开销,提高净荷比,提高传输效率。
示例2、多跳场景
端设备(如设备A和设备B)均支持双协议地址(如IP地址、星闪地址)。
初始条件:设备B接入星闪网络后申请星闪网络地址SLNA。
示例性的,星闪网络中的T节点启动后,与G节点相互发现,建立管理连接,需要满足安全接入等要求。其中设备B可以是G节点,也可以是T节点,不做限制。其中,G节点有IP能力,且作为地址分配服务器,T节点需要向G请求分配SLNA地址。分配地址过程中,G节点可以建立<L2ID,SLNA>的映射表,一个L2ID可以有多个SLNA,即有多个表项。另外,G节点支持L2ID与SLNA地址之间的相互查询服务,任何T节点可以向G节点的地址服务查询地址信息。
参见图8A,为内网设备接收外网设备发送的IP数据报文的示意图。该示例中,对网关和星闪域内的设备(如设备B)需满足如下要求:
1、网关:
外网设备(设备A)→网关:设备A向网关发送公网IP数据报文(即图8A中所示的报文1);
网关将公网IP地址信息(例如公网IP地址、公网TCP/UDP端口号)转换为星闪地址信息(如SLNA、星闪端口号)。具体的,网关可以先将公网IP地址信息转换为私网IP地址信息(例如私网IP地址、私网TCP/UDP端口号),然后将私网IP地址信息映射到星闪地址信息。网关将SLNA流量导入星闪协议栈。
网关解析IP数据报文中的<IP地址、TCP/UDP端口号,DSCP>等信息,依据这些信 息查询转发表、传输通道解析表等,若存在对应的表项,则封装报文,生成并发送星闪数据报文(图8A中所示的报文2)。若不存在对应的表项,则发起QoS协商和传输通道建立,并生成对应的表项,然后基于新建的传输通道封装报文,生成并发送星闪数据报文;若传输通道建立失败,则丢弃报文。
2、中间节点1、2:
收到来自设备A的星闪数据报文,将星闪数据报文做必要的封装(如添加LCID、TCID等,具体根据帧格式的需要确定),例如逐级查找替换下一跳节点的LCID、TCID等,最终将报文转发给设备B。
3、设备B:
配合G节点进行QoS协商和传输通道建立,生成相关表项;
收到星闪数据报文(如图8A所示的报文4),根据星闪端口号,将IP数据报文(如图8A所示的报文5)上送给IP协议栈/IP应用。
参见图8B,为内网设备接收外网IP数据报文的示意图。该示例中,对网关和星闪域内的设备(如设备B)需满足如下要求:
1、设备B:
应用层生成私网IP数据报文(即图8B中所示的报文1),将私网IP数据报文传递给星闪协议栈,星闪协议栈从发送原语接口及私网IP数据报文头中获取<IP地址、TCP/UDP端口号,DSCP>等信息,查询转发表、传输通道解析表等。若存在表项,则将IP数据报文封装星闪报文头,生成星闪数据报文(即图8B中所示的报文2)并发送。若不存在表项,则需要根据<IP地址、TCP/UDP端口号,DSCP>等信息建立传输连接或者复用已有的传输连接。若建立传输连接成功,则对应的表项,并将IP数据报文封装星闪报文头,并发送;若建立传输连接失败,则丢弃报文。
2、中间节点1、2:
收到来自设备B的星闪数据报文,将星闪数据报文做必要的封装(如添加LCID、TCID等,具体根据帧格式的需要确定),例如逐级查找替换下一跳节点的LCID、TCID等,最终将报文转发给网关。
3、网关:
收到星闪数据报文(如图8B所示的报文4),将星闪地址信息转换为公网IP地址信息,向外网发送IP数据报文(即图8B中所示的报文5)。
通过上述示例2,可以实现公网IP应用数据与星闪域内端设备的端到端传输,实现IP数据在星闪域内的承载。星闪域内通过星闪地址信息进行路由寻址转发报文,可充分使用星闪地址长度短和支持灵活自定义特点,降低报文头开销,提高净荷比,提高传输效率。
需要说明的是,以上实施例均主要是以第二通信协议对应的地址、端口号确定传输通道为例(例如传输通道与星闪地址、星闪端口号等相关联),实际应用中,第一设备确定传输通道的方案,也可以应用于其它通信协议(例如即传输通道也可以与IP地址、TCP/UDP端口号等相关联)。
示例性的,参见图9,为本申请实施例提供的另一种数据传输的方法的流程图,方法包括:
S901、第一设备获取数据报文,数据报文中包括数据、源地址、目的地址、源端口号、 目的端口号、QoS指示字段。
具体实现方式可以参考上文S301或S401,此处不再赘述。区别仅在于这里不限定源地址、目的地址、源端口号、目的端口号、QoS指示字段等对应什么通信协议。
例如:对应IP协议,则源地址和目的地址的类型为IP地址,源端口号和目的端口号的类型为TCP/UDP端口号,QoS参数为DSCP或Traffic of Class。
例如:对应星闪协议,则源地址和目的地址的类型为星闪地址,源端口号和目的端口号的类型为星闪端口号,QoS参数为ToS。
S902、第一设备根据源地址、目的地址、源端口号、目的端口号、或QoS指示字段中的一个或多个,确定通往目的地址的下一跳节点的层2地址L2ID、第一设备与下一跳节点之间的传输通道的TCID;其中传输通道满足QoS指示字段对应的QoS需求;
类似的,网络中已经有满足该数据报文的QoS需求的传输通道的情况下,第一设备可以根据第二映射关系确定通往目的地址的下一跳节点的L2ID、第一设备与下一跳节点之间的传输通道的TCID;其中,第二映射关系用于指示源地址、目的地址、源端口号、目的端口号、或QoS指示字段中的一个或多个与下一跳节点的L2ID、传输通道的TCID之间的映射关系。
网络中没有满足第二数据报文的QoS需求的传输通道的情况下,第一设备可以根据源地址和/或目的地址确定通往目的地址的下一跳节点的L2ID;第一设备根据目的端口号、QoS指示字段、下一跳节点的L2ID与下一跳节点建立传输通道,并生成传输通道的TCID。进一步的,第一设备还根据源地址、目的地址、源端口号、目的端口号、或QoS指示字段中的一个或多个、以及下一跳节点的L2ID、传输通道的TCID生成第二映射关系,以供后续转发数据报文使用。
S903、第一设备根据L2ID和TCID封装数据报文,并发送封装后的数据报文。
具体实现方式可以参考上文S404,此处不再赘述。
类似的,在源地址和目的地址的类型为IP地址的情况下,如果目的地址为下一跳节点的地址,则封装后的数据报文中可以省去星闪地址,例如封装后的数据报文包括L2ID、TCID、源地址、目的地址;或者,如果目的地址不为下一跳节点的地址,则可以在数据报文中同时封装IP地址和星闪地址,例如封装后的数据报文中包括L2ID、TCID、源地址、目的地址、源地址对应的星闪地址、目的地址对应的星闪地址。
通过上述方案,可以保证数据报文对传输路径的QoS需求,可以提高通信的可靠性。
应理解,本文提供的各实施例方式可以分别单独实施,也可以相互结合实施,本申请不做限制。
以上结合附图介绍了本申请实施例提供的方法,以下结合附图介绍本申请实施例提供的装置。
基于同一技术构思,本申请实施例提供一种数据传输装置,该装置包括用于执行图3或图9所示方法的模块/单元/手段。该模块/单元/手段可以通过软件实现,或者通过硬件实现,也可以通过硬件执行相应的软件实现。
示例性的,参见图10,该装置可以包括获取单元1001、处理单元1002和发送单元1003。
当该装置用于执行图3所示的方法时,获取单元1001,用于获取第一数据报文,第一数据报文中包含数据和第一信息,第一信息包括源网络地址、目的网络地址、源传输层端 口号、目的传输层端口号,第一信息对应第一通信协议;处理单元1002,用于根据第一映射关系确定第二信息,第二信息对应第二通信协议,第二信息包括通信协议源地址、通信协议目的地址、通信协议源端口号、通信协议目的端口号,其中第一映射关系用于指示:源网络地址和通信协议源地址之间的映射关系、目的网络地址和通信协议目的地址之间的映射关系、源传输层端口号和通信协议源端口号之间的映射关系、目的传输层端口号和通信协议目的端口号之间的映射关系中的一个或多个;生成第二数据报文,其中第二数据报文中包括数据、通信协议源地址、通信协议目的地址、通信协议源端口号、通信协议目的端口号中的一个或多个;发送单元1003,用于发送第二数据报文。
当该装置用于执行图9所示的方法时,获取单元1001,用于获取数据报文,数据报文中包括数据、源地址、目的地址、源端口号、目的端口号、QoS指示字段;处理单元1002,用于根据源地址、目的地址、源端口号、目的端口号、或QoS指示字段中的一个或多个,确定通往目的地址的下一跳节点的层2地址L2ID、该装置与下一跳节点之间的传输通道的TCID;其中传输通道满足QoS指示字段对应的QoS需求;根据L2ID和TCID封装数据报文;发送单元1003,用于发送封装后的数据报文。
基于同一技术构思,本申请实施例提供一种数据传输装置,该装置包括用于执行图4所示方法的模块/单元/手段。该模块/单元/手段可以通过软件实现,或者通过硬件实现,也可以通过硬件执行相应的软件实现。
示例性的,参见图11,该装置可以包括:
第一协议层模块1101,用于将第一数据报文传递至第二协议层模块,第一数据报文中包含数据和第一信息,第一信息包括源网络地址、目的网络地址、源传输层端口号、目的传输层端口号,第一信息对应第一通信协议;
第二协议层模块1102,用于根据第一映射关系确定第二信息,第二信息对应第二通信协议,第二信息包括通信协议源地址、通信协议目的地址、通信协议源端口号、通信协议目的端口号,其中第一映射关系用于指示:源网络地址和通信协议源地址之间的映射关系、目的网络地址和通信协议目的地址之间的映射关系、源传输层端口号和通信协议源端口号之间的映射关系、目的传输层端口号和通信协议目的端口号之间的映射关系中的一个或多个;生成第二数据报文,其中第二数据报文中包括数据、通信协议源地址、通信协议目的地址、通信协议源端口号、通信协议目的端口号中的一个或多个;
第三协议层模块1103,用于发送第二数据报文。
应理解,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。
参见图12,本申请实施例还提供一种数据传输装置,该装置包括至少一个处理器1201和接口电路1202;接口电路1202用于接收来自该装置之外的其它装置的信号并发送或接收至处理器1201或将来自处理器1201的信号发送给该装置之外的其它通信装置,处理器1201通过逻辑电路或执行代码指令用于实现上述第一设备所执行的方法。
应理解,本申请实施例中提及的处理器可以通过硬件实现也可以通过软件实现。当通过硬件实现时,该处理器可以是逻辑电路、集成电路等。当通过软件实现时,该处理器可以是一个通用处理器,通过读取存储器中存储的软件代码来实现。
示例性的,处理器可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application  Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
应理解,本申请实施例中提及的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Eate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DR RAM)。
需要说明的是,当处理器为通用处理器、DSP、ASIC、FPGA或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件时,存储器(存储模块)可以集成在处理器中。
应注意,本文描述的存储器旨在包括但不限于这些和任意其它适合类型的存储器。
基于相同技术构思,本申请实施例还提供一种计算机可读存储介质,包括程序或指令,当所述程序或指令在计算机上运行时,使得如上述第一设备所执行的方法被执行。
基于相同技术构思,本申请实施例还提供一种包含指令的计算机程序产品,该计算机程序产品中存储有指令,当其在计算机上运行时,使得上述第一设备所执行的方法被执行。
基于相同技术构思,本申请实施例还提供一种终端设备,是上文所述的第一设备或者包括上文所述的第一设备。其中,终端设备可以是车辆、无人机、直升机、飞机、轮船、智能运输设备、或智能家居设备等。本申请实施例对终端设备的具体形态不做限定。
本申请中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。在本申请的文字描述中,字符“/”,一般表示前后关联对象是一种“或”的关系;在本申请的公式中,字符“/”,表示前后关联对象是一种“相除”的关系。“包括A,B和C中的至少一个”可以表示:包括A;包括B;包括C;包括A和B;包括A和C;包括B和C;包括A、B和C。
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/ 或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的保护范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。

Claims (27)

  1. 一种数据传输方法,其特征在于,包括:
    第一设备获取第一数据报文,所述第一数据报文中包含数据和第一信息,所述第一信息包括源网络地址、目的网络地址、源传输层端口号、目的传输层端口号,所述第一信息对应第一通信协议;
    所述第一设备根据第一映射关系确定第二信息,所述第二信息对应第二通信协议,所述第二信息包括通信协议源地址、通信协议目的地址、通信协议源端口号、通信协议目的端口号,其中所述第一映射关系用于指示:所述源网络地址和所述通信协议源地址之间的映射关系、所述目的网络地址和所述通信协议目的地址之间的映射关系、所述源传输层端口号和所述通信协议源端口号之间的映射关系、所述目的传输层端口号和所述通信协议目的端口号之间的映射关系;
    所述第一设备生成第二数据报文,其中所述第二数据报文中包括所述数据、所述通信协议源地址、所述通信协议目的地址、所述通信协议源端口号、所述通信协议目的端口号;
    所述第一设备发送所述第二数据报文。
  2. 如权利要求1所述的方法,其特征在于,
    所述第一映射关系是预先定义的;或者,
    所述第一映射关系是所述第一设备生成的;或者,
    所述第一映射关系是来自第二设备的。
  3. 如权利要求1或2所述的方法,其特征在于,所述第一数据报文中还包含第一服务质量QoS指示字段,所述第一QoS指示字段包括区分服务编码点DSCP或流类型Traffic of Class;
    所述第一映射关系还用于指示所述第一QoS指示字段与第二QoS指示字段之间的映射关系;所述第二QoS指示字段包括流标识Flow label、业务类型ToS;
    所述第二数据报文中还包括所述第二QoS指示字段。
  4. 如权利要求3所述的方法,其特征在于,所述第一设备发送所述第二数据报文,包括:
    所述第一设备根据所述通信协议源地址、所述通信协议目的地址、所述通信协议源端口号、所述通信协议目的端口号、或所述第二QoS指示字段中的一个或多个,确定通往所述通信协议目的地址的下一跳节点的层2地址L2ID、所述第一设备与所述下一跳节点之间的传输通道的传输通道标识TCID;其中所述传输通道满足所述第二QoS指示字段对应的QoS需求;
    所述第一设备根据所述L2ID和所述TCID封装所述第二数据报文,生成第三数据报文;所述第一设备发送所述第三数据报文。
  5. 如权利要求4所述的方法,其特征在于,所述第一设备根据所述通信协议源地址、所述通信协议目的地址、所述通信协议源端口号、所述通信协议目的端口号、或所述第二QoS指示字段中的一个或多个,确定通往所述通信协议目的地址的下一跳节点的L2ID、所述第一设备与所述下一跳节点之间的传输通道的TCID,包括:
    所述第一设备根据第二映射关系确定通往所述通信协议目的地址的下一跳节点的L2ID、所述第一设备与所述下一跳节点之间的传输通道的TCID;其中,所述第二映射关 系用于指示所述通信协议源地址、所述通信协议目的地址、所述通信协议源端口号、所述通信协议目的端口号、或所述第二QoS指示字段中的一个或多个与所述下一跳节点的L2ID、所述传输通道的TCID之间的映射关系;或者,
    所述第一设备根据所述通信协议源地址和/或所述通信协议目的地址确定通往所述通信协议目的地址的下一跳节点的L2ID;所述第一设备将所述第二QoS指示字段映射为第三QoS指示字段,根据所述通信协议目的端口号、所述第三QoS指示字段、所述下一跳节点的L2ID与所述下一跳节点建立传输通道,并生成所述传输通道的TCID。
  6. 如权利要求5所述的方法,其特征在于,在所述第一设备生成所述传输通道的TCID之后,还包括:
    所述第一设备根据所述通信协议源地址、所述通信协议目的地址、所述通信协议源端口号、所述通信协议目的端口号、或所述第二QoS指示字段中的一个或多个、以及所述下一跳节点的L2ID、所述传输通道的TCID生成所述第二映射关系。
  7. 如权利要求1-6任一项所述的方法,其特征在于,所述第二通信协议为星闪联盟规范的短距离无线通信标准协议。
  8. 如权利要求1-7任一项所述的方法,其特征在于,所述源网络地址、所述目的网络地址的类型为互联网协议IP地址;
    所述源传输层端口号、所述目的传输层端口号的类型为传输控制协议TCP/用户数据报协议UDP端口号。
  9. 一种数据传输方法,其特征在于,应用于第一设备,所述第一设备上部署有第二通信协议的协议栈,所述方法包括:
    所述第一设备将第一数据报文从所述协议栈的第一协议层传递至所述协议栈的第二协议层,所述第一数据报文中包含数据和第一信息,所述第一信息包括源网络地址、目的网络地址、源传输层端口号、目的传输层端口号,所述第一信息对应第一通信协议;
    所述第一设备在所述协议栈的第二协议层根据第一映射关系确定第二信息,所述第二信息对应第二通信协议,所述第二信息包括通信协议源地址、通信协议目的地址、通信协议源端口号、通信协议目的端口号,其中所述第一映射关系用于指示:所述源网络地址和所述通信协议源地址之间的映射关系、所述目的网络地址和所述通信协议目的地址之间的映射关系、所述源传输层端口号和所述通信协议源端口号之间的映射关系、所述目的传输层端口号和所述通信协议目的端口号之间的映射关系;
    所述第一设备在所述协议栈的第二协议层生成第二数据报文,其中所述第二数据报文中包括所述数据、所述通信协议源地址、所述通信协议目的地址、所述通信协议源端口号、所述通信协议目的端口号;
    所述第一设备在所述协议栈的第三协议层发送所述第二数据报文。
  10. 如权利要求9所述的方法,其特征在于,
    所述第一映射关系是预先定义的;或者,
    所述第一映射关系是所述第一设备在所述协议栈的第二协议层生成的;或者,
    所述第一映射关系是来自第二设备的。
  11. 如权利要求9或10所述的方法,其特征在于,所述第一数据报文中还包含第一服务质量QoS指示字段,所述第一QoS指示字段包括区分服务编码点DSCP或流类型Traffic of Class;
    所述第一映射关系还用于指示所述第一QoS指示字段与第二QoS指示字段之间的映射关系;所述第二QoS指示字段包括流标识Flow label、业务类型ToS;
    所述第二数据报文中还包括所述第二QoS指示字段。
  12. 如权利要求11所述的方法,其特征在于,所述方法还包括:
    所述第一设备在所述协议栈的第二协议层根据所述通信协议源地址、所述通信协议目的地址、所述通信协议源端口号、所述通信协议目的端口号、或所述第二QoS指示字段中的一个或多个,确定通往所述通信协议目的地址的下一跳节点的层2地址L2ID、所述第一设备与所述下一跳节点之间的传输通道的传输通道标识TCID;其中所述传输通道满足所述第二QoS指示字段对应的QoS需求;
    所述第一设备在所述协议栈的第三协议层发送所述第二数据报文,包括:
    所述第一设备在所述协议栈的第三协议层根据所述L2ID和所述TCID封装所述第二数据报文,生成第三数据报文;所述第一设备在所述协议栈的第三协议层发送所述第三数据报文。
  13. 如权利要求12所述的方法,其特征在于,所述第一设备在所述协议栈的第二协议层根据所述通信协议源地址、所述通信协议目的地址、所述通信协议源端口号、所述通信协议目的端口号、或所述第二QoS指示字段中的一个或多个,确定通往所述通信协议目的地址的下一跳节点的L2ID、所述第一设备与所述下一跳节点之间的传输通道的TCID,包括:
    所述第一设备在所述协议栈的第二协议层根据第二映射关系确定通往所述通信协议目的地址的下一跳节点的L2ID、所述第一设备与所述下一跳节点之间的传输通道的TCID;其中,所述第二映射关系用于指示所述通信协议源地址、所述通信协议目的地址、所述通信协议源端口号、所述通信协议目的端口号、或所述第二QoS指示字段中的一个或多个与所述下一跳节点的L2ID、所述传输通道的TCID之间的映射关系;或者,
    所述第一设备在所述协议栈的第二协议层根据所述通信协议源地址和/或所述通信协议目的地址确定通往所述通信协议目的地址的下一跳节点的L2ID;所述第一设备在所述协议栈的第三协议层将所述第二QoS指示字段映射为第三QoS指示字段,根据所述通信协议目的端口号、所述第三QoS指示字段、所述下一跳节点的L2ID与所述下一跳节点建立传输通道,并生成所述传输通道的TCID;所述第一设备将所述TCID从所述协议栈的第三协议层传递至所述协议栈的第二协议层。
  14. 如权利要求13所述的方法,其特征在于,在所述第一设备将所述TCID从所述协议栈的第三协议层传递至所述协议栈的第二协议层之后,还包括:
    所述第一设备在所述协议栈的第二协议层根据所述通信协议源地址、所述通信协议目的地址、所述通信协议源端口号、所述通信协议目的端口号、或所述第二QoS指示字段中的一个或多个、以及所述下一跳节点的L2ID、所述传输通道的TCID生成所述第二映射关系。
  15. 如权利要求9-14任一项所述的方法,其特征在于,所述第二通信协议为星闪联盟规范的短距离无线通信标准协议。
  16. 如权利要求9-15任一项所述的方法,其特征在于,所述源网络地址、所述目的网络地址的类型为互联网协议IP地址;
    所述源传输层端口号、所述目的传输层端口号的类型为传输控制协议TCP/用户数据报 协议UDP端口号。
  17. 一种数据传输方法,其特征在于,包括:
    第一设备获取数据报文,所述数据报文中包括数据、源地址、目的地址、源端口号、目的端口号、QoS指示字段;
    所述第一设备根据所述源地址、所述目的地址、所述源端口号、所述目的端口号、或所述QoS指示字段中的一个或多个,确定通往所述目的地址的下一跳节点的层2地址L2ID、所述第一设备与所述下一跳节点之间的传输通道的TCID;其中所述传输通道满足所述QoS指示字段对应的QoS需求;
    所述第一设备根据所述L2ID和所述TCID封装所述数据报文,并发送封装后的数据报文。
  18. 如权利要求17所述的方法,其特征在于,所述第一设备根据所述源地址、所述目的地址、所述源端口号、所述目的端口号、或所述QoS指示字段中的一个或多个,确定通往所述通信协议目的地址的下一跳节点的L2ID、所述第一设备与所述下一跳节点之间的传输通道的TCID,包括:
    所述第一设备根据第二映射关系确定通往所述目的地址的下一跳节点的L2ID、所述第一设备与所述下一跳节点之间的传输通道的TCID;其中,所述第二映射关系用于指示所述源地址、所述目的地址、所述源端口号、所述目的端口号、或所述QoS指示字段中的一个或多个与所述下一跳节点的L2ID、所述传输通道的TCID之间的映射关系;或者,
    所述第一设备根据所述源地址和/或所述目的地址确定通往所述目的地址的下一跳节点的L2ID;所述第一设备根据所述目的端口号、所述QoS指示字段、所述下一跳节点的L2ID与所述下一跳节点建立传输通道,并生成所述传输通道的TCID。
  19. 如权利要求18所述的方法,其特征在于,在所述第一设备生成所述传输通道的TCID之后,还包括:
    所述第一设备根据所述源地址、所述目的地址、所述源端口号、所述目的端口号、或所述QoS指示字段中的一个或多个、以及所述下一跳节点的L2ID、所述传输通道的TCID生成所述第二映射关系。
  20. 如权利要求17-19任一项所述的方法,其特征在于,所述源地址和所述目的地址的类型为IP地址,所述源端口号和所述目的端口号的类型为TCP/UDP端口号,所述QoS参数为DSCP或Traffic of Class;或者,
    所述源地址和所述目的地址的类型为星闪联盟规范的短距离无线通信标准协议地址,所述源端口号和所述目的端口号的类型为星闪联盟规范的短距离无线通信标准协议端口号,所述QoS参数为星闪联盟规范的短距离无线通信标准协议中的服务类型ToS。
  21. 如权利要求17-20任一项所述的方法,其特征在于,所述源地址和所述目的地址的类型为IP地址;
    所述目的地址为所述下一跳节点的地址;所述封装后的数据报文中包括所述L2ID、所述TCID、所述源地址、所述目的地址;或者,
    所述目的地址不为所述下一跳节点的地址;所述封装后的数据报文中包括所述L2ID、所述TCID、所述源地址、所述目的地址、所述源地址对应的星闪联盟规范的短距离无线通信标准协议地址、所述目的地址对应的星闪联盟规范的短距离无线通信标准协议地址。
  22. 一种数据传输装置,其特征在于,包括:
    获取单元,用于获取第一数据报文,所述第一数据报文中包含数据和第一信息,所述第一信息包括源网络地址、目的网络地址、源传输层端口号、目的传输层端口号,所述第一信息对应第一通信协议;
    处理单元,用于根据第一映射关系确定第二信息,所述第二信息对应第二通信协议,所述第二信息包括通信协议源地址、通信协议目的地址、通信协议源端口号、通信协议目的端口号,其中所述第一映射关系用于指示:所述源网络地址和所述通信协议源地址之间的映射关系、所述目的网络地址和所述通信协议目的地址之间的映射关系、所述源传输层端口号和所述通信协议源端口号之间的映射关系、所述目的传输层端口号和所述通信协议目的端口号之间的映射关系;生成第二数据报文,其中所述第二数据报文中包括所述数据、所述通信协议源地址、所述通信协议目的地址、所述通信协议源端口号、所述通信协议目的端口号;
    发送单元,用于发送所述第二数据报文。
  23. 一种数据传输装置,其特征在于,包括:
    第一协议层模块,用于将第一数据报文传递至第二协议层模块,所述第一数据报文中包含数据和第一信息,所述第一信息包括源网络地址、目的网络地址、源传输层端口号、目的传输层端口号,所述第一信息对应第一通信协议;
    所述第二协议层模块,用于根据第一映射关系确定第二信息,所述第二信息对应第二通信协议,所述第二信息包括通信协议源地址、通信协议目的地址、通信协议源端口号、通信协议目的端口号,其中所述第一映射关系用于指示:所述源网络地址和所述通信协议源地址之间的映射关系、所述目的网络地址和所述通信协议目的地址之间的映射关系、所述源传输层端口号和所述通信协议源端口号之间的映射关系、所述目的传输层端口号和所述通信协议目的端口号之间的映射关系;生成第二数据报文,其中所述第二数据报文中包括所述数据、所述通信协议源地址、所述通信协议目的地址、所述通信协议源端口号、所述通信协议目的端口号;
    第三协议层模块,用于发送所述第二数据报文。
  24. 一种数据传输装置,其特征在于,包括:
    获取单元,用于获取数据报文,所述数据报文中包括数据、源地址、目的地址、源端口号、目的端口号、QoS指示字段;
    处理单元,用于根据所述源地址、所述目的地址、所述源端口号、所述目的端口号、或所述QoS指示字段中的一个或多个,确定通往所述目的地址的下一跳节点的层2地址L2ID、所述第一设备与所述下一跳节点之间的传输通道的TCID;其中所述传输通道满足所述QoS指示字段对应的QoS需求;根据所述L2ID和所述TCID封装所述数据报文;
    发送单元,用于发送封装后的数据报文。
  25. 一种数据传输装置,其特征在于,包括:至少一个处理器和接口电路;
    所述接口电路用于接收来自所述装置之外的其它装置的信号并发送或接收至所述处理器或将来自所述处理器的信号发送给所述装置之外的其它装置,所述处理器通过逻辑电路或执行代码指令用于实现如权利要求1-8中任一项所述的方法,或者,用于实现如权利要求9-16中任一项所述的方法,或者,用于实现如权利要求17-21中任一项所述的方法。
  26. 一种计算机可读存储介质,其特征在于,所述存储介质中存储有计算机程序或指令,当所述计算机程序或指令被通信装置执行时,实现如权利要求1-8中任一项所述的方法, 或者,用于实现如权利要求9-16中任一项所述的方法,或者,用于实现如权利要求17-21中任一项所述的方法。
  27. 一种计算机程序产品,其特征在于,所述计算机程序产品中存储有指令,当其在计算机上运行时,使得计算机执行如权利要求1-8中任一项所述的方法,或者,执行如权利要求9-16中任一项所述的方法,或者,执行如权利要求17-21中任一项所述的方法。
PCT/CN2022/103759 2022-07-04 2022-07-04 一种数据传输方法、装置 WO2024007134A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/103759 WO2024007134A1 (zh) 2022-07-04 2022-07-04 一种数据传输方法、装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/103759 WO2024007134A1 (zh) 2022-07-04 2022-07-04 一种数据传输方法、装置

Publications (1)

Publication Number Publication Date
WO2024007134A1 true WO2024007134A1 (zh) 2024-01-11

Family

ID=89454725

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/103759 WO2024007134A1 (zh) 2022-07-04 2022-07-04 一种数据传输方法、装置

Country Status (1)

Country Link
WO (1) WO2024007134A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1980223A (zh) * 2005-12-01 2007-06-13 华为技术有限公司 一种实现两种不同协议间转换的装置和方法
US20080247392A1 (en) * 2007-04-04 2008-10-09 Russell White Validating Internal Routing Protocol Information Passed Through an External Routing Protocol
CN103338488A (zh) * 2013-06-21 2013-10-02 华为技术有限公司 网络切换方法、终端、控制器、网关及系统
CN112104556A (zh) * 2020-11-20 2020-12-18 广东省新一代通信与网络创新研究院 一种网络融合方法及系统
CN113630902A (zh) * 2021-08-19 2021-11-09 联想(北京)有限公司 基于网络服务质量的数据包传输方法及相关设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1980223A (zh) * 2005-12-01 2007-06-13 华为技术有限公司 一种实现两种不同协议间转换的装置和方法
US20080247392A1 (en) * 2007-04-04 2008-10-09 Russell White Validating Internal Routing Protocol Information Passed Through an External Routing Protocol
CN103338488A (zh) * 2013-06-21 2013-10-02 华为技术有限公司 网络切换方法、终端、控制器、网关及系统
CN112104556A (zh) * 2020-11-20 2020-12-18 广东省新一代通信与网络创新研究院 一种网络融合方法及系统
CN113630902A (zh) * 2021-08-19 2021-11-09 联想(北京)有限公司 基于网络服务质量的数据包传输方法及相关设备

Similar Documents

Publication Publication Date Title
CN107517488B (zh) 报文处理的方法及设备
US10834223B2 (en) Hybrid information-centric and host-oriented networks
WO2018090666A1 (zh) 一种多路径数据传输方法及设备
CN108092830B (zh) 在Mesh网络中应用TCP/IP协议的方法
US11750411B2 (en) Method of and devices for supporting selective forwarding of messages in a network of communicatively coupled communication devices
US20070060147A1 (en) Apparatus for transmitting data packets between wireless sensor networks over internet, wireless sensor network domain name server, and data packet transmission method using the same
WO2018126692A1 (zh) 数据传输的控制方法和设备
WO2021052399A1 (zh) 接口扩展方法、装置和系统
WO2023019895A1 (zh) 基于网络服务质量的数据包传输方法及相关设备
WO2011119019A1 (en) Method of communicating signals in 6lowpan network to ipv6 network
WO2020135277A1 (zh) 一种通信方法及通信设备
WO2022110535A1 (zh) 一种报文发送方法、设备及系统
CN103200283A (zh) 多中继无线通信系统及该系统空中接口ip化的实现方法
WO2014056412A1 (zh) 一种报文发送的方法、路由器桥及系统
KR20120040273A (ko) 네트워크 상호 연동 실현 방법 및 시스템
WO2013097400A1 (zh) 一种网络设备绑定的方法、通信的方法、装置及系统
CN113472913A (zh) 通信方法及装置
WO2024007134A1 (zh) 一种数据传输方法、装置
WO2023102680A1 (zh) 拥塞控制方法、装置、设备、介质、芯片、产品及程序
US10674565B2 (en) Communication method
De Schepper et al. ORCHESTRA: Supercharging wireless backhaul networks through multi-technology management
US11405775B2 (en) Three-address scheme for forwarding frames in a wireless mesh network
US9525615B2 (en) Systems and methods for implementing multiple ISIS routing instances on a network element
US20220239528A1 (en) Relay device, vehicle, communication method, and communication program
WO2022126399A1 (zh) 一种通信方法及通信装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22949724

Country of ref document: EP

Kind code of ref document: A1