Method and apparatus for forecasting future time target variate, and computer device
The proposed Transformer-based architecture for time series forecasting addresses overfitting and covariate utilization issues by employing learnable tokens and mixed attention, achieving precise zero-shot multivariate forecasting.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2026-03-05
AI Technical Summary
Existing time series forecasting methods, particularly those based on Transformer architectures, struggle with overfitting small datasets and fail to effectively utilize covariates for improved forecasting precision, especially in zero-shot multivariate scenarios.
A Transformer-based architecture for zero-shot multivariate time series forecasting that incorporates learnable forecasting tokens and mixed temporal-channel attention, utilizing instance normalization and zero padding, and performs channel-wise patch division and linear embedding to leverage covariates for accurate forecasting.
Enables accurate zero-shot forecasting of future time target variates by leveraging covariates, improving forecasting precision and efficiency, and addressing the limitations of existing methods in handling small datasets and covariate utilization.
Smart Images

Figure CN2024115216_05032026_PF_FP_ABST
Abstract
Description
METHOD AND APPARATUS FOR FORECASTING FUTURE TIME TARGET VARIATE, AND COMPUTER DEVICETECHNICAL FIELD
[0001] This application relates to the field of machine learning, in particular, to the field of time series forecasting, and specifically, to a method and an apparatus for forecasting a future time target variate, a computer device, and a storage medium.BACKGROUND
[0002] Time series forecasting is a task of forecasting future value of one or more variates based on a historical value of the one or more variates and other potentially relevant information, and is important in different fields such as manufacturing, transportation, healthcare, finance, and environmental science. Because of their practicality, a large number of time series forecasting methods have been developed. Earlier studies include classical statistical methods such as ARIMA, exponential smoothing, and VAR, and methods using deep sequential models such as recursive neural networks (RNNs) and convolutional neural networks (CNNs) . In recent years, two different directions have emerged for time series forecasting by using deep neural networks. Based on the success of a Transformer architecture in the fields of natural language processing (NLP) and computer vision (CV) , a tide of time series forecasting by using a Transformer-like architecture has risen. Examples thereof include Pyraformer, LogTrans, Informer, Autoformer, FEDformer, Crossformer, PatchTST, and the like. In addition, a different perception proposes that, in comparison with a complex Transformer-based model, a simple multilayer perceptron (MLP) model may obtain similar or even better time series forecasting performance. This discrepancy may be attributed to the fact that Transformers tend to overfit small datasets, and that the largest publicly available time series dataset is less than 10 GB, which is significantly smaller compared to those in NLP and CV domains.SUMMARY
[0003] This summary is provided to introduce some selected concepts in a simplified form, which are further described in the following detailed description. This summary is not intended to identify any key feature or essential feature of the claimed subject, and is not intended to help determine a scope of the claimed subject.
[0004] Based on this, this application discloses a method for forecasting a future time target variate, including:
[0005] dividing a history target variate and covariates of target variates into a plurality of patches channel-wise, and performing linear embedding, wherein the covariates of target variates comprise a covariate of the history target variate and a covariate of the future time target variate;
[0006] performing position embedding on a plurality of tokens and a learnable forecasting token; wherein the plurality of tokens are linear embedded from the plurality of patches;
[0007] inputting the plurality of tokens and the learnable forecasting token into an encoder; and
[0008] forecasting and outputting the future time target variate based on the encoder and the learnable forecasting token.
[0009] According to the foregoing manner, in a case of zero-shot training, the future time target variate can be accurately forecast through limited history target variates and covariate information of the target variates.
[0010] Further, before the dividing a history target variate and covariates of target variates into a plurality of patches, and performing linear embedding, the method further includes:
[0011] performing instance normalization and zero padding on the history target variate and the covariates of the target variates.
[0012] According to the foregoing manner, due to prevalent non-stationarity of the time series data, the instance normalization can greatly alleviate the problem of distribution shift between training data and test data.
[0013] Further, the performing position embedding on a plurality of tokens and a learnable forecasting token includes:
[0014] arranging the learnable forecasting token at a position of the last token of the history target variate.
[0015] According to the foregoing manner, attention processing may be performed on the learnable forecasting token and tokens of some targets, to forecast the future time target variate.
[0016] Further, the inputting the plurality of tokens and the learnable forecasting token into an encoder includes:
[0017] processing the plurality of tokens and the learnable forecasting token by using mixed temporal attention and channel attention.
[0018] According to the foregoing manner, the temporal attention is used to learn a time correlation between different time series segments in a single channel (or a single variate) , and the cross-channel attention is used to learn a correlation between different time series channels, and the two are combined to provide a more accurate forecasting time series.
[0019] The processing the plurality of tokens and the learnable forecasting token by using mixed temporal attention and channel attention includes:
[0020] combining the plurality of tokens and the learnable forecasting token into a unique dimension; and
[0021] performing attention processing between tokens in a same channel, tokens at a same temporal position and the learnable forecasting token.
[0022] According to the foregoing manner, a requirement of a single dimension of the encoder can be adapted to, and attention processing is further performed on the accurate and limited tokens and the learnable forecasting token, to forecast the future time target variate more accurately.
[0023] Further, the forecasting and outputting the future time target variate based on the encoder and the learnable forecasting token includes:
[0024] outputting the encoded learnable forecasting token based on the encoder; and
[0025] performing forecast head and instance denormalization on the encoded learnable forecasting token to output the future time target variate.
[0026] According to the foregoing manner, a linear activation function and restoration of the time series on normalization can be obtained, to finally obtain an accurate forecasting time series.
[0027] In addition, this application further discloses an apparatus for forecasting a future time target variate, including:
[0028] a channel-wise patch division module, configured to: divide a history target variate and covariates of target variates into a plurality of patches channel-wise, and perform linear embedding, where the covariates of target variates include a covariate of the history target variate and a covariate of the future time target variate;
[0029] a position embedding module, configured to perform position embedding on a plurality of tokens and a learnable forecasting token; wherein the plurality of tokens are linear embedded from the plurality of patches
[0030] an encoder module, configured to input the plurality of tokens and the learnable forecasting token into an encoder; and
[0031] a time series output module, configured to forecast and output the future time target variate based on the encoder and the learnable forecasting token.
[0032] This application further provides a computer device, including a memory and a processor, the memory storing a computer program, where when executing the computer program, the processor implements the foregoing method.
[0033] This application further provides a computer-readable storage medium, storing a computer program, the computer program, when executed by a processor, implements the foregoing method.
[0034] This application further provides a computer program product, where the computer program product is tangibly stored on a computer-readable medium and includes computer-executable instructions, and the computer-executable instructions, when executed, causes at least one processor to perform the foregoing method.BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Implementations of the present disclosure are described in a form of example rather than a form of limitation in the accompanying drawings. Similar reference numerals in the accompanying drawings represent the same or similar components.
[0036] FIG. 1 is a schematic flowchart of a method for forecasting a future time target variate according to an implementation of this application;
[0037] FIG. 2 is a schematic diagram of an apparatus for forecasting a future time target variate according to an implementation of this application;
[0038] FIG. 3 is a schematic diagram of a computer device for forecasting a future time target variate according to an implementation of this application;
[0039] FIG. 4 is a schematic diagram of an embodiment for forecasting a future time target variate according to an implementation of this application; and
[0040] FIG. 5 is a schematic diagram of an embodiment of mixing temporal attention and channel attention in forecasting a future time target variate according to an implementation of this application.
[0041] Reference numerals:
[0042] S101 to S104: Steps
[0043] 200: Apparatus
[0044] 201: Module
[0045] 202: Module
[0046] 203: Module
[0047] 204: Module
[0048] 300: Computer device
[0049] 302: Processor
[0050] 304: MemoryDETAILED DESCRIPTION
[0051] In the following specification, for the purpose of explanation, a large number of specific details are described. However, it may be understood that the implementation of the present invention may be implemented without these specific details. In other instances, well-known circuits, structures, and technologies are not shown in detail, so as not to affect understanding of the specification.
[0052] References to "an implementation" , "implementation" , "an exemplary implementation" , "some implementations" , "various implementations" , or the like throughout the specification indicate that the described implementations of the present invention may include particular features, structures, or characteristics. However, it is not intended that each implementation necessarily include the particular features, structures, or characteristics. In addition, some implementations may have some, all, or none of the features described for other implementations.
[0053] In comparison with progress made in the fields of NLP and CV, exploration in large pre-training basic models for zero-shot time series forecasting is still limited. However, there are some notable works recently, including ForecastPFN, TimeGPT, Lag-Llam, and TimesFM. ForecastPFN is a Transformer-based prior-data fitted network, trained purely based on synthetic data, and aims to mimic a common time series pattern. TimeGPT is a Transformer-based time series forecast model, trained by using 100 billion data points, and other data and model details have not been published. Lag-LlaMA is a probabilistic time series forecast model, adapted from the LlaMA architecture, and is trained on a large number of time series in the Monash time series repository. TimesFM is a patched-decoder style model trained on data from Google Trend. All the foregoing methods can only solve the zero-shot univariate time series forecast problem, but cannot utilize a covariate, and the covariate is crucial for improving forecast precision in many cases.
[0054] In this application, inspired by the Transformer scaling successes in NLP and CV domains, it is proposed a Transformer-based atchitecture for training foundation models zero-shot multivariate time series forecasting with covariates known in advance. This application enchances the model with learnable forecast token and temporal-channel-mixed-attention for zero-shot multivariate time series forecasting with covariates available in the prediction horizon.
[0055] Specifically, this application considers establishing a general purpose zero-shot multivariate time series forecaster, which uses L time points of one or more target variates and a look-back window of their corresponding covariates as a context, to forecast H future time points of the one or more target variates. It is assumed that x1: L and c1: L+H are respectively target variates of a history period and all corresponding covariates from the history to future target time, where a value of the covariate may be obtained within a forecasting range, and a corresponding model is a function for forecasting xL+1: L+H. To be specific: xL+1: L+H = f (x1: L, c1: L+H)
[0056] The covariate available within the forecasting range include information such as a date and time feature, a preset control signal, a planning factor, an order quantity, a weather forecast obtained from a third party source, or the like.
[0057] Based on this, this application discloses a method for forecasting a future time target variate, including:
[0058] S101: Divide a history target variate and covariates of target variates into a plurality of patches channel-wise, and perform linear embedding, where the covariates of target variates include a covariate of history target variate and a covariate of future time target variate.
[0059] Specifically, the history target variates include current data and past data, which may be represented as follows: given a set of multivariate time series samples T: (x1, …, xT) with a look-back window T, where each xt at a time step t is a vector with C dimensions. The covariates of target variates represent relevant features or relevant information of the target variate in the history and the future time. The covariate of target variates have a relationship or connection with the target variate. In this application, the covariates of target variates include covariate information or covariate value of history target variate and covariate information or covariate value of future time target variate.
[0060] The history target variate and the covariates of target variates are divided into a plurality of patches channel-wise, or in other words, are divided into patches channel-wise with a fixed size.
[0061] Before the dividing the history target variate and the covariates of target variates into a plurality of patches channel-wise, and performing linear embedding, the method further includes:
[0062] performing instance normalization and null fill or zero padding on the history target variate and the covariates of the target variates.
[0063] In this application, a reversible instance normalization (RevIN) layer is added to the model, so that normalization and denormalization are performed on the time series channels, and zeros are padded in front of time series samples with less than T data points.
[0064] According to the foregoing manner, due to prevalent non-stationarity of the time series data, the instance normalization can greatly alleviate the problem of distribution shift between training data and test data.
[0065] In this application, the target variate and the covariate are divided into a plurality of patches channel-wise before the linear embedding, and become a token after the linear embedding.
[0066] S102: performing position embedding on a plurality of tokens and a learnable forecasting token; wherein the plurality of tokens are linear embedded from the plurality of patches.
[0067] An initial value for learnable forecasting token is a set of random parameters, and the learnable forecasting token is configured for learning to forecast the future time target variate. Further, position embedding is performed on the plurality of fixed-size tokens and a learnable forecasting tokens. The plurality of fixed-size tokens are linear embedded from the plurality of patches above in S101.
[0068] Specifically, the performing position embedding on a plurality of linear embedded tokens and a learnable forecasting token includes: arranging the learnable forecasting token at a position of the last token position of the history target variate. As shown in FIG. 4, the learnable forecasting token, FT for short, as the last token, is arranged at a position of the last token of the history target variate. According to the foregoing manner, attention processing may be performed on the learnable forecasting token and some of other specific tokens, to forecast the future time target variate.
[0069] S103: Input the plurality of tokens and the learnable forecasting token into an encoder.
[0070] Specifically, the tokens and the learnable forecasting token on which position embedding is performed are inputted into an encoder.
[0071] The inputting the plurality of tokens and the learnable forecasting token into an encoder includes:
[0072] processing the plurality of tokens and the learnable forecasting token by using mixed temporal attention and channel attention.
[0073] The processing the plurality of tokens and the learnable forecasting token by using mixed temporal attention and channel attention includes:
[0074] combining the plurality of tokens and the learnable forecasting token into a unique dimension; and
[0075] performing attention processing on tokens in a same channel, tokens at a same temporal position, and the learnable forecasting token.
[0076] As shown in FIG. 5, a plurality of rows in the figure represent a plurality of channels. A plurality of channels have a plurality of dimensions. Therefore, to adapt to processing of the encoder, first, tokens with a plurality of dimensions are unified into tokens with a unique dimension. Then, for the learnable forecasting token, attention processing is performed on the learning forecasting token with the tokens in the same channel and tokens at the same temporal position but in different channels. Tokens in the same channel and tokens at the same temporal position but in different channels are the results of linear embedding to the patches of the history target variate and covariates of target variates in S101.
[0077] The attention processing may be referred to as mixed temporal attention and channel attention processing since the processing involves the token from same channel and tokens from the same time position but in different channels. More specifically, the tokens from the same channel are the result of liner embedding of patches of the history target variates. It is obvious that the history target variate has different time variates from past to current, for example the history target variate x1: L, it is from 1 to L as mentioned above.
[0078] And the tokens from same time position but in different channels are the result of liner embedding of patches of the covariates of target variates. So in this application, it is just selecting the tokens from different channel, but having same time potion with the learnable forecasting tokens. It is because the patches of the covariate in the same time potion have the useful information with the learnable forecasting token. In Fig. 5, it is also showed that the FT with the star above are processing attention with previous five same channel tokens which are from history target variate and with the last token of different channels. In some embodiment, if learnable forecasting token are placed in second potion, as shown left on Fig. 5, it would process attention with the rest five tokens, e.g. previous one and later four, and the second token in different channels.
[0079] In other words, the learning forecasting sequence (FT) is located at the last temporal position of six temporal positions in this channel. Therefore, during mixed attention processing, or referred to as encoding processing, needs to be performed on the learnable forecasting token together with five other tokens in this channel and tokens at the last temporal position in other channels, so that the forecasted future time target variate can be gradually obtained.
[0080] Specifically, after the tokens are inputted into the encoder, mixed temporal attention and channel attention processing is performed, and finally, multi-layer perception (MLP) processing is further performed. In some embodiments, layer normalization processing is performed before the multi-layer perception processing.
[0081] According to the foregoing manner, the temporal attention is used to learn a time correlation between different time series segments in a single channel (or a single variate) , and the cross-channel attention is used to learn a correlation between different time series channels, to provide a more accurate forecasting time series subsequently.
[0082] S104: Forecast and output the future time target variate based on the encoder and the learnable forecasting token.
[0083] Further, the forecasting and outputting the future time target variate based on the encoder and the learnable forecasting token includes:
[0084] outputting the encoded learnable forecasting token based on the encoder; and
[0085] performing forecast head and instance denormalization on the encoded learnable forecasting token, to obtain a time series of a forecast target.
[0086] In some embodiments, the forecast head, also referred to as a temporal head, is a feed forward layer, and has a linear activation function.
[0087] According to the foregoing manner, a linear activation function and restoration of the time series on normalization can be obtained, to finally obtain an accurate forecasting time series.
[0088] According to the foregoing manner, in a case of zero-shot training, the future time target variate can be accurately forecast through limited history target variates and the covariates of history target variate and future time target variate, thereby having an important inspiration effect on the field of basic models of time series.
[0089] Specifically, in some embodiments, this application resolves the following problem: Given a set of multivariate time series samples T: (x1, …, xT) with a look-back window T, where each xt at a time step t is a vector with C dimensions. An objective of this application is to forecast L future values (xT+1, …, xT+L) , where covariates of the L future values participate in the forecast of the future time target variates as context information or useful information. As shown in FIG. 4, a key technical feature of this application is a foundation model architecture tailored for cross-domain multivariate time series forecasting tasks. Specifically, in this application, the inputted multivariate time series and the past and future time covariates are segmented channel-wise into patches with a fixed size, then each patch is linearly embedded to form a token, then position embedding is added to the token and the learnable forecasting token, and the obtained token sequence is inputted into the encoder. In comparison with a standard transformer, the encoder has an extra channel attention mechanism, that is, the encoder includes mixed temporal attention and channel attention. In addition, in this application, a linear head is added at a position of the last token of the model for forecast. In an inference process, in this application, a reversible instance normalization (RevIN) layer is added to the model, so that normalization and denormalization are performed on the time series channels, and zeros are padded in front of time series samples with less than T data points. In this way, there is no need to normalize the inputted data before using the model of this application, thereby greatly improving convenience of using the model in the inference process.
[0090] Basically, the model of this application uses a transformer encoder as its core architecture, but the basic model architecture of this application has several key differences. This application further describes key parts for adapting the architecture proposed in this application to training of the time series forecast basic model:
[0091] In this application, a special forecast token is added at the end of the tokens of target variates. The forecast token is an initialization parameter learned in a backpropagation process. After passing through the encoder layer, the forecasting token is encoded, and encoded information includes all information required for forecasting a next H value of a corresponding target variate. The special forecast toke could be named as learnable forecasting token as mentioned above.
[0092] This application attends tokens in the same channel and tokens in the same temporal position simultaneously in an attention block. FIG. 5 illustrates a specific operation of the mixed attention. Specifically, first, the covariates and the target channel are flattened into one dimension, and then an attention operation is performed on the learnable forecasting token together with tokens in the same channel and tokens at the same temporal position but in different channel by using a method of combining multi-head self-attention and an attention mask. In this way, efficiency of inter-channel information transfer is greatly improved.
[0093] In some embodiment, the forecast head, that is, an MLP linear head, is directly connected to the forecasting token, to forecast the target variate values at the next H time steps.
[0094] Experiments
[0095] In this application, it is trained a foundation model using the newly proposed architecture on a large corpus of collected time series data. The model has 4 encoder layers, each layer has 6 attention heads and the embedding dimension is set to 384. In this application, it is set the maximum input length (time steps) for the model to 1024, patch size to 64, max target variate channels to 22, max covariate channels to 10. This results in about 7 million parameters to be trained.
[0096] In this application a large-scale time series dataset is collected, including 50 million time series data samples, and covering a plurality of fields such as industrial sensing, environmental sensing, biology signals, transportation flows, and financial data.
[0097] The original model trained on the collected data shows excellent zero-shot forecasting abilities. FIG. 5 illustrates some success examples of using the original model to perform zero-shot forecast in different tasks.
[0098] In this application, it is also compared forecasting accuracy in terms of mean absolute error with start-of-the-art time series forecasting models and the original model in trained with the same dataset on the ETT public benchmark dataset, the results are given below:
[0099] Table 1 Experimental results of the open benchmark dataset
[0100] It can be seen from the table that, in most cases, a forecasting error of zero-shot forecast using the new model of this application is the smallest. It is to be noted that, except the last two columns, all models are trained on the benchmark dataset.
[0101] Differences between this application and the related art lie in that: Existing time series forecasting models need to be trained on the end-task dataset. The foundation model trained using our proposed architecture can do zero-shot forecasting. Our new model in this application can also deal with covariates that are available in the predication horizon. These advantages significantly improve the practice usage of our model or method due to better accuracy, data and computing efficiency.
[0102] Whether the model in this application is applied may be checked by checking whether the same or similar model structures are used.
[0103] A specific application embodiment of this application may be as follows: T: (x1, …, xT) is power generation capacity of a factory in a past period of time, the covariates may be control parameters of machine devices of the factory at history and future time, and (xT+1, …, xT+L) may be power generation capacity of the factory in a future period of time. For another example, T: (x1, …, xT) is air humidity in a past period of time, the covariates may be air temperature statuses at history and future time, and (xT+1, …, xT+L) may be air humidity in a future period of time. It should be understood that, by knowing data of a variate in a past period of time, and knowing data of a covariate related to the variate at history and future time, a scientific data status of the target variate at the future time can be accurately forecasted by using this method.
[0104] It should be understood that, although the steps in the flowchart of FIG. 1 are sequentially displayed in accordance with instructions of arrows, these steps are not necessarily performed sequentially in the order indicated by the arrows. Unless explicitly specified in this application, execution of the steps is not strictly limited, and the steps may be performed in other sequences. Furthermore, at least some steps in FIG. 1 may include a plurality of steps or a plurality of stages. The steps or stages are not necessarily performed at the same moment, and may be performed at different moments. The steps or stages are not necessarily performed in order, and may be performed in turn or alternately with other steps or at least some of steps or stages in other steps.
[0105] FIG. 2 provides an apparatus 200 for forecasting a future time target variate. The apparatus 200 includes:
[0106] a channel-wise patch division module 201, configured to: divide a history target variate and covariates of target variates into a plurality of patches channel-wise, and perform linear embedding, where the covariates of the target variates include a covariate of the history target variate and a covariate of the future time target variate;
[0107] a position embedding module 202, configured to perform position embedding on a plurality of tokens and a learnable forecasting token; wherein the plurality of tokens are linear embedded from the plurality of patches;
[0108] an encoder module 203, configured to input the plurality of tokens and the learnable forecasting token into an encoder; and
[0109] a time series output module 204, configured to forecast and output the future time target variate based on the encoder and the learnable forecasting token.
[0110] It is to be noted that, the apparatus may include more or fewer modules to implement the described functions. For example, at least one module in FIG. 2 may be further divided into a plurality of different sub-modules, and each sub-module is configured to perform at least a part of the operations described herein with reference to the corresponding module. In addition, in some examples, the apparatus 200 may further include an additional module, configured to perform other operations that have been described in the specification. In addition, a person skilled in the art may understand that the exemplary apparatus 200 may be implemented by using software, hardware, firmware, or any combination thereof.
[0111] FIG. 3 provides a computer device. According to an implementation, the computer device 300 may include a processor 302, and the processor 302 executes a computer program stored in a memory 304. When executed by the processor, the computer program implements the foregoing method.
[0112] A person skilled in the art may understand that, the structure shown in FIG. 3 is merely a block diagram of a partial structure related to a solution in this application, and does not constitute a limitation to the computer device to which this application is applied. Specifically, the computer device may include more components or fewer components than those shown in the figure, or some components may be combined, or a different component deployment may be used.
[0113] A person of ordinary skill in the art may understand that all or some of the processes of the methods in the foregoing implementations may be implemented by a computer program instructing relevant hardware. The computer program may be stored in a non-volatile computer-readable storage medium. When the computer program runs, the processes of the foregoing methods in the implementations may be performed. Any reference to a memory, a storage, a database, or another medium used in the various implementations provided in this application may include at least one of a non-volatile memory or a volatile memory. The non-volatile memory may include a read-only memory (ROM) , a magnetic tape, a floppy disk, a flash memory, an optical memory, or the like. The volatile memory may include a random access memory (RAM) , an external cache, or the like. For illustration rather than limitation, the RAM may be in various forms, for example, may be a static random access memory (SRAM) or a dynamic random access memory (DRAM) .
[0114] This application further provides a computer-readable storage medium, storing a computer program, and when executed by a processor, the computer program implementing the foregoing steps.
[0115] This application further provides a computer program product, where the computer program product is tangibly stored on a computer-readable medium and includes computer-executable instructions, and the computer-executable instructions, when executed, causes at least one processor to perform the foregoing method.
[0116] Further, the computer program may be stored and run in a cloud to perform the method. Further, components of the program may be laid out on a plurality of devices or the cloud. For example, corresponding steps may be laid out and run on a local computer, or run on different cloud devices to transmit signals through communication connection, or may be laid out and run on a local computer. The manner or method is not limited in this application. Corresponding technologies may be flexibly laid out and deployed, and devices and technologies such as cloud, big data, and supercomputing capabilities may be fully utilized to execute and complete the method.
[0117] Some implementations of the present disclosure may include a product. The product may include a storage medium, which is configured to store logic. Examples of the storage medium may include one or more types of computer-readable storage media that can store electronic data, including a volatile memory or a non-volatile memory, a removable or non-removable memory, an erasable or non-erasable memory, a writable or re-writable memory, or the like. Examples of the logic may include various software units, such as a software component, a program, an application, a computer program, an application program, a system program, a machine program, operating system software, middleware, firmware, a software module, a routine, a subroutine, a function, a method, a process, a software interface, an application program interface (API) , an instruction set, computing code, computer code, a code segment, a computer code segment, a word, a value, a symbol, or any combination thereof. In some implementations, for example, the product may store executable computer program instructions that, when executed by a processor, enable the processor to perform the methods and / or operations described in this specification. The executable computer program instructions may include any suitable type of code, for example, source code, compiled code, interpreted code, executable code, static code, dynamic code, or the like. The executable computer program instructions may be implemented according to a predefined computer language, manner, or syntax for instructing a computer to perform a specific function. The instructions may be implemented by using any suitable high-level, low-level, object-oriented, visual, compiled, and / or interpreted programming language.
[0118] Content described above includes examples of disclosed architectures. It is clear that, it is not possible to describe every conceivable combination of components and / or methods, but a person skilled in the art may understand that many other combinations and arrangements are also possible. Therefore, the novel architecture is intended to cover all such substitutes, modifications, and variations that fall within the spirit and scope of the appended claims.
Claims
1.A method for forecasting a future time target variate, comprising:dividing a history target variate and covariates of target variates into a plurality of patches channel-wise, and performing linear embedding, wherein the covariates of target variates comprise a covariate of the history target variate and a covariate of the future time target variate;performing position embedding on a plurality of tokens and a learnable forecasting token; wherein the plurality of tokens are linear embedded from the plurality of patches;inputting the plurality of tokens and the learnable forecasting token into an encoder; andforecasting and outputting the future time target variate based on the encoder and the learnable forecasting token.2.The method according to claim 1, wherein before the dividing a history target variate and covariates of target variates into a plurality of patches, and performing linear embedding, the method further comprises:performing instance normalization and zero padding on the history target variate and the covariates of target variates.3.The method according to claim 1, wherein the performing position embedding on a plurality of linear embedded tokens and a learnable forecasting token comprises:arranging the learnable forecasting token at a position of the last token of the history target variate.4.The method according to claim 1, wherein the inputting the plurality of tokens and the learnable forecasting token into an encoder comprises:processing the plurality of tokens and the learnable forecasting token by using mixed temporal attention and channel attention.5.The method according to claim 4, wherein the processing the plurality of tokens and the learnable forecasting token by using mixed temporal attention and channel attention comprises:combining the plurality of tokens and the learnable forecasting token into a unique dimension; andperforming attention processing between tokens in a same channel, tokens at a same temporal position and the learnable forecasting token.6.The method according to claim 1, wherein the forecasting and outputting the future time target variate based on the encoder and the learnable forecasting token comprises:outputting the encoded learnable forecasting token based on the encoder; andperforming forecast head and instance denormalization on the encoded learnable forecasting token to output the future time target variate.7.An apparatus (200) for forecasting a future time target variate, comprising:a channel-wise patch division module (201) , configured to: divide a history target variate and covariates of target variates into a plurality of patches channel-wise, and perform linear embedding, wherein the covariates of target variates comprise a covariate of the history target variate and a covariate of the future time target variate;a position embedding module (202) , configured to perform position embedding on a plurality of tokens and a learnable forecasting token; wherein the plurality of tokens are linear embedded from the plurality of patches;an encoder module (203) , configured to input the plurality of tokens and the learnable forecasting token into an encoder; anda time series output module (204) , configured to forecast and output the future time target variate based on the encoder and the learnable forecasting token.8.A computer device, comprising a memory and a processor, the memory storing a computer program, wherein when executing the computer program, the processor implements steps of the method according to any one of claims 1 to 6.9.A computer-readable storage medium, storing a computer program, wherein when executed by a processor, the computer program implements steps of the method according to any one of claims 1 to 6.10.A computer program product, wherein the computer program product is tangibly stored on a computer-readable medium and comprises computer-executable instructions, and the computer-executable instructions, when executed, causes at least one processor to perform the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Multi-step time sequence prediction method based on CycleGAN neural network
CN112733444A
Multivariable time sequence change point detection method
CN112926016A
Forecasting routines utilizing a mixer to combine Deep Neural Network (DNN) forecasts of multi-variate time-series datasets
US20210303969A1
Processing Multi-Horizon Forecasts For Time Series Data
US20230018125A1
Cited By
Aero-engine degradation perception representation learning method and device based on double-dependence interaction, equipment and medium
CN121935858A