CN115664425A - Signal monitoring system analog quantity compression storage method and system based on specified precision - Google Patents

Signal monitoring system analog quantity compression storage method and system based on specified precision Download PDF

Info

Publication number
CN115664425A
CN115664425A CN202211367074.XA CN202211367074A CN115664425A CN 115664425 A CN115664425 A CN 115664425A CN 202211367074 A CN202211367074 A CN 202211367074A CN 115664425 A CN115664425 A CN 115664425A
Authority
CN
China
Prior art keywords
compression
analog quantity
data
fitting function
point
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
Application number
CN202211367074.XA
Other languages
Chinese (zh)
Inventor
郭亚磊
赵海东
朱英杰
蔚玲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Henan Splendor Science and Technology Co Ltd
Original Assignee
Henan Splendor Science and Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Henan Splendor Science and Technology Co Ltd filed Critical Henan Splendor Science and Technology Co Ltd
Priority to CN202211367074.XA priority Critical patent/CN115664425A/en
Publication of CN115664425A publication Critical patent/CN115664425A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The invention provides a signal monitoring system analog quantity compression storage method and a system based on specified precision, wherein the method comprises the following steps: step 1, loading a system analog quantity precision parameter epsilon, and configuring a data block with a time length of T; step 2, reading an original data block from the buffer data based on the data block time length T; step 3, determining specific data; step 4, performing fitting calculation on the read analog quantity data according to a pre-configured compression fitting function, and calculating an error delta corresponding to the analog quantity; step 5, respectively determining a compression start point, a compression end point, a compression frame duration and a target compression function; step 6, generating a new compressed data frame based on the determined compression end point, the compressed frame duration and the target compression function; wherein the compressed data frame includes a target compression function flag, a compressed frame duration, and a unique data point. Therefore, the invention can realize the compression and the reduction of the analog quantity data of the monitoring system.

Description

Signal monitoring system analog quantity compression storage method and system based on specified precision
Technical Field
The invention relates to the technical field of railway control, in particular to a signal monitoring system analog quantity compression storage method and system based on specified precision.
Background
The railway signal monitoring system is important driving equipment which ensures driving safety, strengthens the management of a signal equipment joint part and monitors the application quality of railway signal equipment. The signal microcomputer monitoring system integrates the modern latest technology, sensors, field buses, computer network communication, databases and software engineering into a whole, collects and monitors the operation parameters of various equipment in a station in real time, analyzes the operation state of the equipment, gives an alarm when the equipment has a state change endangering the traffic safety, assists the station attendant in troubleshooting, ensures the traffic safety of the railway, can analyze according to various recorded data afterwards, and determines the reason and responsibility division of the accident, so the signal microcomputer monitoring system is important traffic safety equipment of the railway signal monitoring system.
Data monitored by a signal monitoring system can be divided into two categories of switching value data and analog quantity, wherein the switching value data mainly comprise relay states or lamp states and the like, and the analog quantity mainly comprises monitoring data of voltages, currents, frequencies, powers and the like of various devices. The general sampling period of the signal (microcomputer) monitoring system is 1 second, and the storage time is 30 days, so that the amount of stored data is huge, the space of a disk is occupied, and the subsequent retrieval time is long.
Therefore, how to perform compression storage and fast and accurate access of massive analog quantities becomes an urgent problem to be solved under the condition of meeting the requirement of system precision.
In order to solve the above problems, people always seek an ideal technical solution.
Disclosure of Invention
The invention aims to overcome the defects in the prior art, and provides a method and a system for compressing and storing analog quantity of a signal monitoring system based on specified precision.
In order to achieve the purpose, the invention adopts the technical scheme that:
the invention provides a signal monitoring system analog quantity compression storage method based on specified precision, which comprises the following steps:
step 1, loading a system analog quantity precision parameter epsilon, and configuring a data block with a time length of T;
step 2, reading an original data block from the buffer data based on the data block time length T, wherein the analog quantity data in the original data block is expressed as { (T) 0 ,y 0 ),(t 1 ,y 1 ),…,(t m ,y m ),(m>=1)};
Wherein, t 0 To t m Acquisition time point, y, representing an analog quantity 0 To y m The analog quantity acquired by the signal monitoring system at different acquisition time points is represented;
step 3, checking the read specific data in the analog quantity; the specific data comprise analog quantity collected at an alarm time point;
step 4, performing fitting calculation on the read analog quantity data according to a pre-configured compression fitting function, and calculating an error delta corresponding to each analog quantity except the specific data;
the error delta corresponding to the specific data is pre-configured to be 0, and the error delta corresponding to each analog quantity except the specific data refers to a difference value between the analog quantity acquired by the signal monitoring system and the corresponding compression fitting function value;
step 5, respectively determining a compression start point and a compression stop point, a compression frame duration and a target compression function based on the error delta calculated in the step 4;
step 6, generating a new compressed data frame based on the determined compression end point, the compression frame duration and the target compression function;
wherein the compressed data frame comprises a target compression function mark, a compressed frame duration and specific data points, and the specific data points comprise an alarm data point, a compression start data point and a compression end data point.
The invention provides a signal monitoring system analog quantity compressed storage system based on specified precision, which comprises a configuration module, a data reading module, a specific data detection module, an error calculation module, a target compression function determination module and a compressed data frame generation module, wherein,
the configuration module is used for loading a system analog quantity precision parameter epsilon, and the duration of a configuration data block is T;
the data reading module is used for reading an original data block from the buffer data based on the data block time length T, and analog quantity data in the original data block is represented as { (T) 0 ,y 0 ),(t 1 ,y 1 ),…,(t m ,y m ),(m>= 1) }; wherein, t 0 To t m Acquisition time point, y, representing an analog quantity 0 To y m The analog quantity acquired by the signal monitoring system at different acquisition time points is represented;
the specific data detection module is used for checking the read specific data in the analog quantity; wherein the specific data comprise analog quantity collected at alarm time points;
the error calculation module is used for performing fitting calculation on the read analog quantity data according to a pre-configured compression fitting function, and calculating errors delta corresponding to all analog quantities except the specific data; the error delta corresponding to the specific data is pre-configured to be 0, and the error delta corresponding to each analog quantity except the specific data refers to a difference value between the analog quantity acquired by the signal monitoring system and the corresponding compression fitting function value;
the target compression function determining module is used for respectively determining a compression start point and a compression stop point, a compression frame duration and a target compression function based on the error delta calculated by the error calculating module;
the compressed data frame generation module generates a new compressed data frame based on the determined compression end point, the compression frame duration and the target compression function; wherein the compressed data frame comprises a target compression function mark, a compressed frame time length and specific data points, and the specific data points comprise an alarm data point, a compression start data point and a compression end data point.
A third aspect of the present invention provides a signal monitoring system analog quantity compression storage device based on specified precision, which includes a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above general signal monitoring system analog quantity compression storage method based on specified precision.
A fourth aspect of the present invention provides a readable storage medium, on which instructions are stored, which when executed by a processor implement the steps of the analog compression storage method for a signal monitoring system based on specified accuracy as described above.
Compared with the prior art, the invention has prominent substantive characteristics and remarkable progress, particularly:
1) The invention provides a signal monitoring system analog quantity compression storage method and system based on specified precision, which skillfully utilize a fitting function to carry out compression storage, reading and reduction on the analog quantity of a signal monitoring system, thereby realizing the compression and reduction of the analog quantity data of the monitoring system under the specified precision, reducing the analog quantity storage occupation and improving the speed of reading the analog quantity data;
2) According to the method, historical analog quantity data are analyzed through a big data technology, a fitting function with high compression degree is screened out, and a large amount of redundant analog quantity data are reduced;
3) According to the invention, through the specific point information setting, the accurate data storage of the related analog quantity at the alarm moment is met, so that the specific accuracy requirement of the specific point is considered, and the condition that the data are inconsistent in the system performance is avoided.
Drawings
FIG. 1 is a flow chart of the analog quantity compressed storage method of the signal monitoring system based on specified precision of the invention;
fig. 2 to 4 are schematic structural diagrams of the analog quantity compressed storage system of the signal monitoring system based on the specified precision in the invention.
Detailed Description
The technical solution of the present invention is further described in detail by the following embodiments.
Example 1
As shown in fig. 1, the analog quantity compression storage method of the signal monitoring system comprises the following steps:
step 1, loading a system analog quantity precision parameter epsilon, and configuring a data block with time length of T;
step 2, reading an original data block from the buffer data based on the data block time length T,the analog data in the original data block is represented as { (t) 0 ,y 0 ),(t 1 ,y 1 ),…,(t m ,y m ),(m>=1)};
Wherein, t 0 To t m Points in time of acquisition, y, representing the analog quantity 0 To y m Representing analog quantities acquired by a signal monitoring system at different acquisition time points;
step 3, checking the read specific data in the analog quantity; wherein the specific data comprise analog quantity collected at alarm time points;
step 4, performing fitting calculation on the read analog quantity data according to a pre-configured compression fitting function, and calculating an error delta corresponding to each analog quantity except the specific data;
the error delta corresponding to the specific data is pre-configured to be 0, and the error delta corresponding to each analog quantity except the specific data refers to a difference value between the analog quantity acquired by the signal monitoring system and the corresponding compression fitting function value;
step 5, respectively determining a compression start point and a compression stop point, a compression frame duration and a target compression function based on the error delta calculated in the step 4;
step 6, generating a new compressed data frame based on the determined compression end point, the compression frame duration and the target compression function;
wherein the compressed data frame comprises a target compression function mark, a compressed frame duration and specific data points, and the specific data points comprise an alarm data point, a compression start data point and a compression end data point.
Further, in step 4, when performing fitting calculation on the read analog data, the following steps are performed:
obtaining a fitting function of a preset compression algorithm, wherein the preset compression fitting function comprises a first compression fitting function Y n1 Second compressive fitting function Y n2 And a third compression fitting function Y n3 (ii) a The first compressive fitting function Y n1 =y 0 +(y n -y 0 ) Δ t/n, the second compression fitting function Y n2 =y 0 +(y n -y 0 ) Δ t/n + ε sin (π Δ t/n), the third compression fitting function Y n3 =y 0 +(y n -y 0 ) Δ t/n- ε sin (π Δ t/n); in the above formula, y 0 Indicates the start of compression t 0 Analog quantity, y, collected n Indicates the end point t of compression n The analog quantity is collected, delta t represents the number of seconds spanned by compression, n is the distance t from the compression starting point 0 The total seconds of the system, epsilon is a preset system analog quantity precision parameter;
sequentially reading analog quantity from the original data block, and when a new analog quantity is read, based on the read first analog quantity y 0 Last analog quantity y n And t from the compression start point 0 N, and a preset first compression fitting function Y n1 Second compressive fitting function Y n2 And a third compression fitting function Y n3 Three new compression fitting functions are calculated again;
after three new compression fitting functions are calculated, the acquisition time points t for reading the analog quantity are respectively calculated 1 To t n-1 And the compression start point t 0 Time difference Δ t therebetween i '; will calculate the time difference Deltat i The values are used as independent variables and are respectively substituted into three new compression fitting functions to obtain corresponding compression fitting function values; wherein i is more than or equal to 1 and less than or equal to n-1;
and calculating a difference value between the compression fitting function value and the read corresponding analog quantity, and taking the difference value as an error delta of the analog quantity.
It will be appreciated that each time a new analog is read, the compression fit function will be based on the compression start point t 0 The analog quantity y collected 0 The last analog read y n The preset system analog quantity precision parameters and the acquisition time point t n And t 0 The time difference (less than or equal to the data block duration T) between the data blocks, and the like, and the updating is carried out once correspondingly;
for example, the first compression fitting function Y n1 For linear fitting, by compressing the starting point t 0 The analog quantity y collected 0 And acquisition time t n The analog quantity y collected n And t n And t 0 The time difference between the two points determines a line segment, analog quantity except the specific data between the start point and the stop point does not need to be stored when compressed data is stored subsequently, and the data between the start point and the stop point can also determine the value corresponding to the analog quantity according to the value of the point coordinate on the line segment when compressed data is stored subsequently.
It should be noted that, in this embodiment, when the analog quantity is compressed, several specified compression fitting functions are calculated synchronously, and the target compression fitting function is determined according to the error δ calculated in step 4;
when two analog quantities are read, the corresponding error delta of the two analog quantities is 0; when three analog quantities are read, if the corresponding error delta meets the preset precision condition, reading a fourth analog quantity, and if the corresponding error delta does not meet the preset precision condition, compressing and storing the first two analog quantities; then, the read analog quantity is processed according to the method;
specifically, in step 5, when the compression start/stop point, the compression frame duration, and the target compression function are respectively determined based on the error δ calculated in step 4, the following steps are performed:
obtaining the calculated errors delta, wherein the error delta corresponding to each new compression fitting function comprises n-1 errors delta;
when the error delta corresponding to at least one compression fitting function meets a preset precision condition, and the compression fitting function meeting the preset precision condition is consistent with the previous compression fitting function meeting the preset precision condition, reading a new analog quantity from the original data block, recalculating three new compression fitting functions, corresponding compression fitting function values and the error delta of the analog quantity, and re-judging whether the error delta meets the preset precision condition;
when the error delta corresponding to at least one compression fitting function meets the preset precision condition, the compression fitting function meeting the preset precision condition is inconsistent with the previous compression fitting function meeting the preset precision condition, or the error delta corresponding to three new compression fitting functions does not meet the preset precision condition, the read analog quantity y is read n-1 And taking the corresponding acquisition time point as a compression end point, and taking the acquisition time point t n-1 And the compression start point t 0 The time difference is used as the compressed frame duration, and the previous compression fitting function meeting the preset precision condition is used as a target compression function;
wherein, the former compression fitting function meeting the preset precision condition refers to the data sequence { (t) 0 ,y 0 ),(t 1 ,y 1 ),…,(t n-1 ,y n-1 ),(n>= 2) } corresponding compression fitting function.
The embodiment selects the target compression function of each frame of compressed data frame according to the analog quantity precision parameter epsilon, thereby meeting the aim of maximum compression of data.
It should be noted that the target compression function is not fixed, but dynamically changed; after a compressed data frame is obtained, the new set of compression fitting functions corresponding to the analog data needs to be recalculated, so that the target compression functions corresponding to each compressed data frame in an original data block may be different.
It can be understood that, for the storage of the analog quantity of the current signal microcomputer monitoring system, the embodiment firstly determines a system analog quantity precision parameter epsilon, then caches the analog quantity data for a certain time, selects a proper compression fitting function according to the system analog quantity precision parameter epsilon, makes errors between all data points and a fitting function value smaller than the system analog quantity precision parameter epsilon, then tries to expand a compressed data range, if a preset precision condition is met, continues, otherwise, stores the compressed frame data, and stores the compressed data when the compressed data reaches a certain size, thereby realizing the compression and restoration of the monitoring system analog quantity data under the specified precision;
therefore, the invention realizes the compression and the reduction of the analog data of the monitoring system under the specified precision by adopting the optimized compression and reduction algorithm, improves the loading and reading speed of the analog historical data and reduces the analog storage occupation.
Example 2
It should be noted that, on the basis of the analog writing compression method in embodiment 1, this embodiment further sets an analog reading reduction method, where different target fitting functions correspond to different reduction functions, a target compression function flag is noted in a frame of compressed data, a decompression algorithm corresponding to the target compression function flag is adopted during decompression, and specific time data is returned by specifying a read instruction;
specifically, the analog quantity compression storage method of the signal monitoring system based on the specified precision further includes:
step 7, when the analog data in the original data block are all compressed, or the data are not compressed and the data length of the compressed data frame exceeds a threshold value, writing the obtained compressed data frame into a specified storage space;
step 8, monitoring whether an analog quantity reading request is read or not in real time, wherein the analog quantity reading request comprises an analog quantity acquisition time point;
after receiving an analog quantity reading request, analyzing an analog quantity acquisition time point in the analog quantity reading request;
judging whether the analyzed analog quantity acquisition time point is the acquisition time point corresponding to the specific data or not, wherein the acquisition time point corresponding to the specific data comprises a compression starting time point, a compression ending time point and an alarm time point;
if yes, directly reading corresponding analog quantity from the compressed data frame;
otherwise, calculating the analog quantity of the corresponding time point according to the target compression function mark, the compression frame time length, the specific data point and the analyzed analog quantity acquisition time point in the compressed data frame.
It can be understood that the compressed data frame does not store error value information, and stores a target compression function mark, start and stop point data and the like, and analog quantity data is restored according to the start and stop points, the target compression function mark and the like when data is read; because the error is determined to meet the requirement when the target compression function is selected, the reduction can be directly carried out by using the fitting function during the reduction, and the error between the reduced data and the original data is less than the analog quantity precision parameter epsilon, so that the accuracy of the subsequent data analysis is improved.
It should be noted that the specific data in the compressed data frame is set for ensuring the consistency of the compressed data restoration display, and the specific point directly stores the original value and the corresponding acquisition time during the compressed storage, so that the specific time data can be directly restored during the restoration. In addition, the data at the compression start time point and the compression end time point also need to be stored as original values, and may be regarded as the unique data, that is, the unique data time is equal to the compression start time or the compression end time.
After the specific data are checked out in the step 3, the specific data are stored in a specific data queue, and when a compressed data frame is generated, the specific data in the specific data queue are attached to the tail part of the compressed data frame, so that not only is the consistency of system data ensured, but also the requirement of the specific data can be ensured by configuring the description of analog quantity specific data at a special moment in a compressed attachment section;
it can be understood that the alarm generation includes the analog quantity of the alarm time, if the data at the time is compressed, the reduced value is within the error range, but the values are slightly different, which may lead to user ambiguity; therefore, when the analog quantity of the signal monitoring system is compressed, the specific data is directly and originally stored, and the error is recorded in zero when the error is calculated.
Example 3
On the basis of the above description of the embodiments, the present embodiment provides a specific implementation of the analog compression storage system of the signal monitoring system based on the specified precision;
as shown in fig. 2, the analog quantity compressed storage system of the signal monitoring system comprises a configuration module, a data reading module, a specific data detection module, an error calculation module, a target compression function determination module and a compressed data frame generation module, wherein,
the configuration module is used for loading a system analog quantity precision parameter epsilon, and the duration of a configuration data block is T;
the data reading module is used for reading an original data block from the buffer data based on the data block time length T, and the analog quantity data in the original data block is represented as { (T) 0 ,y 0 ),(t 1 ,y 1 ),…,(t m ,y m ),(m>= 1) }; wherein, t 0 To t m The acquisition time point of the analog quantity is represented,y 0 to y m Representing analog quantities acquired by a signal monitoring system at different acquisition time points;
the specific data detection module is used for checking the read specific data in the analog quantity; wherein the specific data comprise analog quantity collected at alarm time points;
the error calculation module is used for performing fitting calculation on the read analog quantity data according to a pre-configured compression fitting function and calculating an error delta corresponding to each analog quantity except the specific data; the error delta corresponding to the specific data is preset to be 0, and the error delta corresponding to each analog quantity except the specific data refers to a difference value between the analog quantity acquired by the signal monitoring system and the corresponding compression fitting function value;
the target compression function determining module is used for respectively determining a compression start point and a compression stop point, a compression frame duration and a target compression function based on the error delta calculated by the error calculating module;
the compressed data frame generation module generates a new compressed data frame based on the determined compression end point, the compression frame duration and the target compression function; wherein the compressed data frame comprises a target compression function mark, a compressed frame time length and specific data points, and the specific data points comprise an alarm data point, a compression start data point and a compression end data point.
It can be understood that a plurality of original data blocks usually exist in the cache data of the signal monitoring system, each original data block usually has a plurality of paths of analog quantity data, each path of analog quantity data is compressed according to the compression method, one path of analog quantity data may correspond to multi-frame compressed data after completing compression calculation, the compressed data storage does not generally span data blocks, the compressed data corresponding to an original data block with a data block duration of T is usually stored together, and does not span the data block duration of T, so the design is mainly designed for convenient retrieval during playback.
For example, setting a data block duration T to 2 minutes, reading a 2-minute original data block from the buffered data, where the original data block includes 2 paths of analog quantity data, where the duration of one path of analog quantity data is divided into 30 seconds, starting from two analog quantity data, the analog quantity data from the 3 rd second to the 30 th second meets the compression requirement, the length of the original data is 120 bytes, and after compression, only starting point data, a fitting function type, and alarm point data are saved and become compressed data of 2+4+ 2=16 bytes; the compressed data corresponding to the 2-minute original data block is stored together, and the data length of the compressed original data block is reduced relative to the original data, so that the analog quantity storage occupation is greatly reduced.
It should be noted that, according to the actual situation test, after the compression algorithm is adopted, the analog data is compressed to about one fifth of the original data, the use of the disk space is greatly reduced, the reading speed of the historical data is greatly improved, and the use experience of the monitoring system is optimized.
As shown in fig. 2, the error calculation module includes a compression algorithm reading unit, a new compression fitting function generation unit, a function value calculation unit, and an error generation unit, wherein,
the compression algorithm reading unit is used for obtaining a fitting function of a preset compression algorithm, and the preset compression fitting function comprises a first compression fitting function Y n1 Second compression fitting function Y n2 And a third compression fitting function Y n3 (ii) a The first compressive fitting function Y n1 =y 0 +(y n -y 0 ) Δ t/n, the second compression fitting function Y n2 =y 0 +(y n -y 0 ) Δ t/n + ε sin (π Δ t/n), the third compression fitting function Y n3 =y 0 +(y n -y 0 ) Δ t/n- ε sin (π Δ t/n); in the above formula, y 0 Indicates the start of compression t 0 Analog quantity, y, collected n Indicates the compression end point t n The analog quantity is collected, delta t represents the number of seconds spanned by compression, and n is the distance t from the compression starting point 0 The total seconds of the system, epsilon is a preset system analog quantity precision parameter;
the new compression fitting function generation unit sequentially reads the analog quantity from the original data block, and when a new analog quantity is read, the new compression fitting function generation unit reads the analog quantity from the original data block based on the read first analog quantity y 0 Last analog quantity y n And t is a distance from the compression start point 0 N, and a preset first compression fitting function Y n1 Second compression fitting function Y n2 And a third compression fitting function Y n3 Three new compression fitting functions are calculated again;
the function value calculating unit is used for calculating the acquisition time points t for reading the analog quantity respectively after three new compression fitting functions are calculated 1 To t n-1 And a compression start point t 0 Time difference Δ t therebetween i '; will calculate the time difference Deltat i ' as independent variable, substituting into three new compression fitting functions to obtain corresponding compression fitting function value; wherein i is more than or equal to 1 and less than or equal to n-1;
and the error delta calculating unit is used for calculating the difference value between the compression fitting function value and the read corresponding analog quantity and taking the difference value as the error delta of the analog quantity.
For example, the sampling period of the signal microcomputer monitoring system is 1 second, and the compression starting point t of one path of analog quantity data 0 When the time is 00 hours, 00 minutes and 00 seconds, the newly read analog quantity can obtain the acquisition time point t n 00 hours, 00 minutes, 10 seconds, at which time difference deltat calculated by the function value calculating unit i ' 1 second, 2 seconds, \8230;, 10 seconds in sequence; and substituting 1 second, 2 seconds, \8230and10 seconds as independent variables into three new compression fitting functions respectively to obtain three groups of compression fitting function values.
As shown in fig. 3, the target compression function determining module includes an error reading unit and a key parameter determining unit, wherein,
the error reading unit is used for acquiring the errors delta calculated by the error calculation unit, and the error delta corresponding to each new compression fitting function comprises n-1 errors delta;
the target analog quantity judging unit is used for reading a new analog quantity from the original data block when the error delta corresponding to at least one compression fitting function meets a preset precision condition and the compression fitting function meeting the preset precision condition is consistent with the previous compression fitting function meeting the preset precision condition, recalculating three new compression fitting functions, corresponding compression fitting function values and the error delta of the analog quantity, and re-judging whether the error delta meets the preset precision condition or not;
and the method is also used for reading the analog quantity y when the error delta corresponding to at least one compression fitting function meets a preset precision condition, the compression fitting function meeting the preset precision condition is inconsistent with the previous compression fitting function meeting the preset precision condition, or the error delta corresponding to three new compression fitting functions does not meet the preset precision condition n-1 And taking the corresponding acquisition time point as a compression end point, and taking the acquisition time point t n-1 And the compression start point t 0 And the time difference is used as the compressed frame duration, and the previous compression fitting function meeting the preset precision condition is used as a target compression function.
It should be noted that the compressed frame duration = t n And t 0 The time difference between them, but not necessarily equal to the data block duration T configured in step 1.
In a specific embodiment, according to the system precision requirement, a system analog quantity precision parameter epsilon is set, then analog quantity data of a certain time is cached, the compression algorithm reading unit calculates a fitting function Y = f (t) of a set compression algorithm, and the compression fitting function f (t) is composed of (t) f (t) 0 ,y 0 )、(t n ,y n ) And a preset system analog quantity precision parameter epsilon and the like. After three specific compression fitting functions f (t) are determined, the function value calculation unit calculates the division t 0 、t n Outer point error delta = f 1 (t) if the accuracy requirement is met (i.e. any time | f) 1 (t)|<= epsilon) then try to expand t n Reading a new analog quantity data, if the errors delta in the three groups of errors delta are detected to be larger than the analog quantity precision parameter epsilon, indicating that the calculated errors of all points do not meet the precision requirement, storing the compression record meeting the requirement at the previous time, and clearing the historical cache;
then, repeating the above work to compress all data in the original data block, if specific data is set in the compression process, checking whether the specific data is the specific data or nott 0 、t n If the data at the moment is the data at the moment, the data is not processed, otherwise, the time deviation and the analog quantity value of the specific point are added to the tail part of the compressed data.
Example 4
On the basis of the above embodiment, this embodiment provides another specific implementation of the analog compression storage system of the signal monitoring system based on the specified accuracy, as shown in fig. 4;
specifically, the analog quantity compression storage system of the signal monitoring system based on the specified precision further comprises a storage management module and a reading and restoring module, wherein,
the storage management module is used for writing the obtained compressed data frame into a specified storage space when the analog data in the original data block are all compressed or are not compressed and the data length of the compressed data frame exceeds a threshold value;
the reading and restoring module is used for monitoring whether an analog quantity reading request is read or not in real time, wherein the analog quantity reading request comprises an analog quantity acquisition time point;
after receiving an analog quantity reading request, analyzing an analog quantity acquisition time point in the analog quantity reading request;
judging whether the analyzed analog quantity acquisition time point is an acquisition time point corresponding to the specific data, wherein the acquisition time point corresponding to the specific data comprises a compression starting time point, a compression ending time point and an alarm time point;
if yes, directly reading corresponding analog quantity from the compressed data frame;
otherwise, calculating the analog quantity of the corresponding time point according to the target compression function mark, the compressed frame time length, the specific data point and the analyzed analog quantity acquisition time point in the compressed data frame.
It should be noted that, when reading compressed data, if the data to be read is the data of the start point and the end point of compression or the data of the alarm point, the actual value is directly read, otherwise, the read restoring module is utilized to firstly read the actual value according to the target compression function mark in the compressed data frame and the compression start point in the specific data framet 0 And corresponding to the analog quantity and the compression end point t n Calculating a target compression function corresponding to the compressed data frame according to the analog quantity and the compressed frame duration; and calculating the analog quantity of the corresponding time point according to the calculated target compression function and the analyzed analog quantity acquisition time point, thereby improving the analog quantity reading speed and controlling the error within the set precision.
In one embodiment, the storage management module prepares the compressed data for writing into the designated storage space for storage in blocks, the size of the blocks being specified in the configuration and set by default to a size of 10240 (10K).
Example 5
On the basis of the foregoing embodiments, this embodiment provides a specific implementation of the signal monitoring system analog quantity compression storage device based on the specified precision, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the program to implement the steps of the general signal monitoring system analog quantity compression storage method based on the specified precision as in embodiment 1 or 2.
The present embodiment also provides a specific implementation of a readable storage medium, on which instructions are stored, and the instructions, when executed by a processor, implement the steps of the signal monitoring system analog quantity compressed storage method based on specified accuracy as described in embodiment 1 or 2.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative modules and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The above-described integrated module, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a computer-readable storage medium. Based on such understanding, all or part of the flow in the method of the embodiments described above may be implemented by a computer program, which may be stored in a computer-readable storage medium and can implement the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention and not to limit it; although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that: modifications to the specific embodiments of the invention or equivalent substitutions for parts of the technical features may be made; without departing from the spirit of the present invention, it is intended to cover all aspects of the invention as defined by the appended claims.

Claims (10)

1. A signal monitoring system analog quantity compression storage method based on specified precision is characterized by comprising the following steps:
step 1, loading a system analog quantity precision parameter epsilon, and configuring a data block with a time length of T;
step 2, reading an original data block from the buffer data based on the data block time length T, wherein the analog quantity data in the original data block is expressed as { (T) 0 ,y 0 ),(t 1 ,y 1 ),…,(t m ,y m ),(m>=1)};
Wherein, t 0 To t m Points in time of acquisition, y, representing the analog quantity 0 To y m The analog quantity acquired by the signal monitoring system at different acquisition time points is represented;
step 3, checking the read specific data in the analog quantity; wherein the specific data comprise analog quantity collected at alarm time points;
step 4, performing fitting calculation on the read analog quantity data according to a pre-configured compression fitting function, and calculating an error delta corresponding to each analog quantity except the specific data;
the error delta corresponding to the specific data is preset to be 0, and the error delta corresponding to each analog quantity except the specific data refers to a difference value between the analog quantity acquired by the signal monitoring system and the corresponding compression fitting function value;
step 5, respectively determining a compression start point and a compression stop point, a compression frame duration and a target compression function based on the error delta calculated in the step 4;
step 6, generating a new compressed data frame based on the determined compression end point, the compression frame duration and the target compression function;
wherein the compressed data frame comprises a target compression function mark, a compressed frame duration and specific data points, and the specific data points comprise an alarm data point, a compression start data point and a compression end data point.
2. The signal monitoring system analog quantity compressed storage method based on the specified precision in the claim 1 is characterized in that, in the step 4, when performing fitting calculation on the read analog quantity data, the following steps are executed:
obtaining a fitting function of a preset compression algorithm, wherein the preset compression fitting function comprises a first compression fitting function Y n1 Second compression fitting function Y n2 And a third compression fitting function Y n3 (ii) a The first compression fitting function Y n1 =y 0 +(y n -y 0 ) Δ t/n, the second compressive fitting function Y n2 =y 0 +(y n -y 0 ) Δ t/n + ε sin (π Δ t/n), the third compression fitting function Y n3 =y 0 +(y n -y 0 ) Δ t/n- ε sin (π Δ t/n); in the above formula, y 0 Indicates the start of compression t 0 Analog quantity, y, collected n Indicates the end point t of compression n The analog quantity is collected, delta t represents the number of seconds spanned by compression, and n is the distance t from the compression starting point 0 The total seconds of (E) is a preset system analog quantity precision parameter;
reading analog quantity from the original data block in sequence, and when a new analog quantity is read, reading the first analog quantity y based on the read first analog quantity y 0 Last analog quantity y n And t from the compression start point 0 N, and a preset first compression fitting function Y n1 Second compression fitting function Y n2 And a third compression fitting function Y n3 Three new compression fitting functions are calculated again;
after three new compression fitting functions are calculated, the acquisition time points t for reading the analog quantity are respectively calculated 1 To t n-1 And the compression start point t 0 Time difference Δ t therebetween i '; will calculate the time difference Deltat i ' as independent variable, substituting into three new compression fitting functions to obtain corresponding compression fitting function value; wherein i is more than or equal to 1 and less than or equal to n-1;
and calculating a difference value between the compression fitting function value and the read corresponding analog quantity, and taking the difference value as an error delta of the analog quantity.
3. The signal monitoring system analog quantity compression storage method based on the specified precision in the claim 2 is characterized in that in the step 5, when respectively determining the compression start and stop point, the compression frame duration and the target compression function based on the error δ calculated in the step 4, the following steps are executed:
obtaining the calculated errors delta, wherein the errors delta corresponding to each new compression fitting function comprise n-1 errors delta;
when the error delta corresponding to at least one compression fitting function meets a preset precision condition, and the compression fitting function meeting the preset precision condition is consistent with the previous compression fitting function meeting the preset precision condition, reading a new analog quantity from the original data block, recalculating three new compression fitting functions, corresponding compression fitting function values and the error delta of the analog quantity, and re-judging whether the error delta meets the preset precision condition or not;
when the error delta corresponding to at least one compression fitting function meets the preset precision condition, the compression fitting function meeting the preset precision condition is inconsistent with the previous compression fitting function meeting the preset precision condition, or the error delta corresponding to three new compression fitting functions does not meet the preset precision condition, the read analog quantity y is read n-1 And taking the corresponding acquisition time point as a compression end point, and taking the acquisition time point t n-1 And the compression start point t 0 And the time difference is used as the compressed frame duration, and the previous compression fitting function meeting the preset precision condition is used as a target compression function.
4. The signal monitoring system analog quantity compression storage method based on the specified precision as claimed in claim 1, further comprising:
step 7, when the analog data in the original data block are all compressed, or the data are not compressed and the data length of the compressed data frame exceeds a threshold value, writing the obtained compressed data frame into a specified storage space;
step 8, monitoring whether an analog quantity reading request is read or not in real time, wherein the analog quantity reading request comprises an analog quantity acquisition time point;
after receiving an analog quantity reading request, analyzing an analog quantity acquisition time point in the analog quantity reading request;
judging whether the analyzed analog quantity acquisition time point is an acquisition time point corresponding to the specific data, wherein the acquisition time point corresponding to the specific data comprises a compression starting time point, a compression ending time point and an alarm time point;
if yes, directly reading corresponding analog quantity from the compressed data frame;
otherwise, calculating the analog quantity of the corresponding time point according to the target compression function mark, the compression frame time length, the specific data point and the analyzed analog quantity acquisition time point in the compressed data frame.
5. A signal monitoring system analog quantity compressed storage system based on specified precision is characterized in that: comprises a configuration module, a data reading module, a specific data detection module, an error calculation module, a target compression function determination module and a compressed data frame generation module, wherein,
the configuration module is used for loading a system analog quantity precision parameter epsilon, and the duration of a configuration data block is T;
the data reading module is used for reading an original data block from the buffer data based on the data block time length T, and analog quantity data in the original data block is represented as { (T) 0 ,y 0 ),(t 1 ,y 1 ),…,(t m ,y m ),(m>= 1) }; wherein, t 0 To t m Acquisition time point, y, representing an analog quantity 0 To y m Representing analog quantities acquired by a signal monitoring system at different acquisition time points;
the specific data detection module is used for detecting the read specific data in the analog quantity; wherein the specific data comprise analog quantity collected at alarm time points;
the error calculation module is used for performing fitting calculation on the read analog quantity data according to a pre-configured compression fitting function and calculating an error delta corresponding to each analog quantity except the specific data; the error delta corresponding to the specific data is pre-configured to be 0, and the error delta corresponding to each analog quantity except the specific data refers to a difference value between the analog quantity acquired by the signal monitoring system and the corresponding compression fitting function value;
the target compression function determining module is used for respectively determining a compression start point and a compression stop point, a compression frame duration and a target compression function based on the error delta calculated by the error calculating module;
the compressed data frame generation module generates a new compressed data frame based on the determined compression end point, the compressed frame duration and the target compression function; wherein the compressed data frame comprises a target compression function mark, a compressed frame time length and specific data points, and the specific data points comprise an alarm data point, a compression start data point and a compression end data point.
6. The analog quantity compressed storage system of the signal monitoring system based on the specified precision as claimed in claim 5, wherein the error calculation module comprises a compression algorithm reading unit, a new compression fitting function generation unit, a function value calculation unit and an error generation unit, wherein,
the compression algorithm reading unit is used for obtaining a fitting function of a preset compression algorithm, and the preset compression fitting function comprises a first compression fitting function Y n1 Second compression fitting function Y n2 And a third compression fitting function Y n3 (ii) a The first compression fitting function Y n1 =y 0 +(y n -y 0 ) Δ t/n, the second compression fitting function Y n2 =y 0 +(y n -y 0 ) Δ t/n + ε sin (π Δ t/n), the third compression fitting function Y n3 =y 0 +(y n -y 0 ) Δ t/n- ε sin (π Δ t/n); in the above formula, y 0 Indicates the start of compression t 0 Analog quantity, y, collected n Indicates the end point t of compression n The analog quantity is collected, delta t represents the number of seconds spanned by compression, and n is the distance t from the compression starting point 0 The total seconds of (E) is a preset system analog quantity precision parameter;
the new compression fitting function generation unit reads the analog quantity from the original data block in sequence, and each time a new analog quantity is read, the new compression fitting function generation unit reads the first analog quantity y based on the read first analog quantity y 0 Last analog quantity y n And t from the compression start point 0 N, and a preset first compression fitting function Y n1 Second compressive fitting function Y n2 And a third compression fitting function Y n3 Three new compression fitting functions are calculated again;
the function value calculating unit is used for calculating the acquisition time points t for reading the analog quantity respectively after three new compression fitting functions are calculated 1 To t n-1 And a compression start point t 0 Time difference Δ t therebetween i '; will calculate the time difference Deltat i ' as independent variable, substituting into three new compression fitting functions to obtain corresponding compression fitting function value; wherein i is more than or equal to 1 and less than or equal to n-1;
and the error delta calculating unit is used for calculating the difference value between the compression fitting function value and the read corresponding analog quantity and taking the difference value as the error delta of the analog quantity.
7. The signal monitoring system analog compression storage system of claim 6, wherein the target compression function determination module includes an error reading unit and a key parameter determination unit, wherein,
the error reading unit is used for acquiring the errors delta calculated by the error calculation unit, and the error delta corresponding to each new compression fitting function comprises n-1 errors delta;
the target analog quantity judging unit is used for reading a new analog quantity from the original data block when the error delta corresponding to at least one compression fitting function meets a preset precision condition and the compression fitting function meeting the preset precision condition is consistent with the previous compression fitting function meeting the preset precision condition, recalculating three new compression fitting functions, corresponding compression fitting function values and the error delta of the analog quantity, and re-judging whether the error delta meets the preset precision condition or not;
and the method is also used for reading the analog quantity y when the error delta corresponding to at least one compression fitting function meets a preset precision condition, the compression fitting function meeting the preset precision condition is inconsistent with the previous compression fitting function meeting the preset precision condition, or the error delta corresponding to three new compression fitting functions does not meet the preset precision condition n-1 And corresponding acquisition timeTaking the point as a compression end point, and collecting a time point t n-1 And a compression start point t 0 The time difference between the two frames is used as the duration of the compressed frame, and the previous compression fitting function meeting the preset precision condition is used as a target compression function.
8. The analog compression storage system of a signal monitoring system based on specified accuracy according to claim 5, further comprising a storage management module and a read restore module, wherein,
the storage management module is used for writing the obtained compressed data frame into a specified storage space when the analog data in the original data block are all compressed or are not compressed and the data length of the compressed data frame exceeds a threshold value;
the reading and restoring module is used for monitoring whether an analog quantity reading request is read in real time, wherein the analog quantity reading request comprises an analog quantity acquisition time point;
after receiving an analog quantity reading request, analyzing an analog quantity acquisition time point in the analog quantity reading request;
judging whether the analyzed analog quantity acquisition time point is the acquisition time point corresponding to the specific data or not, wherein the acquisition time point corresponding to the specific data comprises a compression starting time point, a compression ending time point and an alarm time point;
if yes, directly reading corresponding analog quantity from the compressed data frame;
otherwise, calculating the analog quantity of the corresponding time point according to the target compression function mark, the compressed frame time length, the specific data point and the analyzed analog quantity acquisition time point in the compressed data frame.
9. A signal monitoring system analog quantity compression storage device based on specified precision is characterized in that: comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the method for analog-compressed storage of a generic signal-monitoring system based on a specified accuracy as claimed in any one of claims 1 to 4 when the program is executed by the processor.
10. A readable storage medium having instructions stored thereon, characterized in that: the instructions when executed by the processor implement the steps of the signal monitoring system analog quantity compressed storage method based on specified accuracy as claimed in any one of claims 1-4.
CN202211367074.XA 2022-11-03 2022-11-03 Signal monitoring system analog quantity compression storage method and system based on specified precision Pending CN115664425A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211367074.XA CN115664425A (en) 2022-11-03 2022-11-03 Signal monitoring system analog quantity compression storage method and system based on specified precision

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211367074.XA CN115664425A (en) 2022-11-03 2022-11-03 Signal monitoring system analog quantity compression storage method and system based on specified precision

Publications (1)

Publication Number Publication Date
CN115664425A true CN115664425A (en) 2023-01-31

Family

ID=84994483

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211367074.XA Pending CN115664425A (en) 2022-11-03 2022-11-03 Signal monitoring system analog quantity compression storage method and system based on specified precision

Country Status (1)

Country Link
CN (1) CN115664425A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115833843A (en) * 2023-02-14 2023-03-21 临沂云斗电子科技有限公司 Vehicle operation monitoring data storage optimization method and management platform

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115833843A (en) * 2023-02-14 2023-03-21 临沂云斗电子科技有限公司 Vehicle operation monitoring data storage optimization method and management platform

Similar Documents

Publication Publication Date Title
CN115664425A (en) Signal monitoring system analog quantity compression storage method and system based on specified precision
CN112331249B (en) Method, device, terminal equipment and storage medium for predicting service life of storage device
CN118503928A (en) Bearing residual life prediction method, device, equipment and storage medium
CN117891644A (en) Data acquisition system and method based on digital twin technology
CN113867142A (en) Sensor control method, sensor control device, electronic device and storage medium
CN110764975B (en) Early warning method and device for equipment performance and monitoring equipment
CN107357701B (en) SAS signal testing method and device under distributed scene
AU2013376200B2 (en) Data compression device, data compression method, and program
CN109489223A (en) Data processing method, device and equipment and air conditioner
JP6954671B2 (en) Predictive monitoring device, Predictive monitoring method and program
CN111190806B (en) Log processing method and device of voice interaction equipment
CN110674079B (en) Log file recording method and device
EP3646466B1 (en) Method and apparatus for compressing data
CN116756524B (en) Storage medium fault prediction method, device, equipment and medium
CN116794519B (en) SOH data prediction method based on offline and online estimation fusion algorithm
CN117874435B (en) Distributed edge data acquisition method and device, electronic equipment and storage medium
CN116842120B (en) Address information acquisition system, device, storage medium and method for equipment
CN114339467B (en) Equipment state monitoring method and device
CN112506933A (en) High-speed multi-channel time sequence data storage method
CN117424603A (en) Vehicle signal compression method, system and medium based on time function
CN116026365A (en) Vehicle navigation diagnosis method and device and vehicle
CN113033838A (en) Locomotive signal full life cycle monitoring management system and management method
CN118573545A (en) Filtering processing method and device for intelligent operation and maintenance alarm information and electronic equipment
CN116756136A (en) Automatic data processing method, device, equipment and medium for fishpond monitoring equipment
CN117938775A (en) Vehicle-mounted data transmission method, system, storage medium and computer equipment

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