Approximate query processing method, system, medium and equipment for industrial time series data

Through the initial compression, standard deviation calculation and compression accuracy adjustment of industrial timing data, the compression storage problem of massive industrial timing data is solved, efficient data compression and storage is achieved, and data trends are retained.

CN114090654BActive Publication Date: 2025-04-01BEIJING INFORMATION SCI & TECH UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111373215.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-19
Publication Date
2025-04-01
Estimated Expiration
2041-11-19

AI Technical Summary

Technical Problem

The compression storage problem of massive industrial timing data is insufficient in the compression ratio and data trend retention of existing technology.

Method used

An approximate query processing method for industrial timing data is adopted, and efficient data compression and retain data trends through steps such as initial compression, standard deviation calculation, compression accuracy adjustment and approximate query.

Benefits of technology

With the continuous output of massive industrial timing data, efficient data compression and storage are achieved, reducing storage space requirements and improving the efficiency of data query.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114090654B_ABST
    Figure CN114090654B_ABST
Patent Text Reader

Abstract

The present invention relates to an approximate query processing method, system, medium and device for industrial time series data, which includes: performing initial compression on time series data to obtain compressed data that meets the initial compression accuracy; calculating the standard deviation of the compressed data, and obtaining the compression accuracy floating according to the standard deviation; adjusting the compression accuracy according to the compression accuracy floating, and re-compressing the data using the adjusted compression accuracy until the compression accuracy floating meets the preset conditions, and outputting the compressed data; performing approximate query on the compressed data, and if the queried compression point is within the compression point loss interval, performing approximate estimation on the value of the loss point and then performing approximate query; otherwise, directly performing existence query on the remaining points after compression to obtain accurate point values. The present invention can efficiently compress time series data and retain data trends for storage in the case of continuous output of massive industrial time series data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data query, and in particular to an approximate query processing method, system, medium and equipment for industrial time series data. Background Art

[0002] With the development of computer science and technology, along with the informatization of all walks of life, various data are constantly expanding from GB to TB and then to PB. Part of the reason for the growth of many data is that these data are continuously collected from more and more devices. Among them, the growth rate of industrial big data is very terrifying, because the sources of data in the industrial field are very wide, such as PLM (product lifecycle emanagement) system, ERP (enterprise resource planning) system, SCM (supplychain management) system, MES (manufacturing execution system) system, etc. The data generated meets the 4V characteristics of big data, namely large scale (volume), fast speed (velocity), variety (variety), and low quality (veracity). In addition, compared with other data, industrial big data also has the characteristics of multimodality, strong correlation, and high throughput. Therefore, there must be an efficient way to process these data sources and characteristics in the field of industrial big data. Because there are many redundant data in these data, it is difficult to use these data for corresponding data mining, correlation analysis and prediction, anomaly detection, and decision support. The previous methods of compressing and processing large amounts of industrial time series data are divided into lossy compression and lossless compression.

[0003] Lossless compression technology is a technology that can completely restore data, and compression and decompression are a reversible process. Lossless compression technology is a basic algorithm commonly used in various fields. In fact, any lossless compression algorithm cannot really compress data to the theoretical entropy limit in practical applications. Since the amount of compressed data cannot be lower than the entropy value, in the development and utilization of lossless compression technology, lossless compression technology is always in a process of pursuing the ideal limit of compression performance, and in specific application fields, the compression ratio of simply using lossless compression technology can always only be maintained at an acceptable level.

[0004] Lossy compression technology removes certain redundant data during the compression process. These redundant data generally have the characteristics of large quantity and low value density. The compression process of these redundant data is to lose a certain amount of information to obtain a higher compression ratio. The compression process is irreversible and the data cannot be completely restored to the original data. Therefore, the influence of the lost data on the understanding of the original data information and trend should not be too large. Moreover, many lossy compression technologies are developed based on many specific application fields, such as compression technologies applied to many multimedia fields such as images, videos and sounds. Moreover, lossy compression technology can improve the compression effect of related lossy compression algorithms based on prior knowledge. Lossy compression methods are generally divided into piecewise linear methods, vector quantization methods and signal transformation methods. However, these methods do not perform particularly well when processing large amounts of industrial time series data in actual industrial scenarios. Summary of the invention

[0005] In response to the problem of compressing and storing the above-mentioned massive industrial time series data, the purpose of the present invention is to provide an approximate query processing method, system, medium and equipment for industrial time series data, which can efficiently compress time series data and retain data trends for storage when massive industrial time series data is continuously produced.

[0006] To achieve the above-mentioned purpose, the present invention adopts the following technical scheme: an approximate query processing method for industrial time series data, which includes: performing an initial compression on the time series data to obtain compressed data that meets the initial compression accuracy; calculating the standard deviation of the compressed data, and obtaining a compression accuracy fluctuation according to the standard deviation; adjusting the compression accuracy according to the compression accuracy fluctuation, and re-compressing the data using the adjusted compression accuracy until the compression accuracy fluctuation meets the preset conditions, and outputting the compressed data; performing an approximate query on the compressed data, and if the queried compression point is within the compression point loss interval, performing an approximate estimate on the value of the loss point and then performing an approximate query; otherwise, directly performing an existence query on the remaining points after compression to obtain accurate point values.

[0007] Further, the time series data is initially compressed to obtain compressed data that meets the initial compression accuracy, including:

[0008] Converting the time series data into numerical values, and determining the initial compression accuracy according to a preset compression accuracy interval;

[0009] Compressing the value according to the initial compression accuracy;

[0010] After compression is completed, the compressed data is visualized to obtain the compressed data trend, and compared with the trend chart of the initial time series data to determine whether the compressed data loss meets the set requirements. If it meets the requirements, the standard deviation of the compressed data is calculated. Otherwise, the compression accuracy range is reset to determine the new compression accuracy.

[0011] Furthermore, obtaining the compression precision floating according to the standard deviation includes: taking the ratio of the standard deviation of the last compressed data to the standard deviation of the next adjacent compressed data as the compression precision floating.

[0012] Furthermore, the compression accuracy is adjusted according to the compression accuracy float, including: when the compression accuracy float is 0, there is no need to adjust the compression accuracy; when the compression accuracy float is greater than or equal to a preset value or less than a preset value, the current compression accuracy is adjusted: the ratio of the current compression accuracy to the compression accuracy float is used as the adjusted compression accuracy.

[0013] Furthermore, the numerical approximate estimation of the loss points adopts line segment fitting, including: performing line segment fitting on the compression points through the line segment fitting formula, accurately estimating the compression loss points by the fitted line end equation, and directly storing the compressed data.

[0014] Further, the approximate query includes:

[0015] If the compressed point is a compression loss point, query the point values ​​around the compressed point to obtain a representative value that replaces the surrounding compressed points;

[0016] Substitute the horizontal axis value of the loss point into the line end equation to obtain the estimated value of the loss point, compare the estimated value with the representative value to determine the accuracy of the estimated value, and query the estimated value as an approximate accurate value.

[0017] Furthermore, the comparing the estimated value with the representative value includes: if the difference ratio between the two is within 10%, the estimated value is within a preset accuracy range and has accuracy.

[0018] An approximate query processing system for industrial time series data includes: a primary compression module, which performs initial compression on time series data to obtain compressed data that meets the initial compression accuracy; a compression accuracy floating acquisition module, which calculates the standard deviation of the compressed data and obtains the compression accuracy floating according to the standard deviation; an adjustment output module, which adjusts the compression accuracy according to the compression accuracy floating, re-compresses the data using the adjusted compression accuracy, until the compression accuracy floating meets the preset conditions, and outputs the compressed data; a query module, which performs approximate query on the compressed data, and if the queried compression point is within the compression point loss interval, the value of the loss point is approximately estimated before performing the approximate query; otherwise, the remaining points after compression are directly subjected to existence query to obtain accurate point values.

[0019] A computer-readable storage medium storing one or more programs, wherein the one or more programs include instructions, which, when executed by a computing device, cause the computing device to perform any of the above methods.

[0020] A computing device comprises: one or more processors, a memory and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for executing any of the above methods.

[0021] The present invention adopts the above technical solution, which has the following advantages:

[0022] Aiming at the massive time series data within manufacturing enterprises, the present invention improves the classic SWING DOOR TRENDING algorithm, proposes a more efficient compression method, and uses a curve fitting method to perform valuation processing on the compressed data. Under the condition of continuous output of massive industrial time series data, the time series data can be efficiently compressed and the data trend can be retained for storage, which effectively solves the compression and storage problem of massive industrial time series data. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 It is a schematic diagram of the overall flow of the approximate query processing method in one embodiment of the present invention;

[0024] Figure 2 is a detailed flowchart of an approximate query processing method in one embodiment of the present invention;

[0025] Figure 3 It is a schematic diagram of the structure of a computing device in one embodiment of the present invention. DETAILED DESCRIPTION

[0026] In order to make the purpose, technical solution and advantages of the embodiment of the present invention clearer, the technical solution of the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings of the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all of the embodiments. Based on the described embodiment of the present invention, all other embodiments obtained by ordinary technicians in this field belong to the scope of protection of the present invention.

[0027] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.

[0028] Previous methods for approximate query, such as online aggregation and offline summary generation, are data preprocessing methods for aggregate query of commercial data. However, these commercial data often lack the most important feature of industrial data, namely time series feature. Therefore, previous approximate query processing methods cannot meet the needs of approximate query processing of massive industrial time series data. Because the value of sensor time series data is large (usually one value is collected every second) and the value is relatively stable (the value usually fluctuates steadily), the present invention provides an approximate query processing method, system, medium and device for industrial time series data, which uses compression instead of approximate query to perform lossy compression of time series data with controllable accuracy. The compressed data can be directly stored in the storage medium, and there is no need to decompress it when querying the data, which saves a lot of storage space for the storage medium, further improves the compression rate of the SDT algorithm and reduces the compression error of the SDT algorithm, can better preserve the floating trend of data, and can estimate the missing points by fitting the regression line when querying, so as to achieve the effect of approximate query. The idea of ​​using compression instead of approximation is adopted to remove the coarse and retain the fine for a large amount of redundant data deposited in the industrial system, and a good effect is achieved.

[0029] Because the core idea of ​​the SDT revolving door algorithm is to perform linear fitting for discrete points, and it is a lossy compression method with controllable accuracy, the original data can be fitted with a straight line to obtain a straight line fitting formula when performing an existence query. When performing an existence query on the data afterwards, it is only necessary to first determine whether the queried data is a loss point. If the queried data point is a loss point compressed by the revolving door algorithm, then the compressed point can be numerically estimated based on the formula obtained by curve fitting. This method can be used to obtain the estimated value of the compressed point.

[0030] After compressing the time series data, the compression status of the data can be observed by visualizing the compression trend of the data, and the feasibility of this method can be verified by obtaining a certain time series data through existence query.

[0031] In one embodiment of the present invention, Figure 1 As shown, a method for processing approximate queries of industrial time series data is provided. This embodiment uses the method applied to a terminal as an example for illustration. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0032] 1) Perform initial compression on the time series data to obtain compressed data that meets the initial compression accuracy;

[0033] 2) Calculate the standard deviation of the compressed data and obtain the compression precision float based on the standard deviation;

[0034] 3) adjusting the compression accuracy according to the compression accuracy fluctuation, re-compressing the data using the adjusted compression accuracy, until the compression accuracy fluctuation meets the preset conditions, and outputting the compressed data;

[0035] 4) Perform an approximate query on the compressed data. If the queried compressed point is within the compression point loss interval, the value of the lost point is approximately estimated before performing an approximate query. Otherwise, an existence query is directly performed on the remaining points after compression to obtain the precise point value.

[0036] In the above step 1), if Figure 2 As shown, the time series data is initially compressed to obtain compressed data that meets the initial compression accuracy, including the following steps:

[0037] 1.1) Convert the time series data into numerical values ​​and determine the initial compression accuracy according to the pre-set compression accuracy range;

[0038] In this embodiment, the time series data is first processed, the time series data is imported into postgresql or other types of databases, and the time series data is converted into numerical values, for example, the following types of data are converted:

[0039] (Timestamp, value) → (X, Y)

[0040] When compressing data for the first time, the compression accuracy σ E Initialization, the compression accuracy of the first initialization σ E for:

[0041] σ E =(σ min +σ max) / 2,

[0042] In the formula, σ min , σ max They are the minimum and maximum values ​​of the compression precision range respectively.

[0043] 1.2) Compress the value according to the initial compression accuracy;

[0044] 1.3) After compression is completed, the compressed data is visualized to obtain the compressed data trend and compared with the trend chart of the initial time series data to determine whether the compressed data loss meets the set requirements. If it meets the requirements, the standard deviation of the compressed data is calculated. Otherwise, the compression accuracy range is reset to determine the new compression accuracy.

[0045] In the above step 2), the compression precision float is obtained according to the standard deviation: the ratio of the standard deviation of the last compressed data to the standard deviation of the next compressed data is used as the compression precision float.

[0046] In this embodiment, the standard deviation is first calculated. S for:

[0047]

[0048] Where: y i is the data value; μ is y i The average value of; n is the total number of data.

[0049] Calculate the compression precision floating between two adjacent compressions based on the standard deviation (i.e. fluctuation change value):

[0050]

[0051] Where: Si is the standard deviation of the i-th compressed data; σ Si-1 is the standard deviation of the data compressed for the i-1th time.

[0052] In the above step 3), the compression accuracy is adjusted according to the compression accuracy floating, including the following adjustments:

[0053] When the compression precision float is 0, there is no need to adjust the compression precision;

[0054] When the compression precision fluctuation is greater than or equal to a preset value or less than a preset value, the current compression precision is adjusted: the ratio of the current compression precision to the compression precision fluctuation is used as the adjusted compression precision.

[0055] In this embodiment, the current compression accuracy σ N and compression accuracy fluctuations Adjust compression accuracy.

[0056] By formula The compression accuracy can be adjusted.

[0057] Through analysis, we can know that by comparing the standard deviation σ of two adjacent compression accuracy intervals Si / σ Si-1 , we can use σ E Dynamic adjustment, when , it means that there is no fluctuation in the accuracy range of the two compressions, so there is no need to adjust σ E Make corresponding adjustments, but when σ Si / σ Si-1 When ≥1, it indicates that the data starts to fluctuate greatly, so σ needs to be adjusted. E =σ E / (σ Si / σ Si-1 ); if σ Si / σ Si-1 <1 indicates that the data fluctuation is relatively small, so σ needs to be adjusted E =σ E / (σ Si / σ Si-1 ).

[0058] The next compression cycle is performed according to the adjusted compression accuracy, and a new round of compression is performed until the fluctuation range of the compression accuracy meets the adjustment requirements.

[0059] In the above step 4), the numerical value of the loss point is approximately estimated by line segment fitting. Specifically, the compression point is fitted by the line segment fitting formula, and the compression loss point is accurately estimated by the fitted line end equation, and the compressed data is directly stored.

[0060] Specifically: first determine whether the compression point you want to query is in the compression point loss interval. If it is in the compression point loss interval, perform line segment fitting; if it is not in the compression loss point interval, no line segment fitting is required.

[0061] For the compression points that need line segment fitting, line segment fitting is performed using the following formula:

[0062] L(t)=λ+γt

[0063]

[0064]

[0065] Where: L(t) is the linear equation of the fitted regression, λ is the constant term of the fitted regression equation, γ is the coefficient of the fitted regression equation, t iis the time variable of the compressed precision interval, y i is the time variable t i The corresponding data value, n is the amount of data in the current compression precision range.

[0066] Through the above formula, we can calculate the constant term of the fitting regression equation, the coefficient of the fitting regression equation, the time variable of the compressed accuracy interval, and the time variable t i The corresponding data value and the amount of data in the current compression precision range.

[0067] By using the above fitted line segment equation, the compression loss point can be accurately estimated, eliminating the process of decompressing the compressed data and directly storing the compressed data.

[0068] The approximate query includes the following steps:

[0069] 4.1) If the compression point is a compression loss point, query the point values ​​around the compression point to obtain a representative value that replaces the surrounding compressed points;

[0070] In this embodiment, if the point is a compression loss point, the following example query can be used to query the point values ​​around the compression point:

[0071] Example query:Select "timestamp"From Table

[0072] 4.2) Substitute the horizontal axis value of the loss point into the line end equation to obtain the estimated value of the loss point, compare the estimated value with the representative value to determine the accuracy of the estimated value, and query the estimated value as an approximate accurate value.

[0073] In step 4.2), the estimated value is compared with the representative value. Specifically, if the difference ratio between the two is within 10%, the estimated value is within the pre-set accuracy range and is accurate.

[0074] In one embodiment of the present invention, a system for processing approximate queries of industrial time series data is provided, comprising:

[0075] The primary compression module performs initial compression on the time series data to obtain compressed data that meets the initial compression accuracy;

[0076] The compression precision floating acquisition module calculates the standard deviation of the compressed data and obtains the compression precision floating according to the standard deviation;

[0077] Adjust the output module, adjust the compression accuracy according to the compression accuracy fluctuation, re-compress the data using the adjusted compression accuracy, until the compression accuracy fluctuation meets the pre-set conditions, and output the compressed data;

[0078] The query module performs an approximate query on the compressed data. If the queried compressed point is within the compression point loss interval, the value of the lost point is approximately estimated before an approximate query is performed; otherwise, an existence query is directly performed on the remaining points after compression to obtain the precise point value.

[0079] The system provided in this embodiment is used to execute the above-mentioned method embodiments. Please refer to the above-mentioned embodiments for specific processes and detailed contents, which will not be repeated here.

[0080] like Figure 3 As shown, it is a schematic diagram of the structure of a computing device provided in an embodiment of the present invention. The computing device can be a terminal, which can include: a processor, a communication interface, a memory, a display screen and an input device. Among them, the processor, the communication interface and the memory complete mutual communication through a communication bus. The processor is used to provide computing and control capabilities. The memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. When the computer program is executed by the processor, it implements an approximate query processing method; the internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface is used to communicate with an external terminal in a wired or wireless manner. The wireless manner can be implemented through WIFI, a management network, NFC (near field communication) or other technologies. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the housing of the computing device, or an external keyboard, touchpad or mouse. The processor can call the logical instructions in the memory to execute the following method:

[0081] The time series data is initially compressed to obtain compressed data that meets the initial compression accuracy; the standard deviation of the compressed data is calculated, and the compression accuracy fluctuation is obtained based on the standard deviation; the compression accuracy is adjusted based on the compression accuracy fluctuation, and the data is recompressed using the adjusted compression accuracy until the compression accuracy fluctuation meets the preset conditions, and the compressed data is output; the compressed data is approximated and queried. If the queried compression point is within the compression point loss interval, the value of the loss point is approximated and then an approximate query is performed; otherwise, an existence query is directly performed on the remaining points after compression to obtain accurate point values.

[0082] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0083] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the scheme of the present application, and does not constitute a limitation on the computing device to which the scheme of the present application is applied. The specific computing device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0084] In one embodiment of the present invention, a computer program product is provided, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, and when the program instructions are executed by a computer, the computer can execute the methods provided by the above-mentioned method embodiments, for example, comprising: performing an initial compression on time series data to obtain compressed data that meets the initial compression accuracy; calculating the standard deviation of the compressed data, and obtaining a compression accuracy fluctuation according to the standard deviation; adjusting the compression accuracy according to the compression accuracy fluctuation, and re-compressing the data using the adjusted compression accuracy until the compression accuracy fluctuation meets a preset condition, and outputting the compressed data; performing an approximate query on the compressed data, and if the queried compression point is within the compression point loss interval, performing an approximate estimate on the value of the loss point and then performing an approximate query; otherwise, directly performing an existence query on the remaining points after compression to obtain accurate point values.

[0085] In one embodiment of the present invention, a non-transitory computer-readable storage medium is provided, which stores server instructions. The computer instructions enable a computer to execute the methods provided by the above embodiments, for example, including: performing an initial compression on time series data to obtain compressed data that meets the initial compression accuracy; calculating the standard deviation of the compressed data, and obtaining a compression accuracy fluctuation based on the standard deviation; adjusting the compression accuracy based on the compression accuracy fluctuation, and re-compressing the data using the adjusted compression accuracy until the compression accuracy fluctuation meets a preset condition, and outputting the compressed data; performing an approximate query on the compressed data, and if the queried compression point is within the compression point loss interval, performing an approximate estimate on the value of the loss point and then performing an approximate query; otherwise, directly performing an existence query on the remaining points after compression to obtain accurate point values.

[0086] The above embodiment provides a computer-readable storage medium, whose implementation principle and technical effect are similar to those of the above method embodiment, and will not be repeated here.

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

[0088] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0089] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0090] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for approximate query processing of industrial time series data, characterized in that: include: The time series data is initially compressed to obtain compressed data that meets the initial compression accuracy; Calculating the standard deviation of the compressed data, and obtaining a compression precision float according to the standard deviation; Adjusting the compression accuracy according to the compression accuracy fluctuation, re-compressing the data using the adjusted compression accuracy until the compression accuracy fluctuation meets a preset condition, and outputting the compressed data; The compressed data is subjected to an approximate query. If the queried compressed point is within the compression point loss interval, the value of the lost point is approximately estimated and then the approximate query is performed; otherwise, the remaining points after compression are directly subjected to an existence query to obtain an accurate point value; The step of obtaining a compression precision float according to the standard deviation includes: The ratio of the standard deviation of the last compressed data to the standard deviation of the next compressed data is used as the compression precision float; The adjusting the compression accuracy according to the compression accuracy floating includes: When the compression precision floats to 0, there is no need to adjust the compression precision; When the compression precision fluctuation is greater than or equal to a preset value or less than a preset value, the current compression precision is adjusted: the ratio of the current compression precision to the compression precision fluctuation is used as the adjusted compression precision.

2. The method for processing approximate query of industrial time series data according to claim 1, characterized in that: The initial compression of the time series data to obtain compressed data that meets the initial compression accuracy includes: Converting the time series data into numerical values, and determining the initial compression accuracy according to a preset compression accuracy interval; Compressing the value according to the initial compression accuracy; After compression is completed, the compressed data is visualized to obtain the compressed data trend, and compared with the trend chart of the initial time series data to determine whether the compressed data loss meets the set requirements. If it meets the requirements, the standard deviation of the compressed data is calculated. Otherwise, the compression accuracy range is reset to determine the new compression accuracy.

3. The method for processing approximate query of industrial time series data according to claim 1, characterized in that: The numerical approximate estimation of the loss point position adopts line segment fitting, including: The compression points are fitted by line segment fitting formula, and the compression loss points are accurately estimated by the fitted line end equation, and the compressed data is directly stored.

4. The method for processing approximate query of industrial time series data according to claim 3, characterized in that: The approximate query includes: If the compressed point is a compression loss point, query the point values ​​around the compressed point to obtain a representative value that replaces the surrounding compressed points; Substitute the horizontal axis value of the loss point into the line end equation to obtain the estimated value of the loss point, compare the estimated value with the representative value to determine the accuracy of the estimated value, and query the estimated value as an approximate accurate value.

5. The method for processing approximate query of industrial time series data according to claim 4, characterized in that: The comparing the estimated value with the representative value includes: if the difference ratio between the two is within 10%, then the estimated value is within a preset accuracy range and has accuracy.

6. An approximate query processing system for industrial time series data, characterized in that: include: The primary compression module performs initial compression on the time series data to obtain compressed data that meets the initial compression accuracy; A compression precision floating acquisition module calculates the standard deviation of the compressed data and obtains the compression precision floating according to the standard deviation; An output adjustment module adjusts the compression accuracy according to the compression accuracy fluctuation, re-compresses the data using the adjusted compression accuracy, until the compression accuracy fluctuation satisfies a preset condition, and outputs the compressed data; A query module performs an approximate query on the compressed data. If the queried compressed point is within the compression point loss interval, the value of the lost point is estimated approximately and then the approximate query is performed; otherwise, an existence query is directly performed on the remaining points after compression to obtain the accurate point value; The step of obtaining a compression precision float according to the standard deviation includes: The ratio of the standard deviation of the last compressed data to the standard deviation of the next compressed data is used as the compression precision float; The adjusting the compression accuracy according to the compression accuracy floating includes: When the compression precision floats to 0, there is no need to adjust the compression precision; When the compression precision fluctuation is greater than or equal to a preset value or less than a preset value, the current compression precision is adjusted: the ratio of the current compression precision to the compression precision fluctuation is used as the adjusted compression precision.

7. A computer-readable storage medium storing one or more programs, characterized in that: The one or more programs include instructions, which, when executed by a computing device, cause the computing device to perform any one of the methods of claims 1 to 5.

8. A computing device, characterized in that include: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for executing any one of the methods described in claims 1 to 5.

Citation Information

Patent Citations

  • Data compression and communication using machine learning

    CA3128973A1

  • Data compression method and device, computer equipment and storage medium

    CN112269769A