CN114006618A - Compression storage method and system, and decompression method and system for industrial process data - Google Patents
Compression storage method and system, and decompression method and system for industrial process data Download PDFInfo
- Publication number
- CN114006618A CN114006618A CN202111277563.1A CN202111277563A CN114006618A CN 114006618 A CN114006618 A CN 114006618A CN 202111277563 A CN202111277563 A CN 202111277563A CN 114006618 A CN114006618 A CN 114006618A
- Authority
- CN
- China
- Prior art keywords
- data
- function
- desc
- asc
- new
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03M—CODING; DECODING; CODE CONVERSION IN GENERAL
- H03M7/00—Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
- H03M7/30—Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Testing And Monitoring For Control Systems (AREA)
Abstract
The invention discloses a compression storage method and a system, and a decompression method and a system of industrial process data, wherein the compression storage method comprises the following steps: acquiring industrial process data to be compressed and stored one by one to form a processing queue; when the data in the processing queue is compressed and stored, storing the first piece of data by default; and for the rest data, a curve door is constructed by taking the previous storage value as the center point of the left side, function parameters corresponding to the upper curve door and the lower curve door are calculated and compared, the opening degree of the curve door is determined, whether the last data before the currently processed data is stored is determined, and the data compression storage based on the rotating curve door is realized. According to the invention, the curve gate is constructed by selecting the nonlinear curve function, so that the linear gate in the traditional revolving gate compression algorithm can be replaced, and the problem of low-quality compression caused by linear compression can be avoided.
Description
Technical Field
The invention belongs to the technical field of data compression, particularly relates to the field of industrial process data compression, and particularly relates to a compression storage method and system and a decompression method and system for industrial process data.
Background
In the field of industrial production, a large number of sensors are often required to be arranged for accurately monitoring and controlling the production process and the equipment state; today, mass data generated in the industrial production process is more and more emphasized by professional field people in the vigorous development of big data technology, and effective knowledge in the directions of optimizing the production process, early warning equipment faults, improving energy efficiency and the like is expected to be obtained from the mass data through various data mining methods.
Against this background, large-scale storage of industrial process data is becoming increasingly necessary, and the use of real-time databases is becoming more widespread. However, under the condition that the scale of the sensor is larger and the acquisition interval is shorter and shorter, if the data acquired by the sensor is directly stored in the real-time database without being compressed, a large amount of storage resources are often consumed rapidly, and a lot of low-quality data are necessarily included, so that the waste of the storage resources is caused. Therefore, it is very necessary to achieve effective compression and storage of industrial process data and reduce the consumption of stored data as much as possible while ensuring the compression quality.
At present, a series of process data compression and storage methods are generated in the field of industrial production, and a considerable part of the process data compression and storage methods are applied and verified in practice; the most important of them is the revolving door compression algorithm, and some improved algorithms implemented on the basis of it. The variable parameter of the revolving door compression algorithm only has the threshold width, and the relatively high-efficiency compression of the process data can be realized by selecting the proper threshold width through analyzing the fluctuation characteristics of the data. Some improved algorithms realized on the basis of the revolving door compression algorithm mainly focus on determining or adaptively adjusting the threshold width so as to enable the threshold width to continuously adapt to data and obtain better compression effect.
However, in the existing algorithms based on revolving door compression, basically, the original data are fitted by linear functions, and one linear channel and another linear channel are continuously constructed in the compression process, and are cut off when the linear channels exceed the channel range; in practice, not all process data approximately follows linear fluctuation, and in this case, if the linear compression storage method is still adopted, the decompression effect is easily reduced, so that the later use of the data is affected. Therefore, a new real-time compression storage method for industrial process data is needed.
Disclosure of Invention
The present invention is directed to a method and a system for compressing and storing industrial process data, and a method and a system for decompressing industrial process data, so as to solve one or more of the above technical problems. According to the invention, a nonlinear curve function is selected to construct a curve gate, so that a linear gate in a traditional revolving gate compression algorithm can be replaced, and the problem of low-quality compression caused by linear compression can be avoided.
In order to achieve the purpose, the invention adopts the following technical scheme:
the invention relates to a compression storage method of industrial process data, which comprises the following steps:
acquiring industrial process data to be compressed and stored one by one to form a processing queue;
when the data in the processing queue is compressed and stored, storing the first piece of data by default; for the rest data, a curve door is constructed by taking a previous storage value as a left center point, function parameters corresponding to an upper curve door and a lower curve door are calculated and compared, the opening degree of the curve door is determined, whether the last data before the currently processed data is stored is determined, and data compression storage based on a rotating curve door is realized; the curve gate is constructed by one cluster of functions or the combination of two clusters of functions; one or a combination of two cluster functions is selected based on the fluctuation characteristic of the industrial process data to be compressed and stored and the requirement of compression ratio or decompression mean square error.
The further improvement of the present invention is that the step of acquiring the industrial process data to be compressed and stored one by one to form the processing queue specifically comprises:
inputting signals generated by a sensor in the preset industrial field into a computer through a sampling device or a bus interface to form digital quantity; wherein the sensor is a sensor arranged for monitoring an operating condition of a device or system; the digital quantity is continuously generated at a fixed sampling frequency;
and queuing the digital quantity according to the time sequence of the data acquired first before and the data acquired later after to form a processing queue.
In a further development of the invention, the functional form of the cluster function is y = fa(x) + b; wherein y is a dependent variable, x is an independent variable, a and b are function parameters, and fa(x) Representing a function with a as a unique parameter; the function has monotonicity in the x ∈ [0, + ∞); the function has an intersection point with the y-axis; the function is not a linear function y ═ ax + b; let the intersection of the function and the y-axis be fixed, and x be fixed at any value x greater than 00When corresponding to x0Is continuously varied between (- ∞, + ∞) the parameter a is monotonically increasing or monotonically decreasing with y within its domain of definition.
The invention has the further improvement that when the data in the processing queue is compressed and stored, the first piece of data is stored by default; for other data, a curve door is constructed by taking a previous storage value as a left center point, function parameters corresponding to an upper curve door and a lower curve door are calculated and compared, the opening degree of the curve door is determined, whether the last data before the currently processed data is stored or not is determined, and the step of realizing data compression storage based on the rotating curve door specifically comprises the following steps:
step 1, acquiring a piece of acquired data as data to be processed;
step 2, judging whether the value to be stored exists before the data to be processed acquired in the step 1: if not, directly storing the data to be processed acquired in the step 1, and setting an initial parameter a of the upper curve doorupSetting the initial parameter a of the lower curve doordownThen, skipping to execute the step 1; if yes, skipping to handleStep 3 is carried out; wherein a is monotonically decreasing with yup=+∞,adown═ infinity; when a is monotonically increasing with y, aup=-∞,adown=+∞;
And 3, setting the coordinate of the previous stored value in the rectangular coordinate system as (0, y)p),ypRepresenting the value, the left end point coordinate of the upper curve door is (0, y)p+ delta), the left end point coordinate of the lower curve door is (0, y)p- δ), δ > 0, the coordinates of the current data to be processed being (x)1,y1) (ii) a With (0, y)p+δ)、(x1,y1) Two point carry-in y ═ fa(x) + b, find the parameter a of the upper curve gateup_newTo (0, y)p-δ)、(x1,y1) Two point carry-in y ═ fa(x) + b, find the parameter a of the lower curve doordown_newThen skipping to execute the step 4; wherein x is1Dividing the quotient of 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;
step 4, judging based on the parameters obtained in the step 3, updating the parameters based on the judgment result, and skipping to execute the step 5 after updating; wherein, the judgment is carried out based on the parameters obtained in the step 3, and the step of updating the parameters based on the judgment result specifically comprises the following steps: when a monotonically increases with y, if aup_new>aupThen a isupIs updated to aup_newOtherwise, aupKeeping the original shape; if a isdown_new<adownThen a isdownIs updated to adown_newOtherwise, adownKeeping the original shape; when a is monotonically decreasing with y, if a isup_new<aupThen a isupIs updated to aup_newOtherwise, aupKeeping the original shape; if a isdown_new>adownThen a isdownIs updated to adown_newOtherwise, adownKeeping the original shape;
step 5, when a is monotonically increased with y, if a is increasedup>adownThen stores the DATA to be confirmedpendingAnd resetting the initial parameter a of the upper curve doorupSet initial parameter a of lower curve gate ═ infinitydownAnd (5) jumping to execute the step (3) by taking the current DATA to be processed as new DATA to be processed again, or else, confirming the stored DATA DATApendingUpdating the data to be processed currently, and skipping to execute the step 1;
when a is monotonically decreasing with y, if a isup<adownThen stores the DATA to be confirmedpendingAnd resetting the initial parameter a of the upper curve doorupSetting the initial parameter a of the lower curve gate as + ∞downStep 3 is skipped to execute with the current DATA to be processed as new DATA to be processed, if not, the DATA to be confirmed is storedpendingUpdating the data to be processed currently, and skipping to execute the step 1.
A further development of the invention is that the combination of the two clusters of functions comprises a first function and a second function;
the first function and the second function both have the following properties: the function form is y ═ fa(x) + b; wherein y is a dependent variable, x is an independent variable, a and b are function parameters, and fa(x) Representing a function with a as a unique parameter; the function has monotonicity in the x ∈ [0, + ∞); the function has an intersection point with the y-axis; the function is not a linear function y ═ ax + b;
the first function is monotonically increased in the x ∈ [0, + ∞) interval, and the second function is monotonically decreased in the x ∈ [0, + ∞) interval;
the intersection point of the first function and the y-axis is fixed to be (0, y)0) And x is fixed to an arbitrary value x larger than 00When corresponding to x0Has a y value of (y)0, + ∞) is continuously varied, the parameter a is monotonically increasing or monotonically decreasing with y within its domain of definition; the intersection point of the second function and the y-axis is fixed to be (0, y)0) And x is fixed to an arbitrary value x larger than 00When corresponding to x0Y is in the range (- ∞, y)0) In which the parameter a is monotonically increasing or monotonically decreasing with y within its domain.
The invention has the further improvement that when the data in the processing queue is compressed and stored, the first piece of data is stored by default; for other data, a curve door is constructed by taking a previous storage value as a left center point, function parameters corresponding to an upper curve door and a lower curve door are calculated and compared, the opening degree of the curve door is determined, whether the last data before the currently processed data is stored or not is determined, and the step of realizing data compression storage based on the rotating curve door specifically comprises the following steps:
step 1, acquiring a piece of acquired data as data to be processed;
step 2, judging whether the value to be stored exists before the data to be processed acquired in the step 1: if not, directly storing the data to be processed acquired in the step 1, and setting an initial parameter a of an upper curve gate with an ascending trendup_ascSetting initial parameter a of lower curve door with rising trenddown_ascSetting the initial parameter a of the upper curve gate with the descending trendup_descSetting the initial parameter a of the lower curve gate with the descending trenddown_descThen, skipping to execute the step 1; if yes, skipping to execute the step 3; wherein a is monotonically decreased with y when the first function satisfies aup_asc=+∞,adown_asc═ infinity; when the first function satisfies that a is monotonically increasing with y, aup_asc=-∞,adown_ascInfinity, +,; when the second function satisfies that a is monotonically decreasing with y, aup_desc=+∞,adown_desc═ infinity; when the second function satisfies that a is monotonically increasing with y, aup_desc=-∞,adown_desc=+∞;
And 3, setting the coordinate of the previous stored value in the rectangular coordinate system as (0, y)p),ypRepresenting the value, the left end point coordinate of the upper curve door is (0, y)p+ delta), the left end point coordinate of the lower curve door is (0, y)p- δ), δ > 0, the coordinates of the current data to be processed being (x)1,y1),x1Dividing the quotient of 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; according to y1The values of (c) are handled in three cases:
if yp-δ<y1<yp+ δ, by (0, y)p+δ)、(x1,y1) Substituting two points into a second function to obtain a decreaseUpper curve door parameter a of trendup_desc_newTo (0, y)p-δ)、(x1,y1) Two points are substituted into the first function to obtain the lower curve gate parameter a of the rising trenddown_asc_newThen skipping to execute the step 4;
if y1<yp- δ, by (0, y)p+δ)、(x1,y1) Substituting the two points into a second function to obtain an upper curve gate parameter a of a descending trendup_desc_newTo (0, y)p-δ)、(x1,y1) Substituting the two points into a second function to obtain a lower curve gate parameter a of a descending trenddown_desc_newThen skipping to execute the step 4;
if y1>yp+ δ, by (0, y)p+δ)、(x1,y1) Two points are substituted into the first function to obtain the upper curve gate parameter a of the rising trendup_asc_newTo (0, y)p-δ)、(x1,y1) Two points are substituted into the first function to obtain the lower curve gate parameter a of the rising trenddown_asc_newThen skipping to execute the step 4;
step 4, judging based on the parameters obtained in the step 3, updating the parameters based on the judgment result, and skipping to execute the step 5 after updating; wherein, the judgment is carried out based on the parameters obtained in the step 3, and the step of updating the parameters based on the judgment result specifically comprises the following steps:
when the first function satisfies that a is monotonically increasing with y, if aup_asc_new>aup_ascThen a isup_ascIs updated to aup_asc_newOtherwise, aup_ascKeeping the original shape; if a isdown_asc_new<adown_ascThen a isdown_ascIs updated to adown_asc_newOtherwise, adown_ascKeeping the original shape; when the first function satisfies that a is monotonically decreasing with y, if aup_asc_new<aup_ascThen a isup_ascIs updated to aup_asc_newOtherwise, aup_ascKeeping the original shape; if a isdown_asc_new>adown_ascThen a isdown_ascIs updated to adown_asc_newOtherwise, adown_ascKeeping the original shape; when the second function satisfies that a is monotonically increasing with y, if aup_desc_new>aup_descThen a isup_descIs updated to aup_desc_newOtherwise, aup_descKeeping the original shape; if a isdown_desc_new<adown_descThen a isdown_descIs updated to adown_desc_newOtherwise, adown_descKeeping the original shape; when the second function satisfies that a is monotonically decreasing with y, if aup_desc_new<aup_descThen a isup_descIs updated to aup_desc_newOtherwise, aup_descKeeping the original shape; if a isdown_desc_new>adown_descThen a isdown_descIs updated to adown_desc_newOtherwise, adown_descKeeping the original shape; for the parameters which are not obtained in the step 3, maintaining the original values and not updating;
step 5, if aup_asc、adown_asc、aup_desc、adown_descAre not equal to the initial value set in step 2, the DATA to be confirmed is storedpendingAnd resetting the initial parameter a of the upper curve gate with the rising trendup_ascSetting initial parameter a of lower curve door with rising trenddown_ascSetting the initial parameter a of the upper curve gate with the descending trendup_descSetting the initial parameter a of the lower curve gate with the descending trenddown_descTaking the current data to be processed as new data to be processed again, and skipping to execute the step 3;
if a isup_ascAnd adown_descIf the initial value is equal to the initial value set in the step 2, the storage instruction is not triggered, and the DATA to be confirmed is storedpendingUpdating the data to be processed currently, and skipping to execute the step 1;
if none of the above conditions is satisfied, and aup_ascAnd adown_ascIf the initial value is not equal to the initial value set in the step 2, whether the initial value is stored or not needs to be judged: when the first function satisfies that a is monotonically increasing with y, if aup_asc>adown_ascThen stores the DATA to be confirmedpendingAnd resetting the initial parameter a of the upper curve gate with the rising trendup_ascSetting initial parameter a of lower curve door with rising trenddown_ascSetting the initial parameter a of the upper curve gate with the descending trendup_descSetting the initial parameter a of the lower curve gate with the descending trenddown_des□Taking the current DATA to be processed as new DATA to be processed, skipping to execute the step 3, otherwise, taking the DATA to be confirmed as the stored DATA DATApendingUpdating the data to be processed currently, and skipping to execute the step 1; when the first function satisfies that a is monotonically decreasing with y, if aup_asc<adown_ascThen stores the DATA to be confirmedpendingAnd resetting the initial parameter a of the upper curve gate with the rising trendup_ascSetting initial parameter a of lower curve door with rising trenddown_ascSetting the initial parameter a of the upper curve gate with the descending trendup_descSetting the initial parameter a of the lower curve gate with the descending trenddown_descTaking the current DATA to be processed as new DATA to be processed, skipping to execute the step 3, otherwise, taking the DATA to be confirmed as the stored DATA DATApendingUpdating the data to be processed currently, and skipping to execute the step 1;
if none of the above conditions is satisfied, and aup_descAnd adown_descIf the initial value is not equal to the initial value set in the step 2, whether the initial value is stored or not needs to be judged: when the second function satisfies that a is monotonically increasing with y, if aup_desc>adown_descThen stores the DATA to be confirmedpendingAnd resetting the initial parameter a of the upper curve gate with the rising trendup_ascSetting initial parameter a of lower curve door with rising trenddown_ascSetting the initial parameter a of the upper curve gate with the descending trendup_descSetting the initial parameter a of the lower curve gate with the descending trenddown_descTaking the current DATA to be processed as new DATA to be processed, skipping to execute the step 3, otherwise, taking the DATA to be confirmed as the stored DATA DATApendingUpdating the data to be processed currently, and skipping to execute the step 1; when the second function satisfies that a is monotonically decreasing with y, if aup_desc<adown_descThen stores the DATA to be confirmedpendingAnd resetting the upper curve of the rising trendInitial door parameter aup_ascSetting initial parameter a of lower curve door with rising trenddown_ascSetting the initial parameter a of the upper curve gate with the descending trendup_descSetting the initial parameter a of the lower curve gate with the descending trenddown_descTaking the current DATA to be processed as new DATA to be processed, skipping to execute the step 3, otherwise, taking the DATA to be confirmed as the stored DATA DATApendingUpdating the data to be processed currently, and skipping to execute the step 1;
when the initial parameters are set, a is monotonically decreased along with y when the first function satisfiesup_asc=+∞,adown_asc═ infinity; when the first function satisfies that a is monotonically increasing with y, aup_asc=-∞,adown_ascInfinity, +,; when the second function satisfies that a is monotonically decreasing with y, aup_desc=+∞,adown_desc═ infinity; when the second function satisfies that a is monotonically increasing with y, aup_desc=-∞,adown_desc=+∞。
The invention relates to a decompression method of industrial process data, which is based on the compression storage method and comprises the following steps:
step 1, obtaining the requirement for the decompressed data, comprising: start time τstartEnd time τendTime interval tau of decompressing data0;
Step 2, from τstartAt the beginning, at0Until the time is later than tauendStopping the operation; when the data is decompressed one by one, setting the coordinate of the decompressed data at any time to be decompressed as (x)n,yn),xnDividing the difference between the current time to be decompressed and the acquisition time of the previous storage point by the quotient of the sampling interval, wherein the coordinate of the previous storage point is (0, y)prev) The latter storage point coordinate is (x)next,ynext),xnextDividing the difference between the time of the storage point and the acquisition time of the previous storage point by the quotient of the sampling interval;
if a cluster of functions y ═ f is selected during compressiona(x) + b in a curved door, the door is closed at (0,yprev)、(xnext,ynext) Two points into y ═ fa(x) + b, find parameters a and b, and then use xnSubstituting function to obtain corresponding yn;
If the combination of two clusters of functions is selected to construct the curve gate during compression, the judgment is needed, if ynext>yprevThen with (0, y)prev)、(xnext,ynext) Substituting two points into the first function to obtain parameters a and b, and then adding xnSubstituting into the first function to obtain corresponding ynIf y isnext<yprevThen with (0, y)prev)、(xnext,ynext) Substituting the two points into a second function to obtain parameters a and b, and then substituting xnSubstituting into a second function to obtain corresponding yn。
The invention relates to a compression storage system of industrial process data, which comprises:
the acquisition module is used for acquiring industrial process data to be compressed and stored;
the compression storage module is used for performing compression storage on the industrial process data to be compressed and stored, storing a first piece of data in a default mode, acquiring the data to be stored one by one from a last stored value, calculating and comparing function parameters corresponding to an upper curve door and a lower curve door one by one, determining the opening degree of the curve doors, and determining whether the previous piece of data to be stored is stored or not; the curve gate is constructed by one cluster of functions or the combination of two clusters of functions, and the one cluster of functions or the combination of two clusters of functions are selected based on the fluctuation characteristics of the industrial process data to be compressed and stored.
The invention relates to a decompression system of industrial process data, which is based on the decompression method of the invention and comprises the following steps:
the acquisition module is used for acquiring the requirement on the decompressed data, and comprises: start time τstartEnd time τendTime interval tau of decompressing data0;
Decompression module for slave τstartAt the beginning, at0Until the time is later than tauendStopping the operation; it is composed ofIn the method, when the data is decompressed one by one, for any time to be decompressed, the coordinate of the decompressed data at the time is set as (x)n,yn),xnDividing the difference between the current time to be decompressed and the acquisition time of the previous storage point by the quotient of the sampling interval, wherein the coordinate of the previous storage point is (0, y)prev) The latter storage point coordinate is (x)next,ynext),xnextDividing the difference between the time of the storage point and the acquisition time of the previous storage point by the quotient of the sampling interval;
if a cluster of functions y ═ f is selected during compressiona(x) + b when constructing a curved door, with (0, y)prev)、(xnext,ynext) Two points into y ═ fa(x) + b, find parameters a and b, and then use xnSubstituting function to obtain corresponding yn;
If the combination of two clusters of functions is selected to construct the curve gate during compression, the judgment is needed, if ynext>yprevThen with (0, y)prev)、(xnext,ynext) Substituting two points into the first function to obtain parameters a and b, and then adding xnSubstituting into the first function to obtain corresponding ynIf y isnext<yprevThen with (0, y)prev)、(xnext,ynext) Substituting the two points into a second function to obtain parameters a and b, and then substituting xnSubstituting into a second function to obtain corresponding yn。
Compared with the prior art, the invention has the following beneficial effects:
according to the method, a curve gate is constructed by selecting a nonlinear function, the curve gate can replace a linear gate in a traditional revolving gate compression algorithm, linear fitting in the revolving gate compression algorithm is changed into nonlinear fitting essentially, and compared with the existing compression or decompression technology in the field, on one hand, another path for realizing data compression in an industrial process is opened up, namely, a data compression method based on the nonlinear function is provided. On the other hand, the method of the invention also provides a method for realizing data compression or decompression by selecting the function or the function combination which best meets the data characteristics on the basis of meeting the index requirement from the compression or decompression index requirement of practical application.
In the system, a curve gate is constructed by selecting a nonlinear function, the curve gate can replace a linear gate in the traditional revolving gate compression algorithm, the linear fitting in the revolving gate compression algorithm is changed into the nonlinear fitting essentially, and compared with the existing compression or decompression technology in the field, on one hand, another path for realizing data compression in the industrial process is opened up, namely, a data compression method based on the nonlinear function. On the other hand, the system of the invention also provides a method for realizing data compression or decompression by selecting the function or the function combination which best meets the data characteristics on the basis of meeting the index requirement from the compression or decompression index requirement of practical application.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art are briefly introduced below; it is obvious that the drawings in the following description are some embodiments of the invention, and that for a person skilled in the art, other drawings can be derived from them without inventive effort.
FIG. 1 is a schematic flow chart diagram of a method for compressed storage of industrial process data in accordance with an embodiment of the present invention;
FIG. 2 is a schematic diagram illustrating a compression process performed by a curve gate constructed by a cluster of functions according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a compression process using a curve gate constructed by combining two clusters of functions according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The invention is described in further detail below with reference to the accompanying drawings:
the method for compressing and storing the industrial process data, provided by the embodiment of the invention, specifically comprises the following steps:
step 101, acquiring industrial process data to be compressed and stored one by one to form a processing queue; the method specifically comprises the following steps: signals generated by sensors (temperature sensors, pressure sensors, vibration sensors and the like) arranged for monitoring the operation conditions of equipment or systems in the industrial fields of power generation, chemical engineering, metallurgy and the like are input into a computer through a sampling device or a bus interface to form digital quantity, the digital quantity is continuously generated at a fixed sampling frequency and is queued in a processing queue according to time sequence, and data acquired firstly is preceded and data acquired secondly is succeeded.
Step 102, implementing a data compression process: when the data in the processing queue is compressed and stored, storing the first piece of data by default; for the rest data, a curve door is constructed by taking a previous storage value as a left center point, function parameters corresponding to an upper curve door and a lower curve door are calculated and compared, the opening degree of the curve door is determined, whether the last data before the currently processed data is stored is determined, and data compression storage based on a rotating curve door is realized; the curve gate is constructed by one cluster of functions or the combination of two clusters of functions; one or a combination of two cluster functions is selected based on the fluctuation characteristic of the industrial process data to be compressed and stored and the requirement of compression ratio or decompression mean square error. The flow chart refers to fig. 1.
In an embodiment of the present invention, the function form of the cluster of functions is y ═ fa(x) + b; wherein y is a dependent variable, x is an independent variable, a and b are function parameters, and fa(x) Representing a function with a as a unique parameter; the function has monotonicity in the x ∈ [0, + ∞); the function has an intersection point with the y-axis; the function is not a linear function y ═ ax + b; let the intersection of the function and the y-axis be fixed, and x be fixed at any value x greater than 00When corresponding to x0Is continuously varied between (- ∞, + ∞) the parameter a is monotonically increasing or monotonically decreasing with y within its domain of definition. For example, y ═ ax2+ b is a function that satisfies the requirement.
In the embodiment of the invention, when the curve gate constructed by adopting a cluster of functions is used for compressing and storing the data in the processing queue, the first piece of data is stored in a default manner; for other data, a curve door is constructed by taking a previous storage value as a left center point, function parameters corresponding to an upper curve door and a lower curve door are calculated and compared, the opening degree of the curve door is determined, whether the last data before the current data is processed is stored or not is determined, and the data compression storage based on the rotating curve door is realized, and the steps specifically comprise:
step 201, acquiring a piece of acquired data as data to be processed;
step 202, judging whether the value to be stored exists before the data to be processed acquired in step 201: if notDirectly storing the data to be processed obtained in step 201 and setting the initial parameter a of the upper curve gateupSetting the initial parameter a of the lower curve doordownThen, jumping to execute step 201; if yes, skipping to execute step 203; wherein a is monotonically decreasing with yup=+∞,adown═ infinity; when a is monotonically increasing with y, aup=-∞,adown=+∞;
In step 203, the coordinate of the previous stored value in the rectangular coordinate system is set to (0, y)p),ypRepresenting the value, the left end point coordinate of the upper curve door is (0, y)p+ delta), the left end point coordinate of the lower curve door is (0, y)p- δ), δ > 0, the coordinates of the current data to be processed being (x)1,y1) (ii) a With (0, y)p+δ)、(x1,y1) Two point carry-in y ═ fa(x) + b, find the parameter a of the upper curve gateup_newTo (0, y)p-δ)、(x1,y1) Two point carry-in y ═ fa(x) + b, find the parameter a of the lower curve doordown_newThen, jumping to execute step 204; wherein x is1Dividing the quotient of 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;
step 204, judging based on the parameters obtained in step 203, updating the parameters based on the judgment result, and skipping to execute step 205 after updating; wherein, the step of judging based on the parameters obtained in step 203 and updating based on the judgment result specifically comprises: when a monotonically increases with y, if aup_new>aupThen a isupIs updated to aup_newOtherwise, aupKeeping the original shape; if a isdown_new<adownThen a isdownIs updated to adown_newOtherwise, adownKeeping the original shape; when a is monotonically decreasing with y, if a isup_new<aupThen a isupIs updated to aup_newOtherwise, aupKeeping the original shape; if a isdown_new>adownThen a isdownIs updated to adown_newOtherwise, adownIs maintained unchanged;
Step 205, when a is monotonically increased with y, if a is increasedup>adownThen stores the DATA to be confirmedpendingAnd resetting the initial parameter a of the upper curve doorupSet initial parameter a of lower curve gate ═ infinitydownAnd if the DATA to be processed is the new DATA to be processed, jumping to the step 203, otherwise, confirming the DATA to be stored DATApendingUpdating the data to be processed currently, and skipping to execute step 201;
when a is monotonically decreasing with y, if a isup<adownThen stores the DATA to be confirmedpendingAnd resetting the initial parameter a of the upper curve doorupSetting the initial parameter a of the lower curve gate as + ∞downStep 203 is executed by jumping with the current DATA to be processed as new DATA to be processed, otherwise, the DATA to be confirmed is storedpendingUpdating the current data to be processed and skipping to execute step 201.
In the embodiment of the present invention, the combination of the two clusters of functions includes a first function and a second function;
the first function and the second function both have the following properties: the function form is y ═ fa(x) + b; wherein y is a dependent variable, x is an independent variable, a and b are function parameters, and fa(x) Representing a function with a as a unique parameter; the function has monotonicity in the x ∈ [0, + ∞); the function has an intersection point with the y-axis; the function is not a linear function y ═ ax + b;
the first function is monotonically increased in the x ∈ [0, + ∞) interval, and the second function is monotonically decreased in the x ∈ [0, + ∞) interval;
the intersection point of the first function and the y-axis is fixed to be (0, y)0) And x is fixed to an arbitrary value x larger than 00When corresponding to x0Has a y value of (y)0, + ∞) is continuously varied, the parameter a is monotonically increasing or monotonically decreasing with y within its domain of definition; the intersection point of the second function and the y-axis is fixed to be (0, y)0) And x is fixed to an arbitrary value x larger than 00When corresponding to x0Y is in the range (- ∞, y)0) BetweenContinuously, the parameter a is monotonically increasing or monotonically decreasing with y within its domain.
For example, the first function chooses y ═ loga(x +1) + b, where a > 1, and the second function is chosen from y ═ loga(x +1) + b, where 0 < a < 1, is the combination of functions that meet the requirements. Or the first function selects y ═ b + axWherein a is greater than 1,
the second function selects y as b-axWhere a > 1, are also combinations of functions which meet the stated requirements.
In the embodiment of the invention, when the curve gate constructed by combining the two clusters of functions is used for compressing and storing the data in the processing queue, the first piece of data is stored by default; for other data, a curve door is constructed by taking a previous storage value as a left center point, function parameters corresponding to an upper curve door and a lower curve door are calculated and compared, the opening degree of the curve door is determined, whether the last data before the current data is processed is stored or not is determined, and the data compression storage based on the rotating curve door is realized, and the steps specifically comprise:
step 301, acquiring a piece of acquired data as data to be processed;
step 302, determining whether the value to be stored exists before the data to be processed acquired in step 301: if not, directly storing the data to be processed acquired in the step 301, and setting an initial parameter a of an upper curve gate with an ascending trendup_ascSetting initial parameter a of lower curve door with rising trenddown_ascSetting the initial parameter a of the upper curve gate with the descending trendup_descSetting the initial parameter a of the lower curve gate with the descending trenddown_descThen, jumping to execute step 301; if yes, skipping to execute the step 303; wherein a is monotonically decreased with y when the first function satisfies aup_asc=+∞,adown_asc═ infinity; when the first function satisfies that a is monotonically increasing with y, aup_asc=-∞,adown_ascInfinity, +,; when the second function satisfies that a is monotonically decreasing with y, aup_desc=+∞,adown_desc═ infinity; when the second function satisfies that a is monotonically increasing with y, aup_desc=-∞,adown_desc=+∞;
In a step 303, the process is executed,let the coordinate of the previous stored value in the rectangular coordinate system be (0, y)p),ypRepresenting the value, the left end point coordinate of the upper curve door is (0, y)p+ delta), the left end point coordinate of the lower curve door is (0, y)p- δ), δ > 0, the coordinates of the current data to be processed being (x)1,y1),x1Dividing the quotient of 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; according to y1The values of (c) are handled in three cases:
if yp-δ<y1<yp+ δ, by (0, y)p+δ)、(x1,y1) Substituting the two points into a second function to obtain an upper curve gate parameter a of a descending trendup_desc_newTo (0, y)p-δ)、(x1,y1) Two points are substituted into the first function to obtain the lower curve gate parameter a of the rising trenddown_asc_newThen, jump to execute step 304;
if y1<yp- δ, by (0, y)p+δ)、(x1,y1) Substituting the two points into a second function to obtain an upper curve gate parameter a of a descending trendup_desc_newTo (0, y)p-δ)、(x1,y1) Substituting the two points into a second function to obtain a lower curve gate parameter a of a descending trenddown_desc_newThen, jump to execute step 304;
if y1>yp+ δ, by (0, y)p+δ)、(x1,y1) Two points are substituted into the first function to obtain the upper curve gate parameter a of the rising trendup_asc_newTo (0, y)p-δ)、(x1,y1) Two points are substituted into the first function to obtain the lower curve gate parameter a of the rising trenddown_asc_newThen, jump to execute step 304;
step 304, judging based on the parameters obtained in step 303, updating the parameters based on the judgment result, and executing step 305 after updating; wherein, the step of judging based on the parameters obtained in the step 303 and the step of updating the parameters based on the judgment result specifically comprise:
when it comes toA function satisfies that a increases monotonically with y if aup_asc_new>aup_ascThen a isup_ascIs updated to aup_asc_newOtherwise, aup_ascKeeping the original shape; if a isdown_asc_new<adown_ascThen a isdown_ascIs updated to adown_asc_newOtherwise, adown_ascKeeping the original shape; when the first function satisfies that a is monotonically decreasing with y, if aup_asc_new<aup_ascThen a isup_ascIs updated to aup_asc_newOtherwise, aup_ascKeeping the original shape; if a isdown_asc_new>adown_ascThen a isdown_ascIs updated to adown_asc_newOtherwise, adown_ascKeeping the original shape; when the second function satisfies that a is monotonically increasing with y, if aup_desc_new>aup_descThen a isup_descIs updated to aup_desc_newOtherwise, aup_descKeeping the original shape; if a isdown_desc_new<adown_descThen a isdown_descIs updated to adown_desc_newOtherwise, adown_descKeeping the original shape; when the second function satisfies that a is monotonically decreasing with y, if aup_desc_new<aup_descThen a isup_descIs updated to aup_desc_newOtherwise, aup_descKeeping the original shape; if a isdown_desc_new>adown_descThen a isdown_descIs updated to adown_desc_newOtherwise, adown_descKeeping the original shape; for the parameters which are not obtained in the step 303, maintaining the original values and not updating;
step 305, if aup_asc、adown_asc、aup_desc、adown_descAre not equal to the initial value set in step 302, the DATA to be confirmed is storedpendingAnd resetting the initial parameter a of the upper curve gate with the rising trendup_ascSetting initial parameter a of lower curve door with rising trenddown_ascSetting the initial parameter a of the upper curve gate with the descending trendup_descSetting the initial parameter a of the lower curve gate with the descending trenddown_descThe current data to be processed is used as new data againSkipping to execute step 303;
if a isup_ascAnd adown_descIf the initial value is equal to the initial value set in step 302, the storage command is not triggered, and the DATA to be confirmed is storedpendingUpdating the data to be processed currently, and skipping to execute the step 301;
if none of the above conditions is satisfied, and aup_ascAnd adown_ascIf not equal to the initial value set in step 302, it is determined whether to store: when the first function satisfies that a is monotonically increasing with y, if aup_asc>adown_ascThen stores the DATA to be confirmedpendingAnd resetting the initial parameter a of the upper curve gate with the rising trendup_ascSetting initial parameter a of lower curve door with rising trenddown_ascSetting the initial parameter a of the upper curve gate with the descending trendup_descSetting the initial parameter a of the lower curve gate with the descending trenddown_descTaking the current DATA to be processed as new DATA to be processed, skipping to execute step 303, otherwise, taking the DATA to be confirmed as stored DATApendingUpdating the data to be processed currently, and skipping to execute the step 301; when the first function satisfies that a is monotonically decreasing with y, if aup_asc<adown_ascThen stores the DATA to be confirmedpendingAnd resetting the initial parameter a of the upper curve gate with the rising trendup_ascSetting initial parameter a of lower curve door with rising trenddown_ascSetting the initial parameter a of the upper curve gate with the descending trendup_descSetting the initial parameter a of the lower curve gate with the descending trenddown_descTaking the current DATA to be processed as new DATA to be processed, skipping to execute step 303, otherwise, taking the DATA to be confirmed as stored DATApendingUpdating the data to be processed currently, and skipping to execute the step 301;
if none of the above conditions is satisfied, and aup_descAnd adown_descIf not equal to the initial value set in step 302, it is determined whether to store: when the second function satisfies that a is monotonically increasing with y, if aup_desc>adown_descThen store itConfirming the stored DATA DATApendingAnd resetting the initial parameter a of the upper curve gate with the rising trendup_ascSetting initial parameter a of lower curve door with rising trenddown_ascSetting the initial parameter a of the upper curve gate with the descending trendup_descSetting the initial parameter a of the lower curve gate with the descending trenddown_descTaking the current DATA to be processed as new DATA to be processed, skipping to execute step 303, otherwise, taking the DATA to be confirmed as stored DATApendingUpdating the data to be processed currently, and skipping to execute the step 301; when the second function satisfies that a is monotonically decreasing with y, if aup_desc<adown_descThen stores the DATA to be confirmedpendingAnd resetting the initial parameter a of the upper curve gate with the rising trendup_ascSetting initial parameter a of lower curve door with rising trenddown_ascSetting the initial parameter a of the upper curve gate with the descending trendup_descSetting the initial parameter a of the lower curve gate with the descending trenddown_descTaking the current DATA to be processed as new DATA to be processed, skipping to execute step 303, otherwise, taking the DATA to be confirmed as stored DATApendingUpdating the data to be processed currently, and skipping to execute the step 301;
when the initial parameters are set, a is monotonically decreased along with y when the first function satisfiesup_asc=+∞,adown_asc═ infinity; when the first function satisfies that a is monotonically increasing with y, aup_asc=-∞,adown_ascInfinity, +,; when the second function satisfies that a is monotonically decreasing with y, aup_desc=+∞,adown_desc═ infinity; when the second function satisfies that a is monotonically increasing with y, aup_desc=-∞,adown_desc=+∞。
In the embodiment of the present invention, the step of selecting the one cluster of functions or the combination of the two clusters of functions based on the fluctuation characteristic of the industrial process data to be compressed and stored in combination with the requirement for the compression ratio or the decompression mean square error in the practical application specifically includes:
step 401, initially screening several function clusters or function cluster combinations meeting basic requirements, and selecting one function cluster meeting the requirements or two function cluster combinations meeting the requirements;
step 402, collecting 10 the sensor corresponding to the process data to be compressed and stored4Test data of time more than a multiple of a sampling interval;
step 403, if the compression ratio is required by the practical application, respectively using the function clusters or the function cluster combinations in step 1, compressing and decompressing the test data by using the compression method and the decompression method described in the present invention to obtain the compression ratio and the decompression mean square error corresponding to each function cluster or function cluster combination, and adjusting the delta value in the compression method described in the present invention to make the compression ratio corresponding to each function cluster or function cluster combination meet the requirement for the compression ratio in the practical application. On the basis, a function cluster or a function cluster combination with the minimum decompression mean square error when the compression ratio is the same and the corresponding delta value are selected as the final selection result. If the practical application has a requirement on the decompression mean square error, the function clusters or the function cluster combinations in the step 1 are respectively used, the compression method and the decompression method are adopted to compress and decompress the test data to obtain the compression ratio and the decompression mean square error corresponding to each function cluster or function cluster combination, and the decompression mean square error corresponding to each function cluster or function cluster combination can reach the requirement on the decompression mean square error in the practical application by adjusting the delta value in the compression method. On the basis, a function cluster or a function cluster combination with the maximum compression ratio and a corresponding delta value are selected as a final selection result when the decompression mean square error is the same. Wherein the compression ratio is the data length before compression/the data length after compression,(n is the length of the test data, y)iFor the ith original data, the data is processed,for the ith decompressed data).
The method for decompressing the industrial process data, provided by the embodiment of the invention, specifically comprises the following steps:
step 501, obtaining decompressionRequirements for post data, including: start time τstartEnd time τendTime interval tau of decompressing data0;
Step 502, from τstartAt the beginning, at0Until the time is later than tauendStopping the operation; when the data is decompressed one by one, setting the coordinate of the decompressed data at any time to be decompressed as (x)n,yn),xnDividing the difference between the current time to be decompressed and the acquisition time of the previous storage point by the quotient of the sampling interval, wherein the coordinate of the previous storage point is (0, y)prev) The latter storage point coordinate is (x)next,ynext),xnextDividing the difference between the time of the storage point and the acquisition time of the previous storage point by the quotient of the sampling interval;
if a cluster of functions y ═ f is selected during compressiona(x) + b when constructing a curved door, with (0, y)prev)、(xnext,ynext) Two points into y ═ fa(x) + b, find parameters a and b, and then use xnSubstituting function to obtain corresponding yn;
If the combination of two clusters of functions is selected to construct the curve gate during compression, the judgment is needed, if ynext>yprevThen with (0, y)prev)、(xnext,ynext) Substituting two points into the first function to obtain parameters a and b, and then adding xnSubstituting into the first function to obtain corresponding ynIf y isnext<yprevThen with (0, y)prev)、(xnext,ynext) Substituting the two points into a second function to obtain parameters a and b, and then substituting xnSubstituting into a second function to obtain corresponding yn。
In the embodiment of the present invention, further, a cluster of functions y ═ f is selecteda(x) When + b is a curved gate, y is ax2+ b is an example, the specific steps of the compression process are:
601, acquiring a piece of acquired data as data to be processed;
step 602, determining the waiting place obtained in step 601Whether a value is stored before data management: if not, directly storing the data to be processed acquired in the step 601, and setting an initial parameter a of the upper curve gateupSet initial parameter a of lower curve gate ═ infinitydownadownInfinity (because y is ax)2The + b function satisfies the condition that a monotonically increases with y), and then the step 601 is executed; if yes, skipping to execute the step 603;
step 603, setting the coordinate of the previous stored value in the rectangular coordinate system as (0, y)p),ypRepresenting the value, the left end point coordinate of the upper curve door is (0, y)p+ delta), the left end point coordinate of the lower curve door is (0, y)p- δ), δ > 0, the coordinates of the current data to be processed being (x)1,y1) (ii) a With (0, y)p+δ)、(x1,y1) Two point carry-in y ═ ax2+ b, find the parameter a of the upper curve gateup_newTo (0, y)p-δ)、(x1,y1) Two point carry-in y ═ ax2+ b, find the parameter a of the lower curve doordown_newThen, go to execute step 604; wherein x is1Dividing the quotient of 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;
step 604, performing a judgment based on the parameters obtained in step 603, performing a parameter update based on the judgment result, and skipping to execute step 605 after the update, specifically: because y is ax2The + b function satisfies the condition that a monotonically increases with y, so if aup_new>aupThen a isupIs updated to aup_newOtherwise, aupKeeping the original shape; if a isdown_new<adownThen a isdownIs updated to adown_newOtherwise, adownKeeping the original shape;
step 605, because y is ax2The + b function satisfies the condition that a monotonically increases with y, so if aup>adownThen stores the DATA to be confirmedpendingAnd resetting the initial parameter a of the upper curve doorupSet initial parameter a of lower curve gate ═ infinitydownAnd taking the current data to be processed as new data to be processed againDATA, jump to execute step 603, otherwise, store DATA DATA to be confirmedpendingUpdating the data to be processed currently, and skipping to execute the step 601;
referring to fig. 2, as shown in fig. 2, a cluster of functions y-ax is selected2+ b compression process from t0Time of day start, t0Data at time instant is saved by default, t1~t5The data of the moment are all in a channel surrounded by an upper curve door and a lower curve door, and the upper curve door is formed by t0Upper end point and t of initial closing door at time2The value of the time is determined, and the lower curve gate is determined by t0Lower end point and t of initial closing door at moment3The value of time at t6At the moment, the function parameters of the new lower curve gate meet the storage requirements compared with the upper curve gate, and from the view of the graph, t6The data at the time also deviate significantly from the previously formed approximately piecewise parallel curve paths, and therefore for t5Data of time of day is stored from t6A new compression round is started. In the second compression pass, t11The parameters of the upper curve gate determined by the data at that moment satisfy the storage requirements compared to the lower curve gate, so for t10Data of time of day is stored from t11A new compression round is started. During decompression, the first segment is at t0And t5Calculating y as ax based on the time data2The values of a and b parameters of + b, and then the numerical value at any moment in the middle is calculated; the second stage is with t5And t10Calculating y as ax based on the time data2And (c) calculating the values of a and b at any time in the middle.
In the embodiment of the present invention, further, when a curve gate is constructed by combining two clusters of functions, y ═ b + a is selected as the first functionxWhere a > 1, the second function being selected from the group consisting of y-b-axWherein a > 1 is taken as an example, the compression step when two clusters of functions are selected and combined is detailed:
step 701, acquiring a piece of acquired data as data to be processed;
step 702, judging whether the value to be stored exists before the data to be processed acquired in step 701: if it isIf not, directly storing the data to be processed obtained in step 701, and setting an initial parameter a of an upper curve gate with an ascending trendup_ascThe initial parameter a of the lower curve gate of the rising trend is set to ═ infinitydown_ascInfinity (due to the first function y ═ b + a)xSatisfy the condition that a monotonically increases with y); setting initial parameter a of upper curve gate with descending trendup_descSetting the initial parameter a of the lower curve gate of the descending trend as + ∞down_descInfinity (due to the second function y ═ b-a)xSatisfying the condition that a is monotonically decreased with y), and then skipping to execute step 701; if yes, skipping to execute step 703;
step 703, setting the coordinate of the previous stored value in the rectangular coordinate system to be (0, y)p),ypRepresenting the value, the left end point coordinate of the upper curve door is (0, y)p+ delta), the left end point coordinate of the lower curve door is (0, y)p- δ), δ > 0, the coordinates of the current data to be processed being (x)1,y1),x1Dividing the quotient of 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; according to y1The values of (c) are handled in three cases:
if yp-δ<y1<yp+ δ, by (0, y)p+δ)、(x1,y1) Two points into a second function y-b-axIn the middle, the upper curve gate parameter a of the descending trend is obtainedup_desc_newTo (0, y)p-δ)、(x1,y1) Two points into a first function y ═ b + axIn the middle, the lower curve gate parameter a of the rising trend is obtaineddown_asc_newThen, go to execute step 704;
if y1<yp- δ, by (0, y)p+δ)、(x1,y1) Two points into a second function y-b-axIn the middle, the upper curve gate parameter a of the descending trend is obtainedup_desc_newTo (0, y)p-δ)、(x1,y1) Two points into a second function y-b-axIn the method, lower curve gate parameter a of descending trend is obtaineddown_desc_newThen, go to execute step 704;
if y1>yp+ δ, by (0, y)p+δ)、(x1,y1) Two points into a first function y ═ b + axIn the middle, the upper curve gate parameter a of the rising trend is obtainedup_asc_newTo (0, y)p-δ)、(x1,y1) Two points into a first function y ═ b + axIn the middle, the lower curve gate parameter a of the rising trend is obtaineddown_asc_newThen, go to execute step 704;
step 704, performing a judgment based on the parameters obtained in step 703, performing a parameter update based on the judgment result, and skipping to execute step 705 after the update, specifically including: since the first function y is b + axSatisfies the condition that a is monotonically increased with y, so if aup_asc_new>aup_ascThen a isup_ascIs updated to aup_asc_newOtherwise, aup_ascKeeping the original shape; if a isdown_asc_new<adown_ascThen a isdown_ascIs updated to adown_asc_newOtherwise, adown_ascAnd maintained unchanged. Since the second function y is b-axSatisfies the condition that a is monotonically decreased with y, so if aup_desc_new<aup_descThen a isup_descIs updated to aup_desc_newOtherwise, aup_descKeeping the original shape; if a isdown_desc_new>adown_descThen a isdown_descIs updated to adown_desc_newOtherwise, adown_descKeeping the original shape; for the parameters not obtained in step 703, maintaining the original values and not updating;
step 705, if aup_asc、adown_asc、aup_desc、adown_descAre not equal to the initial value set in step 702, the DATA to be confirmed is storedpendingAnd resetting the initial parameter a of the upper curve gate with the rising trendup_ascThe initial parameter a of the lower curve gate of the rising trend is set to ═ infinitydown_ascInfinity (due to the first function y ═ b + a)xSatisfy the condition that a monotonically increases with y); setting initial parameter a of upper curve gate with descending trendup_descSetting the initial parameter a of the lower curve gate of the descending trend as + ∞down_descInfinity (due to the second function y ═ b-a)xSatisfying the condition that a is monotonically decreased along with y), taking the current data to be processed as new data to be processed again, and skipping to execute step 703;
if a isup_ascAnd adown_descIf the initial value is equal to the initial value set in step 702, the storage command is not triggered, and the DATA to be confirmed is storedpendingUpdating the data to be processed currently, and skipping to execute the step 701;
if none of the above conditions is satisfied, and aup_ascAnd adown_ascIf not, the initial value is stored and determined as follows: since the first function y is b + axSatisfies the condition that a is monotonically increased with y, so if aup_asc>adown_ascThen stores the DATA to be confirmedpendingAnd resetting the initial parameter a of the upper curve gate with the rising trendup_ascThe initial parameter a of the lower curve gate of the rising trend is set to ═ infinitydown_ascSetting the initial parameter a of the upper curve gate of the descending trend as + ∞up_descSetting the initial parameter a of the lower curve gate of the descending trend as + ∞down_descStep 703 is skipped to using the current DATA to be processed as new DATA to be processed, otherwise, the DATA to be confirmed is storedpendingUpdating the data to be processed currently, and skipping to execute the step 701;
if none of the above conditions is satisfied, and aup_dscAnd adown_descIf not, the initial value is stored and determined as follows: since the second function y is b-axSatisfies the condition that a is monotonically decreased with y, so if aup_desc<adown_descThen stores the DATA to be confirmedpendingAnd resetting the initial parameter a of the upper curve gate with the rising trendup_ascThe initial parameter a of the lower curve gate of the rising trend is set to ═ infinitydown_ascSetting the initial parameter a of the upper curve gate of the descending trend as + ∞up_descSetting the initial parameter a of the lower curve gate of the descending trend as + ∞down_descTaking the current data to be processed as new data to be processed again as infinity, skipping to execute step 703, otherwise, storing the data to be confirmedDATA storage DATApendingUpdating the current data to be processed, and skipping to execute step 701.
Referring to fig. 3, the first function (y + b + a) is selected as shown in fig. 3xWhere a > 1) and a second function (y ═ b-a)xWherein a > 1), the overall flow is similar to that of FIG. 2, with the main difference that t0~t5The rising trend period and t of the time5~t10The upper gate curve function and the lower gate curve function adopted in the descending trend period of the time are different, the first function is adopted in the former, and the second function is adopted in the latter. At the time of decompression, t0~t5Time and t5~t10The time also needs to be calculated by adopting the first function and the second function respectively.
In summary, the present invention relates to the field of data compression technologies, and in particular, to a real-time compression and storage method for industrial process data, which selects a special non-linear function to construct a curve gate to replace a straight gate in a conventional revolving gate compression algorithm. And during compression, calculating and comparing function parameters corresponding to the upper curve gate and the lower curve gate one by one to determine whether to store the previous data. When decompressing, the decompression value at any intermediate time is obtained by calculating the parameters of the function used for compression. The invention essentially changes linear fitting in the original revolving door compression algorithm into nonlinear fitting, compared with the existing compression technology in the field, on one hand, the invention opens up another path for realizing data compression in the industrial process, namely, a data compression method based on a nonlinear function. On the other hand, the method of the invention also provides a method for realizing data compression or decompression by selecting the function or the function combination which best meets the data characteristics on the basis of meeting the index requirement from the compression or decompression index requirement of practical application.
The following are embodiments of the apparatus of the present invention that may be used to perform embodiments of the method of the present invention. For details of non-careless mistakes in the embodiment of the apparatus, please refer to the embodiment of the method of the present invention.
The compression storage system of the industrial process data, which is provided by the embodiment of the invention, is based on the compression method provided by the invention and comprises the following steps:
the acquisition module is used for acquiring industrial process data to be compressed and stored;
the compression storage module is used for performing compression storage on the industrial process data to be compressed and stored, storing a first piece of data in a default mode, acquiring the data to be stored one by one from a last stored value, calculating and comparing function parameters corresponding to an upper curve door and a lower curve door one by one, determining the opening degree of the curve doors, and determining whether the previous piece of data to be stored is stored or not; the curve gate is constructed by one cluster of functions or the combination of two clusters of functions, and the one cluster of functions or the combination of two clusters of functions are selected based on the fluctuation characteristics of the industrial process data to be compressed and stored.
The decompression system of the industrial process data, which is provided by the embodiment of the invention, is based on the decompression method, and comprises the following steps:
the acquisition module is used for acquiring the requirement on the decompressed data, and comprises: start time τstartEnd time τendTime interval tau of decompressing data0;
Decompression module for slave τstartAt the beginning, at0Until the time is later than tauendStopping the operation; when the data is decompressed one by one, setting the coordinate of the decompressed data at any time to be decompressed as (x)n,yn),xnDividing the difference between the current time to be decompressed and the acquisition time of the previous storage point by the quotient of the sampling interval, wherein the coordinate of the previous storage point is (0, y)prev) The latter storage point coordinate is (x)next,ynext),xnextDividing the difference between the time of the storage point and the acquisition time of the previous storage point by the quotient of the sampling interval;
if a cluster of functions y ═ f is selected during compressiona(x) + b when constructing a curved door, with (0, y)prev)、(xnext,ynext) Two points into y ═ fa(x) + b, find parameters a and b, and then use xnSubstituting function to obtain corresponding yn;
If the combination of two clusters of functions is selected to construct the curve gate during compression, the judgment is needed, if ynext>yprevThen with (0, y)prev)、(xnext,ynext) Substituting two points into the first function to obtain parameters a and b, and then adding xnSubstituting into the first function to obtain corresponding ynIf y isnext<yprevThen with (0, y)prev)、(xnext,ynext) Substituting the two points into a second function to obtain parameters a and b, and then substituting xnSubstituting into a second function to obtain corresponding yn。
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting the same, and although the present invention is described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that: modifications and equivalents may be made to the embodiments of the invention without departing from the spirit and scope of the invention, which is to be covered by the claims.
Claims (9)
1. A method for compressing and storing industrial process data is characterized by comprising the following steps:
acquiring industrial process data to be compressed and stored one by one to form a processing queue;
when the data in the processing queue is compressed and stored, storing the first piece of data by default; for the rest data, a curve door is constructed by taking a previous storage value as a left center point, function parameters corresponding to an upper curve door and a lower curve door are calculated and compared, the opening degree of the curve door is determined, whether the last data before the currently processed data is stored is determined, and data compression storage based on a rotating curve door is realized; the curve gate is constructed by one cluster of functions or the combination of two clusters of functions; one or a combination of two cluster functions is selected based on the fluctuation characteristic of the industrial process data to be compressed and stored and the requirement of compression ratio or decompression mean square error.
2. The method for compressing and storing industrial process data according to claim 1, wherein the step of acquiring the industrial process data to be compressed and stored one by one to form the processing queue specifically comprises:
inputting signals generated by a sensor in the preset industrial field into a computer through a sampling device or a bus interface to form digital quantity; wherein the sensor is a sensor arranged for monitoring an operating condition of a device or system; the digital quantity is continuously generated at a fixed sampling frequency;
and queuing the digital quantity according to the time sequence of the data acquired first before and the data acquired later after to form a processing queue.
3. The method of claim 1, wherein the cluster of functions has a functional form of y-fa(x) + b; wherein y is a dependent variable, x is an independent variable, a and b are function parameters, and fa(x) Representing a function with a as a unique parameter; the function has monotonicity in the x ∈ [0, + ∞); the function has an intersection point with the y-axis; the function is not a linear function y ═ ax + b; let the intersection of the function and the y-axis be fixed, and x be fixed at any value x greater than 00When corresponding to x0Is continuously varied between (- ∞, + ∞) the parameter a is monotonically increasing or monotonically decreasing with y within its domain of definition.
4. The method for compressing and storing industrial process data according to claim 3, wherein when the data in the processing queue is compressed and stored, a first piece of data is stored by default; for other data, a curve door is constructed by taking a previous storage value as a left center point, function parameters corresponding to an upper curve door and a lower curve door are calculated and compared, the opening degree of the curve door is determined, whether the last data before the currently processed data is stored or not is determined, and the step of realizing data compression storage based on the rotating curve door specifically comprises the following steps:
step 1, acquiring a piece of acquired data as data to be processed;
step 2, judging whether the value to be stored exists before the data to be processed acquired in the step 1: if not, directly storing the data to be processed acquired in the step 1, and setting an initial parameter a of the upper curve doorupSetting the initial parameter a of the lower curve doordownThen, skipping to execute the step 1; if yes, skipping to execute the step 3; wherein a is monotonically decreasing with yup=+∞,adown═ infinity; when a is monotonically increasing with y, aup=-∞,adown=+∞;
And 3, setting the coordinate of the previous stored value in the rectangular coordinate system as (0, y)p),ypRepresenting the value, the left end point coordinate of the upper curve door is (0, y)p+ delta), the left end point coordinate of the lower curve door is (0, y)p- δ), δ > 0, the coordinates of the current data to be processed being (x)1,y1) (ii) a With (0, y)p+δ)、(x1,y1) Two point carry-in y ═ fa(x) + b, find the parameter a of the upper curve gateup_newTo (0, y)p-δ)、(x1,y1) Two point carry-in y ═ fa(x) + b, find the parameter a of the lower curve doordown_newThen skipping to execute the step 4; wherein x is1Dividing the quotient of 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;
step 4, judging based on the parameters obtained in the step 3, updating the parameters based on the judgment result, and skipping to execute the step 5 after updating; wherein, the judgment is carried out based on the parameters obtained in the step 3, and the step of updating the parameters based on the judgment result specifically comprises the following steps: when a monotonically increases with y, if aup_new>aupThen a isupIs updated to aup_newOtherwise, aupKeeping the original shape; if a isdown_new<adownThen a isdownIs updated to adown_newOtherwise, adownKeeping the original shape; when a is monotonically decreasing with y, if a isup_new<aupThen a isupIs updated to aup_newOtherwise, aupKeeping the original shape; if a isdown_new>adownThen a isdownIs updated to adown_newOtherwise, adownKeeping the original shape;
step 5, when a is monotonically increased with y, if a is increasedup>adownThen stores the DATA to be confirmedpendingAnd resetting the initial parameter a of the upper curve doorupSet initial parameter a of lower curve gate ═ infinitydownAnd (5) jumping to execute the step (3) by taking the current DATA to be processed as new DATA to be processed again, or else, confirming the stored DATA DATApendingUpdating the data to be processed currently, and skipping to execute the step 1;
when a is monotonically decreasing with y, if a isup<adownThen stores the DATA to be confirmedpendingAnd resetting the initial parameter a of the upper curve doorupSetting the initial parameter a of the lower curve gate as + ∞downStep 3 is skipped to execute with the current DATA to be processed as new DATA to be processed, if not, the DATA to be confirmed is storedpendingUpdating the data to be processed currently, and skipping to execute the step 1.
5. The method of claim 1, wherein the combination of the two clusters of functions comprises a first function and a second function;
the first function and the second function both have the following properties: the function form is y ═ fa(x) + b; wherein y is a dependent variable, x is an independent variable, a and b are function parameters, and fa(x) Representing a function with a as a unique parameter; the function has monotonicity in the x ∈ [0, + ∞); the function has an intersection point with the y-axis; the function is not a linear function y ═ ax + b;
the first function is monotonically increased in the x ∈ [0, + ∞) interval, and the second function is monotonically decreased in the x ∈ [0, + ∞) interval;
the intersection point of the first function and the y-axis is fixed to be (0, y)0) And x is fixed to an arbitrary value x larger than 00When corresponding to x0Has a y value of (y)0, + ∞) is continuously varied, the parameter a is monotonically increasing or monotonically decreasing with y within its domain of definition; the intersection point of the second function and the y-axis is fixed to be (0, y)0) And x is fixed to an arbitrary value x larger than 00When corresponding to x0Y is in the range (- ∞, y)0) In which the parameter a is monotonically increasing or monotonically decreasing with y within its domain.
6. The method for compressing and storing industrial process data according to claim 5, wherein when the data in the processing queue is compressed and stored, a first piece of data is stored by default; for other data, a curve door is constructed by taking a previous storage value as a left center point, function parameters corresponding to an upper curve door and a lower curve door are calculated and compared, the opening degree of the curve door is determined, whether the last data before the currently processed data is stored or not is determined, and the step of realizing data compression storage based on the rotating curve door specifically comprises the following steps:
step 1, acquiring a piece of acquired data as data to be processed;
step 2, judging whether the value to be stored exists before the data to be processed acquired in the step 1: if not, directly storing the data to be processed acquired in the step 1, and setting an initial parameter a of an upper curve gate with an ascending trendup_ascSetting initial parameter a of lower curve door with rising trenddown_ascSetting the initial parameter a of the upper curve gate with the descending trendup_descSetting the initial parameter a of the lower curve gate with the descending trenddown_descThen, skipping to execute the step 1; if yes, skipping to execute the step 3; wherein a is monotonically decreased with y when the first function satisfies aup_asc=+∞,adown_asc═ infinity; when the first function satisfies that a is monotonically increasing with y, aup_asc=-∞,adown_ascInfinity, +,; when the second function satisfies that a is monotonically decreasing with y, aup_desc=+∞,adown_desc═ infinity; when the second function satisfies that a is monotonically increasing with y, aup_desc=-∞,adown_desc=+∞;
Step 3, setting the previous storage value at right angleThe coordinates in the coordinate system are (0, y)p),ypRepresenting the value, the left end point coordinate of the upper curve door is (0, y)p+ delta), the left end point coordinate of the lower curve door is (0, y)p- δ), δ > 0, the coordinates of the current data to be processed being (x)1,y1),x1Dividing the quotient of 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; the treatment is divided into three cases according to the value of y 1:
if yp-δ<y1<yp+ δ, by (0, y)p+δ)、(x1,y1) Substituting the two points into a second function to obtain an upper curve gate parameter a of a descending trendup_desc_newTo (0, y)p-δ)、(x1,y1) Two points are substituted into the first function to obtain the lower curve gate parameter a of the rising trenddown_asc_newThen skipping to execute the step 4;
if y1<yp- δ, by (0, y)p+δ)、(x1,y1) Substituting the two points into a second function to obtain an upper curve gate parameter a of a descending trendup_desc_newTo (0, y)p-δ)、(x1,y1) Substituting the two points into a second function to obtain a lower curve gate parameter a of a descending trenddown_desc_newThen skipping to execute the step 4;
if y1>yp+ δ, by (0, y)p+δ)、(x1,y1) Two points are substituted into the first function to obtain the upper curve gate parameter a of the rising trendup_asc_newTo (0, y)p-δ)、(x1,y1) Two points are substituted into the first function to obtain the lower curve gate parameter a of the rising trenddown_asc_newThen skipping to execute the step 4;
step 4, judging based on the parameters obtained in the step 3, updating the parameters based on the judgment result, and skipping to execute the step 5 after updating; wherein, the judgment is carried out based on the parameters obtained in the step 3, and the step of updating the parameters based on the judgment result specifically comprises the following steps:
when the first function satisfies that a is monotonically increasing with y, if aup_asc_new>aup_ascThen a isup_ascIs updated to aup_asc_newOtherwise, aup_ascKeeping the original shape; if a isdown_asc_new<adown_ascThen a isdown_ascIs updated to adown_asc_newOtherwise, adown_ascKeeping the original shape; when the first function satisfies that a is monotonically decreasing with y, if aup_asc_new<aup_ascThen a isup_ascIs updated to aup_asc_newOtherwise, aup_ascKeeping the original shape; if a isdown_asc_new>adown_ascThen a isdown_ascIs updated to adown_asc_newOtherwise, adown_ascKeeping the original shape; when the second function satisfies that a is monotonically increasing with y, if aup_desc_new>aup_descThen a isup_descIs updated to aup_desc_newOtherwise, aup_descKeeping the original shape; if a isdown_desc_new<adown_descThen a isdown_descIs updated to adown_desc_newOtherwise, adown_descKeeping the original shape; when the second function satisfies that a is monotonically decreasing with y, if aup_desc_new<aup_descThen a isup_descIs updated to aup_desc_newOtherwise, aup_descKeeping the original shape; if a isdown_desc_new>adown_descThen a isdown_descIs updated to adown_desc_newOtherwise, adown_descKeeping the original shape; for the parameters which are not obtained in the step 3, maintaining the original values and not updating;
step 5, if aup_asc、adown_asc、aup_desc、adown_descAre not equal to the initial value set in step 2, the DATA to be confirmed is storedpendingAnd resetting the initial parameter a of the upper curve gate with the rising trendup_ascSetting initial parameter a of lower curve door with rising trenddown_ascSetting the initial parameter a of the upper curve gate with the descending trendup_descSetting the initial parameter a of the lower curve gate with the descending trenddown_descTaking the current data to be processed as new data to be processed again, and skipping to execute the step 3;
if a isup_ascAnd adown_descIf the initial value is equal to the initial value set in the step 2, the storage instruction is not triggered, and the DATA to be confirmed is storedpendingUpdating the data to be processed currently, and skipping to execute the step 1;
if none of the above conditions is satisfied, and aup_ascAnd adown_ascIf the initial value is not equal to the initial value set in the step 2, whether the initial value is stored or not needs to be judged: when the first function satisfies that a is monotonically increasing with y, if aup_asc>adown_ascThen stores the DATA to be confirmedpendingAnd resetting the initial parameter a of the upper curve gate with the rising trendup_ascSetting initial parameter a of lower curve door with rising trenddown_ascSetting the initial parameter a of the upper curve gate with the descending trendup_descSetting the initial parameter a of the lower curve gate with the descending trenddown_descTaking the current DATA to be processed as new DATA to be processed, skipping to execute the step 3, otherwise, taking the DATA to be confirmed as the stored DATA DATApendingUpdating the data to be processed currently, and skipping to execute the step 1; when the first function satisfies that a is monotonically decreasing with y, if aup_asc<adown_ascThen stores the DATA to be confirmedpendingAnd resetting the initial parameter a of the upper curve gate with the rising trendup_ascSetting initial parameter a of lower curve door with rising trenddown_ascSetting the initial parameter a of the upper curve gate with the descending trendup_descSetting the initial parameter a of the lower curve gate with the descending trenddown_descTaking the current DATA to be processed as new DATA to be processed, skipping to execute the step 3, otherwise, taking the DATA to be confirmed as the stored DATA DATApendingUpdating the data to be processed currently, and skipping to execute the step 1;
if none of the above conditions is satisfied, and aup_descAnd adown_descIf the initial value is not equal to the initial value set in the step 2, whether the initial value is stored or not needs to be judged: when the second function satisfies that a is monotonically increasing with y, if aup_desc>adown_descThen stores the DATA to be confirmedpendingAnd resetting the initial parameter a of the upper curve gate with the rising trendup_ascSetting initial parameter a of lower curve door with rising trenddown_ascSetting the initial parameter a of the upper curve gate with the descending trendup_descSetting the initial parameter a of the lower curve gate with the descending trenddown_descTaking the current DATA to be processed as new DATA to be processed, skipping to execute the step 3, otherwise, taking the DATA to be confirmed as the stored DATA DATApendingUpdating the data to be processed currently, and skipping to execute the step 1; when the second function satisfies that a is monotonically decreasing with y, if aup_desc<adown_descThen stores the DATA to be confirmedpendingAnd resetting the initial parameter a of the upper curve gate with the rising trendup_ascSetting initial parameter a of lower curve door with rising trenddown_ascSetting the initial parameter a of the upper curve gate with the descending trendup_descSetting the initial parameter a of the lower curve gate with the descending trenddown_descTaking the current DATA to be processed as new DATA to be processed, skipping to execute the step 3, otherwise, taking the DATA to be confirmed as the stored DATA DATApendingUpdating the data to be processed currently, and skipping to execute the step 1;
when the initial parameters are set, a is monotonically decreased along with y when the first function satisfiesup_asc=+∞,adown_asc═ infinity; when the first function satisfies that a is monotonically increasing with y, aup_asc=-∞,adown_ascInfinity, +,; when the second function satisfies that a is monotonically decreasing with y, aup_desc=+∞,adown_desc═ infinity; when the second function satisfies that a is monotonically increasing with y, aup_desc=-∞,adown_desc=+∞。
7. A method for decompressing industrial process data, characterized in that, based on the compression storage method of any one of claims 1 to 6, it comprises the following steps:
step 1, obtaining the requirement for the decompressed data, comprising: start time τstartEnd time τendTime interval tau of decompressing data0;
Step 2, from τstartAt the beginning, at0Until the time is later than tauendStopping the operation; when the data is decompressed one by one, setting the coordinate of the decompressed data at any time to be decompressed as (x)n,yn),xnDividing the difference between the current time to be decompressed and the acquisition time of the previous storage point by the quotient of the sampling interval, wherein the coordinate of the previous storage point is (0, y)prev) The latter storage point coordinate is (x)next,ynext),xnextDividing the difference between the time of the storage point and the acquisition time of the previous storage point by the quotient of the sampling interval;
if a cluster of functions y ═ f is selected during compressiona(x) + b when constructing a curved door, with (0, y)prev)、(xnext,ynext) Two points into y ═ fa(x) + b, find parameters a and b, and then use xnSubstituting function to obtain corresponding yn;
If the combination of two clusters of functions is selected to construct the curve gate during compression, the judgment is needed, if ynext>yprevThen with (0, y)prev)、(xnext,ynext) Substituting two points into the first function to obtain parameters a and b, and then adding xnSubstituting into the first function to obtain corresponding ynIf y isnext<yprevThen with (0, y)prev)、(xnext,ynext) Substituting the two points into a second function to obtain parameters a and b, and then substituting xnSubstituting into a second function to obtain corresponding yn。
8. A system for compressed storage of industrial process data, comprising:
the acquisition module is used for acquiring industrial process data to be compressed and stored;
the compression storage module is used for performing compression storage on the industrial process data to be compressed and stored, storing a first piece of data in a default mode, acquiring the data to be stored one by one from a last stored value, calculating and comparing function parameters corresponding to an upper curve door and a lower curve door one by one, determining the opening degree of the curve doors, and determining whether the previous piece of data to be stored is stored or not; the curve gate is constructed by one cluster of functions or the combination of two clusters of functions, and the one cluster of functions or the combination of two clusters of functions are selected based on the fluctuation characteristics of the industrial process data to be compressed and stored.
9. A system for decompressing industrial process data, based on the method of claim 7, comprising:
the acquisition module is used for acquiring the requirement on the decompressed data, and comprises: start time τstartEnd time τendTime interval tau of decompressing data0;
Decompression module for slave τstartAt the beginning, at0Until the time is later than tauendStopping the operation; when the data is decompressed one by one, setting the coordinate of the decompressed data at any time to be decompressed as (x)n,yn),xnDividing the difference between the current time to be decompressed and the acquisition time of the previous storage point by the quotient of the sampling interval, wherein the coordinate of the previous storage point is (0, y)prev) The latter storage point coordinate is (x)next,ynext),xnextDividing the difference between the time of the storage point and the acquisition time of the previous storage point by the quotient of the sampling interval;
if a cluster of functions y ═ f is selected during compressiona(x) + b when constructing a curved door, with (0, y)prev)、(xnext,ynext) Two points into y ═ fa(x) + b, find parameters a and b, and then use xnSubstituting function to obtain corresponding yn;
If the combination of two clusters of functions is selected to construct the curve gate during compression, the judgment is needed, if ynext>yprevThen with (0, y)prev)、(xnext,ynext) Substituting two points into the first function to obtain parameters a and b, and then adding xnSubstituting into the first function to obtain corresponding ynIf y isnext<yprevThen with (0, y)prev)、(xnext,ynext) Substituting two points into a second function to obtainObtaining parameters a and b, and then adding xnSubstituting into a second function to obtain corresponding yn。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111277563.1A CN114006618A (en) | 2021-10-29 | 2021-10-29 | Compression storage method and system, and decompression method and system for industrial process data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111277563.1A CN114006618A (en) | 2021-10-29 | 2021-10-29 | Compression storage method and system, and decompression method and system for industrial process data |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114006618A true CN114006618A (en) | 2022-02-01 |
Family
ID=79925716
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111277563.1A Pending CN114006618A (en) | 2021-10-29 | 2021-10-29 | Compression storage method and system, and decompression method and system for industrial process data |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114006618A (en) |
-
2021
- 2021-10-29 CN CN202111277563.1A patent/CN114006618A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108874637A (en) | A kind of method of pressure test, system, electronic equipment and readable storage medium storing program for executing | |
CN112667407B (en) | Processor parameter adjusting method and device, electronic equipment and storage medium | |
US9646111B2 (en) | Process monitoring system and method | |
CN112215442B (en) | Method, system, device and medium for predicting short-term load of power system | |
WO2021169271A1 (en) | Training method for thunderstorm weather prediction model, and thunderstorm weather prediction method | |
CN105243456A (en) | Decision tree and expert system-based short-term power load forecasting system and method | |
US20220245096A1 (en) | Method and device for facilitating storage of data from an industrial automation control system or power system | |
CN112506663A (en) | Cloud server CPU load prediction method, system and medium based on denoising and error correction | |
CN114006618A (en) | Compression storage method and system, and decompression method and system for industrial process data | |
CN117090758B (en) | Energy-saving control method and system for air compressor | |
EP2590038B1 (en) | Method and System for storage of data collected from a real time process | |
CN110874635A (en) | Deep neural network model compression method and device | |
WO2024093207A1 (en) | Time series data processing method and apparatus, device, and nonvolatile readable storage medium | |
CN114282658B (en) | Method, device and medium for analyzing and predicting flow sequence | |
CN107783990B (en) | Data compression method and terminal | |
CN112486683B (en) | Processor control method, control apparatus, and computer-readable storage medium | |
CN115274023A (en) | Method and device for predicting optimal performance of alloy and electronic equipment | |
Wei et al. | Fork: A forward-looking actor for model-free reinforcement learning | |
CN107732403B (en) | Intelligent adjusting method and intelligent adjusting device for radio frequency device | |
CN110633844B (en) | Building energy system simulation prediction method based on EMD and ANN and application | |
Milman et al. | Evaluation of a new algorithm for model predictive control based on non-feasible search directions using premature termination | |
CN111786824A (en) | Data center energy efficiency ratio optimization method, system, equipment and readable storage medium | |
CN117858479B (en) | Method for updating weight relation of air conditioner on environmental temperature in real time | |
JP6555505B2 (en) | Power management system and power management method | |
CN113053405B (en) | Audio original data processing method and device based on audio scene |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |