A remote monitoring method and system for equipment operation data

By combining multiple rounds of incomplete matching and complete matching, candidate encoding objects with longer lengths are selected for encoding, which solves the problem of low compression efficiency of equipment operating data and improves the real-time performance and compression efficiency of equipment monitoring.

CN118399976BActive Publication Date: 2024-10-18SHAANXI LIANZHONG ELECTRIC POWER TECH CO LTD
View PDF 14 Cites 0 Cited by

Patent Information

Application Number
CN202410780637.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-18
Publication Date
2024-10-18
Estimated Expiration
2044-06-18

AI Technical Summary

Technical Problem

The compression efficiency of existing dictionary-based compression algorithms for device operating data is limited by the length of repeated strings, which affects the real-time performance of remote device monitoring.

Method used

Using a combination of multiple rounds of incomplete matching and complete matching to match the character sequence to be compressed, breaking through the limit of repeated string lengths, and selecting candidate encoding objects with longer lengths by splicing multiple rounds of incomplete matching results and complete matching results. Encoding to improve compression efficiency.

Benefits of technology

It improves the compression efficiency of equipment operating data, reduces transmission time, enhances the real-time nature of equipment monitoring, and further improves the compression effect by omitting records with error length m=0.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118399976B_ABST
    Figure CN118399976B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of data encoding and compression, and in particular to a method and system for remote monitoring of equipment operation data. The method comprises: converting equipment operation data into a character sequence to be compressed, using a number of characters behind each encoding object in a dictionary as a unit to perform multiple rounds of incomplete matching with the character sequence to be compressed, obtaining a first candidate encoding object according to the results of the multiple rounds of incomplete matching, determining the object to be encoded according to the first candidate encoding object, encoding the object to be encoded using the length of the unit corresponding to the result of each round of incomplete matching and the sequence number of the encoding object to which the unit belongs in the dictionary, obtaining compressed data composed of the encoding results through continuous iteration, and transmitting the compressed data so that the equipment monitoring platform can perform remote monitoring of the equipment according to the restoration result of the compressed data. The present invention has a high compression rate and improves the real-time performance of remote monitoring of equipment operation data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data coding and compression, and in particular to a method and system for remotely monitoring equipment operation data. Background Art

[0002] By remotely monitoring the operating status of equipment through equipment operation data, equipment problems or failures can be quickly discovered and timely intervention can be carried out, thereby reducing downtime and saving production costs.

[0003] Equipment operation data includes equipment operation parameter data, operation logs, and operation environment data. The amount of data is large. In order to ensure the real-time nature of remote monitoring, the equipment operation data is usually compressed and transmitted. For example, the patent application document with the publication number "CN111314469A" and the name "Power Equipment Remote Monitoring System and Method Based on Big Data Cloud Computing" discloses: a data transmission module that collects various power equipment data information collected by the data acquisition terminal and compresses the collected data; a wireless transmission module that transmits the compressed data through a wireless network.

[0004] At present, dictionary-based compression algorithms such as LZ, LZW, and LZ77 are commonly used to compress data. For example, the patent application document with the publication number "CN115549691A" and the name "A method for compressing and storing data of intelligent IoT electric meter" discloses that: the encoding unit performs LZ encoding on the collected power load data, and stores the LZ-encoded power load data in a temporary database through the communication module.

[0005] The compression efficiency of dictionary-based compression algorithms such as LZ, LZW, and LZ77 depends on the repetitiveness of the string. When the length of the repeated string is longer, the compression efficiency of the dictionary-based compression algorithm is higher. When the length of the repeated string is shorter, the compression efficiency of the dictionary-based compression algorithm is lower. The length of the repeated string in the equipment operation data is uncertain. Due to the limitation of the length of the repeated string, the compression efficiency of the equipment operation data using dictionary-based compression algorithms such as LZ, LZW, and LZ77 is difficult to guarantee, which affects the real-time performance of remote monitoring of the equipment. Summary of the invention

[0006] In order to solve the problem that due to the limitation of the length of repeated character strings, it is difficult to ensure the compression efficiency when compressing device operation data using dictionary-based compression algorithms such as LZ, LZW, LZ77, etc., which affects the real-time performance of remote monitoring of equipment, the present invention provides a method and system for remote monitoring of device operation data.

[0007] In a first aspect, the present invention provides a method for remotely monitoring equipment operation data, which adopts the following technical solution:

[0008] A method for remotely monitoring equipment operation data, comprising the steps of:

[0009] The collected equipment operation data is converted into a character sequence to be compressed; the character sequence to be compressed is compressed according to a dictionary to obtain compressed data, and the compressed data is composed of encoding results; the compression process includes: performing multiple rounds of incomplete matching on the character sequence to be compressed, the incomplete matching is to match the character sequence to be compressed with a number of characters behind each encoding object in the dictionary as a unit, and taking the result with the longest matching length as the result of the incomplete matching; in one round of incomplete matching, the character sequence to be compressed remaining after the previous round of incomplete matching is completed is matched as the target; the results of multiple rounds of incomplete matching are spliced ​​together as the target result, and the target result is spliced ​​together with the next character in the character sequence to be compressed to obtain a first candidate encoding object; the object to be encoded is determined according to the first candidate encoding object; in response to the object to be encoded being the first candidate encoding object, the encoding result is obtained according to the length of the unit corresponding to the result of each round of incomplete matching and the serial number of the encoding object to which the unit belongs in the dictionary; the compressed data is transmitted so that the equipment monitoring platform can remotely monitor the equipment according to the restoration result of the compressed data.

[0010] The present invention uses several characters behind each coding object in the dictionary as a unit, performs multiple rounds of incomplete matching on the character sequence to be compressed, and splices the results of the multiple rounds of incomplete matching together, so that the length of the first candidate coding object obtained can break through the limitation of the length of repeated character strings in the character sequence to be compressed, and the length of the first candidate coding object obtained is as long as possible. The first candidate coding object is encoded, and the amount of data that can be encoded at a single time is improved compared with the traditional LZ encoding, thereby improving the compression efficiency of the character sequence to be compressed, reducing the transmission time of equipment operation data, and improving the real-time performance of equipment monitoring.

[0011] In one embodiment, determining the object to be encoded according to the first candidate encoding object includes: taking the first candidate encoding object as the object to be encoded.

[0012] In one embodiment, the compression process also includes: fully matching the character sequence to be compressed according to a dictionary, wherein the fully matching is to match each encoding object in the dictionary as a unit with the character sequence to be compressed, and taking the result with the longest matching length as the fully matching result, and splicing the fully matching result and the next character in the character sequence to be compressed together to obtain a second candidate encoding object; determining the object to be encoded includes: selecting the object to be encoded according to the lengths of the first candidate encoding object and the second candidate encoding object; in response to the object to be encoded being the second candidate encoding object, taking the sequence number of the encoding object corresponding to the fully matching result in the dictionary and the last character of the object to be encoded as the encoding result.

[0013] The present invention adopts two matching methods to match the character sequence to be compressed, obtains the first candidate coding object and the second candidate coding object, and selects the object to be encoded with better compression effect for compression according to the length of the first candidate coding object and the second candidate coding object, thereby improving the compression efficiency of the character sequence to be compressed, reducing the transmission time of the equipment operation data, and improving the real-time performance of remote monitoring of the equipment.

[0014] In one embodiment, the method of selecting an object to be encoded based on the lengths of a first candidate encoding object and a second candidate encoding object includes: in response to a difference between the length of the first candidate encoding object and the length of the second candidate encoding object being greater than a preset length difference threshold, taking the first candidate encoding object as the object to be encoded; otherwise, taking the second candidate encoding object as the object to be encoded.

[0015] In one embodiment, the method of selecting an object to be encoded based on the lengths of a first candidate encoding object and a second candidate encoding object includes: determining a compression advantage of the first candidate encoding object over the second candidate encoding object based on the lengths of the first candidate encoding object and the second candidate encoding object, and in response to the compression advantage being greater than a preset advantage threshold, using the first candidate encoding object as the object to be encoded, otherwise, using the second candidate encoding object as the object to be encoded.

[0016] In one embodiment, the compression advantage satisfies the expression: ; represents the compression advantage of the first candidate coding object over the second candidate coding object; D represents the length of the first candidate coding object; Indicates the total number of rounds of incomplete matches that result in the existence of results; Q indicates the length of the second candidate encoding object; represents the hyperbolic tangent function.

[0017] The compression advantage in the present invention takes into account the length difference between the first candidate coding object and the second candidate coding object, and the amount of data that needs to be additionally recorded to compress the first candidate coding object. When the length difference is greater and the amount of additionally recorded data is smaller, the compression advantage of the first candidate coding object relative to the second candidate coding object is greater. The object to be coded with better compression effect is selected by combining the length difference and the amount of additionally recorded data, and the result is more accurate.

[0018] In one embodiment, in response to the object to be encoded being the first candidate encoding object, obtaining the encoding result according to the length of the unit corresponding to the result of each round of incomplete matching and the serial number of the encoding object to which the unit belongs in the dictionary, includes: taking the difference between the length of the encoding object to which the unit corresponding to the result of each round of incomplete matching belongs and the length of the unit as the misalignment length of each round, represented by m; taking the serial number of the encoding object to which the unit corresponding to the result of each round of incomplete matching belongs in the dictionary and the negative number of the misalignment length m -m as the codeword of the result of each round of incomplete matching; taking the codewords of the results of all rounds of incomplete matching and the last character of the object to be encoded as the encoding result.

[0019] In one embodiment, the compression advantage satisfies the expression: ; represents the compression advantage of the first candidate coding object over the second candidate coding object; D represents the length of the first candidate coding object; represents the total number of incomplete matching rounds; Q represents the length of the second candidate encoding object; the difference between the length of the encoding object to which the unit corresponding to the incomplete matching result belongs and the length of the unit is taken as the misalignment length, and m represents the misalignment length; represents the hyperbolic tangent function; Indicates the number of incomplete matching rounds corresponding to the misalignment length m=0.

[0020] The compression advantage of the present invention takes into account that when compressing the first candidate encoding object, the amount of data that needs to be recorded additionally is reduced when the misalignment length m=0 is omitted. The length difference and the amount of data that needs to be recorded additionally when the misalignment length m=0 is omitted are considered to select the encoding object with better compression effect, and the result is more accurate.

[0021] In one embodiment, in response to the object to be encoded being the first candidate encoding object, the encoding result is obtained according to the length of the unit corresponding to the result of each round of incomplete matching and the serial number of the encoding object to which the unit belongs in the dictionary, including: using the serial number of the encoding object in the dictionary corresponding to the result of each round of incomplete matching and the negative number -m of the misalignment length m as the codeword of the result of each round of incomplete matching, omitting all 0s in the codeword to implement the updating of the codeword, and taking the updated codeword of all rounds of incomplete matching results and the last character of the object to be encoded as the encoding result.

[0022] When encoding the first candidate encoding object, the present invention omits the misalignment length when the misalignment length m=0, thereby reducing the amount of data that needs to be additionally recorded and further improving the compression efficiency.

[0023] In a second aspect, the present invention provides a remote monitoring system for equipment operation data, which adopts the following technical solution:

[0024] A device operation data remote monitoring system comprises: a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned device operation data remote monitoring method is implemented.

[0025] By adopting the above technical solution, the above-mentioned method for remote monitoring of device operation data is generated into a computer program and stored in a memory so as to be loaded and executed by a processor, thereby making a terminal device based on the memory and the processor for easy use.

[0026] The present invention has the following technical effects: the length of the first candidate coding object in the present invention can break through the limitation of the length of repeated character strings in the character sequence to be compressed, and the amount of data that can be encoded at a single time is improved compared with the traditional LZ encoding, thereby improving the compression efficiency of the character sequence to be compressed, reducing the transmission time of the device operation data, and improving the real-time performance of the device monitoring.

[0027] Furthermore, the present invention adopts two matching methods to match the character sequence to be compressed, and selects the object to be encoded with better compression effect for compression, which can achieve higher compression efficiency and further improve the real-time performance of remote monitoring of equipment.

[0028] Furthermore, when encoding the first candidate encoding object, the present invention omits the offset length m=0, thereby reducing the amount of data that needs to be additionally recorded and further improving the compression efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-restrictive manner, and the same or corresponding reference numerals represent the same or corresponding parts.

[0030] Figure 1 The present invention is a flowchart of a method for remotely monitoring device operation data according to an embodiment of the present invention. DETAILED DESCRIPTION

[0031] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0032] It should be understood that when the terms "first", "second", etc. are used in the claims, descriptions, and drawings of the present invention, they are only used to distinguish different objects, rather than to describe a specific order. The terms "include" and "comprise" used in the description and claims of the present invention indicate the presence of the described features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their collections.

[0033] The embodiment of the present invention discloses a method for remotely monitoring equipment operation data. Figure 1 , comprising steps S1 to S3:

[0034] S1: Collect device operation data and convert the device operation data into a character sequence to be compressed.

[0035] Specifically, the operating parameter data and operation log of the equipment are recorded, and the operating parameter data include the working mode, speed, pressure, temperature, etc. of the equipment. The operating environment data of the equipment is collected through sensors, such as the temperature and humidity of the equipment operating environment.

[0036] The recorded operating parameter data, operating logs and collected operating environment data are collectively regarded as equipment operating data.

[0037] At this point, the collection of equipment operation data has been realized.

[0038] The device operation data is encoded using the UTF-8 encoding algorithm, and the encoding result is encoded again using the Base64 encoding to obtain a sequence containing only characters, which is used as the character sequence to be compressed. It should be noted that the present invention converts the device operation data into a character sequence to be compressed because the device operation data contains different types of data, which is not convenient for unified compression. After being converted into a character sequence to be compressed, it can be uniformly compressed. The present invention only takes the UTF-8 encoding algorithm and the Base64 encoding as examples for explanation, and the implementer can select the encoding algorithm according to the actual implementation situation.

[0039] At this point, the character sequence to be compressed is obtained.

[0040] S2: Compress the character sequence to be compressed to obtain compressed data.

[0041] It should be noted that LZ coding dynamically adds the encoded characters or strings to the dictionary during the compression process, and encodes and compresses the unencoded data through the characters or strings in the dictionary, thereby achieving a higher compression efficiency. However, in the single encoding process of LZ coding, only one character or string in the dictionary can be used to encode the string in the character sequence to be compressed, so that the length of the single encoded string in the character sequence to be compressed is limited, and thus the compression efficiency is also limited. At the same time, when the characters or strings in the dictionary are used to encode the strings in the dictionary sequence to be compressed, the strings in the dictionary sequence to be compressed are required to be exactly the same as the strings in the dictionary, so that the length of the single encoded string in the character sequence to be compressed is limited by the length of the repeated strings in the dictionary sequence to be compressed. For example, when the encoding objects in the encoding object column of the dictionary are AB, BCD, CA, BCAB, and the character sequence to be compressed is {C, A, B, C, D, A, B, A, C, B, C, B}, in the single encoding process, only CA in the dictionary can be used to encode CA and the next character B in the character sequence to be compressed, and the length of the single encoded string is limited. Therefore, the present invention uses a dictionary to perform multiple rounds of incomplete matching on the character sequence to be compressed, so that the length of the character string encoded once by the character sequence to be compressed is as long as possible, thereby improving the compression efficiency of the character sequence to be compressed, accelerating the transmission speed of the device operation data, and ensuring the real-time remote monitoring of the device operation data.

[0042] Specifically, construct an empty dictionary containing a sequence number column, an encoding object column, and an encoding result column.

[0043] In one embodiment, encoding the character sequence to be compressed according to a dictionary includes:

[0044] Perform multiple rounds of incomplete matching on the character sequence to be compressed according to the encoding object in the encoding object column of the dictionary, specifically:

[0045] Starting from the first uncoded character in the character sequence to be compressed, the first round of incomplete matching is performed on the character sequence to be compressed according to any coding object in the coding object column of the dictionary. Specifically, the length of the coding object is recorded as L. When the first m uncoded characters in the character sequence to be compressed are different from the first m characters of the coding object, but the first Lm uncoded characters in the character sequence to be compressed are the same as the last Lm characters of the coding object, the string consisting of the first Lm uncoded characters in the character sequence to be compressed is taken as the first candidate matching result, where m represents the dislocation length, and the value of m must satisfy 0. m L, and Lm k, where k is a preset length used to limit the shortest length of candidate matching results. There is no specific limit and the implementer can set it according to the actual implementation situation, for example, k=2.

[0046] Similarly, starting from the first uncoded character in the character sequence to be compressed, perform the first round of incomplete matching on the character sequence to be compressed according to each coding object in the coding object column of the dictionary, and obtain all the first candidate matching results. When there is no first candidate matching result, there is no result in the first round of incomplete matching; when there is a first candidate matching result, the first candidate matching result with the longest length is taken as the result of the first round of incomplete matching, recorded as If there are multiple first candidate matching results with the longest length, the first candidate matching result with the shortest misalignment length among all the first candidate matching results with the longest length is taken as the result of the first round of incomplete matching, and the result of the first round of incomplete matching is taken as the result of the first round of incomplete matching. The length of ;

[0047] From the character sequence to be compressed unencoded characters, perform a second round of incomplete matching on the character sequence to be compressed according to each encoding object in the encoding object column of the dictionary, and obtain all second candidate matching results. When there is no second candidate matching result, there is no result in the second round of incomplete matching; when there is a second candidate matching result, take the second candidate matching result with the longest length as the result of the second round of incomplete matching, recorded as If there are multiple second candidate matching results with the longest length, the second candidate matching result with the shortest misalignment length among all the second candidate matching results with the longest length is taken as the result of the second round of incomplete matching, and the result of the second round of incomplete matching is taken as the result of the second round of incomplete matching. The length of ;

[0048] From the character sequence to be compressed unencoded characters, perform the third round of incomplete matching on the character sequence to be compressed according to each encoding object in the encoding object column of the dictionary, and obtain all third candidate matching results. When there is no third candidate matching result, there is no result in the third round of incomplete matching; when there is a third candidate matching result, the third candidate matching result with the longest length is taken as the result of the third round of incomplete matching, recorded as If there are multiple third candidate matching results with the longest length, the third candidate matching result with the shortest misalignment length among all the third candidate matching results with the longest length is taken as the result of the third round of incomplete matching, and the result of the third round of incomplete matching is taken as The length of ;

[0049] And so on, the iteration stops when there is no result in a certain round of incomplete matching.

[0050] For example: when the encoding object column of the dictionary contains encoding objects AB, BCD, CA, CAB, ACABCD, and the unencoded characters in the character sequence to be compressed are {C,A,B,C,D,A,B,A,C,B,C,B}, and the preset length k=2, the first round of incomplete matching starts from the first unencoded character in the character sequence to be compressed. The first two unencoded characters CA in the unencoded characters of the character sequence to be compressed {C,A,B,C,D,A,B,A,C,B,C,B} are the same as the encoding object CA in the dictionary, so CA is a first candidate matching result, the dislocation length is 0, and the unencoded characters of the character sequence to be compressed {C,A,B,C,D,A,B,A,C,B,C,B} are the same as the encoding object CA in the dictionary. The first three uncoded characters CAB in {C,A,B,C,D,A,B,A,C,B,C,B} are the same as the coded object CAB in the dictionary, so CAB is a first candidate matching result with a displacement length of 0; the first five uncoded characters CABCD in the uncoded characters of the character sequence to be compressed {C,A,B,C,D,A,B,A,C,B,C,B} are the same as the last five characters of the coded object ACABCD in the dictionary, so CABCD is a first candidate matching result with a displacement length of 1; CABCD has the longest length among all the first candidate matching results, so CABCD is taken as the result of the first round of incomplete matching;

[0051] The length of the result of the first round of incomplete matching is 5. The second round of incomplete matching starts from the 5+1=6th unencoded character in the character sequence to be compressed. The 6th unencoded character and the 7th unencoded character AB in the unencoded characters {C,A,B,C,D,A,B,A,C,B,C,B} of the character sequence to be compressed are the same as the encoding object AB in the dictionary, so AB is a second candidate matching result with a misalignment length of 0; the 6th unencoded character and the 7th unencoded character AB in the unencoded characters {C,A,B,C,D,A,B,A,C,B,C,B} of the character sequence to be compressed are the same as the last 2 characters of the encoding object CAB in the dictionary, so AB is a second candidate matching result with a misalignment length of 1; AB is simultaneously two second candidate matching results, and the corresponding encoding objects are AB and CAB in the dictionary, and the corresponding misalignment lengths are 0 and 1, respectively. Therefore, AB with a misalignment length of 0 is taken as the result of the second round of incomplete matching, and the corresponding encoding object is AB in the dictionary;

[0052] The length of the result of the first round of incomplete matching is 5, the length of the result of the second round of incomplete matching is 2, and the third round of incomplete matching starts from the 5+2+1=8th unencoded character in the character sequence to be compressed. At this time, there is no result of the third round of incomplete matching.

[0053] When there is a result in the first round of incomplete matching, the results of all rounds of incomplete matching are spliced ​​together in order as the target result, and the target result is spliced ​​together with the next character in the character sequence to be compressed as the object to be encoded. For example: when the result of the first round of incomplete matching is CABCD, the result of the second round of incomplete matching is AB, and there is no result in the third round of incomplete matching, and the unencoded characters in the character sequence to be compressed are {C,A,B,C,D,A,B,A,C,B,C,B}, the result of the first round of incomplete matching CABCD is spliced ​​together with the result of the second round of incomplete matching AB as the target result CABCDAB, and the target result CABCDAB is spliced ​​together with the next character A in the character sequence to be compressed to obtain the object to be encoded CABCDABA.

[0054] When there is no result in the first round of incomplete matching, the first unencoded character in the character sequence to be compressed is used as the object to be encoded.

[0055] When the object to be encoded is the first unencoded character in the character sequence to be compressed, 0 and the object to be encoded are used as the encoding result. Otherwise, the serial number of the encoding object corresponding to the result of each round of incomplete matching in the dictionary and the negative number -m of the offset length m are used as the codeword of the result of each round of incomplete matching, and the codewords of the results of all rounds of incomplete matching and the last character of the object to be encoded are used as the encoding result.

[0056] For example: when the object to be encoded is the first unencoded character C in the character sequence to be compressed, (0, C) is used as the encoding result; when the encoding objects in the encoding object column of the dictionary are C, A, AB, BCD, CA, CAB, ACABCD in order, and the unencoded characters in the character sequence to be compressed are {C, A, B, C, D, A, B, A, C, B, C, B}, and the object to be encoded is CABCDABA, CABCD and AB in the object to be encoded are the results of incomplete matching in the first round and the second round respectively, and A is the result of CABCDAB in the character sequence to be compressed. For the next character, the encoding object corresponding to the result CABCD of the first round of incomplete matching in the dictionary is ACABCD, the offset length is 1, and the serial number corresponding to the encoding object ACABCD in the dictionary is 7. Then the codeword of the result CABCD of the first round of incomplete matching is (7, -1); the encoding object corresponding to the result AB of the second round of incomplete matching in the dictionary is AB, the offset length is 0, and the serial number corresponding to the encoding object AB in the dictionary is 3. Then the codeword of the result AB of the second round of incomplete matching is (3, 0); then the encoding result of the object to be encoded CABCDABA is (7, -1, 3, 0, A).

[0057] Add a new row at the end of the dictionary, fill the object to be encoded as the encoding object into the encoding object column of the dictionary row, fill the encoding result into the encoding result column of the dictionary row, and fill the row number of the row as the sequence number into the sequence number column of the row to update the dictionary. Use the updated dictionary to continue encoding the unencoded characters in the character sequence to be compressed until all characters in the character sequence to be compressed have been encoded, and stop the iteration. All the objects to be encoded are spliced ​​together in order as compressed data.

[0058] In another embodiment, encoding the character sequence to be compressed according to a dictionary includes:

[0059] Perform multiple rounds of incomplete matching on the character sequence to be compressed according to the encoding objects in the encoding object column of the dictionary. When there is a result in the first round of incomplete matching, concatenate the results of all rounds of incomplete matching together in order as the target result, and concatenate the target result with the next character in the character sequence to be compressed as the first candidate encoding object; when there is no result in the first round of incomplete matching, take the first unencoded character in the character sequence to be compressed as the object to be encoded.

[0060] The character sequence to be compressed is fully matched according to the encoding object in the encoding object column of the dictionary, specifically:

[0061] Starting from the first unencoded character in the character sequence to be compressed, the character sequence to be compressed is fully matched according to any encoding object in the encoding object column of the dictionary. Specifically, the length of the encoding object is recorded as L. When the character string composed of the first L unencoded characters in the character sequence to be compressed is the same as the encoding object, the character string composed of the first L unencoded characters in the character sequence to be compressed is taken as a candidate full match result.

[0062] Similarly, starting from the first unencoded character in the character sequence to be compressed, each encoding object in the encoding object column of the dictionary is used to fully match the character sequence to be compressed, and all candidate complete match results are obtained. When there is no candidate complete match result, there is no complete match result; when there is a candidate complete match result, the candidate complete match result with the longest length is taken as the complete match result.

[0063] For example: when the encoding object column of the dictionary contains encoding objects AB, BCD, CA, CAB, ACABCD, and the unencoded characters in the character sequence to be compressed are {C,A,B,C,D,A,B,A,C,B,C,B}, the encoding object CA in the dictionary is the same as the first two unencoded characters in the character sequence to be compressed, and the encoding object CAB in the dictionary is the same as the first three unencoded characters in the character sequence to be compressed. Therefore, the character string CA composed of the first two unencoded characters in the character sequence to be compressed and the character string CAB composed of the first three unencoded characters in the character sequence to be compressed are respectively a candidate complete match result, among which CAB is longer, so the complete match result is CAB.

[0064] At this point, a complete match of the character sequence to be compressed is achieved.

[0065] When a complete match exists, the complete match result and the next character in the character sequence to be compressed are concatenated together as the second candidate encoding object. For example, when the complete match result is CAB, and the unencoded characters in the character sequence to be compressed are {C,A,B,C,D,A,B,A,C,B,C,B}, and the next character of CAB in the character sequence to be compressed is C, CAB and C are concatenated together as the second candidate encoding object CABC.

[0066] When there is no complete match result, the first unencoded character in the character sequence to be compressed is used as the object to be encoded.

[0067] An object to be encoded is selected according to the lengths of the first candidate encoding object and the second candidate encoding object.

[0068] When the object to be encoded is the first unencoded character in the character sequence to be compressed, 0 and the object to be encoded are taken as the encoding result.

[0069] When the object to be encoded is the second candidate encoding object, the sequence number of the encoding object corresponding to the complete match result in the dictionary and the last character of the object to be encoded are used as the encoding result. For example: when the object to be encoded is the second candidate encoding object CABC, and all encoding objects in the encoding object column of the dictionary are AB, BCD, CA, CAB, ACABCD in order, the complete match result in the object to be encoded CABC is CAB, and the sequence number of the encoding object CAB corresponding to it in the dictionary is 4, then the encoding result of the object to be encoded CABC is (4, C).

[0070] When the object to be encoded is the first candidate encoding object, an optional encoding method is:

[0071] The serial number of the encoding object corresponding to the result of each round of incomplete matching in the dictionary and the negative number -m of the misalignment length m are used as the codeword of the result of each round of incomplete matching, and the codewords of the results of all rounds of incomplete matching and the last character of the object to be encoded are used as the encoding result. This encoding method is recorded as the first encoding method.

[0072] When the object to be encoded is the first candidate encoding object, a preferred encoding method is:

[0073] The serial number of the coding object corresponding to the result of each round of incomplete matching in the dictionary and the negative number -m of the misalignment length m are used as the codeword of the result of each round of incomplete matching. All 0s in the codeword are omitted to update the codeword. The updated codewords of all rounds of incomplete matching results and the last character of the object to be encoded are used as the encoding results. This encoding method is recorded as the second encoding method. For example: when the coding objects in the coding object column of the dictionary are C, A, AB, BCD, CA, CAB, ACABCD in order, and the unencoded characters in the character sequence to be compressed are {C, A, B, C, D, A, B, A, C, B, C, B}, and the object to be encoded is CABCDABA, CABCD and AB in the object to be encoded are the results of the first round of incomplete matching and the results of the second round of incomplete matching, respectively. A is the next character of CABCDAB in the character sequence to be compressed. The result of the first round of incomplete matching, CABCD, is in the dictionary. The corresponding encoding object is ACABCD, the offset length is 1, and the serial number corresponding to the encoding object ACABCD in the dictionary is 7. Then the code word of the incomplete matching result CABCD in the first round is (7,-1); the corresponding encoding object AB in the dictionary for the incomplete matching result AB in the second round is AB, the offset length is 0, and the serial number corresponding to the encoding object AB in the dictionary is 3. Then the code word of the incomplete matching result AB in the second round is (3,0). After omitting 0, the code word becomes (3); then the encoding result of the object to be encoded CABCDABA is (7,-1,3,A).

[0074] Add a new row at the end of the dictionary, fill the object to be encoded as the encoding object into the encoding object column of the dictionary row, fill the encoding result into the encoding result column of the dictionary row, and fill the row number of the row as the sequence number into the sequence number column of the row to update the dictionary. Use the updated dictionary to continue encoding the unencoded characters in the character sequence to be compressed until all characters in the character sequence to be compressed have been encoded, and stop the iteration. All the objects to be encoded are spliced ​​together in order as compressed data.

[0075] It should be noted that, according to the acquisition process of the first candidate coding object and the second candidate coding object, the length of the first candidate coding object must be greater than or equal to the length of the second candidate coding object. However, when compressing the first candidate coding object, it is necessary to record the sequence number of the coding object corresponding to each round of incomplete matching results contained in the first candidate coding object in the dictionary, as well as the dislocation length, which will bring additional recording volume. Therefore, the compression efficiency can only be improved when the length of the first candidate coding object is much longer than the length of the second candidate coding object. Therefore, the present invention selects the object to be encoded according to the lengths of the first candidate coding object and the second candidate coding object.

[0076] Optionally, selecting the object to be encoded according to the lengths of the first candidate encoding object and the second candidate encoding object includes:

[0077] When the length difference between the first candidate encoding object and the second candidate encoding object is greater than the preset length difference threshold, the first candidate encoding object is used as the object to be encoded; otherwise, the second candidate encoding object is used as the object to be encoded. The length difference threshold can be set by the implementer according to the actual implementation situation and is not limited to a specific one. For example, , where Q represents the length of the second candidate coding object.

[0078] Preferably, the selecting the object to be encoded according to the lengths of the first candidate encoding object and the second candidate encoding object includes:

[0079] Obtain a compression advantage of a first candidate coding object over a second candidate coding object; when the compression advantage is greater than a preset advantage threshold, use the first candidate coding object as the object to be coded; when the compression advantage is less than or equal to the preset advantage threshold, use the second candidate coding object as the object to be coded; wherein the advantage threshold can be set by implementers according to actual implementation conditions, and is not specifically limited, for example, 0.5.

[0080] It should be noted that, when the object to be encoded is the first candidate encoding object, the present invention provides two optional encoding methods for encoding the object to be encoded, namely the first encoding method and the second encoding method. Therefore, when calculating the compression advantage of the first candidate encoding object relative to the second candidate encoding object, the present invention provides two methods for calculating the compression advantage according to the two optional encoding methods.

[0081] Optionally, when it is planned to use the first encoding method to encode the object to be encoded which is the first candidate encoding object, the compression advantage of the first candidate encoding object over the second candidate encoding object can be expressed as follows:

[0082] ;

[0083] Indicates a compression advantage of a first candidate coding object relative to a second candidate coding object; Indicates the total number of rounds of incomplete matches that result in the existence of results; Q indicates the length of the second candidate encoding object; represents the hyperbolic tangent function; Indicates the length of the first candidate encoding object; is the difference between the length of the first candidate coding object and the length of the second candidate coding object. When the difference is larger, the first candidate coding object is used for coding, more characters can be encoded at one time, and the compression efficiency is improved more. On the contrary, when the difference is smaller, the first candidate coding object is used for coding, and the difference in the amount of characters that can be encoded at one time is smaller than that of the second candidate coding object, and the compression efficiency is improved limitedly. If the first coding method is used to encode the first candidate coding object, it is necessary to record the serial numbers of the coding objects corresponding to all the incomplete matching results contained in the first candidate coding object in the dictionary, as well as the misalignment lengths corresponding to the incomplete matching results. The amount of data that needs to be recorded is 2c, so when the length difference The larger the value is, the smaller the amount of data 2c that needs to be recorded is, and the greater the compression advantage of the first candidate coding object over the second candidate coding object is.

[0084] Preferably, when it is planned to use the second encoding method to encode the object to be encoded which is the first candidate encoding object, the compression advantage of the first candidate encoding object over the second candidate encoding object can be expressed as follows:

[0085] ;

[0086] Indicates a compression advantage of a first candidate coding object relative to a second candidate coding object; Indicates the total number of rounds of incomplete matches that result in the existence of results; Q indicates the length of the second candidate encoding object; represents the length of the first candidate encoding object; m represents the dislocation length; represents the hyperbolic tangent function; Indicates the number of incomplete matching rounds corresponding to the misalignment length m=0; if the second encoding method is used to encode the first candidate encoding object, it is necessary to record the serial numbers of the encoding objects corresponding to all the incomplete matching results contained in the first candidate encoding object in the dictionary, and the misalignment lengths corresponding to all the incomplete matching results that are not 0, then the number of data that needs to be recorded is 2c- , so when the length difference The larger the data, the more data needs to be recorded. The smaller the number, the greater the compression advantage of the first candidate coding object over the second candidate coding object.

[0087] In another embodiment, implementers may use compression algorithms such as Huffman coding, arithmetic coding, finite state entropy coding, etc. to further compress the compressed data to improve compression efficiency.

[0088] At this point, compression of the character sequence to be compressed is achieved.

[0089] S3: The compressed data is transmitted so that the device monitoring platform can realize remote monitoring of the device according to the restoration result of the compressed data.

[0090] The compressed data is transmitted to the equipment monitoring platform. After receiving the compressed data, the equipment monitoring platform decompresses and restores the compressed data, specifically:

[0091] For each character in the compressed data, when there is no other character between a number and the character, the number is considered to be directly or indirectly adjacent to the character. Taking each character appearing in the compressed sequence as a split point, each character and all the numbers directly or indirectly adjacent to it before it are divided into a group as an encoding result, and all encoding results are obtained in this way.

[0092] For example, when the compression sequence is {0,C,0,A,1,B,3,D,4,A,1,C,5,B,7,-1,3,A}, the encoding results are (0,C), (0,A), (1,B), (3,D), (4,A), (1,C), (5,B), (7,-1,3,A).

[0093] Construct an empty dictionary, which contains the sequence number column, the encoding object column, and the encoding result column. Decode the encoding results in sequence according to the dictionary, as follows:

[0094] When the encoding result is 0 and a single character, the single character is used as the decoding result;

[0095] When the encoding result is a single number and a single character, the single number is represented by F, and the encoding object with the sequence number F in the dictionary is concatenated with the single character as the decoding result;

[0096] When the encoding result contains multiple numbers and a single character, the jth number is used To represent, where j takes every integer in [1,H], where H represents the number of digits contained in the encoded result. Decode each digit in turn: when is a positive number, and 0 or is a positive number or If it does not exist, get the sequence number in the dictionary The encoded object is used as a decoded data; when is a positive number, and When it is a negative number, the sequence number in the dictionary is The coded object is The string consisting of characters to the last character is used as a decoded data, where Indicates the absolute value symbol; when If it is a negative number, skip , decode the next number. All the decoded data are concatenated into a string as the decoding result.

[0097] Add a new row at the end of the dictionary, fill the decoding result as the encoding object into the encoding object column of the row of the dictionary, fill the encoding result into the encoding result column of the row of the dictionary, and fill the row number of the row as the sequence number into the sequence number column of the row to update the dictionary.

[0098] When all encoding results are decoded, all encoding objects in the encoding object column in the dictionary are concatenated in order into a one-dimensional sequence as a character sequence.

[0099] The character sequence is decoded using Base64 encoding, and the decoded result is decoded again using UTF-8 encoding to obtain the device operation data.

[0100] The equipment monitoring platform monitors the equipment based on the decoded equipment operation data.

[0101] At this point, remote monitoring of equipment operation data has been achieved.

[0102] An embodiment of the present invention further discloses a remote monitoring system for device operation data, including a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, a remote monitoring method for device operation data according to the present invention is implemented.

[0103] The above system also includes other components well known to those skilled in the art, such as a communication bus and a communication interface, and their configuration and functions are known in the art, so they will not be described in detail here.

[0104] Although this specification has shown and described a number of embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will conceive of many modifications, changes and alternatives without departing from the ideas and spirit of the present invention. It should be understood that in the practice of the present invention, various alternatives to the embodiments of the present invention described herein may be employed.

[0105] The above are all preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Therefore, any equivalent changes made based on the structure, shape, and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for remote monitoring of equipment operation data, characterized in that: include: Convert the collected equipment operation data into a character sequence to be compressed; Compressing the character sequence to be compressed according to the dictionary to obtain compressed data, wherein the compressed data is composed of encoding results; The compression process includes: performing multiple rounds of incomplete matching on the character sequence to be compressed, wherein the incomplete matching is to match the character sequence to be compressed with a number of characters after each encoding object in the dictionary as a unit, and taking the result with the longest matching length as the result of the incomplete matching; in one round of incomplete matching, matching the character sequence to be compressed remaining after the previous round of incomplete matching is completed as the target; splicing the results of multiple rounds of incomplete matching together as the target result, splicing the target result with the next character in the character sequence to be compressed together to obtain a first candidate encoding object; determining the object to be encoded according to the first candidate encoding object; and in response to the object to be encoded being the first candidate Selecting a coding object, and obtaining a coding result according to the length of a unit corresponding to the result of each round of incomplete matching and the serial number of the coding object to which the unit belongs in the dictionary, including: taking the difference between the length of the coding object to which the unit corresponding to the result of each round of incomplete matching belongs and the length of the unit as the misalignment length of each round, represented by m; taking the serial number of the coding object to which the unit corresponding to the result of each round of incomplete matching belongs in the dictionary and the negative number -m of the misalignment length m as the codeword of the result of each round of incomplete matching, omitting all 0s in the codeword to update the codeword, and taking the updated codeword of the result of all rounds of incomplete matching and the last character of the object to be encoded as the coding result; The compressed data is transmitted so that the device monitoring platform can remotely monitor the device based on the restored results of the compressed data.

2. A method for remote monitoring of equipment operation data according to claim 1, characterized in that: The step of determining the object to be encoded according to the first candidate encoding object comprises: The first candidate encoding object is used as the object to be encoded.

3. A method for remote monitoring of equipment operation data according to claim 1, characterized in that: The compression process further includes: Performing a complete match on the character sequence to be compressed according to the dictionary, wherein the complete match is to match each encoding object in the dictionary as a unit with the character sequence to be compressed, and taking the result with the longest matching length as the complete match result, and concatenating the complete match result and the next character in the character sequence to be compressed to obtain a second candidate encoding object; The determining of the object to be encoded includes: selecting the object to be encoded according to the lengths of the first candidate encoding object and the second candidate encoding object, including: determining the compression advantage of the first candidate encoding object relative to the second candidate encoding object according to the lengths of the first candidate encoding object and the second candidate encoding object, satisfying the expression: ; represents the compression advantage of the first candidate coding object over the second candidate coding object; D represents the length of the first candidate coding object; Indicates the total number of incomplete matches that result in the existence of the result; Q indicates the length of the second candidate encoding object; m indicates the length of the misalignment; represents the hyperbolic tangent function; Indicates the number of incomplete matching rounds corresponding to the misalignment length m=0; in response to the compression advantage being greater than a preset advantage threshold, the first candidate encoding object is used as the object to be encoded, otherwise, the second candidate encoding object is used as the object to be encoded; In response to the object to be encoded being the second candidate encoding object, the serial number of the encoding object corresponding to the complete matching result in the dictionary and the last character of the object to be encoded are taken as the encoding result.

4. A remote monitoring system for equipment operation data, characterized in that: include: A processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, a method for remotely monitoring equipment operation data according to any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • Power equipment remote monitoring system and method based on big data cloud computing

    CN111314469A

  • Data compression and storage method for intelligent electricity meter of internet of things

    CN115549691A

  • Method, apparatus and device for compressing LZ codes, and storage medium

    CN107565972A

  • Data compression method and system, and computer readable storage medium

    CN113890541A

  • Efficient data transmission method for smart campus management platform

    CN115866287A