Data communication method, device, computer equipment and storage medium
By dividing the control path and the data transmission path in data communication, and analyzing the multiplexed protocol message header to obtain the path identifier, the problem of low data communication efficiency in the prior art is solved, and more efficient data communication is achieved.
Patent Information
- Application Number
- CN202110448363.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-25
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2041-04-25
AI Technical Summary
The existing data communication methods have the problem of low data communication efficiency.
Multiple PDN data paths are established by interacting with the host through the control path divided from the bus interface; receiving the host's multiplexed data packets through the data transmission path; analyzing the multiplexed protocol message header in the data packet to obtain the path identifier; The PDN data in the PDN data path corresponding to the path identifier transmits the PDN data path in the PDN data path.
The efficiency of data communication is improved, and by separating the control path and the data transmission path, interference between control information and data transmission is avoided, the efficiency of the data transmission process is ensured, and the data channel is quickly determined through the path identification.
Smart Images

Figure CN113238982B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a data communication method, apparatus, computer equipment and storage medium. Background Art
[0002] With the development of communication technology, public data network PDN (Public Data Network) has also been widely used. PDN is a wide area network established by telecommunications 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 can be achieved between the communication module and the terminal connected to it, or high-speed data transmission can be achieved between the host and the terminal using the communication module as an intermediate transmission medium.
[0003] However, the current data communication method has the problem of low data communication efficiency. Summary of the invention
[0004] Based on this, it is necessary to provide a data communication method, device, computer equipment and storage medium that can improve data communication efficiency in response to the above technical problems.
[0005] A data communication method, the method comprising: exchanging control information with a host through a control path divided from a bus interface to establish multiple PDN data paths; receiving a data packet transmitted by the host multiplexing the data transmission path through a data transmission path divided from the bus interface; parsing a multiplexing protocol message header in the data packet to obtain a path identifier; and sending the PDN data in the data packet through a PDN data path corresponding to the path identifier in the multiple PDN data paths.
[0006] In one of the embodiments, parsing the multiplexing protocol message header in the data packet to obtain the path identifier includes: parsing the data type flag of the multiplexing protocol message header in the data packet according to a preset multiplexing protocol message header format; when the data type flag is a preset value indicating that PDN data is carried, extracting the path identifier from the path identifier filling part of the multiplexing protocol message header according to the multiplexing protocol message header format.
[0007] In one of the embodiments, 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 dynamically determined by the host based on the network quality parameters; according to the data capacity, verifying the PDN data in the data packet; when the verification passes, executing the PDN data path corresponding to the path identifier in the multiple PDN data paths, and sending the PDN data in the data packet.
[0008] In one of the embodiments, the method also includes: receiving PDN response data through the multiple PDN data paths; obtaining the path identifier of the PDN data path through which the PDN response data passes; constructing 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 path identifier filling part of the response multiplexing protocol message header is filled with the obtained path identifier; generating a response data packet based on the PDN response data and the response multiplexing protocol message header; and sending the response data packet through the data transmission path.
[0009] In one of the embodiments, 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 parameters; generating a response data packet according to the PDN response data and the response multiplexing protocol message header includes: based on the PDN response data, redetermining 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 packet.
[0010] A data communication device, the device comprising: a multi-channel PDN data path establishment module, used to exchange 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, used to receive a data packet transmitted by the host multiplexing the data transmission path through a data transmission path divided from the bus interface; a path identification acquisition module, used to parse a multiplexing protocol message header in the data packet to obtain a path identification; a PDN data sending module, used to send the PDN data in the data packet through a PDN data path corresponding to the path identification in the multi-channel PDN data paths.
[0011] In one of the embodiments, the path identifier acquisition module includes: a data type flag parsing unit, used to parse the data type flag of the multiplexing protocol message header in the data packet according to a preset multiplexing protocol message header format; a path identifier extraction unit, used to extract 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 is a preset value indicating that PDN data is carried.
[0012] In one of the embodiments, the device includes: a data capacity reading unit, used to read 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 dynamically determined by the host based on the network quality parameter; a PDN data verification unit, used to verify the PDN data in the data packet according to the data capacity; a PDN data sending module, used to execute the sending of the PDN data in the data packet through the PDN data path corresponding to the path identifier in the multiple PDN data paths when the verification passes.
[0013] In one of the embodiments, the device includes: a PDN response data receiving unit, used to receive PDN response data through the multiple PDN data paths; a path identifier acquisition unit, used to obtain the path identifier of the PDN data path through which the PDN response data passes; a response multiplexing protocol message header construction unit, 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 path identifier filling part of the response multiplexing protocol message header is filled with the acquired path identifier; a response data packet generation unit, used to generate a response data packet according to the PDN response data and the response multiplexing protocol message header; a response data packet sending module, used to send the response data packet through the data transmission path.
[0014] In one of the embodiments, the response data packet generation unit is used to redetermine the packet data to be sent according to the response data capacity based on the PDN response data; and assemble the response multiplexing protocol message header and the packet data to be sent to obtain a response data packet.
[0015] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the following steps when executing the computer program: exchanging control information with a host through a control path divided from a bus interface to establish multiple PDN data paths; receiving a data packet transmitted by the host multiplexing the data transmission path through a data transmission path divided from the bus interface; parsing a multiplexing protocol message header in the data packet to obtain a path identifier; and sending the PDN data in the data packet through a PDN data path corresponding to the path identifier in the multiple PDN data paths.
[0016] A computer-readable storage medium stores a computer program, which implements the following steps when executed by a processor: exchanging control information with a host through a control path divided from a bus interface to establish multiple PDN data paths; receiving a data packet transmitted by the host multiplexing the data transmission path through a data transmission path divided from the bus interface; parsing a multiplexing protocol message header in the data packet to obtain a path identifier; and sending the PDN data in the data packet through a PDN data path corresponding to the path identifier in the multiple PDN data paths.
[0017] The above-mentioned data communication method, device, computer equipment and storage medium interact with the host for control information through the control path divided from the bus interface to establish multiple PDN data paths; receive data packets transmitted by the host multiplexing 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; send the PDN data in the data packet through the PDN data path corresponding to the path identifier in the multiple PDN data paths. The control path and the data transmission path can be divided from the bus interface respectively, so that the control information and the data transmission are separated and do not affect each other, thereby ensuring the transmission efficiency of the data transmission process. At the same time, the corresponding PDN data path can be identified by the path identifier, and the PDN data in the data packet can be sent, so that the data channel that needs to be sent can be quickly determined, thereby improving the efficiency of data communication. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 An application environment diagram of a data communication method in an embodiment;
[0019] Figure 2 is a flow chart of a data communication method in one embodiment;
[0020] Figure 3 A schematic diagram of a flow chart of a step of parsing a multiplexing protocol message header in a data packet to obtain a path identification in an embodiment;
[0021] Figure 4is a flow chart of a data communication method in another embodiment;
[0022] Figure 5 is a flow chart of a data communication method in another embodiment;
[0023] Figure 6 is a flow chart of a data communication method in another embodiment;
[0024] Figure 7 A schematic diagram of a multiplexing protocol message header in a data communication process in one embodiment;
[0025] Figure 8 A schematic diagram of a data packet during a data communication process in one embodiment;
[0026] Fig. 9 is a structural block diagram of a data communication device in one embodiment;
[0027] Fig.10 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0029] The data communication method provided by the present application can be applied to Figure 1 In the application environment shown, it 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 interacts with the host 102 for control information through a control path divided from a bus interface, and establishes a multi-channel PDN data path; receives a data packet transmitted by the host 102 multiplexing the data transmission path through a data transmission path divided from the bus interface; and parses the multiplexing protocol message header in the data packet through the communication module 104 to obtain a path identifier; and sends the PDN data in the data packet through the PDN data path corresponding to the path identifier in the multi-channel PDN data path. Among them, the host 102 can be but not limited to various computer systems, personal computers, laptops, smart phones, tablet computers and portable wearable devices; the communication module 104 can be a module for data communication independent of the terminal; or it can be a module for data communication integrated in the terminal. It is implemented by a server or a server cluster composed of multiple servers.
[0030] In one embodiment, Figure 2 As shown, a data communication method is provided, which is applied to Figure 1 The communication module in the example is used to illustrate the following steps:
[0031] Step 202: Exchange control information with the host through the control path divided from the bus interface to establish multiple PDN data paths.
[0032] Among them, the bus interface refers to an interface that can provide a connection for bus access. For example, the PCIe (peripheral component interconnect express) interface, I2 C (I-squared-C) interface or 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 information sent by the host to the communication module to control the communication module to perform a certain operation. The PDN data path refers to a path that can transmit PDN data.
[0033] Specifically, before the host transmits multiple PDN data through the communication module, the host needs to transmit the control information of the local end to the communication module so that the communication module can transmit the multiple PDN data through the control information. The communication module can divide the control channel using the preset virtual interface connected to the host by the communication module bus interface.
[0034] In one embodiment, the PCIe bus connected to 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 used to realize the interaction of control information.
[0035] Step 204, receiving the data packet transmitted by the host multiplexing data transmission path through the data transmission path divided from the bus interface.
[0036] The data transmission path refers to the path used to transmit data. Multiplexing refers to the repeated use of the transmission path to transmit data packets. A data packet refers to the data transmitted each time during data transmission.
[0037] Specifically, the host transmits the data to be transmitted to the terminal by the communication module, and the data transmission path can be divided by the bus interface connecting the host and the communication module. Through the data transmission path, the host can continuously transmit the data packets of the data to be transmitted from the data transmission path to the communication module. Correspondingly, the communication module can receive the data packets sent by the host through the data transmission path. The communication module can divide the data transmission channel by using the preset virtual interface between the communication module bus interface and the host. The data packet sent by the host is received by the data receiving unit of the communication module.
[0038] In one embodiment, the communication module uses the PCIe bus connected to the PCIe interface of this end, divides the control path by software, and uses the relevant configuration items under the host side / pcie_mhio interface for configuration, divides the bus interface into a data transmission path, and receives data packets sent by the host through the data transmission path.
[0039] 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, and receives the data packets transmitted by the host through the data transmission path in a synchronous time division multiplexing or asynchronous time division multiplexing manner.
[0040] Step 206: parse the multiplexing protocol message header in the data packet to obtain a path identifier.
[0041] The multiplexing protocol message header refers to the header information of the data packet that can determine the type or size of the data packet. The path identifier refers to the symbolic information that can uniquely identify the path. For example, the path identifier is the ID (Identity document) of the path.
[0042] Specifically, the communication module can find the fill value in the preset field by parsing the preset field position in the multiplexing protocol message header in the data packet, and obtain the path identifier through the fill value. For example, the path identifier is obtained by using the fill value at the second field of the multiplexing protocol message header.
[0043] In one embodiment, the communication module analyzes the multiplexing protocol message header of the received data packet through 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 can be parsed through a packet capture tool, and the value obtained by parsing is the obtained path identifier.
[0044] Step 208: Send the PDN data in the data packet through the PDN data path corresponding to the path identifier in the multiple PDN data paths.
[0045] Specifically, each PDN data channel has a corresponding channel identifier. After the communication module obtains a data packet and obtains the channel identifier by parsing the data packet, a sending operation for the data packet is triggered, and the PDN data in the data packet is sent based on the sending operation.
[0046] In one embodiment, after parsing the message header on the communication module, the data packet with the protocol header removed is sent to the PDN data channel corresponding to the channel identifier, that is, when the communication module sends a data packet, only the original data in the data packet is sent, so that the upper-layer application that receives the data packet sent by the communication module can use the received data packet accurately and efficiently.
[0047] In the above data communication method, control information is exchanged with the host through the control path divided from the bus interface to establish multiple PDN data paths; data packets transmitted by the host multiplexing data transmission path are received through the data transmission path divided from the bus interface; the multiplexing protocol message header in the data packet is parsed to obtain the path identifier; and 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. The control path and the data transmission path can be divided from the bus interface respectively, so that the control information and the data transmission are separated and do not affect each other, thereby ensuring the transmission efficiency of the data transmission process. At the same time, the corresponding PDN data path can be identified by the path identifier, and the PDN data in the data packet can be sent, so that the data channel that needs to be sent can be quickly determined, thereby improving the efficiency of data communication.
[0048] In one embodiment, Figure 3 As shown, parsing the multiplexing protocol message header in the data packet to obtain the path identifier includes:
[0049] Step 302: Parse the data type flag of the multiplexing protocol message header in the data packet according to the preset multiplexing protocol message header format.
[0050] The multiplexing protocol message header format refers to the field composition format of the multiplexing protocol message header. The data type flag refers to the field position that can indicate the data type of the data packet. The field refers to the byte position or byte position range in the protocol message header, and a field includes eight byte positions. For example, the first byte position or the byte position range from the first byte position to the eighth byte position in the protocol message header.
[0051] Specifically, a multiplexing protocol message header in the transmitted data packet has a preset multiplexing protocol message header format, and the corresponding data type flag bit can be parsed through the multiplexing protocol message header format.
[0052] 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 of the multiplexing protocol message header; when the communication module receives the data packet, the first byte of the multiplexing protocol message header in the data packet is parsed to obtain the data type flag corresponding to the data packet.
[0053] Step 304: when the data type flag is a preset value indicating that the data carries PDN data, the path identifier is extracted from the path identifier padding portion of the multiplexing protocol message header according to the multiplexing protocol message header format.
[0054] The path identifier filling part refers to the byte position or byte position range that can be filled with the path identifier in the multiplexing protocol message header.
[0055] Specifically, after the communication module parses the data type flag of the multiplexing protocol message header in the data packet according to the preset multiplexing protocol message header format, the type of the data packet is first determined through the preset values of different PDN data carried by the data type flag. When the type of the data packet is a control transmission type, the path identifier in the multiplexing protocol message header is extracted according to the multiplexing protocol message header format.
[0056] In one embodiment, when the data type flag representing the data carrying PDN data is a preset value of 0, it indicates that the data packet received by the communication module is a control data packet, and according to the multiplexing protocol message header format, the path identifier is extracted from the path identifier filling part of the multiplexing protocol message header.
[0057] In one embodiment, when the data type flag bit representing the data carrying PDN data is a preset value 1, it indicates that the data packet received by the communication module is a data type data packet. When the data packet is received, the operation of receiving control information in the communication module can be triggered. Based on the operation, the data packet forwarding instruction sent by the receiving host to the communication module is received. Based on the forwarding instruction, the path identifier is extracted from the path identifier filling part of the multiplexing protocol message header in accordance with the multiplexing protocol message header format.
[0058] In this embodiment, the data type flag of the multiplexing protocol message header in the data packet is parsed through the preset multiplexing protocol message header format. When the data type flag is a preset value indicating that 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, so that the path identifier for sending the data packet can be accurately determined. When the communication module receives the data packet, redundancy is avoided on the same channel of multiple PDN data, thereby improving the efficiency of data communication.
[0059] In one embodiment, Figure 4 As shown, the data communication method also includes:
[0060] Step 402, 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 the network quality parameters.
[0061] The data capacity refers to the size of each data packet transmitted. For example, if the size of each data packet transmitted is 128 bytes, then when sending the data packet, the data capacity of the multiplexing protocol message header is filled with 128 bytes. The network quality parameter refers to the parameter that can reflect the ability to transmit data packets during data communication. For example, the network throughput of the bus or the data transmission rate of the bus.
[0062] 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 filling value in the third byte segment and the fourth byte segment of the multiplexing protocol message header can be used as the data capacity.
[0063] In one embodiment, the multiplexing protocol message header parsing plug-in can be used to parse the field corresponding to the data capacity filling part of the multiplexing protocol message header 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 the value filled in the field, which is the data capacity. For example, the filling value in the field is expressed in binary form. Assuming that the filling value is 0000000000001111, the filled data capacity is 15 bytes.
[0064] Step 404: verify the PDN data in the data packet according to the data capacity.
[0065] Specifically, after reading the data capacity filled in the data capacity filling part of the multiplexing protocol message header, the PDN data in the data packet can be verified by a data verification method in units of data capacity.
[0066] In one embodiment, when the host sends a data packet, a hash value is generated for each data packet sent based on data capacity. When the communication module receives the data packet, another hash value is generated for the same data packet on the communication module side. When the hash value generated at the host sending end and the hash value generated at the communication module receiving end are the same, the PDN data verification result in the data packet can be obtained, indicating that the PDN data in the data packet is complete and accurate, and no abnormalities occur during the sending process of the data packet.
[0067] Step 406: 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.
[0068] Specifically, when the PDN data in the data packet is verified to be complete and accurate, a PDN data path corresponding to the path identifier is determined in multiple PDN data paths, and the PDN data path is used as a path for sending the PDN data in the data packet that has passed the verification.
[0069] In one embodiment, when the verification passes, 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 identifier.
[0070] In this embodiment, the data capacity filled by the data capacity filling part of the multiplexing protocol message header is read according to the multiplexing protocol message header format, and the PDN data in the data packet is verified according to the data capacity; the accuracy of data communication is ensured; when the verification passes, 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 avoid sending multiple PDN data to the same PDN data path, or sending one PDN data to multiple PDN data paths, thereby reducing data redundancy and improving data communication efficiency.
[0071] In one embodiment, Figure 5 As shown, the data communication method also includes:
[0072] Step 502: Receive PDN response data through multiple PDN data paths.
[0073] The PDN response data refers to the PDN data sent by the terminal connected to the communication module to the communication module.
[0074] 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.
[0075] Step 504: Obtain a path identifier of the PDN data path through which the PDN response data passes.
[0076] Specifically, the communication module receives the PDN response data using multiple PDN data paths, and the path identifiers of the various PDN data paths are different. The path identifier of the PDN data path through which the PDN response data passes can be determined through the acquired PDN response data.
[0077] In one embodiment, the path identifier of the PDN data path through which the PDN response data passes can be obtained 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 identifier of the terminal is determined by the PDN response data, and the path identifier of the PDN data path corresponding to the identifier of the terminal is determined by the identifier of the terminal, thereby obtaining the path identifier of the PDN data path through which the PDN response data passes.
[0078] Step 506, construct a response multiplexing protocol message header according to a 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 PDN data is carried, and the path identifier filling part of the response multiplexing protocol message header is filled with the acquired path identifier.
[0079] The response multiplexing protocol message header refers to the multiplexing protocol message header of the PDN response data.
[0080] Specifically, after obtaining the path identifier of the PDN data path, the communication module may construct a response multiplexing protocol message header based on the path identifier and a preset value of a data type flag position of the response multiplexing protocol message header.
[0081] In one embodiment, the preset multiplexing protocol message header format is octet (the Internet standard uses eight bits), where octet is divided into four groups, the first group is filled with the data type flag position, and the empty position is filled with eight bits; the second group is filled with the path identifier, and the third and fourth groups are filled with the data packet capacity respectively; the multiplexing protocol message header completed based on the above filling is used as the constructed response multiplexing protocol message header.
[0082] Step 508: Generate a response data packet according to the PDN response data and the response multiplexing protocol message header.
[0083] 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 to generate a response data packet.
[0084] In one embodiment, the PDN response data is added after the fourth group of the response multiplexing protocol message header octet, and the response multiplexing protocol message header and the PDN response data are encapsulated using a data packet encapsulation tool to generate a response data packet.
[0085] Step 510: Send a response data packet through the data transmission path.
[0086] Specifically, after the communication module generates a response data packet, it sends the response data packet to the host through the local bus interface, such as the PCIe interface, so that the host can send the response data packet to the corresponding PDN path after receiving the response data packet.
[0087] In this embodiment, 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, a response multiplexing protocol message header is constructed according to a preset multiplexing protocol message header format, a response data packet is generated according to the PDN response data and the response multiplexing protocol message header, and the response data packet is sent through the data transmission path. The purpose of using the communication module to transmit the response data packet to the host can be achieved.
[0088] In one embodiment, Figure 6 As shown, 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 parameters; a response data packet is generated according to the PDN response data and the response multiplexing protocol message header, including:
[0089] Step 602: based on the PDN response data, redetermine the packet data to be sent according to the response data capacity.
[0090] The data to be sent refers to PDN response data to be sent and divided into data packets with a certain capacity.
[0091] Specifically, before sending the PDN response data, the PDN response data may be divided into data packets according to the current network quality parameters, and the data packets may be guaranteed to be within the range that the current network can bear during the transmission process.
[0092] In one embodiment, the communication module may divide the PDN response data into data packets with set response data capacity based on the operation of setting the data packet size, and determine the data packet as the packet data to be sent.
[0093] Step 604: assemble the response multiplexing protocol message header and the packet data to be sent to obtain a response data packet.
[0094] Specifically, the communication module can 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 data packet and send the parsed data to the corresponding PDN channel.
[0095] In this embodiment, the packet data to be sent is re-determined by processing the PDN response data according to the response data capacity, and the response multiplexing protocol message header and the packet data to be sent are assembled to obtain a response data packet. This can achieve the purpose of determining the sending size of the response data packet according to the response data capacity, and can prevent the problem of low sending accuracy caused by the mismatch between network quality parameters and the response data capacity, thereby improving the accuracy of data communication.
[0096] 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 bus interface PCIe 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 the serial port / dev / mhi_ctrl. A data transmission channel is set for the multiplexed transmission of multiple 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, multiple PDN communication data can be multiplexed and transmitted on the physical data channel based on the data multiplexing protocol. Specifically, the control channel is used for the transmission of control information between the Host and the 5G communication module, and the control channel is used to establish PDN data communication; the data transmission channel is used to transmit PDN communication data, and multiple PDN communication data are multiplexed and transmitted on the data transmission channel.
[0097] In one embodiment, the Host performs multi-channel PDN dialing based on the control channel through the multi-channel dialing tool on the local side, and the dialing parameter is the PDN channel identifier corresponding to the PDN data that needs to be transmitted. When the Host dials into the network successfully, it obtains the assigned IP (Internet Protocol Address); the IP address can be used as a parameter in the data packet when the communication data is transmitted. At the same time, the Host can add a data multiplexing protocol message header to the communication data that needs to be transmitted on the local side, and transmit it to the 5G communication module through the data transmission channel. After receiving the communication data with the data multiplexing protocol message header added to the transmission of the Host, the 5G communication module parses the data multiplexing protocol message header therein to obtain the PDN channel identifier, and transmits the communication data after removing the data multiplexing protocol message header to the PDN channel corresponding to the PDN channel identifier.
[0098] 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 with the added data multiplexing protocol message header to the Host through the data transmission path on the PCIe bus. After the Host receives the data from the data transmission path, it parses different PDN path 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 corresponding to the PDN path identifier.
[0099] In one embodiment, Figure 7 As shown, the specific fields of the data multiplexing protocol message header are expressed as Octet, that is, the Internet standard uses eight bits, and the data multiplexing protocol message header is divided into four groups of fields. The first group of fields includes the data type of the communication data, the second group of fields includes the path identifier for the communication data to be transmitted, and the third group of fields includes the size of each data packet transmitted during 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. Among them, when the first byte bit C / D in the first group of fields is 0, the 5G communication module can parse out the path identifier MUX_ID when receiving the data packet, and send the data packet to the corresponding PDN path in real time according to the path identifier MUX_ID. The second byte bit R in the first group of fields can also be used to reserve the data type determination bit, 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 fill values for the data packet capacity. The collection field of the third group of fields and the fourth group of fields is expressed as PAYLOAD_LEN_WITH_PADDING. The fill value in this field can be used to limit the size of each IP data packet sent so that the sent data packet matches the network quality parameters.
[0100] In one embodiment, Figure 8 As shown, MAP_HDR is represented as the data multiplexing protocol message header. 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.
[0101] It should be understood that although Figure 2-6 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2-6At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.
[0102] In one embodiment, Fig. 9 As shown, a data communication device 900 is provided, including: a multi-channel PDN data path establishment module 902, a data packet receiving module 904, a path identification obtaining module 906 and a PDN data sending module 908, wherein: the multi-channel PDN data path establishment module 902 is used to interact with the host through the control path divided from the bus interface to establish a multi-channel PDN data path; the data packet receiving module 904 is used to receive the data packet transmitted by the host multiplexing data transmission path through the data transmission path divided from the bus interface; 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 to send the PDN data in the data packet through the PDN data path corresponding to the path identification in the multi-channel PDN data path.
[0103] In one embodiment, the path identifier obtaining module 906 includes: a data type flag parsing unit, which is used to parse the data type flag of the multiplexing protocol message header in the data packet according to a preset multiplexing protocol message header format; and a path identifier extraction unit, which is used to extract 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 is a preset value indicating that the PDN data is carried.
[0104] In one embodiment, the device includes: a data capacity reading unit, which is used to read 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 dynamically determined by the host based on the network quality parameter; a PDN data verification unit, which is used to verify the PDN data in the data packet according to the data capacity; and a PDN data sending module, which is used to execute the PDN data path corresponding to the path identifier in the multiple PDN data paths when the verification passes, and send the PDN data in the data packet.
[0105] In one embodiment, the device includes: a PDN response data receiving unit, which is used to receive PDN response data through multiple PDN data channels; a channel identifier acquisition unit, which is used to acquire the channel identifier of the PDN data channel through which the PDN response data passes; a response multiplexing protocol message header construction unit, which 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 channel identifier filling part of the response multiplexing protocol message header is filled with the acquired channel identifier; a response data packet generation unit, which is used to generate a response data packet according to the PDN response data and the response multiplexing protocol message header; and a response data packet sending module, which is used to send the response data packet through the data transmission channel.
[0106] In one embodiment, the response data packet generation unit is used to redetermine the packet data to be sent according to the response data capacity based on the PDN response data; and assemble the response multiplexing protocol message header and the packet data to be sent to obtain the response data packet.
[0107] For the specific definition of the data communication device, please refer to the definition of the data communication method above, which will not be repeated here. Each module in the above data communication device can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0108] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.10 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through 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 and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a data communication method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a button, a trackball or a touch pad set on the computer device housing, or an external keyboard, touch pad or mouse, etc.
[0109] Those skilled in the art will understand that Fig.10The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0110] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0111] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0112] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0113] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0114] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A data communication method, characterized in that: Executed in a communication module connected to a host via a bus interface, the method comprises: Through the control path divided from the bus interface, control information is exchanged with the host to establish multiple PDN data paths; receiving, through the data transmission path divided from the bus interface, data packets transmitted by the host multiplexing the data transmission path; Parsing the data type flag of the multiplexing protocol message header in the data packet according to a preset multiplexing protocol message header format; When the data type flag is a preset value indicating that the PDN data is carried, extracting the path identifier from the path identifier filling part of the multiplexing protocol message header according to the multiplexing protocol message header format; The PDN data in the data packet is sent through a PDN data path corresponding to the path identifier in the multiple PDN data paths.
2. The method according to claim 1, characterized in that The multiplexing protocol message header in the data packet has a preset multiplexing protocol message header format.
3. The method according to claim 1, characterized in that The method further comprises: According to the multiplexing protocol message header format, read the data capacity filled by 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; According to the data capacity, verify the PDN data in the data packet; 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.
4. The method according to claim 1, characterized in that: The method further comprises: receiving PDN response data through the multiple PDN data paths; Obtaining a path identifier of a PDN data path through which the PDN response data passes; According to a preset multiplexing protocol message header format, a response multiplexing protocol message header is constructed; 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 acquired path identifier; Generate a response data 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. The method according to claim 4, characterized in that 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 parameters; The generating a response data packet according to the PDN response data and the response multiplexing protocol message header includes: Based on the PDN response data, re-determine the packet data to be sent according to the response data capacity; The response multiplexing protocol message header and the packet data to be sent are assembled to obtain a response data packet.
6. A data communication device, characterized in that: The device comprises: A 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 a multi-channel PDN data path; A data packet receiving module, used for receiving data packets transmitted by the host multiplexing the data transmission path through the data transmission path divided from the bus interface; a path identifier obtaining module, configured to parse the data type flag of the multiplexing protocol message header in the data packet according to a preset multiplexing protocol message header format; when the data type flag 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 PDN data sending module is used 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. The device according to claim 6, characterized in that The device comprises: A PDN response data receiving unit, configured to receive PDN response data via multiple PDN data paths; A path identification acquisition unit, used to acquire a path identification of a PDN data path through which the PDN response data passes; A response multiplexing 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 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 to generate a response data packet according to the PDN response data and the response multiplexing protocol message header; the response data packet sending module is used to send the response data packet through the data transmission path.
8. The device according to claim 6, characterized in that The device comprises: A data capacity reading unit, used 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; A PDN data checking unit, configured to check the PDN data in the data packet according to the data capacity; The PDN data sending module is used to execute the sending of the PDN data in the data packet through the PDN data path corresponding to the path identifier in the multiple PDN data paths when the verification is passed.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Multi-channel signal transmission device and multi-channel signal transmission method
CN102647267A
Method to control multiple radio access bearers in a wireless device
CN102893547A
Data stream transmission method, sending device and receiving device
CN107623646A
Method and equipment for acquiring path identifier
CN109361600A
Communication method and device based on PCIe interface, computer equipment and computer readable storage medium
CN111475454A
