Data prediction method and device, electronic equipment and storage medium

By performing molecular set fitting and error analysis on the frequency deviation reading historical data of the atomic time scale system, the predictor weight is determined, and accurate and stable prediction of the frequency deviation reading of the atomic time scale system is achieved, and the problem of insufficient accuracy and stability in the prior art is solved.

CN119760350APending Publication Date: 2025-04-04NATIONAL INSTITUTE OF METROLOGY CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411836425.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

The prior art has problems of insufficient accuracy and stability when predicting frequency deviation readings in atomic time scale systems, especially in the case of changes in external environment and limited equipment performance.

Method used

By obtaining a historical data set including multiple historical truth values ​​of the data to be predicted, and dividing it into multiple data subsets, each data subset is curved or straight-line fitted to obtain a predictor, calculate the prediction error value, determine the predictor weight, and finally determine the predicted value of the data to be predicted based on these weights and prediction results.

Benefits of technology

By designing multiple predictors, this method avoids the negative impact of a single predictor anomaly outlier historical data on the prediction results, improves the stability of the prediction, and improves the accuracy of the prediction through weight optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119760350A_ABST
    Figure CN119760350A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a data prediction method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining a historical data set comprising a plurality of historical truth values corresponding to to-be-predicted data, and dividing the historical data set into a plurality of data subsets, the to-be-predicted data being future moment data of a time sequence; performing curve or straight line fitting on each data subset to obtain a predictor corresponding to each data subset, and calculating a prediction error of each predictor corresponding to each historical truth value to obtain a plurality of prediction error values; determining a predictor weight of each predictor based on each prediction error value; and predicting the to-be-predicted data through each predictor to obtain a prediction result of each predictor, and determining a predicted value of the to-be-predicted data based on the corresponding predictor weight and the prediction result of each predictor. According to the embodiment of the invention, the accuracy and stability of predicting the to-be-predicted data can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a data prediction method, device, electronic equipment and storage medium. Background Art

[0002] Many systems in actual application scenarios need to be controlled based on predicted data. For example, for the atomic time scale system, due to the influence of external environmental changes, such as changes in temperature and humidity, and the performance limitations of the device itself, the frequency of the atomic clock will change over time. Therefore, it is necessary to trace back to a higher-precision standard source to obtain a frequency reference, obtain the relative frequency deviation value, and then predict the future relative frequency deviation reading based on the historical relative frequency deviation reading, and then control the time scale based on the corresponding predicted value. Therefore, an accurate and stable data prediction solution is urgently needed. Summary of the invention

[0003] The embodiment of the present invention provides a data prediction method, which can improve the accuracy and stability of predicting data to be predicted.

[0004] In a first aspect, an embodiment of the present invention provides a data prediction method, comprising:

[0005] Acquire a historical data set including a plurality of historical true values ​​corresponding to data to be predicted, and divide the historical data set into a plurality of data subsets, wherein the data to be predicted is future time point data of a time series;

[0006] Performing curve or straight line fitting on each data subset to obtain a predictor corresponding to each data subset, and calculating a prediction error of each predictor corresponding to each historical true value to obtain a plurality of prediction error values;

[0007] determining a predictor weight for each predictor based on each prediction error value; and

[0008] The data to be predicted are predicted by the respective predictors to obtain prediction results of the respective predictors, and a prediction value of the data to be predicted is determined based on the corresponding predictor weights and the prediction results of the respective predictors.

[0009] In a second aspect, an embodiment of the present invention provides a data prediction device, including:

[0010] A data subset acquisition module, used to acquire a historical data set including a plurality of historical true values ​​corresponding to the data to be predicted, and divide the historical data set into a plurality of data subsets, wherein the data to be predicted is future time data of a time series;

[0011] A prediction error value acquisition module, used to perform curve or straight line fitting on each data subset to obtain a predictor corresponding to each data subset, and calculate the prediction error of each predictor corresponding to each historical true value to obtain multiple prediction error values;

[0012] a predictor weight acquisition module, configured to determine a predictor weight for each predictor based on each prediction error value; and

[0013] The prediction value acquisition module is used to predict the data to be predicted by each predictor to obtain the prediction results of each predictor, and determine the prediction value of the data to be predicted based on the corresponding predictor weight and the prediction results of each predictor.

[0014] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a data prediction method as described in any one of the embodiments of the present invention is implemented.

[0015] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a data prediction method as described in any one of the embodiments of the present invention.

[0016] The embodiments of the present invention provide a data prediction method, device, electronic device and storage medium, which obtain a data subset of a historical data set including multiple historical true values ​​corresponding to the data to be predicted, perform curve or straight line fitting on each data subset to obtain a corresponding predictor, and calculate the prediction error value of each predictor corresponding to each historical true value, and then determine the weight of each predictor based on each prediction error value, and determine the prediction value of the data to be predicted based on the weight of each predictor and the prediction result of each predictor on the data to be predicted. By designing multiple predictors, the negative impact of abnormal outlier historical data on the prediction result in the case of a single predictor can be avoided, and the prediction stability can be improved. By considering the prediction error of each predictor corresponding to each historical true value, the weight of each predictor is determined on the premise of fully considering the accuracy and stability of each predictor, and then the prediction value of the data to be predicted is determined based on the weight of each predictor, thereby improving the accuracy and stability of the prediction of the data to be predicted. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solution of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 is a flow chart of a data prediction method provided by an embodiment of the present invention;

[0019] Figure 2 is another flow chart of the data prediction method provided by an embodiment of the present invention;

[0020] Figure 3 Another flowchart of the data prediction method provided by the embodiment of the present invention is

[0021] Figure 4 It is a schematic diagram comparing the accuracy of the data prediction method provided by the embodiment of the present invention and the data prediction method of the prior art;

[0022] Figure 5 It is a schematic diagram of stability comparison between the data prediction method provided by the embodiment of the present invention and the data prediction method in the prior art;

[0023] Figure 6 is a structural schematic diagram of a data prediction device provided by an embodiment of the present invention;

[0024] Figure 7 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0025] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0027] Figure 1A flow chart of a data prediction method provided in an embodiment of the present invention. This embodiment can be applied to the scenario of predicting the clock error or frequency error signal of an atomic clock. The method can be executed by a data prediction device provided in an embodiment of the present invention, and the device can be implemented in software and / or hardware. In a specific embodiment, the device can be integrated in an electronic device, such as a computer, a server, etc. The following embodiments will be described by taking the device integrated in an electronic device as an example. Reference Figure 1 , the method may specifically include the following steps:

[0028] Step 101, obtain a historical data set including multiple historical true values ​​corresponding to the data to be predicted, and divide the historical data set into multiple data subsets, where the data to be predicted is the future time data of a time series. This step can facilitate curve or straight line fitting of each data subset to obtain a corresponding predictor.

[0029] Optionally, the data to be predicted is a clock error or frequency error signal of an atomic clock at a future time.

[0030] Optionally, the multiple historical true values ​​corresponding to the data to be predicted are high-precision reference frequencies of atomic clocks at multiple historical moments.

[0031] Specifically, the data to be predicted may also be parameter values ​​of other control system parameters at future times.

[0032] Optionally, the process of obtaining a historical data set including multiple historical true values ​​corresponding to the data to be predicted includes: obtaining multiple historical true values ​​based on a preset time window, and establishing a historical data set based on the multiple historical true values.

[0033] Specifically, the window length of the above time window can be set based on empirical data.

[0034] Optionally, the process of dividing the historical data set into multiple data subsets includes: dividing the historical data set into multiple data subsets based on a random sampling method without replacement.

[0035] Optionally, each data subset has the same length.

[0036] Optionally, when the length of each of the above data subsets is m and the number of subsets is p, the length n of the historical data set satisfies n=p·m.

[0037] Specifically, the lengths of the above data subsets may also be unequal.

[0038] Optionally, the process of dividing the historical data set into multiple data subsets may further include: dividing the historical data set into multiple data subsets based on a random sampling method with replacement.

[0039] Specifically, the length m of each of the above data subsets must satisfy 2≤m<n, where n represents the length of the historical data set.

[0040] It should be noted that the use of sampling without replacement can ensure that all data points in the historical data set will be used, and the historical information in the historical data set can be fully utilized, which will help improve the final prediction accuracy.

[0041] Step 102, curve or straight line fitting is performed on each data subset to obtain a predictor corresponding to each data subset, and the prediction error of each predictor corresponding to each historical true value is calculated to obtain multiple prediction error values. This step improves the prediction stability by designing multiple predictors to reduce the occasional errors that may occur when predicting with one predictor, and can be beneficial to determine the weight of each predictor under the premise of fully considering the accuracy and stability of each predictor by considering the prediction error of each predictor corresponding to each historical true value.

[0042] Optionally, the process of performing curve or straight line fitting on each data subset includes: performing curve or straight line fitting on each data subset based on the least squares method.

[0043] Optionally, the process of fitting a curve or a straight line to each data subset based on the least square method includes: fitting each data subset to a curve corresponding to a polynomial.

[0044] Specifically, each data subset may also be fitted into a curve of other forms, such as a curve corresponding to an exponential function.

[0045] Optionally, the process of fitting each data subset into a curve corresponding to a polynomial includes: determining the order of a target polynomial, determining a polynomial to be optimized based on the order of the target polynomial, and optimizing and updating parameters of the initial polynomial to obtain the target polynomial.

[0046] Optionally, when predicting the relative frequency deviation reading of the active hydrogen maser, the order of the above target polynomial is determined to be first order, and the above polynomial to be optimized can be expressed as:

[0047] f i (t) = a i +b i t

[0048] Among them, t represents the time point, a i and b i Represents the parameters of the polynomial.

[0049] Specifically, each of the above predictors can be understood as a target polynomial corresponding to each data subset.

[0050] Specifically, the prediction errors of the predictors corresponding to the current historical true values ​​in the above-mentioned historical true values ​​can be understood as the difference between the prediction values ​​obtained by the predictors at the same time point as the current historical true value and the current historical true value.

[0051] Optionally, the process of calculating the prediction errors of each predictor corresponding to each historical true value to obtain multiple prediction error values ​​includes:

[0052] For each historical true value, a predicted value at the same time point as the current historical true value is obtained through each predictor; the difference between the current historical true value and the predicted value of each predictor is calculated to obtain multiple prediction error values ​​corresponding to the current historical true value.

[0053] Step 103, determining the predictor weight of each predictor based on each prediction error value. This step can determine the weight of each predictor by considering the prediction error of each predictor corresponding to each historical true value, taking into full consideration the accuracy and stability of each predictor, so as to accurately determine the prediction value of the data to be predicted based on the predictor weight of each predictor.

[0054] Optionally, the process of determining the predictor weight of each predictor based on each prediction error value includes: calculating the predictor weight of each predictor based on the variance of the prediction error value corresponding to each predictor.

[0055] Step 104, predicting the data to be predicted by each predictor to obtain the prediction results of each predictor, and determining the prediction value of the data to be predicted based on the corresponding predictor weight and the prediction results of each predictor. This step is based on steps 101 to 103, by obtaining a data subset of a historical data set including multiple historical true values ​​corresponding to the data to be predicted, and performing curve or straight line fitting on each data subset to obtain a corresponding predictor, and calculating the prediction error value of each predictor corresponding to each historical true value, and then determining the weight of each predictor based on each prediction error value, and determining the prediction value of the data to be predicted based on the weight of each predictor and the prediction result of each predictor on the data to be predicted, it is possible to design multiple predictors to avoid the negative impact of abnormal outlier historical data on the prediction result in the case of a single predictor, improve the prediction stability, and by considering the prediction error of each predictor corresponding to each historical true value, determine the weight of each predictor under the premise of fully considering the accuracy and stability of each predictor, and then determine the prediction value of the data to be predicted based on the weight of each predictor, thereby improving the accuracy and stability of the prediction of the data to be predicted.

[0056] Optionally, the process of determining the predicted value of the data to be predicted based on the corresponding predictor weights and the prediction results of each predictor includes:

[0057] The prediction results of each predictor are weighted and summed based on the corresponding predictor weights to obtain the predicted value of the above-mentioned data to be predicted.

[0058] Specifically, after weighted summing the prediction results of each predictor based on the corresponding predictor weights, other common processing can be performed on the weighted summation result, such as multiplying it by a correction coefficient determined based on weather or environmental information corresponding to the data to be predicted, to obtain the predicted value of the data to be predicted.

[0059] The data prediction method provided by the embodiment of the present invention is further described below. Figure 2 As shown, Figure 1 Step 103 in the method may include the following steps:

[0060] Step 1031, establishing a total error correlation matrix based on each prediction error value.

[0061] Specifically, the above total error correlation matrix can be expressed as the following square matrix:

[0062]

[0063] C ij =E[m i m j ]

[0064] Among them, E[] represents the expectation, m represents the prediction error of each predictor corresponding to each historical true value in the historical data set, i and j represent the sequence number of the predictor, x represents the time point, and p represents the total number of predictors.

[0065] Step 1032, determining the predictor weights of each predictor based on the total error correlation matrix.

[0066] Optional, such as Figure 3 As shown, the process of determining the predictor weights of each predictor based on the total error correlation matrix includes:

[0067] 1032A, calculate the rank of the total error correlation matrix to obtain a rank calculation result.

[0068] Specifically, the rank of the above-mentioned total error correlation matrix can be calculated by a mathematical calculation library.

[0069] 1032B, based on the rank calculation result, determine whether the total error correlation matrix is ​​an ill-conditioned matrix to obtain an ill-conditioned matrix determination result.

[0070] Optionally, the process of determining whether the total error correlation matrix is ​​an ill-conditioned matrix based on the rank calculation result includes: determining whether the total error correlation matrix is ​​not fully rank based on the rank calculation result, and determining the total error correlation matrix to be an ill-conditioned matrix when the total error correlation matrix is ​​not fully rank.

[0071] It is understandable that the results given by the mathematical library represent the resolution limit that can be achieved by the machine precision of the platform on which the algorithm runs. Even if a matrix is ​​full rank in theory, but the tiny numerical differences between its rows and columns are far smaller than the machine precision, then for the computer, this matrix is ​​not full rank.

[0072] Specifically, it may also be determined based on other common rules whether the total error correlation matrix is ​​an ill-conditioned matrix.

[0073] 1032C, calculate the predictor weights of each predictor based on the ill-conditioned matrix determination result and the total error correlation matrix.

[0074] Optionally, the process of calculating the predictor weights of each predictor based on the ill-conditioned matrix determination result and the total error correlation matrix includes:

[0075] When the ill-conditioned matrix determination result is that the total error correlation matrix is ​​an ill-conditioned matrix, regularization terms are added to each main diagonal element of the total error correlation matrix to obtain a regularized correlation matrix, and the predictor weights of each predictor are calculated based on the inverse matrix of the regularized correlation matrix.

[0076] Optionally, the regularized correlation matrix corresponding to the aforementioned full error correlation matrix can be expressed as:

[0077]

[0078] Among them, ε represents the above regularization term.

[0079] Specifically, the regularization term can be determined based on empirical data.

[0080] It can be understood that since the full error correlation matrix is ​​a symmetric matrix, the regularized correlation matrix with regularization terms added only to the diagonal elements is also a symmetric matrix.

[0081] Optionally, when the result of the ill-conditioned matrix determination is that the total error correlation matrix is ​​an ill-conditioned matrix, the predictors corresponding to the rows or columns that are approximately linearly correlated in the total error correlation matrix are deleted, and the step of "calculating the prediction errors of each predictor corresponding to each historical true value to obtain multiple prediction error values" and other subsequent steps are re-executed based on the remaining predictors.

[0082] It can be understood that since each predictor is fitted by a data subset of each historical data set, regularizing the total error correlation matrix does not require discarding the predictor, thereby retaining the information contained in the historical data set as much as possible; and the inverse matrix of the regularized correlation matrix is ​​essentially an approximation of the inverse matrix of the total error correlation matrix, so the predictor weight results of each predictor calculated based on the inverse matrix of the regularized correlation matrix and the inverse matrix of the total error correlation matrix are not much different, which can help obtain prediction values ​​with higher accuracy.

[0083] Optionally, the above process of calculating the predictor weights of each predictor based on the ill-conditioned matrix determination result and the total error correlation matrix includes: when the ill-conditioned matrix determination result is that the total error correlation matrix is ​​not an ill-conditioned matrix, calculating the predictor weights of each predictor based on the inverse matrix of the total error correlation matrix.

[0084] In a specific example, let C represent the total error correlation matrix or the regularized correlation matrix, then the predictor weights of each predictor can be calculated based on the following formula:

[0085]

[0086]

[0087]

[0088] Among them, w i represents the predictor weight of each predictor; C -1 represents the regularized correlation matrix or the inverse matrix of the total error correlation matrix; SUM row (C -1 ,i) indicates that C -1 Sum the elements of the i-th row of all (C -1 ) indicates that C -1 The sum of all elements of ; i represents the ordinal number of the predictor and C -1 The row number in the table; j indicates C -1 The column number in .

[0089] Optionally, the process of performing weighted summation on the prediction results of each predictor based on the corresponding predictor weight to obtain the prediction value of the above-mentioned data to be predicted can be performed based on the following formula:

[0090]

[0091] Among them, F(t+1) represents the predicted value of the data to be predicted corresponding to time t+1, p represents the total number of predictors, and w i represents the predictor weight of the i-th predictor, f i(t+1) represents the prediction result of predictor i at t+1.

[0092] Optionally, the process of determining the predictor weights of each predictor based on the total error correlation matrix includes: determining the predictor weights of each predictor based on a method of finding conditional extreme values ​​using the total error correlation matrix and a Lagrange multiplier method.

[0093] Optionally, the process of determining the predictor weights of each predictor based on the above-mentioned method of finding conditional extreme values ​​based on the total error correlation matrix and the Lagrange multiplier method includes: based on the total error correlation matrix or the regularized total error correlation matrix, determining the calculation formula for the predictor weights of each predictor that minimizes the mean square error of the predicted value of the data to be predicted by the Lagrange multiplier method, and calculating the optimal predictor weights of each predictor based on the calculation formula.

[0094] Specifically, based on our assumption that the prediction error m i The variance of is bounded, then the mean square error of the predicted value of the data to be predicted can be expressed as:

[0095]

[0096] Where: C ij =E[m i m j ]=E[m i ]E[m j ]+Cov(m i ,m j ), F(x) represents the predicted value of the data to be predicted.

[0097] Specifically, because the total error correlation matrix C is a positive definite or semi-positive definite matrix, the conditional extreme value of the objective function is the minimum value, and the Lagrangian function can be constructed as:

[0098]

[0099] Solving the above Lagrangian function, we can get the aforementioned w i The calculation formula for .

[0100] The embodiment of the present invention establishes a total error correlation matrix and determines the predictor weights of each predictor based on the inverse matrix of the total error correlation matrix, so as to mine the correlations between different predictors, thereby improving the accuracy of predicting the data to be predicted; and, since the embodiment of the present invention obtains the predictor weights of each predictor that minimizes the mean square error of the predicted value of the data to be predicted by a method based on finding conditional extreme values ​​using the Lagrange multiplier method, the optimal prediction value obtained by weighted summation based on the optimized weights is unique, thereby improving the stability of predicting the data to be predicted.

[0101] In an optional specific example, the frequency difference signal of the hydrogen atomic clock in 60 days is predicted, the length of the historical data set n = 49 days, the number of data subsets p = 7, and the length of each data subset m = 7 days. The prediction accuracy and stability of the hydrogen atomic clock prediction method in the prior art and the prediction method of the present invention are compared.

[0102] Depend on Figure 4 It can be seen that the root mean square error, i.e., RMSE value, of the predicted value of the method of the present invention is significantly reduced compared with the mean square error of the predicted value of the prior art method. Therefore, the scheme of the present invention can significantly improve the prediction accuracy of the frequency difference signal predicted by the hydrogen atomic clock.

[0103] Depend on Figure 5 It can be seen that the multiple prediction results of the prediction values ​​of the prior art method are different, which is manifested as the prediction curves do not overlap, indicating that the stability of the prior art is poor, while the multiple prediction results of the prediction values ​​of the method of the present invention overlap into one curve, which shows that the scheme of the present invention can significantly improve the stability of predicting the frequency difference signal predicted by the hydrogen atomic clock.

[0104] Figure 6 is a structural diagram of a data prediction device provided by an embodiment of the present invention, and the device is suitable for performing data prediction provided by an embodiment of the present invention. Figure 6 As shown, the device may specifically include:

[0105] The data subset acquisition module 601 is used to acquire a historical data set including multiple historical true values ​​corresponding to the data to be predicted, and divide the historical data set into multiple data subsets, where the data to be predicted is the future moment data of a time series, so as to facilitate curve or straight line fitting of each data subset to obtain a corresponding predictor.

[0106] Optionally, the data to be predicted is a clock error or frequency error signal of an atomic clock at a future time.

[0107] Optionally, the data subset acquisition module 601 can be specifically used to acquire multiple historical true values ​​based on a preset time window, and establish a historical data set based on the multiple historical true values.

[0108] Optionally, the data subset acquisition module 601 can be specifically used to divide the historical data set into multiple data subsets based on a random sampling method without replacement.

[0109] The prediction error value acquisition module 602 is used to perform curve or straight line fitting on each data subset to obtain the predictor corresponding to each data subset, and calculate the prediction error of each predictor corresponding to each historical true value to obtain multiple prediction error values. By designing multiple predictors to reduce the occasional errors that may be generated when a predictor predicts, the prediction stability is improved, and it is beneficial to determine the weight of each predictor by considering the prediction error of each predictor corresponding to each historical true value, while fully considering the accuracy and stability of each predictor.

[0110] Specifically, the prediction errors of the predictors corresponding to the current historical true values ​​in the above-mentioned historical true values ​​can be understood as the difference between the prediction values ​​obtained by the predictors at the same time point as the current historical true value and the current historical true value.

[0111] The predictor weight acquisition module 603 is used to determine the predictor weight of each predictor based on each prediction error value. By considering the prediction errors of each predictor corresponding to each historical true value, the weight of each predictor can be determined under the premise of fully considering the accuracy and stability of each predictor, which is conducive to accurately determining the predicted value of the data to be predicted based on the predictor weight of each predictor.

[0112] Optionally, the predictor weight acquisition module 603 can be specifically used to establish a total error correlation matrix based on each prediction error value; and determine the predictor weight of each predictor based on the total error correlation matrix.

[0113] Optionally, the above-mentioned predictor weight acquisition module 603 can be specifically used to calculate the rank of the total error correlation matrix to obtain a rank calculation result; determine whether the total error correlation matrix is ​​an ill-conditioned matrix based on the rank calculation result to obtain an ill-conditioned matrix determination result; and calculate the predictor weights of each predictor based on the ill-conditioned matrix determination result and the total error correlation matrix.

[0114] Optionally, the above-mentioned predictor weight acquisition module 603 can be specifically used for, when the result of the ill-conditioned matrix determination is that the total error correlation matrix is ​​an ill-conditioned matrix, adding regularization terms to each main diagonal element of the total error correlation matrix to obtain a regularized correlation matrix, and calculating the predictor weights of each predictor based on the inverse matrix of the regularized correlation matrix; and when the result of the ill-conditioned matrix determination is that the total error correlation matrix is ​​not an ill-conditioned matrix, calculating the predictor weights of each predictor based on the inverse matrix of the total error correlation matrix.

[0115] Optionally, the above-mentioned calculation formula for calculating the predictor weights of each predictor based on the inverse matrix of the regularized correlation matrix, or the calculation formula for calculating the predictor weights of each predictor based on the inverse matrix of the total error correlation matrix is:

[0116]

[0117]

[0118]

[0119] Where w represents the predictor weight of each predictor; C -1 represents the regularized correlation matrix or the inverse matrix of the total error correlation matrix; SUM row (C -1 ,i) indicates that C -1 Sum the elements of the i-th row of all (C -1 ) indicates that C -1 The sum of all elements of ; i represents the ordinal number of the predictor and C -1 The row number in the table; j indicates C -1 The column number in .

[0120] The prediction value acquisition module 604 is used to predict the data to be predicted by each predictor to obtain the prediction results of each predictor, and determine the prediction value of the data to be predicted based on the corresponding predictor weight and the prediction results of each predictor. On the basis of modules 601 to 603, a data subset of a historical data set including multiple historical true values ​​corresponding to the data to be predicted can be obtained, and a curve or straight line fitting can be performed on each data subset to obtain a corresponding predictor, and the prediction error value of each predictor corresponding to each historical true value can be calculated, and then the weight of each predictor can be determined based on each prediction error value, and the prediction value of the data to be predicted can be determined based on the weight of each predictor and the prediction result of each predictor on the data to be predicted. It is possible to design multiple predictors to avoid the negative impact of abnormal outlier historical data on the prediction result in the case of a single predictor, improve the prediction stability, and by considering the prediction error of each predictor corresponding to each historical true value, determine the weight of each predictor under the premise of fully considering the accuracy and stability of each predictor, and then determine the prediction value of the data to be predicted based on the weight of each predictor, so as to improve the accuracy and stability of the prediction of the data to be predicted.

[0121] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example for illustration. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the functional modules described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0122] An embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the data prediction method provided in any of the above embodiments is implemented.

[0123] An embodiment of the present invention further provides a computer-readable medium having a computer program stored thereon, and when the program is executed by a processor, the data prediction method provided by any of the above embodiments is implemented.

[0124] An embodiment of the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements the data prediction method as described in any one of the embodiments of the present invention.

[0125] Reference below Figure 7 , which shows a schematic diagram of the structure of a computer system 700 of an electronic device suitable for implementing an embodiment of the present invention. Figure 7 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0126] like Figure 7 As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0127] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage section 708 as needed.

[0128] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the central processing unit (CPU) 701, the above-mentioned functions defined in the system of the present invention are executed.

[0129] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0130] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0131] The modules and / or units involved in the embodiments of the present invention may be implemented in software or hardware. The modules and / or units described may also be provided in a processor, for example, may be described as: a processor including a data subset acquisition module, a prediction error value acquisition module, a predictor weight acquisition module, and a prediction value acquisition module. The names of these modules do not, in some cases, constitute limitations on the modules themselves.

[0132] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device implements: obtaining a historical data set including multiple historical true values ​​corresponding to the data to be predicted, and dividing the historical data set into multiple data subsets;

[0133] Perform curve or straight line fitting on each data subset to obtain the predictor corresponding to the each data subset, and calculate the prediction error of each predictor corresponding to each historical true value to obtain multiple prediction error values; determine the predictor weight of each predictor based on each prediction error value; and predict the data to be predicted by each predictor to obtain the prediction result of each predictor, and determine the prediction value of the data to be predicted based on the corresponding predictor weight and the prediction result of each predictor.

[0134] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A data prediction method, characterized in that: include: Acquire a historical data set including a plurality of historical true values ​​corresponding to data to be predicted, and divide the historical data set into a plurality of data subsets, wherein the data to be predicted is future time point data of a time series; Performing curve or straight line fitting on each data subset to obtain a predictor corresponding to each data subset, and calculating a prediction error of each predictor corresponding to each historical true value to obtain a plurality of prediction error values; determining a predictor weight for each of the predictors based on each prediction error value; as well as The data to be predicted are predicted by the respective predictors to obtain prediction results of the respective predictors, and a prediction value of the data to be predicted is determined based on the corresponding predictor weights and the prediction results of the respective predictors.

2. The data prediction method according to claim 1, characterized in that: The step of obtaining a historical data set including a plurality of historical true values ​​corresponding to the data to be predicted includes: The multiple historical true values ​​are acquired based on a preset time window, and the historical data set is established based on the multiple historical true values.

3. The data prediction method according to claim 1, characterized in that: The dividing the historical data set into a plurality of data subsets comprises: Based on a random sampling method without replacement, the historical data set is divided into the multiple data subsets.

4. The data prediction method according to claim 1, characterized in that: The determining the predictor weights of the respective predictors based on the respective prediction error values ​​comprises: Establishing the total error correlation matrix based on the respective prediction error values; and Predictor weights for the respective predictors are determined based on the total error correlation matrix.

5. The data prediction method according to claim 4, characterized in that: The determining the predictor weights of the respective predictors based on the total error correlation matrix comprises: Calculating the rank of the total error correlation matrix to obtain a rank calculation result; Determining whether the total error correlation matrix is ​​an ill-conditioned matrix based on the rank calculation result to obtain an ill-conditioned matrix determination result; and The predictor weights of the respective predictors are calculated based on the ill-conditioned matrix determination result and the total error correlation matrix.

6. The data prediction method according to claim 5, characterized in that: The calculating the predictor weights of each predictor based on the ill-conditioned matrix determination result and the total error correlation matrix comprises: When the ill-conditioned matrix determination result is that the total error correlation matrix is ​​an ill-conditioned matrix, adding regularization terms to each main diagonal element of the total error correlation matrix to obtain a regularized correlation matrix, and calculating the predictor weights of each predictor based on the inverse matrix of the regularized correlation matrix; and When the ill-conditioned matrix determination result is that the total error correlation matrix is ​​not an ill-conditioned matrix, the predictor weights of the respective predictors are calculated based on an inverse matrix of the total error correlation matrix.

7. The data prediction method according to claim 6, characterized in that: The calculation formula for calculating the predictor weights of each predictor based on the inverse matrix of the regularized correlation matrix, or calculating the predictor weights of each predictor based on the inverse matrix of the total error correlation matrix is: Among them, w i represents the predictor weight of each predictor; C -1 represents the regularized correlation matrix or the inverse matrix of the total error correlation matrix; SUM row (C -1 ,i) indicates that C -1 Sum the elements of the ith row of all (C -1 ) indicates that C -1 The sum of all elements of ; i represents the ordinal number of the predictor and C -1 The row number in the table; j indicates C -1 The column number in .

8. A data prediction device, characterized in that: include: A data subset acquisition module, used to acquire a historical data set including a plurality of historical true values ​​corresponding to the data to be predicted, and divide the historical data set into a plurality of data subsets, wherein the data to be predicted is future time data of a time series; A prediction error value acquisition module, used to perform curve or straight line fitting on each data subset to obtain a predictor corresponding to each data subset, and calculate the prediction error of each predictor corresponding to each historical true value to obtain multiple prediction error values; A predictor weight acquisition module, used to determine the predictor weight of each predictor based on each prediction error value; as well as The prediction value acquisition module is used to predict the data to be predicted by each predictor to obtain the prediction results of each predictor, and determine the prediction value of the data to be predicted based on the corresponding predictor weight and the prediction results of each predictor.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the data prediction method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the data prediction method according to any one of claims 1 to 7 is implemented.