Data processing method and related equipment
By exorbiting the data frames of terminal devices in the Internet of Things system on edge computing devices, the network congestion problem caused by the increase in the number of terminal devices in the Internet of Things system is solved, and the data volume reduction and decoding capabilities are achieved reserved.
Patent Information
- Application Number
- CN202010570859.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-19
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2040-06-19
AI Technical Summary
The increase in the number of terminal devices in the Internet of Things system leads to an increase in the amount of data transmission between the cloud and terminal devices, resulting in the problem of network congestion.
The data frames of the terminal device are XORed and compressed on the edge computing device to generate an encoded string to replace the data segments in the data frame, reduce the amount of data transmitted, and thereby alleviate network congestion.
Through data compression and encoding, the amount of data transmitted is reduced, the network bandwidth occupation is reduced, network congestion problem is effectively alleviated, and data decoding capabilities are retained.
Smart Images

Figure CN111865493B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of Internet of Things, and in particular to a data processing method and related equipment. Background Art
[0002] With the introduction of cloud IoT and the development of cloud computing technology, the application of remote control and monitoring of terminal devices based on the cloud is becoming more and more widespread. In this context, more and more terminal devices are added to the IoT system. In the IoT system, with the addition of more terminal devices, the amount of data transmission between the cloud and the terminal devices also increases. However, in practice, the data transmission bandwidth is limited, resulting in network congestion problems in data transmission. Summary of the invention
[0003] The embodiments of the present application provide a data processing method and related devices, which can alleviate the problem of network congestion caused by a large number of access terminal devices in the Internet of Things in the related technology at least to a certain extent.
[0004] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.
[0005] According to one aspect of an embodiment of the present application, a data processing method is provided, which is applied to an edge computing device, and a terminal device communicates with a cloud through the edge computing device. The method includes:
[0006] For a target data frame corresponding to the terminal device, performing an XOR operation on a data segment in the target data frame and a data segment in a second data frame to obtain an XOR result corresponding to the target data frame, wherein the second data frame is a previous data frame corresponding to the target data frame;
[0007] According to the valid character segment in the XOR result corresponding to the target data frame, the data segment in the target data frame is compressed and encoded to obtain an encoded string, wherein the valid character segment is a character segment formed from the first non-zero character to the last non-zero character in the XOR result;
[0008] The data segment in the target data frame is replaced by the encoded character string, and the replaced target data frame is used as the data frame to be transmitted to the cloud.
[0009] According to one aspect of an embodiment of the present application, a data processing device is provided, which is applied to an edge computing device, and a terminal device communicates with a cloud through the edge computing device, and the device includes:
[0010] An XOR module is used to perform an XOR operation on a data segment in a target data frame corresponding to a terminal device and a data segment in a second data frame to obtain an XOR result corresponding to the target data frame, wherein the second data frame is a previous data frame corresponding to the target data frame;
[0011] A compression encoding module, used for compressing and encoding the data segment in the target data frame according to the valid character segment in the XOR result corresponding to the target data frame to obtain an encoded string, wherein the valid character segment is a character segment formed from the first non-zero character to the last non-zero character in the XOR result;
[0012] A replacement module is used to replace the data segment in the target data frame with the encoded character string, and use the replaced target data frame as the data frame to be transmitted to the cloud.
[0013] According to one aspect of an embodiment of the present application, an electronic device is provided, including: a processor; and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the method described above is implemented.
[0014] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor, the method described above is implemented.
[0015] In the technical solutions provided in some embodiments of the present application, the data segments in the target data frame are first XORed with the data segments in the second data frame, and then the data segments in the target data frame are compressed and encoded according to the valid character segments in the XOR result to obtain the encoded character string, and then the data segments in the target data frame are replaced with the encoded character string. Since the data segments in the target data frame are compressed and encoded, it is inevitable that the amount of data corresponding to the encoded character string obtained by the compression encoding is smaller than the amount of data corresponding to the data segments in the target data frame, thereby achieving compression of the data segments. Correspondingly, the network bandwidth occupied by the target data frame after the replacement is transmitted is reduced, thereby effectively alleviating the problem of network congestion in the prior art.
[0016] Moreover, since the data segment is compressed and encoded according to the valid character segment in the XOR result corresponding to the target data frame, the encoded string can reflect the information related to the corresponding valid character segment. The valid character segment in the XOR result corresponding to the target data frame represents the difference between the data segment in the target data frame and the data segment in the second data frame. Therefore, under the premise that the data segment in the second data frame is known, the cloud receiving the replaced target data frame can reversely decode and determine the data segment in the target data frame according to the data segment in the second data frame and the valid character segment in the XOR result corresponding to the target data frame.
[0017] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0019] In the attached picture:
[0020] Figure 1 is a schematic diagram of an implementation environment according to an exemplary embodiment;
[0021] Figure 2 is a flow chart of a data processing method according to an embodiment;
[0022] Figure 3 yes Figure 2 The flowchart of step 230 in one embodiment corresponds to the embodiment;
[0023] Figure 4 is a flow chart of a data processing method according to another embodiment;
[0024] Figure 5 is a schematic diagram showing compression encoding of a timestamp and a data segment in a target data frame according to an embodiment;
[0025] Figure 6 is a flowchart of steps before step 210 according to an embodiment;
[0026] Figure 7 is a flow chart showing filtering and converting a target data frame according to a specific embodiment;
[0027] Figure 8 is a flowchart showing steps before step 210 according to another embodiment;
[0028] Fig. 9 is a schematic diagram of a bitmap according to a specific embodiment;
[0029] Fig.10 is a schematic diagram of an implementation environment shown according to a specific implementation;
[0030] Fig.11 It is a schematic diagram of the business deployment in the cloud of the Internet of Things system in the related technology;
[0031] Fig.12 It is a schematic diagram of the business deployment of the LoRa network server and the cloud according to the solution of this application;
[0032] Fig.13 is a flowchart of steps after step 250 according to an embodiment;
[0033] Fig.14 is a block diagram of a data processing device according to an embodiment;
[0034] Fig.15 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown. DETAILED DESCRIPTION
[0035] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be more comprehensive and complete and fully convey the concept of the example embodiments to those skilled in the art.
[0036] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the application.
[0037] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0038] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0039] With the development of cloud technology and Internet of Things technology, the application of remote control and monitoring of terminal devices through the cloud is becoming more and more widespread. Among them, Cloud IOT aims to connect the information perceived and instructions received by terminal devices in traditional Internet of Things to the Internet, truly realize networking, and realize massive data storage and computing through cloud computing technology.
[0040] In the cloud IoT system, the cloud processes the data reported by the terminal devices and uses it to remotely control the terminal devices. As the number of terminal devices increases, the total amount of data transmission between the cloud and the terminal devices increases. Limited by the network transmission bandwidth, network congestion is prone to occur. In order to solve the problem of network congestion caused by the large number of terminal devices and the large amount of data transmission in the cloud IoT system in the prior art, the method of the present application is proposed.
[0041] Figure 1 FIG. 1 is a schematic diagram of an implementation environment according to an exemplary embodiment. Figure 1 As shown, the implementation environment includes multiple terminal devices 110, several edge computing devices 130 and a cloud 150. The terminal device 110 communicates with the cloud 150 through the edge computing device 130.
[0042] The terminal device 110 can be various sensors, smart home devices (such as smart light bulbs, smart curtain motors), etc., or processing equipment in industrial applications, etc., and is not specifically limited here.
[0043] The edge computing device 130 is a computer device with certain computing and processing capabilities, which can be a server, etc., and is not specifically limited here. It can be understood that the edge computing device 130 is deployed at the edge node where the terminal device is located. Before uploading the data of the terminal device to the cloud, the edge computing device 130 pre-processes the data reported by the terminal device to reduce the total amount of data transmitted to the cloud. Among them, the pre-processing performed by the edge computing device can be deduplication, filtering, conversion, compression encoding and other processing as described below.
[0044] The cloud 150 can also be called a cloud computing resource pool platform, which is a basic capability provider for cloud computing. Various types of virtual resources are deployed for external selection and use. The cloud computing resource pool mainly includes: computing devices (virtualized machines, including operating systems), storage devices, and network devices. In the solution disclosed in the present invention, each terminal device 110 is remotely controlled based on the cloud computing capabilities of the cloud 150.
[0045] The implementation details of the technical solution of the embodiment of the present application are described in detail below:
[0046] Figure 2is a flow chart of a data processing method according to an embodiment. Figure 1 The edge computing device shown is used to execute the operation, and the terminal device communicates with the cloud through the edge computing device. Figure 2 As shown, the data processing method at least includes steps 210 to 250, which are described in detail as follows:
[0047] Step 210, for the target data frame corresponding to the terminal device, perform an XOR operation on the data segment in the target data frame and the data segment in the second data frame to obtain an XOR result corresponding to the target data frame, and the second data frame is the previous data frame corresponding to the target data frame.
[0048] As described above, in the cloud IoT system, in order to facilitate the cloud to remotely control and monitor the terminal devices, each terminal device reports its own status data to the cloud in real time. For example, if the terminal device is a temperature sensor, the reported status data may be temperature.
[0049] For the terminal device, the terminal device reports its own status information in frames according to the communication protocol between the terminal device and the cloud, that is, encapsulates its own status data into data frames for transmission. The data segment in the data frame is the string obtained by encoding the status data of the terminal device.
[0050] It is worth mentioning that the encoding method corresponding to the data segment in the data frame is different from the compression encoding described below. In a specific embodiment, the data segment in the data frame is encoded according to the IEEE754 standard.
[0051] The target data frame does not refer to a specific data frame, but generally refers to a data frame to be processed reported by the terminal device. Similarly, the second data frame does not refer to a specific data frame, but generally refers to the previous data frame reported by the terminal device corresponding to the target data frame.
[0052] Under the IEEE754 standard, the format of the string obtained by encoding floating-point data is: sign bit + exponent bit + valid digit bit
[0053] The sign bit s (Sign) is used to indicate whether the floating point number is positive or negative. If it is positive, the sign bit s = 0, if it is negative, s = 1. The exponent bit E (Exponent) is a power of 2, and its function is to weight the floating point number. The significant digit M is a binary decimal, and its value range is a binary decimal, and its value range is 1-2 -ε , or 0-1 -ε .
[0054] In the Internet of Things scenario, each terminal device reports its own status data in real time, and for the same terminal device, the status data of the terminal device at two adjacent time points does not change much, and the floating-point number indicating the status data will not change significantly. Since the floating-point number is machine-coded according to the IEEE754 standard, the sign bit and the exponent bit are in the high position, so the high position in the encoding corresponding to the status data of the terminal device at two adjacent time points is the same. Then, two adjacent data frames (i.e., the target data frame and the second data frame in the present application scheme) for the same terminal device are subjected to XOR operation, and there will inevitably be many high-order zeros in the obtained XOR result. Based on this, the data segments in the target data frame are coded and compressed according to the obtained XOR result.
[0055] In the XOR operation, if the two corresponding bits of the two values involved in the operation are the same, the XOR value is 0, otherwise, if the two corresponding bits are different, the XOR value is 1. That is: 0^0=0, 1^0=1, 0^1=1, 1^1=0. In the XOR operation, if C=A^B (^ is the XOR operation), then A=C^B.
[0056] As described above, in the XOR operation of two data segments, if the corresponding bits are the same, the XOR value is 0, otherwise, if the corresponding bits are different, the XOR value is 1. Then, correspondingly, by performing an XOR operation on the two data segments, a string consisting of 0 and 1 can be obtained.
[0057] It is worth mentioning that the XOR operation is based on binary numbers. If the two objects to be XORed are not binary numbers, such as hexadecimal numbers, then when performing the XOR operation, the two hexadecimal numbers need to be converted into binary numbers first, and then XORed bit by bit to obtain the XOR value corresponding to each bit. Therefore, the string composed of the XOR values corresponding to each bit is used as the XOR result.
[0058] For example, if a=10100001, b=00000110, then a^b=10100111.
[0059] In a specific embodiment, since the XOR result directly obtained is a binary code, for the convenience of processing, the binary code can be further converted into numbers in other number systems, such as hexadecimal code, and then subsequent processing is performed based on the converted XOR result.
[0060] Step 230, compress and encode the data segment in the target data frame according to the valid character segment in the XOR result corresponding to the target data frame to obtain an encoded string. The valid character segment is the character segment formed from the first non-zero character to the last non-zero character in the XOR result.
[0061] As described above, in the XOR result obtained by performing XOR operation on the target data frame and the second data frame, there are many high-order zeros. Therefore, in order to compress the data segment in the target data frame, a valid character segment is further extracted from the XOR result. The valid character segment is the character segment formed from the first non-zero character to the last non-zero character in the XOR result.
[0062] For example, if the XOR result of performing an XOR operation on a data segment in a target data frame and a data segment in a second data frame is: 0x0006C00000000000, where 0x indicates that the XOR result is expressed in hexadecimal. Then, in the XOR result, the first non-zero character bit is the fourth bit, the corresponding character is 6, and the last non-zero character is the fifth bit, the corresponding character is C. Therefore, the valid character segment in the XOR result is 6C.
[0063] It is understandable that, since the data segment in the target data frame is compressed and encoded, the amount of data corresponding to the encoded string obtained by the compression encoding is inevitably smaller than the amount of data corresponding to the data segment in the target data frame, thereby achieving compression of the data segment.
[0064] Moreover, since the data segment is compressed and encoded according to the valid character segment in the XOR result corresponding to the target data frame, the encoded character string can reflect the information related to the corresponding valid character segment. Furthermore, the valid character segment in the XOR result corresponding to the target data frame represents the difference between the data segment in the target data frame and the data segment in the second data frame. Therefore, under the premise that the data segment in the second data frame is known, the data segment in the target data frame can be reversely determined according to the data segment in the second data frame and the valid character segment in the XOR result corresponding to the target data frame. Therefore, by compressing the data segment in the target data frame according to the valid character segment in the XOR result corresponding to the target data frame in this scheme, on the one hand, the compression of the data segment is achieved, and on the other hand, it does not affect the decoding to determine the data segment in the target data frame.
[0065] Step 250: Replace the data segment in the target data frame with the encoded character string, and use the replaced target data frame as the data frame to be transmitted to the cloud.
[0066] It is worth mentioning that since the data is transmitted according to the binary stream, both the data segment in the target data frame and the encoded string obtained by compression encoding are binary strings. Therefore, the encoded string can directly replace the data segment in the target data frame without further conversion.
[0067] As described above, since the data volume of the encoded string is smaller than the data volume of the data segment in the target data frame, after replacing the data segment in the target data frame with the encoded string, the overall data volume in the target data frame is reduced, and correspondingly, the bandwidth occupied by transmitting the target data frame is reduced, thereby effectively alleviating the problem of network congestion caused by the large amount of transmitted data in the prior art.
[0068] In the solution of the present application, if the target data frame is the first data frame reported by the terminal device within the set period, the target data frame is cached and directly used as the data frame to be transmitted to the cloud. In other words, if the target data frame is the first data frame, since it does not have a corresponding previous data frame, the data segment in the target data frame is not compressed and encoded, but the target data frame is directly cached and directly used as the data frame to be transmitted to the cloud.
[0069] In one embodiment of the present application, Figure 3 As shown, step 230 includes:
[0070] Step 310: If the value of the XOR result corresponding to the target data frame is not zero, obtain the XOR result corresponding to the second data frame.
[0071] It can be understood that the XOR result corresponding to the second data frame is the XOR result obtained by performing an XOR operation on the data segment in the second data frame and the data segment in the previous data frame corresponding to the second data frame. Similarly, the previous data frame corresponding to the second data frame still corresponds to the terminal device corresponding to the second data frame. That is, the second data frame and the previous data frame corresponding to the second data frame are two data frames reported continuously by the same terminal device.
[0072] If the value of the XOR result corresponding to the target data frame is not zero, it indicates that there are bits where the characters in the data segment in the target data frame and the data segment in the second data frame are different.
[0073] On the contrary, if the value of the XOR result corresponding to the target data frame is zero, it indicates that the characters in the XOR result of the target data frame are all zero, that is, each bit in the XOR result of the data segment in the target data frame and the data segment in the second data frame is 0, which further indicates that the data segment in the target data frame is the same as the data segment in the second data frame. Therefore, as long as the data segment of the second data frame is determined, the data segment in the target data frame can be determined.
[0074] In one embodiment of the present application, if the value of the valid character segment in the XOR result corresponding to the target data frame is zero, the coded string is determined to be a set number of zero characters, wherein the set number of bits is less than the number of bits of the data segment in the target data frame. Since the set number of zero characters is used as the coded string, and the set number of bits is less than the number of bits of the data segment in the target data frame, the amount of data corresponding to the coded string is obviously less than the amount of data corresponding to the data segment in the target data frame.
[0075] In a specific embodiment, if the value of the valid character segment in the XOR result corresponding to the target data frame is zero, the encoded string is determined to be a bit of 0, so that only one bit is required to store the encoded string.
[0076] Step 320: Determine the control bit character according to the XOR result corresponding to the second data frame and the XOR result corresponding to the target data frame.
[0077] In step 320, the control bit character is determined according to whether the value of the XOR result corresponding to the second data frame is the same as the value of the XOR result corresponding to the target data frame. In other words, the control bit character when the value of the XOR result corresponding to the second data frame is the same as the value of the XOR result corresponding to the target data frame is different from the control bit character when the value of the XOR result corresponding to the second data frame is different from the value of the XOR result corresponding to the target data frame.
[0078] In one embodiment of the present application, if the value of the XOR result corresponding to the target data frame is not greater than the value of the XOR result corresponding to the second data frame, the control bit character is determined as a first string; if the value of the XOR result corresponding to the target data frame is greater than the value of the XOR result corresponding to the second data frame, the control bit character is determined as a second string, and the second string is different from the first string.
[0079] In a specific embodiment, the control bit character is set to two bits, wherein if the value of the XOR result corresponding to the target data frame is not zero, the first bit in the control bit character is determined to be 1; further, if the value of the XOR result corresponding to the target data frame is not greater than the value of the XOR result corresponding to the second data frame, the second bit in the control bit character is determined to be 0; if the value of the XOR result corresponding to the target data frame is greater than the value of the XOR result corresponding to the second data frame, the second bit in the control bit character is determined to be 1.
[0080] In summary, on the basis that the value of the XOR result corresponding to the target data frame is not zero, if the value of the XOR result corresponding to the target data frame is not greater than the value of the XOR result corresponding to the second data frame, the control bit character is 10, which is equivalent to the first string being 10; conversely, if the value of the XOR result corresponding to the target data frame is greater than the value of the XOR result corresponding to the second data frame, the control bit character is 11, which is equivalent to the first string being 11. Of course, the above is only an illustrative example. In other embodiments, the control bit character can also be pre-set to three bits, and then the control bit character used to characterize that the value of the XOR result corresponding to the target data frame is not greater than the value of the XOR result corresponding to the second data frame, and the control bit character used to characterize that the value of the XOR result corresponding to the target data frame is greater than the value of the XOR result corresponding to the second data frame are set accordingly. Thus, based on this setting, the control bit character is correspondingly determined.
[0081] Step 330, generating a coded character string according to the valid character segment in the XOR result corresponding to the control bit character and the target data frame.
[0082] In step 330, a coding string is generated correspondingly using the control bit character and the valid character segment in the XOR result corresponding to the target data frame as constituent elements.
[0083] In one embodiment of the present application, if the value of the XOR result corresponding to the target data frame is greater than the value of the XOR result corresponding to the second data frame, a third character string and a fourth character string are determined according to the XOR result corresponding to the target data frame, the third character string is used to indicate the number of zero characters before the valid character segment in the XOR result corresponding to the target data frame, and the fourth character string is used to indicate the number of characters included in the valid character segment in the XOR result corresponding to the target data frame. The second character string, the third character string, the fourth character string and the valid character segment in the XOR result corresponding to the target data frame are combined to obtain a coded character string.
[0084] In this embodiment, since the third character string indicates the number of zero characters before the valid character segment in the XOR result corresponding to the target data frame, and the fourth character string indicates the number of characters included in the valid character segment in the XOR result corresponding to the target data frame, the encoded character string obtained by combining the second character string, the third character string, the fourth character string and the valid character segment in the XOR result corresponding to the target data frame can accurately reflect the characters in the XOR value corresponding to the target data frame. In other words, for the cloud that receives the target data frame after replacement, the XOR value corresponding to the target data frame can be decoded and determined according to the encoded character string. On this basis, the cloud determines the data segment in the target data frame with the help of the data segment of the second data frame and the XOR value corresponding to the decoded target data frame.
[0085] In one embodiment of the present application, for the case where the value of the XOR result corresponding to the target data frame is not greater than the value of the XOR result corresponding to the second data frame, the encoded string corresponding to the data segment in the target data frame can also be generated in the above manner, that is: determine the third string and the fourth string based on the XOR result corresponding to the target data frame, and then combine the first string, the third string, the fourth string and the valid character segment in the XOR result corresponding to the target data frame to obtain the encoded string.
[0086] In another embodiment of the present application, in the case where the value of the XOR result corresponding to the target data frame is not greater than the value of the XOR result corresponding to the second data frame, the first character string and the valid character segment in the XOR result corresponding to the target data frame can be combined to obtain a coded character string. In this case, the cloud can determine the XOR result corresponding to the target data frame according to the coded character string based on the encoding and decoding rules set between the cloud and the terminal device, and then determine the data segment in the target data frame in combination with the data segment in the second data frame.
[0087] In one embodiment of the present application, the target data frame also includes a timestamp, such as Figure 4 As shown, the data processing method also includes:
[0088] Step 410 , calculating a time increment between the timestamp in the target data frame and the timestamp corresponding to the second data frame.
[0089] In this embodiment, for the timestamp in the data frame, if the timestamp of the first data frame is recorded, the timestamp of the first data frame is used as the starting timestamp. Then, for the timestamp in the target data frame, it is subtracted from the timestamp in the first data frame to obtain the corresponding time increment (the obtained time increments are all positive numbers).
[0090] Step 420, encode the time increment to obtain an increment character string.
[0091] It is worth mentioning that, since the target data frame is transmitted in accordance with a binary stream during network transmission, the encoding of the time increment referred to here means binary encoding the time increment to obtain a binary increment string, and the increment string is used to indicate the calculated time increment.
[0092] Step 430: Replace the timestamp in the target data frame with the incremental character string.
[0093] Since the timestamp in the target data frame is replaced by the incremental string representing the time increment, the amount of data corresponding to the incremental string is smaller than the amount of data corresponding to the timestamp, which is equivalent to compressing the timestamp, further reducing the amount of data corresponding to the target data frame.
[0094] For the cloud, upon receiving the target data frame with the timestamp replaced, the cloud obtains the timestamp corresponding to the second data frame, and then reversely determines the timestamp corresponding to the target data frame in combination with the time increment indicated by the incremental character string in the target data frame.
[0095] It can be understood that if the target data frame is the first data frame corresponding to the terminal device, since there is no previous data frame before this data frame, correspondingly, there is no reference for compressing the timestamp in the target data frame. Therefore, the timestamp is still stored in the target data frame, and the stored timestamp serves as the basis for calculating the time increment for the next data frame.
[0096] Figure 5 FIG. 1 is a schematic diagram showing compression encoding of a timestamp and a data segment in a target data frame according to an embodiment. Figure 5 As shown, the data frame sequence includes data frame I and data frame II which are reported successively.
[0097] If data frame I is used as the target data frame, the value indicated by the data segment in data frame I is 27.25. Figure 5 As shown, the initial value in the initial storage metadata is 29. If the initial value in the initial storage metadata is used as the value indicated by the data segment in the previous data frame corresponding to the data frame I. Figure 5 As shown in the figure, the binary number obtained by encoding the initial value 29.5 according to the IEEE754 standard is converted into a hexadecimal string, which is string A: 0x403D800000000000; the binary number obtained by encoding 27 according to the IEEE754 standard is converted into a hexadecimal string, which is string B: 0x403B400000000000; the hexadecimal string obtained by performing an XOR operation on string A and string B is string C: 0x0006C00000000000. It is worth mentioning that in strings A, B and C, 0x represents hexadecimal. When performing an XOR operation on string A and string B, string A and string B are first converted into binary numbers and then XORed bit by bit.
[0098] like Figure 5 As shown, since the initial value 29.5 does not exist in the previous data frame, the XOR result corresponding to the initial value 29.5 is equivalent to XORing the initial value with itself, and the XOR value obtained is 0. The XOR result obtained by XORing 27.25 and 29.5 is obviously greater than 0. Therefore, the control bit character is 10.
[0099] exist Figure 5In the embodiment shown, 5 bits are set to store the number of leading zero characters in the valid character segment in the XOR result corresponding to the target data frame; and 6 bits are set to store the number of characters included in the valid character segment in the XOR result corresponding to the target data frame. In character string C: 0x0006C00000000000, the number of leading zero characters in the valid character segment is 3, then the third character string is: 00011; the number of characters included in the valid character segment is 2, then the fourth character string is: 000010; the valid character segment is converted to a binary character string: 1101100. If the combination rule of the encoding character string is set to: control bit character + third character string (number of leading zero characters in the valid character segment) + fourth character string (number of characters included in the valid character segment) + valid character segment, as Figure 5 As shown, the coded string corresponding to the value 27.25 indicated by the data segment in the target data frame is: 11000110000101101100. It can be seen that the bits occupied by the coded string corresponding to the data segment in the target data frame (data frame I) are 2+5+6+7=20 bits, so compared with using 256 bits to store the data segment in the original target data frame, the bits occupied by storing the coded string are reduced by 256-20=236 bits.
[0100] like Figure 5 As shown, if data frame II is the target data frame, the previous data frame corresponding to data frame II is data frame I, the value indicated by the data segment in data frame II is 27.25, and the value indicated by the data segment in data frame I is also 27.25. Therefore, the XOR result obtained by XORing the data segment in data frame I with the data segment in data frame II is 0000000000000000, and the value of the XOR result is 0. Therefore, according to the encoding rule that when the value of the XOR result corresponding to the target data frame is 0, the encoding string corresponding to the data segment in the target data frame is a zero character, and the encoding string corresponding to the data segment in the target data frame is 0. It can be seen that the bit occupied by the encoding string corresponding to the data segment in the target data frame (data frame II) is 1 bit, so compared with using 256 bits to store the data segment in the original data frame II, the bits occupied by storing the encoding string are reduced by 256-1=255 bits.
[0101] Through the above-mentioned compression encoding process of the data segments in data frame I and data frame II, it can be seen that by encoding and compressing the data segments in the target data frame through the method of the present application, the data amount of the target data frame is greatly reduced. Correspondingly, the bandwidth occupied by the target data frame after the transmission is replaced is correspondingly reduced, thereby alleviating the network congestion in the Internet of Things.
[0102] Please continue reading Figure 5 , Figure 5In the example, the timestamp in data frame I is 1587436962246, and the timestamp in data frame II is 1587436973246, wherein the timestamp corresponding to the start time in the column storage metadata (i.e., the timestamp in the first data frame) is 1587436960246. If the timestamp stored in the start metadata is used as the timestamp in the previous data frame corresponding to data frame I, the time increment of data frame I compared to the previous data frame is 2, and the time increment of data frame II compared to data frame I is 11. Compared with storing the complete timestamp in the data frame, storing only the time increment occupies fewer bits. Therefore, by replacing the timestamp in the target data frame with the encoded time increment, the timestamp compression is achieved, further reducing the data volume of the target data frame and the bandwidth occupied by transmitting the target data frame.
[0103] In one embodiment of the present application, Figure 6 As shown, before step 210, the method further includes:
[0104] Step 610: Acquire the target data frame reported by the terminal device.
[0105] Step 620: Filter the target data frame according to the filter function configured for the data segment.
[0106] Step 630: convert the data segments in the filtered target data frame according to a preset conversion rule.
[0107] Due to the large number of terminal devices in the Internet of Things, their distribution is hashed, and the different operating environments of each terminal device, it is inevitable that the status data values reported by the terminal devices will experience erroneous jitter. If not processed, erroneous status data will be transmitted to the upper-level business applications.
[0108] In order to filter out the erroneous state data, in the solution of this embodiment, a corresponding filter function is configured for the data segment according to the range of the state data value indicated by the data segment in the target data frame. In other words, the filter function indicates the data range within which the state data value is normal, so that the target data frame with erroneous state data value can be filtered out through the filter function, while the target data frame with state data frame within the data range is retained, thereby achieving the cleaning of the target data frame.
[0109] If the status data indicated by the data segment in the target data frame is within the numerical range, it is determined that the status data indicated by the data segment in the target data frame meets the requirements, and the target data frame is retained; conversely, if the status data indicated by the data segment in the target data frame is not within the numerical range, it is determined that the status data indicated by the data segment in the target data frame does not meet the requirements, and the target data frame is discarded.
[0110] Among them, the set filtering function can be a numerical range set for the data value indicated by the data segment in the target data frame, and the numerical range can be set by a threshold value or a confidence interval. For example, if the state data value indicated by the target data frame is set to be lower than the threshold value, the state data indicated by the target data frame is deemed to be within the numerical range; for example, if the numerical range is set to a 95% confidence interval, if the state data indicated by a target data frame is within the 95% confidence interval, the state data indicated by the target data frame is deemed to be within the numerical range. In other embodiments, the numerical range can also be set according to actual needs, and is not specifically limited here.
[0111] In the scheme of the present application, since it involves compressing and encoding the data segments in the target data frame, in order to facilitate the compression encoding, after filtering the target data frame, the data segments in the target data frame are converted according to the set conversion rules, so that the data segments in the target data frame after the conversion are easier to encode.
[0112] In one embodiment of the present application, the conversion rule may be a rounding rule, for example, rounding the data value indicated by the data segment in the target data frame according to a set approximate rule, for example, converting the value 193.35421 to 193.35, thereby reducing the number of decimal places while ensuring the accuracy of the data value, which facilitates subsequent compression encoding.
[0113] Furthermore, since the compression coding is based on the commonly used binary, quaternary, octal and hexadecimal systems, the conversion rule can also be to convert the decimal part of the status data to an integer multiple close to 1 / 2, 1 / 4, 1 / 8 or 1 / 16, for example, converting 14.06 to 14.0625, and correspondingly, the code changes from 0x402C1EB851EB851F to 0x402C2, so that the amount of encoded data can be shortened in the subsequent compression coding process.
[0114] In some embodiments of the present application, the conversion rule may also be a set shift rule or mapping rule. The shift rule is used to convert a floating point number into an integer for compression. In application scenarios with low sensitivity to state data, the state data may be mapped to a qualitative interval through a mapping rule.
[0115] Figure 7 The flowchart of filtering and converting the target data frame according to a specific embodiment is shown. The terminal device encodes the device status data according to the IEEE754 standard, and after obtaining the corresponding target data frame, the target data frame is reported to the edge computing device. Figure 7As shown, after receiving the target data frame, the edge computing device first filters it according to the configured filter function, which limits the numerical range of the state data. If the state data indicated by the data segment in the target data frame is not within the numerical range, the target data frame is discarded. On the contrary, if the state data indicated by the data segment in the target data frame is within the numerical range, the state data indicated by the data segment is rounded; then the target data frame is converted according to the set shift rule or mapping rule to obtain the converted target data frame. The converted target data frame is used as the object for compression encoding.
[0116] In one embodiment of the present application, the terminal device reports the target data frame to the edge computing device through the gateway device, and the edge computing device includes a bitmap configured for each terminal device, such as Figure 8 As shown, before step 210, the method further includes:
[0117] Step 810, receiving a message reported by the gateway device for the terminal device, the message including a target data frame and a count value of an uplink frame counter corresponding to the terminal device, wherein the terminal device controls the uplink frame counter to accumulate the count when it needs to broadcast the target data frame to the gateway device, and generates a message based on the count value of the uplink frame counter and the target data frame.
[0118] For the communication between the terminal device and the gateway device, when the terminal device needs to transmit the target data frame, the terminal device broadcasts the target data frame to be transmitted. Correspondingly, if there are multiple gateway devices near the terminal device, there may be multiple gateway devices that receive the target data frame broadcast by the terminal device. Therefore, in order to avoid the edge computing device from repeatedly transmitting the same target data frame, the target data frame is deduplicated by configuring a bitmap for each terminal device in the edge computing device and combining the count value of the uplink frame counter in the terminal device.
[0119] Specifically, when the terminal device needs to broadcast the target data frame to the gateway device, it controls the corresponding uplink frame counter to accumulate the count, and then generates a message according to the count value of the uplink frame counter and the target data frame to be broadcast, and broadcasts the message accordingly. After receiving the message broadcast by the terminal device, the gateway device uploads the received message to the edge computing device accordingly.
[0120] Step 820, performing a modulo operation on the count value and the length of the bitmap corresponding to the terminal device to obtain a modulo result.
[0121] A bitmap is also called a BitMap data structure, which uses each bit to store a number, and multiple bits form a basic data type. Specifically in the solution of the present application, in the bitmap corresponding to the terminal device, each bit is used to mark whether the data frame corresponding to the terminal device has arrived. In the Internet of Things system, the terminal device reports its own status data value in real time. In the bitmap, each bit corresponds to a status data reported by the terminal device. Since the status data is encapsulated in the data frame, it is also equivalent to a data frame reported by each corresponding terminal device.
[0122] By taking the modulus of the count value and the length of the bitmap corresponding to the terminal device, the modulus result is used to indicate the bit position indicated by the count value in the bitmap. Therefore, the bit position corresponding to the count value in the bitmap can be determined according to the modulus result.
[0123] Step 830, obtaining the character stored in the bit position indicated by the modulus result in the bitmap.
[0124] Step 840: If the character stored in the position indicated by the modulo result is the first character, the target data frame is discarded, and the first character is used to indicate that the data frame has been received.
[0125] If the character stored in the position indicated by the obtained remainder result is the first character indicating that the data frame has been received, it means that before the current gateway device transmits the target data frame to the edge computing device, another gateway device has transmitted the target data frame to the edge computing device. Since another gateway device has transmitted the target data frame to the edge computing device, the target data frame is discarded to avoid repeated transmission of the target data frame to the cloud.
[0126] Furthermore, if the character stored in the position indicated by the obtained remainder result is the first character, it indicates that the path for transmitting the data frame of the terminal device through the current gateway device is not the optimal transmission path, and the path for transmitting the target data frame of the terminal device to the edge computing device for the first time is the optimal path. Therefore, if a target data frame of the terminal arrives at the edge computing device for the first time, the gateway information corresponding to the terminal device is cached accordingly, so that when it is necessary to send a message to the terminal device, the message can be sent directly according to the buffered gateway information. Since the cached gateway information indicates the optimal path to the terminal device, the time for sending the message can be shortened and the efficiency of sending the message can be improved.
[0127] In one embodiment of the present application, if the character stored in the bit position indicated by the modulus result is the second character, the message is cached and the character stored in the bit position indicated by the modulus result in the bitmap is replaced with the first character, and the second character is used to indicate that the data frame has not been received.
[0128] If the character stored in the bit position indicated by the remainder result is the second character indicating that the data frame has not been received, it means that the target data frame arrives at the edge computing device for the first time. Therefore, the target data frame is cached accordingly to facilitate subsequent filtering, conversion, compression encoding and other processing of the target data frame, and then the processed target data frame is transmitted to the cloud.
[0129] As described above, when the target data frame arrives at the edge computing device for the first time, it indicates that the transmission path of the target data frame is the optimal transmission path from the terminal device to the edge computing device. Therefore, while caching the target data frame, the gateway information corresponding to the terminal device is also stored.
[0130] Fig. 9 is a schematic diagram of a bitmap according to a specific embodiment, such as Fig. 9 As shown in FIG. 1 , when the count value of the terminal device, that is, the FCnt value, is 4, the bit position corresponding to the count value in the bitmap is the 4th bit. Fig. 9 In the embodiment, if the character stored in the bit position is 1, it indicates that the data frame has been received, and if the character stored in the bit position is 0, it indicates that the data frame has not been received. In other words, it is equivalent to the first character being 1 and the second character being 0.
[0131] like Fig. 9 As shown, if at time T0, LoRa gateway 1 transmits the data frame corresponding to the terminal device count value of 4 to the edge computing device for the first time, the edge computing device will modify the character stored in the 4th bit to 1, and store the data frame and the gateway information of the terminal device. At time T1 (T1>T0), LoRa gateway 2 transmits the data frame corresponding to the terminal device count value of 4 to the edge computing device again. Since the character at the bit position corresponding to the count value of 4 is 1, the data frame is discarded accordingly.
[0132] Fig.10 is a schematic diagram of an implementation environment according to a specific implementation, such as Fig.10 As shown, the implementation environment includes sensors, LoRa gateways, LoRa network servers, satellite terminals, satellites, ground stations and cloud data centers that are communicatively connected in sequence, wherein the sensors serve as terminal devices, the LoRa gateways serve as gateway devices for networking, the LoRa servers are edge computing devices deployed at the edge, the satellite terminals, satellites and ground stations constitute a satellite system, and the target data frames processed by the edge computing devices are transmitted to the cloud data center as the cloud through the satellite system.
[0133] exist Fig.10 In the illustrated embodiment, the LoRa-based LPWAN communication technology can provide low-cost, low-power networking, so that networking is performed through a LoRa gateway at the end of the Internet of Things system.
[0134] Among them, the transmission distance based on LoRa is 1-20 kilometers, one AA battery can be used for about 10 years, the transmission speed is 1-50kpbs, and a communication gateway that complies with the LoRaWAN standard can access tens of thousands of wireless terminal devices within 5 to 10 kilometers. The terminal device and the LoRa gateway are star-shaped topology networks. Each terminal device broadcasts data frames to multiple LoRa gateways. The closer the distance between the terminal device and the LoRa gateway, the faster the data transmission rate and the lower the transmission power.
[0135] like Fig.10 As shown, the LoRa gateway forwards the data frame of the terminal device to the LoRa network server. After the LoRa network server deduplicates, filters, converts, and compresses the data frame according to the scheme in this application, it sends the target data frame to the satellite terminal through the serial port. The satellite terminal searches for the passing satellite, establishes a connection with the satellite, and sends the target data frame to the low-orbit satellite. The data frame is transparently transmitted by the low-orbit satellite. During the transparent transmission process, if there is no inter-satellite link, wait for the satellite to pass. When the satellite reaches the coverage range of the ground station, the data is transmitted back to the ground station, and the ground station transmits the data to the cloud through a private network or a wide area network. In this case, there is a delay due to the need to wait for the satellite to pass, so this transmission path is mainly suitable for IoT scenarios that are not sensitive to delays.
[0136] If there is an inter-satellite link between satellites, when the satellite receives the target data frame, it calculates the optimal satellite route based on the ephemeris table and transmits it step by step between satellites, and then transmits the data back to the gateway device on the ground. This transmission method does not cause delays caused by waiting for satellites to pass, so it is suitable for IoT scenarios that are sensitive to delays.
[0137] It is understandable that in Fig.10 In the IoT system shown in the figure, there are also control devices ( Fig.10 The control equipment is used to manage the entire IoT system. The control equipment includes a master control station and gateway stations distributed in various places. The master control station is mainly used to manage space satellites and ground resources (network, communication monitoring, sending satellite commands, controlling satellite operation attitude, etc.). The gateway station is mainly responsible for converting satellite data into wide area network protocols and providing interconnection of communication services.
[0138] In this embodiment, satellites are introduced into the Internet of Things system for data transmission, which extends the access capabilities of conventional Internet of Things, expands the networking scope of the Internet of Things, and can be applied to building the Internet of Things in remote areas without ground signals.
[0139] exist Fig.10In the application scenario shown, the data transmission in the Internet of Things system is realized with the help of a satellite system, which is equivalent to setting up a "base station" in the "sky". It is a supplement and extension of the conventional terrestrial Internet of Things, thereby broadening the coverage area of the Internet of Things and achieving global coverage. The deployment of terminal equipment is almost not restricted by space; it is almost unaffected by weather and geographical conditions and can work around the clock. The Internet of Things system can still work normally in emergency situations such as natural disasters and emergencies.
[0140] Fig.11 This is a schematic diagram of cloud business deployment in the IoT system in related technologies, such as Fig.11 As shown, the LoRa network server is deployed in the cloud. In addition to the LoRa network server, the cloud also deploys a corresponding business application server. Among them, the core services of the LoRa network server deployed in the cloud include: authority verification and authentication, TLS (Transport Layer Security), message management, gateway management, LoRaWAN parsing and frame management. Since the LoRa network server is deployed in the cloud, on the one hand, there may be situations where the same message is transmitted (for example, as listed above, since the terminal device broadcasts the message to the gateway device, there may be multiple gateways receiving the same message). On the other hand, the management of the LoRa gateway by the LoRa network server has a large delay, and it is impossible to achieve edge self-consistency. Moreover, when the number of terminal devices is large, the problem of network congestion cannot be solved.
[0141] Fig.12 It is a schematic diagram of the business deployment of the LoRa network server and the cloud according to the solution of this application, such as Fig.12 As shown, the LoRa network server is used as an edge computing device and is sunk to the edge. Its core service is to encode and compress the data frames reported by the terminal devices, deduplicate, and perform LoRaWAN analysis and gateway management. Compared with the prior art, the terminal devices completely report the data frames to the cloud for processing by the cloud. In this application, edge computing devices are deployed at the edge, and services originally implemented by the cloud, such as LoRaWAN analysis and gateway management, are sunk to the edge computing devices. The data frames reported by the terminal devices are further deduplicated, filtered, converted, and compressed and encoded by the LoRa network server, which reduces the total amount of data to be output as a whole. This can effectively alleviate the problem of network congestion caused by a large number of terminal devices in the related technology, and can effectively solve the contradiction between massive data and transmission restrictions.
[0142] Further, such as Fig.12As shown, in terms of data storage, an embedded database is used in the LoRa network server to replace the Redis cache and cluster database storage solutions used in related technologies. Since the embedded database is embedded in the application process, it supports low-power operation at the edge.
[0143] In one embodiment of the present application, the edge computing device communicates with the cloud via a satellite system. After step 250, Fig.13 As shown, the method also includes:
[0144] Step 1310: Obtain a data frame identifier generated for a target data frame.
[0145] In this embodiment, the edge computing device generates a data frame identifier for each data frame to be transmitted to the cloud. The data frame identifier may be an ID number for identifying the data frame to be transmitted to the cloud.
[0146] Step 1320: Send the replaced target data frame and the corresponding data frame identifier to the cloud via a satellite system.
[0147] Satellite systems include the systems listed above that consist of satellite terminals, satellites and ground stations.
[0148] Step 1330: receiving feedback information returned by the satellite system for the target data frame according to the data frame identifier.
[0149] In the satellite system, after the satellite transmits the replaced target data frame and the corresponding data frame identifier to the ground station, the ground station returns the feedback information of the target data frame indicated by the data frame identifier, and the satellite transmits the feedback information corresponding to the data frame identifier when it communicates with the satellite terminal next time. The feedback information is used to indicate whether the target data frame corresponding to the data frame identifier is sent successfully.
[0150] Step 1340: If the feedback information indicates that the replaced target data frame fails to be sent, the replaced target data frame is resent to the cloud via the satellite system.
[0151] If the feedback information indicates that the replaced target data frame fails to be sent, the edge computing server re-acquires the cached replaced target data frame and re-sends the target data frame through the satellite system to achieve retransmission of the data frame.
[0152] On the contrary, if the feedback information indicates that the replaced target data frame is sent successfully, the edge computing server deletes the cached replaced target data frame and the corresponding data frame identifier.
[0153] In this embodiment, a data frame identifier is configured for the target data frame to be transmitted, and the sending status of the corresponding target data frame is recorded according to the data frame identifier, so that when the target data frame fails to be sent, it is retransmitted accordingly, thereby ensuring the successful transmission of the target data frame corresponding to the terminal device.
[0154] In this embodiment, since data is transmitted with the help of a satellite system, a low-orbit satellite constellation is used as a transmission base station, which can be suitable for building an Internet of Things in remote areas without ground signals. With the continuous advancement of satellite and ground station construction, the continuous improvement of interstellar links, and the more mature communication between multiple satellites, satellites and ground stations form a stable basic network infrastructure, which can ensure that the satellite Internet of Things can work globally and around the clock. In this networking mode, satellites can be abstracted into base stations, and ground stations can be abstracted into network routing nodes. In this Internet of Things system that introduces satellites, the Internet of Things system adopts a satellite-to-ground networking mode to transparently forward Internet of Things data on satellites, extending the access capabilities of conventional Internet of Things.
[0155] The following describes an apparatus embodiment of the present application, which can be used to execute the method in the above-mentioned embodiment of the present application. For details not disclosed in the apparatus embodiment of the present application, please refer to the above-mentioned method embodiment of the present application.
[0156] The present application provides a data processing device 1400, which can be configured to Figure 1 In the edge computing device shown, the terminal device communicates with the cloud through the edge computing device, such as Fig.14 As shown, the data processing device includes:
[0157] XOR module 1410 is used to perform XOR operation on the data segments in the target data frame and the data segments in the second data frame for the target data frame corresponding to the terminal device to obtain the XOR result corresponding to the target data frame, and the second data frame is the previous data frame corresponding to the target data frame.
[0158] The compression coding module 1430 is used to compress and encode the data segment in the target data frame according to the valid character segment in the XOR result corresponding to the target data frame to obtain a coded string. The valid character segment is the character segment formed from the first non-zero character to the last non-zero character in the XOR result.
[0159] The replacement module 1450 is used to replace the data segment in the target data frame with the encoded character string, and use the replaced target data frame as the data frame to be transmitted to the cloud.
[0160] In one embodiment of the present application, the compression coding module 1430 includes:
[0161] The XOR result acquisition unit is used to acquire the XOR result corresponding to the second data frame if the value of the XOR result corresponding to the target data frame is not zero.
[0162] The control bit character determination unit is used to determine the control bit character according to the XOR result corresponding to the second data frame and the XOR result corresponding to the target data frame.
[0163] The encoding character string generating unit is used to generate an encoding character string according to the valid character segment in the XOR result corresponding to the control bit character and the target data frame.
[0164] In one embodiment of the present application, the control bit character determination unit includes:
[0165] The first determining unit is used to determine the control bit character as the first character string if the value of the XOR result corresponding to the target data frame is not greater than the value of the XOR result corresponding to the second data frame.
[0166] The second determining unit is used to determine the control bit character as a second character string if the value of the XOR result corresponding to the target data frame is greater than the value of the XOR result corresponding to the second data frame, and the second character string is different from the first character string.
[0167] In one embodiment of the present application, the encoding string generating unit includes:
[0168] The first generating unit is used to determine a third character string and a fourth character string according to the XOR result corresponding to the target data frame if the value of the XOR result corresponding to the target data frame is greater than the value of the XOR result corresponding to the second data frame, the third character string being used to indicate the number of zero characters before the valid character segment in the XOR result corresponding to the target data frame, and the fourth character string being used to indicate the number of characters included in the valid character segment in the XOR result corresponding to the target data frame; and combining the second character string, the third character string, the fourth character string and the valid character segment in the XOR result corresponding to the target data frame to obtain a coded character string.
[0169] In one embodiment of the present application, the encoding string generating unit further includes:
[0170] The second generating unit is used to combine the first character string and the valid character segment in the XOR result corresponding to the target data frame to obtain a coded character string if the value of the XOR result corresponding to the target data frame is not greater than the value of the XOR result corresponding to the second data frame.
[0171] In one embodiment of the present application, the compression coding module further includes:
[0172] The third generating unit is used to determine that the encoded string is a set number of zero characters if the value of the valid character segment in the XOR result corresponding to the target data frame is zero, wherein the set number of bits is less than the number of bits of the data segment in the target data frame.
[0173] In one embodiment of the present application, the data processing device further includes:
[0174] The cache module is used to cache the target data frame if it is the first data frame reported by the terminal device within a set period, and directly use it as the data frame to be transmitted to the cloud.
[0175] In one embodiment of the present application, the target data frame also includes a timestamp, and the data processing device further includes:
[0176] The time increment calculation module is used to calculate the time increment of the timestamp in the target data frame compared with the timestamp corresponding to the second data frame.
[0177] The encoding module is used to encode the time increment to obtain the increment string.
[0178] Timestamp Replacement module, used to replace timestamps in target dataframe by incremental strings.
[0179] In one embodiment of the present application, the data processing device further includes:
[0180] The target data frame acquisition module is used to acquire the target data frame reported by the terminal device.
[0181] The filtering module is used to filter the target data frame according to the filtering function configured for the data segment.
[0182] The conversion module is used to convert the data segments in the filtered target data frame according to a preset conversion rule.
[0183] In one embodiment of the present application, the terminal device reports the target data frame to the edge computing device through the gateway device, the edge computing device includes a bitmap configured for each terminal device, and the data processing device also includes:
[0184] The message receiving module is used to receive the message reported by the gateway device for the terminal device, the message includes the target data frame and the count value of the uplink frame counter corresponding to the terminal device, wherein the terminal device controls the uplink frame counter to accumulate the count when it needs to broadcast the target data frame to the gateway device, and generates a message according to the count value of the uplink frame counter and the target data frame.
[0185] The remainder calculation module is used to perform a remainder calculation on the count value and the length of the bitmap corresponding to the terminal device to obtain a remainder result.
[0186] The character acquisition module is used to acquire the character stored in the bit position indicated by the modulus result in the bitmap.
[0187] The discarding module is used to discard the target data frame if the character stored in the position indicated by the remainder result is the first character, and the first character is used to indicate that the data frame has been received.
[0188] In one embodiment of the present application, the data processing device further includes:
[0189] The message buffer module is used to buffer the message if the character stored in the bit position indicated by the modulus result is the second character, and replace the character stored in the bit position indicated by the modulus result in the bitmap with the first character, and the second character is used to indicate that the data frame has not been received.
[0190] In one embodiment of the present application, the edge computing device communicates with the cloud via a satellite system, and the data processing device further includes:
[0191] The data frame identifier acquisition module is used to acquire the data frame identifier generated for the target data frame.
[0192] The sending module is used to send the replaced target data frame and the corresponding data frame identifier to the cloud via a satellite system.
[0193] The feedback information receiving module is used to receive feedback information returned by the satellite system for the target data frame according to the data frame identifier.
[0194] The resending module is used to resend the replaced target data frame to the cloud via the satellite system if the feedback information indicates that the replaced target data frame fails to be sent.
[0195] Fig.15 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown.
[0196] It should be noted that Fig.15 The computer system 1500 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0197] like Fig.15As shown, the computer system 1500 includes a central processing unit (CPU) 1501, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1502 or the program loaded from the storage part 1508 to the random access memory (RAM) 1503, such as executing the method in the above embodiment. In RAM 1503, various programs and data required for system operation are also stored. CPU 1501, ROM 1502 and RAM 1503 are connected to each other through bus 1504. Input / output (I / O) interface 1505 is also connected to bus 1504.
[0198] The following components are connected to the I / O interface 1505: an input section 1506 including a keyboard, a mouse, etc.; an output section 1507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1508 including a hard disk, etc.; and a communication section 1509 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 1509 performs communication processing via a network such as the Internet. A drive 1510 is also connected to the I / O interface 1505 as needed. A removable medium 1511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1510 as needed so that a computer program read therefrom is installed into the storage section 1508 as needed.
[0199] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 1509, and / or installed from a removable medium 1511. When the computer program is executed by a central processing unit (CPU) 1501, various functions defined in the system of the present application are executed.
[0200] It should be noted that the computer-readable medium shown in the embodiment of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by an instruction execution system, device or device or used in combination with it. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0201] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0202] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.
[0203] As another aspect, the present application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by an electronic device, the electronic device implements the method in the above embodiment.
[0204] According to one aspect of the present application, a computer program product or a computer program is also provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the above various optional implementations.
[0205] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.
[0206] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation methods of the present application.
[0207] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the embodiments disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application.
[0208] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A data processing method, characterized in that: Applied to an edge computing device, a terminal device communicates with the cloud through the edge computing device, and the method includes: For a target data frame corresponding to the terminal device, performing an XOR operation on a data segment in the target data frame and a data segment in a second data frame to obtain an XOR result corresponding to the target data frame, wherein the second data frame is a previous data frame corresponding to the target data frame; According to the valid character segment in the XOR result corresponding to the target data frame, the data segment in the target data frame is compressed and encoded to obtain an encoded string, wherein the valid character segment is a character segment formed from the first non-zero character to the last non-zero character in the XOR result; The data segment in the target data frame is replaced by the encoded character string, and the replaced target data frame is used as the data frame to be transmitted to the cloud.
2. The method according to claim 1, characterized in that The method of compressing and encoding the data segment in the target data frame according to the valid character segment in the XOR result corresponding to the target data frame to obtain the encoded character string includes: If the value of the XOR result corresponding to the target data frame is not zero, obtaining the XOR result corresponding to the second data frame; Determine a control bit character according to an XOR result corresponding to the second data frame and an XOR result corresponding to the target data frame; The encoded character string is generated according to the valid character segment in the XOR result corresponding to the control bit character and the target data frame.
3. The method according to claim 2, characterized in that The determining of the control bit character according to the XOR result corresponding to the second data frame and the XOR result corresponding to the target data frame comprises: If the value of the XOR result corresponding to the target data frame is not greater than the value of the XOR result corresponding to the second data frame, determining the control bit character as the first character string; If the value of the XOR result corresponding to the target data frame is greater than the value of the XOR result corresponding to the second data frame, the control bit character is determined as a second character string, and the second character string is different from the first character string.
4. The method according to claim 3, characterized in that: The step of generating the encoded character string according to the valid character segment in the XOR result corresponding to the control bit character and the target data frame comprises: If the value of the XOR result corresponding to the target data frame is greater than the value of the XOR result corresponding to the second data frame, determine a third character string and a fourth character string according to the XOR result corresponding to the target data frame, the third character string being used to indicate the number of zero characters before the valid character segment in the XOR result corresponding to the target data frame, and the fourth character string being used to indicate the number of characters included in the valid character segment in the XOR result corresponding to the target data frame; The second character string, the third character string, the fourth character string and the valid character segments in the XOR result corresponding to the target data frame are combined to obtain the encoded character string.
5. The method according to claim 4, characterized in that The step of generating the encoded string according to the valid character segment in the XOR result corresponding to the control bit character and the target data frame further comprises: If the value of the XOR result corresponding to the target data frame is not greater than the value of the XOR result corresponding to the second data frame, the first character string and the valid character segments in the XOR result corresponding to the target data frame are combined to obtain the encoded character string.
6. The method according to claim 2, characterized in that The step of compressing and encoding the data segments in the target data frame according to the valid character segments in the XOR result corresponding to the target data frame to obtain the encoded character string also includes: If the value of the valid character segment in the XOR result corresponding to the target data frame is zero, the encoded string is determined to be a set number of zero characters, wherein the set number of bits is less than the number of bits of the data segment in the target data frame.
7. The method according to claim 1, characterized in that The method further comprises: If the target data frame is the first data frame reported by the terminal device within a set period, the target data frame is cached and directly used as the data frame to be transmitted to the cloud.
8. The method according to claim 1, characterized in that The target data frame also includes a timestamp, and the method further includes: Calculate a time increment between the timestamp in the target data frame and the timestamp corresponding to the second data frame; Encoding the time increment to obtain an increment character string; The timestamp in the target data frame is replaced by the incremental string.
9. The method according to claim 1, characterized in that: Before performing an XOR operation on the data segments in the target data frame and the data segments in the second data frame to obtain an XOR result corresponding to the target data frame, the method further includes: Obtain the target data frame reported by the terminal device; filtering the target data frame according to the filter function configured for the data segment; The data segments in the filtered target data frame are converted according to the preset conversion rules.
10. The method according to claim 1, characterized in that The terminal device reports the target data frame to the edge computing device through the gateway device, the edge computing device includes a bitmap configured for each terminal device, and before performing an XOR operation on the data segment in the target data frame and the data segment in the second data frame to obtain the XOR result corresponding to the target data frame, the method further includes: Receiving a message reported by the gateway device for the terminal device, the message including a target data frame and a count value of an uplink frame counter corresponding to the terminal device, wherein the terminal device controls the uplink frame counter to accumulate counts when it is necessary to broadcast the target data frame to the gateway device, and generates the message according to the count value of the uplink frame counter and the target data frame; Performing a modulo operation on the count value and the length of the bitmap corresponding to the terminal device to obtain a modulo result; Obtain the character stored in the bit position indicated by the remainder result in the bitmap; If the character stored in the bit position indicated by the modulo result is the first character, the target data frame is discarded, and the first character is used to indicate that the data frame has been received.
11. The method according to claim 10, characterized in that After obtaining the character stored in the bit position indicated by the remainder result in the bitmap, the method further includes: If the character stored in the bit position indicated by the remainder result is the second character, the message is cached, and the character stored in the bit position indicated by the remainder result in the bitmap is replaced with the first character, and the second character is used to indicate that the data frame has not been received.
12. The method according to claim 1, characterized in that The edge computing device communicates with the cloud via a satellite system, and after replacing the data segment in the target data frame with the encoded string, the method further includes: Obtaining a data frame identifier generated for the target data frame; Sending the replaced target data frame and the corresponding data frame identifier to the cloud via the satellite system; receiving feedback information returned by the satellite system for the target data frame according to the data frame identifier; If the feedback information indicates that the replaced target data frame fails to be sent, the replaced target data frame is resent to the cloud via the satellite system.
13. A data processing device, characterized in that: Applied to edge computing devices, terminal devices communicate with the cloud through the edge computing devices, and the device includes: An XOR module is used to perform an XOR operation on a data segment in a target data frame corresponding to a terminal device and a data segment in a second data frame to obtain an XOR result corresponding to the target data frame, wherein the second data frame is a previous data frame corresponding to the target data frame; A compression encoding module, used for compressing and encoding the data segment in the target data frame according to the valid character segment in the XOR result corresponding to the target data frame to obtain an encoded string, wherein the valid character segment is a character segment formed from the first non-zero character to the last non-zero character in the XOR result; A replacement module is used to replace the data segment in the target data frame with the encoded character string, and use the replaced target data frame as the data frame to be transmitted to the cloud.
14. An electronic device, characterized in that: include: processor; and A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the method according to any one of claims 1 to 12 is implemented.
15. A computer-readable storage medium, characterized in that: Computer readable instructions are stored thereon, and when the computer readable instructions are executed by a processor, the method according to any one of claims 1 to 12 is implemented.
Citation Information
Patent Citations
Efficient short message compression
US10506388B1
Data compressing apparatus and data decoding apparatus
US20040164883A1
