A deep temporal prediction method and electronic device

CN122654498APending Publication Date: 2026-08-28HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510226180.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-27
Publication Date
2026-08-28

AI Technical Summary

Technical Problem

但对序列进行截断的方式会导致未来时间数据信息丢失,采用随机数或均值对序列进行填充的方式会引入大量的数据噪声,也即,这两种方式虽能使输入深度时序预测模型的各变量的序列长度一致,但由于数据信息缺失或噪声的引入会导致时序预测任务的准确性较低

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122654498A_ABST
    Figure CN122654498A_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a deep time series prediction method and an electronic device. The method comprises the following steps: obtaining a target variable sequence of a target variable, a future covariate sequence of at least one future covariate of the target variable, and a historical covariate sequence of at least one historical covariate of the target variable; predicting variable values of the target variable at multiple future time points as first predicted variable values; and predicting variable values of the historical covariate at the multiple future time points as second predicted variable values; generating a first correction sequence according to the target variable sequence and the first predicted variable values, and generating a second correction sequence according to the historical covariate sequence and the second predicted variable values; and predicting variable values of the target variable at the multiple future time points according to the first correction sequence, the second correction sequence, and the future covariate sequence. The technical solution provided by the embodiment of the application can improve the accuracy of a time series prediction task.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of information technology, and in particular to a deep time series prediction method and electronic device. Background Technology

[0002] Deep time series prediction models refer to deep learning models used for time series forecasting. They primarily predict the target variable by modeling its changes over time and the relationships between covariates and the target variable. However, deep time series prediction models require that the sequence lengths of all input variables be consistent. In practical applications, the sequence lengths of different variables are often inconsistent. To address this, related technologies typically truncate sequences containing future time data, or pad sequences containing only historical time data using random numbers, mean values, or zero padding to achieve consistent sequence lengths for all variables. However, truncation leads to the loss of future time data, and padding with random numbers or mean values ​​introduces significant data noise. In other words, while these two methods can ensure consistent sequence lengths for all variables input to the deep time series prediction model, the lack of data or the introduction of noise results in lower accuracy for the time series prediction task. Summary of the Invention

[0003] The purpose of this application is to provide a deep temporal prediction method and electronic device to improve the accuracy of temporal prediction tasks. The specific technical solution is as follows:

[0004] In a first aspect, embodiments of this application provide a deep temporal prediction method, the method comprising:

[0005] Obtain a target variable sequence, a future covariate sequence of at least one future covariate of the target variable, and a historical covariate sequence of at least one historical covariate of the target variable; wherein the target variable sequence consists of the variable values ​​of the target variable at multiple historical times, the future covariate sequence consists of the variable values ​​of the future covariate at multiple historical times and multiple future times, and the historical covariate sequence consists of the variable values ​​of the historical covariate at multiple historical times;

[0006] The values ​​of the target variable at the multiple future times are predicted and used as the first predicted variable values; and the values ​​of the historical covariates at the multiple future times are predicted and used as the second predicted variable values.

[0007] A first corrected sequence is generated based on the target variable sequence and the first predicted variable value, and a second corrected sequence is generated based on the historical covariate sequence and the second predicted variable value; wherein, the first corrected sequence consists of the target variable sequence and the first corrected variable value, the first corrected variable value being obtained by correcting the first predicted variable value based on the target variable sequence; the second corrected sequence consists of the historical covariate sequence and the second corrected variable value, the second corrected variable value being obtained by correcting the second predicted variable value based on the historical covariate sequence;

[0008] Based on the first corrected sequence, the second corrected sequence, and the future covariate sequence, the variable values ​​of the target variable at the plurality of future times are predicted.

[0009] In some embodiments, generating a first corrected sequence based on the target variable sequence and the first predictor variable values, and generating a second corrected sequence based on the historical covariate sequence and the second predictor variable values, includes:

[0010] The target variable sequence and the first predictor variable value are combined to obtain a first predictor sequence; and the historical covariate sequence and the second predictor variable value are combined to obtain a second predictor sequence.

[0011] Based on the target variable sequence in the first prediction sequence, the values ​​of the first predicted variables in the first prediction sequence are corrected to obtain a first corrected sequence; based on the historical covariate sequence in the second prediction sequence, the values ​​of the second predicted variables in the second prediction sequence are corrected to obtain a second corrected sequence.

[0012] In some embodiments, combining the target variable sequence and the first predictor variable value to obtain a first predictor sequence; and combining the historical covariate sequence and the second predictor variable value to obtain a second predictor sequence, includes:

[0013] The first predictor variable value is concatenated to the target variable sequence to obtain the first predictor sequence; and the second predictor variable value is concatenated to the historical covariate sequence to obtain the second predictor sequence.

[0014] In some embodiments, the step of correcting the values ​​of the first predicted variables in the first predicted sequence based on the target variable sequence in the first predicted sequence to obtain a first corrected sequence includes:

[0015] Extract the data distribution features of the target variable sequence in the first prediction sequence as the first data distribution features;

[0016] Based on the first data distribution characteristics, the values ​​of the first predicted variables in the first predicted sequence are corrected to obtain the first corrected sequence;

[0017] The step of correcting the values ​​of the second predictor variables in the second predictor sequence based on the historical covariate sequence in the second predictor sequence to obtain the second corrected sequence includes:

[0018] Extract the data distribution features of the historical covariate sequences in the second prediction sequence as the second data distribution features;

[0019] Based on the second data distribution characteristics, the values ​​of the second predictor variables in the second prediction sequence are corrected to obtain the second corrected sequence.

[0020] In some embodiments, the prediction of the target variable values ​​at multiple future times, as first predicted variable values, and the prediction of the historical covariates values ​​at multiple future times, as second predicted variable values, includes:

[0021] Extract the first feature of the target variable sequence, the second feature of the historical covariate sequence, the third feature of the future covariate sequence, and the first cross feature between the target variable sequence and the historical covariate sequence, the second cross feature between the target variable sequence and the future covariate sequence, and the third cross feature between the historical covariate sequence and the future covariate sequence;

[0022] Based on the first feature, the first cross feature, and the second cross feature, the variable values ​​of the target variable at the multiple future times are predicted and used as the first predicted variable values;

[0023] For each historical covariate, based on the second feature involved in the historical covariate, the first cross feature involved in the historical covariate, and the third cross feature involved in the historical covariate, the variable values ​​of the historical covariate at the multiple future times are predicted and used as the second predicted variable values.

[0024] In some embodiments, predicting the values ​​of the target variable at the plurality of future times based on the first modified sequence, the second modified sequence, and the future covariate sequence includes:

[0025] The target data is decomposed to obtain the denoised target data and noise components; wherein, the target data is the data obtained by concatenating the first corrected sequence, the second corrected sequence and the future covariate sequence;

[0026] Based on the denoised target data, the variable values ​​of the target variable at the multiple future times are predicted to obtain the initial prediction results;

[0027] The initial prediction result and the noise component are superimposed to obtain the variable values ​​of the target variable at the multiple future times.

[0028] In some embodiments, the step of decomposing the target data to obtain the denoised target data and noise components includes:

[0029] The target data is projected into the frequency domain to obtain the first spectrum of the target data;

[0030] In the first spectrum, identify spectral components with energy values ​​lower than a preset energy threshold;

[0031] The spectral components are filtered out from the first spectrum to obtain the second spectrum;

[0032] The second spectrum is projected into the time domain to obtain the denoised target data;

[0033] The noise component is obtained by subtracting the target data from the denoised target data.

[0034] In some embodiments, the target variable is the power generation of the wind power generation equipment, and the covariates include wind speed, wind direction, temperature, humidity, and pressure in the area where the wind power generation equipment is located; or,

[0035] The target variable is the power generation of the solar power equipment, and the covariates include the light intensity, temperature, humidity, pressure, cloud cover, solar angle, and theoretical value of solar irradiance in the area where the solar power equipment is located; or...

[0036] The target variable is the wind speed in the target area, and the covariates include the temperature, humidity, pressure, and precipitation in the target area.

[0037] In some embodiments, the target time series prediction model includes a first prediction network, an error correction network, and a second prediction network.

[0038] The prediction process obtains the values ​​of the target variable at multiple future times, as the first predicted variable value; and predicts the values ​​of the historical covariate at multiple future times, as the second predicted variable value, including:

[0039] The target variable's values ​​at multiple historical moments are input into the first prediction network to obtain a first predicted variable value; and the historical covariate's values ​​at multiple historical moments are input into the first prediction network to obtain a second predicted variable value.

[0040] The step of generating a first corrected sequence based on the target variable and the first predictor variable value, and generating a second corrected sequence based on the historical covariate sequence and the second predictor variable value, includes:

[0041] The target variable's values ​​at multiple historical moments and the first predicted variable's values ​​are input into the error correction network to generate a first correction sequence; and the historical covariates' values ​​at multiple historical moments and the second predicted variable's values ​​are input into the error correction network to generate a second correction sequence.

[0042] The step of predicting the value of the target variable at the plurality of future times based on the first corrected sequence, the second corrected sequence, and the future covariate sequence includes:

[0043] The first corrected sequence, the second corrected sequence, and the future covariate sequence are input into the second prediction network to obtain the variable values ​​of the target variable at the multiple future times.

[0044] In some embodiments, the error correction network includes a splicing subnetwork and a correction subnetwork.

[0045] The process of combining the target variable sequence and the first predictor variable value to obtain a first predictor sequence, and combining the historical covariate sequence and the second predictor variable value to obtain a second predictor sequence, includes:

[0046] The target variable sequence and the first predicted variable value are input into the splicing sub-network to obtain the first predicted sequence; and the historical covariate sequence and the second predicted variable value are input into the splicing sub-network to obtain the second predicted sequence.

[0047] The step of correcting the values ​​of the first predicted variables in the first predicted sequence based on the target variable sequence in the first predicted sequence to obtain a first corrected sequence, and correcting the values ​​of the second predicted variables in the second predicted sequence based on the historical covariate sequence in the second predicted sequence to obtain a second corrected sequence, includes:

[0048] The first prediction sequence is input into the correction sub-network so that the correction sub-network corrects the value of the first prediction variable according to the target variable sequence in the first prediction sequence to obtain a first correction sequence; the second prediction sequence is input into the correction sub-network so that the correction sub-network corrects the value of the second prediction variable in the second prediction sequence according to the historical covariate sequence in the second prediction sequence to obtain a second correction sequence.

[0049] In some embodiments, the target time-series prediction model is trained in the following manner:

[0050] Obtain a sequence of sample variables, a sequence of future covariates of at least one future covariate of the sample variables, and a sequence of historical covariates of at least one historical covariate of the sample variables; wherein, the sequence of sample variables consists of the variable values ​​of the sample variables at multiple historical moments, the sequence of future covariates of the sample variables consists of the variable values ​​of the future covariates of the sample variables at multiple historical moments and multiple future moments, and the sequence of historical covariates of the sample variables consists of the variable values ​​of the historical covariates of the sample variables at multiple historical moments; at the multiple historical moments, the time of variable values ​​with the same order in the sequence of sample variables, the sequence of historical covariates of the sample variables, and the sequence of future covariates of the future covariates of the sample variables is the same;

[0051] The obtained sequence of sample variables, the historical covariate sequence of at least one historical covariate of the sample variables, and the future covariate sequence of at least one future covariate of the sample variables are input into the initial time series prediction model to obtain the variable values ​​of the sample variables predicted by the initial time series prediction model at the multiple future times.

[0052] Based on the predicted values ​​of the sample variables at multiple future times and the obtained values ​​of the sample variables at multiple future times, the model parameters of the initial time series model are adjusted to obtain the target time series model.

[0053] Secondly, embodiments of this application also provide a depth time series prediction apparatus, the apparatus comprising:

[0054] Variable acquisition module: used to acquire the target variable sequence of the target variable, the future covariate sequence of at least one future covariate of the target variable, and the historical covariate sequence of at least one historical covariate of the target variable; wherein, the target variable sequence consists of the variable values ​​of the target variable at multiple historical times, the future covariate sequence consists of the variable values ​​of the future covariate at multiple historical times and multiple future times, and the historical covariate sequence consists of the variable values ​​of the historical covariate at multiple historical times;

[0055] The first variable prediction module is used to predict the variable values ​​of the target variable at multiple future times, as the first predicted variable value; and to predict the variable values ​​of the historical covariate at multiple future times, as the second predicted variable value.

[0056] A variable correction module is used to generate a first correction sequence based on the target variable sequence and the first predicted variable value, and to generate a second correction sequence based on the historical covariate sequence and the second predicted variable value; wherein, the first correction sequence consists of the target variable sequence and the first correction variable value, the first correction variable value being obtained by correcting the first predicted variable value based on the target variable sequence; the second correction sequence consists of the historical covariate sequence and the second correction variable value, the second correction variable value being obtained by correcting the second predicted variable value based on the historical covariate sequence;

[0057] The second variable prediction module is used to predict the variable values ​​of the target variable at the plurality of future times based on the first correction sequence, the second correction sequence, and the future covariate sequence.

[0058] In some embodiments, the variable correction module includes,

[0059] The splicing submodule is used to combine the target variable sequence and the first predictor variable value to obtain a first predictor sequence; and to combine the historical covariate sequence and the second predictor variable value to obtain a second predictor sequence;

[0060] The variable correction submodule is used to correct the values ​​of the first predicted variables in the first prediction sequence according to the target variable sequence in the first prediction sequence to obtain a first corrected sequence; and to correct the values ​​of the second predicted variables in the second prediction sequence according to the historical covariate sequence in the second prediction sequence to obtain a second corrected sequence.

[0061] In some embodiments, the splicing submodule is specifically used for:

[0062] The first predictor variable value is concatenated to the target variable sequence to obtain the first predictor sequence; and the second predictor variable value is concatenated to the historical covariate sequence to obtain the second predictor sequence.

[0063] In some embodiments, the variable prediction submodule is specifically used for:

[0064] Extract the data distribution features of the target variable sequence in the first prediction sequence as the first data distribution features;

[0065] Based on the first data distribution characteristics, the values ​​of the first predicted variables in the first predicted sequence are corrected to obtain the first corrected sequence;

[0066] Extract the data distribution features of the historical covariate sequences in the second prediction sequence as the second data distribution features;

[0067] Based on the second data distribution characteristics, the values ​​of the second predictor variables in the second prediction sequence are corrected to obtain the second corrected sequence.

[0068] In some embodiments, the first variable prediction module is specifically used for:

[0069] Extract the first feature of the target variable sequence, the second feature of the historical covariate sequence, the third feature of the future covariate sequence, and the first cross feature between the target variable sequence and the historical covariate sequence, the second cross feature between the target variable sequence and the future covariate sequence, and the third cross feature between the historical covariate sequence and the future covariate sequence;

[0070] Based on the first feature, the first cross feature, and the second cross feature, the variable values ​​of the target variable at the multiple future times are predicted and used as the first predicted variable values;

[0071] For each historical covariate, based on the second feature involved in the historical covariate, the first cross feature involved in the historical covariate, and the third cross feature involved in the historical covariate, the variable values ​​of the historical covariate at the multiple future times are predicted and used as the second predicted variable values.

[0072] In some embodiments, the second variable prediction module is specifically used for:

[0073] The target data is decomposed to obtain the denoised target data and noise components; wherein, the target data is the data obtained by concatenating the first corrected sequence, the second corrected sequence and the future covariate sequence;

[0074] Based on the denoised target data, the variable values ​​of the target variable at the multiple future times are predicted to obtain the initial prediction results;

[0075] The initial prediction result and the noise component are superimposed to obtain the variable values ​​of the target variable at the multiple future times.

[0076] In some embodiments, the step of decomposing the target data to obtain the denoised target data and noise components includes:

[0077] The target data is projected into the frequency domain to obtain the first spectrum of the target data;

[0078] In the first spectrum, identify spectral components with energy values ​​lower than a preset energy threshold;

[0079] The spectral components are filtered out from the first spectrum to obtain the second spectrum;

[0080] The second spectrum is projected into the time domain to obtain the denoised target data;

[0081] The noise component is obtained by subtracting the target data from the denoised target data.

[0082] In some embodiments, the target variable is the power generation of the wind power generation equipment, and the covariates include wind speed, wind direction, temperature, humidity, and pressure in the area where the wind power generation equipment is located; or,

[0083] The target variable is the power generation of the solar power equipment, and the covariates include the light intensity, temperature, humidity, pressure, cloud cover, solar angle, and theoretical value of solar irradiance in the area where the solar power equipment is located; or...

[0084] The target variable is the wind speed in the target area, and the covariates include the temperature, humidity, pressure, and precipitation in the target area.

[0085] In some embodiments, the target time series prediction model includes a first prediction network, an error correction network, and a second prediction network.

[0086] The prediction process obtains the values ​​of the target variable at multiple future times, as the first predicted variable value; and predicts the values ​​of the historical covariate at multiple future times, as the second predicted variable value, including:

[0087] The target variable's values ​​at multiple historical moments are input into the first prediction network to obtain a first predicted variable value; and the historical covariate's values ​​at multiple historical moments are input into the first prediction network to obtain a second predicted variable value.

[0088] The step of generating a first corrected sequence based on the target variable and the first predictor variable value, and generating a second corrected sequence based on the historical covariate sequence and the second predictor variable value, includes:

[0089] The target variable's values ​​at multiple historical moments and the first predicted variable's values ​​are input into the error correction network to generate a first correction sequence; and the historical covariates' values ​​at multiple historical moments and the second predicted variable's values ​​are input into the error correction network to generate a second correction sequence.

[0090] The step of predicting the value of the target variable at the plurality of future times based on the first corrected sequence, the second corrected sequence, and the future covariate sequence includes:

[0091] The first corrected sequence, the second corrected sequence, and the future covariate sequence are input into the second prediction network to obtain the variable values ​​of the target variable at the multiple future times.

[0092] In some embodiments, the error correction network includes a splicing subnetwork and a correction subnetwork.

[0093] The process of combining the target variable sequence and the first predictor variable value to obtain a first predictor sequence, and combining the historical covariate sequence and the second predictor variable value to obtain a second predictor sequence, includes:

[0094] The target variable sequence and the first predicted variable value are input into the splicing sub-network to obtain the first predicted sequence; and the historical covariate sequence and the second predicted variable value are input into the splicing sub-network to obtain the second predicted sequence.

[0095] The step of correcting the values ​​of the first predicted variables in the first predicted sequence based on the target variable sequence in the first predicted sequence to obtain a first corrected sequence, and correcting the values ​​of the second predicted variables in the second predicted sequence based on the historical covariate sequence in the second predicted sequence to obtain a second corrected sequence, includes:

[0096] The first prediction sequence is input into the correction sub-network so that the correction sub-network corrects the value of the first prediction variable according to the target variable sequence in the first prediction sequence to obtain a first correction sequence; the second prediction sequence is input into the correction sub-network so that the correction sub-network corrects the value of the second prediction variable in the second prediction sequence according to the historical covariate sequence in the second prediction sequence to obtain a second correction sequence.

[0097] In some embodiments, the target time-series prediction model is trained in the following manner:

[0098] Obtain a sequence of sample variables, a sequence of future covariates of at least one future covariate of the sample variables, and a sequence of historical covariates of at least one historical covariate of the sample variables; wherein, the sequence of sample variables consists of the variable values ​​of the sample variables at multiple historical moments, the sequence of future covariates of the sample variables consists of the variable values ​​of the future covariates of the sample variables at multiple historical moments and multiple future moments, and the sequence of historical covariates of the sample variables consists of the variable values ​​of the historical covariates of the sample variables at multiple historical moments; at the multiple historical moments, the time of variable values ​​with the same order in the sequence of sample variables, the sequence of historical covariates of the sample variables, and the sequence of future covariates of the future covariates of the sample variables is the same;

[0099] The obtained sequence of sample variables, the historical covariate sequence of at least one historical covariate of the sample variables, and the future covariate sequence of at least one future covariate of the sample variables are input into the initial time series prediction model to obtain the variable values ​​of the sample variables predicted by the initial time series prediction model at the multiple future times.

[0100] Based on the predicted values ​​of the sample variables at multiple future times and the obtained values ​​of the sample variables at multiple future times, the model parameters of the initial time series model are adjusted to obtain the target time series model.

[0101] Thirdly, embodiments of this application also provide an electronic device, including:

[0102] Memory, used to store computer programs;

[0103] When a processor executes a program stored in memory, it implements any of the deep time-series prediction methods described above.

[0104] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements any of the aforementioned deep time-series prediction methods.

[0105] Fifthly, embodiments of this application also provide a computer program product containing instructions that, when run on a computer, cause the computer to execute any of the deep time-series prediction methods described above.

[0106] Beneficial effects of the embodiments in this application:

[0107] In the technical solution provided in this application, the data of the target variable and historical covariates at multiple future times are completed by predicting the values ​​of the first and second predictor variables, thus achieving consistent sequence length. Compared to the aforementioned method of truncating the future covariate sequence to achieve consistent sequence length, this application does not truncate any variable sequence, avoiding data loss. Furthermore, since the first predictor variable value in this application is predicted based on the target variable sequence, and the second predictor variable value is predicted based on the historical covariate sequence, using the first and second predictor variable values ​​to complete the variable values ​​of the target variable and historical covariates at multiple future times results in a more accurate completed sequence compared to completing the variable values ​​of the target variable and historical covariates at multiple future times using random numbers, mean values, etc.

[0108] Furthermore, this application also obtains a first corrected variable value by correcting the first predictor variable value based on the target variable sequence, and obtains a second corrected variable value by correcting the second predictor variable value based on the historical covariate sequence. Then, the target variable sequence and the first corrected variable value are combined to obtain a first corrected sequence, and the historical covariate sequence and the second corrected variable value are combined to obtain a second corrected sequence. Thus, compared with the sequence obtained by directly combining the target variable sequence and the first predictor variable value, and the sequence obtained by directly combining the historical covariate sequence and the second predictor variable value, the first corrected sequence and the second corrected sequence have higher accuracy (understandably, the variable values ​​of the target variable and the historical covariate are regular and periodic. Therefore, the first corrected variable value obtained by correcting the first predictor variable value using the target variable sequence is closer to the true variable value of the target variable sequence at multiple future times than the first predictor variable value, and the second corrected variable value obtained by correcting the second predictor variable value using the historical covariate sequence is closer to the true variable value of the historical covariate sequence at multiple future times than the second predictor variable value. That is, the accuracy of the corrected variable value is higher than the accuracy of the predicted variable value).

[0109] Therefore, predicting the target variable's value at multiple future times based on the first revised sequence, the second revised sequence, and the future covariate sequence can improve the accuracy of the prediction of the target variable's value at multiple future times, thus improving the accuracy of the time series prediction task.

[0110] Of course, implementing any product or method of this application does not necessarily require achieving all of the advantages described above at the same time. Attached Figure Description

[0111] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other embodiments can be obtained based on these drawings.

[0112] Figure 1 A schematic diagram of the first process of the deep temporal prediction method provided in the embodiments of this application;

[0113] Figure 2 Provided for the embodiments of this application Figure 1 A detailed schematic diagram of step S12;

[0114] Figure 3 Provided for the embodiments of this application Figure 1 A detailed schematic diagram of step S13;

[0115] Figure 4A schematic diagram illustrating the determination of a first prediction sequence provided in an embodiment of this application;

[0116] Figure 5 Provided for the embodiments of this application Figure 1 A detailed schematic diagram of step S14;

[0117] Figure 6 A schematic diagram of a second process for the depth temporal prediction method provided in an embodiment of this application;

[0118] Figure 7 A schematic diagram of the structure of the target time series prediction model provided in the embodiments of this application;

[0119] Figure 8 A schematic diagram of a third process for a depth-time series prediction method provided in an embodiment of this application;

[0120] Figure 9 A schematic diagram of a process for training a target time series prediction model provided in an embodiment of this application;

[0121] Figure 10 A schematic diagram of a depth time-series prediction device provided in an embodiment of this application;

[0122] Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0123] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art based on this application are within the scope of protection of this application.

[0124] Time series forecasting (TSF) refers to the process of arranging acquired data into a chronological sequence, analyzing its direction and extent of change, and thereby predicting the levels that may be reached in the future. Currently, there are three common approaches to time series forecasting: the first is using traditional time series forecasting models; the second is using machine learning models; and the third is using deep learning models. Among these, deep learning models are more advantageous in handling complex and nonlinear time series data compared to traditional time series forecasting models and machine learning models. They offer greater power and flexibility, and boast the strongest algorithm performance and the widest range of applications.

[0125] Deep time series forecasting models refer to deep learning models used for time series prediction. They primarily predict the target variable by modeling its changes over time and the relationships between covariates and the target variable. However, deep time series forecasting models require that the sequence lengths of all input variables be consistent. In practical applications, however, the sequence lengths of different variables are often inconsistent. For example, in the scenario of predicting renewable wind power output, the available data includes weather forecast data, power generation data at multiple historical moments, and measured weather data. However, compared to power generation data and measured weather data, weather forecast data includes not only weather forecast data at multiple historical moments but also weather forecast data at multiple future moments. Therefore, in the scenario of predicting renewable wind power output, the sequence lengths of the obtained weather forecast data, power generation data at multiple historical moments, and measured weather data are inconsistent.

[0126] In response to this, related technologies typically truncate sequences containing future time data to ensure consistent sequence lengths for all variables. For example, the shortest time series can be used as the baseline, and data from other sequences can be aligned point-to-point with the baseline time series in terms of both time and length; that is, the shortest sequence is used as the benchmark for truncation of other sequences. Alternatively, sequences containing only historical time data can be padded with random numbers, the mean, or zeros to ensure consistent sequence lengths for all variables. For instance, a time series forecasting architecture based on automatic correlation (i.e., the Autoformer algorithm) can decompose the target variable's sequence at multiple historical moments (i.e., the historical sequence) into periodic and trend terms, using zero values ​​and the mean of historical sequence data as the data for the periodic and trend terms at multiple future moments, respectively.

[0127] As can be seen from the above, truncating the sequence will result in the loss of data information at multiple future moments, and filling the sequence with random numbers or mean will introduce a lot of data noise. Therefore, although these two methods can make the sequence length of each variable input to the deep time series prediction model consistent, the accuracy of the deep time series prediction model will be reduced due to the loss of data information or the introduction of noise.

[0128] To address the issue that inconsistent variable sequence lengths can reduce the accuracy of deep time series prediction models, this application provides a deep time series prediction method. The deep time series prediction method provided in this application is applied to electronic devices, such as desktop computers, portable computers, and smart mobile terminals.

[0129] The following section provides a detailed explanation of the deep time series prediction method provided in this application through specific examples.

[0130] See Figure 1 , Figure 1 A first flowchart illustrating the deep temporal prediction method provided in this application embodiment includes the following steps:

[0131] Step S11: Obtain the target variable sequence, the future covariate sequence of at least one future covariate of the target variable, and the historical covariate sequence of at least one historical covariate of the target variable;

[0132] Among them, the target variable sequence consists of the variable values ​​of the target variable at multiple historical moments, the future covariate sequence consists of the variable values ​​of the future covariate at multiple historical moments and multiple future moments, and the historical covariate sequence consists of the variable values ​​of the historical covariate at multiple historical moments.

[0133] Step S12: Predict the values ​​of the target variable at multiple future times as the first predicted variable value; and predict the values ​​of the historical covariates at multiple future times as the second predicted variable value.

[0134] Step S13: Generate a first corrected sequence based on the target variable sequence and the first predictor variable value, and generate a second corrected sequence based on the historical covariate sequence and the second predictor variable value;

[0135] The first correction sequence consists of a target sequence and a first correction variable value, which is obtained by correcting the first predictor variable value based on the target variable sequence; the second correction sequence consists of a historical covariate sequence and a second correction variable value, which is obtained by correcting the second predictor variable value based on the historical covariate sequence.

[0136] Step S14: Based on the first modified sequence, the second modified sequence, and the future covariate sequence, predict the variable values ​​of the target variable at multiple future times.

[0137] In the technical solution provided in this application, the data of the target variable and historical covariates at multiple future times are completed by predicting the values ​​of the first and second predictor variables, thus achieving consistent sequence length. Compared to the aforementioned method of truncating the future covariate sequence to achieve consistent sequence length, this application does not truncate any variable sequence, avoiding data loss. Furthermore, since the first predictor variable value in this application is predicted based on the target variable sequence, and the second predictor variable value is predicted based on the historical covariate sequence, using the first and second predictor variable values ​​to complete the variable values ​​of the target variable and historical covariates at multiple future times results in a more accurate completed sequence compared to completing the variable values ​​of the target variable and historical covariates at multiple future times using random numbers, mean values, etc.

[0138] Furthermore, this application also obtains a first corrected variable value by correcting the first predictor variable value based on the target variable sequence, and obtains a second corrected variable value by correcting the second predictor variable value based on the historical covariate sequence. Then, the target variable sequence and the first corrected variable value are combined to obtain a first corrected sequence, and the historical covariate sequence and the second corrected variable value are combined to obtain a second corrected sequence. Thus, compared with the sequence obtained by directly combining the target variable sequence and the first predictor variable value, and the sequence obtained by directly combining the historical covariate sequence and the second predictor variable value, the first corrected sequence and the second corrected sequence have higher accuracy (understandably, the variable values ​​of the target variable and the historical covariate are regular and periodic. Therefore, the first corrected variable value obtained by correcting the first predictor variable value using the target variable sequence is closer to the true variable value of the target variable sequence at multiple future times than the first predictor variable value, and the second corrected variable value obtained by correcting the second predictor variable value using the historical covariate sequence is closer to the true variable value of the historical covariate sequence at multiple future times than the second predictor variable value. That is, the accuracy of the corrected variable value is higher than the accuracy of the predicted variable value).

[0139] Therefore, predicting the target variable's value at multiple future times based on the first revised sequence, the second revised sequence, and the future covariate sequence can improve the accuracy of the prediction of the target variable's value at multiple future times, thus improving the accuracy of the time series prediction task.

[0140] In step S11 above, the target variable is the variable whose value needs to be predicted at multiple future times in the time series prediction task; the covariate is other variables related to the target variable in the time series prediction task; the historical covariate is a covariate that only includes the variable values ​​at multiple historical times; and the future covariate is a covariate that includes both the variable values ​​at multiple historical times and the variable values ​​at multiple future times.

[0141] Understandably, time series forecasting can be applied to scenarios such as renewable energy power generation forecasting, weather forecasting, and corporate cash flow forecasting. Renewable energy power generation forecasting can be further subdivided into power generation forecasting for wind power equipment and power generation forecasting for solar power equipment. Specifically, the following examples 1-4 illustrate the target variables and possible covariates involved in the scenarios mentioned here:

[0142] Example 1: The target variable is the power generation of the wind power generation equipment, and the covariates may include variables such as wind speed, wind direction, temperature, humidity, and pressure in the area where the wind power generation equipment is located.

[0143] Example 2: The target variable is the power generation of the solar power equipment, and the covariates may include variables such as the light intensity, temperature, humidity, pressure, cloud cover, solar angle, and theoretical value of solar radiation in the area where the solar power equipment is located.

[0144] Example 3: The target variable is the wind speed in the target area, and the covariates may include variables such as temperature, humidity, pressure, and precipitation in the target area.

[0145] In this context, the target area refers to the region where wind speed prediction is needed. For example, if the region where wind speed prediction is needed is region A, then region A is the target area. Covariates include the temperature, humidity, pressure, and precipitation of region A. In one possible instance, if certain variables from other regions have a significant impact on the wind speed prediction of the target area, then these variables from other regions (i.e., variables with a significant impact on the wind speed of the target area) can also be used as covariates when predicting the wind speed of the target area. For example, if the region where wind speed prediction is needed is region A, and the temperature of region B has a significant impact on the wind speed prediction of region A, then when the target variable is the wind speed of region A, the covariates can include the temperature, humidity, pressure, and precipitation of the target area, as well as the temperature of region B.

[0146] Example 4: The target variable is the company's cash amount forecast, and the covariates may include variables such as accounts receivable, outbound amount, order amount, order attributes, and customer attributes.

[0147] Understandably, each target variable in Examples 1-4 above involves multiple covariates, but these are just examples. In actual applications, the target variable may involve only one or more of the covariates. For example, if the target variable is the power generation of a wind turbine, the covariates may include any one or more of the following variables: wind speed, wind direction, temperature, humidity, and pressure in the area where the wind turbine is located.

[0148] Furthermore, in practical applications, the specific covariates used as target covariates and historical covariates can be determined based on the available data or manually by the operator. Specifically:

[0149] In some embodiments, for a certain covariate, if the variable values ​​of the covariate at multiple historical moments and multiple future moments can be obtained simultaneously, then the covariate is regarded as a future covariate; if only the variable values ​​of the covariate at multiple historical moments can be obtained, but its variable values ​​at future moments cannot be obtained, then the covariate is regarded as a historical covariate.

[0150] For example, consider a scenario where the target variable is the power output of a wind turbine, and the covariates are the wind speed and temperature in the area where the wind turbine is located. Since wind speed and temperature can be predicted, they can be categorized into measured wind speed data and predicted wind speed data, as well as measured temperature data and predicted temperature data. For measured wind speed and temperature data, the electronic device can only obtain the actual variable values ​​for the time period preceding the current moment. For predicted wind speed and temperature data, the electronic device can obtain both the actual variable values ​​for the time period preceding the current moment (i.e., the predicted wind speed and temperature values ​​for the time period preceding the current moment) and the actual variable values ​​for the time period following the current moment (i.e., the predicted wind speed and temperature values ​​for the time period following the current moment). Therefore, measured wind speed and temperature data are historical covariates, while predicted wind speed and temperature data are future covariates.

[0151] Alternatively, in some embodiments, if for a certain covariate, only the values ​​of the covariate at some future times are available, and its values ​​at all future times are not available, then the covariate can be treated as a historical covariate, and only the values ​​of the covariate at multiple historical times are retained. In the time series prediction method provided in this application embodiment, if the values ​​of a future covariate at L times following the current time are needed, then these L times represent all future times; "partial future times" is relative to "all future times".

[0152] For example, wind speed is a covariate, which can be divided into measured wind speed data and predicted wind speed data. For future covariates, we need to use the variable values ​​of the future covariate at five subsequent times from the current time, t1 to t5. However, for predicted wind speed data, we can only obtain data at three subsequent times, t1 to t3. Therefore, we can use predicted wind speed data as a historical covariate and only obtain its variable values ​​at multiple historical times.

[0153] Alternatively, in some other embodiments, for each determined covariate, the operator can pre-set which covariates will be used as historical covariates and which will be used as future covariates. During the data acquisition process, the variable values ​​of historical covariates in future time periods can be directly omitted. Alternatively, if the variable value of a certain historical covariate in a future time period is obtained, these variable values ​​should be discarded, and only its variable value in the future time period should be retained.

[0154] For example, in a scenario where the target variable is the power generation of a wind turbine, and the covariates are the wind speed and temperature in the area where the turbine is located, since both wind speed and temperature have measured values ​​and can be predicted, the measured wind speed and temperature values ​​can only be obtained at multiple historical moments; that is, the measured wind speed and temperature values ​​should both be historical covariates. However, the predicted wind speed and temperature values ​​can simultaneously obtain their values ​​at multiple historical moments and at multiple future moments; that is, the predicted wind speed and temperature values ​​should both be future covariates. However, based on the operator's... Based on experience, it is believed that using the predicted temperature as a covariate is more beneficial for predicting the power generation of wind turbines than using it as a future covariate. In this scenario, operators can pre-set the historical covariates as the predicted temperature, the measured temperature, and the measured wind speed, and the future covariate as the predicted wind speed. In this way, during subsequent data acquisition, the predicted temperature value at future moments can be omitted, that is, only the predicted temperature value at historical moments can be retained, while the values ​​of other covariates (i.e., the measured temperature, the measured wind speed, and the predicted wind speed) can be obtained normally.

[0155] The target variable sequence is a sequence of the target variable's values ​​at multiple historical moments. The historical covariate sequence is a sequence of the historical covariate's values ​​at multiple historical moments. The future covariate sequence is a sequence of the future covariate's values ​​at multiple historical moments and multiple future moments.

[0156] In this system, each target variable has at least one historical covariate and at least one future covariate; each historical covariate has a sequence of historical covariates, and each future covariate has a sequence of future covariates. Furthermore, it is understood that the moment when the electronic device executes step S11 is the current moment, any time period before the current moment is considered a series of historical moments, and any time period after the current moment is considered a series of future moments. The variable values ​​constituting the target variable sequence and the historical covariate sequence are the variable values ​​of the same series of historical moments, and the variable values ​​of the future covariate sequence for the same series of historical moments are also the variable values ​​of those same series of historical moments.

[0157] It is understood that in the embodiments of this application, for each variable value in the target variable sequence, each variable value in the historical covariate sequence, and each variable value at a historical moment in the future covariate sequence, the time of variable values ​​with the same order is the same. For example, the first variable value in the target variable sequence, the first variable value in the historical covariate sequence, and the first variable value at a historical moment in the future covariate sequence are variable values ​​at the same time; the second variable value in the target variable sequence, the second variable value in the historical covariate sequence, and the second variable value at a historical moment in the future covariate sequence are variable values ​​at the same time. Here, the time of a variable value can be understood as the time when the variable value was generated.

[0158] The following example illustrates the variables and variable sequences in the embodiments of this application.

[0159] For example, the target variable is target variable 1; the historical covariates of the target variable are historical covariate 1, historical covariate 2, ..., historical covariate n; the future covariates of the target variable are future covariate 1, future covariate 2, ..., future covariate m. Let the target variable sequence 1 of target variable 1 be denoted as S, where S = {S0, S1, ..., Sm}. T}. Where T represents the sequence length of the target variable sequence, that is, the number of variable values ​​in the target variable sequence; S T This represents the value of the T-th variable in the target variable sequence.

[0160] Let H be the sequence of historical covariates of historical covariate 1. 1 , Let the historical covariate sequence 2 of historical covariate 2 be denoted as H. 2 , …; Let H be the sequence of historical covariates n for the historical covariate n. n , Therefore, the sequence of historical covariates can be denoted as H. i , Where i represents the index of the historical covariate sequence; n represents the number of historical covariate sequences; and T represents the length of the historical covariate sequence, that is, the number of variable values ​​in the historical covariate sequence. This represents the value of the T-th variable in the i-th historical covariate sequence.

[0161] Let F denote the sequence of future covariates of future covariate 1 as F. 1 , Let F denote the sequence of future covariates 2 of future covariates 2. 2 , …; Let F denote the historical covariate sequence m of the future covariate m. m , Therefore, the sequence of future covariates can be denoted as F. j , Where j represents the index of the future covariate sequence; m represents the number of future covariate sequences; T+L represents the length of the future covariate sequence, that is, the number of variable values ​​in the future covariate sequence; This represents the value of the (T+L)th variable in the sequence of the j-th future covariates; For the future values ​​of the covariates at multiple historical moments, Let T represent the values ​​of the future covariates at multiple future moments, and let L represent the number of values ​​of the future covariates at multiple historical moments in the future covariate sequence.

[0162] Understandably, in this example, the T variable values ​​in the target variable sequence 1, the first T variable values ​​in the future covariate sequences 1, 2, ..., m, and the T variable values ​​in the historical covariate sequences 1, 2, ..., n are variable values ​​from the same historical time period (i.e., a time period consisting of the aforementioned multiple historical moments).

[0163] In step S12 above, the first predictor variable value is the value of the target variable at multiple future times obtained by the electronic device after predicting the target variable based on the target variable sequence; the second predictor variable value is the value of the historical covariate at multiple future times obtained by the electronic device after predicting based on the historical covariate sequence.

[0164] Specifically, after obtaining the target variable sequence and the historical covariate sequence, the electronic device can predict the values ​​of multiple future time-series variables (i.e., the first or second predictor variable values) using any time-series prediction method, such as traditional time-series prediction models or machine learning models. It is understandable that the purpose of predicting the first predictor variable value is to combine the target variable sequence with the first predictor variable value to obtain a sequence with the same length as the future covariate sequence; the purpose of predicting the second predictor variable value is similar, that is, to combine the historical covariate sequence with the second predictor variable value to obtain a sequence with the same length as the future covariate sequence. Therefore, in this embodiment, the number of first and second predictor variable values ​​is the same as the number of variable values ​​in the future time period (i.e., the time period composed of the aforementioned multiple future times) in the future covariate sequence. In other words, the number of first predictor variable values ​​to be predicted is the same as the number of variable values ​​in the future time period in the future covariate sequence, and the number of second predictor variable values ​​to be predicted is also the same as the number of variable values ​​in the future time period in the future covariate sequence.

[0165] The following example illustrates the process of determining the values ​​of the first and second predictor variables based on the target variable sequence and the historical covariate sequence in an embodiment of this application.

[0166] For example, continuing with the example shown in step S12 above, the number of variable values ​​for future time periods in each future covariate sequence is L. The obtained target variable sequence is S = {S0, S1, ..., S...} T}; then according to the target variable sequence S={S0,S1,…,S T Time series forecasting can yield the future values ​​of the target variable, S′, where S′ = {S T+1 ,S T+2 ,…,S T+L The obtained historical covariate sequences total n, namely... …、 Then based on the historical covariate sequence Time series forecasting can obtain the values ​​of historical covariates in future time periods. Based on historical covariate sequences Time series forecasting can obtain the values ​​of historical covariates in future time periods. …; based on the historical covariate sequence Time series forecasting can obtain the values ​​of historical covariates in future time periods.

[0167] In this embodiment, if the selected time-series prediction method can directly use the sequence as input, the target variable sequence can be directly input into the selected time-series prediction method to obtain the first predicted variable value predicted by the selected time-series prediction method; and the historical covariate sequence can be directly input into the selected time-series prediction method to obtain the second predicted variable value predicted by the selected time-series prediction method. Alternatively, if the selected time-series prediction method requires feature values ​​as input, relevant features can be extracted from the target variable sequence and the historical covariate sequence first, and then the first and second predicted variable values ​​can be predicted using the extracted features and the selected time-series prediction method. See subsequent details for more information. Figure 2 The description in the text will not be repeated here.

[0168] It is understood that in the embodiments of this application, for each first predictor variable value, each second predictor variable value, and each variable value belonging to a future time period in the future covariate sequence, the time of variable values ​​with the same order is the same. For example, the first first predictor variable value of the target variable, the first second predictor variable value of the historical covariate, and the first variable value belonging to a future time period in the future covariate sequence are variable values ​​at the same time; the second first predictor variable value of the target variable, the second second predictor variable value of the historical covariate, and the second variable value belonging to a future time period in the future covariate sequence are variable values ​​at the same time. Here, the time of the variable value can be understood as the time when the variable value is predicted.

[0169] In step S13 above, the first correction sequence consists of a target variable sequence and first correction variable values. The first correction variable values ​​are the variable values ​​obtained by the electronic device after correcting the first predicted variable values ​​based on the target variable sequence. Generating the first correction sequence based on the target variable sequence and the first predicted variable values ​​can be understood as follows: the electronic device corrects the first predicted variable values ​​based on the target variable sequence to obtain the first correction variable values; then, the target variable sequence and the first correction variable values ​​are combined to form the first correction sequence. That is, the first correction sequence includes the target variable values ​​over historical periods and the corrected first predicted variable values.

[0170] For example, the sequence of target variables is S = {S0, S1, ..., S...} T The first predictor variable is S′={S}. T+1 ,S T+2 ,…,S T+L The first corrected variable value is obtained by correcting the value of the first predictor variable based on the target variable sequence, denoted as S″={S′}. T+1 ,S′ T+2 ,…,S′ T+L Then the first corrected sequence can be denoted as S″′={S0,S1,…,S T ,S′ T+1 ,S′ T+2 ,…,S′ T+L}. Here, it can be understood that the first predictor variable value is the value of the target variable in a future period. Since the target variable has multiple values ​​in the future period, that is, the target variable has multiple first predictor variable values. Therefore, for ease of description, in this paper, the first predictor variable value is also denoted as a sequence, such as here denoted as S′={S T+1 ,S T+2 ,…,S T+L}, where any variable in the sequence is the value of the first predictor variable, such as S. T+LLet S' represent the (T+L)th value of the first predictor variable; the values ​​of the second predictor variables are denoteed similarly to those of the first. Since the first adjusted variable value is obtained by adjusting the first predictor variable, it is also represented as a sequence in this paper, such as S″={S′}. T+1 ,S′ T+2 ,…,S′ T+L}, where any variable in the sequence is the value of the first modified variable, such as S′ T+L This represents the (T+L)th value of the first modified variable; the second modified variable value is similar to the first modified variable value.

[0171] The second revised sequence consists of a historical covariate sequence and a second revised variable value. The second revised variable value is the variable obtained by the electronic device after correcting the second predictor variable value based on the historical covariate sequence. Generating the second revised sequence based on the historical covariate sequence and the second predictor variable value can be understood as follows: the electronic device corrects the second predictor variable value based on the historical covariate sequence to obtain the second revised variable value; then, the historical covariate sequence and the second revised variable value are combined to form the second revised sequence. In other words, the second revised sequence includes the historical covariate values ​​for the historical period and the corrected second predictor variable values.

[0172] Taking the case of two historical covariates, namely historical covariate 1 and historical covariate 2, the historical covariate sequence 1 of historical covariate 1 is as follows: The historical covariate sequence 2 of historical covariate 2 is Among them, the value of the second predictor variable 1 in the historical covariate sequence 1 is The second predicted variable value 1 is obtained by correcting the value of the second predicted variable 1 based on the historical covariate sequence 1, and is denoted as . Then the second corrected sequence 1 can be denoted as The value of the second predictor variable in the historical covariate sequence 2 is 2. The second revised variable value 2 is obtained by correcting the second predictor variable value 2 based on the historical covariate sequence 2, and is denoted as . Then the second corrected sequence 2 can be denoted as

[0173] In this embodiment, the specific process of generating the correction sequence based on the variable sequence and the predicted variable values ​​can be found below. Figure 3 The description in the text will not be repeated here.

[0174] In step S14 above, after the electronic device obtains the first correction sequence and the second correction sequence, it can predict the variable values ​​of the target variable at multiple future times based on the first correction sequence, the second correction sequence, and the future covariate sequence, and obtain the variable values ​​of the target variable in the future time period.

[0175] In some embodiments, the electronic device can concatenate the first corrected sequence, the second corrected sequence, and the denoised future covariate sequence along the variable dimension to obtain target data. Then, the electronic device can decompose the obtained target data to obtain denoised target data and noise components. Subsequently, the denoised target data is processed sequentially by a representation mapping subnetwork, a time-dimensional data interaction subnetwork, a variable-dimensional data interaction subnetwork, and an output mapping subnetwork to obtain an initial prediction result. The initial prediction result is then superimposed with the noise components to obtain the variable values ​​of the target variable at multiple future times (i.e., the variable values ​​of the target variable in future time periods). Specifically, the input to the representation mapping subnetwork is the denoised target data, the input to the time-dimensional data interaction subnetwork is the output of the representation mapping subnetwork, the input to the variable-dimensional data interaction subnetwork is the output of the time-dimensional data interaction subnetwork, and the input to the output mapping subnetwork is the output of the variable-dimensional data interaction subnetwork. See the following for details. Figure 5 The description in the text will not be repeated here.

[0176] Alternatively, in other embodiments, the electronic device may denoise the first modified sequence, the second modified sequence, and the future covariate sequence respectively to obtain the denoised first modified sequence, the denoised second modified sequence, and the denoised future covariate sequence. Then, based on the denoised first modified sequence, the denoised second modified sequence, and the denoised future covariate sequence, the variable values ​​of the target variable at multiple future times are predicted to obtain the variable values ​​of the target variable at multiple future times.

[0177] See Figure 2 , Figure 2 Provided for the embodiments of this application Figure 1 A detailed schematic diagram of step S12 may include the following steps:

[0178] Step S21: Extract the first feature of the target variable sequence, the second feature of the historical covariate sequence, the third feature of the future covariate sequence, and the first cross feature between the target variable sequence and the historical covariate sequence, the second cross feature between the target variable sequence and the future covariate sequence, and the third cross feature between the historical covariate sequence and the future covariate sequence;

[0179] Step S22: Based on the first feature, the first cross feature, and the second cross feature, predict the variable values ​​of the target variable at multiple future times, and use them as the first predicted variable values;

[0180] Step S23: For each historical covariate, based on the second feature involved in the historical covariate, the first cross feature involved in the historical covariate, and the third cross feature involved in the historical covariate, predict the variable values ​​of the historical covariate at multiple future times, and use them as the second predicted variable values.

[0181] The technical solution provided in this application extracts a first feature of the target variable sequence, a second feature of the historical covariate sequence, a third feature of the future covariate sequence, and a first cross feature between the target variable sequence and the historical covariate sequence, a second cross feature between the target variable sequence and the future covariate sequence, and a third cross feature between the historical covariate sequence and the future covariate sequence. Then, based on the first feature, the first cross feature, and the second cross feature, the variable values ​​of the target variable at multiple future times, i.e., the first predicted variable values, can be obtained; based on the second feature, the first cross feature, and the third cross feature, the variable values ​​of the historical covariates at multiple future times, i.e., the second predicted variable values, can be obtained.

[0182] Understandably, the above Figure 2 This is merely one possible example for determining the value of the predicted variable. In practical applications, the execution order of steps S22 and S23 is not limited. That is, in practical applications, the electronic device may execute step S22 first and then step S23; or, the electronic device may execute step S23 first and then step S22; or, the electronic device may execute steps S22 and S23 simultaneously.

[0183] In step S21 above, for the target variable sequence and the historical covariate sequence, the electronic device can extract the features of the target variable sequence as the first feature, extract the features of the historical covariate sequence as the second feature, extract the features of the future covariate sequence as the third feature, and extract the features between the target variable sequence and the historical covariate sequence as the first cross feature, extract the features between the target variable sequence and the future covariate sequence as the second cross feature, and extract the features between the historical covariate sequence and the future covariate sequence as the third cross feature.

[0184] For example, given a target variable sequence 1, historical covariate sequence 2, historical covariate sequence 3, and future covariate sequence 4, the electronic device can extract feature 1 of the target variable sequence 1, feature 2 of the historical covariate sequence 2, feature 3 of the historical covariate sequence 3, feature 4 of the future covariate sequence 4, and the cross features 5, 6, 7, 8, and 9 between the target variable sequence 1 and the historical covariate sequence 2, and between the historical covariate sequence 3 and the future covariate sequence 4. Thus, feature 1 is the first feature; features 2 and 3 are features of the historical covariate sequences, i.e., the second feature; feature 4 is the third feature; cross features 5 and 6 are both first cross features; cross feature 7 is the second cross feature; and cross features 8 and 9 are both third cross features.

[0185] In step S22 above, the first predicted variable value is the value of the target variable predicted by the electronic device based on the first feature, the first cross feature, and the second cross feature at multiple future times. Specifically, continuing with the example shown in step S21 above, the first predicted variable value is the value of the target variable sequence 1 predicted by the electronic device based on feature 1, cross feature 5, cross feature 6, and cross feature 7 at multiple future times.

[0186] Taking L as an example, the predicted values ​​of the first predictor variable can be denoted as S. pred′ , Among them, S pred′ Indicates the value of the first predictor variable; This represents the value of the Lth first predictor variable.

[0187] In step S23 above, the variable values ​​of each historical covariate at multiple future times are predicted to obtain the second predicted variable values ​​of each historical covariate. Specifically, taking a historical covariate as an example, the variable values ​​of the historical covariate at multiple future times can be predicted based on the second feature involved in the historical covariate, the first cross feature involved in the historical covariate, and the third cross feature involved in the historical covariate; that is, the second predicted variable values ​​of the historical covariate. In other words, for each historical covariate, the second predicted variable value of the historical covariate itself is predicted based on the second feature involved in the historical covariate itself, the first cross feature involved in the historical covariate itself, and the third cross feature involved in the historical covariate itself. The second feature involved in the historical covariate is the feature of the historical covariate's own historical covariate sequence; the first cross feature involved in the historical covariate is the cross feature between the historical covariate's own historical covariate sequence and the target variable sequence; the third cross feature involved in the historical covariate is the cross feature between the historical covariate's own historical covariate sequence and each future covariate.

[0188] For example, continuing with the above Figure 2 Taking the example shown, it is necessary to predict the second predictor value of historical covariate 2 to which historical covariate sequence 2 belongs, and the second predictor value of historical covariate 3 to which historical covariate sequence 3 belongs. Specifically, for historical covariate 2, the second feature involved in historical covariate 2 is the feature of historical covariate sequence 2 (i.e., feature 2), the first cross feature involved in historical covariate 2 is the feature between historical covariate sequence 2 and target variable sequence 1 (i.e., cross feature 5), and the third cross feature involved in historical covariate 2 is the feature between historical covariate sequence 2 and future covariate sequence 4 (i.e., cross feature 8). Then, the second predictor value of historical covariate 2 is predicted based on feature 2, cross feature 5, and cross feature 8. For historical covariate 3, the second feature involved in historical covariate 3 is the feature of historical covariate sequence 3 (i.e., feature 3), the first cross feature involved in historical covariate 3 is the feature between historical covariate sequence 3 and target variable sequence 1 (i.e., cross feature 6), and the third cross feature involved in historical covariate 3 is the feature between historical covariate sequence 3 and future covariate sequence 4 (i.e., cross feature 9). Then, based on feature 3, cross feature 6, and cross feature 9, the second predictor variable value of historical covariate 3 is predicted.

[0189] Taking L as the number of values ​​for the second predictor variable and n as the number of historical covariates, the second predictor variable can be denoted as: in, This represents the value of the second predictor variable in the i-th historical covariate sequence. Let H represent the value of the Lth second predictor variable for the i-th historical covariate. The value of the second predictor variable for a single historical covariate can also be denoted as H. pred′ , in, This represents the value of the nth second predictor variable in the historical covariate sequence.

[0190] See Figure 3 , Figure 3 Provided for the embodiments of this application Figure 1 A detailed schematic diagram of step S13 may include the following steps:

[0191] Step S31: Combine the target variable sequence and the first predictor variable value to obtain the first predictor sequence; and combine the historical covariate sequence and the second predictor variable value to obtain the second predictor sequence;

[0192] Step S32: Based on the target variable sequence in the first prediction sequence, correct the value of the first predictor variable in the first prediction sequence to obtain the first corrected sequence; based on the historical covariate sequence in the second prediction sequence, correct the value of the second predictor variable in the second prediction sequence to obtain the second corrected sequence.

[0193] In the technical solution provided in this application, a first prediction sequence is obtained by combining the target variable sequence and the first predicted variable value, and a second prediction sequence is obtained by combining the historical covariate sequence and the second predicted variable value. Then, the first predicted variable value in the first prediction sequence is adjusted according to the target variable sequence in the first prediction sequence to obtain a first corrected sequence; and the second predicted variable value in the second prediction sequence is adjusted according to the historical covariate sequence in the second prediction sequence to obtain a second corrected sequence. Therefore, compared to the first and second prediction sequences, the first and second corrected sequences are more accurate, and thus, the target variable values ​​predicted based on the first and second corrected sequences at multiple future times are more accurate.

[0194] It is understandable that the values ​​of the target variable and the historical covariates are regular and periodic. Therefore, the first modified variable value obtained by correcting the first predictor variable value using the target variable sequence is closer to the true variable value of the target variable sequence at multiple future times than the first predictor variable value. Similarly, the second modified variable value obtained by correcting the second predictor variable value using the historical covariate sequence is closer to the true variable value of the historical covariate sequence at multiple future times than the second predictor variable value. In other words, the accuracy of the modified variable value is higher than that of the predictor variable value. Therefore, the accuracy of the first modified sequence and the second modified sequence is higher than that of the first and second predictor sequences.

[0195] In step S31 above, the first prediction sequence is the sequence obtained by the electronic device combining the target variable sequence and the first prediction variable value; the second prediction sequence is the sequence obtained by the electronic device combining the historical covariate sequence and the second prediction variable value.

[0196] In some embodiments, the combination of the prediction sequence and the variable sequence can be specifically as follows: the first prediction variable value is appended to the target variable sequence, and the appended sequence is used as the first prediction sequence; and the second prediction variable value is appended to the historical covariate sequence, and the appended sequence is used as the second prediction sequence.

[0197] Alternatively, in other embodiments, the combination of the prediction sequence and the variable sequence can be achieved by: concatenating the first prediction variable value to the target variable sequence, and using the concatenated sequence as the first prediction sequence; and concatenating the second prediction variable value to the historical covariate sequence to obtain the second prediction sequence. In this way, the first prediction sequence, the second prediction sequence, and the future covariate sequence all have the same temporal sequence, consisting of multiple historical variable values ​​followed by multiple future variable values, making it easier to predict the target variable's value at multiple future times.

[0198] Below, with Figure 4 For example, the process of determining the first prediction sequence is illustrated.

[0199] like Figure 4 As shown, feature 41 (i.e., the first feature, the first cross feature, and the third cross feature) is input into the selected time series prediction method 42 to obtain the first predicted variable value 43 output by the time series prediction method 42. Then, the target variable sequence 44 is combined with the first predicted variable value 43 to obtain the first predicted sequence 45. Figure 4 The output 46 shown can also be understood as the first predicted sequence 45 obtained by combination.

[0200] Understandable, and can also be understood through the above. Figure 4 The process shown determines the second prediction sequence by simply replacing the target variable sequence with the historical covariate sequence, and replacing the first feature, first cross feature, and third cross feature with the second feature, first cross feature, and third cross feature involved in the historical covariate sequence. Additionally, Figure 4 This is merely one possible process for determining the prediction sequence and is not intended to be limiting. For example, in some embodiments, if the selected time series prediction method can directly use the sequence as input, the target variable sequence, historical covariate sequence, and future covariate sequence can be directly input into the selected time series prediction method to obtain the first prediction variable value output by the time series prediction method. Then, the target variable sequence and the first prediction variable value are combined to obtain the first prediction sequence.

[0201] In step S32 above, the electronic device can correct the value of the first predicted variable in the first prediction sequence based on the target variable sequence in the first prediction sequence to obtain a first corrected sequence. For example, the electronic device can extract the data distribution characteristics of the target variable sequence in the first prediction sequence as the first data distribution characteristics, and then correct the value of the first predicted variable in the first prediction sequence based on the first data distribution characteristics to obtain the first corrected sequence.

[0202] Simultaneously, the electronic device can correct the values ​​of the second predictor variables in the second prediction sequence based on the historical covariate sequences in the second prediction sequence, thus obtaining a second corrected sequence. Specifically, the electronic device can extract the data distribution characteristics of the historical covariate sequences in the second prediction sequence as second data distribution characteristics, and then correct the values ​​of the second predictor variables in the second prediction sequence based on the second data distribution characteristics, thereby obtaining a second corrected sequence.

[0203] For example, the process of correcting the value of the first predictor variable based on the target variable sequence to obtain the first corrected variable value, and the process of correcting the value of the second predictor variable based on the historical covariate sequence to obtain the second corrected variable value, can be expressed in the form of the following formulas (1)-(2).

[0204] N(μ,ε)=EncDec(Reparam(x_seq)) (1)

[0205] Wherein, EncDec is the decoding network and Reparam is the reparameterization network; when x_seq is the target variable sequence, N(μ,ε) is the first data distribution feature; when x_seq is the historical covariate sequence, N(μ,ε) is the second data distribution feature.

[0206] pred′ R =Dec(N(μ,ε),pred′) (2)

[0207] Where N(μ,ε) is the first data distribution feature and pred′ is the value of the first predictor variable, pred′ R The first correction variable value; when N(μ,ε) is the second data distribution characteristic and pred′ is the second predictor variable value, pred′ R This is the value of the second correction variable.

[0208] See Figure 5 , Figure 5 Provided for the embodiments of this application Figure 1 A detailed schematic diagram of step S14 may include the following steps:

[0209] Step S51: Decompose the target data to obtain the denoised target data and noise components;

[0210] The target data is the data obtained by concatenating the first modified sequence, the second modified sequence, and the future covariate sequence.

[0211] Step S52: Based on the denoised target data, predict the variable values ​​of the target variable at multiple future times to obtain the initial prediction results;

[0212] Step S53: Superimpose the initial prediction results and the noise components to obtain the variable values ​​of the target variable at multiple future times.

[0213] In the technical solution provided in this application embodiment, the target data is decomposed to obtain denoised target data and noise components. Then, based on the denoised target data, the variable values ​​of the target variable at multiple future times are predicted to obtain an initial prediction result. This reduces the impact of noise on the prediction result and improves the accuracy of the prediction result. Furthermore, the initial prediction result is superimposed with the noise components, and the superimposed result is used as the variable value of the target variable at multiple future times. This avoids the loss of information reflecting the data fluctuation characteristics in the target data. It is understood that deep learning models have difficulty learning information that reflects the data fluctuation characteristics. Therefore, the target data is decomposed into denoised target data and noise components, allowing the deep learning model to learn only the denoised target data with regular data changes. Then, the noise components that reflect the data fluctuation are superimposed onto the learned denoised target data (i.e., the initial prediction result).

[0214] In step S51 above, the target data is the data obtained by concatenating the first corrected sequence, the second corrected sequence, and the future covariate sequence. The electronic device can decompose the target data to obtain the denoised target data and noise components. For example, it can be represented as Main_Data, Error_Data = Decompose(sample), where Decompose() represents the sequence decomposition network, Main_Data represents the denoised target data, and Error_Data represents the noise component.

[0215] In some embodiments, after obtaining the first prediction sequence and the second prediction sequence, the electronic device can first concatenate the first prediction sequence, the second prediction sequence, and the future covariate sequence to obtain initial data. Then, the first prediction variable value in the initial data is corrected according to the target variable sequence, and the second prediction variable value in the initial data is corrected according to the historical covariate sequence. The corrected initial data is recorded as the target data.

[0216] The target data can be represented as a (T+L)×(1+n+N) dimensional variable matrix, where T represents the number of variable values ​​at multiple historical moments of any of the first, second, or future covariate sequences, and L represents the number of variable values ​​at multiple future moments of any of the first, second, or future covariate sequences. It can be understood that the number of variable values ​​at multiple historical moments of the first, second, and future covariate sequences is the same, and the number of variable values ​​at multiple future moments is also the same; n represents the number of historical covariate sequences obtained, and N represents the number of future covariate sequences obtained.

[0217] Understandably, the initial data can also be represented as a (T+L)×(1+n+N) dimensional variable matrix, where T represents the number of variable values ​​at multiple historical moments in any of the first prediction sequence, the second prediction sequence, or the future covariate sequence; L represents the number of variable values ​​at multiple future moments in any of the first prediction sequence, the second prediction sequence, or the future covariate sequence; n represents the number of historical covariate sequences obtained; and N represents the number of future covariate sequences obtained. Understandably, the first corrected sequence is obtained by correcting the first predictor variable values ​​in the first prediction sequence. During the correction process, only the first predictor variable values ​​are corrected; the number of first predictor variable values ​​remains unchanged. Therefore, the number of variable values ​​at multiple historical moments is consistent between the first prediction sequence and the first corrected sequence, and the number of variable values ​​at multiple future moments is also consistent. Similarly, the second corrected sequence is obtained by correcting the second predictor variable values ​​in the second prediction sequence. Therefore, the number of variable values ​​at multiple historical moments is consistent between the second prediction sequence and the second corrected sequence, and the number of variable values ​​at multiple future moments is also consistent.

[0218] Regarding the process of decomposing target data to obtain denoised target data and noise components, in some embodiments, the electronic device can project the target data into the frequency domain to obtain a first spectrum; then, determine the spectral components with energy values ​​lower than a preset energy threshold in the first spectrum, and filter out the determined spectral components in the first spectrum to obtain a second spectrum; then, project the second spectrum into the time domain to obtain the denoised target data. Furthermore, the difference between the target data and the denoised target data is calculated to obtain the noise component.

[0219] In this embodiment, the electronic device can project a sequence in the time domain into the frequency domain using transformations such as Fourier transform and Laplace transform to acquire the first spectral data. Simultaneously, it can project a second spectrum into the time domain using a corresponding inverse transform to acquire the denoised target data and the noise components.

[0220] Below, we will use a specific example to illustrate the process of obtaining the denoised target component and the noise component.

[0221] For example, electronic devices project target data from the time domain into the frequency domain using Fourier transform to obtain the first spectrum. See formula (3) below for details.

[0222]

[0223] Where X(k) represents the k-th value in the first spectrum, n represents the n-th variable value in the time series; N represents the number of variable values ​​in the target data. If the number of variable values ​​at multiple historical times is T and the number of variable values ​​at multiple future times is L, then N = T + L.

[0224] The electronic device can determine the energy value of each spectral component in the first spectrum (i.e., the energy spectrum data of the first spectrum) using the following formula (4).

[0225]

[0226] Where P(k) represents the energy value of the kth spectral component in the first spectrum.

[0227] The electronic device can filter out the spectral components in the first spectrum whose energy values ​​are lower than a preset energy threshold using the following formula (5) to obtain the second spectrum;

[0228] F filtered =F⊙(P>θ) (5)

[0229] Where F represents the first spectrum, θ represents the preset energy threshold, and p can be understood as the energy value of each spectral component in the first spectrum calculated in the above formula (4). filtered This represents the second spectrum. The preset energy threshold can be a threshold learned adaptively by setting the model.

[0230] Since electronic devices project a sequence from the time domain to the frequency domain using Fourier transform, it is necessary to project the second spectrum from the frequency domain to the time domain using the inverse Fourier transform. See formula (6) below for details.

[0231]

[0232] Where x′ represents the target data after noise reduction. This represents the inverse Fourier transform.

[0233] Alternatively, in other embodiments, after projecting the target data into the frequency domain to obtain a first spectrum, the electronic device determines the energy value of each spectral component in the first spectrum, and projects the spectral components with energy values ​​lower than a preset energy threshold into the time domain to obtain noise components; and projects the spectral components with energy values ​​not lower than the preset energy threshold into the time domain to obtain denoised target data. In this way, the target data is decomposed to obtain denoised target data and noise components.

[0234] In step S52 above, the electronic device can predict the variable values ​​of the target variable at multiple future times based on the noise-reduced target data to obtain the initial prediction result.

[0235] In some embodiments, the electronic device can process the denoised target data sequentially through a representation mapping subnetwork, a time-dimensional data interaction subnetwork, a variable-dimensional data interaction subnetwork, and an output mapping subnetwork to obtain an initial prediction result.

[0236] Specifically, in programming languages, the process of processing the concatenated sequence using the representation mapping subnetwork, the time dimension data interaction subnetwork, the variable dimension data interaction subnetwork, and the output mapping subnetwork in sequence can be represented in the following forms (7)-(10).

[0237] Main_Data_Emb=Embed(Main_Data) (7)

[0238] Main_Data_Tim=TimeEncoder(Main_Data_Emb) (8)

[0239] Main_Data_Var=VariateEncoder(Main_Data_Tim) (9)

[0240] Output=Projection(Main_Data_Var) (10)

[0241] Here, Main_Data represents the denoised target data; Embed() represents the representation mapping sub-network, and Main_Data_Emb represents the output of the mapping sub-network; TimeEncoder() represents the time dimension data interaction sub-network, and Main_Data_Tim represents the output of the time dimension data interaction sub-network; VariteEncoder() represents the variable dimension data interaction sub-network, and Main_Data_Var represents the output of the variable dimension data interaction sub-network; Projection() represents the output mapping sub-network, and Output represents the output of the output mapping sub-network, which is the initial prediction result.

[0242] Both the representation mapping subnetwork and the output mapping subnetwork can use multilayer perceptron (MLP) networks.

[0243] In step S53 above, after the electronic device determines the initial prediction result, it superimposes the initial prediction result with the noise component to obtain the variable values ​​of the target variable at multiple future times. For example, continuing with the examples shown in steps S51 and S52 above, the variable values ​​of the target variable at multiple future times can be expressed as Output′=Output+Error_Data, where Output′ represents the output, that is, the variable values ​​of the target variable at multiple future times; Output represents the initial prediction result; and Error_Data represents the noise component.

[0244] Based on the above Figures 1-5 The deep temporal prediction method shown in this application also provides a flowchart of the temporal prediction method, as illustrated in the embodiments of this application. Figure 6 As shown, the following steps may be included:

[0245] Step S61: Obtain multivariate sequence data.

[0246] The multivariate sequence data includes the target variable sequence, the future covariate sequence of at least one future covariate of the target variable, and the historical covariate sequence of at least one historical covariate of the target variable. See step S11 above for details.

[0247] Step S62: Feature extraction and sample construction;

[0248] Feature extraction can be understood as extracting the first feature, the second feature, and the cross feature; sample construction can be understood as predicting the first and second predictor variable values ​​based on the extracted features; see the description in step S21 above for details.

[0249] Step S63: Align future time data;

[0250] In this context, future time data alignment can be understood as combining the target variable sequence and the first predictor variable value to obtain a first predictor sequence, and combining the historical covariate sequence and the second predictor variable value to obtain a second predictor sequence, so that the sequence lengths of the first predictor sequence, the second predictor sequence, and the future covariate sequence are consistent. See the description in step S31 above for details.

[0251] Step S64, error correction; see the description in step S32 above for details.

[0252] Step S65, sequence decomposition;

[0253] Here, sequence decomposition can be understood as decomposing the target data to obtain the denoised target data and noise components, as described in step S51 above.

[0254] Step S66, data representation learning and mapping; see the description in step S52 above for details.

[0255] Step S67: Deep model prediction results; that is, obtaining the predicted values ​​of the target variable at multiple future times.

[0256] The technical solution provided in this application has the following beneficial effects:

[0257] (a) The deep temporal prediction method provided in the embodiments of this application is universally effective in all temporal prediction scenarios;

[0258] (b) Compared with commonly used methods such as data truncation and random number padding, the sequence alignment method provided in this application provides multiple future time value variables for the target variable and historical covariates without losing variable data information or introducing data noise. This enables more effective prior information about the prediction task to be obtained when performing time series prediction tasks, thereby improving the final prediction accuracy.

[0259] (c) Based on the provided sequence alignment method, this application further proposes an error correction strategy to correct the values ​​of the first and second predicted variables, thereby reducing the impact of prediction errors on the subsequent learning data change patterns and mapping relationships.

[0260] In some embodiments, this application also constructs a target time series prediction model, see [link to relevant documentation]. Figure 7 , Figure 7 This is a schematic diagram of a target time series prediction model provided in an embodiment of this application. The target time series prediction model includes a first prediction network 71, an error correction network 72, and a second prediction network 73.

[0261] based on Figure 7The target time series prediction model shown above, step S12 can be understood as: inputting the variable values ​​of the target variable at multiple historical times into the first prediction network to obtain the first predicted variable value; and inputting the variable values ​​of the historical covariates at multiple historical times into the first prediction network to obtain the second predicted variable value; step S13 can be understood as: inputting the variable values ​​of the target variable at multiple historical times and the first predicted variable value into the error correction network to generate the first correction sequence; and inputting the variable values ​​of the historical covariates at multiple historical times and the second predicted variable value into the error correction network to generate the second correction sequence; step S14 can be understood as: inputting the first correction sequence, the second correction sequence, and the future covariate sequence into the second prediction network to obtain the variable values ​​of the target variable at multiple future times.

[0262] In some real-time examples, the error correction network includes a splicing subnetwork and a correction subnetwork. In this case, step S31 above can be understood as: inputting the target variable sequence and the first predicted variable value into the splicing subnetwork to obtain the first predicted sequence; and inputting the historical covariate sequence and the second predicted variable value into the splicing subnetwork to obtain the second predicted sequence. Step S32 above can be understood as: inputting the first predicted sequence into the correction subnetwork so that the correction subnetwork corrects the first predicted variable value according to the target variable sequence in the first predicted sequence to obtain the first corrected sequence; and inputting the second predicted sequence into the correction subnetwork so that the correction subnetwork corrects the second predicted variable value in the second predicted sequence according to the historical covariate sequence in the second predicted sequence to obtain the second corrected sequence.

[0263] Combination Figure 7 The target time series prediction model shown is described in [reference]. Figure 8 , Figure 8 This is another flowchart illustrating the depth temporal prediction method provided in an embodiment of this application. Figure 8 As shown, the electronic device acquires the target variable sequence, historical covariate sequence, and future covariate sequence as input. The first prediction network predicts the variable values ​​of the target variable sequence and historical covariate sequence at multiple future times to obtain the first predicted variable value and the second predicted variable value (see steps S12 and S13 above for details). Figure 2 (As described in the text). Understandable. Figure 8 In the example shown, the input to the first prediction network is a sequence. Therefore, when the first prediction network predicts the values ​​of the first and second predictors, its input consists of the target variable sequence, the historical covariate sequence, and the future covariate sequence. Figure 8 Only the target variable sequence and historical covariate sequence are shown; the future covariate sequence is not shown.

[0264] Then, by splicing subnetworks, the target variable sequence and the first predictor variable value are combined, as well as the historical covariate sequence and the second predictor variable value, to obtain the first predictor sequence and the second predictor sequence. Figure 8 In the example shown, the splicing subnetwork can also splice the first prediction sequence, the second prediction sequence, and the future covariate sequence to obtain the initial data (e.g., the output of the splicing subnetwork can be represented as x) (see the description in step S51 above for details).

[0265] Then, the correction subnetwork corrects the first and second predictor variables, obtaining a first corrected sequence and a second corrected sequence (see the descriptions in steps S13 and S32 above). Specifically, this can be understood as the correction subnetwork correcting the values ​​of the first and second predictor variables in the initial data to obtain the target data (see the description in step S51 above). Afterwards, the target data is decomposed by a sequence decomposition network to obtain the denoised target data (e.g., the denoised target data can be denoted as x') and noise components (see the description in step S51 above). It can be understood that the noise components... Figure 8 The target data is not shown in the diagram. The second prediction network then processes the denoised target data to obtain an initial prediction result (see step S52 above for details). Next, the initial prediction result is superimposed with the noise component to obtain the target variable values ​​at multiple future times (see step S53 above for details).

[0266] The second prediction network includes a representation mapping subnetwork, a time-dimensional data interaction subnetwork, a variable-dimensional data interaction subnetwork, and an output mapping subnetwork. This is understandable. Figure 8 Only the characterization mapping subnetwork and the output mapping subnetwork are shown; the time dimension data interaction subnetwork and the variable dimension data interaction subnetwork are not shown.

[0267] See Figure 9 , Figure 9 A flowchart illustrating the training of a target time-series prediction model provided in this application embodiment may include the following steps:

[0268] Step S91: Obtain the sample variable sequence of the sample variables, the future covariate sequence of at least one future covariate of the sample variables, and the historical covariate sequence of at least one historical covariate of the sample variables;

[0269] The sample variable sequence consists of the variable values ​​of the sample variable at multiple historical moments, the future covariate sequence of the sample variable consists of the variable values ​​of the future covariate of the sample variable at multiple historical moments and multiple future moments, and the historical covariate sequence of the sample variable consists of the variable values ​​of the historical covariate of the sample variable at multiple historical moments. The principle is the same as step S11 above, except that the target variable is replaced with the sample variable.

[0270] Step S92: Input the obtained sample variable sequence, the historical covariate sequence of at least one historical covariate of the sample variable, and the future covariate sequence of at least one future covariate of the sample variable into the initial time series prediction model to obtain the variable values ​​of the sample variable predicted by the initial time series prediction model at multiple future times.

[0271] The method of determining the value of a sample variable at multiple future times based on the sample variable sequence, the historical covariate sequence of the sample variable, and the future covariate sequence of the sample variable is based on the same principle as the method of determining the value of a target variable at multiple future times based on the target variable sequence, the historical covariate sequence of the target variable, and the future covariate sequence of the target variable. The only difference is that the target variable is replaced with the sample variable.

[0272] Step S93: Based on the predicted values ​​of the sample variables at multiple future times and the obtained values ​​of the sample variables at multiple future times, adjust the model parameters of the initial time series model to obtain the target time series model.

[0273] The values ​​of the sample variables at multiple future moments can be understood as the measured values ​​of the sample variables in the real-world scenario.

[0274] Corresponding to the aforementioned depth temporal prediction method, this application also provides a depth temporal prediction apparatus, such as... Figure 10 As shown, the device includes:

[0275] Variable acquisition module 101: used to acquire a target variable sequence of a target variable, a future covariate sequence of at least one future covariate of the target variable, and a historical covariate sequence of at least one historical covariate of the target variable; wherein, the target variable sequence consists of the variable values ​​of the target variable at multiple historical moments, the future covariate sequence consists of the variable values ​​of the future covariate at multiple historical moments and multiple future moments, and the historical covariate sequence consists of the variable values ​​of the historical covariate at multiple historical moments;

[0276] The first variable prediction module 102 is used to predict the variable values ​​of the target variable at multiple future times as first predicted variable values; and to predict the variable values ​​of the historical covariate at multiple future times as second predicted variable values.

[0277] The variable correction module 103 is used to generate a first correction sequence based on the target variable sequence and the first predicted variable value, and to generate a second correction sequence based on the historical covariate sequence and the second predicted variable value; wherein, the first correction sequence consists of the target variable sequence and the first correction variable value, and the first correction variable value is obtained by correcting the first predicted variable value based on the target variable sequence; the second correction sequence consists of the historical covariate sequence and the second correction variable value, and the second correction variable value is obtained by correcting the second predicted variable value based on the historical covariate sequence;

[0278] The second variable prediction module 104 is used to predict the variable values ​​of the target variable at the plurality of future times based on the first correction sequence, the second correction sequence, and the future covariate sequence.

[0279] The technical solution provided in this application involves: obtaining a target variable sequence, a future covariate sequence of at least one future covariate of the target variable, and a historical covariate sequence of at least one historical covariate of the target variable; wherein the target variable sequence consists of the variable values ​​of the target variable at multiple historical times, the historical covariate sequence consists of the variable values ​​of the historical covariate at multiple historical times, and the future covariate sequence consists of the variable values ​​of the future covariate at multiple historical times and multiple future times. The variable values ​​of the target variable at multiple future times are predicted as first predicted variable values; and the variable values ​​of the historical covariate at multiple future times are predicted as second predicted variable values; thus, the target variable, historical covariate, and future covariate all simultaneously possess variable values ​​at multiple historical times and multiple future times, achieving consistent sequence lengths.

[0280] Subsequently, the first predicted variable value is corrected based on the target variable sequence to obtain the first corrected variable value. The target variable sequence and the first corrected variable value then form the first corrected sequence. Similarly, the second predicted variable value is corrected based on the historical covariate sequence to obtain the second corrected variable value. The historical covariate sequence and the second corrected variable value then form the second corrected sequence. In this way, while maintaining consistent sequence lengths, the accuracy of the predicted variable values ​​is further improved by correcting them; that is, the accuracy of the first and second corrected sequences is improved. Furthermore, predicting the target variable values ​​at multiple future times based on the first corrected sequence, the second corrected sequence, and the future covariate sequence can improve the accuracy of predicting the target variable values ​​at multiple future times, thus improving the accuracy of time series forecasting tasks.

[0281] In some embodiments, the variable correction module 103 includes,

[0282] The splicing submodule is used to combine the target variable sequence and the first predictor variable value to obtain a first predictor sequence; and to combine the historical covariate sequence and the second predictor variable value to obtain a second predictor sequence;

[0283] The variable correction submodule is used to correct the values ​​of the first predicted variables in the first prediction sequence according to the target variable sequence in the first prediction sequence to obtain a first corrected sequence; and to correct the values ​​of the second predicted variables in the second prediction sequence according to the historical covariate sequence in the second prediction sequence to obtain a second corrected sequence.

[0284] In some embodiments, the splicing submodule is specifically used for,

[0285] The first predictor variable value is concatenated to the target variable sequence to obtain the first predictor sequence; and the second predictor variable value is concatenated to the historical covariate sequence to obtain the second predictor sequence.

[0286] In some embodiments, the variable correction submodule is specifically used for:

[0287] Extract the data distribution features of the target variable sequence in the first prediction sequence as the first data distribution features;

[0288] Based on the first data distribution characteristics, the values ​​of the first predicted variables in the first predicted sequence are corrected to obtain the first corrected sequence;

[0289] Extract the data distribution features of the historical covariate sequences in the second prediction sequence as the second data distribution features;

[0290] Based on the second data distribution characteristics, the values ​​of the second predictor variables in the second prediction sequence are corrected to obtain the second corrected sequence.

[0291] In some embodiments, the first variable prediction module 102 is specifically used for:

[0292] Extract the first feature of the target variable sequence, the second feature of the historical covariate sequence, the third feature of the future covariate sequence, and the first cross feature between the target variable sequence and the historical covariate sequence, the second cross feature between the target variable sequence and the future covariate sequence, and the third cross feature between the historical covariate sequence and the future covariate sequence;

[0293] Based on the first feature, the first cross feature, and the second cross feature, the variable values ​​of the target variable at the multiple future times are predicted and used as the first predicted variable values;

[0294] For each historical covariate, based on the second feature involved in the historical covariate, the first cross feature involved in the historical covariate, and the third cross feature involved in the historical covariate, the variable values ​​of the historical covariate at the multiple future times are predicted and used as the second predicted variable values.

[0295] In some embodiments, the second variable prediction module 104 is specifically used for:

[0296] The target data is decomposed to obtain the denoised target data and noise components; wherein, the target data is the data obtained by concatenating the first corrected sequence, the second corrected sequence and the future covariate sequence;

[0297] Based on the denoised target data, the variable values ​​of the target variable at the multiple future times are predicted to obtain the initial prediction results;

[0298] The initial prediction result and the noise component are superimposed to obtain the variable values ​​of the target variable at the multiple future times.

[0299] In some embodiments, the step of decomposing the target data to obtain the denoised target data and noise components includes:

[0300] The target data is projected into the frequency domain to obtain the first spectrum of the target data;

[0301] In the first spectrum, identify spectral components with energy values ​​lower than a preset energy threshold;

[0302] The spectral components are filtered out from the first spectrum to obtain the second spectrum;

[0303] The second spectrum is projected into the time domain to obtain the denoised target data;

[0304] The noise component is obtained by subtracting the target data from the denoised target data.

[0305] In some embodiments, the target variable is the power generation of the wind power generation equipment, and the covariates include wind speed, wind direction, temperature, humidity, and pressure in the area where the wind power generation equipment is located; or,

[0306] The target variable is the power generation of the solar power equipment, and the covariates include the light intensity, temperature, humidity, pressure, cloud cover, solar angle, and theoretical value of solar irradiance in the area where the solar power equipment is located; or...

[0307] The target variable is the wind speed in the target area, and the covariates include the temperature, humidity, pressure, and precipitation in the target area.

[0308] In some embodiments, the target time series prediction model includes a first prediction network, an error correction network, and a second prediction network.

[0309] The prediction process obtains the values ​​of the target variable at multiple future times, as the first predicted variable value; and predicts the values ​​of the historical covariate at multiple future times, as the second predicted variable value, including:

[0310] The target variable's values ​​at multiple historical moments are input into the first prediction network to obtain a first predicted variable value; and the historical covariate's values ​​at multiple historical moments are input into the first prediction network to obtain a second predicted variable value.

[0311] The step of generating a first corrected sequence based on the target variable and the first predictor variable value, and generating a second corrected sequence based on the historical covariate sequence and the second predictor variable value, includes:

[0312] The target variable's values ​​at multiple historical moments and the first predicted variable's values ​​are input into the error correction network to generate a first correction sequence; and the historical covariates' values ​​at multiple historical moments and the second predicted variable's values ​​are input into the error correction network to generate a second correction sequence.

[0313] The step of predicting the value of the target variable at the plurality of future times based on the first corrected sequence, the second corrected sequence, and the future covariate sequence includes:

[0314] The first corrected sequence, the second corrected sequence, and the future covariate sequence are input into the second prediction network to obtain the variable values ​​of the target variable at the multiple future times.

[0315] In some embodiments, the error correction network includes a splicing subnetwork and a correction subnetwork.

[0316] The process of combining the target variable sequence and the first predictor variable value to obtain a first predictor sequence, and combining the historical covariate sequence and the second predictor variable value to obtain a second predictor sequence, includes:

[0317] The target variable sequence and the first predicted variable value are input into the splicing sub-network to obtain the first predicted sequence; and the historical covariate sequence and the second predicted variable value are input into the splicing sub-network to obtain the second predicted sequence.

[0318] The step of correcting the values ​​of the first predicted variables in the first predicted sequence based on the target variable sequence in the first predicted sequence to obtain a first corrected sequence, and correcting the values ​​of the second predicted variables in the second predicted sequence based on the historical covariate sequence in the second predicted sequence to obtain a second corrected sequence, includes:

[0319] The first prediction sequence is input into the correction sub-network so that the correction sub-network corrects the value of the first prediction variable according to the target variable sequence in the first prediction sequence to obtain a first correction sequence; the second prediction sequence is input into the correction sub-network so that the correction sub-network corrects the value of the second prediction variable in the second prediction sequence according to the historical covariate sequence in the second prediction sequence to obtain a second correction sequence.

[0320] In some embodiments, the target time-series prediction model is trained in the following manner:

[0321] Obtain a sequence of sample variables, a sequence of future covariates of at least one future covariate of the sample variables, and a sequence of historical covariates of at least one historical covariate of the sample variables; wherein, the sequence of sample variables consists of the variable values ​​of the sample variables at multiple historical times, the sequence of future covariates of the sample variables consists of the variable values ​​of the future covariates of the sample variables at multiple historical times and multiple future times, and the sequence of historical covariates of the sample variables consists of the variable values ​​of the historical covariates of the sample variables at multiple historical times;

[0322] The obtained sequence of sample variables, the historical covariate sequence of at least one historical covariate of the sample variables, and the future covariate sequence of at least one future covariate of the sample variables are input into the initial time series prediction model to obtain the variable values ​​of the sample variables predicted by the initial time series prediction model at the multiple future times.

[0323] Based on the predicted values ​​of the sample variables at multiple future times and the obtained values ​​of the sample variables at multiple future times, the model parameters of the initial time series model are adjusted to obtain the target time series model.

[0324] This application also provides an electronic device, such as... Figure 11 As shown, it includes:

[0325] Memory 111 is used to store computer programs;

[0326] When the processor 112 executes the program stored in the memory 111, it implements any of the deep time-series prediction methods described above.

[0327] Furthermore, the aforementioned electronic device may also include a communication bus and / or a communication interface, with the processor 112, communication interface, and memory 111 communicating with each other via the communication bus.

[0328] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.

[0329] The communication interface is used for communication between the aforementioned electronic devices and other devices.

[0330] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0331] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0332] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores a computer program that, when executed by a processor, implements the steps of any of the above-described deep time-series prediction methods.

[0333] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the deep time series prediction methods described above.

[0334] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a solid-state drive (SSD), etc.

[0335] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0336] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on its differences from other embodiments. In particular, the embodiments for apparatus, electronic devices, and storage media are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0337] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application are included within the scope of protection of this application.

Claims

1. A deep temporal series prediction method, characterized in that, The method includes: Obtain a target variable sequence, a future covariate sequence of at least one future covariate of the target variable, and a historical covariate sequence of at least one historical covariate of the target variable; wherein the target variable sequence consists of the variable values ​​of the target variable at multiple historical times, the future covariate sequence consists of the variable values ​​of the future covariate at multiple historical times and multiple future times, and the historical covariate sequence consists of the variable values ​​of the historical covariate at multiple historical times; The values ​​of the target variable at the multiple future times are predicted and used as the first predicted variable values; and the values ​​of the historical covariates at the multiple future times are predicted and used as the second predicted variable values. A first corrected sequence is generated based on the target variable sequence and the first predicted variable value, and a second corrected sequence is generated based on the historical covariate sequence and the second predicted variable value; wherein, the first corrected sequence consists of the target variable sequence and the first corrected variable value, the first corrected variable value being obtained by correcting the first predicted variable value based on the target variable sequence; the second corrected sequence consists of the historical covariate sequence and the second corrected variable value, the second corrected variable value being obtained by correcting the second predicted variable value based on the historical covariate sequence; Based on the first corrected sequence, the second corrected sequence, and the future covariate sequence, the variable values ​​of the target variable at the plurality of future times are predicted.

2. The method according to claim 1, characterized in that, The step of generating a first corrected sequence based on the target variable sequence and the first predictor variable value, and generating a second corrected sequence based on the historical covariate sequence and the second predictor variable value, includes: The target variable sequence and the first predictor variable value are combined to obtain a first predictor sequence; and the historical covariate sequence and the second predictor variable value are combined to obtain a second predictor sequence. Based on the target variable sequence in the first prediction sequence, the values ​​of the first predicted variables in the first prediction sequence are corrected to obtain a first corrected sequence; based on the historical covariate sequence in the second prediction sequence, the values ​​of the second predicted variables in the second prediction sequence are corrected to obtain a second corrected sequence.

3. The method according to claim 2, characterized in that, The process of combining the target variable sequence and the first predictor variable value to obtain a first predictor sequence, and combining the historical covariate sequence and the second predictor variable value to obtain a second predictor sequence, includes: The first predictor variable value is concatenated to the target variable sequence to obtain the first predictor sequence; and the second predictor variable value is concatenated to the historical covariate sequence to obtain the second predictor sequence.

4. The method according to claim 2, characterized in that, The step of correcting the values ​​of the first predicted variables in the first predicted sequence based on the target variable sequence in the first predicted sequence to obtain a first corrected sequence includes: Extract the data distribution features of the target variable sequence in the first prediction sequence as the first data distribution features; Based on the first data distribution characteristics, the values ​​of the first predicted variables in the first predicted sequence are corrected to obtain the first corrected sequence; The step of correcting the values ​​of the second predictor variables in the second predictor sequence based on the historical covariate sequence in the second predictor sequence to obtain the second corrected sequence includes: Extract the data distribution features of the historical covariate sequences in the second prediction sequence as the second data distribution features; Based on the second data distribution characteristics, the values ​​of the second predictor variables in the second prediction sequence are corrected to obtain the second corrected sequence.

5. The method according to claim 1, characterized in that, The prediction obtains the variable values ​​of the target variable at the multiple future times, which are used as the first predicted variable values; And predict the values ​​of the historical covariates at the multiple future times, as the second predicted variable values, including: Extract the first feature of the target variable sequence, the second feature of the historical covariate sequence, the third feature of the future covariate sequence, and the first cross feature between the target variable sequence and the historical covariate sequence, the second cross feature between the target variable sequence and the future covariate sequence, and the third cross feature between the historical covariate sequence and the future covariate sequence; Based on the first feature, the first cross feature, and the second cross feature, the variable values ​​of the target variable at the multiple future times are predicted and used as the first predicted variable values; For each historical covariate, based on the second feature involved in the historical covariate, the first cross feature involved in the historical covariate, and the third cross feature involved in the historical covariate, the variable values ​​of the historical covariate at the multiple future times are predicted and used as the second predicted variable values.

6. The method according to claim 1, characterized in that, The step of predicting the value of the target variable at the plurality of future times based on the first corrected sequence, the second corrected sequence, and the future covariate sequence includes: The target data is decomposed to obtain the denoised target data and noise components; wherein, the target data is the data obtained by concatenating the first corrected sequence, the second corrected sequence and the future covariate sequence; Based on the denoised target data, the variable values ​​of the target variable at the multiple future times are predicted to obtain the initial prediction results; The initial prediction result and the noise component are superimposed to obtain the variable values ​​of the target variable at the multiple future times.

7. The method according to claim 6, characterized in that, The step of decomposing the target data to obtain the denoised target data and noise components includes: The target data is projected into the frequency domain to obtain the first spectrum of the target data; In the first spectrum, identify spectral components with energy values ​​lower than a preset energy threshold; The spectral components are filtered out from the first spectrum to obtain the second spectrum; The second spectrum is projected into the time domain to obtain the denoised target data; The noise component is obtained by subtracting the target data from the denoised target data.

8. The method according to claim 1, characterized in that, The target variable is the power generation of the wind power equipment, and the covariates include wind speed, wind direction, temperature, humidity, and pressure in the area where the wind power equipment is located; or, The target variable is the power generation of the solar power equipment, and the covariates include the light intensity, temperature, humidity, pressure, cloud cover, solar angle, and theoretical value of solar irradiance in the area where the solar power equipment is located; or... The target variable is the wind speed in the target area, and the covariates include the temperature, humidity, pressure, and precipitation in the target area.

9. The method according to claim 1, characterized in that, The target time series prediction model includes a first prediction network, an error correction network, and a second prediction network. The prediction obtains the variable values ​​of the target variable at the multiple future times, which are used as the first predicted variable values; And predict the values ​​of the historical covariates at the multiple future times, as the second predicted variable values, including: The target variable's values ​​at multiple historical moments are input into the first prediction network to obtain a first predicted variable value; and the historical covariate's values ​​at multiple historical moments are input into the first prediction network to obtain a second predicted variable value. The step of generating a first corrected sequence based on the target variable and the first predictor variable value, and generating a second corrected sequence based on the historical covariate sequence and the second predictor variable value, includes: The target variable's values ​​at multiple historical moments and the first predicted variable's values ​​are input into the error correction network to generate a first correction sequence; and the historical covariate's values ​​at multiple historical moments and the second predicted variable's values ​​are input into the error correction network to generate a second correction sequence. The step of predicting the value of the target variable at the plurality of future times based on the first corrected sequence, the second corrected sequence, and the future covariate sequence includes: The first corrected sequence, the second corrected sequence, and the future covariate sequence are input into the second prediction network to obtain the variable values ​​of the target variable at the multiple future times.

10. The method according to claim 9, characterized in that, The error correction network includes a splicing subnetwork and a correction subnetwork. The process of combining the target variable sequence and the first predictor variable value to obtain a first predictor sequence, and combining the historical covariate sequence and the second predictor variable value to obtain a second predictor sequence, includes: The target variable sequence and the first predicted variable value are input into the splicing sub-network to obtain the first predicted sequence; and the historical covariate sequence and the second predicted variable value are input into the splicing sub-network to obtain the second predicted sequence. The step of correcting the values ​​of the first predicted variables in the first predicted sequence based on the target variable sequence in the first predicted sequence to obtain a first corrected sequence, and correcting the values ​​of the second predicted variables in the second predicted sequence based on the historical covariate sequence in the second predicted sequence to obtain a second corrected sequence, includes: The first prediction sequence is input into the correction sub-network so that the correction sub-network corrects the value of the first prediction variable according to the target variable sequence in the first prediction sequence to obtain a first correction sequence; the second prediction sequence is input into the correction sub-network so that the correction sub-network corrects the value of the second prediction variable in the second prediction sequence according to the historical covariate sequence in the second prediction sequence to obtain a second correction sequence.

11. The method according to claim 9, characterized in that, The target time series prediction model is trained in the following way: Obtain a sequence of sample variables, a sequence of future covariates of at least one future covariate of the sample variables, and a sequence of historical covariates of at least one historical covariate of the sample variables; wherein, the sequence of sample variables consists of the variable values ​​of the sample variables at multiple historical moments, the sequence of future covariates of the sample variables consists of the variable values ​​of the future covariates of the sample variables at multiple historical moments and multiple future moments, and the sequence of historical covariates of the sample variables consists of the variable values ​​of the historical covariates of the sample variables at multiple historical moments; at the multiple historical moments, the time of variable values ​​with the same order in the sequence of sample variables, the sequence of historical covariates of the sample variables, and the sequence of future covariates of the future covariates of the sample variables is the same; The obtained sequence of sample variables, the historical covariate sequence of at least one historical covariate of the sample variables, and the future covariate sequence of at least one future covariate of the sample variables are input into the initial time series prediction model to obtain the variable values ​​of the sample variables predicted by the initial time series prediction model at the multiple future times. Based on the predicted values ​​of the sample variables at multiple future times and the obtained values ​​of the sample variables at multiple future times, the model parameters of the initial time series model are adjusted to obtain the target time series model.

12. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the method described in any one of claims 1-11.