A method for online transmission of flue gas monitoring data
By optimizing the dictionary update strategy of the LZW algorithm and dynamically adjusting the dictionary size according to the characteristics of the flue gas monitoring data, the computational burden and efficiency problems of the traditional LZW algorithm in flue gas monitoring data compression are solved, and more efficient data transmission is achieved.
Patent Information
- Application Number
- CN202510972968.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-15
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2045-07-15
AI Technical Summary
The traditional LZW algorithm increases the computational burden and reduces the compression efficiency during the flue gas monitoring data compression process due to frequent dictionary resets, and is difficult to adapt to the temporal continuity and periodicity characteristics of flue gas data.
By obtaining the initial dictionary size, an initial full dictionary is generated, and it is dynamically updated according to the number of character types, frequency of occurrence and regularity, redundant strings are deleted, the dictionary is optimized, and compression efficiency is improved.
It achieves more efficient data compression, reduces the computational burden, improves the real-time and accuracy of data transmission, and adapts to the characteristic changes of flue gas monitoring data.
Smart Images

Figure CN120474559B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and more particularly to a method for online transmission of flue gas monitoring data. Background Art
[0002] Flue gas pollutant emissions generated during industrial production processes pose a serious threat to the environment and human health, especially in countries and regions experiencing rapid industrialization. The long-term accumulation of harmful substances in flue gas, such as sulfur dioxide, nitrogen oxides, and particulate matter, not only exacerbates air pollution but also leads to frequent smog, seriously affecting the ecological environment and residents' quality of life. Traditional flue gas monitoring methods based on manual sampling and laboratory analysis usually rely on regular manual sampling and have a serious lag. Because laboratory analysis takes time and cannot reflect changes in pollutants in real time, it makes it difficult for regulatory authorities to grasp the dynamic changes in pollutant emissions in a timely manner and thus cannot respond quickly. Therefore, a new online transmission method for flue gas monitoring data is urgently needed. This method should have efficient, accurate, and real-time data acquisition and transmission capabilities. It should not only be able to monitor the concentration changes of pollutants in flue gas in real time, but also transmit data quickly and accurately to regulatory authorities, enabling remote monitoring and precise management.
[0003] In the transmission of flue gas monitoring data, the LZW algorithm is usually used to compress the data. However, flue gas data has a complex structure, contains many different types of characters, and is affected by factors such as furnace start-up and shutdown, and changes in operating conditions, showing unstable characteristics. In the process of compressing and transmitting flue gas monitoring data using the LZW algorithm, the dictionary needs to be reset frequently due to dictionary capacity limitations. The reconstruction process itself will generate additional computing overhead, increasing the system burden. Secondly, frequent dictionary initialization will interrupt the continuity of the compression process, resulting in a significant decrease in compression efficiency. This mechanism defect makes it difficult for the algorithm to achieve an ideal balance between compression performance and computing resource consumption. In the continuous flue gas emission monitoring system, the monitoring data has the characteristics of strong temporal continuity and obvious periodic characteristics. The traditional LZW algorithm is difficult to effectively adapt to the long-term compression needs of such data. Summary of the Invention
[0004] In order to solve the problem that the LZW algorithm reconstructs the dictionary, resulting in frequent reset processes, increases the computational burden, and reduces compression efficiency, the present invention proposes a method for online transmission of flue gas monitoring data, which includes the following steps:
[0005] Collect flue gas monitoring data; obtain the number of character types in the flue gas monitoring data; obtain an initial dictionary size based on the number of character types in the flue gas monitoring data; encode the flue gas monitoring data based on the initial dictionary size to obtain an initial full dictionary and initial transmission data; obtain the probability of occurrence of each character in the initial transmission data:
[0006] ; Represents the number of times the jth character appears in the initial transmission data; Represents the total number of characters in the initial transmission data; represents the absolute value of the index difference between the kth and k+1th occurrences of the jth character in the initial transmission data; exp() represents the exponential function with a natural constant as the base;
[0007] Get the replaceability of each string in the initial full dictionary , Represents the usage frequency of the i-th string in the initial full dictionary; Represents the maximum value of the usage frequency of all types of strings in the initial full dictionary; Represents the number of characters in the i-th string in the initial full dictionary; represents the probability of occurrence of the mth character in the i-th character string in the initial full dictionary; based on the replaceability, the character strings in the initial full dictionary are deleted to obtain an updated dictionary; the remaining flue gas monitoring data are encoded according to the dynamic update strategy of the dictionary to obtain a final encoding result.
[0008] The innovation of the present invention lies in first obtaining the initial dictionary size based on the number of character types in the flue gas monitoring data, providing a reasonable initial size for the dictionary used in the encoding process, avoiding the dictionary being too small or too large, which affects the encoding efficiency, and then encoding the flue gas monitoring data according to the initial dictionary size to generate an initial full dictionary and initial transmission data, providing a basis for subsequent dynamic update of the dictionary and compression; further, based on the number of times each character appears in the initial transmission data and the regularity of the time intervals of each character appearing, the probability of occurrence of each character in the initial transmission data is obtained, and characters that appear frequently and regularly in the initial transmission data can be identified, which can more accurately evaluate which characters are more valuable in the compression process and provide a basis for dictionary updating; further, based on the probability of occurrence and the number of characters and frequency of use of the character string, the replaceability of each character string in the initial full dictionary is obtained, and the character strings in the initial full dictionary are deleted to obtain an updated dictionary. By dynamically updating the dictionary, those redundant or invalid character strings are deleted, thereby improving the compression efficiency.
[0009] Preferably, obtaining the initial dictionary size according to the flue gas monitoring data includes:
[0010] ;
[0011] Where, Represents the size of the initial dictionary; Represents the number of character types in the flue gas monitoring data; Represents the ceiling symbol; Represents the base-2 logarithm function.
[0012] Provide an initial size for the dictionary used in the encoding process to prevent the dictionary from being too small or too large, which affects the subsequent encoding efficiency.
[0013] Preferably, obtaining an initial full dictionary includes:
[0014] According to the size of the initial dictionary, the flue gas monitoring data is initially compressed using the LZW algorithm until the initial dictionary is completely filled, which is recorded as the initial full dictionary.
[0015] Preferably, the acquisition of the initial transmission data includes:
[0016] The initially compressed portion of the flue gas monitoring data is recorded as the initial transmission data.
[0017] Preferably, the deleting of the character strings in the initial full dictionary based on the degree of replaceability to obtain an updated dictionary includes:
[0018] Sort all the strings in the initial full dictionary by their replaceability from large to small to obtain a string type sequence; record the top 20% of the string types in the string type sequence as the string types to be deleted; after removing all the string types to be deleted from the dictionary, the new dictionary is recorded as the updated dictionary.
[0019] The strategy for updating the dictionary is optimized to delete redundant or invalid strings to further improve compression efficiency.
[0020] Preferably, encoding the remaining flue gas monitoring data according to the dynamic update strategy of the dictionary to obtain the final encoding result includes:
[0021] The LZW compression algorithm is used in combination with the updated dictionary to encode the remaining flue gas monitoring data until the size of the updated dictionary reaches the initial dictionary size. Then, the updated full dictionary and the compression result are obtained. The substitutability of each string in the updated full dictionary is analyzed and then deleted. The remaining flue gas monitoring data is encoded, and so on until all the flue gas monitoring data are encoded and the final encoding result is obtained.
[0022] A dynamic dictionary update strategy is adopted to retain frequently used character strings in the dictionary, which can compress data more efficiently, reduce the computational burden, and achieve optimal compression efficiency.
[0023] Preferably, the obtaining of the number of character types in the flue gas monitoring data includes:
[0024] Count the number of character types in flue gas monitoring data.
[0025] Preferably, the collecting of flue gas monitoring data includes:
[0026] The preset acquisition frequency is An air quality detection system is installed at the factory flue gas emission point to collect the concentrations of gases such as sulfur dioxide, nitrogen oxides, carbon monoxide, oxygen, the mass concentration of particulate matter in the air, and flue gas flow rate data to obtain flue gas monitoring data.
[0027] This facilitates the subsequent compression and transmission of data.
[0028] The present invention has the following beneficial effects: the purpose of the present invention is to first encode the flue gas monitoring data according to the obtained initial dictionary size, generate an initial full dictionary and initial transmission data, and provide a basis for subsequent dynamic update of the dictionary and compression; then, according to the number of times and regularity of each character appearing in the initial transmission data, obtain the probability of occurrence of each character in the initial transmission data, which can more accurately evaluate the value of the character in the compression process and provide a basis for dictionary update; then, according to the probability of occurrence and the number of characters and frequency of use of the character string, obtain the replaceability of each character string in the initial full dictionary, and based on the replaceability, delete the character strings in the initial full dictionary to obtain an updated dictionary, delete the no longer valid or redundant character strings, and update the dictionary to adapt to the actual characteristics of the data, which helps to reduce the size of the dictionary while retaining the character strings that are beneficial to the compression effect, thereby improving the data compression rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 This is a flowchart of the steps of a method for online transmission of flue gas monitoring data according to an embodiment of the present invention. DETAILED DESCRIPTION
[0030] The technical solutions in the embodiments of the present invention will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present invention.
[0031] See also Figure 1 , which shows a flowchart of a method for online transmission of flue gas monitoring data provided by one embodiment of the present invention, the method comprising the following steps:
[0032] S001. Collect flue gas monitoring data.
[0033] It should be noted that the long-term accumulation of harmful substances contained in flue gas, such as sulfur dioxide, nitrogen oxides, particulate matter, etc., not only aggravates air pollution, but also leads to the frequent occurrence of smog weather, seriously affecting the ecological environment and the quality of life of residents. Therefore, the present invention needs to collect the concentrations of gases such as sulfur dioxide, nitrogen oxides, carbon monoxide, and particulate matter in the factory flue gas emissions. By monitoring these parameters, the impact of flue gas emissions on the environment can be understood in a timely manner.
[0034] In the embodiment of the present invention, the preset acquisition frequency is An air quality detection system is installed at the factory flue gas emission point to collect the concentrations of gases such as sulfur dioxide, nitrogen oxides, carbon monoxide, oxygen, the mass concentration of particulate matter in the air, and flue gas flow rate data as flue gas monitoring data.
[0035] S002. Obtain an initial dictionary size based on the flue gas monitoring data; encode part of the flue gas monitoring data based on the initial dictionary size to obtain an initial full dictionary and initial transmission data; and obtain the probability of occurrence of each character in the initial transmission data.
[0036] It should be noted that when using the LZW algorithm to compress flue gas monitoring data, the dictionary needs to be reset frequently, which increases the computational burden and thus reduces the compression efficiency. In addition, the LZW algorithm dictionary stores some rarely appearing low-frequency character strings, and these low-frequency character strings occupy the dictionary space but do not have much effect, further reducing the compression efficiency. Therefore, the present invention mainly optimizes the dynamic update strategy of the dictionary. Therefore, during the compression process, when the dictionary is full, the replaceability of each character string in the dictionary is analyzed, and the dictionary is dynamically updated according to the replaceability of each character string in the dictionary, thereby obtaining a more optimized dictionary update strategy to achieve better data compression efficiency. Therefore, the traditional LZW algorithm is first used to compress the flue gas monitoring data for the first time until the initial dictionary is full for the first time, and an initial full dictionary is obtained, which facilitates the subsequent analysis of the character strings in the initial full dictionary.
[0037] In an embodiment of the present invention, the number of character types in the flue gas monitoring data is counted;
[0038] Get the size of the initial dictionary:
[0039] ;
[0040] Where, Represents the size of the initial dictionary; Represents the number of character types in the flue gas monitoring data; Represents the ceiling symbol; Represents the logarithmic function with base 2; it should be noted that in the traditional LZW algorithm, the size of the initial dictionary is determined by the character types of the input data. The size of the initial dictionary is required to be able to accommodate twice the smallest integer power of 2 of the number of character types in the input data. This is to ensure that there is enough space to store all characters.
[0041] According to the size of the initial dictionary, the flue gas monitoring data is initially compressed using the LZW algorithm until the initial dictionary is completely filled, which is recorded as the initial full dictionary. The initially compressed part of the flue gas monitoring data is recorded as the initial transmission data.
[0042] It should be noted that when the initial dictionary is filled, the LZW algorithm has compressed a portion of the flue gas monitoring data, and the compressed portion of the flue gas data is recorded as the initial transmission data.
[0043] It should be noted that, for any character in the initial transmission data, if the frequency of occurrence of this character in the initial transmission data is higher, and the time intervals of occurrence of this character in the initial transmission data have significant regularity, it means that this character is a more important data in the initial transmission data; therefore, based on the above characteristics, the degree of occurrence of each character in the initial transmission data is quantified; and when the number of occurrences of any character in the initial transmission data in the initial transmission data is only once, it is only necessary to quantify the degree of occurrence of this character based on the frequency of occurrence of this character in the initial transmission data.
[0044] In an embodiment of the present invention, the probability of occurrence of each character in the initial transmission data is obtained:
[0045]
[0046] Where, Represents the probability of occurrence of the jth character in the initial transmission data; Represents the number of times the jth character appears in the initial transmission data; Represents the total number of characters in the initial transmission data; represents the absolute value of the index difference between the kth and k+1th occurrences of the jth character in the initial transmission data; exp() represents the exponential function with a natural constant as the base;
[0047] The larger the value of , the higher the frequency of the j-th character in the initial transmission data, which means that the more common the j-th character is, the more likely it is to appear in the subsequent flue gas monitoring data. represents the average period of the jth character appearing in the initial transmission data; It represents the degree of disparity between the absolute value of the index difference between two adjacent occurrences of the j-th character in the initial transmission data and the average period of the j-th character in the initial transmission data. The smaller the value, the more evenly the j-th character is distributed in the initial transmission data, and the more likely the j-th character is to appear in subsequent flue gas monitoring data.
[0048] S003. Obtain the replaceability of each character string in the initial full dictionary according to the probability of occurrence of each character in the initial transmission data; and perform a deletion operation on the character strings in the initial full dictionary based on the replaceability to obtain an updated dictionary.
[0049] It should be noted that, for any type of string in the initial full dictionary, in order to optimize the compression efficiency of the LZW algorithm as much as possible, it is necessary to analyze the substitutability of each string in the initial full dictionary, and then delete the string types with high substitutability so as to dynamically update the initial full dictionary; it is known that the probability of occurrence of each character in the initial transmission data has been obtained, and each character in each string in the initial full dictionary belongs to the initial transmission data. Therefore, based on the probability of occurrence of each character in the initial transmission data, the probability of occurrence of each character in each string in the initial full dictionary is obtained;
[0050] If the probability of occurrence of all characters in any type of string in the initial full dictionary is low and the frequency of use of this type of string is low, then the probability of use of this type of string in subsequent compression is higher. Therefore, the substitutability of this type of string in the initial full dictionary is lower, and the fewer the number of characters in this type of string, the worse the compression effect, and therefore the higher the substitutability of this type of string.
[0051] In this embodiment of the present invention, the degree of substitutability of each character string in the initial full dictionary is obtained:
[0052] ;
[0053] Where, Represents the replaceability of the i-th string in the initial full dictionary; Represents the usage frequency of the i-th string in the initial full dictionary; Represents the maximum value of the usage frequency of all types of strings in the initial full dictionary; Represents the number of characters in the i-th string in the initial full dictionary; Represents the probability of occurrence of the mth character in the i-th string in the initial full dictionary;
[0054] The larger the value of , the lower the frequency of use of the i-th string in the initial full dictionary, and the higher its replaceability. The larger the value of , the fewer characters there are in the i-th string in the initial full dictionary. The shorter the string, the worse the compression effect. Therefore, the higher the replaceability of the i-th string in the initial full dictionary.
[0055] The larger the value of , the more likely the characters in the i-th string in the initial full dictionary are to appear. The higher the probability of using the i-th string in subsequent compression, the lower the replaceability of the i-th string in the initial full dictionary.
[0056] It should be noted that the replaceability of each string in the initial full dictionary indicates the degree to which the string can be replaced in the initial full dictionary. Strings with higher replaceability should be deleted and replaced in the initial full dictionary, which can reduce the computational complexity of dictionary compression and decompression to a certain extent.
[0057] In an embodiment of the present invention, all character strings in an initial full dictionary are sorted from largest to smallest according to their replaceability to obtain a character string type sequence; the top 20% of the character string types in the character string type sequence are recorded as the character string types to be deleted; after all the character string types to be deleted in the dictionary are removed, a new dictionary is obtained and recorded as an updated dictionary.
[0058] S004. Encode the remaining flue gas monitoring data according to the dynamic update strategy of the dictionary to obtain the final encoding result.
[0059] It should be noted that the remaining flue gas monitoring data are encoded according to the dynamic update strategy of the dictionary to obtain the final encoding result.
[0060] In an embodiment of the present invention, the LZW compression algorithm is used in combination with an updated dictionary to encode the remaining flue gas monitoring data until the size of the updated dictionary reaches the initial dictionary size, and an updated full dictionary and a compression result are obtained. The replaceability of each character string in the updated full dictionary is analyzed and then deleted, and the remaining flue gas monitoring data is continued to be encoded, and so on, until all the flue gas monitoring data are encoded to obtain the final encoding result; and the final encoding result is transmitted in real time.
[0061] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for online transmission of flue gas monitoring data, characterized in that: include: Collecting flue gas monitoring data; Get the number of character types in the flue gas monitoring data; Obtaining the initial dictionary size according to the number of character types in the flue gas monitoring data; Encode the flue gas monitoring data according to the initial dictionary size to obtain an initial full dictionary and initial transmission data; Get the probability of each character appearing in the initial transmission data: ; Represents the number of times the jth character appears in the initial transmission data; Represents the total number of characters in the initial transmission data; represents the absolute value of the index difference between the kth and k+1th occurrences of the jth character in the initial transmission data; exp() represents the exponential function with a natural constant as the base; Get the replaceability of each string in the initial full dictionary , Represents the usage frequency of the i-th string in the initial full dictionary; Represents the maximum value of the usage frequency of all types of strings in the initial full dictionary; Represents the number of characters in the i-th string in the initial full dictionary; Represents the probability of occurrence of the mth character in the i-th string in the initial full dictionary; Based on the degree of replaceability, a character string in an initial full dictionary is deleted to obtain an updated dictionary; and the remaining flue gas monitoring data is encoded according to a dynamic update strategy of the dictionary to obtain a final encoding result.
2. A method for online transmission of flue gas monitoring data according to claim 1, characterized in that: The initial dictionary size is obtained according to the flue gas monitoring data, including: ; Where, Represents the size of the initial dictionary; Represents the number of character types in the flue gas monitoring data; Represents the ceiling symbol; Represents the base-2 logarithm function.
3. The method for online transmission of flue gas monitoring data according to claim 1, characterized in that: The step of obtaining an initial full dictionary includes: According to the size of the initial dictionary, the flue gas monitoring data is initially compressed using the LZW algorithm until the initial dictionary is completely filled, which is recorded as the initial full dictionary.
4. A method for online transmission of flue gas monitoring data according to claim 1 or 3, characterized in that: The acquisition of the initial transmission data includes: The initially compressed portion of the flue gas monitoring data is recorded as the initial transmission data.
5. The method for online transmission of flue gas monitoring data according to claim 1, characterized in that: The method of deleting the character strings in the initial full dictionary based on the degree of replaceability to obtain an updated dictionary includes: Sort all the strings in the initial full dictionary by their replaceability from large to small to obtain a string type sequence; record the top 20% of the string types in the string type sequence as the string types to be deleted; after removing all the string types to be deleted from the dictionary, the new dictionary is recorded as the updated dictionary.
6. The method for online transmission of flue gas monitoring data according to claim 1, characterized in that: The remaining flue gas monitoring data is encoded according to the dynamic update strategy of the dictionary to obtain the final encoding result, including: The LZW compression algorithm is used in combination with the updated dictionary to encode the remaining flue gas monitoring data until the size of the updated dictionary reaches the initial dictionary size. Then, the updated full dictionary and the compression result are obtained. The substitutability of each string in the updated full dictionary is analyzed and then deleted. The remaining flue gas monitoring data is encoded, and so on until all the flue gas monitoring data are encoded and the final encoding result is obtained.
7. The method for online transmission of flue gas monitoring data according to claim 1, characterized in that: The method of obtaining the number of character types in the flue gas monitoring data includes: Count the number of character types in flue gas monitoring data.
8. The method for online transmission of flue gas monitoring data according to claim 1, characterized in that: The collecting of flue gas monitoring data includes: The preset acquisition frequency is An air quality detection system is installed at the factory flue gas emission point to collect the concentrations of gases such as sulfur dioxide, nitrogen oxides, carbon monoxide, oxygen, the mass concentration of particulate matter in the air, and flue gas flow rate data to obtain flue gas monitoring data.
Citation Information
Patent Citations
Character string-based file compression method and apparatus
CN106649859A
Smart power grid monitoring data storage method and system
CN117278054A