Time sequence prediction method and device, equipment and storage medium
By analyzing the time dislocation correlation between the target sequence and the feature sequence and performing data fusion, combined with multi-time granularity sequence list fusion, the problem of existing time-sequence prediction methods ignoring time dislocation and multi-grain size correlation is solved, which significantly improves the prediction accuracy.
Patent Information
- Application Number
- CN202311826093.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-27
- Publication Date
- 2025-06-27
AI Technical Summary
The existing time-sequence prediction methods ignore the time-dislocation correlation between feature sequences and target sequences, and do not consider the correlation between sequence data of target variables under different time granularity, resulting in loss of sequence mutual information and affecting the prediction accuracy.
By obtaining the time dislocation correlation between the target sequence and the feature sequence at different time dislocations, an initial solution of the target sequence is generated and spliced with the target sequence to obtain the trend sequence. At the same time, multi-time granularity sequences are constructed and characterized and fusion is performed to generate target sequence lists after fusion for timing prediction.
By analyzing the correlation of time dislocation and designing a fusion mechanism for sequence fusion of different time particles, the characterization information of sequence data can be extracted more accurately, and more time information and sequence change information of different time particles particles are aggregated, thereby improving the prediction effect of timing prediction.
Smart Images

Figure CN120217273A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular, to a time series prediction method, apparatus, device, and storage medium. Background Art
[0002] Time series prediction is to predict the change of the target variable in the future for a period of time based on historical data. It is widely used in production and life. Accurate prediction results can help make plans and arrangements in advance, save time, reduce costs, and avoid unnecessary losses.
[0003] Currently, the commonly used time series prediction method is to use the covariate data as the features of the target variable, align and splice them with the target sequence in the time dimension as the input to the model, ignoring the time misalignment correlation between the feature sequence and the target sequence. Moreover, most current solutions do not consider the correlation between the sequence data of the target variable at different time granularities, resulting in the loss of sequence mutual information and affecting the prediction accuracy. Summary of the Invention
[0004] The main purpose of this application is to provide a time series prediction method, apparatus, device, and storage medium, aiming to solve the technical problem that the existing time series prediction methods ignore the time misalignment correlation between the feature sequence and the target sequence, and most current solutions do not consider the correlation between the sequence data of the target variable at different time granularities, resulting in the loss of sequence mutual information and affecting the prediction accuracy.
[0005] To achieve the above object, this application provides a time series prediction method, and the time series prediction method includes:
[0006] Obtain the time misalignment correlation between the target sequence and the feature sequence under different time misalignment conditions. The target sequence is constructed based on the target variable, the feature sequence is constructed based on the covariates corresponding to the target variable, the target variable and the covariates are determined based on a variety of Internet of Things data with time information, the Internet of Things data is associated with time series prediction, and the time granularity of the feature sequence is the same as that of the target sequence;
[0007] Generate an initial solution of the target sequence through data fusion according to the time misalignment correlation and the feature sequence, and splice the initial solution with the target sequence to obtain a trend sequence, where the trend sequence is used to represent the change trend of the target sequence;
[0008] Construct a multi-time granularity sequence corresponding to the target variable, where the multi-time granularity sequence has a different time granularity from the target sequence;
[0009] Perform characterization fusion on the trend sequence and the multi-time granularity sequence to obtain a fused target sequence characterization;
[0010] Perform temporal prediction on the target sequence based on the fused target sequence representation to obtain the temporal prediction result of the target sequence.
[0011] Optionally, the generating the initial solution of the target sequence by data fusion according to the time misalignment correlation and the feature sequence includes:
[0012] Construct a data function and data coefficients at the time misalignment positions between the feature sequence and the target sequence according to the time misalignment correlation;
[0013] Obtain the mean and standard deviation of the target sequence, and calculate the perturbation coefficient of the target sequence according to the mean and standard deviation of the target sequence;
[0014] Calculate the initial solution of the target sequence according to the data function, the data coefficients, and the perturbation coefficient.
[0015] Optionally, before constructing the multi-time granularity sequence corresponding to the target variable, further includes:
[0016] Decompose the target sequence into a periodic term and a trend term, where the periodic term is used to represent the periodic change of the target sequence, and the trend term is used to represent the trend change of the target sequence;
[0017] Calculate the initial solution of the periodic term and calculate the initial solution of the trend term;
[0018] Generate the initial solution of the target sequence according to the initial solution of the periodic term and the initial solution of the trend term, and splice the initial solution with the target sequence to obtain a trend sequence, where the trend sequence is used to represent the change trend of the target sequence.
[0019] Optionally, the calculating the initial solution of the trend term includes:
[0020] Calculate the average difference between adjacent data in the trend term;
[0021] Calculate the initial solution of the trend term by incremental generation according to the average difference.
[0022] Optionally, the performing characterization fusion on the trend sequence and the multi-time granularity sequence to obtain the fused target sequence representation includes:
[0023] Perform network encoding on the trend sequence and the multi-time granularity sequence respectively to obtain the target sequence representation and the multi-time granularity sequence representation;
[0024] Calculate the similarity value between the target sequence representation and the multi-time granularity sequence representation;
[0025] Using the similarity value as a weight, weighted fusion of the multi-time granularity sequence representations is performed on the basis of the target sequence representation to obtain a fused target sequence representation.
[0026] Optionally, performing temporal prediction on the target sequence based on the fused target sequence representation to obtain a temporal prediction result of the target sequence includes:
[0027] The fused target sequence representation is sequentially decomposed through two sequence decomposition modules of a preset prediction model to obtain a periodic component and a trend component. During the sequence decomposition process, according to the change characteristics of the target sequence, one of the periodic component and the trend term component is used as the main sequence component, and the other is used as the auxiliary sequence component. The main sequence component output by the first sequence decomposition module is used as the input of the second sequence decomposition module for further decomposition;
[0028] The main sequence components output by the two sequence decomposition modules learn the cross-correlation through the autocorrelation module of the preset prediction model to obtain a target representation;
[0029] After the target representation is processed by the feed-forward network of the preset prediction model, it is added to the auxiliary sequence components output by the two sequence decomposition modules to obtain a temporal prediction result of the target sequence.
[0030] Optionally, obtaining the time misalignment correlation between the target sequence and the feature sequence under different time misalignment situations includes:
[0031] Moving the feature sequence by multiple time units;
[0032] Under different time misalignment situations, analyzing the time misalignment correlation of the time overlap segment sequence between the target sequence and the moved feature sequence.
[0033] In addition, to achieve the above object, the present application also proposes a temporal prediction device, and the temporal prediction device includes:
[0034] A correlation acquisition module, configured to acquire the time misalignment correlation between the target sequence and the feature sequence under different time misalignment situations, where the target sequence is constructed based on a target variable, the feature sequence is constructed based on a covariate corresponding to the target variable, the target variable and the covariate are determined based on multiple pieces of Internet of Things data with time information, the Internet of Things data is associated with temporal prediction, and the time granularity of the feature sequence is the same as that of the target sequence;
[0035] A data fusion module, configured to generate an initial solution of the target sequence through data fusion according to the time misalignment correlation and the feature sequence, and splice the initial solution with the target sequence to obtain a trend sequence, where the trend sequence is used to represent the change trend of the target sequence;
[0036] A sequence construction module, configured to construct a multi-time granularity sequence corresponding to the target variable, where the multi-time granularity sequence has a different time granularity from the target sequence;
[0037] A feature fusion module, configured to perform feature fusion on the trend sequence and the multi-time granularity sequence to obtain a fused target sequence feature;
[0038] A time series prediction module, configured to perform time series prediction on the target sequence based on the fused target sequence feature to obtain a time series prediction result of the target sequence.
[0039] In addition, to achieve the above object, the present application also provides a time series prediction device, where the time series prediction device includes a memory, a processor, and a time series prediction program stored on the memory and executable on the processor, and the time series prediction program is configured to implement the time series prediction method as described above.
[0040] In addition, to achieve the above object, the present application also provides a storage medium, where a time series prediction program is stored on the storage medium, and when the time series prediction program is executed by a processor, it implements the time series prediction method as described above.
[0041] In the present application, the time misalignment correlation between the target sequence and the feature sequence under different time misalignments is disclosed. The target sequence is constructed based on the target variable, the feature sequence is constructed based on the covariates corresponding to the target variable, the target variable and the covariates are determined based on various IoT data with time information, the IoT data is associated with time series prediction, the time granularity of the feature sequence is the same as that of the target sequence, an initial solution of the target sequence is generated through data fusion according to the time misalignment correlation and the feature sequence, and the initial solution is spliced with the target sequence to obtain a trend sequence, where the trend sequence is used to represent the change trend of the target sequence, a multi-time granularity sequence corresponding to the target variable is constructed, the multi-time granularity sequence has a different time granularity from the target sequence, feature fusion is performed on the trend sequence and the multi-time granularity sequence to obtain a fused target sequence feature, and time series prediction is performed on the target sequence based on the fused target sequence feature to obtain a time series prediction result of the target sequence; since the present application analyzes the time misalignment correlation between the target sequence and the feature sequence, more accurately extracts the representation information of the sequence data at the same time granularity, and by designing a feature fusion mechanism for different time granularity sequences, aggregates more time information and the change information of different time granularity sequences, which helps to improve the prediction effect of time series prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 It is a schematic structural diagram of a timing prediction device for a hardware operating environment involved in the solution of an embodiment of the present application;
[0043] Figure 2 It is a schematic flowchart of the first embodiment of the timing prediction method of the present application;
[0044] Figure 3 It is a schematic flowchart of the second embodiment of the timing prediction method of the present application;
[0045] Figure 4 It is a schematic flowchart of the third embodiment of the timing prediction method of the present application;
[0046] Figure 5 It is a schematic flowchart of the fourth embodiment of the timing prediction method of the present application;
[0047] Figure 6 It is a schematic diagram of advancing a feature sequence by 1 moment in an embodiment of the timing prediction method of the present application;
[0048] Figure 7 It is a schematic diagram of advancing a feature sequence by n moments in an embodiment of the timing prediction method of the present application;
[0049] Figure 8 It is a schematic diagram of delaying a feature sequence by 1 moment in an embodiment of the timing prediction method of the present application;
[0050] Figure 9 It is a schematic diagram of delaying a feature sequence by n moments in an embodiment of the timing prediction method of the present application;
[0051] Figure 10 It is a schematic structural diagram of a preset prediction model in an embodiment of the timing prediction method of the present application;
[0052] Figure 11 It is a structural block diagram of the first embodiment of the timing prediction device of the present application.
[0053] The realization, functional characteristics and advantages of the purpose of the present application will be further described with reference to the embodiments and the accompanying drawings. Detailed Embodiment
[0054] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0055] Refer to Figure 1 , Figure 1 It is a schematic structural diagram of a timing prediction device for a hardware operating environment involved in the solution of an embodiment of the present application.
[0056] As Figure 1As shown in the figure, the time series prediction device may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display). Optionally, the user interface 1003 may further include a standard wired interface and a wireless interface. For the wired interface of the user interface 1003, it may be a USB interface in this application. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a Wireless-Fidelity (Wi-Fi) interface). The memory 1005 may be a high-speed Random Access Memory (RAM), or a stable memory (Non-volatile Memory, NVM), such as a disk memory. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0057] Those skilled in the art can understand that Figure 1 the structure shown in does not constitute a limitation on the time series prediction device, and it may include more or fewer components than shown in the figure, or combine some components, or have different component arrangements.
[0058] As Figure 1 shown, the memory 1005, which is identified as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a time series prediction program.
[0059] In Figure 1 the time series prediction device shown, the network interface 1004 is mainly used to connect to the background server and communicate with the background server for data; the user interface 1003 is mainly used to connect to the user device; the time series prediction device calls the time series prediction program stored in the memory 1005 through the processor 1001 and executes the time series prediction method provided in the embodiments of this application.
[0060] Based on the above hardware structure, an embodiment of the time series prediction method of this application is proposed.
[0061] Referring to Figure 2 , Figure 2 which is a schematic flowchart of the first embodiment of the time series prediction method of this application, the first embodiment of the time series prediction method of this application is proposed.
[0062] It should be understood that time series forecasting is to predict the changes of target variables in the future based on historical data. It is widely used in production and life. Accurate forecast results can help make plans and arrangements in advance, save time, reduce costs, and avoid unnecessary losses. At present, deep learning algorithms are more robust and have higher prediction accuracy, so they are the most commonly used.
[0063] The key to improving the accuracy of time series prediction lies in exploring the characteristics of various data changes and the relationship between covariate data and target variables. The commonly used method is to use covariate data as the characteristics of the target variable, align and splice it with the target sequence in the time dimension as input to the model, ignoring the time misalignment correlation between the feature sequence and the target sequence, that is, the data at time tn or t+n in the feature sequence has a stronger correlation with the data at time t of the target sequence. For example, in the indoor temperature prediction task, the outdoor temperature and indoor humidity at the current time will affect the indoor temperature in the future; and most of the current solutions do not consider the correlation between the sequence data of the target variable at different time granularities. For example, in the indoor temperature prediction task, the target variable is to predict the indoor temperature every hour in the future. Most algorithms only construct indoor temperature sequences with hourly granularity, ignoring that finer and coarser granular indoor temperature sequences will have a strong correlation with it. Both of the above-mentioned points will cause the loss of sequence mutual information and affect the prediction accuracy. From the perspective of the model, the current mainstream time series representation learning structure based on deep learning includes encoder-decoder, sequence decomposition and other modules. The structure is complex and some modules have redundant functions, resulting in low execution efficiency. Moreover, the data types that a single model is applicable to are targeted and have poor generalization.
[0064] In terms of mining the correlation of data in the time dimension, related technologies all learn the correlation between data at different time observation points in the same sequence, and learn the correlation between the current observation point and one or more previous observation points in the multidimensional feature sequence related to the target sequence. Or position encode the data at different moments in the target sequence to learn similarity. The above related technologies only learn the time correlation from the perspective of feature sequence or target sequence, and do not associate the time correlation between feature sequence and target sequence.
[0065] From the perspective of learning the correlation between sequences of different time granularities, the related technology designs a pyramid attention model to construct a multi-time granularity target sequence correlation mechanism. Construct a multi-time granularity sequence for the target variable, fully connect the data at different times between sequences of different time granularities, and use the attention mechanism to learn the correlation between the data within and between layers in the constructed pyramid structure. This method has high computational complexity and a time complexity of O(n 2 ), which is not suitable for sequence data with longer length.
[0066] Therefore, in order to overcome the above defects, this embodiment discloses obtaining the time misalignment correlation between the target sequence and the feature sequence under different time misalignment conditions. The target sequence is constructed based on the target variable, the feature sequence is constructed based on the covariate corresponding to the target variable, the target variable and the covariate are determined based on various IoT data with time information, the IoT data is associated with time series prediction, the time granularity of the feature sequence is the same as that of the target sequence. An initial solution of the target sequence is generated through data fusion according to the time misalignment correlation and the feature sequence, and the initial solution is concatenated with the target sequence to obtain a trend sequence. The trend sequence is used to represent the change trend of the target sequence. A multi-time granularity sequence corresponding to the target variable is constructed, the time granularity of the multi-time granularity sequence is different from that of the target sequence, and the trend sequence and the multi-time granularity sequence are subjected to feature fusion to obtain the fused target sequence feature. Based on the fused target sequence feature, time series prediction is performed on the target sequence to obtain the time series prediction result of the target sequence. Since this embodiment analyzes the time misalignment correlation between the target sequence and the feature sequence, more accurately extracts the feature information of the sequence data at the same time granularity, and designs a feature fusion mechanism for different time granularity sequences to aggregate more time information and the change information of different time granularity sequences, which helps to improve the prediction effect of time series prediction.
[0067] In the first embodiment, the time series prediction method includes:
[0068] Step S10: Obtain the time misalignment correlation between the target sequence and the feature sequence under different time misalignment conditions. The target sequence is constructed based on the target variable, the feature sequence is constructed based on the covariate corresponding to the target variable, the target variable and the covariate are determined based on various IoT data with time information, the IoT data is associated with time series prediction, and the time granularity of the feature sequence is the same as that of the target sequence.
[0069] It can be understood that the execution subject of this embodiment can be a time series prediction device with data processing, network communication, and program running functions, such as a computer, etc., or other electronic devices that can achieve the same or similar functions. This embodiment does not limit this.
[0070] It should be noted that there is a causal relationship or a correlation between the target variable and the covariate. The target variable is the main variable for time series prediction, and the covariate is other variables related to the target variable, which can also be called independent variables or feature variables. This embodiment does not limit this. The covariate can provide additional information to explain and predict the changes of the target variable. Therefore, in this embodiment, in order to improve the reliability of the target sequence and the feature sequence, before the step S10, it further includes: obtaining a variety of IoT data with time information associated with time series prediction, determining the target variable and the covariate according to the IoT data, constructing a target sequence according to the target variable, and constructing a feature sequence according to the covariate, where the IoT data includes but is not limited to IoT data such as images, videos, audios, temperatures, humidities, and speeds.
[0071] In a specific implementation, in order to realize the intelligent control of IoT devices such as air conditioners and heaters to provide a more comfortable indoor environment, assuming that the time series prediction is an indoor temperature prediction task, then obtaining a variety of IoT data with time information associated with time series prediction can be obtaining the indoor temperature, outdoor temperature, and indoor humidity with the collection time. Determining the target variable and the covariate according to the IoT data can be determining the indoor temperature as the target variable and determining the outdoor temperature and indoor humidity as the covariates. This is because the outdoor temperature may have a direct impact on the indoor temperature, and the indoor humidity may affect the perception of the indoor temperature. Constructing a target sequence according to the target variable can be constructing an indoor temperature sequence with an hour as the time granularity as the target sequence, and constructing a feature sequence according to the covariates can be constructing a sequence including the outdoor temperature and indoor humidity as the feature sequence. The time granularity of the feature sequence is the same as that of the target sequence. Specifically, it can be constructing a target sequence S y and a feature sequence with the same time granularity as the target sequence where the target sequence S y and the feature sequence have the same length, both being L.
[0072] It can be understood that the step S10 can specifically be moving each feature sequence i = 1, … n forward or backward by n time units compared to the target sequence S y respectively, where n = 1, 2, …, l and l ≤ L / 2, calculating the correlation between each feature sequence and the target sequence in different time misalignment situations, and when the correlation value is the largest, taking the corresponding feature S f and the time misalignment correspondence t.
[0073] It should be understood that in this embodiment, through the time misalignment correlation between the target sequence and the feature sequence, the characterization information of the sequence data at the same time granularity can be extracted more accurately.
[0074] Step S20: Generate an initial solution of the target sequence through data fusion based on the time misalignment correlation and the feature sequence, and splice the initial solution with the target sequence to obtain a trend sequence, which is used to represent the change trend of the target sequence.
[0075] It should be understood that step S20 may specifically be based on the feature S that is most relevant to the target sequence obtained from the above steps f , and the time misalignment correspondence t. According to the most relevant feature S f and the target data S y at each historical moment, use the most relevant feature S f to generate an initial solution for the prediction result of the future moment of the target sequence, and splice it with the target sequence in the order of the corresponding moments of the data to obtain a trend sequence.
[0076] In this embodiment, data reflecting the change trend of the target sequence is generated through the feature sequence as the initial solution of the data to be predicted, increasing the length and information of the input sequence of the model. Compared with the method of only treating multi-dimensional data as the features of the target sequence, it can not only make the sequence data contain more dimensional data information, but also enable the model to learn the change characteristics of the sequence data, which helps to improve the prediction accuracy.
[0077] Step S30: Construct a multi-time granularity sequence corresponding to the target variable, where the multi-time granularity sequence has a different time granularity from the target sequence.
[0078] It can be understood that constructing a multi-time granularity sequence corresponding to the target variable may be to aggregate the target variable according to different time granularities to obtain a multi-time granularity sequence of the target variable. For example, the target sequence is statistically obtained with an hour as the granularity. On this basis, sequence data with corresponding time granularities is aggregated with a finer time granularity such as minutes or a coarser time granularity such as 4h, 6h, etc.
[0079] Step S40: Perform characterization fusion on the trend sequence and the multi-time granularity sequence to obtain a fused target sequence characterization.
[0080] It should be understood that performing characterization fusion on the trend sequence and the multi-time granularity sequence to obtain a fused target sequence characterization may specifically be to input the trend sequence and the multi-time granularity sequence into a prediction model, and respectively obtain E, E 1,i and E 2,j through encoder encoding, where E 1,i and E 2,j respectively represent the characterizations of the finer and coarser time granularity sequences. i and j respectively correspond to the i-th fine-grained sequence and the j-th coarse-grained sequence. Calculate E 1: and E 2:The correlation factor between the multi-time-granularity sequence weighted representation and the original target sequence representation E is used as the weight, and the weighted representation of the multi-time-granularity sequence is added to the original target sequence representation E to obtain the fused target sequence representation E. ′ 。
[0081] Step S50: Based on the fused target sequence representation, perform time series prediction on the target sequence to obtain the time series prediction result of the target sequence.
[0082] It can be understood that performing time series prediction on the target sequence based on the fused target sequence representation to obtain the time series prediction result of the target sequence can be to input the fused target sequence representation into a preset prediction model to perform time series prediction on the target sequence and obtain the time series prediction result of the target sequence. Among them, the preset prediction model can be set in advance, and the time series prediction result can be used for downstream tasks.
[0083] In this embodiment, the time misalignment correlation between the target sequence and the feature sequence under different time misalignments is disclosed. The target sequence is constructed based on the target variable, and the feature sequence is constructed based on the covariate corresponding to the target variable. The target variable and the covariate are determined based on a variety of IoT data with time information. The IoT data is associated with time series prediction. The time granularity of the feature sequence is the same as that of the target sequence. According to the time misalignment correlation and the feature sequence, an initial solution of the target sequence is generated through data fusion, and the initial solution is concatenated with the target sequence to obtain a trend sequence. The trend sequence is used to represent the change trend of the target sequence. A multi-time-granularity sequence corresponding to the target variable is constructed. The time granularity of the multi-time-granularity sequence is different from that of the target sequence. Perform representation fusion on the trend sequence and the multi-time-granularity sequence to obtain the fused target sequence representation, and perform time series prediction on the target sequence based on the fused target sequence representation to obtain the time series prediction result of the target sequence. Since this embodiment analyzes the time misalignment correlation between the target sequence and the feature sequence, more accurately extracts the representation information of the sequence data at the same time granularity, and by designing a representation fusion mechanism for different time granularity sequences, aggregates more time information and the change information of different time granularity sequences, which helps to improve the prediction effect of time series prediction.
[0084] Refer to Figure 3 , Figure 3 is the flowchart of the second embodiment of the time series prediction method of the present application. Based on the first embodiment shown above Figure 2 a second embodiment of the time series prediction method of the present application is proposed.
[0085] In the second embodiment, the step S20 includes:
[0086] Step S201: Construct a data function and a data coefficient at the time misalignment position between the feature sequence and the target sequence according to the time misalignment correlation.
[0087] It should be understood that, in order to achieve data fusion, make the sequence data contain more dimensional data information, and improve the prediction accuracy, in this embodiment, based on the time misalignment correlation between the feature sequence and the target sequence, the initial solution to be predicted for the target sequence is generated using the feature sequence.
[0088] Step S202: Obtain the mean and standard deviation of the target sequence, and calculate the perturbation coefficient of the target sequence according to the mean and standard deviation of the target sequence.
[0089] Step S203: Calculate the initial solution of the target sequence according to the data function, the data coefficient, and the perturbation coefficient.
[0090] For ease of understanding, the following is an example, but it does not limit the present application. In one example, it is assumed that there are M feature sequences in total, and each feature sequence is subjected to K times of time misalignment correlation judgment with the target sequence, including K1 times of pre - misalignment and K2 times of post - misalignment, where K1 + K2 = K. The length of the target sequence is L, and the length of the sequence to be generated is L1. Denote as the i - th data in the sequence to be generated, then:
[0091]
[0092] ε i = random(S ave - S std , S ave + S std ), i = 1, 2, …, L1
[0093] In the formula, and respectively represent the sequences after k1 moments of pre - misalignment and k2 moments of post - misalignment of the m - th feature sequence. f represents a function that generates the data at the corresponding position based on the time misalignment correlation between and and the target sequence S. and respectively represent the coefficients for generating data based on pre - misalignment and post - misalignment correlations, and satisfy: ε i is the perturbation coefficient, which is related to the mean S ave and the standard deviation S std of the target sequence S.
[0094] Step S204: Concatenate the initial solution with the target sequence to obtain a trend sequence, and the trend sequence is used to represent the change trend of the target sequence.
[0095] It should be understood that splicing the initial solution with the target sequence to obtain a trend sequence can be splicing the initial solution with the target sequence in the order of the corresponding moments of the data to obtain a trend sequence.
[0096] In this embodiment, based on the time misalignment correlation between the feature sequence and the target sequence, an initial solution to be predicted for the target sequence is generated using the feature sequence, thereby enabling data fusion, making the sequence data contain more dimensional data information, and improving the prediction accuracy.
[0097] Refer to Figure 4 , Figure 4 which is a schematic flowchart of the third embodiment of the time series prediction method of the present application. Based on the first embodiment shown above Figure 2 a third embodiment of the time series prediction method of the present application is proposed.
[0098] In the third embodiment, the time series prediction method further includes:
[0099] Step S10': Decompose the target sequence into a periodic term and a trend term. The periodic term is used to represent the periodic change of the target sequence, and the trend term is used to represent the trend change of the target sequence.
[0100] It should be understood that in order to explore the change characteristics of the target sequence and enhance the autocorrelation information, in this embodiment, an initial solution can also be generated based on the target sequence, that is, the target sequence is decomposed into a periodic term and a trend term, and the initial solution of the periodic term is calculated, and the initial solution of the trend term is calculated, and the initial solution of the target sequence is generated according to the initial solution of the periodic term and the initial solution of the trend term.
[0101] Step S20': Calculate the initial solution of the periodic term and calculate the initial solution of the trend term.
[0102] Further, in order to improve the accuracy of calculating the initial solution of the trend term, calculating the initial solution of the trend term includes: calculating the average difference between adjacent data in the trend term; generating the initial solution of the trend term by incremental calculation according to the average difference.
[0103] Step S30': Generate the initial solution of the target sequence according to the initial solution of the periodic term and the initial solution of the trend term, and splice the initial solution with the target sequence to obtain a trend sequence, where the trend sequence is used to represent the change trend of the target sequence.
[0104] For ease of understanding, the following is an example, but it does not limit the present application. In one example, an initial solution generation method is designed according to the change characteristics of different components of the target sequence. The specific steps are as follows:
[0105] Step1: Decompose the target sequence data into a trend term and a periodic term.
[0106] Step2: The length of the periodic term component sequence is L, the period is T1, and there are cycles in total. The data within each cycle is represented as: The mean and variance of the data at the same position in different cycles are represented as and δ j , respectively, where j = 1, 2, …, T1. The calculation formula for the mean is: where d ij represents the data at the j-th position in the i-th cycle of the sample sequence. At this time, the subsequence to be generated is: If multiple cycle subsequences need to be generated, the above formula can be repeatedly executed.
[0107] Step3: The length of the trend term component sequence is L, and the length of the sequence to be generated is L1. At this time, the following two methods for generating the initial solution are designed:
[0108] 1) Incremental generation: Calculate the average difference between adjacent data in the sequence: ave diff =(d L - d1) / (L - 1). The sequence to be generated is: {d L +n * ave diff , n = 1, 2, …, L1}. Where d1 represents the first data of the original sequence, and d L represents the last data of the original sequence.
[0109] 2) Random generation: Calculate the mean of all data in the original sequence: The sequence to be generated is: {d n =random(ave, d L ), n = 1, 2, …, L1}, that is, the data at each position in the sequence to be generated is randomly generated within the range of the mean and the last value of the original sequence.
[0110] Step4: Add the periodic term and the trend term component after the initial solution generation is completed, and then splice them with the original sequence data.
[0111] In this embodiment, an initial solution is generated based on the target sequence, that is, the target sequence is decomposed into a periodic term and a trend term, the initial solution of the periodic term is calculated, and the initial solution of the trend term is calculated. The initial solution of the target sequence is generated according to the initial solution of the periodic term and the initial solution of the trend term, so as to be able to mine the change characteristics of the target sequence, enhance the autocorrelation information, and improve the prediction accuracy.
[0112] Refer to Figure 5 , Figure 5It is a schematic flowchart of the fourth embodiment of the time series prediction method of the present application. Based on the above embodiments, the fourth embodiment of the time series prediction method of the present application is proposed.
[0113] In the fourth embodiment, step S10 includes:
[0114] Step S101: Move the feature sequence by a plurality of time units.
[0115] It should be understood that, in order to improve the accuracy of time misalignment correlation analysis, in this embodiment, the feature sequence is moved by a plurality of time units, and the time misalignment correlation of the time overlap segment sequence between the target sequence and the moved feature sequence is analyzed under different time misalignment conditions.
[0116] Step S102: Analyze the time misalignment correlation of the time overlap segment sequence between the target sequence and the moved feature sequence under different time misalignment conditions.
[0117] For ease of understanding, reference is made to Figure 6 、 Figure 7 、 Figure 8 and Figure 9 for illustration, but the present application is not limited thereto. Figure 6 It is a schematic diagram of advancing the feature sequence by 1 moment in an embodiment of the time series prediction method of the present application. Figure 6 In [diagram], the feature sequence is moved forward by 1 time unit, so that the data at the t + 1 moment of the target sequence corresponds to the data at the t moment of the feature sequence; Figure 7 It is a schematic diagram of advancing the feature sequence by n moments in an embodiment of the time series prediction method of the present application. Figure 7 In [diagram], the feature sequence is moved forward by n time units, so that the data at the t + n moment of the target sequence corresponds to the data at the t moment of the feature sequence, where the value range of n is set as: n = 1, 2,..., l, l ≤ L / 2, and L is the length of the target sequence S t and the feature sequence ; Figure 8 It is a schematic diagram of delaying the feature sequence by 1 moment in an embodiment of the time series prediction method of the present application. Figure 8 In [diagram], the feature sequence is moved backward by 1 time unit, so that the data at the t - 1 moment of the target sequence corresponds to the data at the t moment of the feature sequence; Figure 9 It is a schematic diagram of delaying the feature sequence by n moments in an embodiment of the time series prediction method of the present application. Figure 9 In [diagram], the feature sequence is moved backward by n time units, so that the data at the t - n moment of the target sequence corresponds to the data at the t moment of the feature sequence.
[0118] It should be understood that, under different time misalignment conditions, the correlation between the time overlap segment sequences is analyzed, and when the correlation value is the largest, the corresponding feature Sf and the time misalignment correspondence relationship t.
[0119] In this embodiment, the feature sequence is moved by multiple time units, and the time misalignment correlation of the time overlapping segment sequence between the target sequence and the moved feature sequence is analyzed under different time misalignments, so as to improve the accuracy of the time misalignment correlation analysis.
[0120] In the fourth embodiment, the step S40 includes:
[0121] Step S401: Perform network encoding on the trend sequence and the multi-time granularity sequence respectively to obtain a target sequence representation and a multi-time granularity sequence representation.
[0122] It should be understood that, in order to enrich the representation information of the target sequence, in this embodiment, by performing network encoding on the trend sequence and the multi-time granularity sequence respectively, a target sequence representation and a multi-time granularity sequence representation are obtained, the similarity value between the target sequence representation and the multi-time granularity sequence representation is calculated, and the similarity value is used as a weight to weightedly fuse the multi-time granularity sequence representation on the basis of the target sequence representation to obtain a fused target sequence representation for fusing cross-time granularity sequence representations.
[0123] Step S402: Calculate the similarity value between the target sequence representation and the multi-time granularity sequence representation.
[0124] Step S403: Use the similarity value as a weight to weightedly fuse the multi-time granularity sequence representation on the basis of the target sequence representation to obtain a fused target sequence representation.
[0125] For ease of understanding, the following is an example, but it does not limit the present application. In one example, when constructing the data of the target sequence to be predicted, it is statistically analyzed according to the time granularity required by the task. For example, in the indoor temperature prediction task, the task objective is to predict the indoor temperature in the next few hours, and the construction of the target sequence is statistically analyzed in hours. However, the target variable sequences statistically obtained under different time granularities often have different change situations and contain more sequence change information. The traffic flow sequence data with a minute granularity contains more data points than the sequence with an hour granularity under the same time span, so it can better reflect the periodicity of the target sequence change. And the traffic flow sequence data with a day granularity contains fewer data points than the sequence data with an hour granularity under the same time span, and can better reflect the general trend of the target variable change. Moreover, when encoding the time of the sequence data, sequences with different granularities will also contain more time information. Therefore, the present application designs a fusion mechanism for different time granularity sequence representations to aggregate more time information and sequence change information of different time granularities, which helps to improve the model prediction effect.
[0126] Construct the target sequence data to be predicted according to the specific task, and encode the numerical information and time information in the sequence through the MLP network respectively to obtain the corresponding embeddings, denoted as e data and e t respectively. The sum of the two is the representation of the target sequence data to be predicted, denoted as e m . The target variable sequence data constructed with different time granularities also passes through the MLP network for encoding to obtain the corresponding embeddings, which are respectively
[0127] Finally, the e m representation vector is calculated as follows:
[0128]
[0129]
[0130] In the above formula, cosθ i represents the similarity coefficient between the multi-time granularity sequence representation and the target sequence representation, and it is used as a weight to weight the multi-time granularity sequence representation to obtain the fused target sequence representation.
[0131] In this embodiment, by performing network encoding on the trend sequence and the multi-time granularity sequence respectively, the target sequence representation and the multi-time granularity sequence representation are obtained, the similarity value between the target sequence representation and the multi-time granularity sequence representation is calculated, and the similarity value is used as a weight to weight and fuse the multi-time granularity sequence representation on the basis of the target sequence representation to obtain the fused target sequence representation, so as to be able to fuse the cross-time granularity sequence representation, aggregate more time information and the change information of different time granularity sequences, which helps to improve the model prediction effect.
[0132] In the fourth embodiment, step S50 includes:
[0133] Step S501: Decompose the fused target sequence representation through two sequence decomposition modules of a preset prediction model in sequence to obtain a periodic component and a trend component. During the sequence decomposition process, according to the change characteristics of the target sequence, one of the periodic component and the trend term component is used as the main sequence component, and the other is used as the auxiliary sequence component. The main sequence component output by the first sequence decomposition module is used as the input of the second sequence decomposition module for further decomposition.
[0134] It should be understood that most of the current deep learning network structures for time series prediction tasks are based on the encoder-decoder architecture, including sequence decomposition modules, self-correlation and cross-correlation learning modules, etc. The model structure design is relatively complex, the internal module functions are redundant, and the execution efficiency is low. Moreover, it often only targets a certain type of time series data with specific change characteristics and has poor generalization ability.
[0135] For example, the current mainstream prediction algorithms adopt the encoder-decoder architecture based on Transformer, such as Informer, Autoformer, FEDformer, etc. In this type of algorithm, the structures of the encoder and the decoder are basically symmetric. The difference between the two is that the input of the encoder only includes the original time series data, while the input of the decoder includes the output of the encoder and the original data to learn cross-correlation. In this type of model, the module functions are repeated, and when there are many samples or the input sequence length is long, the training process is time-consuming. Moreover, the data used by a single model is targeted. For example, some models are suitable for data with more obvious periodicity, while other models are suitable for data with stronger trends, and the generalization ability is poor.
[0136] Therefore, in order to overcome the above defects, in this embodiment, on this basis, the model structure is optimized and improved, and a model with strong generality in both the data representation learning and downstream task dimensions is designed.
[0137] In specific implementation, an algorithm model for implementing the functions of downstream tasks is designed. The model integrates modules that can implement the above step functions. In addition, it also includes a sequence self-correlation learning module, a sequence decomposition module, etc., and uses the representation obtained after being processed by the above modules as the final representation of the target sequence.
[0138] Step S502: Learn the cross-correlation of the main sequence components output by the two sequence decomposition modules through the self-correlation module of the preset prediction model to obtain the target representation.
[0139] Step S503: After processing the target representation through the feed-forward network of the preset prediction model, add it to the auxiliary sequence components output by the two sequence decomposition modules to obtain the time series prediction result of the target sequence.
[0140] For ease of understanding, reference is made to Figure 10 for illustration, but it does not limit the present application. Figure 10This is a schematic diagram of the preset prediction model structure for an embodiment of the time series prediction method in this application. In the figure, the input sequence (i.e., Series Input in the figure) first passes through the sequence decomposition module (i.e., Series Decompose in the figure) to obtain two parts: the periodic term (i.e., seasonal in the figure) and the trend term (i.e., trend in the figure), and independent initial solutions are generated for the decomposed subsequences through the initial solution generation mechanism respectively. Secondly, the periodic term passes through the auto-correlation module (i.e., Auto-Correlation in the figure) to learn the auto-correlation of the sequence to capture the periodic-related information of the sequence itself, and the trend term passes through the linear encoding layer (i.e., Linear encoder in the figure) to further extract the trend features. After adding the two obtained sequence representations (i.e., obtaining the fused target sequence representation), it passes through two sequence decomposition modules in turn. According to the change characteristics of the target sequence data, the periodic term and the trend term can be selected as the main sequence components, while the other subsequence is used as the auxiliary sequence component. The first sequence decomposition module obtains the main sequence component as the input of the second sequence decomposition module for further decomposition. The main sequence components output by the two sequence decomposition modules learn the cross-correlation through the auto-correlation module, and the obtained representation passes through the feed-forward network (i.e., Feed Forward in the figure) and then is added to the auxiliary sequence components output by the two decomposition modules as the final target sequence representation for downstream tasks.
[0141] It should be understood that in this embodiment, various IoT data with time information are first obtained, and the target sequence and related feature sequences are obtained through data preprocessing. The time ranges and time granularities of the target sequence and the feature sequences are the same, so the data at different time points also have a one-to-one correspondence. Secondly, after each feature sequence is shifted forward or backward by 1, 2,..., l time units relative to the target sequence respectively, the sequence correlation between the time-shifted feature sequence and the target sequence in the corresponding time period is calculated, and the feature sequence and the time-shift method corresponding to the maximum correlation value are obtained. Using the relationship between the feature sequence and the target sequence under the condition of time misalignment, the initial solution at the prediction moment of the target sequence is generated and spliced with the original target sequence. And the target variables are aggregated at different time granularities to obtain multi-time granularity sequences. The representation learning modules are designed for the target sequence with the prediction initial solution and the multi-time granularity sequences respectively to learn the corresponding sequence data representations. Taking the similarity value between the multi-time granularity sequence representation and the target sequence representation as the weight, the multi-time granularity sequence representations are weighted and fused on the basis of the target sequence representation. The fused representation passes through the sequence decomposition module and the cross-correlation learning module respectively to obtain the final target sequence representation for downstream tasks, thus simplifying the model structure while being able to adapt to time series data with different change characteristics and improving the model generalization ability.
[0142] This embodiment proposes a temporal data representation learning model structure for only-encoder to improve the model execution efficiency. Different sequence component processing modules are designed to improve the model generalization. In this embodiment, processing modules for different sequence components are designed, enabling the model to adapt to data with different change characteristics. Therefore, it has a wide range of application scenarios and strong versatility.
[0143] In addition, referring to Figure 11 , this application embodiment also proposes a temporal prediction device, and the temporal prediction device includes:
[0144] A correlation acquisition module 10, configured to acquire the time misalignment correlation between the target sequence and the feature sequence under different time misalignments. The target sequence is constructed based on a target variable, the feature sequence is constructed based on a covariate corresponding to the target variable, the target variable and the covariate are determined based on a variety of Internet of Things data with time information, the Internet of Things data is associated with temporal prediction, and the time granularity of the feature sequence is the same as that of the target sequence;
[0145] A data fusion module 20, configured to generate an initial solution of the target sequence through data fusion according to the time misalignment correlation and the feature sequence, and splice the initial solution with the target sequence to obtain a trend sequence, where the trend sequence is used to represent the change trend of the target sequence;
[0146] A sequence construction module 30, configured to construct a multi-time granularity sequence corresponding to the target variable, where the multi-time granularity sequence has a different time granularity from that of the target sequence;
[0147] A representation fusion module 40, configured to perform representation fusion on the trend sequence and the multi-time granularity sequence to obtain a fused target sequence representation;
[0148] A temporal prediction module 50, configured to perform temporal prediction on the target sequence based on the fused target sequence representation to obtain a temporal prediction result of the target sequence.
[0149] In this embodiment, the time misalignment correlation between the target sequence and the feature sequence under different time misalignments is disclosed. The target sequence is constructed based on the target variable, and the feature sequence is constructed based on the covariate corresponding to the target variable. The target variable and the covariate are determined based on a variety of Internet of Things data with time information. The Internet of Things data is associated with time series prediction. The time granularity of the feature sequence is the same as that of the target sequence. An initial solution of the target sequence is generated through data fusion according to the time misalignment correlation and the feature sequence, and the initial solution is concatenated with the target sequence to obtain a trend sequence, which is used to represent the change trend of the target sequence. A multi-time granularity sequence corresponding to the target variable is constructed, and the time granularity of the multi-time granularity sequence is different from that of the target sequence. The trend sequence and the multi-time granularity sequence are subjected to feature fusion to obtain a fused target sequence representation. Based on the fused target sequence representation, time series prediction is performed on the target sequence to obtain the time series prediction result of the target sequence; since this embodiment analyzes the time misalignment correlation between the target sequence and the feature sequence, more accurately extracts the representation information of the sequence data at the same time granularity, and by designing a feature fusion mechanism for different time granularity sequences, aggregates more time information and the change information of different time granularity sequences, which helps to improve the prediction effect of time series prediction.
[0150] In one embodiment, the data fusion module 20 is further configured to construct a data function and a data coefficient at the time misalignment position between the feature sequence and the target sequence according to the time misalignment correlation; obtain the mean and standard deviation of the target sequence, and calculate the perturbation coefficient of the target sequence according to the mean and standard deviation of the target sequence; calculate the initial solution of the target sequence according to the data function, the data coefficient, and the perturbation coefficient.
[0151] In one embodiment, the time series prediction device further includes:
[0152] A feature mining module, configured to decompose the target sequence into a periodic term and a trend term, where the periodic term is used to represent the periodic change of the target sequence, and the trend term is used to represent the trend change of the target sequence; calculate the initial solution of the periodic term and calculate the initial solution of the trend term; generate the initial solution of the target sequence according to the initial solution of the periodic term and the initial solution of the trend term, and concatenate the initial solution with the target sequence to obtain a trend sequence, which is used to represent the change trend of the target sequence.
[0153] In one embodiment, the feature mining module is further configured to calculate the average difference between adjacent data in the trend term; calculate the initial solution of the trend term through incremental generation according to the average difference.
[0154] In one embodiment, the feature fusion module 40 is further configured to perform network encoding on the trend sequence and the multi-time granularity sequence respectively to obtain a target sequence representation and a multi-time granularity sequence representation; calculate a similarity value between the target sequence representation and the multi-time granularity sequence representation; use the similarity value as a weight to perform weighted fusion of the multi-time granularity sequence representation based on the target sequence representation to obtain a fused target sequence representation.
[0155] In one embodiment, the time series prediction module 50 is further configured to sequentially decompose the fused target sequence representation through two sequence decomposition modules of a preset prediction model to obtain a periodic component and a trend component. During the sequence decomposition process, according to the change characteristics of the target sequence, one of the periodic component and the trend term component is used as the main sequence component, and the other is used as the auxiliary sequence component. The main sequence component output by the first sequence decomposition module is used as the input of the second sequence decomposition module for further decomposition; learn the cross-correlation of the main sequence components output by the two sequence decomposition modules through the autocorrelation module of the preset prediction model to obtain a target representation; after processing the target representation through the feedforward network of the preset prediction model, add it to the auxiliary sequence components output by the two sequence decomposition modules to obtain the time series prediction result of the target sequence.
[0156] In one embodiment, the correlation acquisition module 10 is further configured to shift the feature sequence by multiple time units; analyze the time misalignment correlation of the time overlap segment sequence between the target sequence and the shifted feature sequence under different time misalignment conditions.
[0157] For other embodiments or specific implementation manners of the time series prediction device of the present application, reference may be made to the above method embodiments, which will not be elaborated herein.
[0158] In addition, an embodiment of the present application further provides a storage medium, on which a time series prediction program is stored. When the time series prediction program is executed by a processor, it implements the time series prediction method as described above.
[0159] It should be noted that in this article, the terms "include", "comprise" or any other variant thereof are intended to cover a non-exclusive inclusion, so that a process, method, article or system including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or system. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of another identical element in the process, method, article or system including that element.
[0160] The serial numbers of the embodiments of the present application above are only for description and do not represent the superiority or inferiority of the embodiments.
[0161] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as a Read Only Memory image (ROM) / Random Access Memory (RAM), magnetic disk, optical disk), and includes several instructions to enable a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present application.
[0162] The above are only the preferred embodiments of the present application, and do not limit the patent scope of the present application accordingly. Any equivalent structure or equivalent process transformation made by using the specification and drawings of the present application, or directly or indirectly applied in other related technical fields, shall be similarly included in the patent protection scope of the present application.
Claims
1. A time series prediction method, characterized in that, The time series prediction method includes: Obtaining the time misalignment correlation between the target sequence and the feature sequence under different time misalignment conditions. The target sequence is constructed based on a target variable, the feature sequence is constructed based on a covariate corresponding to the target variable, the target variable and the covariate are determined based on various Internet of Things data with time information, the Internet of Things data is associated with time series prediction, and the time granularity of the feature sequence is the same as that of the target sequence; Generating an initial solution of the target sequence through data fusion according to the time misalignment correlation and the feature sequence, and splicing the initial solution with the target sequence to obtain a trend sequence, where the trend sequence is used to represent the change trend of the target sequence; Constructing a multi-time granularity sequence corresponding to the target variable, where the multi-time granularity sequence has a different time granularity from the target sequence; Performing feature fusion on the trend sequence and the multi-time granularity sequence to obtain a fused target sequence representation; Performing time series prediction on the target sequence based on the fused target sequence representation to obtain the time series prediction result of the target sequence.
2. The timing prediction method according to claim 1, wherein The generating an initial solution of the target sequence through data fusion according to the time misalignment correlation and the feature sequence includes: Constructing a data function and a data coefficient of the feature sequence and the target sequence at the time misalignment position according to the time misalignment correlation; Obtaining the mean and standard deviation of the target sequence, and calculating the perturbation coefficient of the target sequence according to the mean and standard deviation of the target sequence; Calculating the initial solution of the target sequence according to the data function, the data coefficient, and the perturbation coefficient.
3. The timing prediction method according to claim 1, characterized in that, Before constructing the multi-time granularity sequence corresponding to the target variable, it further includes: Decomposing the target sequence into a periodic term and a trend term, where the periodic term is used to represent the periodic change of the target sequence, and the trend term is used to represent the trend change of the target sequence; Calculating the initial solution of the periodic term and calculating the initial solution of the trend term; Generating an initial solution of the target sequence according to the initial solution of the periodic term and the initial solution of the trend term, and splicing the initial solution with the target sequence to obtain a trend sequence, where the trend sequence is used to represent the change trend of the target sequence.
4. The timing prediction method according to claim 3, wherein The calculating the initial solution of the trend term includes: Calculating the average difference between adjacent data in the trend term; Calculating the initial solution of the trend term through incremental generation according to the average difference.
5. The timing prediction method according to any one of claims 1 to 4, characterized in that The performing feature fusion on the trend sequence and the multi-time granularity sequence to obtain a fused target sequence representation includes: Performing network encoding on the trend sequence and the multi-time granularity sequence respectively to obtain a target sequence representation and a multi-time granularity sequence representation; Calculating the similarity value between the target sequence representation and the multi-time granularity sequence representation; Using the similarity value as a weight to perform weighted fusion of the multi-time granularity sequence representation on the basis of the target sequence representation to obtain a fused target sequence representation.
6. The timing prediction method according to any one of claims 1 to 4, characterized in that, The performing time series prediction on the target sequence based on the fused target sequence representation to obtain the time series prediction result of the target sequence includes: The characterized target sequence after fusion is sequentially decomposed by two sequence decomposition modules of a preset prediction model to obtain a periodic component and a trend component. During the sequence decomposition process, according to the change characteristics of the target sequence, one of the periodic component and the trend term component is used as the main sequence component, and the other is used as the auxiliary sequence component. The main sequence component output by the first sequence decomposition module is used as the input of the second sequence decomposition module for further decomposition; The main sequence components output by the two sequence decomposition modules are used to learn the cross-correlation through the autocorrelation module of the preset prediction model to obtain the target characterization; After the target characterization is processed by the feed-forward network of the preset prediction model, it is added to the auxiliary sequence components output by the two sequence decomposition modules to obtain the time series prediction result of the target sequence.
7. The timing prediction method according to any one of claims 1 to 4, characterized in that The obtaining of the time misalignment correlation between the target sequence and the feature sequence under different time misalignment situations includes: Moving the feature sequence by multiple time units; Under different time misalignment situations, analyzing the time misalignment correlation of the time overlapping segment sequence between the target sequence and the moved feature sequence.
8. A time series prediction device, characterized in that, The time series prediction device includes: A correlation acquisition module for obtaining the time misalignment correlation between the target sequence and the feature sequence under different time misalignment situations. The target sequence is constructed based on a target variable, the feature sequence is constructed based on a covariate corresponding to the target variable, the target variable and the covariate are determined based on various Internet of Things data with time information, the Internet of Things data is associated with time series prediction, and the time granularity of the feature sequence is the same as that of the target sequence; A data fusion module for generating an initial solution of the target sequence through data fusion according to the time misalignment correlation and the feature sequence, and splicing the initial solution with the target sequence to obtain a trend sequence, where the trend sequence is used to represent the change trend of the target sequence; A sequence construction module for constructing a multi-time granularity sequence corresponding to the target variable, where the multi-time granularity sequence has a different time granularity from the target sequence; A characterization fusion module for performing characterization fusion on the trend sequence and the multi-time granularity sequence to obtain a characterized target sequence after fusion; A time series prediction module for performing time series prediction on the target sequence based on the characterized target sequence after fusion to obtain the time series prediction result of the target sequence.
9. A time series prediction device, characterized in that, The time series prediction device includes: a memory, a processor, and a time series prediction program stored on the memory and executable on the processor. When the time series prediction program is executed by the processor, it implements the time series prediction method according to any one of claims 1 to 7.
10. A storage medium, characterized in that, A time series prediction program is stored on the storage medium. When the time series prediction program is executed by the processor, it implements the time series prediction method according to any one of claims 1 to 7.