A method and system for optimizing storage of control terminal data

By performing polynomial fitting and abnormal residual value analysis on the data of the regulation terminal and selecting a suitable storage strategy, the problem of poor data compression effect in the existing technology is solved, and efficient optimization of data storage is achieved.

CN119382714BActive Publication Date: 2025-03-21SHENZHEN SHENBAO ELECTRONIC METER CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411942871.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-03-21
Estimated Expiration
2044-12-27

AI Technical Summary

Technical Problem

When the prior art compresses the data of the regulation terminal, the compression effect is poor and the storage space cannot be effectively optimized.

Method used

By performing polynomial fitting of stored data, calculate the aggregation of fitting errors and abnormal residual values, and select storage strategies according to different situations, including storing the fitted polynomials, abnormal residual values ​​and their timestamps, or storing the residual value sequence in the abnormal time period.

Benefits of technology

It improves the compression effect of the regulation terminal data, optimizes the use of storage space, and realizes efficient data storage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119382714B_ABST
    Figure CN119382714B_ABST
Patent Text Reader

Abstract

The present application relates to the field of data compression technology, and in particular to a method and system for optimizing storage of control terminal data, the method comprising: performing polynomial fitting on the data to be stored to obtain a fitting error; in response to the fitting error being less than an error threshold, storing the fitting polynomial and completing the storage of the data to be stored, otherwise, calculating the concentration of abnormal residual values; in response to the concentration being less than the concentration threshold, storing the fitting polynomial, abnormal residual values ​​and their timestamps, and completing the storage of the data to be stored; in response to the concentration being not less than the concentration threshold, storing the fitting polynomial and the residual value sequence within the abnormal time period. Through the technical solution of the present application, according to the distribution of the fitting error and abnormal residual values ​​in the polynomial fitting process, the storage strategy can be flexibly selected to effectively optimize the use of storage space, thereby improving storage efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data compression, and in particular to a method and system for optimizing storage of control terminal data. Background Art

[0002] During the operation of the control terminal, a large amount of data such as sensor readings, control instructions and environmental information can be collected. These data are crucial to judging the operating status of the control terminal. Therefore, a large amount of control terminal data needs to be stored.

[0003] At present, a patent application document with publication number CN116865768A discloses a method for optimizing storage of PLC device data, the method comprising: collecting PLC device data, counting the occurrence frequency of each character in the PLC device data and constructing a Huffman tree to obtain Huffman coding; obtaining a pre-merged character group, performing left sequence and right sequence analysis on each character to be processed according to the Huffman tree of the PLC device data to obtain the frequency of the pre-merged character group of each character to be processed, the frequency of the first merged character after merging, and the frequency of the second merged character after merging; obtaining a character sequence in the same interval of the merged character according to the frequency of the pre-merged character group of each character to be processed, and in the character sequence in the same interval of the merged character, performing left sequence and right sequence analysis on each character to be processed according to the Huffman tree of the PLC device data to obtain the frequency of the pre-merged character group of each character to be processed, the frequency of the first merged character after merging, and the frequency of the second merged character after merging. The average coding length of each character to be processed is obtained by using the pre-merge fusion factor of the pre-merge character group of each character to be processed, the number of characters contained in the PLC device data is obtained, the pre-merge fusion factor and the average coding length are used to calculate the coding reduction length of each character to be processed after pre-merging, the coding reduction length of each character to be processed after pre-merging is measured in the length of Huffman coding to obtain the optimization degree of the Huffman tree after each character to be processed is merged; the PLC device data is merged according to the optimization degree of the Huffman tree after each character to be processed is merged to obtain the merged device data, the merged device data is Huffman coded to obtain the optimized code, the optimized code is stored in the storage space, and the optimized storage of the device data is completed.

[0004] The above method combines each character so that the character frequency in the character set in the Huffman tree meets the uneven distribution characteristics. However, all characters in the merged device data still need to be encoded and compressed one by one. The number of characters to be encoded is large, and a good compression effect cannot be achieved. Summary of the invention

[0005] In order to solve the technical problem of poor compression effect, the present application provides a method and system for optimizing storage of control terminal data, which can improve the compression effect of control terminal data.

[0006] In a first aspect of the present application, a method for optimizing storage of control terminal data is provided, the storage method comprising: performing polynomial fitting on data to be stored according to a preset order to obtain a fitting error, wherein the fitting error is the proportion of the number of abnormal residual values, and the abnormal residual value is a residual value greater than a residual threshold; in response to the fitting error being less than the error threshold, storing the fitting polynomial to complete the storage of the data to be stored, and conversely, calculating the concentration of the abnormal residual values, wherein the concentration is the ratio between the number of abnormal residual values ​​and the length of an abnormal time period, and the abnormal time period is the time period between the minimum moment and the maximum moment of the abnormal residual value; in response to the concentration being less than the concentration threshold, storing the fitting polynomial, the abnormal residual value and its timestamp to complete the storage of the data to be stored; in response to the concentration being not less than the concentration threshold, storing the fitting polynomial and the residual value sequence within the abnormal time period, comprising: taking the residual value sequence as the sub-data to be stored, performing polynomial fitting on the sub-data to be stored, until the storage of the sub-data to be stored is completed.

[0007] A polynomial is fitted to the data to be stored according to the preset order to obtain the residual value at each moment, and all residual values ​​are divided into normal residual values ​​and abnormal residual values ​​by comparing the residual value and the residual threshold, and the proportion of the number of abnormal residual values ​​is taken as the fitting error; when the fitting error is less than the error threshold, it means that the fitting polynomial can accurately predict the actual value at each moment, and the fitting polynomial is stored to complete the storage of the data to be stored. Otherwise, the aggregation degree of the abnormal residual value is calculated. If the aggregation degree is less than the aggregation degree threshold, it means that the distribution of the abnormal residual value is relatively dispersed. At this time, the fitting polynomial, the abnormal residual value and its timestamp are stored to complete the storage of the data to be stored; if the aggregation degree is not less than the aggregation degree threshold, it means that the distribution of the abnormal residual value is relatively concentrated, and the fitting polynomial and the residual value sequence in the abnormal time period are stored. According to the fitting error of the data to be stored in the polynomial fitting process and the distribution of the abnormal residual value, the storage strategy is flexibly selected to improve the compression effect of the control terminal data.

[0008] Preferably, performing polynomial fitting on the data to be stored according to a preset order to obtain a fitting error includes: constructing an initial polynomial of a preset order, performing polynomial fitting on the data to be stored using the least squares method, and obtaining a fitting polynomial of a preset order; subtracting a predicted value of the fitting polynomial from an actual value at any moment to obtain a residual value at each moment; in response to a residual value being greater than a residual threshold, marking the residual value as an abnormal residual value; and taking the proportion of the number of abnormal residual values ​​in the data to be stored as the fitting error.

[0009] The least squares method can take the minimum sum of squares of residuals at each moment as the goal, adjust the values ​​of the undetermined coefficients in the initial polynomial multiple times, and obtain the residual values ​​of the fitting polynomial and the data to be stored at each moment. By comparing the residual values ​​and the residual thresholds, all residual values ​​are divided into abnormal residual values ​​and normal residual values, providing a data basis for subsequent judgment of storage strategies.

[0010] Preferably, the input of the initial polynomial is any time, and the output is the predicted value at the time; the initial polynomial satisfies the relationship: , is the preset order, For the The unknown coefficients of order, Indicates time of Power, For the moment The predicted value of .

[0011] Preferably, the method for obtaining the preset order includes: setting the initial order, obtaining the fitting polynomial of the initial order and the normal residual value to calculate the evaluation value of the initial order, wherein the evaluation value is positively correlated with the number of normal residual values ​​and negatively correlated with the parameter quantity of the fitting polynomial; and taking the initial order corresponding to the maximum value of the evaluation value within the set range as the preset order.

[0012] The larger the value of the preset order is, the stronger its fitting ability for the stored data is, but the number of parameters of the fitting polynomial itself will also increase, and the amount of storage occupied when storing the fitting polynomial will also be larger. By calculating the evaluation value of each initial order, the optimal polynomial order is adaptively determined.

[0013] Preferably, the initial order Evaluation value for: , is the number of normal residual values.

[0014] is the initial order The number of all undetermined coefficients in the corresponding fitting polynomial, that is, the number of parameters of the fitting polynomial, the number of normal residual values The larger the value, the smaller the number of all the coefficients to be determined, and the initial order The better the compression effect of the corresponding fitting polynomial, the more accurate the initial order of quantization Effectiveness of data compression.

[0015] Preferably, storing the fitting polynomial includes: storing all undetermined coefficients of the fitting polynomial.

[0016] Preferably, the time The residual value of for: , For the moment The actual value of To fit the polynomial at time The predicted value of .

[0017] The residual value is defined as the difference between the actual value and the value predicted by the fitting polynomial, ensuring that during the decompression process, the actual value before data compression can be accurately calculated based on the fitting polynomial and the stored residual value.

[0018] In a second aspect of the present application, a control terminal data optimization storage system is also provided, comprising a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, a control terminal data optimization storage method according to the first aspect of the present application is implemented.

[0019] The technical solution of this application has the following beneficial technical effects:

[0020] A polynomial is fitted to the data to be stored according to the preset order to obtain the residual value at each moment, and all residual values ​​are divided into normal residual values ​​and abnormal residual values ​​by comparing the residual value and the residual threshold, and the proportion of the number of abnormal residual values ​​is taken as the fitting error; when the fitting error is less than the error threshold, it means that the fitting polynomial can accurately predict the actual value at each moment, and the fitting polynomial is stored to complete the storage of the data to be stored. Otherwise, the aggregation degree of the abnormal residual value is calculated. If the aggregation degree is less than the aggregation degree threshold, it means that the distribution of the abnormal residual value is relatively dispersed. At this time, the fitting polynomial, the abnormal residual value and its timestamp are stored to complete the storage of the data to be stored; if the aggregation degree is not less than the aggregation degree threshold, it means that the distribution of the abnormal residual value is relatively concentrated, and the fitting polynomial and the residual value sequence in the abnormal time period are stored. According to the fitting error of the data to be stored in the polynomial fitting process and the distribution of the abnormal residual value, the storage strategy is flexibly selected to improve the compression effect of the control terminal data.

[0021] Furthermore, since the polynomial fitting is to find the best fitting polynomial by minimizing the residual sum of squares, the residual value sequence has removed the larger data fluctuations in the data to be stored, and the residual value sequence is a relatively flat time series. When the residual value sequence is fitted with a polynomial, the number of abnormal residual values ​​is small. That is to say, when the residual value sequence is used as the sub-data to be stored and the residual value sequence is fitted with a polynomial, the fitting error is small, the storage can be completed quickly, and efficient compression can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present application will become easy to understand. In the accompanying drawings, several embodiments of the present application are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:

[0023] Figure 1 is a flow chart of a method for optimizing storage of control terminal data according to an embodiment of the present application;

[0024] Figure 2 It is a structural block diagram of a control terminal data optimization storage system according to an embodiment of the present application. DETAILED DESCRIPTION

[0025] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0026] It should be understood that when the terms "first", "second", etc. are used in the claims, specification and drawings of the present application, they are only used to distinguish different objects, rather than to describe a specific order. The terms "include" and "comprise" used in the specification and claims of the present application indicate the presence of the described features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or their collections.

[0027] According to a first aspect of the present application, the present application provides a method for optimizing storage of control terminal data. Figure 1 1 is a flow chart of a method for optimizing storage of terminal data according to an embodiment of the present application. Figure 1 As shown, the control terminal data optimization storage method includes steps S101 to S104, which are described in detail below.

[0028] S101, performing polynomial fitting on the data to be stored according to a preset order to obtain a fitting error, wherein the fitting error is a proportion of abnormal residual values, and the abnormal residual value is a residual value greater than a residual threshold.

[0029] In one embodiment, the data to be stored is time series data collected during the operation of the control terminal, which may be the reading of a sensor, or may be a control instruction or environmental information, and this application does not limit this. It is understandable that the time window of the data to be stored may be one day or half a day, and the time window of the data to be stored may be adjusted according to the storage frequency in a specific scenario.

[0030] The method of performing polynomial fitting on the data to be stored according to a preset order to obtain a fitting error includes: constructing an initial polynomial of a preset order, performing polynomial fitting on the data to be stored using a least squares method to obtain a fitting polynomial of a preset order; subtracting a predicted value of the fitting polynomial from an actual value at any moment to obtain a residual value at each moment; in response to a residual value being greater than a residual threshold, marking the residual value as an abnormal residual value; and taking the proportion of the number of abnormal residual values ​​in the data to be stored as the fitting error.

[0031] The input of the initial polynomial is any time, the output is the predicted value at the time, and the initial polynomial satisfies the relationship: , is the preset order, For the The unknown coefficients of order, Indicates time of Power, For the moment That is to say, the process of fitting the stored data with a polynomial using the least squares method is also the process of continuously updating all the undetermined coefficients in the initial polynomial.

[0032] Among them, the time The residual value of for: , For the moment The actual value of To fit the polynomial at time The residual threshold is 0.5.

[0033] Among them, the preset order can be directly set manually. The larger the value of the preset order is, the stronger its fitting ability for the stored data is, but the number of parameters of the fitting polynomial itself will also increase, and the amount of storage occupied when storing the fitting polynomial is also large. Therefore, the value of the preset order in this embodiment is 3.

[0034] In another embodiment, the value of the preset order can also be adaptively determined according to the data distribution of the data to be stored; specifically, the method for obtaining the preset order includes: setting the initial order, obtaining the fitting polynomial of the initial order and the normal residual value to calculate the evaluation value of the initial order, the evaluation value is positively correlated with the number of normal residual values, and negatively correlated with the parameter quantity of the fitting polynomial; within the set range, the initial order corresponding to the maximum evaluation value is used as the preset order.

[0035] Among them, the normal residual value is the residual value less than or equal to the residual threshold value, and the actual value at the corresponding moment of the normal residual value can be accurately predicted by the fitting polynomial. Therefore, the storage of the actual value at the corresponding moment of the normal residual value can be achieved by storing the fitting polynomial of the initial order, and storing the fitting polynomial requires storing all the undetermined coefficients; therefore, the smaller the number of all the undetermined coefficients, the larger the number of normal residual values, and the better the compression effect of the fitting polynomial. Therefore, the ratio of the number of normal residual values ​​to the number of fitting polynomial parameters is used as the evaluation value of the initial order; specifically, the initial order is Evaluation value for: , is the number of normal residual values.

[0036] Understandably, is the initial order The number of all undetermined coefficients in the corresponding fitting polynomial is the parameter quantity of the fitting polynomial; the setting range is 1 to 10.

[0037] In this way, the least squares method is used to perform polynomial fitting on the data to be stored, and the residual value at each moment in the data to be stored is obtained. By comparing the residual value and the residual threshold, all residual values ​​are divided into abnormal residual values ​​and normal residual values, and the proportion of the number of abnormal residual values ​​is taken as the fitting error.

[0038] S102, in response to the fitting error being less than the error threshold, the fitting polynomial is stored to complete the storage of the data to be stored, otherwise, the aggregation degree of the abnormal residual values ​​is calculated, the aggregation degree is the ratio between the number of abnormal residual values ​​and the length of the abnormal time period, and the abnormal time period is the time period between the minimum moment and the maximum moment of the abnormal residual values.

[0039] In one embodiment, the error threshold is 0.05. If the fitting error is less than the error threshold, it means that more than 95% of the actual values ​​can be accurately predicted by the fitting polynomial. At this time, only the fitting polynomial needs to be stored. The storing of the fitting polynomial includes: storing all the undetermined coefficients of the fitting polynomial. At this time, in the decompression stage, the timestamp is directly input into the fitting polynomial to obtain the actual value of the timestamp.

[0040] On the contrary, if the fitting error is not less than the error threshold, it means that when only the fitting polynomial is stored, a large number of actual values ​​cannot be accurately stored. At this time, it is necessary to calculate the concentration of abnormal residual values. The concentration is the ratio between the number of abnormal residual values ​​and the length of the abnormal time period, and the abnormal time period is the time period between the minimum and maximum moments of the abnormal residual values.

[0041] For example, if the number of abnormal residual values ​​is 25, and the minimum time of the abnormal residual value is 5, and the maximum time is 145; then the value of the concentration is .

[0042] In this way, the aggregation degree can reflect the distribution of abnormal residual values. If the abnormal residual values ​​are concentrated in a time period, the aggregation degree is large. If the abnormal residual values ​​are discretely distributed at multiple moments in the data to be stored, the aggregation degree is small.

[0043] S103, in response to the degree of aggregation being less than a degree of aggregation threshold, storing the fitting polynomial, the abnormal residual value and its timestamp, and completing the storage of the data to be stored.

[0044] In one embodiment, the value of the aggregation threshold is 0.5. If the aggregation is less than the aggregation threshold, it means that the distribution of abnormal residual values ​​is relatively dispersed. At this time, it is not necessary to store all residual values, and only the fitting polynomial, abnormal residual values ​​and their timestamps need to be stored.

[0045] It can be understood that in the decompression stage, the fitting polynomial can accurately predict the actual value corresponding to the normal residual value; for the abnormal residual value, the corresponding timestamp is input into the fitting polynomial to obtain the predicted value, and the sum of the predicted value and the abnormal residual value is the actual value corresponding to the abnormal residual value. Therefore, storing the fitting polynomial, the abnormal residual value and its timestamp can realize the storage of the data to be stored, and the storage is completed.

[0046] S104: In response to the concentration being not less than a concentration threshold, storing a fitting polynomial and a sequence of residual values ​​within an abnormal time period.

[0047] In response to the concentration being not less than the concentration threshold, it indicates that the distribution of abnormal residual values ​​is relatively concentrated. At this time, the residual value sequence and the fitting polynomial in the abnormal time period can be directly stored. In the decompression stage, for the abnormal time period, the residual value sequence is added to the predicted value of the fitting polynomial to obtain the actual value in the abnormal time period, and for any time outside the abnormal time period, the predicted value of the fitting polynomial is directly used as the actual value.

[0048] In one embodiment, the method for storing the residual value sequence within the abnormal time period includes: taking the residual value sequence as the sub-data to be stored, and performing polynomial fitting on the sub-data to be stored until the storage of the sub-data to be stored is completed.

[0049] It should be noted that the residual value sequence is used as the sub-data to be stored, and steps S101 to S104 are repeatedly performed until the storage of the sub-data to be stored is completed, and the residual value sequence is successfully stored. In the decompression stage, the residual value sequence is first decompressed, and then the decompressed residual value sequence and the fitting polynomial are used to obtain the actual value in the data to be stored.

[0050] It can be understood that since the polynomial fitting is to find the best fitting polynomial by minimizing the residual sum of squares, the residual value sequence has removed the larger data fluctuations in the data to be stored, and the residual value sequence is a relatively flat time series. When the residual value sequence is fitted with a polynomial, the number of abnormal residual values ​​is small. That is to say, when the residual value sequence is fitted with a polynomial, the fitting error is small, the storage can be completed quickly, and efficient compression can be achieved.

[0051] In this way, according to the fitting error of the data to be stored in the polynomial fitting process and the distribution of abnormal residual values, the storage strategy is flexibly selected to effectively optimize the use of storage space, thereby improving storage efficiency.

[0052] The above describes the technical principle and implementation details of a method for optimizing storage of control terminal data of the present application through specific embodiments. According to the preset order, polynomial fitting is performed on the data to be stored to obtain the residual value at each moment, and the residual value and the residual threshold are compared to divide all residual values ​​into normal residual values ​​and abnormal residual values, and the number of abnormal residual values ​​is used as the fitting error; when the fitting error is less than the error threshold, it means that the fitting polynomial can accurately predict the actual value at each moment, store the fitting polynomial, and complete the storage of the data to be stored. On the contrary, the aggregation degree of the abnormal residual value is calculated. If the aggregation degree is less than the aggregation degree threshold, it means that the distribution of the abnormal residual value is relatively dispersed. At this time, the fitting polynomial, the abnormal residual value and its timestamp are stored to complete the storage of the data to be stored; if the aggregation degree is not less than the aggregation degree threshold, it means that the distribution of the abnormal residual value is relatively concentrated, and the fitting polynomial and the residual value sequence in the abnormal time period are stored. According to the fitting error of the data to be stored in the polynomial fitting process and the distribution of the abnormal residual value, the storage strategy is flexibly selected to improve the compression effect of the control terminal data.

[0053] According to the second aspect of the present application, the present application also provides a control terminal data optimization storage system. Figure 2 1 is a structural block diagram of a control terminal data optimization storage system according to an embodiment of the present application. Figure 2 As shown, the system 50 includes a processor and a memory, the memory stores computer program instructions, and when the computer program instructions are executed by the processor, a control terminal data optimization storage method according to the first aspect of the present application is implemented. The system also includes other components well known to those skilled in the art, such as a communication bus and a communication interface, whose settings and functions are known in the art, so they are not described here.

[0054] In the present application, the aforementioned memory may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. For example, a computer-readable storage medium may be any suitable magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory RRAM (Resistive Random Access Memory), a dynamic random access memory DRAM (Dynamic Random Access Memory), a static random access memory SRAM (Static Random-Access Memory), an enhanced dynamic random access memory EDRAM (Enhanced Dynamic Random Access Memory), a high-bandwidth memory HBM (High-Bandwidth Memory), a hybrid memory cube HMC (Hybrid Memory Cube), etc., or any other medium that can be used to store the required information and can be accessed by an application, a module, or both. Any such computer storage medium may be part of a device or accessible or connectable to a device. Any application or module described in this application may be implemented using computer-readable / executable instructions that may be stored or otherwise maintained by such a computer-readable medium.

[0055] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0056] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the patent application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent application shall be subject to the attached claims.

Claims

1. A method for optimizing storage of control terminal data, characterized in that: The storage method comprises: Perform polynomial fitting on the data to be stored according to a preset order to obtain a fitting error, wherein the fitting error is the number ratio of abnormal residual values, and the abnormal residual value is a residual value greater than a residual threshold; In response to the fitting error being less than the error threshold, the fitting polynomial is stored to complete the storage of the data to be stored, otherwise, the concentration of the abnormal residual values ​​is calculated, where the concentration is the ratio between the number of abnormal residual values ​​and the length of the abnormal time period, and the abnormal time period is the time period between the minimum moment and the maximum moment of the abnormal residual values; In response to the concentration being less than the concentration threshold, storing the fitting polynomial, the abnormal residual value and its timestamp, and completing the storage of the data to be stored; In response to the concentration being not less than a concentration threshold, storing a fitting polynomial and a residual value sequence within an abnormal time period, including: taking the residual value sequence as sub-data to be stored, performing polynomial fitting on the sub-data to be stored, until the storage of the sub-data to be stored is completed.

2. A control terminal data optimization storage method according to claim 1, characterized in that: The polynomial fitting of the stored data according to the preset order to obtain the fitting error includes: Constructing an initial polynomial of a preset order, performing polynomial fitting on the stored data using the least squares method, and obtaining a fitting polynomial of a preset order; Subtract the predicted value of the fitting polynomial from the actual value at any time to obtain the residual value at each time; In response to the residual value being greater than the residual threshold, the residual value is marked as an abnormal residual value; and the proportion of the number of abnormal residual values ​​in the data to be stored is used as the fitting error.

3. A control terminal data optimization storage method according to claim 2, characterized in that: The input of the initial polynomial is any time, and the output is the predicted value at that time; The initial polynomial satisfies the relationship: , is the preset order, For the The unknown coefficients of order, Indicates time of Power, For the moment The predicted value of .

4. The method for optimizing storage of control terminal data according to claim 1, characterized in that: The method for obtaining the preset order includes: The initial order is set, and the fitting polynomial and normal residual value of the initial order are obtained to calculate the evaluation value of the initial order, wherein the evaluation value is positively correlated with the number of normal residual values ​​and negatively correlated with the parameter quantity of the fitting polynomial; within the set range, the initial order corresponding to the maximum evaluation value is used as the preset order.

5. The method for optimizing storage of control terminal data according to claim 4, characterized in that: Initial order Evaluation value for: , is the number of normal residual values.

6. The method for optimizing storage of control terminal data according to claim 1, characterized in that: The storing of the fitting polynomial includes: storing all undetermined coefficients of the fitting polynomial.

7. The method for optimizing and storing control terminal data according to claim 1, characterized in that: time The residual value of for: , For the moment The actual value of To fit the polynomial at time The predicted value of .

8. A control terminal data optimization storage system, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, a control terminal data optimization storage method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • PLC equipment data optimization storage method

    CN116865768A

  • Data processing method and device

    CN110795324A

  • Data processing method and device, electronic equipment and nonvolatile storage medium

    CN118520246A