Data communication method and device
By aggregating multiple data packets of the same data stream and transmitting them using a single message header, the problems of low IP data transmission delay and bandwidth utilization are solved, and more efficient data communication is achieved.
Patent Information
- Application Number
- CN202310508568.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-06
- Publication Date
- 2024-11-08
AI Technical Summary
In the era of big data, artificial intelligence and cloud computing, the transmission delay and network bandwidth utilization of IP data are affected by the efficiency caused by the separate transmission of multiple compressed message headers and data packets.
By aggregating multiple data packets of the same data stream, only a single message header is used to describe the aggregated data packets, the separate transmission of multiple data packets and unnecessary bandwidth waste are avoided, and network communication efficiency is improved.
It improves the bandwidth utilization and transmission efficiency of data communication, reduces transmission delay, and enhances the ability to utilize network bandwidth during the transmission of data packets.
Smart Images

Figure CN118921332A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a data communication method and device. Background Art
[0002] With the development of big data, artificial intelligence (AI), and cloud computing technology, a large amount of data is constantly generated. In order to reduce the transmission delay of Internet protocol (IP) data, the processor can use the IP payload compression protocol (IPComp) method to compress IP data to obtain multiple data packets to be transmitted. Each data packet carries an IP data and a compressed message header describing the IP data. In the case of a large amount of IP data to be transmitted, the transmission of multiple data packets separately results in a small amount of data for a single transmission, which wastes the transmission bandwidth; and the amount of data of multiple compressed message headers of multiple data packets increases, which affects the data communication efficiency of the network. Therefore, how to provide a more effective data communication method has become a problem that needs to be solved urgently. Summary of the invention
[0003] The present application provides a data communication method and device, which solves the problem that a plurality of compressed message headers need to occupy a large network bandwidth, thus affecting the data communication efficiency of the network.
[0004] In a first aspect, the present application provides a data communication method. The data communication method is applied to a communication network, which includes multiple communication devices, and the data communication method provided by the present application is executed by the communication device. Exemplarily, the data communication method includes: the communication device obtains multiple compressed data packets, each data packet includes a compressed data to be transmitted. And, the communication device aggregates at least two data packets among the multiple data packets to obtain a data packet to be transmitted; wherein, at least two data packets belong to the same data stream, and the sum of the bit lengths of at least two data packets is less than or equal to a set threshold. Finally, the communication device sends the data packet to be transmitted.
[0005] In the present application, the communication device aggregates two or more data packets, which belong to the same data stream, so that the aggregated data packet only needs to use a single packet header to describe the compressed data carried by the data packet, which is conducive to improving the communication efficiency of all data packets in the network. In addition, since multiple compressed data are transmitted in one data packet, the bandwidth waste caused by the separate transmission of multiple data packets is avoided, and the bandwidth utilization rate of each data communication is improved.
[0006] In an optional implementation, the aforementioned multiple data messages include a first data message, which is any one of the multiple data messages. The communication device aggregates at least two data messages among the multiple data messages to obtain a data packet to be transmitted, including: the communication device determines other data messages belonging to the same data stream as the first data message from the multiple data messages, and determines whether the sum of the bit lengths of the first data message and the other data messages is less than or equal to a set threshold. If the sum of the bit lengths of the first data message and the other data messages is less than or equal to the set threshold, the communication device aggregates the first data message and the other data messages to obtain the data packet of the data stream.
[0007] In the present application, after the communication device identifies the data stream to which the data message belongs, it aggregates the data packets whose sum of bit lengths is less than or equal to the set threshold, so that the data volume of the aggregated data packet is not too large, thereby avoiding the increase in transmission delay, which is beneficial to improving the efficiency of bandwidth for data packet transmission.
[0008] In a second aspect, the present application provides another data communication method. The data communication method is applied to a communication network, which includes multiple communication devices, and the data communication method provided by the present application is executed by the communication device. Exemplarily, the data communication method includes: the communication device receives a data packet, and the data portion of the data packet includes all compressed data in at least two data messages. And, the communication device deaggregates the data portion of the data packet to obtain all compressed data in at least two data messages. Thereby, the communication device decompresses all compressed data to obtain multiple decompressed data; one decompressed data corresponds to one compressed data.
[0009] In the present application, the compressed data in two or more data messages are transmitted through one data packet, and the two or more data messages belong to the same data stream, so that the aggregated data packet only needs to use a single message header to describe the compressed data carried by the data packet, which is conducive to improving the communication efficiency of all data messages in the network. In addition, since multiple compressed data are transmitted in one data packet, the bandwidth waste caused by the separate transmission of multiple data messages is avoided, and the bandwidth utilization rate of each data communication is improved.
[0010] In combination with the content of any one of the implementations of the first aspect and the second aspect, as a possible example, the header of the data packet indicates: the compression method of all compressed data in at least two data packets, and the data portion of the data packet in which all compressed data is carried. Since multiple compressed data are carried in the data portion of a data packet, the data volume of a single data packet is larger than the data volume of a single data packet, so that during a single transmission, the communication process of the data packet can effectively utilize the bandwidth of the communication network, thereby improving the data communication efficiency of the communication network.
[0011] In combination with the content of any implementation of the first aspect and the second aspect, in a possible scenario, the message header of the data packet includes a compressed message header (hereinafter referred to as a "compressed header"), and the label in the compressed header is a first value, and the first value indicates that all compressed data is carried in the data portion of the data packet. For example, the first value is 88. For another example, the first value can be other values, such as 15, 87, 89 or other values.
[0012] In the present application, the value of the tag (flag) field in the compression header is used to mark whether the data packet has been aggregated. This is beneficial for the communication device to identify the position and deaggregation method of the compressed data in the data packet according to the tag after receiving the data packet, which is beneficial for the communication device to quickly deaggregate the data packet and improve the transmission efficiency of compressed data in the communication network.
[0013] In combination with the content of any one of the implementations of the first aspect and the second aspect, as a possible example, the aforementioned compression header also includes a compression identifier, which indicates the compression method of all compressed data in the data packet. The communication device can determine the compression method of the compressed data according to the compression identifier, so that the communication device quickly selects a decompression algorithm corresponding to the compression method to decompress the compressed data, avoiding the problem of misalignment of decompression caused by the communication device selecting a decompression algorithm that does not match the compressed data, which is conducive to improving the decompression efficiency and accuracy of the compressed data.
[0014] In combination with the content of any one of the implementations of the first aspect and the second aspect, in another possible scenario, the data portion of the data packet includes multiple data items, and one data item includes: a next offset and a compressed data among all compressed data, and the next offset indicates whether there are other data items after a data item. When the data portion includes multiple data items, in order to quickly obtain the aggregated compressed data, the communication device can identify the next offset field of each data item, thereby determining whether there are other compressed data after each data item, which is conducive to improving the speed at which the communication device deaggregates these compressed data. For example, the next offset field is located at the head of a data item.
[0015] In a third aspect, the present application provides a communication device. The communication device includes: a module that executes the first aspect or any optional implementation method in the first aspect. Exemplarily, the communication device includes: an acquisition module, an aggregation module and a communication module. The acquisition module is used to acquire multiple compressed data packets, each data packet includes a compressed data to be transmitted. The aggregation module is used to aggregate at least two data packets among the multiple data packets to obtain a data packet to be transmitted; wherein at least two data packets belong to the same data stream, and the sum of the bit lengths of at least two data packets is less than or equal to a set threshold. The communication module is used to send a data packet.
[0016] As an optional implementation method, the aforementioned multiple data packets include a first data packet, and the first data packet is any one of the multiple data packets. The aforementioned aggregation module is specifically used to: determine other data packets belonging to the same data stream as the first data packet from multiple data packets. The aggregation module is also specifically used to: determine whether the sum of the bit lengths of the first data packet and the other data packets is less than or equal to a set threshold. The aggregation module is also specifically used to: if the sum of the bit lengths of the first data packet and the other data packets is less than or equal to a set threshold, then aggregate the first data packet and the other data packets to obtain a data packet of a data stream.
[0017] In a fourth aspect, the present application provides another communication device. The communication device includes: a module that executes the second aspect or any optional implementation method of the second aspect. Exemplarily, the communication device includes: a communication module, a deaggregation module and a decompression module. The communication module is used to receive a data packet, and the data portion of the data packet includes all compressed data in at least two data messages. The deaggregation module is used to deaggregate the data portion of the data packet to obtain all compressed data in at least two data messages. The decompression module is used to decompress all compressed data to obtain multiple decompressed data, one data corresponding to one compressed data.
[0018] Regarding the specific content included in the data packet in the third aspect or the fourth aspect, reference may be made to the description of any implementation method in the first aspect or the second aspect, and no further details will be given here.
[0019] In a fifth aspect, the present application provides a communication device, which includes: a processor and a memory, wherein the memory is used to store computer instructions, and when the processor executes the instructions, the communication device executes the operation steps of the method of any implementation in the first aspect or the second aspect.
[0020] In a sixth aspect, the present application provides a chip. The chip includes: an interface circuit and a processing circuit. The interface circuit is used to receive data messages or data packets from other chips, or send data messages or data packets to other chips. The processor is used to execute the operation steps of the method of any implementation method in the first aspect or the second aspect.
[0021] In a seventh aspect, the present application provides a communication system. The communication system includes: a source communication device and a destination communication device. The source communication device obtains multiple compressed data packets, each data packet including a compressed data to be transmitted. The source communication device aggregates at least two data packets among the multiple data packets to obtain a data packet to be transmitted. Among them, at least two data packets belong to the same data stream, and the sum of the bit lengths of at least two data packets is less than or equal to a set threshold. The source communication device sends a data packet to the destination communication device, and the destination communication device is used to deaggregate the data packet.
[0022] The communication system can also be used to implement the operating steps of the method of any implementation method in the first aspect or the second aspect, which will not be described in detail here.
[0023] In an eighth aspect, the present application provides a computer-readable storage medium. The computer-readable storage medium includes: computer software instructions; when the computer software instructions are executed in a communication device, the communication device executes the operation steps of the method of any implementation of the first aspect or the second aspect.
[0024] In a ninth aspect, the present application provides a computer program product. When the computer program product is executed on a communication device, the communication device is caused to execute the operation steps of the method in any one of the implementation modes of the first aspect or the second aspect.
[0025] Regarding the beneficial effects of the third to ninth aspects, reference may be made to the description of any implementation in the first or second aspect, and no further description is given here. Based on the implementations provided in the above aspects, this application may be further combined to provide more implementations. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 A schematic diagram of the architecture of a communication system provided for this application;
[0027] Figure 2 A schematic diagram of a data communication method provided in this application Figure 1 ;
[0028] Figure 3 A schematic diagram of the structure of a data packet provided for this application;
[0029] Figure 4 A schematic diagram of a data communication method provided in this application Figure 2 ;
[0030] Figure 5 A schematic diagram of the structure of a communication device provided in this application Figure 1 ;
[0031] Figure 6 A schematic diagram of the structure of a communication device provided in this application Figure 2 ;
[0032] Figure 7 A schematic diagram of the structure of a communication device provided in this application. DETAILED DESCRIPTION
[0033] The technical solution in this application will be described below in conjunction with the accompanying drawings.
[0034] The technical solutions of the embodiments of the present application can be applied to various communication systems, such as wireless fidelity (WiFi) systems, vehicle to everything (V2X) communication systems, device-to-device (D2D) communication systems, Internet of Vehicles communication systems, 4th generation (4G) mobile communication systems, such as long term evolution (LTE) systems, worldwide interoperability for microwave access (WiMAX) communication systems, fifth generation (5G) mobile communication systems, such as new radio (NR) systems, and future communication systems, such as sixth generation (6G) mobile communication systems.
[0035] The present application will present various aspects, embodiments or features around a system that may include multiple devices, components, modules, etc. It should be understood and appreciated that each system may include additional devices, components, modules, etc., and / or may not include all of the devices, components, modules, etc. discussed in conjunction with the figures. In addition, combinations of these schemes may also be used.
[0036] In addition, in the embodiments of the present application, words such as "exemplarily" and "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present concepts in a concrete way.
[0037] In the embodiments of the present application, "information", "signal", "message", "channel" and "signaling" may be used interchangeably. It should be noted that when the distinction between them is not emphasized, the meanings they intend to express are consistent. "of", "corresponding, relevant" and "corresponding" may be used interchangeably. It should be noted that when the distinction between them is not emphasized, the meanings they intend to express are consistent.
[0038] The network architecture and business scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. A person of ordinary skill in the art can appreciate that with the evolution of the network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0039] To facilitate understanding of the embodiments of the present application, first Figure 1 The communication system shown in the example is used to describe in detail the communication system applicable to the embodiment of the present application. Figure 1 This is a schematic diagram of the architecture of a communication system provided by this application. Figure 1 As shown, the communication system includes network equipment and terminal equipment, such as network equipment 1 and network equipment 2, and terminal equipment 1 and terminal equipment 2.
[0040] The network device is located at the network side of the communication system and has a wireless transceiver function or is a chip or chip system that can be set in the device. The network device includes, but is not limited to: an access point (AP) in a wireless fidelity (WiFi) system, such as a home gateway, a router, a server, a switch, a bridge, etc., an evolved Node B (eNB), a radio network controller (RNC), a Node B (NB), a base station controller (BSC), a base transceiver station (BTS), a home base station (e.g., home evolved NodeB, or homeNode B, HNB), a baseband unit (BBU), a wireless relay node, a wireless backhaul node, a transmission point (TRP or TP), etc., and can also be 5G, such as a gNB in a new radio (NR) system, or a transmission point (TRP or TP), one or a group of (including multiple antenna panels) antenna panels of a base station in a 5G system, or a network node constituting a gNB or a transmission point, such as a baseband unit (BBU), or a distributed unit (DBU). unit (DU), road side unit (RSU) with base station function, etc.
[0041] The terminal device is a terminal that accesses the communication system and has a wireless transceiver function or a chip or chip system that can be set in the terminal. The terminal device can also be called an access terminal, a user unit, a user station, a mobile station, a mobile station, a remote station, a remote terminal, a mobile device, a user terminal, a terminal, a wireless communication device, a user agent or a user device. The terminal device in the embodiment of the present application can be a mobile phone, a tablet computer, a computer with a wireless transceiver function, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, a wireless terminal in smart home, a vehicle-mounted terminal, an RSU with terminal function, etc. The terminal device of the present application can also be a vehicle-mounted module, vehicle-mounted module, vehicle-mounted component, vehicle-mounted chip or vehicle-mounted unit that is built into the vehicle as one or more components or units. The vehicle can implement the communication method provided by the present application through the built-in vehicle-mounted module, vehicle-mounted module, vehicle-mounted component, vehicle-mounted chip or vehicle-mounted unit.
[0042] It should be noted that the communication method provided in the embodiment of the present application can be applied to Figure 1 Between any two devices shown, such as between terminal devices, between network devices, and between a terminal device and a network device, the specific implementation can refer to the following method embodiments, which will not be repeated here.
[0043] It should be pointed out that the solutions in the embodiments of the present application can also be applied to other communication systems, and the corresponding names can also be replaced by the names of corresponding functions in other communication systems.
[0044] It should be understood that Figure 1 This is a simplified schematic diagram for ease of understanding only. The communication system may also include other network devices and / or other terminal devices. Figure 1 Not drawn in.
[0045] In the following embodiments, network devices and terminal devices are collectively named as communication devices, and will not be described again below.
[0046] The following is an introduction to the technical terms involved in the embodiments of the present application.
[0047] IP Payload Compression Protocol (IPComp or IPPCP) is a low-level compression protocol for IP datagrams.
[0048] The data message includes a message header and data. The message header is used to describe the routing information of the data, the amount of the data and the position of the data in the data message.
[0049] During the data communication process, the communication device compresses the IP data and obtains the compressed data message.
[0050] Exemplarily, commonly used IP data compression algorithms include, but are not limited to: Gzip compression algorithm, Lempel-Ziv (Lz)4 compression algorithm, Brotli compression algorithm, Zstandard (Zstd) compression algorithm, Pigz compression algorithm, Intelligent Storage Acceleration Library (ISA-L) compression algorithm and parallel Zstd (parallel zstd, Pzstd) compression algorithm or other types of compression algorithms, etc.
[0051] For the relevant description of the above compression algorithm, please refer to the relevant content of the general technology, which will not be repeated here.
[0052] For several compression algorithms for IP data, the following Table 1 shows some possible compression examples.
[0053] Table 1
[0054]
[0055] The data compression ratio refers to the ratio between the amount of data before compression and the amount of data after compression.
[0056] Compression time refers to the time required for a communication device to compress a unit of data volume (such as 1165MB) of IP data.
[0057] Decompression time refers to the time required for a communication device to decompress a unit amount of IP data.
[0058] Compression speed refers to the maximum amount of data that a communication device can compress within a unit of time (such as 1s).
[0059] It is worth noting that the content shown in Table 1 above is only an example provided in the embodiments of the present application and should not be construed as a limitation on the present application.
[0060] For example, when the unit data size is changed to 1165 KB (about 1.14 MB), the units of compression time and decompression time are changed to millisecond (ms).
[0061] When the communication device compresses IP data using the above compression algorithm, the compression rate is generally greater than or equal to 50%, so that the amount of data in the compressed data message is small. Therefore, the compressed data message is also called a small packet. When the communication link transmits only one small packet at a time, the bandwidth of the communication link is usually much larger than the amount of data corresponding to the small packet, resulting in low bandwidth utilization.
[0062] To solve the above problems, Figure 1 Based on this, the present application provides a data communication method. Figure 2 A schematic diagram of a data communication method provided in this application Figure 1 The data communication method can be applied to Figure 1 The communication system provided, such as the data communication method can be executed by a communication device, the communication device can refer to Figure 1 Any network device or terminal device in.
[0063] like Figure 1 As shown, the communication device 21 is also called a source communication device, a sending communication device or a sending device, and the communication device 22 is also called a destination communication device, a receiving communication device or a receiving device. The data communication method provided in the embodiment of the present application includes the following steps S210 to S250.
[0064] S210. The communication device 21 obtains a plurality of compressed data messages.
[0065] Each of the multiple data packets includes compressed data to be transmitted.
[0066] Exemplarily, the compressed data may be obtained by compressing IP data. The compression method of IP data may refer to the relevant contents of Table 1 above, which will not be described in detail here.
[0067] In a possible example, the communication device 21 may obtain the compressed multiple data messages in a manner that includes: the communication device 21 receives data sent by other communication devices, and compresses the data to obtain the compressed multiple data messages.
[0068] In another possible example, the manner in which the communication device 21 obtains the compressed multiple data packets may include: the communication device 21 receives the compressed multiple data packets sent by other communication devices.
[0069] The above two possible examples are only possible implementations of S210 provided in the embodiments of the present application and should not be construed as limiting the present application. In some optional situations, the communication device 21 may read the data to be sent from a database that maintains a communication connection with the communication device 21, and compress the read data to obtain a plurality of compressed data messages.
[0070] S220. The communication device 21 aggregates at least two data packets from the multiple data packets to obtain a data packet to be transmitted.
[0071] The at least two data messages belong to the same data stream, and the sum of the bit lengths of the at least two data messages is less than or equal to a set threshold.
[0072] Exemplarily, the aforementioned at least two data packets may refer to two or more data packets. An exemplary description is given below by taking the example that the at least two data packets include a first data packet and a second data packet.
[0073] In a feasible scenario, the at least two data packets belong to the same data flow, which may include: the source address and the destination address of the first data packet and the second data packet are consistent, and the first data packet and the second data packet use the same compression method.
[0074] For the threshold value set above, after partial expansion of IPComp, the threshold value can be called the maximum transmission unit (MTU) value. The MTU value refers to the maximum bit length (described in bytes) of a single packet transmitted in a communication network at a time, such as 500 bytes, 600 bytes, 1500 bytes, 2000 bytes or other values. The threshold value can be adjusted according to the transmission performance (such as bandwidth) of the communication network.
[0075] As an optional implementation, the data packet in S220 includes a message header and a data portion, such as Figure 3 As shown, Figure 3 A schematic diagram of the structure of a data packet provided in this application. The data packet includes a message header and a data portion.
[0076] The message header of the data packet indicates: the compression method of all compressed data in the at least two data messages obtained in S220, and the data part of the data packet carrying all the compressed data.
[0077] Since multiple compressed data are carried in the data part of a data packet, the data volume of a single data packet is larger than the data volume of a single data message, so that during a single transmission, the communication process of the data packet can effectively utilize the bandwidth of the communication network, thereby improving the data communication efficiency of the communication network.
[0078] like Figure 3 As shown, the message header of the data packet includes an IP header and a compression header. The specific content of the IP header can refer to the relevant description of the common technology, which will not be repeated here.
[0079] It is worth noting that the IP header can be used to identify the data stream to which the data packet belongs, such as the destination address, source address, data length and other information of the data packet.
[0080] The compression header includes a next header field, a flag field, and a compression identification field. For example, the compression identification field is a compression parameter index (CPI).
[0081] For example, the compression header includes 32 bits, wherein the next header field occupies 8 bits, the flag field occupies 8 bits, and the CPI field occupies 16 bits.
[0082] The flag in the compression header is a first value, which indicates that all compressed data in at least two data messages are carried in the data portion 32 of the data packet.
[0083] In conventional technology, the value of the flag field is defined as 0, and the communication device receiving the data packet ignores the value of the flag field (refer to the definition of flag in the rfc3173 protocol).
[0084] In the embodiment of the present application, as a possible example, the first value is 88 or other custom values (such as 12, 87, 99 or others).
[0085] Compared with the conventional technology in which the flag field is a reserved value, the embodiment of the present application sets the flag field to the first value, which is used to identify that the data packet supports the aggregation private protocol. This is beneficial for the communication device to identify the position and deaggregation method of the compressed data in the data packet according to the label after receiving the data packet, so that the communication device receiving the data packet can quickly deaggregate the data packet, thereby improving the transmission efficiency of compressed data in the communication network.
[0086] Optionally, the compression identifier in the compression identifier field indicates a compression method of all compressed data in at least two data messages. For example, the compression method is any one of the compression algorithms shown in Table 1.
[0087] The communication device 22 that receives the data packet can determine the compression method of the compressed data based on the compression identifier. Thus, the communication device 22 quickly selects a decompression algorithm corresponding to the compression method to decompress the compressed data, thereby avoiding the problem of decompression misalignment caused by the communication device 22 selecting a decompression algorithm that does not match the compressed data, which is beneficial to improving the decompression efficiency and accuracy of the compressed data.
[0088] like Figure 3 As shown, the data portion of the data packet includes multiple data items, such as data item 1 to data item 3.
[0089] Each data item includes: a field for carrying a next offset (next offset field, next offset) and a field for carrying data.
[0090] The next offset indicates whether there are other data items after a data item. The value of the next offset can be as follows: Figure 3 The data length (data lenth, datalen) shown indicates the bit length occupied by the data item.
[0091] When the data portion includes multiple data items, in order to quickly obtain the aggregated compressed data, the communication device 22 can identify the next offset field of each data item, thereby determining whether there is other compressed data after each data item, which is beneficial to improving the speed at which the communication device deaggregates these compressed data.
[0092] For example, in Figure 3 The next offset is at the head of the data item.
[0093] Optionally, the next offset may also be located at other specified positions of the data item, such as the end of the data item or other positions, which is not limited in this application.
[0094] In the case where the communication device 21 and the communication device 22 can quickly determine the information indicated by the next offset according to the supported protocol type, the position of the next offset in the data item can be adjusted according to the data structure in the data part.
[0095] It should be noted that Figure 3 This is only a possible data structure of a data packet provided for an embodiment of the present application and should not be understood as a limitation of the present application. The data portion of the data packet may include more or fewer data items; the position of the next offset in the data item is not limited to the header of the data item; the value of the label field in the compression header may also be other values besides 88, etc.
[0096] Please continue to refer to Figure 2The data communication method provided in the embodiment of the present application also includes the following steps S230 to S250.
[0097] S230 : The communication device 21 sends a data packet to the communication device 22 .
[0098] Correspondingly, the communication device 22 receives the data packet sent by the communication device 21 .
[0099] In an embodiment of the present application, the communication device 21 aggregates two or more data packets, which belong to the same data stream, so that the aggregated data packet only needs to use a single packet header to describe the compressed data carried by the data packet, which is beneficial to improving the communication efficiency of all data packets in the network.
[0100] Furthermore, since a plurality of compressed data are transmitted in one data packet, the situation where bandwidth is wasted due to the separate transmission of a plurality of data messages is avoided, thereby improving the bandwidth utilization rate of each data communication.
[0101] S240: The communication device 22 deaggregates the data portion of the data packet to obtain all compressed data in at least two data messages.
[0102] Exemplarily, the communication device 22 parses the tag (flag) field included in the compression header in the message header, and when identifying that the value of the flag is the first value, deaggregates the data part in the data packet, thereby obtaining multiple compressed data items in the data part.
[0103] For possible implementations of the data structure of the data packet, please refer to S220 and Figure 3 The relevant description is not repeated here.
[0104] S250. The communication device 22 decompresses all compressed data obtained in S240 to obtain a plurality of decompressed data.
[0105] Among them, one piece of data after decompression corresponds to one piece of compressed data before decompression.
[0106] For example, the communication device parses the compression identification field included in the compression header in the message header, obtains the compression algorithm used for the data part, and then uses the decompression algorithm corresponding to the compression algorithm to decompress the compressed data included in each data item, thereby obtaining all data corresponding to the data packet.
[0107] It is worth noting that the compressed data in two or more data messages are transmitted through one data packet, and the two or more data messages belong to the same data stream, so that the aggregated data packet only needs to use a single message header to describe the compressed data carried by the data packet, which is conducive to improving the communication efficiency of all data messages in the network. In addition, since multiple compressed data are transmitted in one data packet, the bandwidth waste caused by the separate transmission of multiple data messages is avoided, and the bandwidth utilization rate of each data communication is improved.
[0108] With respect to the process of the communication device 21 aggregating at least two data messages, the embodiment of the present application provides a possible implementation method, such as Figure 4 As shown, Figure 4 A schematic diagram of a data communication method provided in this application Figure 2 The data communication method is implemented by a compression gateway device, which may be Figure 2 The communication device 21 in.
[0109] like Figure 4 As shown, the sending device and the compression gateway device can be different physical devices, and the decompression gateway device and the receiving device are also different devices.
[0110] However, in some possible scenarios, the functions of the sending device and the compression gateway device may be implemented by one physical device, and the functions of the receiving device and the decompression gateway device may be implemented by another physical device. Figure 4 The structure and connection method of the devices should not be understood as a limitation of this application.
[0111] Figure 4 The provided data communication method includes the following steps ① to ⑨.
[0112] Step ①: After receiving the data transmitted by the sending device, the compression gateway device compresses the data to obtain a compressed data message.
[0113] For the compression method of step ①, please refer to the relevant description in Table 1, which will not be repeated here.
[0114] Step ②: The compression gateway device determines whether the acquired data message is a small packet.
[0115] For example, the compression gateway device compares the data volume of the generated data message with the MTU value: if the data volume of the data message is less than or equal to the MTU value, the data message is a small packet, and step ④ is executed; if the data volume of the data message is greater than the MTU value, the data message is not a small packet, and step ③ is executed.
[0116] Step 3: The compression gateway device encapsulates the data message and generates a compression header for the data message.
[0117] The compression header indicates the compression method used by the compression gateway device to generate the data message, such as the Lz4 compression algorithm.
[0118] Step ④: The compression gateway device caches the data message and aggregates the data message with other data messages.
[0119] For example, the compression gateway device determines other data packets belonging to the same data stream as the first data packet from multiple data packets compressed by the compression gateway device, and when the sum of the bit lengths of the first data packet and the other data packets is less than or equal to a set threshold (MTU value), the first data packet and the other data packets are aggregated to obtain data packets of the aforementioned data stream.
[0120] The other data packets here may refer to one data packet or m data packets, where m is a positive integer greater than or equal to 2.
[0121] Step 5: The compression gateway device encapsulates the data message aggregated in step 4 with a compression aggregation header.
[0122] The structure of the compression polymer head can refer to Figure 3 The description of the data packets in the figure will not be repeated here.
[0123] In some possible situations, even if the data volume of a single data message is smaller than the MTU value, the compression gateway device does not need to aggregate the data message with other data messages. Two possible situations are provided below.
[0124] Case 1: The bit length between this single data packet and any other data packet is greater than the MTU value.
[0125] For example, the bit length of the single data message is 70, the minimum bit length of other data messages is greater than or equal to 50, and the MTU value is 100. Then the bit length between the single data message and any other data message is greater than or equal to 120, and 120>100. In this case, the single data message does not need to be aggregated with other data messages.
[0126] Scenario 2: After the single data message has waited for the first period of time, the compression gateway device still fails to obtain other data messages that can be aggregated with the single data message.
[0127] The first duration here may be preset, or may be set according to user requirements, network requirements, or user levels, such as the first duration being 2ms, 5ms, or other values.
[0128] The above two possible situations are merely examples provided in the embodiments of the present application and should not be construed as limitations on the present application.
[0129] According to different communication networks or user requirements, there may be more types of differentiation methods to determine whether to aggregate data messages.
[0130] Step ⑥: compress the data packet sent by the gateway device.
[0131] Corresponding to step ⑥, the decompression gateway device executes step ⑦.
[0132] Step 7: Decompress the data packet received by the gateway device.
[0133] It is worth noting that the data packets in step ⑥ and step ⑦ can be data packets generated after encapsulation in step ④ or step ⑤.
[0134] If the data packet compression gateway device does not perform aggregation, the decompression gateway device executes step ⑧-1; if the data packet compression gateway device performs aggregation, the decompression gateway device executes step ⑧-2.
[0135] Step ⑧-1, the decompression gateway device parses the compression header to obtain the compressed data (compressed data message).
[0136] Step ⑧-2, the decompression gateway device parses the compression aggregation header, deaggregates the multiple compressed data in the data packet, and obtains multiple compressed data (compressed data carried by the compressed multiple data packets).
[0137] Step ⑨: The decompression gateway device decompresses the compressed data and sends the decompressed data to the receiving device.
[0138] In an embodiment of the present application, the compression gateway device aggregates a large number of small packets generated after compression through an extended protocol of IPComp, further compresses the data, and obtains data packets to be transmitted.
[0139] The compression effect is shown in Table 2 below; in the best case, the compression efficiency can be increased to 23%, which is a significant improvement over the original 56%. Aggregation + compression does not destroy the original compression process (Table 1), and secondary aggregation is performed on the original compression process, which reduces the overhead of the message header during data communication and is conducive to improving the communication efficiency of the communication network.
[0140] Table 2 (compression efficiency comparison)
[0141]
[0142] It is understandable that in order to implement the functions in the above embodiments, the communication device includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and method steps of each example described in the embodiments disclosed in this application, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application scenario and design constraints of the technical solution.
[0143] Combined with the above Figures 1 to 4 , describes in detail the data communication method provided according to the embodiment of the present application, and will now be combined with Figure 5 , describing a communication device provided according to an embodiment of the present application.
[0144] Figure 5 A schematic diagram of the structure of a communication device provided in this application Figure 1 These communication devices can be used to implement the functions of the communication device in the above method embodiment, and thus can also achieve the beneficial effects of the above method embodiment. In the embodiment of the present application, the communication device can be as follows: Figure 2 The communication device 21 shown, or Figure 4 The compression gateway device shown may also be a module (such as a chip) applied to a communication device or a compression gateway device.
[0145] like Figure 5 As shown, the communication device 500 includes an acquisition module 510, an aggregation module 520 and a communication module 530. The communication device 500 is used to implement the above Figure 2 The functions of the communication device 21 in the method embodiment shown in FIG.
[0146] Exemplarily, the acquisition module 510 is used to acquire multiple compressed data packets, each of which includes a compressed data to be transmitted. The aggregation module 520 is used to aggregate at least two data packets among the multiple data packets to obtain a data packet to be transmitted; wherein the at least two data packets belong to the same data stream, and the sum of the bit lengths of the at least two data packets is less than or equal to a set threshold. The communication module 530 is used to send a data packet.
[0147] As an optional implementation, the aforementioned multiple data packets include a first data packet, and the first data packet is any one of the multiple data packets. The aforementioned aggregation module 520 is specifically used to: determine other data packets belonging to the same data stream as the first data packet from multiple data packets. The aggregation module 520 is also specifically used to: determine whether the sum of the bit lengths of the first data packet and the other data packets is less than or equal to a set threshold. The aggregation module 520 is also specifically used to: if the sum of the bit lengths of the first data packet and the other data packets is less than or equal to the set threshold, then aggregate the first data packet and the other data packets to obtain a data packet of a data stream.
[0148] Figure 6 A schematic diagram of the structure of a communication device provided in this application Figure 2 These communication devices can be used to implement the functions of the communication device in the above method embodiment, and thus can also achieve the beneficial effects of the above method embodiment. In the embodiment of the present application, the communication device can be as follows: Figure 2 The communication device 22 shown, or Figure 4 The decompression gateway device shown may also be a module (such as a chip) applied to a communication device or a decompression gateway device.
[0149] like Figure 6 As shown, the communication device 600 includes: a communication module 610 , a deaggregation module 620 and a decompression module 630 .
[0150] Exemplarily, the communication module 610 is used to receive a data packet, wherein the data portion of the data packet includes all compressed data in at least two data messages. The deaggregation module 620 is used to deaggregate the data portion of the data packet to obtain all compressed data in at least two data messages. The decompression module 630 is used to decompress all compressed data to obtain multiple decompressed data, wherein one data corresponds to one compressed data.
[0151] The communication device 500 and the communication device 600 of the embodiment of the present application can be implemented by software modules. The communication device 500 and the communication device 600 according to the embodiment of the present application can correspond to the method described in the embodiment of the present application, and the above and other operations and / or functions of each module in the communication device 500 and the communication device 600 are respectively to implement the method flow in the aforementioned figures, and for the sake of brevity, they are not repeated here.
[0152] The communication device 500 and the communication device 600 of the embodiment of the present application can also be implemented by hardware. Figure 7 As shown, Figure 7This is a schematic diagram of the structure of a communication device provided in this application. The communication device may be a terminal device or a network device, or may be a chip (system) or other parts or components that can be set in the terminal device or the network device. Figure 7 As shown, the communication device 700 may include a processor 701. Optionally, the communication device 700 may further include a memory 702 and / or a transceiver 703. The processor 701 is coupled with the memory 702 and the transceiver 703, such as being connected via a communication bus.
[0153] Combine the following Figure 7 The components of the communication device 700 are described in detail:
[0154] The processor 701 is the control center of the communication device 700, which can be a processor or a general term for multiple processing elements. For example, the processor 701 is one or more central processing units (CPUs), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application, such as one or more digital signal processors (DSPs), or one or more field programmable gate arrays (FPGAs).
[0155] Optionally, the processor 701 may execute various functions of the communication device 700 by running or executing a software program stored in the memory 702 and calling data stored in the memory 702. In a specific implementation, as an embodiment, the processor 701 may include one or more CPUs, such as Figure 7 CPU0 and CPU1 are shown in FIG.
[0156] Optionally, the communication device 700 may also include multiple processors, such as Figure 7 1 and 10. Each of these processors may be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).
[0157] The memory 702 is used to store the software program for executing the solution of the present application, and is controlled by the processor 701 to execute. The specific implementation method can refer to the above method embodiment, which will not be repeated here. Exemplarily, the memory 702 can be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to this. The memory 702 can be integrated with the processor 701, or it can exist independently and be accessed through the interface circuit ( Figure 7 (not shown) is coupled to the processor 701, which is not specifically limited in the embodiment of the present application.
[0158] The transceiver 703 is used for communication with other communication devices. For example, if the communication device 700 is a terminal device, the transceiver 703 can be used to communicate with a network device or another terminal device. For another example, if the communication device 700 is a network device, the transceiver 703 can be used to communicate with a terminal device or another network device.
[0159] Optionally, the transceiver 703 may include a receiver and a transmitter ( Figure 7 The receiver is used to implement a receiving function, and the transmitter is used to implement a sending function.
[0160] Optionally, the transceiver 703 may be integrated with the processor 701, or may exist independently and communicate with the processor 701 through the interface circuit ( Figure 7 (not shown) is coupled to the processor 701, which is not specifically limited in the embodiment of the present application.
[0161] It should be noted that Figure 7 The structure of the communication device 700 shown in the figure does not constitute a limitation on the communication device. The actual communication device may include more or less components than those shown in the figure, or combine certain components, or arrange the components differently.
[0162] In addition, the technical effects of the communication device 700 can refer to the technical effects of the communication method described in the above method embodiment, and will not be repeated here.
[0163] The embodiment of the present application provides a communication system. The communication system includes at least two communication devices mentioned above. Optionally, the communication system may also include: one or more forwarding devices, which are used to forward a data packet sent by a source communication device until the data packet reaches a destination communication device.
[0164] It should be understood that the processor in the embodiments of the present application may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0165] It should also be understood that the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).
[0166] The method steps in the embodiments of the present application can be implemented by hardware, or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in RAM, flash memory, ROM, PROM, EPROM, EEPROM, registers, hard disks, mobile hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC. In addition, the ASIC can be located in a computing device. Of course, the processor and the storage medium can also be present in a network device or a terminal device as discrete components.
[0167] The present application also provides a chip system, which includes a processor for implementing the functions of the communication device in the above method. In one possible design, the chip system also includes a memory for storing program instructions and / or data. The chip system can be composed of a chip, or can include a chip and other discrete devices.
[0168] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instruction is loaded and executed on a computer, the process or function described in the embodiment of the present application is executed in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user device or other programmable device. The computer program or instruction may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer program or instruction may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired or wireless means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium, for example, a floppy disk, a hard disk, a tape; it may also be an optical medium, for example, a digital video disc (DVD); it may also be a semiconductor medium, for example, a solid state drive (SSD).
[0169] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A data communication method, characterized in that: The method comprises: Acquire multiple compressed data packets, each data packet including a compressed data to be transmitted; Aggregating at least two data packets among the multiple data packets to obtain a data packet to be transmitted; The at least two data messages belong to the same data stream, and the sum of the bit lengths of the at least two data messages is less than or equal to a set threshold; The data packet is sent.
2. The method according to claim 1, characterized in that The message header of the data packet indicates: the compression method of all compressed data in the at least two data messages, and the data part in which all compressed data is carried by the data packet.
3. The method according to claim 2, characterized in that The message header of the data packet includes a compression header, the label in the compression header is a first value, and the first value indicates that all compressed data are carried in the data part of the data packet.
4. The method according to claim 3, characterized in that The first value is 88.
5. The method according to any one of claims 2 to 4, characterized in that: The message header of the data packet includes a compression header, and the compression identifier in the compression header indicates the compression method of all the compressed data.
6. The method according to any one of claims 2 to 5, characterized in that: The data portion includes a plurality of data items, one data item includes: a next offset and one compressed data among all the compressed data, the next offset indicating whether there are other data items after the one data item.
7. The method according to claim 6, characterized in that The next offset is located at the head of the one data item.
8. The method according to any one of claims 1 to 7, characterized in that The multiple data packets include a first data packet, and the first data packet is any one of the multiple data packets; The step of aggregating at least two of the multiple data packets to obtain a data packet to be transmitted includes: Determine, from the multiple data packets, other data packets that belong to the same data flow as the first data packet; Determine whether the sum of the bit lengths of the first data message and the other data messages is less than or equal to a set threshold; If the sum of the bit lengths of the first data packet and the other data packets is less than or equal to a set threshold, the first data packet and the other data packets are aggregated to obtain the data packet of the one data stream.
9. A data communication method, characterized in that: The method comprises: receiving a data packet, wherein a data portion of the data packet includes all compressed data in at least two data messages; Deaggregating the data portion of the data packet to obtain all compressed data in the at least two data packets; Decompress all the compressed data to obtain multiple decompressed data, where one data corresponds to one compressed data.
10. The method according to claim 9, characterized in that The message header of the data packet indicates: the compression method of all compressed data in the at least two data messages, and the data part in which all compressed data is carried by the data packet.
11. The method according to claim 10, characterized in that The message header of the data packet includes a compression header, the label in the compression header is a first value, and the first value indicates that all compressed data are carried in the data part of the data packet.
12. The method according to claim 11, characterized in that The first value is 88.
13. The method according to any one of claims 9 to 12, characterized in that: The message header of the data packet includes a compression header, and the compression identifier in the compression header indicates the compression method of all the compressed data.
14. The method according to any one of claims 10 to 13, characterized in that: The data portion includes a plurality of data items, one data item includes: a next offset and one compressed data among all the compressed data, the next offset indicating whether there are other data items after the one data item.
15. The method according to claim 14, characterized in that The next offset is located at the head of the one data item.
16. A communication device, characterized in that: The device comprises: An acquisition module, used for acquiring a plurality of compressed data messages, each data message including a compressed data to be transmitted; An aggregation module, used for aggregating at least two data packets among the multiple data packets to obtain a data packet to be transmitted; The at least two data messages belong to the same data stream, and the sum of the bit lengths of the at least two data messages is less than or equal to a set threshold; The communication module is used to send the data packet.
17. The device according to claim 16, characterized in that The message header of the data packet indicates: the compression method of all compressed data in the at least two data messages, and the data part in which all compressed data is carried by the data packet.
18. The device according to claim 17, characterized in that The message header of the data packet includes a compression header, the label in the compression header is a first value, and the first value indicates that all compressed data are carried in the data part of the data packet.
19. The device according to claim 18, characterized in that The first value is 88.
20. The device according to any one of claims 17 to 19, characterized in that The message header of the data packet includes a compression header, and the compression identifier in the compression header indicates the compression method of all the compressed data.
21. The device according to any one of claims 17 to 20, characterized in that The data portion includes a plurality of data items, one data item includes: a next offset and one compressed data among all the compressed data, the next offset indicating whether there are other data items after the one data item.
22. The device according to claim 21, characterized in that The next offset is located at the head of the one data item.
23. The device according to any one of claims 16 to 22, characterized in that The multiple data packets include a first data packet, and the first data packet is any one of the multiple data packets; The aggregation module is specifically used to: determine other data packets belonging to the same data flow as the first data packet from the multiple data packets; The aggregation module is further specifically used to: determine whether the sum of the bit lengths of the first data message and the other data messages is less than or equal to a set threshold; The aggregation module is further specifically used to: if the sum of the bit lengths of the first data packet and the other data packets is less than or equal to a set threshold, aggregate the first data packet and the other data packets to obtain the data packet of the one data stream.
24. A communication device, characterized in that: The device comprises: A communication module, configured to receive a data packet, wherein a data portion of the data packet includes all compressed data in at least two data messages; A de-aggregation module, used for de-aggregating the data part of the data packet to obtain all compressed data in the at least two data packets; The decompression module is used to decompress all the compressed data to obtain multiple decompressed data, where one data corresponds to one compressed data.
25. The device according to claim 24, characterized in that The message header of the data packet indicates: the compression method of all compressed data in the at least two data messages, and the data part in which all compressed data is carried by the data packet.
26. The device according to claim 25, characterized in that The message header of the data packet includes a compression header, the label in the compression header is a first value, and the first value indicates that all compressed data are carried in the data part of the data packet.
27. The device according to claim 26, characterized in that The first value is 88.
28. The device according to any one of claims 24 to 27, characterized in that The message header of the data packet includes a compression header, and the compression identifier in the compression header indicates the compression method of all the compressed data.
29. The device according to any one of claims 25 to 28, characterized in that The data portion includes a plurality of data items, one data item includes: a next offset and one compressed data among all the compressed data, the next offset indicating whether there are other data items after the one data item.
30. The device according to claim 29, characterized in that The next offset is located at the head of the one data item.
31. A communication device, characterized in that: include: A processor and a memory, wherein the memory is used to store computer instructions. When the processor executes the instructions, the communication device executes the method according to any one of claims 1 to 15.
32. A chip, characterized in that: include: Interface circuits and processing circuits; The interface circuit is used to receive data messages or data packets from other chips, or send data messages or data packets to the other chips; The processor is configured to execute the method according to any one of claims 1 to 15.
33. A communication system, characterized in that: include: A source communication device and a destination communication device; The source communication device obtains a plurality of compressed data messages, each of which includes a compressed data to be transmitted; The source communication device aggregates at least two data packets among the multiple data packets to obtain a data packet to be transmitted; The at least two data messages belong to the same data stream, and the sum of the bit lengths of the at least two data messages is less than or equal to a set threshold; The source communication device sends the data packet to the destination communication device, and the destination communication device is used to deaggregate the data packet.
34. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer software instructions. When the computer software instructions are executed in a communication device, the communication device executes the method according to any one of claims 1 to 15.
