Remote monitoring method and system for natural convection constant temperature test box
By dynamically adjusting the basic length of the LZ4 compression algorithm, the problem of reducing compression efficiency caused by literal length is solved according to the frequency of the current literal and the degree of matching preference, and the compression efficiency of monitoring data is improved.
Patent Information
- Application Number
- CN202510408745.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-02
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2045-04-02
AI Technical Summary
When the LZ4 compression algorithm compresses the monitoring data, it is prone to the situation where the literal volume gradually becomes longer, resulting in the base length being too long and difficult to match, which reduces the compression efficiency.
By obtaining the frequency preference degree and matching preference degree of the current literal, dynamically adjust the basic length of the LZ4 compression algorithm so that the current literal can be matched in time, avoiding excessive calculation amount.
Improve the compression efficiency of monitoring data and avoid a large number of complex matching operations under the long literal size.
Smart Images

Figure CN119922435A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a remote monitoring method and system for a natural convection constant temperature test box. Background Art
[0002] Natural convection constant temperature test chambers are used in multiple scenarios such as material testing, environmental simulation, and biological experiments to provide a stable temperature and humidity environment. During its use, the demand for precise control and real-time monitoring of the test process has gradually increased. Through the remote monitoring system, researchers and engineers can view the temperature and humidity changes, equipment operating status, and alarm information inside the test chamber in real time without being restricted by time and space. However, in order to improve the transmission efficiency of monitoring data, the monitoring data needs to be compressed before transmission.
[0003] The patent application document currently published with the publication number CN110209640A is a method for dynamically switching the type of lz4 compression algorithm when the mobile phone system is running. When the file needs to be compressed on the Android platform, the current CPU occupancy rate is calculated; the current free RAM size is obtained; the block size during the compression process is dynamically set according to the current free RAM size; the type of LZ4 compression algorithm is dynamically selected according to the current CPU occupancy rate: if the current CPU occupancy rate is higher than the established threshold, the lz4 normal compression algorithm is selected, otherwise, the lz4 high compression rate algorithm is selected.
[0004] The collected monitoring data is compressed using the traditional LZ4 compression algorithm and a fixed basic length is set. Since the collected monitoring data contains many types of characters, it is easy for the literal length to gradually become longer. In addition, if the basic length set in the LZ4 compression algorithm is longer, it will make the literal difficult to match, which not only reduces the compression effect, but also greatly increases the matching calculation amount. Summary of the invention
[0005] In order to solve the problem that the literal value gradually becomes longer when the LZ4 compression algorithm compresses the monitoring data, the longer the basic length is, the more difficult it is to match the literal value, thereby reducing the compression efficiency. The present invention provides a remote monitoring method and system for a natural convection constant temperature test chamber.
[0006] In a first aspect, the present invention provides a remote monitoring method for a natural convection constant temperature test chamber, which adopts the following technical solution: A remote monitoring method for a natural convection constant temperature test chamber comprises the following steps: Collect monitoring data; obtain the current literal value when compressing the monitoring data using the LZ4 compression algorithm; obtain the frequency preference of the current literal value ; Represents the length of the current literal; Represents the frequency of the jth character of the current literal in the monitoring data; Represents the frequency of the mth target character combination in the current literal; Represents the number of target character combinations of the current literal; Get the matching preference of the current literal ; Represents the number of character types in the current literal; Represents the frequency of occurrence of the hth character in the current literal; Represents the corrected predicted frequency of the hth character of the current literal; The preference level of the current literal is obtained according to the matching preference level and frequency preference level of the current literal; after adjusting the preset basic length according to the preference level of the current literal, the characters in the remaining monitoring data are compressed and transmitted.
[0007] The innovation of the present invention lies in first obtaining the frequency preference of the current literal according to the frequency of occurrence of characters in the current literal, then predicting the subsequent occurrence probability of each character in the current literal, and then obtaining the matching preference of the current literal, and finally obtaining the preference of the current literal according to the matching preference and frequency preference of the current literal. A literal with a low preference indicates that it is difficult to match. Therefore, for literals with a low preference, the basic length of the LZ4 compression algorithm is appropriately reduced to make the current literal match in time, so as to prevent the current literal from being too long and causing excessive calculation amount for subsequent matching. By dynamically adjusting the fixed basic length according to the preference of the literal, the compression effect of the monitoring data can still be maintained to a certain extent. At the same time, it also avoids performing a large number of complex matching operations when the literal is long, thereby improving the compression efficiency of the monitoring data.
[0008] Preferably, obtaining the target character combination of the current literal includes: Preset the number of consecutive characters N, record any N consecutive characters in the current literal as a character combination of the current literal, obtain several character combinations of the current literal, multiply the frequencies of the characters in each character combination of the current literal and raise them to the Nth power to obtain the frequency degree of each character combination of the current literal; if the frequency degree of any character combination of the current literal is greater than , Represents the number of character types in the monitoring data, and records the character combination of the current literal as the target character combination of the current literal.
[0009] Preferably, obtaining the modified predicted frequency of the hth character of the current literal includes: Obtain the predicted frequency of each character in the current literal; and use the ratio of the predicted frequency of the hth character in the current literal to the sum of the predicted frequencies of each character in the current literal as the corrected predicted frequency of the hth character in the current literal.
[0010] This is convenient for obtaining the matching preference of the current literal value later.
[0011] Preferably, obtaining the predicted frequency of each character in the current literal includes: ; In the formula, Represents the predicted frequency of the hth character in the current literal; Represents the frequency of the hth character in the current literal; Represents the frequency of the hth character of the current literal in the previous literal; || represents the absolute value symbol; max() represents the maximum value function; exp() represents the exponential function with a natural constant as the base.
[0012] Based on the predicted frequency of each character in the current literal, it is determined whether the current literal is likely to be matched in the future.
[0013] Preferably, obtaining the preference level of the current literal includes: ; In the formula, Represents the preference level of the current literal; Represents the matching preference of the current literal; Represents the frequency preference of the current literal; Represents the length of the current literal.
[0014] A literal with a low preference level is difficult to match, so it is convenient to adjust the basic length according to the preference level of the current literal to make the literal easier to match.
[0015] Preferably, the process of compressing and transmitting the characters in the remaining monitoring data after adjusting the preset basic length according to the preference level of the current literal includes: Get the priority threshold , Represents the number of character types in the monitoring data. When the preference level of the current literal is less than the preference level threshold, the basic length is set to 5 to continue compressing the characters in the remaining monitoring data, and the next literal is analyzed according to the analysis method of the current literal to obtain the final compressed data, which is then transmitted.
[0016] Improved compression efficiency.
[0017] Preferably, the obtaining of the current literal value when compressing the monitoring data using the LZ4 compression algorithm includes: The preset basic length is V, the literal length is L, and when the monitoring data is compressed using the LZ4 compression algorithm, the literal with a length greater than L is recorded as the current literal.
[0018] In a second aspect, the present invention provides a remote monitoring system for a natural convection constant temperature test chamber, which adopts the following technical solution: A remote monitoring system for a natural convection constant temperature test chamber 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 remote monitoring method for a natural convection constant temperature test chamber is implemented.
[0019] By adopting the above technical solution, the above-mentioned remote monitoring method for a natural convection constant temperature test chamber 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.
[0020] The present invention has the following technical effects: the purpose of the present invention is to first obtain the frequency preference of the current literal according to the frequency of occurrence of characters in the current literal, then predict the subsequent occurrence probability of each character in the current literal, and then obtain the matching preference of the current literal, and finally obtain the preference of the current literal according to the matching preference and frequency preference of the current literal, and appropriately reduce the basic length of the LZ4 compression algorithm for literals with low preference so that the current literal can be matched in time, and prevent the current literal from being too long, resulting in excessive calculation of subsequent matching. By dynamically adjusting the fixed basic length according to the preference of the literal, the compression effect of the monitoring data can still be maintained to a certain extent. At the same time, it also avoids performing a large number of complex matching operations when the literal is long, thereby improving the compression efficiency of the monitoring data. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] 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.
[0022] Figure 1 The present invention is a flowchart of a remote monitoring method for a natural convection constant temperature test chamber according to an embodiment of the present invention. DETAILED DESCRIPTION
[0023] 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.
[0024] 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.
[0025] The embodiment of the present invention discloses a remote monitoring method for a natural convection constant temperature test chamber, referring to Figure 1 , comprising steps S1 to S4: S1: Collect monitoring data.
[0026] In the embodiment of the present invention, monitoring data of the natural convection constant temperature test box is collected from the database, and the monitoring data includes: temperature, humidity, air flow rate, equipment component status, experimental operation time and other data.
[0027] S2: When compressing the monitoring data, the current literal is obtained, and the frequency preference of the current literal is obtained according to the frequency of occurrence of characters in the current literal in the monitoring data.
[0028] It should be noted that, in the process of remote monitoring of the convection constant temperature test chamber, the LZ4 compression algorithm is used, and a fixed basic length is set to compress the collected monitoring data. Since the collected monitoring data contains many types of characters, it is easy for the literal to gradually become longer. If the basic length set in the LZ4 compression algorithm is longer, it will cause the literal to be difficult to match, which not only reduces the compression effect, but also greatly increases the matching calculation amount. Therefore, the present invention analyzes the frequency of characters in the literal and the literal length to obtain the preference degree of the literal. When the preference degree of the literal is low, it means that the literal is not easy to be matched subsequently, and it is necessary to set a lower basic length so that the literal can be matched as soon as possible and then continue to compress and analyze the monitoring data, that is, analyze the next literal. By dynamically adjusting the fixed basic length according to the preference degree of the literal, the compression effect of the monitoring data can still be maintained to a certain extent. At the same time, it also avoids performing a large number of complex matching operations when the literal is long, thereby improving the compression efficiency of the monitoring data.
[0029] It should be further explained that when the length of the literal obtained during the compression process is too large, it is considered that the literal may be a character that is difficult to match. Therefore, the literal is analyzed. The greater the frequency of the characters of the literal appearing in the monitoring data, the greater the probability that the characters of the literal will appear and match in the future, and the greater the frequency preference of the literal.
[0030] In the embodiment of the present invention, the preset basic length is V, the literal length is L, and in the process of compressing the monitoring data using the LZ4 compression algorithm, the literal whose length is greater than L is recorded as the current literal. It should be noted that the acquisition of literals during the compression process is a well-known technology and will not be described in detail in the present invention. The literal length is the number of characters in the literal; the preset basic length is V=10, and the literal length is L=20. In the embodiment of the present invention, the implementer can preset the basic length and the literal length according to the specific implementation method.
[0031] The preset number of consecutive characters N=5. In other embodiments, the implementer may preset the value of the number of consecutive characters N according to the specific implementation method, record any N consecutive characters in the current literal as a character combination of the current literal, obtain several character combinations of the current literal, multiply the frequencies of the characters in each character combination of the current literal and then raise them to the Nth power to obtain the frequency degree of each character combination of the current literal; if the frequency degree of any character combination of the current literal is greater than , Represents the number of character types in the monitoring data, and records the character combination of the current literal as the target character combination of the current literal; Get the frequency preference of the current literal: ; In the formula, Represents the frequency preference of the current literal; Represents the length of the current literal; Represents the frequency of the jth character of the current literal in the monitoring data; Represents the frequency of the mth target character combination in the current literal; Represents the number of target character combinations of the current literal; Represents the average frequency of all characters in the current literal in the monitoring data. The larger the value, the greater the frequency preference of the current literal. The larger the value is, the more frequent characters there are in the current literal. The greater the probability that the characters of the current literal will appear and match in the future, and the greater the frequency preference of the current literal.
[0032] S3: Obtain the preceding literal of the current literal, and obtain the predicted frequency of each character in the current literal based on the frequency of each character in the current literal and the frequency of each character in the current literal; obtain the matching preference of the current literal based on the difference between the predicted frequency of each character in the current literal and the frequency of each character in the current literal; obtain the preference of the current literal based on the matching preference and frequency preference of the current literal.
[0033] It should be noted that since the monitoring data is transmitted in real time and it is impossible to count the character frequency at all times, it is necessary to predict the frequency of occurrence of each character in the current literal in the future. If the predicted frequency of each character in the current literal is close to the frequency of occurrence of each character in the current literal in the current literal, it is considered that the probability of the current literal being matched is higher.
[0034] In this embodiment of the present invention, the current literal characters as the preceding literal of the current literal, Represents the length of the current literal.
[0035] Get the predicted frequency of each character in the current literal: ; In the formula, Represents the predicted frequency of the hth character in the current literal; Represents the frequency of the hth character in the current literal; Represents the frequency of the hth character of the current literal in the previous literal; || represents the absolute value symbol; max() represents the maximum value function; exp() represents the exponential function with a natural constant as the base; Represents the frequency fluctuation of the hth character in the current literal and its previous literal. The larger the value, the lower the reference degree of the hth character in the current literal. At this time, the frequency of the hth character in the current literal should be reduced to obtain the predicted frequency. Therefore, Negative correlation value pair The result is adjusted and then added to the frequency of the h-th character in the current literal to obtain the predicted frequency of the h-th character in the current literal; the maximum value function is used to prevent The value of is less than 0.
[0036] It should be noted that the predicted frequency of any character in the current literal represents the frequency of occurrence of this character in subsequent characters. If the frequency of occurrence of this character in the current literal is smaller than the predicted frequency of this character in the current literal, it is considered that the subsequent matching degree of the current literal is higher, that is, the matching preference degree of the current literal is greater.
[0037] In the embodiment of the present invention, the ratio of the predicted frequency of the h-th character in the current literal to the sum of the predicted frequencies of each character in the current literal is used as the corrected predicted frequency of the h-th character in the current literal; Get the matching preference of the current literal: ; In the formula, Represents the matching preference of the current literal; Represents the number of character types in the current literal; Represents the frequency of occurrence of the hth character in the current literal; Represents the corrected predicted frequency of the hth character of the current literal; The larger the value of , the less the frequency of the h-th character in the current literal matches the corrected predicted frequency of the h-th character in the current literal. Then, the smaller the probability of the current literal in subsequent matching is, and the lower the matching preference of the current literal is. The value of prevents the numerator from being zero; and The larger the value, the greater the matching preference of the current literal.
[0038] It should be noted that the greater the matching preference of the current literal and the frequency preference of the current literal, the easier it is for the previous literal to be matched subsequently, and the greater the preference of the current literal; the longer the length of the current literal is, the more computational effort is required to match the current literal, which means that the preference of the current literal is lower.
[0039] In this embodiment of the present invention, the preference level of the current literal is obtained: ; In the formula, Represents the preference level of the current literal; Represents the matching preference of the current literal; Represents the frequency preference of the current literal; Represents the length of the current literal. The longer the length of the current literal is, the more computation is required to match the current literal, which means that the current literal is less preferred. as well as The larger the value, the easier it is for the current literal to be matched later.
[0040] S4: After adjusting the basic length according to the current literal value preference, the remaining monitoring data is compressed and analyzed to obtain the final compressed data for transmission.
[0041] It should be noted that the known LZ4 compression algorithm traverses the original data to see whether there is a repeated character string that can match the current literal in the characters following the current literal. Therefore, the longer the basic length set in the LZ4 compression algorithm, the more difficult it is to match the current literal, which will make the current literal accumulate and become longer, affecting the algorithm compression performance. Therefore, the present invention adjusts the basic length according to the preference of the current literal so that the current literal can be matched as soon as possible. It is known that when the preference of the current literal is relatively large, it means that the current literal is easier to be matched subsequently, and there is no need to adjust the basic length at this time. If the preference of the current literal is relatively small, it means that the current literal is not easy to be matched subsequently. At this time, it is necessary to reduce the basic length and compress the remaining monitoring data.
[0042] In the embodiment of the present invention, the preferred degree threshold is obtained. , Represents the number of character types in the monitoring data. When the preference level of the current literal is less than the preference level threshold, the basic length is set to 5 to continue compressing the characters in the remaining monitoring data, and according to the analysis method of the current literal, the next literal is analyzed to obtain the final compressed data, and the final compressed data is transmitted, which improves the compression efficiency and thus improves the transmission efficiency.
[0043] An embodiment of the present invention also discloses a remote monitoring system for a natural convection constant temperature test chamber, including a processor and a memory, wherein the memory stores computer program instructions. When the computer program instructions are executed by the processor, a remote monitoring method for a natural convection constant temperature test chamber according to the present invention is implemented.
[0044] 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.
[0045] In the present invention, the aforementioned memory may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, a computer-readable storage medium may be any suitable magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory, a dynamic random access memory, a static random access memory, an enhanced dynamic random access memory, a high bandwidth memory, a hybrid storage cube, etc., or any other medium that can be used to store the required information and can be accessed by an application, a module, or both. Any such computer storage medium may be part of the device or accessible or connectable to the device.
[0046] 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.
[0047] 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 remote monitoring method for a natural convection constant temperature test chamber, characterized in that: Includes steps: Collect monitoring data; obtain the current literal value when compressing the monitoring data using the LZ4 compression algorithm; obtain the frequency preference of the current literal value ; Represents the length of the current literal; Represents the frequency of the jth character of the current literal in the monitoring data; Represents the frequency of the mth target character combination in the current literal; Represents the number of target character combinations of the current literal; Get the matching preference of the current literal ; Represents the number of character types in the current literal; Represents the frequency of occurrence of the hth character in the current literal; Represents the corrected predicted frequency of the hth character of the current literal; The preference level of the current literal is obtained according to the matching preference level and frequency preference level of the current literal; after adjusting the preset basic length according to the preference level of the current literal, the characters in the remaining monitoring data are compressed and transmitted.
2. A remote monitoring method for a natural convection constant temperature test chamber according to claim 1, characterized in that: The acquisition of the target character combination of the current literal includes: Preset the number of consecutive characters N, record any N consecutive characters in the current literal as a character combination of the current literal, obtain several character combinations of the current literal, multiply the frequencies of the characters in each character combination of the current literal and raise them to the Nth power to obtain the frequency degree of each character combination of the current literal; if the frequency degree of any character combination of the current literal is greater than , Represents the number of character types in the monitoring data, and records the character combination of the current literal as the target character combination of the current literal.
3. A remote monitoring method for a natural convection constant temperature test chamber according to claim 1, characterized in that: The acquisition of the modified predicted frequency of the hth character of the current literal includes: Obtain the predicted frequency of each character in the current literal; and use the ratio of the predicted frequency of the hth character in the current literal to the sum of the predicted frequencies of each character in the current literal as the corrected predicted frequency of the hth character in the current literal.
4. A remote monitoring method for a natural convection constant temperature test chamber according to claim 3, characterized in that: The step of obtaining the predicted frequency of each character in the current literal includes: ; In the formula, Represents the predicted frequency of the hth character in the current literal; Represents the frequency of the hth character in the current literal; Represents the frequency of the hth character of the current literal in the previous literal; || represents the absolute value symbol; max() represents the maximum value function; exp() represents the exponential function with a natural constant as the base.
5. A remote monitoring method for a natural convection constant temperature test chamber according to claim 1, characterized in that: The obtaining of the preference level of the current literal value includes: ; In the formula, Represents the preference level of the current literal; Represents the matching preference of the current literal; Represents the frequency preference of the current literal; Represents the length of the current literal.
6. A remote monitoring method for a natural convection constant temperature test chamber according to claim 1, characterized in that: The method of compressing and transmitting the characters in the remaining monitoring data after adjusting the preset basic length according to the preference level of the current literal amount includes: Get the priority threshold , Represents the number of character types in the monitoring data. When the preference level of the current literal is less than the preference level threshold, the basic length is set to 5 to continue compressing the characters in the remaining monitoring data, and the next literal is analyzed according to the analysis method of the current literal to obtain the final compressed data, which is then transmitted.
7. A remote monitoring method for a natural convection constant temperature test chamber according to claim 1, characterized in that: The current literal value is obtained when the monitoring data is compressed using the LZ4 compression algorithm, including: The preset basic length is V, the literal length is L, and when the monitoring data is compressed using the LZ4 compression algorithm, the literal with a length greater than L is recorded as the current literal.
8. A remote monitoring system for a natural convection constant temperature test chamber, 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 remote monitoring method for a natural convection constant temperature test chamber according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Data compression method, data compression device, computer equipment and storage medium
CN115208414A
Temperature monitoring big data transmission method
CN117076408A
Numeric data compression method and computing device
WO2024193243A1