WO2022227484A1 - Data communication method and apparatus, computer device, and storage medium - Google Patents

Data communication method and apparatus, computer device, and storage medium Download PDF

Info

Publication number
WO2022227484A1
WO2022227484A1 PCT/CN2021/129718 CN2021129718W WO2022227484A1 WO 2022227484 A1 WO2022227484 A1 WO 2022227484A1 CN 2021129718 W CN2021129718 W CN 2021129718W WO 2022227484 A1 WO2022227484 A1 WO 2022227484A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
pdn
path
protocol message
message header
Prior art date
Application number
PCT/CN2021/129718
Other languages
French (fr)
Chinese (zh)
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 深圳市广和通无线股份有限公司
Publication of WO2022227484A1 publication Critical patent/WO2022227484A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0026PCI express

Definitions

  • the present application relates to the field of communication technologies, and in particular, to a data communication method, apparatus, computer equipment and storage medium.
  • PDN Public Data Network
  • PDN is a wide area network established by telecom operators, which can provide services and technologies for accessing the wide area network, and provide users with high-quality data transmission services.
  • High-speed transmission of communication data can be achieved through PDN.
  • high-speed data transmission between the communication module and the terminal connected to it can be implemented, or high-speed data transmission between the host and the terminal can be implemented using the communication module as an intermediate transmission medium.
  • the present application provides a data communication method, apparatus, computer equipment and storage medium capable of improving data communication efficiency.
  • a data communication method comprising: interacting control information with a host through a control path divided from a bus interface to establish multiple PDN data paths;
  • the host multiplexes the data packets transmitted by the data transmission path; parses the multiplexing protocol message header in the data packet to obtain the path identifier; passes the PDN data corresponding to the path identifier in the multiple PDN data paths channel, and send the PDN data in the data packet.
  • the parsing the multiplexing protocol message header in the data packet to obtain the path identifier includes: parsing the multiplexing protocol message in the data packet according to a preset multiplexing protocol message header format The data type flag bit of the header; when the data type flag bit is a preset value indicating that the PDN data is carried, according to the multiplexing protocol message header format, extract from the path identifier filling part of the multiplexing protocol message header. Path identification.
  • the method further includes: reading the data capacity filled in the data capacity filling part of the multiplexing protocol message header according to the multiplexing protocol message header format; the data capacity is the The host is dynamically determined based on network quality parameters; according to the data capacity, the PDN data in the data packet is verified; when the verification is passed, the execution of the multi-channel PDN data path corresponding to the path identifier is executed. the PDN data path, and send the PDN data in the data packet.
  • the method further includes: receiving PDN response data through the multiplex PDN data paths; acquiring a path identifier of the PDN data path through which the PDN response data passes; and according to a preset multiplexing protocol message header format, construct the response multiplexing protocol message header; the data type flag position of the response multiplexing protocol message header is a preset value indicating that the PDN data is carried, and the path identifier filling part of the response multiplexing protocol message header is filled with the obtained channel identification; generating a response data packet according to the PDN response data and the response multiplexing protocol message header; sending the response data packet through the data transmission channel.
  • the data capacity filling part of the response multiplexing protocol message header is filled with the response data capacity determined by the communication module according to the current network quality parameter; the response data according to the PDN response data and the Generating a response data packet in response to the multiplexing protocol message header includes: based on the PDN response data, re-determining the packet data to be sent according to the response data capacity; assembling the response multiplexing protocol message header and the packet data to be sent to obtain a response data pack.
  • a data communication device comprises: a multi-channel PDN data path establishment module for interacting control information with a host through a control path divided from a bus interface to establish a multi-channel PDN data path; a data packet receiving module , for receiving the data packets transmitted by the host multiplexing the data transmission path through the data transmission path divided from the bus interface; the path identification obtaining module is used for parsing the multiplexing protocol message in the data packet header, to obtain a path identifier; a PDN data sending module, configured to send the PDN data in the data packet through the PDN data path corresponding to the path identifier in the multi-path PDN data paths.
  • the path identification obtaining module includes: a data type flag bit parsing unit, configured to parse the data type flag bit of the multiplexing protocol message header in the data packet according to a preset multiplexing protocol message header format
  • the path identification extraction unit is used to extract the path identification filling part from the path identification filling part of the multiplexing protocol message header according to the multiplexing protocol message header format when the data type flag bit is a preset value representing carrying PDN data. Exit path identification.
  • the apparatus includes: a data capacity reading unit, configured to read the data capacity filled by the data capacity filling part of the multiplexing protocol message header according to the multiplexing protocol message header format;
  • the data capacity is dynamically determined by the host based on the network quality parameter;
  • the PDN data verification unit is used to verify the PDN data in the data packet according to the data capacity;
  • the PDN data sending module is used to be a school When the verification is passed, the passing of the PDN data path corresponding to the path identifier in the multi-path PDN data paths is performed, and the PDN data in the data packet is sent.
  • the apparatus includes: a PDN response data receiving unit, configured to receive PDN response data through the multi-channel PDN data paths; a channel identifier obtaining unit, configured to obtain the PDN data passed by the PDN response data The path identifier of the path; the response multiplexing protocol message header construction unit is used to construct the response multiplexing protocol message header according to the preset multiplexing protocol message header format; the data type flag position of the response multiplexing protocol message header is indicated Carrying the preset value of the PDN data, the path identifier filling part of the response multiplexing protocol message header is filled with the acquired path identifier; the response data packet generating unit is used for according to the PDN response data and the response multiplexing protocol message.
  • the header generates a response data packet; the response data packet sending module is configured to send the response data packet through the data transmission path.
  • the response data packet generating unit is configured to re-determine the packet data to be sent according to the response data capacity based on the PDN response data; assemble the response multiplexing protocol message header and the packet data to be sent to obtain response packet.
  • a computer device comprising a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program: interacting with a host computer for control information through a control path divided from a bus interface , establish a multiplex PDN data path; receive the data packet transmitted by the host multiplexing the data transmission path through the data transmission path divided from the bus interface; parse the multiplexing protocol message header in the data packet, Obtain a path identifier; and send the PDN data in the data packet through the PDN data path corresponding to the path identifier in the multi-path PDN data paths.
  • the above-mentioned data communication method, device, computer equipment and storage medium through the control path divided from the bus interface, interact with the host for control information, and establish a multi-channel PDN data path; through the data transmission path divided from the bus interface, receive The host multiplexes the data packets transmitted by the data transmission channel; parses the multiplexing protocol message header in the data packet to obtain the channel identifier; sends the PDN data in the data packet through the PDN data channel corresponding to the channel identifier in the multi-channel PDN data channel.
  • the control path and the data transmission path can be divided separately from the bus interface, so that the control information and the data transmission are separated without affecting each other, so as to ensure the transmission efficiency of the data transmission process.
  • the corresponding PDN data path can be identified through the path identifier, the PDN data in the data packet can be sent, and the data path to be sent can be quickly determined, thereby improving the efficiency of data communication.
  • Fig. 1 is the application environment diagram of the data communication method in one embodiment
  • FIG. 2 is a schematic flowchart of a data communication method in one embodiment
  • FIG. 3 is a schematic flowchart of steps of parsing a multiplexing protocol message header in a data packet to obtain a path identifier in one embodiment
  • FIG. 4 is a schematic flowchart of a data communication method in another embodiment
  • FIG. 5 is a schematic flowchart of a data communication method in another embodiment
  • FIG. 6 is a schematic flowchart of a data communication method in another embodiment
  • FIG. 7 is a schematic diagram of multiplexing protocol message headers in a data communication process in one embodiment
  • FIG. 8 is a schematic diagram of a data packet in a data communication process in one embodiment
  • FIG. 9 is a structural block diagram of a data communication apparatus in one embodiment
  • Figure 10 is a diagram of the internal structure of a computer device in one embodiment.
  • the data communication method provided by the present application can be applied to the application environment shown in FIG. 1 , and is specifically applied to a data communication system.
  • the data communication system includes a host 102 and a communication module 104, wherein the host 102 communicates with the communication module 104 through a bus.
  • the communication module 104 executes a data communication method.
  • the communication module 104 exchanges control information with the host 102 through the control path divided from the bus interface, and establishes multiple PDN data paths;
  • the transmission path receives the data packets transmitted by the multiplexed data transmission path of the host 102; and parses the multiplexing protocol message header in the data packet through the communication module 104 to obtain the path identification; through the PDN data corresponding to the path identification in the multiple PDN data paths
  • the channel sends the PDN data in the data packet.
  • the host 102 can be, but is not limited to, various computer systems, personal computers, notebook computers, smart phones, tablet computers and portable wearable devices;
  • the communication module 104 can be a module independent of the terminal for data communication; It can be a module integrated in the terminal for data communication. It is implemented by a server or a server cluster composed of multiple servers.
  • a data communication method is provided, and the method is applied to the communication module in FIG. 1 as an example for description, including the following steps:
  • step 202 multiple PDN data paths are established by exchanging control information with the host through the control paths divided from the bus interface.
  • the bus interface refers to an interface that can provide connections for bus access.
  • a PCIe peripheral component interconnect express
  • I 2 C I-squared-C
  • USB Universal Serial Bus
  • the control path refers to the path through which the host sends control information to the communication module.
  • Control information refers to the information sent by the host to the communication module to control the communication module to perform an operation.
  • a PDN data path refers to a path capable of transmitting PDN data.
  • the host needs to transmit the local control information to the communication module, so that the communication module can transmit the multi-channel PDN data through the control information.
  • the communication module can divide the control channel by using the preset virtual interface connected with the host by the bus interface of the communication module.
  • the PCIe bus connected by the PCIe interface of the communication module is used to divide the control path through software, and the relevant configuration items under the /dev/mhi_ctrl interface on the host side are used for configuration, and the control path divided by the bus interface is divided by The control path realizes the exchange of control information.
  • Step 204 Receive the data packets transmitted by the host multiplexed data transmission channel through the data transmission channel divided from the bus interface.
  • the data transmission path refers to the path used for transmitting data.
  • Multiplexing refers to the reuse of transmission paths for data packet transmission.
  • a data packet refers to the data transmitted each time during data transmission.
  • the host transmits the data to be transmitted to the terminal from the local end through the communication module, and can use the data transmission path divided by the bus interface connected between the host and the communication module. Through this data transmission path, the host can continuously transmit the data packets of the data to be transmitted. is transmitted from the data transmission path to the communication module.
  • the communication module can receive the data packet sent by the host through the data transmission path. The communication module can use the communication module bus interface and the preset virtual interface of the host to divide the data transmission channel. The data packets sent by the host are received through the data receiving unit at the local end of the communication module.
  • the communication module uses the PCIe bus connected by the PCIe interface of the local end, and the software divides the control path, uses the relevant configuration items under the host side /pcie_mhio interface for configuration, and divides the bus interface into a data transmission path.
  • the transmission path receives packets sent by the host.
  • the communication module adjusts the relevant transmission parameters between the host and the communication module, such as baud rate, frequency, or MTU (Maximum Transmission Unit), through the data transmission path divided from the bus interface.
  • the data packets transmitted by the host through the data transmission channel are received by means of synchronous time division multiplexing or asynchronous full multiplexing.
  • Step 206 Parse the multiplexing protocol message header in the data packet to obtain the path identifier.
  • the multiplexing protocol message header refers to the header information of the data packet, which can determine information such as the type or size of the data packet.
  • the path identifier refers to the symbolic information that can uniquely determine the path. For example, a pathway is identified as the ID (Identity document) of the pathway.
  • the communication module can find the padding value in the preset field by analyzing the position of the preset field in the header of the multiplexing protocol message in the data packet, and obtain the path identifier through the padding value. For example, the path identification is obtained using the padding value at the second field of the multiplexing protocol message header.
  • the communication module analyzes the multiplexing protocol message header of the received data packet by using a data packet analysis tool to obtain the path identifier.
  • a data packet analysis tool For example, the second field of the multiplexing protocol message header of the received data packet may be parsed by a packet capture tool, and the value obtained by the analysis is the obtained path identifier.
  • Step 208 Send the PDN data in the data packet through the PDN data channel corresponding to the channel identifier in the multi-channel PDN data channel.
  • each PDN data path has a corresponding path identifier.
  • the communication module obtains the data packet and obtains the path identifier by parsing the data packet, it will trigger the sending operation of the data packet, and send the data packet based on the sending operation. PDN data.
  • the data packet with the protocol header removed is sent to the PDN data path corresponding to the path identifier, that is, when the communication module sends the data packet, only the original data in the data packet is sent. data, so that the upper-layer application program that receives the data packet sent by the communication module can use the received data packet accurately and efficiently.
  • the control information is exchanged with the host to establish multiple PDN data paths; through the data transmission path divided from the bus interface, the host receives the multiplexed data transmission path transmission. parse the multiplexing protocol message header in the data packet to obtain the path identifier; send the PDN data in the data packet through the PDN data path corresponding to the path identifier in the multi-path PDN data path.
  • the control path and the data transmission path can be separately divided from the bus interface, so that the control information and the data transmission are separated without affecting each other, and the transmission efficiency of the data transmission process is guaranteed.
  • the corresponding PDN data path can be identified through the path identifier, the PDN data in the data packet can be sent, and the data path to be sent can be quickly determined, thereby improving the efficiency of data communication.
  • parsing the multiplexing protocol message header in the data packet to obtain the path identifier includes:
  • Step 302 Parse the data type flag bit of the multiplexing protocol message header in the data packet according to the preset multiplexing protocol message header format.
  • the multiplexing protocol message header format refers to the field composition format of the multiplexing protocol message header.
  • the data type flag bit refers to the field position that can indicate the data type of the data packet.
  • the field refers to the byte or byte range in the protocol message header, and one field includes eight bytes. For example, the first byte or the byte range from the first byte to the eighth byte in the protocol message header.
  • the multiplexing protocol message header in the sent data packet has a preset multiplexing protocol message header format, and the corresponding data type flag bit can be parsed through the above-mentioned multiplexing protocol message header format.
  • the first byte of the multiplexing protocol message header in the data packet is preset as the data type flag bit of the multiplexing protocol message header; when the communication module receives the data packet When , the first byte of the multiplexing protocol message header in the data packet is parsed, and the data type flag bit corresponding to the data packet is obtained.
  • Step 304 when the data type flag bit is a preset value indicating that the PDN data is carried, extract the path identifier from the path identifier filling part of the multiplexing protocol message header according to the multiplexing protocol message header format.
  • the channel identifier filling part refers to the byte bits or the byte bit range capable of filling the channel identifier in the multiplexing protocol message header.
  • the communication module parses the data type flag bit of the multiplexing protocol message header in the data packet according to the preset multiplexing protocol message header format
  • the preset value of different PDN data carried by the data type flag bit is used , first determine the type of the data packet, when the type of the data packet is the control transmission type, extract the path identifier in the message header of the multiplexing protocol according to the format of the multiplexing protocol message header.
  • the flag bit representing the data type carrying PDN data when the flag bit representing the data type carrying PDN data is a preset value of 0, it indicates that the data packet received by the communication module is a control type data packet.
  • the multiplexing protocol message header format in the multiplexing protocol message The path identifier filling part of the header extracts the path identifier.
  • the flag bit representing the data type carrying PDN data is a preset value of 1, it indicates that the data packet received by the communication module is a data type data packet, and when the data packet is received, the communication module can be triggered The operation of receiving the control information in the control information, based on this operation, receive the data packet forwarding instruction sent by the host to the communication module, based on the forwarding instruction, according to the multiplexing protocol message header format, extract the path in the path identifier filling part of the multiplexing protocol message header logo.
  • the data type flag bit of the multiplexing protocol message header in the data packet is parsed according to the preset multiplexing protocol message header format.
  • the format of the protocol message header is to extract the path identifier from the path identifier filling part of the multiplexed protocol message header, which can accurately determine the path identifier of the data packet for transmission.
  • the communication module receives the data packet, it can avoid the same channel of multiple PDN data. Redundancy is generated on the network, thereby improving the efficiency of data communication.
  • the data communication method further includes:
  • Step 402 read the data capacity filled in the data capacity filling part of the multiplexing protocol message header; the data capacity is dynamically determined by the host based on the network quality parameter.
  • the data capacity refers to the size of each transmission data packet. For example, if the size of each transmission data packet is 128 Bytes, when the data packet is sent, the data capacity of the multiplexing protocol message header is filled with a value of 128 Bytes.
  • the network quality parameter refers to a parameter that can reflect the ability to transmit data packets in the process of data communication. For example, the network throughput of the bus or the data transfer rate of the bus, etc.
  • the data capacity filled in the data capacity filling part of the multiplexing protocol message header can be read according to the multiplexing protocol message header format, and the data capacity can be dynamically determined according to the network quality parameter.
  • the padding value in the third byte segment and the fourth byte segment of the multiplexing protocol message header can be used as the data capacity.
  • a field corresponding to the data capacity filling part of the multiplexing protocol message header may be parsed by using the multiplexing protocol message header parsing plug-in to obtain the data capacity filled by the data capacity filling part.
  • the corresponding PAYLOAD_LEN_WITH_PADDING field in the multiplexing protocol message header is parsed to obtain a value filled in this field, which is the data capacity.
  • the padding value in this field is expressed in binary form, assuming that the padding value is 0000000000001111, the padding data capacity is 15 bytes (Byte).
  • Step 404 Check the PDN data in the data packet according to the data capacity.
  • the PDN data in the data packet can be verified by using the data capacity as a unit by a data verification method.
  • a hash value is generated for each sent data packet in the unit of data capacity, and when the communication module receives the data packet, the communication module side compares the same data packet Another hash value is generated.
  • the hash value generated at the host sending end is the same as the hash value generated at the communication module receiving end, it can be obtained that the PDN data verification result in the data packet is that the PDN data in the data packet is complete and accurate. There is no abnormality in the data packet during transmission.
  • Step 406 when the check is passed, the PDN data in the data packet is sent through the PDN data path corresponding to the path identifier in the multi-path PDN data paths.
  • the PDN data path corresponding to the path identifier is determined in the multiple PDN data paths, and the PDN data path is used as the PDN data in the data packet that has passed the verification. the pathway.
  • a data sending instruction in the communication module is triggered, and the data sending instruction extracts the path identifier from the path identifier filling part of the multiplexing protocol message header, and sends the PDN data in the data packet. to the PDN data path corresponding to the path ID.
  • the PDN data in the data packet is sent through the PDN data path corresponding to the path identifier in the multiple PDN data paths, which can prevent multiple PDN data from being sent to the same PDN data path, or, One PDN data is sent to multiple PDN data paths, which reduces data redundancy and improves the efficiency of data communication.
  • the data communication method further includes:
  • Step 502 Receive PDN response data through multiple PDN data paths.
  • the PDN response data refers to PDN data sent to the communication module by a terminal connected to the communication module.
  • the communication module may receive the PDN response data sent by the terminal connected to the communication module through the data receiving unit of the local end.
  • Step 504 Obtain the path identifier of the PDN data path through which the PDN response data passes.
  • the communication module uses multiple PDN data paths to receive PDN response data, the path identifiers of each PDN data path are different, and the path identifier of the PDN data path through which the PDN response data passes can be determined by the acquired PDN response data.
  • the path identifier of the PDN data path through which the PDN response data passes may be acquired according to the correspondence between the identifier of the terminal corresponding to the PDN response data and the path identifier. After receiving the PDN response data, the identification of the terminal is determined through the PDN response data, and the path identification of the PDN data path corresponding to the identification of the terminal is determined through the identification of the terminal, so as to obtain the path identification of the PDN data path through which the PDN response data passes.
  • Step 506 construct the response multiplexing protocol message header according to the preset multiplexing protocol message header format; wherein, the data type flag position of the response multiplexing protocol message header is a preset value indicating that the PDN data is carried, and the response multiplexing protocol message
  • the path identifier filling part of the header is filled with the acquired path identifier.
  • the response multiplexing protocol message header refers to the multiplexing protocol message header of the PDN response data.
  • the communication module may construct the response multiplexing protocol message header based on the path identifier and the preset value of the data type marker position of the response multiplexing protocol message header.
  • the preset multiplexing protocol message header format is octet (the Internet standard uses octets), wherein octets are divided into four groups, the first group is filled with the data type flag position, and the vacant position is filled with eight The second group is filled with the channel identifier, and the third group and the fourth group are filled with the data packet capacity respectively; based on the above-filled multiplexing protocol message header as the constructed response multiplexing protocol message header.
  • Step 508 Generate a response data packet according to the PDN response data and the response multiplexing protocol message header.
  • the communication module encapsulates the PDN response data and the response multiplexing protocol message header, and generates a response data packet.
  • PDN response data is added after the fourth group of the response multiplexing protocol message header octet, and a data packet encapsulation tool is used to encapsulate the response multiplexing protocol message header and the PDN response data to generate a response data packet.
  • Step 510 Send a response data packet through the data transmission path.
  • the local end of the communication module After the local end of the communication module generates the response data packet, it will send the response data packet to the host through the local bus interface, such as the PCIe interface, so that the host can receive the response data packet and send the response data packet to the corresponding on the PDN pathway.
  • the local bus interface such as the PCIe interface
  • the PDN response data is received through multiple PDN data paths, the path identifier of the PDN data path through which the PDN response data passes is obtained, and the response multiplexing protocol message header is constructed according to the preset multiplexing protocol message header format.
  • the response data and the response multiplexing protocol message header generate response data packets, and send the response data packets through the data transmission path.
  • the purpose of using the communication module to transmit the response data packet to the host can be achieved.
  • the data capacity filling part of the response multiplexing protocol message header is filled with the response data capacity determined by the communication module according to the current network quality parameter; according to the PDN response data and the response multiplexing protocol message
  • the header generates the response packet, including:
  • Step 602 based on the PDN response data, re-determine the packet data to be sent according to the response data capacity.
  • the packet data to be sent refers to the PDN response data to be sent and divided into data packets with a certain capacity.
  • the PDN response data before sending the PDN response data, according to the current network quality parameter, can be divided into data packets, and the data packets can ensure the range that the current network can bear during the transmission process.
  • the communication module may divide the PDN response data into data packets with the set response data capacity based on the setting operation on the data packet size, and determine the data packet as the data to be sent.
  • Step 604 Assemble the response multiplexing protocol message header and the packet data to be sent to obtain a response data packet.
  • the communication module may generate a response data packet by adding a response multiplexing protocol message header to the packet data to be sent. So that after the packet data to be sent in the communication module is sent to the host, the host can parse the PDN data in the packet, and send the parsed data to the corresponding PDN path.
  • the PDN response data by processing the PDN response data according to the response data capacity and re-determining the packet data to be sent, and assembling the response multiplexing protocol message header and the packet data to be sent to obtain the response data packet, it is possible to determine the transmission size of the response data packet according to the response data capacity.
  • the purpose is to prevent the problem of low transmission accuracy caused by the mismatch between the network quality parameters and the response data capacity, and improve the accuracy of data communication.
  • the data communication between the 5G communication module and the Host is taken as an example.
  • the 5G communication module and the host can be separate modules or integrated modules.
  • a control channel can be set based on the PCIe interface of the bus interface of the 5G module for the establishment and maintenance of multiple PDN connections; the software interface of the control channel on the Host side is serial port /dev/mhi_ctrl.
  • a data transmission channel is set for multiplexing transmission of multiple channels of PDN data; the software interface of the data transmission channel on the Host side is the network port pcie_mhi0.
  • multiplexed PDN communication data can be multiplexed and transmitted on the physical data path based on the data multiplexing protocol.
  • the control path is used for the transmission of control information between the Host and the 5G communication module, and the PDN data communication is established by using the control path; the data transmission path is used to transmit PDN communication data, and multiple PND communication data are repeated on the data transmission path. use transmission.
  • the Host performs multi-channel PDN dialing based on the control channel through the multi-channel dialing tool of the local end, and the dialing parameter is the PDN channel identifier corresponding to the PDN data to be transmitted.
  • the Host dials into the network successfully, it obtains the assigned IP (Internet Protocol Address) address; the IP address can be used as a parameter in the data packet during communication data transmission.
  • the Host can add the communication data to be transmitted by the local end to the 5G communication module through the data transmission channel after adding the data multiplexing protocol message header.
  • the 5G communication module After receiving the communication data after adding the data multiplexing protocol message header transmitted by the Host, the 5G communication module parses the data multiplexing protocol message header, obtains the PDN path identifier, and removes the communication data after the data multiplexing protocol message header. It is transmitted to the PDN channel corresponding to the PDN channel identifier.
  • the 5G communication module adds a data multiplexing protocol message header to the PDN data received from the air interface, and sends the PDN data to which the data multiplexing protocol message header is added to the Host through a data transmission path on the PCIe bus, and the Host receives After receiving the data, the data transmission channel parses out different PDN channel identifiers according to the data multiplexing protocol message header, and transmits the PDN data after removing the data multiplexing protocol message header to the upper-layer application program corresponding to the PDN channel identifier.
  • the specific fields of the data multiplexing protocol message header are expressed as Octet, that is, the Internet standard uses octets, and the data multiplexing protocol message header is divided into four groups of fields.
  • the group field includes the data type of the communication data
  • the second group field includes the path identifier of the communication data to be transmitted
  • the third group field includes the size of each transmission data packet in the communication data transmission process.
  • the 5G communication module can parse out the channel identifier MUX_ID when receiving the data packet, and real-time the data packet according to the channel identifier MUX_ID sent to the corresponding PDN channel.
  • the bit for the reserved data type can also be determined by the second byte bit R in the first group of fields, and R can be set according to the actual application scenario.
  • the third group of fields and the fourth group of fields in the data multiplexing protocol message header carry the padding value of the data packet capacity, the third group of fields and the fourth group of fields.
  • the set field of the group field is represented as PAYLOAD_LEN_WITH_PADDING, and the size of the IP data packet sent each time can be limited by the padding value in this field, so that the sent data packet matches the network quality parameter.
  • MAP_HDR is represented as a data multiplexing protocol message header, and each time the Host or 5G communication module sends data, the data multiplexing protocol message header is added to the corresponding IP data packet ( IP Packet), after data encapsulation, the encapsulated data packet is sent.
  • IP Packet IP data packet
  • steps in the flowcharts of FIGS. 2-6 are shown in sequence according to the arrows, these steps are not necessarily executed in the sequence shown by the arrows. Unless explicitly stated herein, the execution of these steps is not strictly limited to the order, and these steps may be performed in other orders. Moreover, at least a part of the steps in FIGS. 2-6 may include multiple steps or multiple stages. These steps or stages are not necessarily executed and completed at the same time, but may be executed at different times. The execution of these steps or stages The order is also not necessarily sequential, but may be performed alternately or alternately with other steps or at least a portion of the steps or phases within the other steps.
  • a data communication apparatus 900 including: a multi-channel PDN data channel establishment module 902, a data packet receiving module 904, a channel identification obtaining module 906, and a PDN data sending module 908, Wherein: the multi-channel PDN data path establishment module 902 is used to exchange control information with the host through the control path divided from the bus interface, and establish a multi-channel PDN data path; the data packet receiving module 904 is used to pass the slave bus interface.
  • the divided data transmission path receives the data packets transmitted by the host multiplexed data transmission path; the path identification obtaining module 906 is used to parse the multiplexing protocol message header in the data packet to obtain the path identification; the PDN data sending module 908 is used for The PDN data in the data packet is sent through the PDN data paths corresponding to the path identifiers in the multi-path PDN data paths.
  • the path identifier obtaining module 906 includes: a data type flag bit parsing unit, configured to parse the data type flag bit of the multiplexing protocol message header in the data packet according to a preset multiplexing protocol message header format; the path The identifier extraction unit is used for extracting the path identifier from the path identifier filling part of the multiplexing protocol message header according to the multiplexing protocol message header format when the data type flag bit is a preset value indicating that the PDN data is carried.
  • the apparatus includes: a data capacity reading unit, configured to read the data capacity filled by the data capacity filling part of the multiplexing protocol message header according to the multiplexing protocol message header format; The parameters are dynamically determined; the PDN data verification unit is used to verify the PDN data in the data packet according to the data capacity; the PDN data transmission module is used to perform the multi-channel PDN data path and path identification when the verification is passed. The corresponding PDN data path sends the PDN data in the data packet.
  • the apparatus includes: a PDN response data receiving unit, configured to receive PDN response data through multiple PDN data paths; a path identifier acquiring unit, configured to acquire a path identifier of the PDN data path through which the PDN response data passes; A protocol message header construction unit is used to construct a response multiplexing protocol message header according to a preset multiplexing protocol message header format; the data type flag position of the response multiplexing protocol message header is a preset value indicating that the PDN data is carried, and the response The path identification filling part of the multiplexing protocol message header is filled with the obtained path identification; the response packet generating unit is used to generate a response packet according to the PDN response data and the response multiplexing protocol message header; the response packet sending module is used to pass Data transmission path, sending response packets.
  • a PDN response data receiving unit configured to receive PDN response data through multiple PDN data paths
  • a path identifier acquiring unit configured to acquire a path identifier of the PDN data path through which the PDN response data
  • the response data packet generating unit is configured to re-determine the packet data to be sent based on the PDN response data according to the capacity of the response data; and assemble the response multiplexing protocol message header and the packet data to be sent to obtain the response data packet.
  • Each module in the above-mentioned data communication device may be implemented in whole or in part by software, hardware and combinations thereof.
  • the above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
  • a computer device is provided, and the computer device may be a terminal, and its internal structure diagram may be as shown in FIG. 10 .
  • the computer equipment includes a processor, memory, a communication interface, a display screen, and an input device connected by a system bus.
  • the processor of the computer device is used to provide computing and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium, an internal memory.
  • the nonvolatile storage medium stores an operating system and a computer program.
  • the internal memory provides an environment for the execution of the operating system and computer programs in the non-volatile storage medium.
  • the communication interface of the computer device is used for wired or wireless communication with an external terminal, and the wireless communication can be realized by WIFI, operator network, NFC (Near Field Communication) or other technologies.
  • the computer program when executed by a processor, implements a data communication method.
  • the display screen of the computer equipment may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment may be a touch layer covered on the display screen, or a button, a trackball or a touchpad set on the shell of the computer equipment , or an external keyboard, trackpad, or mouse.
  • FIG. 10 is only a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied. Include more or fewer components than shown in the figures, or combine certain components, or have a different arrangement of components.
  • a computer device including a memory and a processor, where a computer program is stored in the memory, and the processor implements the steps in the foregoing method embodiments when the processor executes the computer program.
  • a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, implements the steps in the foregoing method embodiments.
  • Non-volatile memory may include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, or optical memory, and the like.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • the RAM may be in various forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present application relates to a data communication method and apparatus, a computer device, and a storage medium. The method comprises: performing control information interaction with a host by means of a control path divided from a bus interface, and establishing a plurality of PDN data paths; by means of a data transmission path divided from the bus interface, receiving a data packet transmitted by the host multiplexing the data transmission path; parsing a multiplexing protocol message header in the data packet to obtain a path identifier; and sending PDN data in the data packet by means of the PDN data path corresponding to the path identifier in the plurality of PDN data paths.

Description

数据通信方法、装置、计算机设备和存储介质Data communication method, apparatus, computer equipment and storage medium
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本申请要求2021年04月25日递交的、标题为“数据通信方法、装置、计算机设备和存储介质”、申请号为2021104483631的中国申请的优先权,其公开内容通过引用全部结合在本申请中。This application claims the priority of the Chinese application filed on April 25, 2021, entitled "Data Communication Method, Apparatus, Computer Equipment, and Storage Medium" and No. 2021104483631, the disclosure of which is fully incorporated into this application by reference .
技术领域technical field
本申请涉及通信技术领域,特别是涉及一种数据通信方法、装置、计算机设备和存储介质。The present application relates to the field of communication technologies, and in particular, to a data communication method, apparatus, computer equipment and storage medium.
背景技术Background technique
随着通信技术的发展,公用数据网PDN(Public Data Network)也有了广泛的应用。PDN是一种由电信运营商组建的广域网,能够提供接入广域网的服务与技术,为用户提供高质量数据传输服务。通过PDN可以实现通信数据的高速传输。例如,可以实现通信模块和与之连接的终端之间的高速数据传输,或者可以实现将通信模块作为中间传输媒介,主机与终端之间的高速数据传输等。With the development of communication technology, PDN (Public Data Network) has also been widely used. PDN is a wide area network established by telecom operators, which can provide services and technologies for accessing the wide area network, and provide users with high-quality data transmission services. High-speed transmission of communication data can be achieved through PDN. For example, high-speed data transmission between the communication module and the terminal connected to it can be implemented, or high-speed data transmission between the host and the terminal can be implemented using the communication module as an intermediate transmission medium.
发明内容SUMMARY OF THE INVENTION
本申请提供一种能够提高数据通信效率的数据通信方法、装置、计算机设备和存储介质。The present application provides a data communication method, apparatus, computer equipment and storage medium capable of improving data communication efficiency.
一种数据通信方法,所述方法包括:通过从总线接口划分出的控制通路,与主机进行控制信息的交互,建立多路PDN数据通路;通过从所述总线接口划分出的数据传输通路,接收所述主机复用所述数据传输通路传输的数据包;解析所述数据包中的复用协议消息头,获得通路标识;通过所述多路PDN数据通路中与所述通路标识对应的PDN数据通路,发送所述数据包中的PDN数据。A data communication method, the method comprising: interacting control information with a host through a control path divided from a bus interface to establish multiple PDN data paths; The host multiplexes the data packets transmitted by the data transmission path; parses the multiplexing protocol message header in the data packet to obtain the path identifier; passes the PDN data corresponding to the path identifier in the multiple PDN data paths channel, and send the PDN data in the data packet.
在其中一个实施例中,所述解析所述数据包中的复用协议消息头,获得通路标识,包括:按照预设的复用协议消息头格式,解析所述数据包中的复用协议消息头的数据类型标志位;当所述数据类型标志位是表示携带PDN数据的预设值时,按照所述复用协议消息头格式,从所述复用协议消息头的通路标识填充部提取出通路标识。In one embodiment, the parsing the multiplexing protocol message header in the data packet to obtain the path identifier includes: parsing the multiplexing protocol message in the data packet according to a preset multiplexing protocol message header format The data type flag bit of the header; when the data type flag bit is a preset value indicating that the PDN data is carried, according to the multiplexing protocol message header format, extract from the path identifier filling part of the multiplexing protocol message header. Path identification.
在其中一个实施例中,所述方法还包括:按照所述复用协议消息头格式,读取所述复用协议消息头的数据容量填充部所填充的数据容量;所述数据容量是所述主机基于网络质量参数动态确定的;按照所述数据容量,校验所述数据包中的PDN数据;当校验通过时,执行所述通过所述多路PDN数据通路中与所述通路标识对应的PDN数据通路,发送所述数据包中的PDN数据。In one embodiment, the method further includes: reading the data capacity filled in the data capacity filling part of the multiplexing protocol message header according to the multiplexing protocol message header format; the data capacity is the The host is dynamically determined based on network quality parameters; according to the data capacity, the PDN data in the data packet is verified; when the verification is passed, the execution of the multi-channel PDN data path corresponding to the path identifier is executed. the PDN data path, and send the PDN data in the data packet.
在其中一个实施例中,所述方法还包括:通过所述多路PDN数据通路接收PDN响应数据;获取所述PDN响应数据所经过PDN数据通路的通路标识;按照预设的复用协议消息头格式,构造响应复用协议消息头;所述响应复用协议消息头的数据类型标志位置为表示携带PDN数据的预设值,所述响应复用协议消息头的通路标识填充部填充有获取的通路标识;根据所述PDN响应数据和所述响应复用协议消息头生成响应数据包;通过所述数据传输通路,发送所述响应数据包。In one embodiment, the method further includes: receiving PDN response data through the multiplex PDN data paths; acquiring a path identifier of the PDN data path through which the PDN response data passes; and according to a preset multiplexing protocol message header format, construct the response multiplexing protocol message header; the data type flag position of the response multiplexing protocol message header is a preset value indicating that the PDN data is carried, and the path identifier filling part of the response multiplexing protocol message header is filled with the obtained channel identification; generating a response data packet according to the PDN response data and the response multiplexing protocol message header; sending the response data packet through the data transmission channel.
在其中一个实施例中,所述响应复用协议消息头的数据容量填充部,填充有所述通信模块根据当前的网络质量参数确定的响应数据容量;所述根据所述PDN响应数据和所述响应复用协议消息头生成响应数据包,包括:基于所述PDN响应数据,按照所述响应数据容量重新确定待发包数据;将所述响应复用协议消息头和所述待发包数据组装得到响应数据包。In one embodiment, the data capacity filling part of the response multiplexing protocol message header is filled with the response data capacity determined by the communication module according to the current network quality parameter; the response data according to the PDN response data and the Generating a response data packet in response to the multiplexing protocol message header includes: based on the PDN response data, re-determining the packet data to be sent according to the response data capacity; assembling the response multiplexing protocol message header and the packet data to be sent to obtain a response data pack.
一种数据通信装置,所述装置包括:多路PDN数据通路建立模块,用于通过从总线接口划分出的控制通路,与主机进行控制信息的交互,建立多路PDN数据通路;数据包接收模块,用于通过从所述总线接口划分出的数据传输通路,接收所述主机复用所述数据传输通路传输的数据包;通路标识获得模块,用于解析所述数据包中的复用协议消息头,获得通路标识;PDN数据发送模块,用于通过所述多路PDN数据通路中与所述通路标识对应的PDN数据通路,发送所述数据包中的PDN数据。A data communication device, the device comprises: a multi-channel PDN data path establishment module for interacting control information with a host through a control path divided from a bus interface to establish a multi-channel PDN data path; a data packet receiving module , for receiving the data packets transmitted by the host multiplexing the data transmission path through the data transmission path divided from the bus interface; the path identification obtaining module is used for parsing the multiplexing protocol message in the data packet header, to obtain a path identifier; a PDN data sending module, configured to send the PDN data in the data packet through the PDN data path corresponding to the path identifier in the multi-path PDN data paths.
在其中一个实施例中,通路标识获得模块包括:数据类型标志位解析单元,用于按照预设的复用协议消息头格式,解析所述数据包中的复用协议消息头的数据类型标志位;通路标识提取单元,用于当所述数据类型标志位是表示携带PDN数据的预设值时,按照所述复用协议消息头格式,从所述复用协议消息头的通路标识填充部提取出通路标识。In one embodiment, the path identification obtaining module includes: a data type flag bit parsing unit, configured to parse the data type flag bit of the multiplexing protocol message header in the data packet according to a preset multiplexing protocol message header format The path identification extraction unit is used to extract the path identification filling part from the path identification filling part of the multiplexing protocol message header according to the multiplexing protocol message header format when the data type flag bit is a preset value representing carrying PDN data. Exit path identification.
在其中一个实施例中,所述装置包括:数据容量读取单元,用于按照所述复用协议消息头格式,读取所述复用协议消息头的数据容量填充部所填充的数据容量;所述数据容量是所述主机基于网络质量参数动态确定的;PDN数据校验单元,用于按照所述数据容量,校验所述数据包中的PDN数据;PDN数据发送模块,用于当校验通过时,执行所述通过 所述多路PDN数据通路中与所述通路标识对应的PDN数据通路,发送所述数据包中的PDN数据。In one embodiment, the apparatus includes: a data capacity reading unit, configured to read the data capacity filled by the data capacity filling part of the multiplexing protocol message header according to the multiplexing protocol message header format; The data capacity is dynamically determined by the host based on the network quality parameter; the PDN data verification unit is used to verify the PDN data in the data packet according to the data capacity; the PDN data sending module is used to be a school When the verification is passed, the passing of the PDN data path corresponding to the path identifier in the multi-path PDN data paths is performed, and the PDN data in the data packet is sent.
在其中一个实施例中,所述装置包括:PDN响应数据接收单元,用于通过所述多路PDN数据通路接收PDN响应数据;通路标识获取单元,用于获取所述PDN响应数据所经过PDN数据通路的通路标识;响应复用协议消息头构造单元,用于按照预设的复用协议消息头格式,构造响应复用协议消息头;所述响应复用协议消息头的数据类型标志位置为表示携带PDN数据的预设值,所述响应复用协议消息头的通路标识填充部填充有获取的通路标识;响应数据包生成单元,用于根据所述PDN响应数据和所述响应复用协议消息头生成响应数据包;响应数据包发送模块,用于通过所述数据传输通路,发送所述响应数据包。In one of the embodiments, the apparatus includes: a PDN response data receiving unit, configured to receive PDN response data through the multi-channel PDN data paths; a channel identifier obtaining unit, configured to obtain the PDN data passed by the PDN response data The path identifier of the path; the response multiplexing protocol message header construction unit is used to construct the response multiplexing protocol message header according to the preset multiplexing protocol message header format; the data type flag position of the response multiplexing protocol message header is indicated Carrying the preset value of the PDN data, the path identifier filling part of the response multiplexing protocol message header is filled with the acquired path identifier; the response data packet generating unit is used for according to the PDN response data and the response multiplexing protocol message. The header generates a response data packet; the response data packet sending module is configured to send the response data packet through the data transmission path.
在其中一个实施例中,响应数据包生成单元用于基于所述PDN响应数据,按照所述响应数据容量重新确定待发包数据;将所述响应复用协议消息头和所述待发包数据组装得到响应数据包。In one embodiment, the response data packet generating unit is configured to re-determine the packet data to be sent according to the response data capacity based on the PDN response data; assemble the response multiplexing protocol message header and the packet data to be sent to obtain response packet.
一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现以下步骤:通过从总线接口划分出的控制通路,与主机进行控制信息的交互,建立多路PDN数据通路;通过从所述总线接口划分出的数据传输通路,接收所述主机复用所述数据传输通路传输的数据包;解析所述数据包中的复用协议消息头,获得通路标识;通过所述多路PDN数据通路中与所述通路标识对应的PDN数据通路,发送所述数据包中的PDN数据。A computer device, comprising a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program: interacting with a host computer for control information through a control path divided from a bus interface , establish a multiplex PDN data path; receive the data packet transmitted by the host multiplexing the data transmission path through the data transmission path divided from the bus interface; parse the multiplexing protocol message header in the data packet, Obtain a path identifier; and send the PDN data in the data packet through the PDN data path corresponding to the path identifier in the multi-path PDN data paths.
一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现以下步骤:通过从总线接口划分出的控制通路,与主机进行控制信息的交互,建立多路PDN数据通路;通过从所述总线接口划分出的数据传输通路,接收所述主机复用所述数据传输通路传输的数据包;解析所述数据包中的复用协议消息头,获得通路标识;通过所述多路PDN数据通路中与所述通路标识对应的PDN数据通路,发送所述数据包中的PDN数据。A computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: through a control path divided from a bus interface, the interaction of control information with a host is carried out, and a multi-path PDN is established. data path; receive the data packet transmitted by the host multiplexing the data transmission path through the data transmission path divided from the bus interface; parse the multiplexing protocol message header in the data packet to obtain the path identifier; The PDN data channel corresponding to the channel identifier in the multi-channel PDN data channel sends the PDN data in the data packet.
上述数据通信方法、装置、计算机设备和存储介质,通过从总线接口划分出的控制通路,与主机进行控制信息的交互,建立多路PDN数据通路;通过从总线接口划分出的数据传输通路,接收主机复用数据传输通路传输的数据包;解析数据包中的复用协议消息头,获得通路标识;通过多路PDN数据通路中与通路标识对应的PDN数据通路,发送数据包中的PDN数据。可以从总线接口分别划分出控制通路和数据传输通路,使控制信息和数 据传输分开,互不影响,保证数据传输过程的传输效率。同时,可以通过通路标识识别对应的PDN数据通路,发送数据包中的PDN数据,能够快速确定需要发送的数据通道,从而提高了数据通信的效率。The above-mentioned data communication method, device, computer equipment and storage medium, through the control path divided from the bus interface, interact with the host for control information, and establish a multi-channel PDN data path; through the data transmission path divided from the bus interface, receive The host multiplexes the data packets transmitted by the data transmission channel; parses the multiplexing protocol message header in the data packet to obtain the channel identifier; sends the PDN data in the data packet through the PDN data channel corresponding to the channel identifier in the multi-channel PDN data channel. The control path and the data transmission path can be divided separately from the bus interface, so that the control information and the data transmission are separated without affecting each other, so as to ensure the transmission efficiency of the data transmission process. At the same time, the corresponding PDN data path can be identified through the path identifier, the PDN data in the data packet can be sent, and the data path to be sent can be quickly determined, thereby improving the efficiency of data communication.
附图说明Description of drawings
图1为一个实施例中数据通信方法的应用环境图;Fig. 1 is the application environment diagram of the data communication method in one embodiment;
图2为一个实施例中数据通信方法的流程示意图;2 is a schematic flowchart of a data communication method in one embodiment;
图3为一个实施例中解析数据包中的复用协议消息头,获得通路标识步骤的流程示意图;3 is a schematic flowchart of steps of parsing a multiplexing protocol message header in a data packet to obtain a path identifier in one embodiment;
图4为另一个实施例中数据通信方法的流程示意图;4 is a schematic flowchart of a data communication method in another embodiment;
图5为另一个实施例中数据通信方法的流程示意图;5 is a schematic flowchart of a data communication method in another embodiment;
图6为另一个实施例中数据通信方法的流程示意图;6 is a schematic flowchart of a data communication method in another embodiment;
图7为一个实施例中数据通信过程中复用协议消息头的示意图;7 is a schematic diagram of multiplexing protocol message headers in a data communication process in one embodiment;
图8为一个实施例中数据通信过程中数据包的示意图;8 is a schematic diagram of a data packet in a data communication process in one embodiment;
图9为一个实施例中数据通信装置的结构框图;9 is a structural block diagram of a data communication apparatus in one embodiment;
图10为一个实施例中计算机设备的内部结构图。Figure 10 is a diagram of the internal structure of a computer device in one embodiment.
具体实施方式Detailed ways
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application will be described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application.
本申请提供的数据通信方法,可以应用于如图1所示的应用环境中,具体应用到一种数据通信系统中。该数据通信系统包括主机102和通信模块104,其中,主机102通过总线与通信模块104进行通信。通信模块104执行一种数据通信方法,具体的,通信模块104通过从总线接口划分出的控制通路,与主机102进行控制信息的交互,建立多路PDN数据通路;通过从总线接口划分出的数据传输通路,接收主机102复用数据传输通路传输的数据包;并通过通信模块104解析数据包中的复用协议消息头,获得通路标识;通过多路PDN数据通路中与通路标识对应的PDN数据通路,发送数据包中的PDN数据。其中,主机102可以但不限于是各种计算机系统、个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备;通信模块104可以用独立于终端的,用于进行数据通信的模块; 也可以是集成在终端中的,用于数据通信的模块。服务器或者是多个服务器组成的服务器集群来实现。The data communication method provided by the present application can be applied to the application environment shown in FIG. 1 , and is specifically applied to a data communication system. The data communication system includes a host 102 and a communication module 104, wherein the host 102 communicates with the communication module 104 through a bus. The communication module 104 executes a data communication method. Specifically, the communication module 104 exchanges control information with the host 102 through the control path divided from the bus interface, and establishes multiple PDN data paths; The transmission path receives the data packets transmitted by the multiplexed data transmission path of the host 102; and parses the multiplexing protocol message header in the data packet through the communication module 104 to obtain the path identification; through the PDN data corresponding to the path identification in the multiple PDN data paths The channel sends the PDN data in the data packet. Wherein, the host 102 can be, but is not limited to, various computer systems, personal computers, notebook computers, smart phones, tablet computers and portable wearable devices; the communication module 104 can be a module independent of the terminal for data communication; It can be a module integrated in the terminal for data communication. It is implemented by a server or a server cluster composed of multiple servers.
在一个实施例中,如图2所示,提供了一种数据通信方法,以该方法应用于图1中的通信模块为例进行说明,包括以下步骤:In one embodiment, as shown in FIG. 2, a data communication method is provided, and the method is applied to the communication module in FIG. 1 as an example for description, including the following steps:
步骤202,通过从总线接口划分出的控制通路,与主机进行控制信息的交互,建立多路PDN数据通路。In step 202, multiple PDN data paths are established by exchanging control information with the host through the control paths divided from the bus interface.
其中,总线接口是指能够为总线的接入提供连接的接口。例如,通信模块中的PCIe(peripheral component interconnect express)接口、I 2C(I-squared-C)接口或者USB(Universal Serial Bus)接口等。控制通路是指主机向通信模块发送控制信息的通路。控制信息是指主机向通信模块发送的,用于控制通信模块执行某项操作的信息。PDN数据通路是指能够传输PDN数据的通路。 The bus interface refers to an interface that can provide connections for bus access. For example, a PCIe (peripheral component interconnect express) interface, an I 2 C (I-squared-C) interface, or a USB (Universal Serial Bus) interface in the communication module. The control path refers to the path through which the host sends control information to the communication module. Control information refers to the information sent by the host to the communication module to control the communication module to perform an operation. A PDN data path refers to a path capable of transmitting PDN data.
具体地,主机通过通信模块传输多路PDN数据之前,主机需要将本端的控制信息传输给通信模块,以使通信模块可以通过控制信息进行多路PDN数据的传输。通信模块可以利用通信模块总线接口与主机连接的预设的虚拟接口划分出控制通道。Specifically, before the host transmits the multi-channel PDN data through the communication module, the host needs to transmit the local control information to the communication module, so that the communication module can transmit the multi-channel PDN data through the control information. The communication module can divide the control channel by using the preset virtual interface connected with the host by the bus interface of the communication module.
在一个实施例中,利用通信模块的PCIe接口连接的PCIe总线,通过软件划分出控制通路,利用主机侧/dev/mhi_ctrl接口下的相关配置项进行配置,将总线接口划分出的控制通路,通过该控制通路实现控制信息的交互。In one embodiment, the PCIe bus connected by the PCIe interface of the communication module is used to divide the control path through software, and the relevant configuration items under the /dev/mhi_ctrl interface on the host side are used for configuration, and the control path divided by the bus interface is divided by The control path realizes the exchange of control information.
步骤204,通过从总线接口划分出的数据传输通路,接收主机复用数据传输通路传输的数据包。Step 204: Receive the data packets transmitted by the host multiplexed data transmission channel through the data transmission channel divided from the bus interface.
其中,数据传输通路是指用于传输数据的通路。复用是指重复使用传输通路进行数据包的传输。数据包是指进行数据传输时每一次传输的数据。Among them, the data transmission path refers to the path used for transmitting data. Multiplexing refers to the reuse of transmission paths for data packet transmission. A data packet refers to the data transmitted each time during data transmission.
具体的,主机通过通信模块传输本端将要传输给终端的数据,可以通过主机与通信模块连接的总线接口划分出的数据传输通路,通过该数据传输通路,主机可以将要传输的数据的数据包不断的从该数据传输通路传输给通信模块。相应的,通信模块可以通过该数据传输通路接收到主机发送的数据包。通信模块可以利用通信模块总线接口与主机的预设的虚拟接口划分出数据传输通道。通过通信模块本端的数据接收单元接收主机发送的数据包。Specifically, the host transmits the data to be transmitted to the terminal from the local end through the communication module, and can use the data transmission path divided by the bus interface connected between the host and the communication module. Through this data transmission path, the host can continuously transmit the data packets of the data to be transmitted. is transmitted from the data transmission path to the communication module. Correspondingly, the communication module can receive the data packet sent by the host through the data transmission path. The communication module can use the communication module bus interface and the preset virtual interface of the host to divide the data transmission channel. The data packets sent by the host are received through the data receiving unit at the local end of the communication module.
在一个实施例中,通信模块利用本端的PCIe接口连接的PCIe总线,软件划分出控制通路,利用主机侧/pcie_mhio接口下的相关配置项进行配置,将总线接口划分出数据传输通路,通过该数据传输通路接收主机发送的数据包。In one embodiment, the communication module uses the PCIe bus connected by the PCIe interface of the local end, and the software divides the control path, uses the relevant configuration items under the host side /pcie_mhio interface for configuration, and divides the bus interface into a data transmission path. The transmission path receives packets sent by the host.
在一个实施例中,通信模块通过从总线接口划分出的数据传输通路,调整主机与通信模块的相关传输参数,例如,波特率、频率或者MTU(Maximum Transmission Unit)等。通过同步时分复用或者异步十分复用的方式接收主机通过数据传输通路传输的数据包。In one embodiment, the communication module adjusts the relevant transmission parameters between the host and the communication module, such as baud rate, frequency, or MTU (Maximum Transmission Unit), through the data transmission path divided from the bus interface. The data packets transmitted by the host through the data transmission channel are received by means of synchronous time division multiplexing or asynchronous full multiplexing.
步骤206,解析数据包中的复用协议消息头,获得通路标识。Step 206: Parse the multiplexing protocol message header in the data packet to obtain the path identifier.
其中,复用协议消息头是指能够确定数据包的类型或者大小等信息的,数据包的头部信息。通路标识是指能够唯一确定通路的标志性信息。例如,通路标识为通路的ID(Identity document)。Wherein, the multiplexing protocol message header refers to the header information of the data packet, which can determine information such as the type or size of the data packet. The path identifier refers to the symbolic information that can uniquely determine the path. For example, a pathway is identified as the ID (Identity document) of the pathway.
具体的,通信模块可以通过解析数据包中复用协议消息头中的预设字段位置找到预设字段内的填充值,通过该填充值,获得通路标识。例如,利用复用协议消息头的第二个字段处的填充值,获得通路标识。Specifically, the communication module can find the padding value in the preset field by analyzing the position of the preset field in the header of the multiplexing protocol message in the data packet, and obtain the path identifier through the padding value. For example, the path identification is obtained using the padding value at the second field of the multiplexing protocol message header.
在一个实施例中,通信模块通过数据包分析工具对接收到的数据包的复用协议消息头进行分析,获得通路标识。例如,可以通过抓包工具对接收到的数据包的复用协议消息头的第二个字段进行解析,解析得到的值为获得的通路标识。In one embodiment, the communication module analyzes the multiplexing protocol message header of the received data packet by using a data packet analysis tool to obtain the path identifier. For example, the second field of the multiplexing protocol message header of the received data packet may be parsed by a packet capture tool, and the value obtained by the analysis is the obtained path identifier.
步骤208,通过多路PDN数据通路中与通路标识对应的PDN数据通路,发送数据包中的PDN数据。Step 208: Send the PDN data in the data packet through the PDN data channel corresponding to the channel identifier in the multi-channel PDN data channel.
具体的,每路的PDN数据通路都具有对应的通路标识,在通信模块得到数据包并通过解析数据包获得通路标识之后,会触发对数据包的发送操作,基于该发送操作发送数据包中的PDN数据。Specifically, each PDN data path has a corresponding path identifier. After the communication module obtains the data packet and obtains the path identifier by parsing the data packet, it will trigger the sending operation of the data packet, and send the data packet based on the sending operation. PDN data.
在一个实施例中,在通信模块上解析出消息头之后,将去掉协议头的数据包发送到通路标识对应的PDN数据通路,也即在通信模块发送数据包时,只发送数据包中的原始数据,以便于接收通信模块发送数据包的上层应用程序准确高效的使用接收到的数据包。In one embodiment, after the message header is parsed on the communication module, the data packet with the protocol header removed is sent to the PDN data path corresponding to the path identifier, that is, when the communication module sends the data packet, only the original data in the data packet is sent. data, so that the upper-layer application program that receives the data packet sent by the communication module can use the received data packet accurately and efficiently.
上述数据通信方法中,通过从总线接口划分出的控制通路,与主机进行控制信息的交互,建立多路PDN数据通路;通过从总线接口划分出的数据传输通路,接收主机复用数据传输通路传输的数据包;解析数据包中的复用协议消息头,获得通路标识;通过多路PDN数据通路中与通路标识对应的PDN数据通路,发送数据包中的PDN数据。可以从总线接口分别划分出控制通路和数据传输通路,使控制信息和数据传输分开,互不影响,保证数据传输过程的传输效率。同时,可以通过通路标识识别对应的PDN数据通路,发送数据包中的PDN数据,能够快速确定需要发送的数据通道,从而提高了数据通信的效率。In the above data communication method, through the control path divided from the bus interface, the control information is exchanged with the host to establish multiple PDN data paths; through the data transmission path divided from the bus interface, the host receives the multiplexed data transmission path transmission. parse the multiplexing protocol message header in the data packet to obtain the path identifier; send the PDN data in the data packet through the PDN data path corresponding to the path identifier in the multi-path PDN data path. The control path and the data transmission path can be separately divided from the bus interface, so that the control information and the data transmission are separated without affecting each other, and the transmission efficiency of the data transmission process is guaranteed. At the same time, the corresponding PDN data path can be identified through the path identifier, the PDN data in the data packet can be sent, and the data path to be sent can be quickly determined, thereby improving the efficiency of data communication.
在一个实施例中,如图3所示,解析数据包中的复用协议消息头,获得通路标识包括:In one embodiment, as shown in FIG. 3 , parsing the multiplexing protocol message header in the data packet to obtain the path identifier includes:
步骤302,按照预设的复用协议消息头格式,解析数据包中的复用协议消息头的数据类型标志位。Step 302: Parse the data type flag bit of the multiplexing protocol message header in the data packet according to the preset multiplexing protocol message header format.
其中,复用协议消息头格式是指复用协议消息头的字段组成格式。数据类型标志位是指能够表示数据包的数据类型的字段位置。其中,字段是指处在协议消息头中字节位或者字节位范围,一个字段包括八个字节位。例如,协议消息头中第一个字节位或者第一个字节位到第八个字节位的字节位范围。The multiplexing protocol message header format refers to the field composition format of the multiplexing protocol message header. The data type flag bit refers to the field position that can indicate the data type of the data packet. Wherein, the field refers to the byte or byte range in the protocol message header, and one field includes eight bytes. For example, the first byte or the byte range from the first byte to the eighth byte in the protocol message header.
具体的,在发送的数据包中的复用协议消息头存在预先设置的复用协议消息头格式,通过上述复用协议消息头格式可以解析出相应的数据类型标志位。Specifically, the multiplexing protocol message header in the sent data packet has a preset multiplexing protocol message header format, and the corresponding data type flag bit can be parsed through the above-mentioned multiplexing protocol message header format.
在一个实施例中,主机发送数据包时,将数据包中的复用协议消息头的第一个字节位预设为复用协议消息头的数据类型标志位;当通信模块接收到数据包时,解析数据包中的复用协议消息头的第一个字节位,得到数据包对应的数据类型标志位。In one embodiment, when the host sends a data packet, the first byte of the multiplexing protocol message header in the data packet is preset as the data type flag bit of the multiplexing protocol message header; when the communication module receives the data packet When , the first byte of the multiplexing protocol message header in the data packet is parsed, and the data type flag bit corresponding to the data packet is obtained.
步骤304,当数据类型标志位是表示携带PDN数据的预设值时,按照复用协议消息头格式,从复用协议消息头的通路标识填充部提取出通路标识。Step 304, when the data type flag bit is a preset value indicating that the PDN data is carried, extract the path identifier from the path identifier filling part of the multiplexing protocol message header according to the multiplexing protocol message header format.
其中,通路标识填充部是指在复用协议消息头中,能够填充通路标识的字节位或者字节位范围。Wherein, the channel identifier filling part refers to the byte bits or the byte bit range capable of filling the channel identifier in the multiplexing protocol message header.
具体的,在通信模块按照预设的复用协议消息头格式,解析数据包中的复用协议消息头的数据类型标志位之后,通过数据类型标志位所携带的不同的PDN数据的预设值,首先确定数据包的类型,数据包的类型为控制传输类型时,根据复用协议消息头格式,提取到复用协议消息头中的通路标识。Specifically, after the communication module parses the data type flag bit of the multiplexing protocol message header in the data packet according to the preset multiplexing protocol message header format, the preset value of different PDN data carried by the data type flag bit is used , first determine the type of the data packet, when the type of the data packet is the control transmission type, extract the path identifier in the message header of the multiplexing protocol according to the format of the multiplexing protocol message header.
在一个实施例中,当代表携带PDN数据的数据类型标志位为预设值0时,表示通信模块接收到的数据包为控制类数据包,按照复用协议消息头格式,在复用协议消息头的通路标识填充部提取出通路标识。In one embodiment, when the flag bit representing the data type carrying PDN data is a preset value of 0, it indicates that the data packet received by the communication module is a control type data packet. According to the multiplexing protocol message header format, in the multiplexing protocol message The path identifier filling part of the header extracts the path identifier.
在一个实施例中,当代表携带PDN数据的数据类型标志位为预设值1时,表示通信模块接收到的数据包为数据类数据包,在接收到该数据包的同时,可以触发通信模块中接收控制信息的操作,基于该操作,接收主机发送给通信模块的数据包转发指令,基于该转发指令,按照复用协议消息头格式,在复用协议消息头的通路标识填充部提取出通路标识。In one embodiment, when the flag bit representing the data type carrying PDN data is a preset value of 1, it indicates that the data packet received by the communication module is a data type data packet, and when the data packet is received, the communication module can be triggered The operation of receiving the control information in the control information, based on this operation, receive the data packet forwarding instruction sent by the host to the communication module, based on the forwarding instruction, according to the multiplexing protocol message header format, extract the path in the path identifier filling part of the multiplexing protocol message header logo.
本实施例中,通过预设的复用协议消息头格式,解析数据包中的复用协议消息头的数据类型标志位,数据类型标志位是表示携带PDN数据的预设值时,按照复用协议消息头格式,从复用协议消息头的通路标识填充部提取出通路标识,能够达到准确确定数据包进 行发送的通路标识,在通信模块接收到数据包时,避免多路PDN数据的同一通道上产生冗余,从而提高了数据通信的效率。In this embodiment, the data type flag bit of the multiplexing protocol message header in the data packet is parsed according to the preset multiplexing protocol message header format. The format of the protocol message header is to extract the path identifier from the path identifier filling part of the multiplexed protocol message header, which can accurately determine the path identifier of the data packet for transmission. When the communication module receives the data packet, it can avoid the same channel of multiple PDN data. Redundancy is generated on the network, thereby improving the efficiency of data communication.
在一个实施例中,如图4所示,数据通信方法还包括:In one embodiment, as shown in Figure 4, the data communication method further includes:
步骤402,按照复用协议消息头格式,读取复用协议消息头的数据容量填充部所填充的数据容量;数据容量是主机基于网络质量参数动态确定的。Step 402 , according to the format of the multiplexing protocol message header, read the data capacity filled in the data capacity filling part of the multiplexing protocol message header; the data capacity is dynamically determined by the host based on the network quality parameter.
其中,数据容量是指每一次传输数据包的大小。例如,每次传输数据包的大小为128Bytes,则发送该数据包时,复用协议消息头的数据容量处填充值为128Bytes。网络质量参数是指能够体现数据通信过程中传输数据包能力的参数。例如,总线的网络吞吐量或者总线的数据传输速率等。Among them, the data capacity refers to the size of each transmission data packet. For example, if the size of each transmission data packet is 128 Bytes, when the data packet is sent, the data capacity of the multiplexing protocol message header is filled with a value of 128 Bytes. The network quality parameter refers to a parameter that can reflect the ability to transmit data packets in the process of data communication. For example, the network throughput of the bus or the data transfer rate of the bus, etc.
具体的,可以按照复用协议消息头格式,读取复用协议消息头的数据容量填充部填充的数据容量,该数据容量可以根据网络质量参数动态确定。例如,可以在复用协议消息头的第三字节段和第四字节段中的填充值作为数据容量。Specifically, the data capacity filled in the data capacity filling part of the multiplexing protocol message header can be read according to the multiplexing protocol message header format, and the data capacity can be dynamically determined according to the network quality parameter. For example, the padding value in the third byte segment and the fourth byte segment of the multiplexing protocol message header can be used as the data capacity.
在一个实施例中,可以通过复用协议消息头解析插件,对复用协议消息头的数据容量填充部对应的字段进行解析,得到数据容量填充部所填充的数据容量。例如,对复用协议消息头中对应的PAYLOAD_LEN_WITH_PADDING字段进行解析,得到在该字段中填充的数值,该数值即为数据容量。例如,在该字段中填充值以二进制的形式表示,假设填充值为0000000000001111,则填充的数据容量为15字节(Byte)。In one embodiment, a field corresponding to the data capacity filling part of the multiplexing protocol message header may be parsed by using the multiplexing protocol message header parsing plug-in to obtain the data capacity filled by the data capacity filling part. For example, the corresponding PAYLOAD_LEN_WITH_PADDING field in the multiplexing protocol message header is parsed to obtain a value filled in this field, which is the data capacity. For example, the padding value in this field is expressed in binary form, assuming that the padding value is 0000000000001111, the padding data capacity is 15 bytes (Byte).
步骤404,按照数据容量,校验数据包中的PDN数据。Step 404: Check the PDN data in the data packet according to the data capacity.
具体的,在读取到复用协议消息头的数据容量填充部所填充的数据容量之后,可以以数据容量为单位,通过数据校验方法对数据包中的PDN数据进行校验。Specifically, after reading the data capacity filled in the data capacity filling part of the message header of the multiplexing protocol, the PDN data in the data packet can be verified by using the data capacity as a unit by a data verification method.
在一个实施例中,在主机发送数据包时,以数据容量为单位对每个发送的数据包生成一个哈希值,当通信模块接收到该数据包时,在通信模块侧对同样的数据包生成另一个哈希值,当在主机发送端生成的哈希值和通信模块接收端生成的哈希值相同时,可以得到数据包中的PDN数据校验结果为数据包中PDN数据完整准确,数据包在发送过程中无异常出现。In one embodiment, when the host sends a data packet, a hash value is generated for each sent data packet in the unit of data capacity, and when the communication module receives the data packet, the communication module side compares the same data packet Another hash value is generated. When the hash value generated at the host sending end is the same as the hash value generated at the communication module receiving end, it can be obtained that the PDN data verification result in the data packet is that the PDN data in the data packet is complete and accurate. There is no abnormality in the data packet during transmission.
步骤406,当校验通过时,执行通过多路PDN数据通路中与通路标识对应的PDN数据通路,发送数据包中的PDN数据。Step 406 , when the check is passed, the PDN data in the data packet is sent through the PDN data path corresponding to the path identifier in the multi-path PDN data paths.
具体的,当校验数据包中的PDN数据完整准确时,在多路PDN数据通路中确定与通路标识对应的PDN数据通路,将该PDN数据通路作为发送校验通过的数据包中的PDN数据的通路。Specifically, when the PDN data in the verification data packet is complete and accurate, the PDN data path corresponding to the path identifier is determined in the multiple PDN data paths, and the PDN data path is used as the PDN data in the data packet that has passed the verification. the pathway.
在一个实施例中,当校验通过时,会触发通信模块中数据发送指令,该数据发送指令通过从复用协议消息头的通路标识填充部提取出通路标识,将数据包中的PDN数据发送到与通路标识对应的PDN数据通路上。In one embodiment, when the verification is passed, a data sending instruction in the communication module is triggered, and the data sending instruction extracts the path identifier from the path identifier filling part of the multiplexing protocol message header, and sends the PDN data in the data packet. to the PDN data path corresponding to the path ID.
本实施例中,通过按照复用协议消息头格式,读取复用协议消息头的数据容量填充部所填充的数据容量,按照数据容量,校验数据包中的PDN数据;保证了数据通信的准确性;当校验通过时,执行通过多路PDN数据通路中与通路标识对应的PDN数据通路,发送数据包中的PDN数据,可以避免多个PDN数据发送到同一PDN数据通路上,或者,一个PDN数据发送到多个PDN数据通路上,减少了数据的冗余,提高了数据通信的效率。In this embodiment, by reading the data capacity filled in the data capacity filling part of the multiplexing protocol message header according to the multiplexing protocol message header format, and verifying the PDN data in the data packet according to the data capacity; Accuracy; when the verification is passed, the PDN data in the data packet is sent through the PDN data path corresponding to the path identifier in the multiple PDN data paths, which can prevent multiple PDN data from being sent to the same PDN data path, or, One PDN data is sent to multiple PDN data paths, which reduces data redundancy and improves the efficiency of data communication.
在一个实施例中,如图5所示,数据通信方法还包括:In one embodiment, as shown in Figure 5, the data communication method further includes:
步骤502,通过多路PDN数据通路接收PDN响应数据。Step 502: Receive PDN response data through multiple PDN data paths.
其中,PDN响应数据是指与通信模块连接的终端发送给通信模块的PDN数据。The PDN response data refers to PDN data sent to the communication module by a terminal connected to the communication module.
具体的,通信模块可以通过本端的数据接收单元,接收与通信模块连接的终端发送的PDN响应数据。Specifically, the communication module may receive the PDN response data sent by the terminal connected to the communication module through the data receiving unit of the local end.
步骤504,获取PDN响应数据所经过PDN数据通路的通路标识。Step 504: Obtain the path identifier of the PDN data path through which the PDN response data passes.
具体的,通信模块利用多路PDN数据通路接收PDN响应数据,各个PDN数据通路的通路标识均不相同,可以通过获取的PDN响应数据确定该PDN响应数据经过的PDN数据通路的通路标识。Specifically, the communication module uses multiple PDN data paths to receive PDN response data, the path identifiers of each PDN data path are different, and the path identifier of the PDN data path through which the PDN response data passes can be determined by the acquired PDN response data.
在一个实施例中,可以根据PDN响应数据对应的终端的标识与通路标识之间的对应关系,获取PDN响应数据所经过PDN数据通路的通路标识。当接收到PDN响应数据之后,通过PDN响应数据确定终端的标识,通过终端的标识确定终端的标识对应的PDN数据通路的通路标识,从而获取PDN响应数据所经过PDN数据通路的通路标识。In one embodiment, the path identifier of the PDN data path through which the PDN response data passes may be acquired according to the correspondence between the identifier of the terminal corresponding to the PDN response data and the path identifier. After receiving the PDN response data, the identification of the terminal is determined through the PDN response data, and the path identification of the PDN data path corresponding to the identification of the terminal is determined through the identification of the terminal, so as to obtain the path identification of the PDN data path through which the PDN response data passes.
步骤506,按照预设的复用协议消息头格式,构造响应复用协议消息头;其中,响应复用协议消息头的数据类型标志位置为表示携带PDN数据的预设值,响应复用协议消息头的通路标识填充部填充有获取的通路标识。Step 506, construct the response multiplexing protocol message header according to the preset multiplexing protocol message header format; wherein, the data type flag position of the response multiplexing protocol message header is a preset value indicating that the PDN data is carried, and the response multiplexing protocol message The path identifier filling part of the header is filled with the acquired path identifier.
其中,响应复用协议消息头是指PDN响应数据的复用协议消息头。The response multiplexing protocol message header refers to the multiplexing protocol message header of the PDN response data.
具体的,通信模块在获取PDN数据通路的通路标识之后,可以基于该通路标识以及响应复用协议消息头的数据类型标志位置的预设值,构造响应复用协议消息头。Specifically, after acquiring the path identifier of the PDN data path, the communication module may construct the response multiplexing protocol message header based on the path identifier and the preset value of the data type marker position of the response multiplexing protocol message header.
在一个实施例中,预设的复用协议消息头格式为octet(因特网标准使用八位组),其中octet分为四组,将第一组填充为数据类型标志位置,对于空缺位置填充为八位;将第二组填充为通路标识,第三组和第四组分别填充为数据包容量;基于上述填充完成的复用 协议消息头作为构造的响应复用协议消息头。In one embodiment, the preset multiplexing protocol message header format is octet (the Internet standard uses octets), wherein octets are divided into four groups, the first group is filled with the data type flag position, and the vacant position is filled with eight The second group is filled with the channel identifier, and the third group and the fourth group are filled with the data packet capacity respectively; based on the above-filled multiplexing protocol message header as the constructed response multiplexing protocol message header.
步骤508,根据PDN响应数据和响应复用协议消息头生成响应数据包。Step 508: Generate a response data packet according to the PDN response data and the response multiplexing protocol message header.
具体的,通信模块在得到PDN响应数据以及响应复用协议消息头,将PDN响应数据以及响应复用协议消息头进行封装,生成响应数据包。Specifically, after obtaining the PDN response data and the response multiplexing protocol message header, the communication module encapsulates the PDN response data and the response multiplexing protocol message header, and generates a response data packet.
在一个实施例中,将响应复用协议消息头octet第四组之后添加PDN响应数据,利用数据包封装工具将响应复用协议消息头和PDN响应数据进行封装,生成响应数据包。In one embodiment, PDN response data is added after the fourth group of the response multiplexing protocol message header octet, and a data packet encapsulation tool is used to encapsulate the response multiplexing protocol message header and the PDN response data to generate a response data packet.
步骤510,通过数据传输通路,发送响应数据包。Step 510: Send a response data packet through the data transmission path.
具体的,通信模块本端生成响应数据包后,会通过本端的总线接口,例如PCIe接口,发送响应数据包给主机,以使得主机能够接收到响应数据包之后,将响应数据包发送到相应的PDN通路上。Specifically, after the local end of the communication module generates the response data packet, it will send the response data packet to the host through the local bus interface, such as the PCIe interface, so that the host can receive the response data packet and send the response data packet to the corresponding on the PDN pathway.
本实施例中,通过多路PDN数据通路接收PDN响应数据,获取PDN响应数据所经过PDN数据通路的通路标识,按照预设的复用协议消息头格式,构造响应复用协议消息头,根据PDN响应数据和响应复用协议消息头生成响应数据包,通过数据传输通路,发送响应数据包。能够达到利用通信模块传输响应数据包到主机的目的。In this embodiment, the PDN response data is received through multiple PDN data paths, the path identifier of the PDN data path through which the PDN response data passes is obtained, and the response multiplexing protocol message header is constructed according to the preset multiplexing protocol message header format. The response data and the response multiplexing protocol message header generate response data packets, and send the response data packets through the data transmission path. The purpose of using the communication module to transmit the response data packet to the host can be achieved.
在一个实施例中,如图6所示,响应复用协议消息头的数据容量填充部,填充有通信模块根据当前的网络质量参数确定的响应数据容量;根据PDN响应数据和响应复用协议消息头生成响应数据包,包括:In one embodiment, as shown in FIG. 6 , the data capacity filling part of the response multiplexing protocol message header is filled with the response data capacity determined by the communication module according to the current network quality parameter; according to the PDN response data and the response multiplexing protocol message The header generates the response packet, including:
步骤602,基于PDN响应数据,按照响应数据容量重新确定待发包数据。Step 602, based on the PDN response data, re-determine the packet data to be sent according to the response data capacity.
其中,待发包数据是指待发送的,以一定容量分成数据包的PDN响应数据。The packet data to be sent refers to the PDN response data to be sent and divided into data packets with a certain capacity.
具体的,在对PDN响应数据进行发送之前,根据当前的网络质量参数,可以将PDN响应数据分成数据包,该数据包在传输过程可以保证当前的网络能够承受的范围。Specifically, before sending the PDN response data, according to the current network quality parameter, the PDN response data can be divided into data packets, and the data packets can ensure the range that the current network can bear during the transmission process.
在一个实施例中,通信模块可以基于对数据包大小的设置操作,将PDN响应数据分成设置响应数据容量的数据包,将该数据包确定为待发包数据。In one embodiment, the communication module may divide the PDN response data into data packets with the set response data capacity based on the setting operation on the data packet size, and determine the data packet as the data to be sent.
步骤604,将响应复用协议消息头和待发包数据组装得到响应数据包。Step 604: Assemble the response multiplexing protocol message header and the packet data to be sent to obtain a response data packet.
具体的,通信模块可以通过在待发包数据上添加响应复用协议消息头,生成响应数据包。以使通信模块中待发包数据发送给主机后,主机可以将该数据包中的PDN数据解析,将解析后的发到相应的PDN通路上。Specifically, the communication module may generate a response data packet by adding a response multiplexing protocol message header to the packet data to be sent. So that after the packet data to be sent in the communication module is sent to the host, the host can parse the PDN data in the packet, and send the parsed data to the corresponding PDN path.
本实施例中,通过按照响应数据容量对PDN响应数据处理重新确定待发包数据,将响应复用协议消息头和待发包数据组装得到响应数据包,能够达到根据响应数据容量确定响应数据包发送大小的目的,可以防止因网络质量参数和响应数据容量之间不匹配导致发 送准确率低的问题,提高了数据通信的准确性。In this embodiment, by processing the PDN response data according to the response data capacity and re-determining the packet data to be sent, and assembling the response multiplexing protocol message header and the packet data to be sent to obtain the response data packet, it is possible to determine the transmission size of the response data packet according to the response data capacity. The purpose is to prevent the problem of low transmission accuracy caused by the mismatch between the network quality parameters and the response data capacity, and improve the accuracy of data communication.
在一个实施例中,以5G通信模块与Host(主机)之间的数据通信为例。5G通信模块和Host之间可以分别是单独模块,也可以是集成模块。具体的,可以基于5G模块的总线接口PCIe接口设置一路控制通路用于多路PDN连接的建立和维护;该控制通道在Host侧的软件接口为串口/dev/mhi_ctrl。设置一路数据传输通路用于多路PDN数据的复用传输;该数据传输通路在Host侧的软件接口为网口pcie_mhi0。利用数据复用协议,多路PDN通信数据可以基于该数据复用协议在物理数据通路上复用传输。具体的,控制通路用于Host和5G通信模块之间控制信息的传送,使用该控制通路建立PDN数据通信;数据传输通路用于传输PDN通信数据,多路PND通信数据在该数据传输通路上复用传输。In one embodiment, the data communication between the 5G communication module and the Host is taken as an example. The 5G communication module and the host can be separate modules or integrated modules. Specifically, a control channel can be set based on the PCIe interface of the bus interface of the 5G module for the establishment and maintenance of multiple PDN connections; the software interface of the control channel on the Host side is serial port /dev/mhi_ctrl. A data transmission channel is set for multiplexing transmission of multiple channels of PDN data; the software interface of the data transmission channel on the Host side is the network port pcie_mhi0. Using the data multiplexing protocol, multiplexed PDN communication data can be multiplexed and transmitted on the physical data path based on the data multiplexing protocol. Specifically, the control path is used for the transmission of control information between the Host and the 5G communication module, and the PDN data communication is established by using the control path; the data transmission path is used to transmit PDN communication data, and multiple PND communication data are repeated on the data transmission path. use transmission.
在一个实施例中,Host通过本端的多路拨号工具基于控制通路进行多路PDN拨号,拨号参数为所需要传输PDN数据对应的PDN通路标识。当Host拨号入网成功后,获取到分配的IP(Internet Protocol Address)地址;该IP地址可以在通信数据传输时作为数据包中的参数。同时,Host可以将本端所需要传输的通信数据添加数据复用协议消息头后,通过数据传输通路传输给5G通信模块。5G通信模块在接收到Host传输的添加数据复用协议消息头后的通信数据之后,解析其中的数据复用协议消息头,得到PDN通路标识,并将去掉数据复用协议消息头后的通信数据传输到PDN通路标识对应的PDN通路上。In an embodiment, the Host performs multi-channel PDN dialing based on the control channel through the multi-channel dialing tool of the local end, and the dialing parameter is the PDN channel identifier corresponding to the PDN data to be transmitted. After the Host dials into the network successfully, it obtains the assigned IP (Internet Protocol Address) address; the IP address can be used as a parameter in the data packet during communication data transmission. At the same time, the Host can add the communication data to be transmitted by the local end to the 5G communication module through the data transmission channel after adding the data multiplexing protocol message header. After receiving the communication data after adding the data multiplexing protocol message header transmitted by the Host, the 5G communication module parses the data multiplexing protocol message header, obtains the PDN path identifier, and removes the communication data after the data multiplexing protocol message header. It is transmitted to the PDN channel corresponding to the PDN channel identifier.
在一个实施例中,5G通信模块将从空口接收到的PDN数据添加数据复用协议消息头,将添加数据复用协议消息头的PDN数据通过PCIe总线上的数据传输通路发送给Host,Host从数据传输通路接收到数据后,根据数据复用协议消息头解析出不同的PDN通路标识,将去掉数据复用协议消息头后的PDN数据传输到PDN通路标识对应的上层应用程序。In one embodiment, the 5G communication module adds a data multiplexing protocol message header to the PDN data received from the air interface, and sends the PDN data to which the data multiplexing protocol message header is added to the Host through a data transmission path on the PCIe bus, and the Host receives After receiving the data, the data transmission channel parses out different PDN channel identifiers according to the data multiplexing protocol message header, and transmits the PDN data after removing the data multiplexing protocol message header to the upper-layer application program corresponding to the PDN channel identifier.
在一个实施例中,如图7所示,数据复用协议消息头的具体字段表述为Octet,即因特网标准使用八位组,在数据复用协议消息头中分成了四组字段,在第一组字段中包括了通信数据的数据类型,第二组字段中包括了通信数据需要传输的通路标识,在第三组字段中包括了通信数据传输过程中每次传输的数据包的大小。通过以上字段组成的数据复用协议消息头,可以确定通信数据的传输状态、传输通路以及数据包的大小。其中,第一组字段中的第一字节位C/D为0时,5G通信模块可以在接收到该数据包时,解析出其中的通路标识MUX_ID,并根据通路标识MUX_ID将该数据包实时发送到相应的PDN通路上。也可以通过第一组字段中的第二字节位R为预留数据类型确定位,R可以根据实际应用场景设置。传输数据包时,为了提高数据包的传输的正确率,在数据复用协议消息头中的第三组字段和第四组字段中携带有数据包容量的填充值,第三组字段和第四组字段的集合字 段表示为PAYLOAD_LEN_WITH_PADDING,可以通过在该字段中的填充值对每次发送的IP数据包的大小进行限定,以便于发送数据包与网络质量参数相匹配。In one embodiment, as shown in FIG. 7 , the specific fields of the data multiplexing protocol message header are expressed as Octet, that is, the Internet standard uses octets, and the data multiplexing protocol message header is divided into four groups of fields. The group field includes the data type of the communication data, the second group field includes the path identifier of the communication data to be transmitted, and the third group field includes the size of each transmission data packet in the communication data transmission process. Through the data multiplexing protocol message header composed of the above fields, the transmission status, transmission path and data packet size of the communication data can be determined. Wherein, when the first byte C/D in the first group of fields is 0, the 5G communication module can parse out the channel identifier MUX_ID when receiving the data packet, and real-time the data packet according to the channel identifier MUX_ID sent to the corresponding PDN channel. The bit for the reserved data type can also be determined by the second byte bit R in the first group of fields, and R can be set according to the actual application scenario. When transmitting data packets, in order to improve the accuracy of data packet transmission, the third group of fields and the fourth group of fields in the data multiplexing protocol message header carry the padding value of the data packet capacity, the third group of fields and the fourth group of fields. The set field of the group field is represented as PAYLOAD_LEN_WITH_PADDING, and the size of the IP data packet sent each time can be limited by the padding value in this field, so that the sent data packet matches the network quality parameter.
在一个实施例中,如图8所示,以MAP_HDR表示为数据复用协议消息头,Host或者5G通信模块每次发送数据时,将该数据复用协议消息头添加到相应的IP数据包(IP Packet)上,经过数据封装之后,发送封装之后的数据包。In one embodiment, as shown in FIG. 8, MAP_HDR is represented as a data multiplexing protocol message header, and each time the Host or 5G communication module sends data, the data multiplexing protocol message header is added to the corresponding IP data packet ( IP Packet), after data encapsulation, the encapsulated data packet is sent.
应该理解的是,虽然图2-6的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2-6中的至少一部分步骤可以包括多个步骤或者多个阶段,这些步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤中的步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the steps in the flowcharts of FIGS. 2-6 are shown in sequence according to the arrows, these steps are not necessarily executed in the sequence shown by the arrows. Unless explicitly stated herein, the execution of these steps is not strictly limited to the order, and these steps may be performed in other orders. Moreover, at least a part of the steps in FIGS. 2-6 may include multiple steps or multiple stages. These steps or stages are not necessarily executed and completed at the same time, but may be executed at different times. The execution of these steps or stages The order is also not necessarily sequential, but may be performed alternately or alternately with other steps or at least a portion of the steps or phases within the other steps.
在一个实施例中,如图9所示,提供了一种数据通信装置900,包括:多路PDN数据通路建立模块902、数据包接收模块904、通路标识获得模块906和PDN数据发送模块908,其中:多路PDN数据通路建立模块902,用于通过从总线接口划分出的控制通路,与主机进行控制信息的交互,建立多路PDN数据通路;数据包接收模块904,用于通过从总线接口划分出的数据传输通路,接收主机复用数据传输通路传输的数据包;通路标识获得模块906,用于解析数据包中的复用协议消息头,获得通路标识;PDN数据发送模块908,用于通过多路PDN数据通路中与通路标识对应的PDN数据通路,发送数据包中的PDN数据。In one embodiment, as shown in FIG. 9 , a data communication apparatus 900 is provided, including: a multi-channel PDN data channel establishment module 902, a data packet receiving module 904, a channel identification obtaining module 906, and a PDN data sending module 908, Wherein: the multi-channel PDN data path establishment module 902 is used to exchange control information with the host through the control path divided from the bus interface, and establish a multi-channel PDN data path; the data packet receiving module 904 is used to pass the slave bus interface. The divided data transmission path receives the data packets transmitted by the host multiplexed data transmission path; the path identification obtaining module 906 is used to parse the multiplexing protocol message header in the data packet to obtain the path identification; the PDN data sending module 908 is used for The PDN data in the data packet is sent through the PDN data paths corresponding to the path identifiers in the multi-path PDN data paths.
在一个实施例中,通路标识获得模块906包括:数据类型标志位解析单元,用于按照预设的复用协议消息头格式,解析数据包中的复用协议消息头的数据类型标志位;通路标识提取单元,用于当数据类型标志位是表示携带PDN数据的预设值时,按照复用协议消息头格式,从复用协议消息头的通路标识填充部提取出通路标识。In one embodiment, the path identifier obtaining module 906 includes: a data type flag bit parsing unit, configured to parse the data type flag bit of the multiplexing protocol message header in the data packet according to a preset multiplexing protocol message header format; the path The identifier extraction unit is used for extracting the path identifier from the path identifier filling part of the multiplexing protocol message header according to the multiplexing protocol message header format when the data type flag bit is a preset value indicating that the PDN data is carried.
在一个实施例中,装置包括:数据容量读取单元,用于按照复用协议消息头格式,读取复用协议消息头的数据容量填充部所填充的数据容量;数据容量是主机基于网络质量参数动态确定的;PDN数据校验单元,用于按照数据容量,校验数据包中的PDN数据;PDN数据发送模块,用于当校验通过时,执行通过多路PDN数据通路中与通路标识对应的PDN数据通路,发送数据包中的PDN数据。In one embodiment, the apparatus includes: a data capacity reading unit, configured to read the data capacity filled by the data capacity filling part of the multiplexing protocol message header according to the multiplexing protocol message header format; The parameters are dynamically determined; the PDN data verification unit is used to verify the PDN data in the data packet according to the data capacity; the PDN data transmission module is used to perform the multi-channel PDN data path and path identification when the verification is passed. The corresponding PDN data path sends the PDN data in the data packet.
在一个实施例中,装置包括:PDN响应数据接收单元,用于通过多路PDN数据通路接收PDN响应数据;通路标识获取单元,用于获取PDN响应数据所经过PDN数据通路 的通路标识;响应复用协议消息头构造单元,用于按照预设的复用协议消息头格式,构造响应复用协议消息头;响应复用协议消息头的数据类型标志位置为表示携带PDN数据的预设值,响应复用协议消息头的通路标识填充部填充有获取的通路标识;响应数据包生成单元,用于根据PDN响应数据和响应复用协议消息头生成响应数据包;响应数据包发送模块,用于通过数据传输通路,发送响应数据包。In one embodiment, the apparatus includes: a PDN response data receiving unit, configured to receive PDN response data through multiple PDN data paths; a path identifier acquiring unit, configured to acquire a path identifier of the PDN data path through which the PDN response data passes; A protocol message header construction unit is used to construct a response multiplexing protocol message header according to a preset multiplexing protocol message header format; the data type flag position of the response multiplexing protocol message header is a preset value indicating that the PDN data is carried, and the response The path identification filling part of the multiplexing protocol message header is filled with the obtained path identification; the response packet generating unit is used to generate a response packet according to the PDN response data and the response multiplexing protocol message header; the response packet sending module is used to pass Data transmission path, sending response packets.
在一个实施例中,响应数据包生成单元用于基于PDN响应数据,按照响应数据容量重新确定待发包数据;将响应复用协议消息头和待发包数据组装得到响应数据包。In one embodiment, the response data packet generating unit is configured to re-determine the packet data to be sent based on the PDN response data according to the capacity of the response data; and assemble the response multiplexing protocol message header and the packet data to be sent to obtain the response data packet.
关于数据通信装置的具体限定可以参见上文中对于数据通信方法的限定,在此不再赘述。上述数据通信装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For the specific limitation of the data communication apparatus, reference may be made to the limitation of the data communication method above, which will not be repeated here. Each module in the above-mentioned data communication device may be implemented in whole or in part by software, hardware and combinations thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
在一个实施例中,提供了一种计算机设备,该计算机设备可以是终端,其内部结构图可以如图10所示。该计算机设备包括通过系统总线连接的处理器、存储器、通信接口、显示屏和输入装置。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统和计算机程序。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的通信接口用于与外部的终端进行有线或无线方式的通信,无线方式可通过WIFI、运营商网络、NFC(近场通信)或其他技术实现。该计算机程序被处理器执行时以实现一种数据通信方法。该计算机设备的显示屏可以是液晶显示屏或者电子墨水显示屏,该计算机设备的输入装置可以是显示屏上覆盖的触摸层,也可以是计算机设备外壳上设置的按键、轨迹球或触控板,还可以是外接的键盘、触控板或鼠标等。In one embodiment, a computer device is provided, and the computer device may be a terminal, and its internal structure diagram may be as shown in FIG. 10 . The computer equipment includes a processor, memory, a communication interface, a display screen, and an input device connected by a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium, an internal memory. The nonvolatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the execution of the operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for wired or wireless communication with an external terminal, and the wireless communication can be realized by WIFI, operator network, NFC (Near Field Communication) or other technologies. The computer program, when executed by a processor, implements a data communication method. The display screen of the computer equipment may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment may be a touch layer covered on the display screen, or a button, a trackball or a touchpad set on the shell of the computer equipment , or an external keyboard, trackpad, or mouse.
本领域技术人员可以理解,图10中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in FIG. 10 is only a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied. Include more or fewer components than shown in the figures, or combine certain components, or have a different arrangement of components.
在一个实施例中,还提供了一种计算机设备,包括存储器和处理器,存储器中存储有计算机程序,该处理器执行计算机程序时实现上述各方法实施例中的步骤。In one embodiment, a computer device is also provided, including a memory and a processor, where a computer program is stored in the memory, and the processor implements the steps in the foregoing method embodiments when the processor executes the computer program.
在一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现上述各方法实施例中的步骤。In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, implements the steps in the foregoing method embodiments.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可 读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和易失性存储器中的至少一种。非易失性存储器可包括只读存储器(Read-Only Memory,ROM)、磁带、软盘、闪存或光存储器等。易失性存储器可包括随机存取存储器(Random Access Memory,RAM)或外部高速缓冲存储器。作为说明而非局限,RAM可以是多种形式,比如静态随机存取存储器(Static Random Access Memory,SRAM)或动态随机存取存储器(Dynamic Random Access Memory,DRAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage In the medium, when the computer program is executed, it may include the processes of the above-mentioned method embodiments. Wherein, any reference to memory, storage, database or other media used in the various embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, or optical memory, and the like. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, the RAM may be in various forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be combined arbitrarily. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features It is considered to be the range described in this specification.
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only represent several embodiments of the present application, and the descriptions thereof are specific and detailed, but should not be construed as a limitation on the scope of the invention patent. It should be noted that, for those skilled in the art, without departing from the concept of the present application, several modifications and improvements can be made, which all belong to the protection scope of the present application. Therefore, the scope of protection of the patent of the present application shall be subject to the appended claims.

Claims (10)

  1. 一种数据通信方法,执行于与主机通过总线接口连接的通信模块,所述方法包括:A data communication method, executed in a communication module connected with a host through a bus interface, the method comprising:
    通过从总线接口划分出的控制通路,与主机进行控制信息的交互,建立多路PDN数据通路;Through the control path divided from the bus interface, the exchange of control information with the host computer is performed to establish multiple PDN data paths;
    通过从所述总线接口划分出的数据传输通路,接收所述主机复用所述数据传输通路传输的数据包;receiving the data packets transmitted by the host multiplexing the data transmission path through the data transmission path divided from the bus interface;
    解析所述数据包中的复用协议消息头,获得通路标识;Parsing the multiplexing protocol message header in the data packet to obtain a path identifier;
    通过所述多路PDN数据通路中与所述通路标识对应的PDN数据通路,发送所述数据包中的PDN数据。The PDN data in the data packet is sent through the PDN data path corresponding to the path identifier in the multi-path PDN data paths.
  2. 根据权利要求1所述的方法,其中,所述解析所述数据包中的复用协议消息头,获得通路标识,包括:The method according to claim 1, wherein the analyzing the multiplexing protocol message header in the data packet to obtain the path identifier comprises:
    按照预设的复用协议消息头格式,解析所述数据包中的复用协议消息头的数据类型标志位;According to the preset multiplexing protocol message header format, parse the data type flag bit of the multiplexing protocol message header in the data packet;
    当所述数据类型标志位是表示携带PDN数据的预设值时,按照所述复用协议消息头格式,从所述复用协议消息头的通路标识填充部提取出通路标识。When the data type flag bit is a preset value indicating that the PDN data is carried, the path identifier is extracted from the path identifier filling part of the multiplexing protocol message header according to the multiplexing protocol message header format.
  3. 根据权利要求2所述的方法,还包括:The method of claim 2, further comprising:
    按照所述复用协议消息头格式,读取所述复用协议消息头的数据容量填充部所填充的数据容量;所述数据容量是所述主机基于网络质量参数动态确定的;According to the multiplexing protocol message header format, read the data capacity filled in the data capacity filling part of the multiplexing protocol message header; the data capacity is dynamically determined by the host based on network quality parameters;
    按照所述数据容量,校验所述数据包中的PDN数据;According to the data capacity, verify the PDN data in the data packet;
    当校验通过时,执行所述通过所述多路PDN数据通路中与所述通路标识对应的PDN数据通路,发送所述数据包中的PDN数据。When the check is passed, the passing of the PDN data path corresponding to the path identifier in the multi-path PDN data paths is performed, and the PDN data in the data packet is sent.
  4. 根据权利要求1所述的方法,还包括:The method of claim 1, further comprising:
    通过所述多路PDN数据通路接收PDN响应数据;receiving PDN response data through the multiple PDN data paths;
    获取所述PDN响应数据所经过PDN数据通路的通路标识;Obtain the path identifier of the PDN data path through which the PDN response data passes;
    按照预设的复用协议消息头格式,构造响应复用协议消息头;所述响应复用协议消息头的数据类型标志位置为表示携带PDN数据的预设值,所述响应复用协议消息头的通路标识填充部填充有获取的通路标识;The response multiplexing protocol message header is constructed according to the preset multiplexing protocol message header format; the data type flag position of the response multiplexing protocol message header is a preset value indicating that the PDN data is carried, and the response multiplexing protocol message header is The access identifier filling part of the is filled with the acquired access identifier;
    根据所述PDN响应数据和所述响应复用协议消息头生成响应数据包;Generate a response packet according to the PDN response data and the response multiplexing protocol message header;
    通过所述数据传输通路,发送所述响应数据包。The response data packet is sent through the data transmission path.
  5. 根据权利要求4所述的方法,其中,所述响应复用协议消息头的数据容量填充部, 填充有所述通信模块根据当前的网络质量参数确定的响应数据容量;The method according to claim 4, wherein the data capacity filling part of the response multiplexing protocol message header is filled with the response data capacity determined by the communication module according to the current network quality parameter;
    所述根据所述PDN响应数据和所述响应复用协议消息头生成响应数据包,包括:The generating a response packet according to the PDN response data and the response multiplexing protocol message header includes:
    基于所述PDN响应数据,按照所述响应数据容量重新确定待发包数据;Based on the PDN response data, re-determine the packet data to be sent according to the response data capacity;
    将所述响应复用协议消息头和所述待发包数据组装得到响应数据包。A response data packet is obtained by assembling the response multiplexing protocol message header and the to-be-sent packet data.
  6. 一种数据通信装置,包括:A data communication device, comprising:
    多路PDN数据通路建立模块,用于通过从总线接口划分出的控制通路,与主机进行控制信息的交互,建立多路PDN数据通路;The multi-channel PDN data path establishment module is used to exchange control information with the host through the control path divided from the bus interface to establish the multi-channel PDN data path;
    数据包接收模块,用于通过从所述总线接口划分出的数据传输通路,接收所述主机复用所述数据传输通路传输的数据包;a data packet receiving module, configured to receive the data packets transmitted by the host multiplexing the data transmission path through the data transmission path divided from the bus interface;
    通路标识获得模块,用于解析所述数据包中的复用协议消息头,获得通路标识;a path identification obtaining module, used for parsing the multiplexing protocol message header in the data packet to obtain the path identification;
    PDN数据发送模块,用于通过所述多路PDN数据通路中与所述通路标识对应的PDN数据通路,发送所述数据包中的PDN数据。The PDN data sending module is configured to send the PDN data in the data packet through the PDN data path corresponding to the path identifier in the multiple PDN data paths.
  7. 根据权利要求6所述的装置,其中,所述通路标识获得模块包括:The apparatus according to claim 6, wherein the access identification obtaining module comprises:
    数据类型标志位解析单元,用于按照预设的复用协议消息头格式,解析所述数据包中的复用协议消息头的数据类型标志位;a data type flag bit parsing unit, configured to parse the data type flag bit of the multiplexing protocol message header in the data packet according to a preset multiplexing protocol message header format;
    通路标识提取单元,用于当所述数据类型标志位是表示携带PDN数据的预设值时,按照所述复用协议消息头格式,从所述复用协议消息头的通路标识填充部提取出通路标识。A path identifier extraction unit, used for extracting from the path identifier filling part of the multiplexing protocol message header according to the multiplexing protocol message header format when the data type flag bit is a preset value indicating that the PDN data is carried Path identification.
  8. 根据权利要求7所述的装置,还包括:The apparatus of claim 7, further comprising:
    数据容量读取单元,用于按照所述复用协议消息头格式,读取所述复用协议消息头的数据容量填充部所填充的数据容量;所述数据容量是所述主机基于网络质量参数动态确定的;a data capacity reading unit, configured to read the data capacity filled by the data capacity filling part of the multiplexing protocol message header according to the multiplexing protocol message header format; the data capacity is the host based on network quality parameters dynamically determined;
    PDN数据校验单元,用于按照所述数据容量,校验所述数据包中的PDN数据;A PDN data verification unit, configured to verify the PDN data in the data packet according to the data capacity;
    PDN数据发送模块,用于当校验通过时,执行所述通过所述多路PDN数据通路中与所述通路标识对应的PDN数据通路,发送所述数据包中的PDN数据。The PDN data sending module is configured to, when the check is passed, execute the PDN data path corresponding to the path identifier in the multi-path PDN data paths, and send the PDN data in the data packet.
  9. 一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,其中,所述处理器执行所述计算机程序时实现权利要求1至5中任一项所述的方法的步骤。A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 5 when the processor executes the computer program.
  10. 一种计算机可读存储介质,其上存储有计算机程序,其中,所述计算机程序被处理器执行时实现权利要求1至5中任一项所述的方法的步骤。A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method of any one of claims 1 to 5.
PCT/CN2021/129718 2021-04-25 2021-11-10 Data communication method and apparatus, computer device, and storage medium WO2022227484A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110448363.1 2021-04-25
CN202110448363.1A CN113238982A (en) 2021-04-25 2021-04-25 Data communication method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2022227484A1 true WO2022227484A1 (en) 2022-11-03

Family

ID=77129107

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/129718 WO2022227484A1 (en) 2021-04-25 2021-11-10 Data communication method and apparatus, computer device, and storage medium

Country Status (2)

Country Link
CN (1) CN113238982A (en)
WO (1) WO2022227484A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113238982A (en) * 2021-04-25 2021-08-10 深圳市广和通无线股份有限公司 Data communication method, device, computer equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5983272A (en) * 1997-08-29 1999-11-09 Cisco Technology, Inc. Option request protocol
GB2346301A (en) * 1999-01-27 2000-08-02 Motorola Inc Multiplexed serial input/output and method therefor
CN107040674A (en) * 2016-02-04 2017-08-11 华为技术有限公司 A kind of charging method, apparatus and system
CN108966217A (en) * 2018-08-29 2018-12-07 冯志杰 A kind of secret communication method, mobile terminal and secrecy gateway
CN113238982A (en) * 2021-04-25 2021-08-10 深圳市广和通无线股份有限公司 Data communication method, device, computer equipment and storage medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4731876B2 (en) * 2004-07-08 2011-07-27 パナソニック株式会社 COMMUNICATION SYSTEM, WIRELESS LAN BASE STATION CONTROL DEVICE, AND WIRELESS LAN BASE STATION DEVICE
US8346274B2 (en) * 2010-05-21 2013-01-01 Apple Inc. Method to control multiple radio access bearers in a wireless device
CN102647267A (en) * 2012-03-29 2012-08-22 苏州佳世达电通有限公司 Multi-channel signal transmission device and multi-channel signal transmission method
CN106788911A (en) * 2015-11-25 2017-05-31 华为技术有限公司 A kind of method and apparatus of message retransmission
JP6667662B2 (en) * 2015-12-28 2020-03-18 華為技術有限公司Huawei Technologies Co.,Ltd. Route processing method and apparatus, and terminal
CN107623646B (en) * 2017-09-06 2020-11-17 华为技术有限公司 Data stream transmission method, sending equipment and receiving equipment
CN111475454B (en) * 2020-03-27 2022-04-15 西安广和通无线软件有限公司 PCIe interface-based communication method and device, computer equipment and computer-readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5983272A (en) * 1997-08-29 1999-11-09 Cisco Technology, Inc. Option request protocol
GB2346301A (en) * 1999-01-27 2000-08-02 Motorola Inc Multiplexed serial input/output and method therefor
CN107040674A (en) * 2016-02-04 2017-08-11 华为技术有限公司 A kind of charging method, apparatus and system
CN108966217A (en) * 2018-08-29 2018-12-07 冯志杰 A kind of secret communication method, mobile terminal and secrecy gateway
CN113238982A (en) * 2021-04-25 2021-08-10 深圳市广和通无线股份有限公司 Data communication method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN113238982A (en) 2021-08-10

Similar Documents

Publication Publication Date Title
US20240179107A1 (en) Managing network traffic in virtual switches based on logical port identifiers
US11909551B2 (en) Broadband remote access server (BRAS) system-based packet encapsulation
CN105791214B (en) Method and equipment for converting RapidIO message and Ethernet message
EP3211852A1 (en) Ssh protocol-based session parsing method and system
CN113326228B (en) Message forwarding method, device and equipment based on remote direct data storage
WO2015058699A1 (en) Data forwarding
CN114189905A (en) Message processing method and related equipment
CN109495594B (en) Data transmission method, PNF SDN controller, VNF SDN controller and system
US11588665B2 (en) VXLAN packet encapsulation and policy execution method, and VXLAN device and system
TW201509203A (en) Transmission controlling system, device and method
CN104038505A (en) Method and device for preventing IPSec (internet protocol security) replaying
CN114828140B (en) Service flow message forwarding method and device, storage medium and electronic equipment
WO2022227484A1 (en) Data communication method and apparatus, computer device, and storage medium
CN112866206A (en) Unidirectional data transmission method and device
CN108093041A (en) Single channel VDI proxy servers and implementation method
US20160080532A1 (en) Method for generating input parameter and device
CN113179229A (en) Verification method, verification device, storage medium and electronic equipment
CN113904871A (en) Network slice access method, PCF entity, terminal and communication system
CN111835736B (en) Message transmission method and system
CN113572578B (en) TCP data transmission method, device, equipment and medium based on data center
CN114079675B (en) Message processing method, device, terminal equipment and mobile broadband internet surfing equipment
CN115038073A (en) User permanent identifier acquisition method and device, electronic equipment and storage medium
CN115277878A (en) Method for sending message, method and equipment for processing message
CN115701063A (en) Message transmission method and communication device
CN115866653A (en) Data transmission method and system, client and server

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: 21938946

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21938946

Country of ref document: EP

Kind code of ref document: A1