A method and system for compressing and storing industrial process data, and a method and system for decompressing the same

By using nonlinear curve functions to replace the linear gate of the rotary door compression algorithm in industrial process data storage, the low-quality compression problem caused by the rotary door compression algorithm in nonlinear data fluctuations is solved, and more efficient data storage and decompression effects are achieved.

CN114006618BActive Publication Date: 2025-07-22XIAN THERMAL POWER RES INST CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111277563.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-29
Publication Date
2025-07-22
Estimated Expiration
2041-10-29

AI Technical Summary

Technical Problem

The existing revolving door compression algorithms are prone to low-quality compression in industrial process data storage, and cannot effectively adapt to nonlinear data fluctuations, affecting the decompression effect.

Method used

The curve gate is constructed using nonlinear curve functions to replace the linear gate in the traditional revolving door compression algorithm. By combining one or two cluster functions, the opening degree of the curve gate is determined according to the data fluctuation characteristics and compression requirements, and data compression storage is realized.

Benefits of technology

It improves the quality of data compression, avoids the problem of low-quality compression, meets the compression ratio and mean square error requirements of practical applications, and provides more efficient data storage and decompression methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114006618B_ABST
    Figure CN114006618B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for compressed storage of industrial process data, as well as a decompression method and system. The compressed storage method includes: sequentially obtaining the industrial process data to be compressed and stored to form a processing queue; when performing compressed storage on the data in the processing queue, the first piece of data is stored by default; for the remaining data, a curve gate is constructed with the previous stored value as the left center point, the function parameters corresponding to the upper and lower curve gates are calculated and compared to determine the opening degree of the curve gate, and it is decided whether to store the last piece of data before the currently processed data, thereby realizing data compressed storage based on a rotating curve gate. In the present invention, by selecting a non-linear curve function to construct the curve gate, it can replace the straight gate in the traditional rotating gate compression algorithm, and can avoid the low-quality compression problem caused by using linear compression.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of data compression, specifically relates to the field of industrial process data compression, and particularly relates to a method and system for compressing and storing industrial process data, and a method and system for decompressing the same. Background Art

[0002] In many industrial production fields, in order to achieve accurate monitoring and control of the production process and equipment status, a large number of sensors often need to be arranged; today, with the booming development of big data technology, the massive data generated in the industrial production process has attracted more and more attention from professionals in the field, and it is hoped to obtain effective knowledge in directions such as optimizing the production process, warning of equipment failures, and improving energy efficiency through various data mining means.

[0003] Based on the above background, the large-scale storage of industrial process data has become increasingly necessary, and the application of real-time databases has also become more and more extensive. However, in the case where the scale of sensors is getting larger and the acquisition interval is getting shorter, if the collected data is directly stored in the real-time database without compression, it will often quickly consume a large amount of storage resources, and inevitably include a lot of low-quality data, resulting in a waste of storage resources. Therefore, how to achieve effective compression and storage of industrial process data and minimize the consumption of storage materials while ensuring the compression quality is very necessary.

[0004] Currently, a series of process data compression and storage methods have emerged in the industrial production field, and quite a number of them have been applied and verified in practice; among them, the most important is the swing door compression algorithm and some improved algorithms implemented on its basis. The variable parameter of the swing door compression algorithm is only the threshold width. By analyzing the fluctuation characteristics of the data itself and selecting an appropriate threshold width, relatively efficient compression of process data can be achieved. This method has simple compression and decompression logic and high execution efficiency, and has been widely used in real-time databases. Some improved algorithms implemented on the basis of the swing door compression algorithm mainly focus on the determination or adaptive adjustment of the threshold width to make the threshold width continuously adapt to the data and obtain better compression effects.

[0005] However, these existing algorithms based on swing door compression are fundamentally based on linear functions to fit the original data. During the compression process, one linear channel after another is continuously constructed and truncated when exceeding the channel range; in practice, not all process data approximately follows linear fluctuations. At this time, if a linear compression and storage method is still used, it is easy to cause a significant reduction in the decompression effect, thereby affecting the later use of the data. Therefore, there is an urgent need for a new method for real-time compression and storage of industrial process data. Summary of the Invention

[0006] The object of the present invention is to provide a method and system for compressing and storing industrial process data, as well as a method and system for decompressing the same, so as to solve one or more of the above-mentioned technical problems. In the present invention, a non-linear curve function is selected to construct a curve gate, which can replace the straight gate in the traditional rotating gate compression algorithm, and can avoid the low-quality compression problem caused by using linear compression.

[0007] To achieve the above object, the present invention adopts the following technical solutions:

[0008] A method for compressing and storing industrial process data according to the present invention includes the following steps:

[0009] Obtain the industrial process data to be compressed and stored one by one to form a processing queue;

[0010] When compressing and storing the data in the processing queue, the first piece of data is stored by default; for the remaining data, a curve gate is constructed with the previous stored value as the left center point, the function parameters corresponding to the upper and lower curve gates are calculated and compared, the opening degree of the curve gate is determined, and it is decided whether to store the last piece of data before the current processed data, so as to realize data compression and storage based on the rotating curve gate; wherein, the curve gate is constructed by a cluster of functions or a combination of two clusters of functions; a cluster of functions or a combination of two clusters of functions is selected based on the fluctuation characteristics of the industrial process data to be compressed and stored in combination with the requirements for the compression ratio or the decompression mean square error.

[0011] A further improvement of the present invention is that the step of obtaining the industrial process data to be compressed and stored one by one to form a processing queue specifically includes:

[0012] Input the signals generated by the sensors in the preset industrial field into the computer through the sampling device or the bus interface to form digital quantities; wherein, the sensors are sensors arranged for monitoring the operating conditions of the equipment or system; the digital quantities are continuously generated at a fixed sampling frequency;

[0013] Queue the digital quantities in the time order of the data collected first at the front and the data collected later at the back to form a processing queue.

[0014] A further improvement of the present invention is that the function form of the cluster of functions is y = f a (x) + b; where y is the dependent variable, x is the independent variable, a and b are function parameters, and f a (x) represents a function with a as the only parameter; the function has monotonicity in the interval x ∈ [0, +∞); the function has an intersection with the y-axis; the function is not the linear function y = ax + b; assume that the intersection of the function and the y-axis is fixed, and x is fixed as any value x0 greater than 0. When the y value corresponding to this x0 continuously changes between (-∞, +∞), the parameter a monotonically increases or decreases with y within its domain.

[0015] A further improvement of the present invention lies in that when compressing and storing the data in the processing queue, the first piece of data is stored by default; for the remaining data, a curve gate is constructed with the previous stored value as the left center point, the function parameters corresponding to the upper and lower curve gates are calculated and compared, the opening degree of the curve gate is determined, and it is decided whether to store the last piece of data before the current processed data. The specific steps for realizing data compression storage based on a rotating curve gate include:

[0016] Step 1: Obtain a piece of collected data as the data to be processed;

[0017] Step 2: Determine whether there is a stored value before the data to be processed obtained in Step 1. If not, directly store the data to be processed obtained in Step 1, and set the initial parameter a of the upper curve gate up , set the initial parameter a of the lower curve gate down , and then jump to execute Step 1; if so, jump to execute Step 3; where, when a decreases monotonically with y, a up = +∞, a down = -∞; when a increases monotonically with y, a up = -∞, a down = +∞;

[0018] Step 3: Assume that the coordinates of the previous stored value in the rectangular coordinate system are (0, y p ), y p represents its value, the left endpoint coordinates of the upper curve gate are (0, y p + δ), the left endpoint coordinates of the lower curve gate are (0, y p - δ), δ > 0, and the coordinates of the current data to be processed are (x1, y1); substitute the two points (0, y p + δ), (x1, y1) into y = f a (x) + b to obtain the parameter a up_new of the upper curve gate, substitute the two points (0, y p - δ), (x1, y1) into y = f a (x) + b to obtain the parameter a down_new of the lower curve gate, and then jump to execute Step 4; where, x1 is the quotient obtained by dividing the difference between the acquisition time of the current data to be processed and the acquisition time of the previous stored value by the sampling interval;

[0019] Step 4: Make a judgment based on the parameters obtained in Step 3, update the parameters based on the judgment result, and jump to execute Step 5 after the update; where, the steps of making a judgment based on the parameters obtained in Step 3 and updating the parameters based on the judgment result specifically include: when a increases monotonically with y, if a up_new > a up , then a up is updated to aup_new , otherwise, a up remains unchanged; if a down_new < a down , then a down is updated to a down_new , otherwise, a down remains unchanged; when a decreases monotonically with y, if a up_new < a up , then a up is updated to a up_new , otherwise, a up remains unchanged; if a down_new > a down , then a down is updated to a down_new , otherwise, a down remains unchanged;

[0020] Step 5, when a increases monotonically with y, if a up > a down , then store the data to be confirmed for storage DATA pending , and reset the initial parameter a of the upper curve gate up = -∞, set the initial parameter a of the lower curve gate down = +∞, use the current data to be processed as the new data to be processed again, jump to execute Step 3, otherwise, update the data to be confirmed for storage DATA pending to the current data to be processed, and jump to execute Step 1;

[0021] When a decreases monotonically with y, if a up < a down , then store the data to be confirmed for storage DATA pending , and reset the initial parameter a of the upper curve gate up = +∞, set the initial parameter a of the lower curve gate down = -∞, use the current data to be processed as the new data to be processed again, jump to execute Step 3, otherwise, update the data to be confirmed for storage DATA pending to the current data to be processed, and jump to execute Step 1.

[0022] A further improvement of the present invention lies in that the combination of the two clusters of functions includes a first function and a second function;

[0023] Both the first function and the second function have the following properties: the function form is y = f a (x) + b; where y is the dependent variable, x is the independent variable, a and b are function parameters, and f a (x) represents a function with a as the only parameter; the function is monotonic in the interval x ∈ [0, +∞); the function has an intersection with the y-axis; the function is not a linear function y = ax + b;

[0024] The first function is monotonically increasing in the interval x ∈ [0, +∞), and the second function is monotonically decreasing in the interval x ∈ [0, +∞).

[0025] Let the intersection point of the first function and the y-axis be fixed at (0, y0), and let x be fixed at any value x0 greater than 0. When the y-value corresponding to this x0 continuously changes between (y0, +∞), the parameter a monotonically increases or decreases with y within its domain; Let the intersection point of the second function and the y-axis be fixed at (0, y0), and let x be fixed at any value x0 greater than 0. When the y-value corresponding to this x0 continuously changes between (-∞, y0), the parameter a monotonically increases or decreases with y within its domain.

[0026] A further improvement of the present invention lies in that when compressing and storing the data in the processing queue, the first piece of data is stored by default; for the remaining data, a curve gate is constructed with the previous stored value as the left center point, the function parameters corresponding to the upper and lower curve gates are calculated and compared, the opening degree of the curve gate is determined, and it is decided whether to store the last piece of data before the currently processed data. The steps for realizing data compression storage based on a rotating curve gate specifically include:

[0027] Step 1, obtain a piece of collected data as the data to be processed;

[0028] Step 2, determine whether there is a stored value before the data to be processed obtained in Step 1: If not, directly store the data to be processed obtained in Step 1, and set the initial parameter a of the upper curve gate with an upward trend up_asc , set the initial parameter a of the lower curve gate with an upward trend down_asc , set the initial parameter a of the upper curve gate with a downward trend up_desc , set the initial parameter a of the lower curve gate with a downward trend down_desc , and then jump to execute Step 1; if there is, jump to execute Step 3; among them, when the first function satisfies that a decreases monotonically with y, a up_asc = +∞, a down_asc = -∞; when the first function satisfies that a increases monotonically with y, a up_asc = -∞, a down_asc = +∞; when the second function satisfies that a decreases monotonically with y, a up_desc = +∞, a down_desc = -∞; when the second function satisfies that a increases monotonically with y, a up_desc = -∞, a down_desc = +∞;

[0029] Step 3, assume that the coordinates of the previous stored value in the rectangular coordinate system are (0, y p ), y p represents its value, and the left endpoint coordinates of the upper curve gate are (0, yp +δ), the left endpoint coordinate of the lower curve gate is (0, y p -δ), δ > 0, the coordinate of the currently to-be-processed data is (x1, y1), and x1 is the quotient obtained by dividing the difference between the acquisition time of the currently to-be-processed data and the acquisition time of the previous stored value by the sampling interval; it is processed in three cases according to the value of y1:

[0030] If y p -δ < y1 < y p +δ, substitute the two points (0, y p +δ) and (x1, y1) into the second function to obtain the upper curve gate parameter a of the descending trend up_desc_new , substitute the two points (0, y p -δ) and (x1, y1) into the first function to obtain the lower curve gate parameter a of the ascending trend down_asc_new , and then jump to execute step 4;

[0031] If y1 < y p -δ, substitute the two points (0, y p +δ) and (x1, y1) into the second function to obtain the upper curve gate parameter a of the descending trend up_desc_new , substitute the two points (0, y p -δ) and (x1, y1) into the second function to obtain the lower curve gate parameter a of the descending trend down_desc_new , and then jump to execute step 4;

[0032] If y1 > y p +δ, substitute the two points (0, y p +δ) and (x1, y1) into the first function to obtain the upper curve gate parameter a of the ascending trend up_asc_new , substitute the two points (0, y p -δ) and (x1, y1) into the first function to obtain the lower curve gate parameter a of the ascending trend down_asc_new , and then jump to execute step 4;

[0033] Step 4, make a judgment based on the parameters obtained in step 3, update the parameters based on the judgment result, and then jump to execute step 5; among them, the steps of making a judgment based on the parameters obtained in step 3 and updating the parameters based on the judgment result specifically include:

[0034] When the first function satisfies that a increases monotonically with y, if a up_asc_new > a up_asc , then a up_asc is updated to a up_asc_new , otherwise, a up_asc remains unchanged; if a down_asc_new < a down_asc , then a down_asc is updated to adown_asc_new , otherwise, a down_asc remains unchanged; when the first function satisfies that a decreases monotonically with y, if a up_asc_new < a up_asc , then a up_asc is updated to a up_asc_new , otherwise, a up_asc remains unchanged; if a down_asc_new > a down_asc , then a down_asc is updated to a down_asc_new , otherwise, a down_asc remains unchanged; when the second function satisfies that a increases monotonically with y, if a up_desc_new > a up_desc , then a up_desc is updated to a up_desc_new , otherwise, a up_desc remains unchanged; if a down_desc_new < a down_desc , then a down_desc is updated to a down_desc_new , otherwise, a down_desc remains unchanged; when the second function satisfies that a decreases monotonically with y, if a up_desc_new < a up_desc , then a up_desc is updated to a up_desc_new , otherwise, a up_desc remains unchanged; if a down_desc_new > a down_desc , then a down_desc is updated to a down_desc_new , otherwise, a down_desc remains unchanged; for the parameters not obtained in step 3, the original values are maintained without update;

[0035] Step 5, if a up_asc , a down_asc , a up_desc , a down_desc are all not equal to the initial values set in step 2, then store the data to be confirmed DATA pending , and reset the initial parameter a of the upper curve gate in the rising trend up_asc , set the initial parameter a of the lower curve gate in the rising trend down_asc , set the initial parameter a of the upper curve gate in the falling trend up_desc , set the initial parameter a of the lower curve gate in the falling trend down_desc , take the current data to be processed as the new data to be processed again, and jump to execute step 3;

[0036] If a up_asc and a down_desc are both equal to the initial values set in step 2, then do not trigger the storage instruction, and the data to be confirmed and stored DATApending Update to the current data to be processed, and jump to execute Step 1;

[0037] If none of the above conditions are met, and a up_asc and a down_asc are not equal to the initial values set in Step 2, it is necessary to judge whether to store: When the first function satisfies that a increases monotonically with y, if a up_asc > a down_asc , then store the data to be confirmed for storage DATA pending , and reset the initial parameter a of the upper curve gate of the rising trend up_asc , set the initial parameter a of the lower curve gate of the rising trend down_asc , set the initial parameter a of the upper curve gate of the falling trend up_desc , set the initial parameter a of the lower curve gate of the falling trend down_des□ , use the current data to be processed as the new data to be processed again, jump to execute Step 3, otherwise, update the data to be confirmed for storage DATA pending to the current data to be processed, and jump to execute Step 1; When the first function satisfies that a decreases monotonically with y, if a up_asc < a down_asc , then store the data to be confirmed for storage DATA pending , and reset the initial parameter a of the upper curve gate of the rising trend up_asc , set the initial parameter a of the lower curve gate of the rising trend down_asc , set the initial parameter a of the upper curve gate of the falling trend up_desc , set the initial parameter a of the lower curve gate of the falling trend down_desc , use the current data to be processed as the new data to be processed again, jump to execute Step 3, otherwise, update the data to be confirmed for storage DATA pending to the current data to be processed, and jump to execute Step 1;

[0038] If none of the above conditions are met, and a up_desc and a down_desc are not equal to the initial values set in Step 2, it is necessary to judge whether to store: When the second function satisfies that a increases monotonically with y, if a up_desc > a down_desc , then store the data to be confirmed for storage DATA pending , and reset the initial parameter a of the upper curve gate of the rising trend up_asc , set the initial parameter a of the lower curve gate of the rising trend down_asc , set the initial parameter a of the upper curve gate of the falling trend up_desc , set the initial parameter a of the lower curve gate of the falling trend down_desc, use the current data to be processed as the new data to be processed, jump to step 3 for execution. Otherwise, set the data to be stored and confirmed, DATA pending Update it to the current data to be processed, and jump to step 1 for execution; when the second function satisfies that a decreases monotonically with y, if a up_desc <a down_desc , then store the data to be stored and confirmed, DATA pending , and reset the initial parameter a of the upper curve gate of the rising trend up_asc , set the initial parameter a of the lower curve gate of the rising trend down_asc , set the initial parameter a of the upper curve gate of the falling trend up_desc , set the initial parameter a of the lower curve gate of the falling trend down_desc , use the current data to be processed as the new data to be processed, jump to step 3 for execution. Otherwise, set the data to be stored and confirmed, DATA pending Update it to the current data to be processed, and jump to step 1 for execution;

[0039] Among them, when setting the initial parameters, when the first function satisfies that a decreases monotonically with y, a up_asc =+∞, a down_asc =-∞; when the first function satisfies that a increases monotonically with y, a up_asc =-∞, a down_asc =+∞; when the second function satisfies that a decreases monotonically with y, a up_desc =+∞, a down_desc =-∞; when the second function satisfies that a increases monotonically with y, a up_desc =-∞, a down_desc =+∞.

[0040] A decompression method for industrial process data according to the present invention, based on the above compression storage method of the present invention, includes the following steps:

[0041] Step 1, obtain the requirements for the decompressed data, including: start time τ start 、end time τ end 、time interval τ0 of the decompressed data;

[0042] Step 2, starting from τ start , complete the decompression of the data at each moment at an interval of τ0 until the time is later than τ end Stop when; among them, when completing the decompression of the data at each moment, for any moment to be decompressed, assume that the coordinates of the decompressed data at this moment are (x n , y n ), x n Take the quotient of the difference between the current moment to be decompressed and the acquisition time of the previous storage point divided by the sampling interval. The coordinates of the previous storage point are (0, y prev ), and the coordinates of the next storage point are (xnext , y next ), x next The quotient obtained by dividing the difference between the time when the storage point is taken and the acquisition time of the previous storage point by the sampling interval;

[0043] If a cluster of functions y = f a (x) + b is selected to construct the curve gate during compression, with (0, y prev ), (x next , y next ) substituted into y = f a (x) + b to obtain the parameters a and b, and then substituting x n into the function to obtain the corresponding y n ;

[0044] If a combination of two clusters of functions is selected to construct the curve gate during compression, a judgment is required. If y next > y prev , then (0, y prev ), (x next , y next ) are substituted into the first function to obtain the parameters a and b, and then x n is substituted into the first function to obtain the corresponding y n . If y next < y prev , then (0, y prev ), (x next , y next ) are substituted into the second function to obtain the parameters a and b, and then x n is substituted into the second function to obtain the corresponding y n .

[0045] An industrial process data compression storage system of the present invention includes:

[0046] An acquisition module for acquiring industrial process data to be compressed and stored;

[0047] A compression storage module for, when compressing and storing the industrial process data to be compressed and stored, defaulting to storing the first piece of data, sequentially acquiring the data to be stored starting from the previous stored value, sequentially calculating and comparing the function parameters corresponding to the upper and lower curve gates, determining the opening degree of the curve gate, and deciding whether to store the previous piece of data to be stored; wherein, the curve gate is constructed by a cluster of functions or a combination of two clusters of functions, and the cluster of functions or the combination of two clusters of functions is selected based on the fluctuation characteristics of the industrial process data to be compressed and stored.

[0048] An industrial process data decompression system of the present invention, based on the above decompression method of the present invention, includes:

[0049] An acquisition module for acquiring requirements for the decompressed data, including: start time τ start , end time τ end , and time interval τ0 for decompressing the data;

[0050] A decompression module for starting from τ start and completing the decompression of the data at each moment at an interval of τ0 until the time is later than τ end ; when completing the decompression of the data at each moment, for any moment to be decompressed, let the coordinates of the decompressed data at this moment be (x n , y n ), x n is the quotient obtained by dividing the difference between the current moment to be decompressed and the acquisition time of the previous storage point by the sampling interval. The coordinates of the previous storage point are (0, y prev ), and the coordinates of the next storage point are (x next , y next ), x next is the quotient obtained by dividing the difference between the moment of this storage point and the acquisition time of the previous storage point by the sampling interval;

[0051] If a cluster of functions y = f a (x) + b is selected to construct the curve gate during compression, substituting the two points (0, y prev ), (x next , y next ) into y = f a (x) + b to obtain the parameters a and b, and then substituting x n into the function to obtain the corresponding y n ;

[0052] If a combination of two clusters of functions is selected to construct the curve gate during compression, it is necessary to make a judgment. If y next > y prev , then substitute the two points (0, y prev ), (x next , y next ) into the first function to obtain the parameters a and b, and then substitute x n into the first function to obtain the corresponding y n . If y next < y prev , then substitute the two points (0, y prev ), (x next , y next ) into the second function to obtain the parameters a and b, and then substitute x n into the second function to obtain the corresponding y n .

[0053] Compared with the prior art, the present invention has the following beneficial effects:

[0054] In the method of the present invention, a curve gate is constructed by selecting a non-linear function, which can replace the straight gate in the traditional rotating gate compression algorithm. Essentially, it changes the linear fitting in the rotating gate compression algorithm to non-linear fitting. Compared with the existing compression or decompression technologies in this field, on the one hand, it opens up another path for realizing industrial process data compression, that is, the data compression method based on non-linear functions. Based on this method, within the range of non-linear functions or function combinations that meet the specified conditions, the most suitable function or function combination can be selected according to requirements to realize data compression or decompression, avoiding some low-quality compression problems caused by blindly using linear compression. On the other hand, the method of the present invention also provides a method of starting from the compression or decompression index requirements of practical applications and selecting the function or function combination that best conforms to the data characteristics to realize data compression or decompression on the basis of meeting the index requirements.

[0055] In the system of the present invention, a curve gate is constructed by selecting a non-linear function, which can replace the straight gate in the traditional rotating gate compression algorithm. Essentially, it changes the linear fitting in the rotating gate compression algorithm to non-linear fitting. Compared with the existing compression or decompression technologies in this field, on the one hand, it opens up another path for realizing industrial process data compression, that is, the data compression method based on non-linear functions. Based on this method, within the range of non-linear functions or function combinations that meet the specified conditions, the most suitable function or function combination can be selected according to requirements to realize data compression or decompression, avoiding some low-quality compression problems caused by blindly using linear compression. On the other hand, the system of the present invention also provides a method of starting from the compression or decompression index requirements of practical applications and selecting the function or function combination that best conforms to the data characteristics to realize data compression or decompression on the basis of meeting the index requirements. Brief Description of the Drawings

[0056] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following briefly introduces the drawings required for the description of the embodiments or the prior art; obviously, the following drawings are some embodiments of the present invention, and those of ordinary skill in the art can also obtain other drawings based on these drawings without creative efforts.

[0057] Figure 1 It is a schematic flowchart of a method for compressing and storing industrial process data according to an embodiment of the present invention;

[0058] Figure 2 It is a schematic diagram of the process of compression using a curve gate constructed by selecting a cluster of functions in an embodiment of the present invention;

[0059] Figure 3 It is a schematic diagram of the process of compression using a curve gate constructed by selecting a combination of two clusters of functions in an embodiment of the present invention. Detailed Embodiments

[0060] In order to enable those skilled in the art of this technology to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the scope of protection of the present invention.

[0061] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned accompanying drawings are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that such data used in this way can be interchanged under appropriate circumstances so that the embodiments of the present invention described here can be implemented in an order different from those illustrated or described here. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0062] The present invention will be further described in detail below with reference to the accompanying drawings:

[0063] A method for compressing and storing industrial process data according to an embodiment of the present invention specifically includes:

[0064] Step 101, obtaining the industrial process data to be compressed and stored one by one to form a processing queue; specifically, it may include: inputting the signals generated by sensors (such as temperature sensors, pressure sensors, vibration sensors, etc.) arranged in industrial fields such as power generation, chemical industry, and metallurgy for monitoring the operation status of equipment or systems into a computer through a sampling device or a bus interface to form digital quantities. The digital quantities are continuously generated at a fixed sampling frequency and queued in the processing queue in chronological order, with the data collected first in the front and the data collected later in the back.

[0065] Step 102, implementing the data compression process: when compressing and storing the data in the processing queue, the first piece of data is stored by default; for the remaining data, a curve gate is constructed with the previous stored value as the left center point, the function parameters corresponding to the upper and lower curve gates are calculated and compared, the opening degree of the curve gate is determined, and it is decided whether to store the last piece of data before the currently processed data, so as to realize data compression and storage based on a rotating curve gate; wherein, the curve gate is constructed by a cluster of functions or a combination of two clusters of functions; a cluster of functions or a combination of two clusters of functions is selected based on the fluctuation characteristics of the industrial process data to be compressed and stored in combination with the requirements for the compression ratio or the decompression mean square error. The process is referred toFigure 1 。

[0066] In an embodiment of the present invention, the functional form of the cluster of functions is y = f a (x) + b; where y is the dependent variable, x is the independent variable, a and b are function parameters, and f a (x) represents a function with a as the only parameter; the function is monotonic in the interval x ∈ [0, +∞); the function has an intersection with the y-axis; the function is not a linear function y = ax + b; assuming that the intersection of the function with the y-axis is fixed and x is fixed at any value x0 greater than 0, when the y value corresponding to this x0 continuously changes between (-∞, +∞), the parameter a increases or decreases monotonically with y within its domain. For example, y = ax 2 + b is a function that meets the above requirements.

[0067] In an embodiment of the present invention, when the curve gate constructed by a cluster of functions is used to compress and store the data in the processing queue, the first piece of data is stored by default; for the remaining data, a curve gate is constructed with the previous stored value as the left center point, the function parameters corresponding to the upper and lower curve gates are calculated and compared to determine the opening degree of the curve gate, and it is decided whether to store the last piece of data before the currently processed data, realizing data compression storage based on a rotating curve gate. The steps specifically include:

[0068] Step 201, obtain a piece of collected data as the data to be processed;

[0069] Step 202, determine whether there is a stored value before the data to be processed obtained in step 201: if not, directly store the data to be processed obtained in step 201, and set the initial parameter a of the upper curve gate up , set the initial parameter a of the lower curve gate down , and then jump to execute step 201; if so, jump to execute step 203; where, when a decreases monotonically with y, a up = +∞, a down = -∞; when a increases monotonically with y, a up = -∞, a down = +∞;

[0070] Step 203, assume that the coordinates of the previous stored value in the rectangular coordinate system are (0, y p ), y p represents its value, the left endpoint coordinates of the upper curve gate are (0, y p + δ), the left endpoint coordinates of the lower curve gate are (0, y p - δ), δ > 0, and the coordinates of the current data to be processed are (x1, y1); substitute the two points (0, y p + δ), (x1, y1) into y = f a (x) + b to obtain the parameter a of the upper curve gateup_new , with (0, y p -δ), (x1, y1) two points substituted into y = f a (x) + b, obtain the parameter a of the lower curve gate down_new , and then jump to execute step 204; where, x1 takes the quotient of the difference between the acquisition time of the currently to-be-processed data and the acquisition time of the previous stored value divided by the sampling interval;

[0071] Step 204, make a judgment based on the parameter obtained in step 203, update the parameter based on the judgment result, and after the update, jump to execute step 205; where, the steps of making a judgment based on the parameter obtained in step 203 and updating the parameter based on the judgment result specifically include: when a is monotonically increasing with y, if a up_new > a up , then a up is updated to a up_new , otherwise, a up remains unchanged; if a down_new < a down , then a down is updated to a down_new , otherwise, a down remains unchanged; when a is monotonically decreasing with y, if a up_new < a up , then a up is updated to a up_new , otherwise, a up remains unchanged; if a down_new > a down , then a down is updated to a down_new , otherwise, a down remains unchanged;

[0072] Step 205, when a is monotonically increasing with y, if a up > a down , then store the to-be-confirmed storage data DATA pending , and reset the initial parameter a of the upper curve gate up = -∞, set the initial parameter a of the lower curve gate down = +∞, take the currently to-be-processed data as the new to-be-processed data again, jump to execute step 203, otherwise, update the to-be-confirmed storage data DATA pending to the currently to-be-processed data, and jump to execute step 201;

[0073] When a is monotonically decreasing with y, if a up < a down , then store the to-be-confirmed storage data DATA pending , and reset the initial parameter a of the upper curve gate up= +∞, set the initial parameter a of the lower curve gate down = -∞, use the current data to be processed as the new data to be processed, and jump to execute step 203. Otherwise, set the data DATA to be confirmed and stored pending Update it to the current data to be processed, and jump to execute step 201.

[0074] In the embodiments of the present invention, the combination of the two clusters of functions includes a first function and a second function;

[0075] Both the first function and the second function have the following properties: the function form is y = f a (x) + b; where y is the dependent variable, x is the independent variable, a and b are function parameters, and f a (x) represents a function with a as the only parameter; the function is monotonic in the interval x ∈ [0, +∞); the function has an intersection with the y-axis; the function is not a linear function y = ax + b;

[0076] The first function is monotonically increasing in the interval x ∈ [0, +∞), and the second function is monotonically decreasing in the interval x ∈ [0, +∞);

[0077] Let the intersection of the first function and the y-axis be fixed at (0, y0), and x be fixed at any value x0 greater than 0. When the y value corresponding to this x0 continuously changes between (y0, +∞), the parameter a increases or decreases monotonically with y within its domain; let the intersection of the second function and the y-axis be fixed at (0, y0), and x be fixed at any value x0 greater than 0. When the y value corresponding to this x0 continuously changes between (-∞, y0), the parameter a increases or decreases monotonically with y within its domain.

[0078] For example, the first function is selected as y = log a (x + 1) + b, where a > 1, and the second function is selected as y = log a (x + 1) + b, where 0 < a < 1, which is a function combination that meets the requirements. Or the first function is selected as y = b + a x , where a > 1,

[0079] The second function is selected as y = b - a x , where a > 1, which is also a function combination that meets the requirements.

[0080] In the embodiments of the present invention, when the curve gate constructed by using the combination of two clusters of functions compresses and stores the data in the processing queue, the first piece of data is stored by default; for the remaining data, a curve gate is constructed with the previous stored value as the left center point, the function parameters corresponding to the upper and lower curve gates are calculated and compared, the opening degree of the curve gate is determined, and it is decided whether to store the last piece of data before the current processed data, so as to realize data compression storage based on the rotating curve gate. The steps specifically include:

[0081] Step 301: Obtain a piece of collected data as the data to be processed;

[0082] Step 302: Determine whether there is a stored value before the data to be processed obtained in Step 301. If not, directly store the data to be processed obtained in Step 301, and set the initial parameter a of the upper curve gate for the upward trend up_asc , set the initial parameter a of the lower curve gate for the upward trend down_asc , set the initial parameter a of the upper curve gate for the downward trend up_desc , set the initial parameter a of the lower curve gate for the downward trend down_desc , and then jump to execute Step 301. If there is, jump to execute Step 303. Among them, when the first function satisfies that a decreases monotonically with y, a up_asc = +∞, a down_asc = -∞; when the first function satisfies that a increases monotonically with y, a up_asc = -∞, a down_asc = +∞; when the second function satisfies that a decreases monotonically with y, a up_desc = +∞, a down_desc = -∞; when the second function satisfies that a increases monotonically with y, a up_desc = -∞, a down_desc = +∞;

[0083] Step 303: Assume that the coordinates of the previous stored value in the rectangular coordinate system are (0, y p ), where y p represents its value. The left endpoint coordinates of the upper curve gate are (0, y p + δ), and the left endpoint coordinates of the lower curve gate are (0, y p - δ), where δ > 0. The coordinates of the current data to be processed are (x1, y1), and x1 is the quotient obtained by dividing the difference between the acquisition time of the current data to be processed and the acquisition time of the previous stored value by the sampling interval. Process according to three cases based on the value of y1:

[0084] If y p - δ < y1 < y p + δ, substitute the two points (0, y p + δ) and (x1, y1) into the second function to obtain the parameter a of the upper curve gate for the downward trend up_desc_new , substitute the two points (0, y p - δ) and (x1, y1) into the first function to obtain the parameter a of the lower curve gate for the upward trend down_asc_new , and then jump to execute Step 304;

[0085] If y1 < y p - δ, substitute (0, y pSubstitute the two points \((0,y + \delta)\) and \((x1,y1)\) into the second function to obtain the parameter \(a\) of the upper curve of the downward trend up_desc_new , with \((0,y p - \delta)\) and \((x1,y1)\) substituted into the second function to obtain the parameter \(a\) of the lower curve of the downward trend down_desc_new , then jump to execute step 304;

[0086] If \(y1 > y p + \delta\), substitute \((0,y p + \delta)\) and \((x1,y1)\) into the first function to obtain the parameter \(a\) of the upper curve of the upward trend up_asc_new , with \((0,y p - \delta)\) and \((x1,y1)\) substituted into the first function to obtain the parameter \(a\) of the lower curve of the upward trend down_asc_new , then jump to execute step 304;

[0087] Step 304: Make a judgment based on the parameters obtained in step 303, update the parameters based on the judgment result, and then jump to execute step 305 after the update; among them, the steps of making a judgment based on the parameters obtained in step 303 and updating the parameters based on the judgment result specifically include:

[0088] When the first function satisfies that \(a\) increases monotonically with \(y\), if \(a up_asc_new > a up_asc , then \(a up_asc is updated to \(a up_asc_new , otherwise, \(a up_asc remains unchanged; if \(a down_asc_new < a down_asc , then \(a down_asc is updated to \(a down_asc_new , otherwise, \(a down_asc remains unchanged; when the first function satisfies that \(a\) decreases monotonically with \(y\), if \(a up_asc_new < a up_asc , then \(a up_asc is updated to \(a up_asc_new , otherwise, \(a up_asc remains unchanged; if \(a down_asc_new > a down_asc , then \(a down_asc is updated to \(a down_asc_new , otherwise, \(a down _ asc remains unchanged; when the second function satisfies that \(a\) increases monotonically with \(y\), if \(a up_desc_new > a up_desc , then \(a up_desc is updated to \(a up_desc_new , otherwise, \(a up_desc remains unchanged; if \(a down_desc_new < a down_desc , then \(adown_desc Update to a down_desc_new , otherwise, a down_desc Remain unchanged; when the second function satisfies that a decreases monotonically with y, if a up_desc_new < a up_desc , then a up_desc Update to a up_desc_new , otherwise, a up_desc Remain unchanged; if a down_desc_new > a down_desc , then a down_desc Update to a down_desc_new , otherwise, a down_desc Remain unchanged; for the parameters not obtained in step 303, keep the original values without update;

[0089] Step 305, if a up_asc , a down_asc , a up_desc , a down_desc Are all not equal to the initial values set in step 302, then store the data to be confirmed DATA pending , and reset the initial parameter a of the upper curve gate for the rising trend up_asc , set the initial parameter a of the lower curve gate for the rising trend down_asc , set the initial parameter a of the upper curve gate for the falling trend up_desc , set the initial parameter a of the lower curve gate for the falling trend down_desc , use the current data to be processed as the new data to be processed again, and jump to execute step 303;

[0090] If a up_asc and a down_desc Are both equal to the initial values set in step 302, then do not trigger the storage instruction, update the data to be confirmed and stored DATA pending To the current data to be processed, and jump to execute step 301;

[0091] If none of the above conditions are met, and a up_asc and a down_asc Are both not equal to the initial values set in step 302, then it is necessary to judge whether to store: when the first function satisfies that a increases monotonically with y, if a up_asc > a down_asc , then store the data to be confirmed and stored DATA pending , and reset the initial parameter a of the upper curve gate for the rising trend up_asc , set the initial parameter a of the lower curve gate for the rising trend down_asc , set the initial parameter a of the upper curve gate for the falling trend up_desc , set the initial parameter a of the lower curve gate for the falling trend down_desc, use the current data to be processed as the new data to be processed, and jump to execute step 303. Otherwise, update the data to be stored and confirmed DATA pending Update it to the current data to be processed, and jump to execute step 301. When the first function satisfies that a decreases monotonically with y, if a up_asc < a down_asc , then store the data to be stored and confirmed DATA pending , and reset the initial parameter a of the upper curve gate of the rising trend up_asc , set the initial parameter a of the lower curve gate of the rising trend down_asc , set the initial parameter a of the upper curve gate of the falling trend up_desc , set the initial parameter a of the lower curve gate of the falling trend down_desc , use the current data to be processed as the new data to be processed, and jump to execute step 303. Otherwise, update the data to be stored and confirmed DATA pending to the current data to be processed, and jump to execute step 301;

[0092] If none of the above conditions are met, and a up_desc and a down_desc are not equal to the initial values set in step 302, it is necessary to judge whether to store: when the second function satisfies that a increases monotonically with y, if a up_desc > a down_desc , then store the data to be stored and confirmed DATA pending , and reset the initial parameter a of the upper curve gate of the rising trend up_asc , set the initial parameter a of the lower curve gate of the rising trend down_asc , set the initial parameter a of the upper curve gate of the falling trend up_desc , set the initial parameter a of the lower curve gate of the falling trend down_desc , use the current data to be processed as the new data to be processed, and jump to execute step 303. Otherwise, update the data to be stored and confirmed DATA pending to the current data to be processed, and jump to execute step 301; when the second function satisfies that a decreases monotonically with y, if a up_desc < a down_desc , then store the data to be stored and confirmed DATA pending , and reset the initial parameter a of the upper curve gate of the rising trend up_asc , set the initial parameter a of the lower curve gate of the rising trend down_asc , set the initial parameter a of the upper curve gate of the falling trend up_desc , set the initial parameter a of the lower curve gate of the falling trend down_desc , use the current data to be processed as the new data to be processed, and jump to execute step 303. Otherwise, update the data to be stored and confirmed DATA pendingUpdate to the current data to be processed and jump to execute step 301;

[0093] Among them, when setting the initial parameters, when the first function satisfies that a decreases monotonically with y, a up_asc = +∞, a down_asc = -∞; when the first function satisfies that a increases monotonically with y, a up_asc = -∞, a down_asc = +∞; when the second function satisfies that a decreases monotonically with y, a up_desc = +∞, a down_desc = -∞; when the second function satisfies that a increases monotonically with y, a up_desc = -∞, a down_desc = +∞.

[0094] In the embodiments of the present invention, the steps of selecting the combination of a cluster of functions or two clusters of functions based on the fluctuation characteristics of the industrial process data to be compressed and stored and the requirements for the compression ratio or decompression mean square error in practical applications specifically include:

[0095] Step 401, initially screen several function clusters or combinations of function clusters that meet the basic requirements. It is necessary to select a cluster of functions that meet the above requirements, or a combination of two clusters of functions that meet the above requirements;

[0096] Step 402, for the sensors corresponding to the process data to be compressed and stored, collect test data for a time longer than 10 4 times the sampling interval;

[0097] Step 403, if there are requirements for the compression ratio in practical applications, then use the function clusters or combinations of function clusters in step 1 respectively, and use the compression method and decompression method described in the present invention to compress and decompress the test data to obtain the compression ratio and decompression mean square error corresponding to each function cluster or combination of function clusters. By adjusting the δ value in the compression method described in the present invention, the compression ratio corresponding to each function cluster or combination of function clusters reaches the requirements for the compression ratio in practical applications. On this basis, select the function cluster or combination of function clusters with the smallest decompression mean square error and its corresponding δ value when the compression ratios are the same as the final selection result. If there are requirements for the decompression mean square error in practical applications, then use the function clusters or combinations of function clusters in step 1 respectively, and use the compression method and decompression method described in the present invention to compress and decompress the test data to obtain the compression ratio and decompression mean square error corresponding to each function cluster or combination of function clusters. By adjusting the δ value in the compression method described in the present invention, the decompression mean square error corresponding to each function cluster or combination of function clusters reaches the requirements for the decompression mean square error in practical applications. On this basis, select the function cluster or combination of function clusters with the largest compression ratio and its corresponding δ value when the decompression mean square errors are the same as the final selection result. Among them, the compression ratio = the length of the data before compression / the length of the data after compression, (where n is the length of the test data, and y i is the i-th original data, and y

[0098] is the i-th decompressed data).

[0099] A method for decompressing industrial process data according to an embodiment of the present invention specifically includes the following steps: start Step 501: Obtain the requirements for the decompressed data, including: start time τ end , end time τ

[0100] , and time interval τ0 of the decompressed data; start Step 502: Starting from τ end , complete the decompression of the data at each moment at an interval of τ0 until the time is later than τ n ; when completing the decompression of the data at each moment, for any moment to be decompressed, assume that the coordinates of the decompressed data at this moment are (x n , y n ), x prev is the quotient obtained by dividing the difference between the current moment to be decompressed and the acquisition time of the previous storage point by the sampling interval. The coordinates of the previous storage point are (0, y next ), and the coordinates of the next storage point are (x next , y next ); x

[0101] If a cluster of functions y = f a (x) + b is selected to construct a curve gate during compression, substitute the two points (0, y prev ), (x next , y next ) into y = f a (x) + b to obtain the parameters a and b, and then substitute x n into the function to obtain the corresponding y n ;

[0102] If a combination of two clusters of functions is selected to construct a curve gate during compression, it is necessary to make a judgment. If y next > y prev , then substitute the two points (0, y prev ), (x next , y next ) into the first function to obtain the parameters a and b, and then substitute x n into the first function to obtain the corresponding y n . If y next < y prev , then substitute the two points (0, y prev ), (x next , y next) Substitute two points into the second function to obtain parameters a and b, and then substitute x n into the second function to obtain the corresponding y n .

[0103] In an embodiment of the present invention, further, when a cluster of functions y = f a (x) + b is selected to construct a curve gate, taking y = ax 2 + b as an example, the specific steps of the compression process are as follows:

[0104] Step 601, obtain a piece of collected data as the data to be processed;

[0105] Step 602, determine whether there is a stored value before the data to be processed obtained in Step 601: if not, directly store the data to be processed obtained in Step 601, and set the initial parameter a up = -∞, set the initial parameter a down a down = +∞ (because the function y = ax 2 + b satisfies the condition that a increases monotonically with y), and then jump to execute Step 601; if so, jump to execute Step 603;

[0106] Step 603, set the coordinates of the previous stored value in the rectangular coordinate system as (0, y p ), y p represents its value, the left - end point coordinates of the upper curve gate are (0, y p + δ), the left - end point coordinates of the lower curve gate are (0, y p - δ), δ > 0, and the coordinates of the current data to be processed are (x1, y1); substitute the two points (0, y p + δ), (x1, y1) into y = ax 2 + b to obtain the parameter a up_new of the upper curve gate, substitute the two points (0, y p - δ), (x1, y1) into y = ax 2 + b to obtain the parameter a down_new of the lower curve gate, and then jump to execute Step 604; where x1 is the quotient obtained by dividing the difference between the acquisition time of the current data to be processed and the acquisition time of the previous stored value by the sampling interval;

[0107] Step 604, make a judgment based on the parameters obtained in Step 603, update the parameters based on the judgment result, and then jump to execute Step 605. Specifically: because the function y = ax 2 + b satisfies the condition that a increases monotonically with y, so if a up_new > a up , then a up is updated to a up_new , otherwise, aup Remain unchanged; if a down_new < a down , then a down is updated to a down_new , otherwise, a down remains unchanged;

[0108] Step 605, since the function y = ax 2 + b satisfies the condition that a increases monotonically with y, so if a up > a down , then store the data DATA to be confirmed for storage pending , and reset the initial parameter a of the upper curve gate up = -∞, set the initial parameter a of the lower curve gate down = +∞, use the current data to be processed as the new data to be processed again, jump to execute step 603, otherwise, update the data DATA to be confirmed for storage pending to the current data to be processed, and jump to execute step 601;

[0109] Please refer to Figure 2 , as Figure 2 shown is the schematic diagram of the compression process using a cluster of functions y = ax 2 + b. The compression process starts at time t0, and the data at time t0 is saved by default. The data from t1 to t5 is within the channel enclosed by the upper and lower curve gates. The upper curve gate is determined by the upper endpoint of the initial closed gate at time t0 and the value at time t2, and the lower curve gate is determined by the lower endpoint of the initial closed gate at time t0 and the value at time t3. At time t6, the function parameters of the new lower curve gate satisfy the storage requirements compared with the upper curve gate. Visually, the data at time t6 also significantly deviates from the previously formed approximately piecewise parallel curve channel. Therefore, the data at time t5 is stored, and a new round of compression starts at time t6. In the second round of compression, the parameters of the upper curve gate determined by the data at time t 11 satisfy the storage requirements compared with the lower curve gate. Therefore, the data at time t 10 is stored, and a new round of compression starts at time t 11 . During decompression, for the first segment, based on the data at times t0 and t5, calculate the a and b parameter values of y = ax 2 + b, and then calculate the values at any intermediate time; for the second segment, based on the data at times t5 and t 10 , calculate the a and b parameter values of y = ax 2 + b, and then calculate the values at any intermediate time.

[0110] In the embodiment of the present invention, further, when a combination of two clusters of functions is selected to construct the curve gate, for the first function, select y = b + a x, where a > 1, and the second function is selected as y = b - a x , taking a > 1 as an example, the compression steps when selecting two clusters of function combinations are described in detail:

[0111] Step 701, obtain a piece of collected data as the data to be processed;

[0112] Step 702, determine whether there is a stored value before the data to be processed obtained in Step 701: If not, directly store the data to be processed obtained in Step 701, and set the initial parameter a of the upper curve gate of the rising trend up_asc = -∞, and set the initial parameter a of the lower curve gate of the rising trend down_asc = +∞ (because the first function y = b + a x satisfies the condition that a increases monotonically with y); set the initial parameter a of the upper curve gate of the falling trend up_desc = +∞, and set the initial parameter a of the lower curve gate of the falling trend down_desc = -∞ (because the second function y = b - a x satisfies the condition that a decreases monotonically with y), and then jump to execute Step 701; if there is, jump to execute Step 703;

[0113] Step 703, assume that the coordinates of the previous stored value in the rectangular coordinate system are (0, y p ), y p represents its value, the left endpoint coordinates of the upper curve gate are (0, y p + δ), the left endpoint coordinates of the lower curve gate are (0, y p - δ), δ > 0, and the coordinates of the current data to be processed are (x1, y1), where x1 is the quotient obtained by dividing the difference between the acquisition time of the current data to be processed and the acquisition time of the previous stored value by the sampling interval; it is processed in three cases according to the value of y1:

[0114] If y p - δ < y1 < y p + δ, substitute the two points (0, y p + δ) and (x1, y1) into the second function y = b - a x to obtain the parameter a of the upper curve gate of the falling trend up_desc_new , substitute the two points (0, y p - δ) and (x1, y1) into the first function y = b + a x to obtain the parameter a of the lower curve gate of the rising trend down_asc_new , and then jump to execute Step 704;

[0115] If y1 < y p - δ, substitute the two points (0, y p + δ) and (x1, y1) into the second function y = b - a xIn it, the upper curve gate parameter a of the downward trend is obtained up_desc_new , substituting the two points (0, y p -δ) and (x1, y1) into the second function y = b - a x In it, the lower curve gate parameter a of the downward trend is obtained down_desc_new , and then jump to execute step 704;

[0116] If y1 > y p +δ, substituting the two points (0, y p +δ) and (x1, y1) into the first function y = b + a x In it, the upper curve gate parameter a of the upward trend is obtained up_asc_new , substituting the two points (0, y p -δ) and (x1, y1) into the first function y = b + a x In it, the lower curve gate parameter a of the upward trend is obtained down_asc_new , and then jump to execute step 704;

[0117] Step 704, make a judgment based on the parameters obtained in step 703, update the parameters based on the judgment result, and then jump to execute step 705 after the update. Specifically, since the first function y = b + a x satisfies the condition that a increases monotonically with y, so if a up_asc_new > a up_asc , then a up_asc is updated to a up_asc_new , otherwise, a up_asc remains unchanged; if a down_asc_new < a down_asc , then a down_asc is updated to a down_asc_new , otherwise, a down_asc remains unchanged. Since the second function y = b - a x satisfies the condition that a decreases monotonically with y, so if a up_desc_new < a up_desc , then a up_desc is updated to a up_desc_new , otherwise, a up_desc remains unchanged; if a down_desc_new > a down_desc , then a down_desc is updated to a down_desc_new , otherwise, a down_desc remains unchanged; for the parameters not obtained in step 703, keep the original values unchanged;

[0118] Step 705, if a up_asc , a down_asc , a up_desc , a down_descIf neither is equal to the initial value set in step 702, store the data to be confirmed DATA pending , and reset the initial parameter a of the upper curve gate in the upward trend up_asc = -∞, set the initial parameter a of the lower curve gate in the upward trend down_asc = +∞ (because the first function y = b + a x satisfies the condition that a increases monotonically with y); set the initial parameter a of the upper curve gate in the downward trend up_desc = +∞, set the initial parameter a of the lower curve gate in the downward trend down_desc = -∞ (because the second function y = b - a x satisfies the condition that a decreases monotonically with y), use the current data to be processed as the new data to be processed again, and jump to execute step 703;

[0119] If a up_asc and a down_desc are both equal to the initial value set in step 702, do not trigger the storage instruction, update the data to be confirmed and stored DATA pending to the current data to be processed, and jump to execute step 701;

[0120] If none of the above conditions are met, and a up_asc and a down_asc are both not equal to the initial value set in step 702, it is necessary to judge whether to store: because the first function y = b + a x satisfies the condition that a increases monotonically with y, so if a up_asc > a down_asc , store the data to be confirmed and stored DATA pending , and reset the initial parameter a of the upper curve gate in the upward trend up_asc = -∞, set the initial parameter a of the lower curve gate in the upward trend down_asc = +∞, set the initial parameter a of the upper curve gate in the downward trend up_desc = +∞, set the initial parameter a of the lower curve gate in the downward trend down_desc = -∞, use the current data to be processed as the new data to be processed again, and jump to execute step 703, otherwise, update the data to be confirmed and stored DATA pending to the current data to be processed, and jump to execute step 701;

[0121] If none of the above conditions are met, and a up_dsc and a down_desc are both not equal to the initial value set in step 702, it is necessary to judge whether to store: because the second function y = b - a x satisfies the condition that a decreases monotonically with y, so if a up_desc < a down_desc , store the data to be confirmed and stored DATApending and reset the initial parameter a of the upper curve gate for the upward trend up_asc = -∞, set the initial parameter a of the lower curve gate for the upward trend down_asc = +∞, set the initial parameter a of the upper curve gate for the downward trend up_desc = +∞, set the initial parameter a of the lower curve gate for the downward trend down_desc = -∞, use the current data to be processed as the new data to be processed again, jump to step 703 for execution, otherwise, update the data to be confirmed and stored DATA pending to the current data to be processed, and jump to step 701 for execution.

[0122] Please refer to Figure 3 as Figure 3 shown, which is the schematic diagram of the compression process using the combination of the first function (y = b + a x , where a > 1) and the second function (y = b - a x , where a > 1). The whole process is similar to Figure 2 , the main difference is that the upper and lower gate curve functions used in the upward trend period from t0 to t5 and the downward trend period from t5 to t 10 are different. The former uses the first function and the latter uses the second function. During decompression, the first function and the second function need to be used for calculation at t0 - t5 and t5 - t 10 respectively.

[0123] In summary, the present invention relates to the technical field of data compression, and particularly relates to a real-time compression storage method for industrial process data. It constructs a curve gate by selecting a special non-linear function to replace the straight gate in the traditional rotary gate compression algorithm. During compression, the function parameters corresponding to the upper and lower curve gates are calculated and compared one by one to determine whether to store the previous data. During decompression, the decompression value at any intermediate time is obtained by calculating the parameters of the compression function. Essentially, the present invention changes the linear fitting in the original rotary gate compression algorithm to non-linear fitting. Compared with the existing compression technologies in this field, on the one hand, it opens up another path for realizing the compression of industrial process data, that is, the data compression method based on non-linear functions. Based on this method, within the range of non-linear functions or function combinations that meet the specified conditions, the most suitable function or function combination can be selected according to the requirements to achieve data compression or decompression, avoiding some low-quality compression problems caused by blindly using linear compression. On the other hand, the method of the present invention also provides a method of selecting the most data characteristic-compliant function or function combination to achieve data compression or decompression based on the compression or decompression index requirements of practical applications and on the basis of meeting the index requirements.

[0124] The following is an apparatus embodiment of the present invention, which can be used to implement the method embodiment of the present invention. For details not disclosed in the apparatus embodiment, please refer to the method embodiment of the present invention.

[0125] A compression storage system for industrial process data according to an embodiment of the present invention, based on the above compression method of the present invention, includes:

[0126] An acquisition module, configured to acquire industrial process data to be compressed and stored;

[0127] A compression storage module, when compressing and storing the industrial process data to be compressed and stored, the first piece of data is stored by default, and the data to be stored is acquired one by one starting from the previous stored value, and the function parameters corresponding to the upper and lower curve gates are calculated and compared one by one to determine the opening degree of the curve gate and decide whether to store the previous piece of data to be stored; wherein, the curve gate is constructed by a cluster of functions or a combination of two clusters of functions, and a cluster of functions or a combination of two clusters of functions is selected based on the fluctuation characteristics of the industrial process data to be compressed and stored.

[0128] A decompression system for industrial process data according to an embodiment of the present invention, based on the above decompression method of the present invention, includes:

[0129] An acquisition module, configured to acquire requirements for the decompressed data, including: start time τ start , end time τ end , and time interval τ0 of the decompressed data;

[0130] A decompression module, starting from τ start , completing the decompression of the data at each moment at an interval of τ0 until the time is later than τ end and then stopping; wherein, when completing the decompression of the data at each moment, for any moment to be decompressed, assuming the coordinates of the data after decompression at this moment are (x n , y n ), x n takes the quotient of the difference between the current moment to be decompressed and the acquisition time of the previous storage point divided by the sampling interval, the coordinates of the previous storage point are (0, y prev ), the coordinates of the subsequent storage point are (x next , y next ), and x next takes the quotient of the difference between the moment of this storage point and the acquisition time of the previous storage point divided by the sampling interval;

[0131] If a cluster of functions y = f a (x) + b is selected to construct the curve gate during compression, substituting the two points (0, y prev ), (x next , y next ) into y = f a (x) + b to obtain the parameters a and b, and then substituting xn Substitute into the function to obtain the corresponding y n ;

[0132] When using a combination of two clusters of functions to construct a curve gate during compression, a judgment is required. If y next > y prev , then substitute the two points (0, y prev ) and (x next , y next ) into the first function to obtain the parameters a and b, and then substitute x n into the first function to obtain the corresponding y n . If y next < y prev , then substitute the two points (0, y prev ) and (x next , y next ) into the second function to obtain the parameters a and b, and then substitute x n into the second function to obtain the corresponding y n .

[0133] Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0134] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, and the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the specified functions in the process Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks

[0135] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device implements the process Figure 1 one process or multiple processes and / or blocks Figure 1The functions specified in one or more boxes.

[0136] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Thus, the instructions executed on the computer or other programmable device provide for implementing the steps of the functions specified in one Figure 1 one process or more processes and / or boxes Figure 1 step of the functions specified in one or more boxes.

[0137] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that: modifications or equivalent replacements can still be made to the specific implementation manners of the present invention. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention shall be covered by the protection scope of the claims of the present invention.

Claims

1. A compression storage method for industrial process data, characterized in that Including the following steps: Obtain the industrial process data to be compressed and stored one by one to form a processing queue; When compressing and storing the data in the processing queue, the first piece of data is stored by default; for the remaining data, a curve gate is constructed with the previous stored value as the left center point, the function parameters corresponding to the upper and lower curve gates are calculated and compared, the opening degree of the curve gate is determined, and it is decided whether to store the last piece of data before the currently processed data, so as to realize data compression storage based on a rotating curve gate; wherein, the curve gate is constructed by a cluster of functions or a combination of two clusters of functions; a cluster of functions or a combination of two clusters of functions is selected based on the fluctuation characteristics of the industrial process data to be compressed and stored in combination with the requirements for the compression ratio or the decompression mean square error; Wherein, The functional form of the cluster of functions is ; where is the dependent variable, is the independent variable, a and b are function parameters, represents a function with a as the only parameter; the function is monotonic in the interval; the function has an intersection with the axis; the function is not a linear function ; assume that the intersection of the function and the axis is fixed, and is fixed as any value greater than 0 , when the corresponding to varies continuously between ( , the parameter increases or decreases monotonically with y within its domain; When compressing and storing the data in the processing queue, the first piece of data is stored by default; for the remaining data, a curve gate is constructed with the previous stored value as the left center point, the function parameters corresponding to the upper and lower curve gates are calculated and compared, the opening degree of the curve gate is determined, and it is decided whether to store the last piece of data before the currently processed data, so as to realize the steps of data compression storage based on a rotating curve gate specifically include: Step 1, obtain a piece of collected data as the data to be processed; Step 2: Determine whether there is a stored value before the data to be processed obtained in Step 1. If not, directly store the data to be processed obtained in Step 1, and set the initial parameters of the upper curve gate , and set the initial parameters of the lower curve gate , and then jump to execute Step 1; if so, jump to execute Step 3; where, when a decreases monotonically with y, , ; when a increases monotonically with y, , ; Step 3, assume that the coordinates of the previous stored value in the rectangular coordinate system are , representing its value, the left endpoint coordinates of the upper curve gate are , the left endpoint coordinates of the lower curve gate are , , the coordinates of the currently to-be-processed data are ; Substitute the two points , into to obtain the parameters of the upper curve gate. Substitute the two points , into to obtain the parameters of the lower curve gate, and then jump to execute Step 4; where takes the difference between the acquisition time of the currently to-be-processed data and the acquisition time of the previous stored value and divides it by the sampling interval. Step 4: Make a judgment based on the parameters obtained in Step 3, update the parameters based on the judgment result, and after the update, jump to execute Step 5. Among them, the steps of making a judgment based on the parameters obtained in Step 3 and updating the parameters based on the judgment result specifically include: When a is monotonically increasing with y, if , then is updated to , otherwise, remains unchanged; if , then is updated to , otherwise, remains unchanged; When a is monotonically decreasing with y, if , then is updated to , otherwise, remains unchanged; if , then is updated to , otherwise, remains unchanged; Step 5, when a increases monotonically with y , if , then store the data to be confirmed for storage , and reset the initial parameters of the upper curve gate , set the initial parameters of the lower curve gate , use the current data to be processed as the new data to be processed again, jump to execute Step 3, otherwise, update the data to be confirmed for storage to the current data to be processed, and jump to execute Step 1; when a Follow y When monotonically decreasing, if , then the storage data to be confirmed is stored , and reset the initial parameters of the upper curve door , set the initial parameters of the lower curve gate , use the current data to be processed as the new data to be processed, and jump to step 3, otherwise, the data to be confirmed will be stored Update to the current data to be processed and jump to step 1.

2. The compression storage method of industrial process data according to claim 1, wherein The step of obtaining the industrial process data to be compressed and stored one by one to form a processing queue specifically includes: Input the signals generated by the sensors in the preset industrial field into the computer through a sampling device or a bus interface to form digital quantities; wherein, the sensors are sensors arranged for monitoring the operating conditions of equipment or systems; the digital quantities are continuously generated at a fixed sampling frequency; Queue the digital quantities in the time order that the data collected first is in the front and the data collected later is in the back to form a processing queue.

3. The compression storage method for industrial process data according to claim 1, characterized in that, The combination of the two clusters of functions includes a first function and a second function; Both the first function and the second function have the following properties: the function form is ; where is the dependent variable, is the independent variable, a and b are function parameters, represents a function with a as the only parameter; the function is monotonic in the interval; the function intersects with the axis; the function is not a linear function ; The first function is monotonically increasing in the interval, and the second function is monotonically decreasing in the interval; Let the intersection point of the first function and the axis be fixed at , and is fixed at any value greater than 0 . When the value corresponding to this varies continuously within ( ), the parameter increases or decreases monotonically with within its domain; Let the intersection point of the second function and the axis be fixed at , and is fixed at any value greater than 0 . When the value corresponding to this varies continuously within ( ), the parameter increases or decreases monotonically with within its domain.

4. A compression storage method for industrial process data according to claim 3, characterized in that When compressing and storing the data in the processing queue, the first piece of data is stored by default; for the remaining data, a curve gate is constructed with the previous stored value as the left center point, the function parameters corresponding to the upper and lower curve gates are calculated and compared, the opening degree of the curve gate is determined, and it is decided whether to store the last piece of data before the currently processed data, so as to realize the steps of data compression storage based on a rotating curve gate specifically include: Step 1, obtain a piece of collected data as the data to be processed; Step 2: Determine whether there is a stored value before the data to be processed obtained in Step 1. If not, directly store the data to be processed obtained in Step 1, and set the initial parameters of the upper curve gate for the upward trend , set the initial parameters of the lower curve gate for the upward trend , set the initial parameters of the upper curve gate for the downward trend , set the initial parameters of the lower curve gate for the downward trend , and then jump to execute Step 1; if there is, jump to execute Step 3; where, when the first function satisfies that a decreases monotonically with y , ; when the first function satisfies that a increases monotonically with y , ; when the second function satisfies that a decreases monotonically with y , ; when the second function satisfies that a increases monotonically with y , ; Step 3, assume that the coordinates of the previous stored value in the rectangular coordinate system are , representing its value, the left endpoint coordinates of the upper curve gate are , the left endpoint coordinates of the lower curve gate are , , the coordinates of the currently to-be-processed data are , take the difference between the acquisition time of the currently to-be-processed data and the acquisition time of the previous stored value, and then divide by the sampling interval; handle it in three cases according to the value of y1: If , substituting the two points and into the second function to obtain the upper curve threshold parameter , substituting the two points and into the first function to obtain the lower curve threshold parameter , and then jump to execute step 4; If , substituting the two points and into the second function to obtain the upper curve gate parameter of the downward trend. Substituting the two points and into the second function to obtain the lower curve gate parameter of the downward trend, and then jump to execute step 4; If , substituting the two points and into the first function to obtain the upper curve gate parameter of the upward trend. Substituting the two points and into the first function to obtain the lower curve gate parameter of the upward trend, and then jump to execute step 4; Step 4, make a judgment based on the parameters obtained in step 3, update the parameters based on the judgment result, and after the update, jump to execute step 5; wherein, the step of making a judgment based on the parameters obtained in step 3 and updating the parameters based on the judgment result specifically includes: When the first function satisfies a is monotonically increasing with respect to y, if , then is updated to , otherwise, remains unchanged; if , then is updated to , otherwise, remains unchanged; when the first function satisfies a is monotonically decreasing with respect to y, if , then is updated to , otherwise, remains unchanged; if , then is updated to , otherwise, remains unchanged; when the second function satisfies a is monotonically increasing with respect to y, if , then is updated to , otherwise, remains unchanged; if , then is updated to , otherwise, remains unchanged; when the second function satisfies a is monotonically decreasing with respect to y, if , then is updated to , otherwise, remains unchanged; if , then is updated to , otherwise, For the parameters not obtained in step 3, the original values are maintained without update; Step 5, if , , , are all not equal to the initial value set in Step 2, then store the data to be confirmed , and reset the initial parameters of the upper curve gate for the upward trend , set the initial parameters of the lower curve gate for the upward trend , set the initial parameters of the upper curve gate for the downward trend , set the initial parameters of the lower curve gate for the downward trend , take the current data to be processed as the new data to be processed again, and jump to execute Step 3; If and both equal the initial value set in Step 2, the storage instruction is not triggered, and the data to be confirmed for storage is updated to the current data to be processed, and the process jumps back to Step 1; If none of the above conditions are met, and and are both not equal to the initial values set in Step 2, then it is necessary to determine whether to store: When the first function satisfies a along with y monotonically increasing, if , then store the data to be confirmed for storage , and reset the initial parameters of the upper curve gate for the upward trend , set the initial parameters of the lower curve gate for the upward trend , set the initial parameters of the upper curve gate for the downward trend , set the initial parameters of the lower curve gate for the downward trend , use the current data to be processed as the new data to be processed again, jump to execute Step 3, otherwise, update the data to be confirmed for storage to the current data to be processed, and jump to execute Step 1; When the first function satisfies a along with y monotonically decreasing, if , then store the data to be confirmed for storage , and reset the initial parameters of the upper curve gate for the upward trend , set the initial parameters of the lower curve gate for the upward trend , set the initial parameters of the upper curve gate for the downward trend , set the initial parameters of the lower curve gate for the downward trend , use the current data to be processed as the new data to be processed again, jump to execute Step 3, otherwise, update the data to be confirmed for storage to the current data to be processed, and jump to execute Step 1; If none of the above conditions are met, and and are both not equal to the initial value set in step 2, then it is necessary to determine whether to store: When the second function satisfies a increasing monotonically with y , if , then store the data to be confirmed for storage , and reset the initial parameters of the upper curve gate for the upward trend , set the initial parameters of the lower curve gate for the upward trend , set the initial parameters of the upper curve gate for the downward trend , set the initial parameters of the lower curve gate for the downward trend , use the current data to be processed as the new data to be processed again, jump to execute step 3, otherwise, update the data to be confirmed for storage to the current data to be processed, and jump to execute step 1; When the second function satisfies a decreasing monotonically with y , if , then store the data to be confirmed for storage , and reset the initial parameters of the upper curve gate for the upward trend , set the initial parameters of the lower curve gate for the upward trend , set the initial parameters of the upper curve gate for the downward trend , set the initial parameters of the lower curve gate for the downward trend , use the current data to be processed as the new data to be processed again, jump to execute step 3, otherwise, update the data to be confirmed for storage to the current data to be processed, and jump to execute step 1; Among them, when setting the initial parameters, when the first function satisfies that a decreases monotonically with y, , ; when the first function satisfies that a increases monotonically with y, , ; when the second function satisfies that a decreases monotonically with y, , ; when the second function satisfies that a increases monotonically with y, , .

5. A method for decompressing industrial process data, characterized in that, Based on the compression storage method according to any one of claims 1 to 4, characterized in that it includes the following steps: Step 1, obtain the requirements for the decompressed data, including: start time , end time , time interval for decompressing the data ; Step 2, starting from , decompress the data at each moment at an interval of until the time is later than ; among them, when decompressing the data at each moment, for any moment to be decompressed, set the data coordinates after decompression at this moment as , take the quotient obtained by dividing the difference between the current moment to be decompressed and the acquisition time of the previous storage point by the sampling interval, the coordinates of the previous storage point are , the coordinates of the next storage point are , take the quotient obtained by dividing the difference between the moment of this storage point and the acquisition time of the previous storage point by the sampling interval; If a cluster of functions is selected during compression When constructing a curve gate, using , Substitute the two points into to obtain the parameters a and b, and then substitute into the function to obtain the corresponding ; If a combination of two clusters of functions is selected to construct a curve gate during compression, a judgment is required. If , then substitute the two points and into the first function to obtain the parameters a and b. Then substitute into the first function to obtain the corresponding . If , then substitute the two points and into the second function to obtain the parameters a and b. Then substitute into the second function to obtain the corresponding .

6. An industrial process data compression and storage system, characterized in that, Based on the compression storage method according to claim 1, including: An acquisition module for acquiring industrial process data to be compressed and stored; The compression storage module, when compressing and storing the industrial process data to be compressed and stored, stores the first piece of data by default. Starting from the previous stored value, it sequentially obtains the data to be stored, calculates and compares the function parameters corresponding to the upper and lower curve gates one by one, determines the opening degree of the curve gates, and decides whether to store the previous piece of data to be stored; wherein, the curve gates are constructed by a cluster of functions or a combination of two clusters of functions, and a cluster of functions or a combination of two clusters of functions is selected based on the fluctuation characteristics of the industrial process data to be compressed and stored.

7. An industrial process data decompression system, characterized in that, The decompression method according to claim 5, comprising: An acquisition module, configured to acquire requirements for the decompressed data, including: start time , end time , time interval of the decompressed data ; Decompression module, used to start from and complete the decompression of data at each moment at intervals of , and stop until the time is later than ; among them, when completing the decompression of data at each moment, for any moment to be decompressed, assume that the data coordinates after decompression at this moment are , Take the quotient of the difference between the current moment to be decompressed and the acquisition time of the previous storage point divided by the sampling interval. The coordinates of the previous storage point are , and the coordinates of the next storage point are , Take the quotient of the difference between the moment of this storage point and the acquisition time of the previous storage point divided by the sampling interval; If a cluster of functions is selected during compression When constructing a curve gate, use and Substitute the two points into to obtain the parameters a and b, and then substitute into the function to obtain the corresponding ; If a combination of two clusters of functions is selected to construct a curve gate during compression, a judgment needs to be made. If , then substitute the two points and into the first function to obtain the parameters a and b. Then substitute into the first function to obtain the corresponding . If , then substitute the two points and into the second function to obtain the parameters a and b. Then substitute into the second function to obtain the corresponding .

Citation Information

Patent Citations

  • Data compression method

    CN101902226A

  • Monitoring data compression method applicable to operation and maintenance automation system

    CN106649026A