Training method and prediction method of time series prediction model and related device

By performing affine processing and reconstruction on non-stationary time series data, the problem of decreased prediction accuracy caused by the distribution drift of time series data was solved, the model training effect was optimized and the prediction accuracy was improved.

CN115310689BActive Publication Date: 2026-01-02BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210919137.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-01
Publication Date
2026-01-02
Estimated Expiration
2042-08-01

AI Technical Summary

Technical Problem

In existing technologies, the distribution drift of time series data leads to a decrease in model prediction accuracy, and the subdomain adaptation method cannot effectively solve the prediction problem of non-stationary time series data.

Method used

By performing affine processing and reconstruction on the sample time series data, non-stationary information is removed, and model parameters are adjusted until training is completed, thus obtaining the target time series prediction model.

Benefits of technology

It reduces the distributional differences of non-stationary time series data, thereby improving model training performance and prediction accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115310689B_ABST
    Figure CN115310689B_ABST
Patent Text Reader

Abstract

The present disclosure provides a training method and a prediction method of a time series prediction model and related equipment, which relates to the field of artificial intelligence such as deep learning, and the method comprises: inputting sample time series data into the time series prediction model, obtaining affine sample time series data based on affine parameters and sample non-stationary information by the time series prediction model; obtaining prediction sample time series data according to the affine sample time series data, and reconstructing the prediction sample time series data based on the affine parameters and the sample non-stationary information to obtain reconstructed sample time series data; adjusting the model parameters including the affine parameters according to the sample time series data and the reconstructed sample time series data, and returning to continue training the adjusted time series prediction model until the training is completed to obtain a target time series prediction model. In the present disclosure, the influence of the distribution drift phenomenon of non-stationary time series data on the model training is reduced, the model training method and the model training effect of non-stationary time series data are optimized, and the accuracy of non-stationary time series prediction is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the field of data processing, in particular to the field of artificial intelligence such as deep learning, and is suitable for the scenario of power load prediction. BACKGROUND

[0002] With the development of technology, time series data prediction occupies an increasingly important position in people's work and life. In the related art, time series data prediction can be achieved through a corresponding model. However, since time series data will be accompanied by time dynamic variables, distribution drift will occur, which affects the prediction accuracy of the model trained based on time series data when predicting time series data.

[0003] In the related art, the influence of distribution drift of time series data on the prediction accuracy of the model can be alleviated by a domain sub-domain adaptation method, but the domain sub-domain adaptation method cannot be applied to time series data. SUMMARY

[0004] The present disclosure proposes a training method and a prediction method of a time series prediction model and related equipment.

[0005] According to a first aspect of the present disclosure, a training method of a time series prediction model is proposed, comprising: inputting original sample time series data into a time series prediction model, using an affine parameter of the time series prediction model and sample non-stationary information of the sample time series data to perform affine processing on the sample time series data to obtain affine sample time series data; predicting the affine sample time series data to obtain predicted sample time series data, and reconstructing the predicted sample time series data based on the current affine parameter and the sample non-stationary information to obtain reconstructed sample time series data; adjusting model parameters of the time series prediction model including the affine parameter according to the sample time series data and the reconstructed sample time series data, and returning to continue training the adjusted time series prediction model using the next sample time series data until the training is completed to obtain a target time series prediction model.

[0006] According to a second aspect of the present disclosure, a time series data prediction method is provided, comprising: obtaining original time series data to be predicted and non-stationary information of the original time series data; inputting the original time series data into a target time series prediction model, performing affine processing on the original time series data by the target time series prediction model using target affine parameters of the model and the non-stationary information, to obtain affine time series data; performing prediction on the affine time series data to obtain predicted time series data, and reconstructing the predicted time series data based on the target affine parameters and the non-stationary information, to obtain reconstructed time series data; wherein the target time series prediction model is a model trained by using the training method of the first aspect.

[0007] According to a third aspect of the present disclosure, a time series prediction method is provided, comprising: obtaining original time series data to be predicted and non-stationary information of the original time series data; performing affine processing on the original time series data based on the non-stationary information and affine parameters, to obtain first time series data; performing prediction based on the first time series data, to obtain second time series data; and performing inverse affine processing on the second time series data based on the non-stationary information and the affine parameters, to obtain reconstructed time series data.

[0008] According to a fourth aspect of the present disclosure, a training device of a time series prediction model is provided, comprising: a first affine module, configured to input original sample time series data into a time series prediction model, perform affine processing on the sample time series data by the time series prediction model using current affine parameters of the model and sample non-stationary information of the sample time series data, to obtain affine sample time series data; a first reconstruction module, configured to perform prediction on the affine sample time series data, to obtain predicted sample time series data, and reconstruct the predicted sample time series data based on the current affine parameters and the sample non-stationary information, to obtain reconstructed sample time series data; and a training module, configured to adjust model parameters of the time series prediction model including the affine parameters according to the sample time series data and the reconstructed sample time series data, and continue training the adjusted time series prediction model using next sample time series data until a target time series prediction model is obtained.

[0009] According to a fifth aspect of the present disclosure, a time series data prediction apparatus is provided, comprising: a first obtaining module configured to obtain original time series data to be predicted and non-stationary information of the original time series data; a second affine module configured to input the original time series data into a target time series prediction model, and perform affine processing on the original time series data by using target affine parameters of the model and the non-stationary information, to obtain affine time series data; and a second reconstruction module configured to perform prediction on the affine time series data to obtain predicted time series data, and perform reconstruction on the predicted time series data based on the target affine parameters and the non-stationary information, to obtain reconstructed time series data; wherein the target time series prediction model is a model trained by the training apparatus of the fourth aspect.

[0010] According to a sixth aspect of the present disclosure, a time series prediction apparatus is provided, comprising: a second obtaining module configured to obtain original time series data to be predicted and non-stationary information of the original time series data; a third affine module configured to perform affine processing on the original time series data based on the non-stationary information and affine parameters, to obtain first time series data; a prediction module configured to perform prediction based on the first time series data, to obtain second time series data; and a third reconstruction module configured to perform inverse affine processing on the second time series data based on the non-stationary information and the affine parameters, to obtain reconstructed time series data.

[0011] According to a seventh aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory connected with the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the training method of the time series prediction model of the first aspect, the time series data prediction method of the second aspect, and the time series prediction method of the third aspect.

[0012] According to an eighth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to perform the training method of the time series prediction model of the first aspect, the time series data prediction method of the second aspect, and the time series prediction method of the third aspect.

[0013] According to a ninth aspect of the present disclosure, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the training method of the time series prediction model of the first aspect, the time series data prediction method of the second aspect, and the time series prediction method of the third aspect.

[0014] It should be understood that the matters described herein are intended to be illustrative and are not intended to limit the scope of the present disclosure. Other features of the present disclosure will become apparent to those skilled in the art upon a reading of the following specification. BRIEF DESCRIPTION OF DRAWINGS

[0015] The accompanying drawings are included to provide a better understanding of the present application, and are not intended to limit the present disclosure. Among them:

[0016] Figure 1 Flowchart of a training method of a time series prediction model according to an embodiment of the present disclosure;

[0017] Figure 2 (a) is a schematic diagram of sample time series data according to an embodiment of the present disclosure;

[0018] Figure 2 (b) is a schematic diagram of affine sample time series data according to an embodiment of the present disclosure;

[0019] Figure 2 (c) is a schematic diagram of predicted sample time series data according to an embodiment of the present disclosure;

[0020] Figure 2 (d) is a schematic diagram of reconstructed sample time series data according to an embodiment of the present disclosure;

[0021] Figure 2 (e) is a schematic diagram of label information of sample time series data according to an embodiment of the present disclosure;

[0022] Figure 3 Flowchart of a training method of a time series prediction model according to another embodiment of the present disclosure;

[0023] Figure 4 Flowchart of a time series data prediction method according to an embodiment of the present disclosure;

[0024] Figure 5 Flowchart of a time series prediction method according to an embodiment of the present disclosure;

[0025] Figure 6 Flowchart of a time series prediction method according to another embodiment of the present disclosure;

[0026] Figure 7 Structural schematic diagram of a training device of a time series prediction model according to an embodiment of the present disclosure;

[0027] Figure 8 Structural schematic diagram of a time series data prediction device according to an embodiment of the present disclosure;

[0028] Figure 9 Structural schematic diagram of a time series prediction device according to an embodiment of the present disclosure;

[0029] Figure 10 Schematic block diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0030] Exemplary embodiments of the present disclosure are described herein below with reference to the accompanying drawings, in which various specific details are set forth to assist in understanding the present disclosure. It should be understood, however, that these are only exemplary embodiments and that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Also, the description set forth herein focuses on explaining the functions of the present disclosure and a construction for achieving the functions, and therefore descriptions of functions and structures known in the art are omitted from the following description.

[0031] Deep Learning (DL) is a new research direction in the field of Machine Learning (ML), and it is introduced into ML to make it closer to the original goal of artificial intelligence. Deep learning is learning the internal laws and representation levels of sample data, and the information obtained in the learning process is very helpful for the interpretation of data such as text, images, and sounds. The ultimate goal of deep learning is to enable machines to have analysis and learning capabilities like humans, and to be able to recognize text, images, and sound data. Deep learning is a complex machine learning algorithm, and the results achieved in speech and image recognition far exceed previous related technologies.

[0032] Artificial Intelligence (AI) is a discipline that studies enabling computers to simulate some of the thinking processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.) of humans, and it includes both hardware and software technologies. Artificial intelligence hardware technologies generally include computer vision technology, speech recognition technology, natural language processing technology, and learning / deep learning, big data processing technology, knowledge graph technology, and several other aspects.

[0033] Figure 1 Flowchart of a training method of a time series prediction model according to an embodiment of the present disclosure, as shown in FIG. 6, the method comprises: Figure 1

[0034] In S101, the original sample time series data is input into the time series prediction model, and the time series prediction model uses the current affine parameters of the model and the sample non-stationary information of the sample time series data to perform affine processing on the sample time series data to obtain affine sample time series data.

[0035] ​In implementations, there is a need for time series data prediction based on non-stationary time series data. For example, in the power dispatching scenario, there is a need for load prediction based on load time series data belonging to the non-stationary time series data type, and the purpose of power dispatching is achieved through the result of load prediction. Therefore, the accuracy of load prediction has a certain degree of influence on the accuracy of power dispatching.

[0036] Optionally, a time series prediction model to be trained can be obtained, and the time series prediction model is trained based on the non-stationary time series data, so as to achieve the purpose of time series data prediction based on non-stationary time series data.

[0037] In implementations, part of the parameters in the non-stationary time series will dynamically change with time, and the part of the parameters can be determined as non-stationary information of the non-stationary time series.

[0038] It should be noted that the non-stationary information that dynamically changes with time may cause a distribution difference between the training sample time series data used by the time series prediction model to be trained and the to-be-predicted time series data required by the trained time series prediction model.

[0039] Optionally, in the training process of the time series prediction model, the non-stationary information in the original sample time series data input into the model can be stripped by the time series prediction model to be trained, wherein the non-stationary information stripped from the sample time series data by the time series prediction model to be trained can be determined as sample non-stationary information.

[0040] In some implementations, the sample non-stationary information may include part of the data features in the sample time series data, so that the sample time series data after stripping the sample non-stationary information may have a feature loss phenomenon, thereby causing a difference in data distribution between the original sample time series data and the sample time series data after stripping the sample non-stationary information.

[0041] In this scenario, the sample time series data after stripping the sample non-stationary information can be subjected to affine processing through the current affine parameter in the time series prediction model and the sample non-stationary information, and affine sample time series data after affine processing is obtained.

[0042] The time series prediction model can obtain the time series data features included in the sample non-stationary information, and perform affine processing on the sample time series data after stripping the sample non-stationary information based on the current affine parameter and the obtained time series data features, thereby reducing the difference degree of data distribution between the affine sample time series data and the original sample time series data.

[0043] S102, predicting the affine sample time series data to obtain predicted sample time series data, and reconstructing the predicted sample time series data based on the current affine parameter and the sample non-stationary information to obtain reconstructed sample time series data.

[0044] In the embodiments of the present disclosure, the affine sample time series data can be subjected to feature extraction of time series data by the intermediate layer of the time series prediction model, and time series prediction is performed based on the extracted features, so as to obtain predicted time series data, which is determined as the predicted sample time series data.

[0045] In the implementation, the sample non-stationary information in the sample time series data has a certain degree of influence on the data change in the sample time series data.

[0046] For example, it is assumed that the value of data item 1 in the sample time series data is A, and the value of data item 1 in the predicted sample time series data obtained by the time series prediction model based on the affine sample time series data during model training is B, wherein A is not equal to B.

[0047] Based on the acquisition process of the predicted sample time series data, the reason why the value B of data item 1 in the predicted time series data is different from the value A of data item 1 in the sample time series data is that the sample non-stationary information is stripped in the process of obtaining the predicted time series data.

[0048] In this scenario, the predicted time series data obtained by predicting based on the affine time series data can be reconstructed, and based on the reconstruction of the predicted time series data, the accuracy of the model output result is improved.

[0049] The predicted sample time series data can be reconstructed based on the affine parameter of the model and the sample non-stationary information stripped from the original sample time series data, and the predicted sample time series data is inversely processed according to the acquisition process of the predicted time series data.

[0050] Further, the predicted sample time series data obtained by prediction can be inversely subjected to affine processing based on the current affine parameter and the sample non-stationary information, so as to reconstruct the predicted sample time series data, and the reconstructed time series data is determined as the reconstructed sample time series data.

[0051] S103, adjusting the model parameters of the time series prediction model including the affine parameter according to the sample time series data and the reconstructed sample time series data, and returning to continue training the adjusted time series prediction model using the next sample time series data until the training is completed to obtain a target time series prediction model.

[0052] Optionally, the training loss of the time series prediction model in the current training round can be obtained according to the loss between the reconstructed sample time series data and the original sample time series data, and the parameter adjustment of the time series prediction model in the current training round can be performed according to the training loss.

[0053] Among them, the affine parameters and the non-affine parameters in the model parameters of the time series prediction model in the current training round can be adjusted, and the non-affine parameters can be understood as the model parameters used for learning and prediction of the time series prediction model.

[0054] Further, after the model parameter adjustment is completed, the adjusted time series prediction model can be used to continue model training using the next sample time series data, the non-stationary information of the next sample time series data is stripped through the adjusted time series prediction model, and the next affine sample time series data is obtained by performing affine processing on the next sample time series data after stripping the non-stationary information according to the adjusted affine parameters in the adjusted time series prediction model.

[0055] The next predicted sample time series data is obtained based on the next affine sample time series data, and the next predicted sample time series data is reconstructed according to the adjusted affine parameters and the non-stationary information stripped from the next sample time series data, to obtain the reconstructed next reconstructed sample time series data.

[0056] Further, the model parameters including the adjusted affine parameters in the adjusted time series prediction model are continuously adjusted and optimized based on the next reconstructed sample time series data and the next sample time series data, until the adjusted time series prediction model meets the end standard of model training, and then the model training of the time series prediction model is ended, and the trained target time series prediction model is obtained.

[0057] Optionally, the corresponding training end standard can be set based on the loss between the reconstructed sample time series data output by the model training and the original sample time series data input to the model. Among them, the loss of each round of model training can be compared with the set training end standard, if the loss of the current round of model training meets the set training end standard, the model training can be ended, and the time series prediction model obtained after the current round of training is ended is taken as the trained target time series prediction model.

[0058] Optionally, the corresponding training end standard can also be set based on the value of the number of rounds of model training. Among them, the number of rounds of model training can be monitored and recorded, if the value of the total number of training rounds of the model meets the set model training standard after the current round of model training is ended, the model training can be ended, and the time series prediction model obtained after the current round of training is ended is taken as the trained target time series prediction model.

[0059] Optionally, the corresponding training end standard can be set based on the value of the number of rounds of model training. Among them, the number of rounds of model training can be monitored and recorded, if the value of the total number of training rounds of the model meets the set model training standard after the current round of model training is ended, the model training can be ended, and the time series prediction model obtained after the current round of training is ended is taken as the trained target time series prediction model. Figure 2The training effect of the time series prediction model is further understood as shown in Figure 2 , wherein, Figure 2 (a) is a schematic diagram of original sample time series data for training an input model, Figure 2 (b) is a schematic diagram of affine sample time series data after stripping non-stationary information from the original sample time series data and performing affine processing on the stripped sample time series data based on affine parameters and non-stationary information, Figure 2 (c) is a schematic diagram of prediction sample time series data obtained by prediction based on the affine sample time series data, Figure 2 (d) is a schematic diagram of reconstructed sample time series data obtained by reconstructing the prediction sample time series data based on the affine parameters and the non-stationary information, Figure 2 (e) is a schematic diagram of label information of the original sample time series data of an output model.

[0060] By stripping the non-stationary information in the original sample time series data, affine sample time series data is obtained by affine processing of the stripped sample time series data. After prediction of the affine sample time series data obtained by affine processing to obtain prediction sample time series data, the prediction sample time series data is reconstructed based on the affine parameters and the non-stationary information, and then reconstructed sample time series data is obtained.

[0061] As can be seen from Figure 2 , the distribution diagram of the reconstructed sample time series data is similar to the distribution diagram in the label information of the original sample time series data. Further, based on the comparison information between the distribution diagram of the reconstructed sample time series data and the distribution diagram in the label information of the original sample time series data, the training effect of the time series prediction model can be evaluated.

[0062] The training method of the time series prediction model provided in the present disclosure inputs original sample time series data into a time series prediction model to be trained, strips sample non-stationary information in the sample time series data through the time series prediction model, and performs affine processing on the sample time series data obtained after stripping the sample non-stationary information based on affine parameters of the time series prediction model to obtain affine sample time series data. Further, prediction is performed based on the affine sample time series data to obtain corresponding predicted sample time series data, and the predicted sample time series data is reconstructed based on the affine parameters of the time series prediction model and the sample non-stationary information to obtain reconstructed reconstructed sample time series data. Further, the model parameters including the affine parameters in the time series prediction model are adjusted and optimized according to the reconstructed sample time series data and the original sample time series data, and the adjusted time series prediction model is continuously trained using the next sample time series data until the training is completed to obtain a trained target time series prediction model. In the present disclosure, the influence of dynamic changes of sample non-stationary information on the training of the time series prediction model is avoided by stripping the sample non-stationary information, the distribution difference between the affine sample time series data and the sample time series data is reduced by affine processing based on the affine parameters and the sample non-stationary information, the influence of the stripping of the sample non-stationary information on the model training is avoided, the influence of the distribution drift phenomenon of the non-stationary time series data on the model training is reduced by stripping and reconstructing the sample non-stationary information in the sample time series data, the model training method and the model training effect of the non-stationary time series data are optimized, and further the accuracy of the non-stationary time series prediction is improved.

[0063] In the above embodiments, regarding the adjustment and optimization of the time series prediction model, the adjustment and optimization of the time series prediction model can be combined with Figure 3 It is further understood that Figure 3 The flowchart of the training method of the time series prediction model of another embodiment of the present disclosure is shown in Figure 3 The method comprises the following steps:

[0064] S301, obtaining a prediction label of the reconstructed sample time series data.

[0065] In the embodiments of the present disclosure, the predicted sample time series data obtained by predicting based on the affine sample time series data can be reconstructed according to the sample non-stationary information and the affine parameters of the time series prediction model to obtain corresponding reconstructed sample time series data.

[0066] Further, the label information corresponding to the reconstructed sample time series data can be obtained from the training output result of the time series prediction model, and determined as the prediction label of the reconstructed sample time series data.

[0067] S302, determining a loss function of the time series prediction model according to the label label and the prediction label of the sample time series data.

[0068] In the embodiments of the present disclosure, the original sample time series data input into the time series prediction model to be trained has corresponding label information, wherein the label of the sample time series data input into the model for training can be determined as the marked label.

[0069] Optionally, a time range corresponding to the time series data prediction in the training process of the time series prediction model to be trained can be obtained, and time series data in the same time range in the historical time series data to which the sample time series data belongs can be obtained according to the time range, so as to obtain the label information corresponding to the sample time series data, and the label information is determined as the marked label of the sample time series data.

[0070] For example, if the time range corresponding to the time series data prediction in the training process of the time series prediction model to be trained is from timestamp 1 to timestamp 2, the time series data covered by the time range corresponding to the timestamp 1 to timestamp 2 can be obtained from the historical time series data to which the sample time series data belongs, and the marked label of the sample time series data can be generated according to the part of the time series data.

[0071] Further, based on the algorithm of the loss function in the related art, the loss between the marked label of the sample time series data and the prediction label corresponding to the reconstructed sample time series data is obtained, and the loss is determined as the loss function of the time series prediction model.

[0072] In S303, the model parameters of the time series prediction model including the affine parameter are adjusted based on the loss function.

[0073] In the embodiments of the present disclosure, according to the loss function of the time series prediction model, the model parameters of the time series prediction model including the affine parameter can be adjusted.

[0074] Optionally, the model parameters of the time series prediction model can be adjusted and optimized by the gradient descent method in the related art, or the model parameters of the time series prediction model can be adjusted and optimized based on other model parameter adjustment and optimization methods, which are not limited herein.

[0075] The training method of the time series prediction model provided in the present disclosure obtains the prediction label of the reconstructed sample time series data, obtains the loss of the model training of the time series prediction model according to the marked label of the sample time series data and the prediction label of the reconstructed sample time series data, and adjusts the model parameters of the time series prediction model including the affine parameter according to the obtained loss of the model training of the time series prediction model. In the present disclosure, by adjusting the model parameters including the affine parameter, the adjustment and optimization of the time series prediction model are realized, the ability of the time series prediction model to perform affine processing on the time series data after stripping the non-stationary information is improved, and the ability of the time series prediction model to predict the non-stationary time series data is improved, and the training effect of the time series prediction model is optimized.

[0076] In the above embodiments, the obtaining of the sample non-stationary information can be understood in combination with the following examples.

[0077] The sample time series data is statistically processed to obtain the variance and expectation of the sample time series data as the sample non-stationary information.

[0078] In the embodiments of the present disclosure, in the sample time series data belonging to the non-stationary time series data, there are some parameters that can dynamically change with time, which can be determined as the sample non-stationary information of the sample time series data.

[0079] Optionally, the variance and expectation of the sample time series data belonging to the non-stationary time series data can be determined as the sample non-stationary information of the sample time series data.

[0080] Further, the sample time series data can be statistically calculated based on the variance calculation algorithm in the related art, so that the variance of the sample time series data is obtained from the calculation result.

[0081] Correspondingly, the sample time series data can be statistically calculated based on the expectation calculation method in the related art, so that the expectation of the sample time series data is obtained from the calculation result.

[0082] The training method of the time series prediction model proposed in the present disclosure statistically calculates the sample time series data to obtain the variance and expectation of the sample time series data as the sample non-stationary information. This provides data support for subsequent separation of the sample non-stationary information from the sample time series data and affine processing of the sample time series data after the sample non-stationary information is separated based on the sample non-stationary information and the affine parameters.

[0083] Further, based on the trained target time series prediction model, time series data prediction can be performed, which can be understood in combination with Figure 4 understanding, Figure 4 The flowchart of the time series data prediction method of an embodiment of the present disclosure is shown in Figure 4 The method comprises the following steps:

[0084] S401, obtaining original time series data to be predicted and non-stationary information of the original time series data.

[0085] In the embodiments of the present disclosure, the time series data to be predicted can be obtained based on a set time range as the original time series data to be predicted.

[0086] For example, in the scenario of power load prediction, the load time series data in a set time range can be obtained as the original time series data for power load prediction.

[0087] Further, a part parameter in the original time series data that dynamically changes with time can be acquired as non-stationary information of the original time series data.

[0088] Optionally, statistical calculation can be performed on the original time series data based on a calculation method corresponding to the part parameter, so that the non-stationary information of the original time series data is obtained from the calculation result.

[0089] S402, input the original time series data into the target time series prediction model, and perform affine processing on the original time series data by using the target affine parameter and the non-stationary information of the model in the target time series prediction model, to obtain affine time series data.

[0090] Optionally, the original time series data can be predicted based on the trained target time series prediction model.

[0091] Further, the original time series data can be input into the trained target time series prediction model, and affine processing can be performed on the original time series data based on the affine parameter in the target time series prediction model and the non-stationary information of the original time series data.

[0092] Wherein, the non-stationary information in the original time series data can be stripped based on the trained target time series prediction model, and affine processing can be performed on the original time series data after stripping the non-stationary information based on the affine parameter in the target time series prediction model and the non-stationary information of the original time series data, and the affine processing obtained time series data is determined as affine time series data.

[0093] It should be noted that the target time series prediction model in the embodiment of the present disclosure is a model trained by the training method of the time series prediction model proposed in the above embodiment.

[0094] S403, predicting the affine time series data to obtain predicted time series data, and reconstructing the predicted time series data based on the target affine parameter and the non-stationary information to obtain reconstructed time series data.

[0095] In the embodiment of the present disclosure, the target time series prediction model predicts based on the affine time series data, and further obtains the corresponding predicted time series data.

[0096] Wherein, the target time series prediction model can reconstruct the predicted time series data obtained by prediction based on the non-stationary information of the original time series data and the affine parameter of the model, and further obtain the reconstructed reconstructed time series data.

[0097] Further, the reconstructed time series data can be taken as the prediction result of the original time series data based on the target time series prediction model, and output from the target time series prediction model.

[0098] The method for predicting time series data provided in the present disclosure includes obtaining original time series data to be predicted and non-stationary information of the original time series data, stripping the non-stationary information in the original time series data based on a trained target time series prediction model, performing affine processing on the original time series data from which the non-stationary information is stripped based on the non-stationary information and affine parameters of the target time series prediction model to obtain corresponding affine time series data, and performing prediction based on the affine time series data to obtain predicted time series data. Further, the predicted time series data is reconstructed based on the affine parameters of the target time series model and the non-stationary information of the original time series data to obtain reconstructed time series data predicted by the target time series model based on the original time series data. In the present disclosure, the influence of the non-stationary information on the prediction accuracy of the target time series prediction model is avoided by stripping the non-stationary information. The distribution difference between the affine time series data and the original time series data is reduced by performing affine processing on the original time series data from which the non-stationary information is stripped based on the affine parameters and the non-stationary information, the influence of the stripping of the non-stationary information on the prediction accuracy of the target time series prediction model is avoided, the prediction method for non-stationary time series data is optimized, and the prediction accuracy of the non-stationary time series data is improved.

[0099] In the above embodiments, the acquisition of the non-stationary information can be understood in combination with the following examples.

[0100] The original time series data is counted to obtain the variance and expectation of the original time series data as the non-stationary information.

[0101] In the embodiments of the present disclosure, the parameter that dynamically changes with time in the original time series data can be determined as the non-stationary information of the original time series data.

[0102] In some implementations, the variance and expectation of the original time series data belonging to the non-stationary time series data can be determined as the non-stationary information of the original time series data.

[0103] The variance of the original time series data can be obtained from the calculation result by calculating the original time series data based on the calculation method of the variance in the related art. Correspondingly, the expectation of the original time series data can also be obtained from the calculation result by calculating the original time series data based on the calculation method of the expectation in the related art.

[0104] Further, the variance and expectation of the original time series data obtained are determined as the non-stationary information of the original time series data.

[0105] The time series data prediction method provided by the present disclosure obtains variance and expectation of original time series data as non-stationary information of the original time series data, thereby providing data support for subsequent stripping of the non-stationary information from the original time series data and affine processing of the original time series data after stripping of the non-stationary information based on the non-stationary information and affine parameters.

[0106] The present disclosure also provides a time series prediction method, which can be combined with Figure 5 It is further understood that Figure 5 A flowchart of a time series prediction method according to an embodiment of the present disclosure is shown in Figure 5 As shown in the figure, the method comprises the following steps:

[0107] S501, obtaining original time series data to be predicted and non-stationary information of the original time series data.

[0108] In an implementation, the non-stationary time series data contains parameters that change dynamically with time, and the parameters can be determined as the non-stationary information of the non-stationary time series data.

[0109] In an embodiment of the present disclosure, the related historical data can be obtained as the original time series data to be predicted based on the predicted demand.

[0110] For example, in the scenario of power load prediction, the historical power load time series data within a certain time range can be obtained as the original time series data to be predicted for power load prediction based on the predicted demand.

[0111] Further, part of the parameters that change dynamically with time in the original time series data to be predicted are obtained, and the part of the parameters are determined as the non-stationary information of the original time series data.

[0112] S502, affine processing of the original time series data based on the non-stationary information and affine parameters, to obtain first time series data.

[0113] In an embodiment of the present disclosure, in order to reduce the influence of the non-stationary information on the accuracy of time series prediction, the original time series data can be stripped of the non-stationary information.

[0114] The non-stationary information contains part of the time series data characteristics in the original time series data, so that the data distribution of the original time series data after stripping of the non-stationary information can be different from that of the original time series data.

[0115] Therefore, the original time series data after stripping of the non-stationary information can be affine processed based on the affine parameters and the non-stationary information of the original time series data.

[0116] Optionally, the original time series data after stripping the non-stationary information can be subjected to affine transformation based on the affine parameters and the non-stationary information, and the time series data obtained after the affine transformation is determined as the first time series data.

[0117] S503, prediction is performed based on the first time series data to obtain second time series data.

[0118] Optionally, the time series data features can be extracted from the first time series data, and prediction is performed based on the extracted time series data features, so as to obtain the predicted second time series data.

[0119] For example, the time series trend features can be extracted from the first time series data, and the time series data prediction is performed based on the extracted time series trend features, so as to obtain the time series data predicted based on the time series trend features as the corresponding second time series data.

[0120] Optionally, the prediction based on the first time series data to obtain the corresponding second time series data can be understood in combination with the following formula:

[0121]

[0122] In the above formula, is the first time series data, is the second time series data, and θ is the model parameter used for learning in the time series prediction model.

[0123] S504, inverse affine processing is performed on the second time series data based on the non-stationary information and the affine parameters to obtain reconstructed time series data.

[0124] In the implementation, the non-stationary information of the time series data has a certain degree of influence on the data change in the time series data, therefore, in order to improve the accuracy of time series prediction, after the second time series data is obtained based on the first time series data, the non-stationary information of the second time series data can be reconstructed.

[0125] In the embodiments of the present disclosure, after the original time series data is stripped of the non-stationary information, the original time series data after stripping is subjected to affine transformation based on the affine parameters and the non-stationary information, and the first time series data obtained from the affine transformation is predicted to obtain the corresponding second time series data.

[0126] Therefore, in order to reconstruct the second time series data, inverse processing can be performed based on the acquisition process of the second time series data.

[0127] Optionally, the second time series data can be subjected to inverse affine processing based on the affine parameters and the non-stationary information, so as to realize the reconstruction of the second time series data, and further obtain the reconstructed time series data obtained by the inverse affine processing.

[0128] The timing prediction method provided in the present disclosure includes: obtaining original timing data to be predicted and non-stationary information of the original timing data; performing affine processing on the original timing data from which the non-stationary information is stripped based on the non-stationary information and affine parameters to obtain first timing data; and performing prediction based on the first timing data to obtain second timing data. Further, inverse affine processing is performed on the second timing data based on the non-stationary information and the affine parameters to reconstruct the second timing data to obtain reconstructed reconstructed timing data. In the present disclosure, the influence of the non-stationary information on the accuracy of timing prediction is avoided by stripping the non-stationary information. The affine processing of the original timing data from which the non-stationary information is stripped based on the affine parameters and the non-stationary information reduces the degree of distribution difference between the affine timing data and the original timing data, avoids the influence of the stripping of the non-stationary information on the accuracy of timing prediction, and improves the accuracy of the reconstructed timing data by performing inverse affine processing on the predicted second timing data, optimizes the timing prediction method, and improves the accuracy of timing prediction.

[0129] To better understand the above embodiments, the above embodiments can be combined with Figure 6 , Figure 6 The flowchart of the timing prediction method of another embodiment of the present disclosure is shown in FIG. 2. As shown in FIG. 2, the method includes the following steps. Figure 6

[0130] S601, affine transformation is performed on the original timing data based on the non-stationary information and the affine parameters to obtain first timing data.

[0131] In the implementation, affine transformation can be performed on the original timing data from which the non-stationary information is stripped based on the non-stationary information and the affine parameters, and the timing data obtained by the affine transformation is determined as the first timing data.

[0132] Optionally, the variance and expectation of the original timing data can be determined as the non-stationary information of the original timing data, wherein the variance and expectation of the original timing data are obtained by statistics of the original timing data, and are determined as the non-stationary information of the original timing data.

[0133] In the implementation, the variance and expectation of the original timing data can be obtained by corresponding calculation of the variance and expectation in the related art, and the obtained variance and expectation are determined as the non-stationary information of the original timing data.

[0134] Further, the original timing data is normalized based on the non-stationary information to obtain third timing data.

[0135] ​Optionally, in order to realize the stripping of non-stationary information from the original time series data, the original time series data can be normalized, and based on the result of the normalization, the original time series data from which the non-stationary information is stripped is obtained and determined as the third time series data.

[0136] Among them, the original time series data can be normalized by decentering and scaling the original time series data, so as to obtain the corresponding third time series data.

[0137] Further, the third time series data is subjected to affine transformation based on the affine parameters to obtain the first time series data.

[0138] Optionally, the third time series data can be subjected to affine transformation based on the affine parameters, so as to obtain the first time series data after affine transformation.

[0139] Further, the process of obtaining the first time series data can be understood in combination with the formula shown below. As shown in the following formula, the original time series data is normalized based on the non-stationary information, so as to realize the stripping of non-stationary information from the original time series data, to obtain the third time series data, and further, the third time series data is subjected to affine processing based on the affine parameters, so as to obtain the first time series data after affine processing:

[0140]

[0141] In the above formula, is the first time series data, x (i) is the original time series data, E[x (i) ] is the expectation of the original time series data, Var[x (i) ] is the variance of the original time series data, and γ and β are affine parameters, wherein γ is an affine adjustment coefficient during affine processing, and β is an affine offset term during affine processing, is the third time series data from which the non-stationary information is stripped, obtained by normalizing the original time series data.

[0142] S602, prediction is performed based on the first time series data to obtain the second time series data.

[0143] In the embodiments of the present disclosure, for obtaining the second time series data by predicting based on the first time series data, the above related detailed content can be referred to, and will not be repeated here.

[0144] S603, inverse affine processing is performed on the second time series data based on the non-stationary information to obtain the reconstructed time series data.

[0145] In the embodiments of the present disclosure, the non-stationary information of the original time series data is stripped, the original time series data after stripping the non-stationary information is subjected to affine processing to obtain first time series data, and then second time series data is obtained based on the first time series data.

[0146] Optionally, the second time series data can be subjected to inverse processing based on the acquisition process of the second time series data, so as to realize reconstruction of the second time series data.

[0147] Optionally, the second time series data can be subjected to inverse processing based on the acquisition process of the second time series data, so as to realize reconstruction of the second time series data.

[0148] Optionally, the second time series data can be subjected to inverse processing based on the acquisition process of the second time series data, so as to realize reconstruction of the second time series data.

[0149] Further, the fourth time series data is subjected to inverse regularization processing based on the non-stationary information to obtain reconstructed time series data.

[0150] Optionally, the fourth time series data is subjected to inverse regularization processing based on the non-stationary information of the original time series data, so as to realize reconstruction of the fourth time series data in the dimension of the non-stationary information.

[0151] Further, the time series data obtained after the inverse regularization processing is determined as the reconstructed time series data.

[0152] Optionally, the fourth time series data is subjected to inverse regularization processing based on the non-stationary information of the original time series data, so as to realize reconstruction of the fourth time series data in the dimension of the non-stationary information.

[0153] The fourth time series data is obtained by subjecting the second time series data to inverse affine processing, and the reconstructed time series data is obtained by subjecting the fourth time series data to inverse regularization processing, which can be understood in combination with the following formula:

[0154]

[0155] In the above formula, is the reconstructed time series data, is the second time series data, and γ and β are affine parameters, wherein γ is an affine adjustment coefficient in inverse affine processing, β is an affine offset term in inverse affine processing, and x (i) is the original time series data, E[x (i) ] is the expectation of the original time series data, and Var[x (i) ] is the variance of the original time series data.

[0156] It should be noted that the reconstructed time series data has corresponding non-stationary information, wherein the non-stationary information of the reconstructed time series data can be obtained based on the non-stationary information of the original time series data.

[0157] Optionally, the variance and expectation of the reconstructed time series data can be determined based on the variance and expectation of the original time series data as the non-stationary information of the reconstructed time series data.

[0158] In the embodiments of the present disclosure, the reconstructed time series data is obtained by performing affine processing on the original time series data after stripping the non-stationary information, and performing prediction and reconstruction on the time series data obtained after the affine processing.

[0159] Therefore, the variance and expectation of the reconstructed time series data can be obtained based on the variance and expectation of the original time series data, and then the non-stationary information of the reconstructed time series data is obtained.

[0160] The variance and expectation of the reconstructed time series data are obtained based on the variance and expectation of the original time series data.

[0161] Optionally, the expectation of the reconstructed time series data can be understood in combination with the following formula based on the expectation of the original time series data:

[0162]

[0163] In the above formula, is the reconstructed time series data, is the expectation of the reconstructed time series data, x (i) is the original time series data, E[x (i) ] is the expectation of the original time series data, is the second time series data obtained by prediction based on the first time series data after stripping the non-stationary information, and γ and β are affine parameters, wherein γ is an affine adjustment coefficient during affine processing, and β is an affine offset term during affine processing, Var[x (i) ] is the variance of the original time series data.

[0164] Optionally, the expectation of the reconstructed time series data can be understood in combination with the following formula based on the expectation of the original time series data:

[0165]

[0166] In the above formula, is the reconstructed time series data, is the variance of the reconstructed time series data, x (i) is the original time series data, Var[x (i) ] is the variance of the original time series data, and γ is an affine adjustment coefficient during affine processing.

[0167] The timing prediction method provided by the present disclosure performs affine processing on the original timing data through non-stationary information and affine parameters, obtains first timing data, and performs prediction on the first timing data to obtain second timing data. Then, the second timing data is inversely affine processed based on the non-stationary information and the affine parameters, so as to obtain reconstructed timing data. In the present disclosure, the influence of the non-stationary information on the timing prediction accuracy is avoided by stripping the non-stationary information. The original timing data after stripping the non-stationary information is affine processed through the affine parameters and the non-stationary information, so as to reduce the distribution difference between the affine timing data and the original timing data, avoid the influence of the stripping of the non-stationary information on the timing prediction accuracy, improve the accuracy of the reconstructed timing data, optimize the timing prediction method, and improve the timing prediction accuracy.

[0168] Corresponding to the training method of the timing prediction model proposed in the above several embodiments, an embodiment of the present disclosure further proposes a training device of a timing prediction model. Since the training device of the timing prediction model proposed in the embodiment of the present disclosure corresponds to the training method of the timing prediction model proposed in the above several embodiments, the implementation modes of the training method of the timing prediction model are also applicable to the training device of the timing prediction model proposed in the embodiment of the present disclosure, which will not be described in detail in the following embodiments.

[0169] Figure 7 The structure diagram of the training device of the timing prediction model of an embodiment of the present disclosure is shown in FIG. 7. Figure 7 As shown in FIG. 7, the training device 700 of the timing prediction model includes a first affine module 71, a first reconstruction module 72, and a training module 73, wherein:

[0170] The first affine module 71 is configured to input the original sample timing data into the timing prediction model, and perform affine processing on the sample timing data by using the current affine parameters of the model and the sample non-stationary information of the sample timing data, so as to obtain affine sample timing data.

[0171] The first reconstruction module 72 is configured to predict the affine sample timing data to obtain predicted sample timing data, and reconstruct the predicted sample timing data based on the current affine parameters and the sample non-stationary information, so as to obtain reconstructed sample timing data.

[0172] The training module 73 is configured to adjust the model parameters of the timing prediction model including the affine parameters according to the sample timing data and the reconstructed sample timing data, and continue to train the adjusted timing prediction model using the next sample timing data until the training is completed to obtain a target timing prediction model.

[0173] In the embodiment of the present disclosure, the first affine module 71 is further configured to: perform statistics on the sample time series data to obtain the variance and expectation of the sample time series data as the sample non-stationary information.

[0174] In the embodiment of the present disclosure, the training module 73 is further configured to: obtain the predicted label of the reconstructed sample time series data; determine the loss function of the time series prediction model according to the labeled label and the predicted label of the sample time series data; and adjust the model parameters of the time series prediction model including the affine parameters based on the loss function.

[0175] The training device of the time series prediction model provided by the present disclosure inputs the original sample time series data into the time series prediction model to be trained, removes the sample non-stationary information in the sample time series data through the time series prediction model, and performs affine processing on the sample time series data obtained after removing the sample non-stationary information based on the affine parameters of the time series prediction model to obtain affine sample time series data. Further, the corresponding predicted sample time series data is obtained by performing prediction based on the affine sample time series data, and the predicted sample time series data is reconstructed based on the affine parameters of the time series prediction model and the sample non-stationary information to obtain the reconstructed reconstructed sample time series data. Further, the model parameters including the affine parameters in the time series prediction model are adjusted and optimized according to the reconstructed sample time series data and the original sample time series data, and the adjusted time series prediction model is continuously trained using the next sample time series data until the training is completed to obtain the trained target time series prediction model. In the present disclosure, the influence of the dynamic change of the sample non-stationary information on the training of the time series prediction model is avoided by removing the sample non-stationary information, the distribution difference between the affine sample time series data and the sample time series data is reduced by affine processing based on the affine parameters and the sample non-stationary information, the influence of the removal of the sample non-stationary information on the model training is avoided, the influence of the distribution drift phenomenon of the non-stationary time series data on the model training is reduced by removing and reconstructing the sample non-stationary information in the sample time series data, the model training method and the model training effect of the non-stationary time series data are optimized, and further the accuracy of the non-stationary time series prediction is improved.

[0176] Corresponding to the time series data prediction method proposed in the above several embodiments, one embodiment of the present disclosure also proposes a time series data prediction device. Since the time series data prediction device proposed in the embodiment of the present disclosure corresponds to the time series data prediction method proposed in the above several embodiments, the implementation modes of the above time series data prediction method are also applicable to the time series data prediction device proposed in the embodiment of the present disclosure, which will not be described in detail in the following embodiments.

[0177] Figure 8 The structure diagram of the time series data prediction device of one embodiment of the present disclosure is as follows, Figure 8As shown, the time series data prediction apparatus 800 comprises a first acquisition module 81, a second affine module 82, and a second reconstruction module 83, wherein:

[0178] The first acquisition module 81 is configured to acquire original time series data to be predicted and non-stationary information of the original time series data.

[0179] The second affine module 82 is configured to input the original time series data into a target time series prediction model, and perform affine processing on the original time series data by using target affine parameters of the model and the non-stationary information, to obtain affine time series data.

[0180] The second reconstruction module 83 is configured to predict the affine time series data to obtain predicted time series data, and reconstruct the predicted time series data based on the target affine parameters and the non-stationary information, to obtain reconstructed time series data.

[0181] The target time series prediction model is a model trained by using the training apparatus. Figure 7 The model trained by the training apparatus according to the corresponding embodiment.

[0182] According to the embodiment of the present disclosure, the first acquisition module 81 is further configured to perform statistics on the original time series data, to acquire variance and expectation of the original time series data as the non-stationary information.

[0183] According to the embodiment of the present disclosure, the first acquisition module 81 is further configured to determine variance and expectation of the reconstructed time series data based on the variance and the expectation of the original time series data, as the non-stationary information of the reconstructed time series data.

[0184] According to the time series data prediction apparatus of the present disclosure, the original time series data to be predicted and the non-stationary information of the original time series data are acquired, the non-stationary information in the original time series data is stripped based on the trained target time series prediction model, the original time series data after stripping the non-stationary information is subjected to affine processing based on the affine parameters of the target time series prediction model and the non-stationary information, to obtain corresponding affine time series data, and the affine time series data is predicted to obtain predicted time series data. Further, the predicted time series data is reconstructed based on the affine parameters of the target time series model and the non-stationary information of the original time series data, to obtain reconstructed time series data predicted by the target time series prediction model based on the original time series data. In the present disclosure, the influence of the non-stationary information on the prediction accuracy of the target time series prediction model is avoided by stripping the non-stationary information, the distribution difference between the affine time series data and the original time series data is reduced by performing affine processing on the original time series data after stripping the non-stationary information based on the affine parameters and the non-stationary information, the influence of the stripping of the non-stationary information on the prediction accuracy of the target time series prediction model is avoided, the prediction method of the non-stationary time series data is optimized, and the prediction accuracy of the non-stationary time series data is improved.

[0185] Corresponding to the time series prediction method proposed in the above several embodiments, an embodiment of the present disclosure also proposes a time series prediction device. Since the time series prediction device proposed in the embodiment of the present disclosure corresponds to the time series prediction method proposed in the above several embodiments, the implementation of the time series prediction method is also applicable to the time series prediction device proposed in the embodiment of the present disclosure, which will not be described in detail in the following embodiments.

[0186] Figure 9 The structural schematic diagram of the time series prediction device of an embodiment of the present disclosure is shown in FIG. 9. As shown in FIG. 9, the time series prediction device 900 includes a second acquisition module 91, a third affine module 92, a prediction module 93, and a third reconstruction module 94, wherein: Figure 9

[0187] The second acquisition module 91 is configured to acquire original time series data to be predicted and non-stationary information of the original time series data.

[0188] The third affine module 92 is configured to perform affine processing on the original time series data based on the non-stationary information and affine parameters to obtain first time series data.

[0189] The prediction module 93 is configured to perform prediction based on the first time series data to obtain second time series data.

[0190] The third reconstruction module 94 is configured to perform inverse affine processing on the second time series data based on the non-stationary information and the affine parameters to obtain reconstructed time series data.

[0191] In an embodiment of the present disclosure, the third affine module 92 is further configured to: perform statistics on the original time series data to obtain variance and expectation of the original time series data as the non-stationary information of the original time series data; perform regularization processing on the original time series data based on the non-stationary information to obtain third time series data; and perform affine transformation on the third time series data based on the affine parameters to obtain the first time series data.

[0192] In an embodiment of the present disclosure, the third reconstruction module 94 is further configured to: perform inverse affine processing on the second time series data based on the affine parameters to obtain fourth time series data; and perform inverse regularization processing on the fourth time series data based on the non-stationary information to obtain the reconstructed time series data.

[0193] In an embodiment of the present disclosure, the second acquisition module 91 is further configured to: determine variance and expectation of the reconstructed time series data based on the variance and the expectation of the original time series data as the non-stationary information of the reconstructed time series data.

[0194] ​The timing prediction device provided in the present disclosure obtains original timing data to be predicted and non-stationary information of the original timing data, performs affine processing on the original timing data from which the non-stationary information is stripped based on the non-stationary information and affine parameters to obtain first timing data, and performs prediction based on the first timing data to obtain second timing data. Further, the second timing data is subjected to inverse affine processing based on the non-stationary information and the affine parameters to reconstruct the second timing data to obtain reconstructed reconstructed timing data. In the present disclosure, the influence of the non-stationary information on the accuracy of timing prediction is avoided by stripping the non-stationary information. The affine processing on the original timing data from which the non-stationary information is stripped based on the affine parameters and the non-stationary information reduces the degree of distribution difference between the affine timing data and the original timing data, avoids the influence of the stripping of the non-stationary information on the accuracy of timing prediction, the inverse affine processing on the second timing data obtained by prediction improves the accuracy of the reconstructed timing data, optimizes the timing prediction method, and improves the accuracy of timing prediction.

[0195] According to an embodiment of the present disclosure, the present disclosure further provides an electronic device, a readable storage medium and a computer program product.

[0196] Figure 10 A schematic block diagram of an example electronic device 1000 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present disclosure described and / or claimed in this document.

[0197] As shown in Figure 8 The device 1000 includes a computing unit 1001 that can perform various appropriate actions and processes in accordance with a computer program stored in a read-only memory (ROM) 1002 or a computer program loaded from a storage unit 1008 into a random access memory (RAM) 1003. Various programs and data required for the operation of the device 1000 can also be stored in the RAM 1003. The computing unit 1001, the ROM 1002, and the RAM 1003 are connected to each other through a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.

[0198] The various components in the device 1000 are connected to the I / O interface 1005, including: an input unit 1006, such as a keyboard, a mouse, etc.; an output unit 1006, such as various types of displays, speakers, etc.; a storage unit 1008, such as a magnetic disk, an optical disk, etc.; and a communication unit 1009, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1009 allows the device 1000 to exchange information / data with other devices through computer networks, such as the Internet, and / or various telecommunication networks.

[0199] The computing unit 1001 can be various general and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 1001 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 1001 performs various methods and processes described above, such as the training method of the time series prediction model, the prediction method, and related devices. For example, in some embodiments, the training method of the time series prediction model, the prediction method, and related devices can be implemented as a computer software program, which is tangibly embodied in a machine-readable medium, such as the storage unit 1008. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 1000 via the ROM 1002 and / or the communication unit 1009. When the computer program is loaded onto the RAM 1003 and executed by the computing unit 1001, one or more steps of the training method of the time series prediction model, the prediction method, and related devices described above can be performed. Alternatively, in other embodiments, the computing unit 1001 can be configured to perform the training method of the time series prediction model, the prediction method, and related devices by any other appropriate means, such as by means of firmware.

[0200] The various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a programmable logic device (PLD), a computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.

[0201] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. The program code can execute entirely on a computing device, a controller, or a remote computer or server, or a combination thereof. The program code can be embodied in one or more computer readable media, which can be any available media that can be accessed by a general purpose or special purpose computing device.

[0202] In the context of the present disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable storage media can include, without limitation, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media can include, but are not limited to, an electrical connection based on one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0203] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.

[0204] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.

[0205] The computer system can include clients and servers. This relationship can be. The servers are typically remote from the clients with the interactions between them occurring over a communication network. The relationship between a client and a server is one of client-server. The server can be a cloud server, a server of a distributed system, or a server incorporating a blockchain.

[0206] It should be understood that the various forms of flow shown above can be re-ordered, added to, or deleted from without departing from the scope of the present disclosure. For example, the steps recited in the present disclosure can be performed in parallel, in series, or in a different order, as long as the desired results of the technology disclosed in the present disclosure are achieved, and the present disclosure is not limited herein.

[0207] The specific embodiments described above are not intended to be limiting, and persons skilled in the art will appreciate that various modifications, combinations, sub-combinations and alternatives can be made to the specific embodiments without departing from the spirit and principles of the present disclosure. Accordingly, the disclosure is not limited to the specific embodiments described above.

Claims

1. A method for training a time series prediction model, comprising: inputting original sample power load time series data into a time series prediction model, using current affine parameters of the model and sample non-stationary information of the sample power load time series data to perform affine processing on the sample power load time series data to obtain affine sample power load time series data; performing prediction on the affine sample power load time series data to obtain predicted sample power load time series data, and reconstructing the predicted sample power load time series data based on the current affine parameters and the sample non-stationary information to obtain reconstructed sample power load time series data; adjusting model parameters of the time series prediction model including the affine parameters according to the sample power load time series data and the reconstructed sample power load time series data, and returning to continue training the adjusted time series prediction model using next sample power load time series data until a target time series prediction model is obtained, the target time series prediction model being used for predicting power load, and a prediction result of the target time series prediction model being used for power dispatch.

2. The method of claim 1, wherein, The process of obtaining the sample non-stationary information comprises: performing statistics on the sample power load time series data to obtain variance and expectation of the sample power load time series data as the sample non-stationary information.

3. The method of claim 1, wherein, The adjusting of the model parameters of the time series prediction model including the affine parameters according to the sample power load time series data and the reconstructed sample power load time series data comprises: obtaining a prediction label of the reconstructed sample power load time series data; determining a loss function of the time series prediction model according to a label of the sample power load time series data and the prediction label; and adjusting the model parameters of the time series prediction model including the affine parameters based on the loss function.

4. A method for predicting time series data, comprising: obtaining original power load time series data to be predicted and non-stationary information of the original power load time series data; inputting the original power load time series data into a target time series prediction model, using target affine parameters of the model and the non-stationary information to perform affine processing on the original power load time series data to obtain affine time series data; performing prediction on the affine power load time series data to obtain predicted power load time series data, and reconstructing the predicted power load time series data based on the target affine parameters and the non-stationary information to obtain reconstructed power load time series data; wherein the target time series prediction model is a model trained by the training method of any one of claims 1-3.

5. The method of claim 4, wherein, The process of obtaining the non-stationary information comprises: performing statistics on the original power load time series data to obtain variance and expectation of the original power load time series data as the non-stationary information.

6. The method of claim 4, wherein, After obtaining the reconstructed time series data, the method further comprises: Determine variance and expectation of the reconstructed power load time series data based on variance and expectation of the original power load time series data as non-stationary information of the reconstructed power load time series data.

7. A power load time series prediction method, comprising: obtaining original power load time series data to be predicted and non-stationary information of the original power load time series data; affine processing the original power load time series data based on the non-stationary information and affine parameters to obtain first time series data; predicting based on the first time series data to obtain second time series data; inverse affine processing the second time series data based on the non-stationary information and the affine parameters to obtain reconstructed power load time series data.

8. The method of claim 7, wherein, The affine processing the original power load time series data based on the non-stationary information and affine parameters to obtain first time series data comprises: statistically processing the original power load time series data to obtain variance and expectation of the original power load time series data as non-stationary information of the original power load time series data; regularizing the original power load time series data based on the non-stationary information to obtain third time series data; affine transforming the third time series data based on the affine parameters to obtain the first time series data.

9. The method of claim 8, wherein, The inverse affine processing the second time series data based on the non-stationary information and the affine parameters to obtain reconstructed time series data comprises: inverse affine processing the second time series data based on the affine parameters to obtain fourth time series data; inverse regularizing the fourth time series data based on the non-stationary information to obtain the reconstructed power load time series data.

10. The method of claim 8 or 9, wherein, The method further comprises: determining variance and expectation of the reconstructed power load time series data based on variance and expectation of the original power load time series data as non-stationary information of the reconstructed power load time series data.

11. A training device of a time series prediction model, comprising: a first affine module configured to input original sample power load time series data into a time series prediction model, and affine process the sample power load time series data by the time series prediction model using current affine parameters of the model and sample non-stationary information of the sample time series data to obtain affine sample power load time series data; a first reconstruction module configured to predict the affine sample power load time series data to obtain predicted sample power load time series data, and reconstruct the predicted sample power load time series data based on the current affine parameters and the sample non-stationary information to obtain reconstructed sample power load time series data; a training module configured to adjust model parameters of the time series prediction model including the affine parameters according to the sample power load time series data and the reconstructed sample power load time series data, and continue training the adjusted time series prediction model using next sample power load time series data until a target time series prediction model is obtained, the target time series prediction model being used to predict power load, and a prediction result of the target time series prediction model being used for power dispatching.

12. The apparatus of claim 11, wherein, The first affine module is further configured to: statistically process the sample power load time series data to obtain variance and expectation of the sample power load time series data as the sample non-stationary information.

13. The apparatus of claim 11, wherein, The training module is further configured to: obtain a prediction label of the reconstructed power load time series data; determine a loss function of the time series prediction model according to the labeled label of the sample power load time series data and the prediction label; adjust model parameters of the time series prediction model including the affine parameter based on the loss function.

14. A time series data prediction apparatus, comprising: a first obtaining module configured to obtain original time series power load data to be predicted and non-stationary information of the original time series power load data; a second affine module configured to input the original time series power load data into a target time series prediction model, and perform affine processing on the original time series power load data by using a target affine parameter of the model of the target time series prediction model and the non-stationary information to obtain affine power load time series data; a second reconstructing module configured to predict the affine power load time series data to obtain predicted power load time series data, and reconstruct the predicted power load time series data based on the target affine parameter and the non-stationary information to obtain reconstructed power load time series data; wherein the target time series prediction model is a model trained by the training apparatus of any one of claims 11-13.

15. The apparatus of claim 14, wherein, The first obtaining module is further configured to: statistically process the original power load time series data to obtain variance and expectation of the original power load time series data as the non-stationary information.

16. The apparatus of claim 14, wherein, The first obtaining module is further configured to: determine variance and expectation of the reconstructed power load time series data based on the variance and expectation of the original power load time series data as non-stationary information of the reconstructed power load time series data.

17. A time series prediction apparatus, comprising: a second obtaining module configured to obtain original power load time series data to be predicted and non-stationary information of the original power load time series data; a third affine module configured to perform affine processing on the original power load time series data based on the non-stationary information and an affine parameter to obtain first time series data; a predicting module configured to predict based on the first time series data to obtain second time series data; a third reconstructing module configured to perform inverse affine processing on the second time series data based on the non-stationary information and the affine parameter to obtain reconstructed power load time series data.

18. The apparatus of claim 17, wherein, The third affine module is further configured to: statistically process the original power load time series data to obtain variance and expectation of the original power load time series data as the non-stationary information of the original power load time series data; perform regularization processing on the original power load time series data based on the non-stationary information to obtain third time series data; perform affine transformation on the third time series data based on the affine parameter to obtain the first time series data.

19. The apparatus of claim 18, wherein, The third reconstructing module is further configured to: perform inverse affine processing on the second time series data based on the affine parameters to obtain fourth time series data; perform inverse regularization processing on the fourth time series data based on the non-stationary information to obtain the reconstructed power load time series data.

20. The apparatus of claim 18 or 19, wherein, The second obtaining module is further configured to: determine variance and expectation of the reconstructed power load time series data as non-stationary information of the reconstructed power load time series data based on variance and expectation of the original time series data. 21.An electronic device comprising: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-3, claims 4-6, and claims 7-10.

22. A non-transitory computer readable storage medium having stored thereon computer instructions, wherein, The computer instructions are used to enable the computer to perform the method according to any one of claims 1-3, claims 4-6, and claims 7-10. 23.A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-3, claims 4-6, and claims 7-10.

Citation Information

Patent Citations

  • Time series data and random gradient descent method-based network reconstruction method

    CN107194469A

  • Ammeter fault diagnosis method and device of stacked recurrent neural network

    CN113608163A