Time sequence prediction method and system based on multi-granularity time sequence large model

By transforming the basic large-scale language model, performing data augmentation and fine-tuning training, and transforming one-dimensional time series into multiple sets of two-dimensional vectors, it solves the problem that traditional models are difficult to cope with complexity and uncertainty in financial timing prediction, and achieves more High prediction accuracy and iterative ability.

CN119168147APending Publication Date: 2024-12-20SHANGHAI FINANCIAL FUTURES INFORMATION TECH CO LTD
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202411278056.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-12
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

Traditional financial timing prediction models are difficult to effectively deal with the complexity of the financial market, especially in terms of fluctuations and changes in different time scales and multiple modes, data uncertainty, prediction accuracy and iterative capabilities.

Method used

Using a multi-grained time-series model, transforming the language-based basic large model, data enhancement, templated prompt words, transform one-dimensional time series into multiple sets of two-dimensional vectors, and fine-tuning training is carried out to improve the accuracy of timing prediction. Sex and iterative ability.

Benefits of technology

It improves the accuracy and iterative ability of timing prediction, effectively deals with data uncertainty, and enhances the model's time analysis ability and generalization ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119168147A_ABST
    Figure CN119168147A_ABST
Patent Text Reader

Abstract

The invention discloses a time sequence prediction method and system based on a multi-granularity time sequence large model, which can improve the accuracy of time sequence prediction, effectively cope with the uncertainty of data, and have excellent iteration capability and generalization capability. According to the technical scheme, a multi-granularity time sequence large model is reconstructed and constructed based on a language class basic large model; performing data enhancement on the time series data by applying a mixed data enhancement method, and expanding the size of a time series data set; for each batch of time sequence data, constructing a template cue word of each batch for context cue, and assisting the multi-granularity time sequence large model to understand the time sequence; converting a one-dimensional time sequence into a plurality of groups of two-dimensional vectors according to different granularities by using an original time sequence data set, and splicing the plurality of groups of two-dimensional vectors to form new data representation; and performing fine tuning training on the multi-granularity time sequence large model to enable the pre-trained multi-granularity time sequence large model to solidify knowledge of the data set and complete time sequence prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a time series prediction technology, and in particular to a time series prediction method and system based on a multi-granularity time series large model, which is applied to the field of financial time series prediction. Background Art

[0002] In the field of financial time series forecasting technology, traditional models such as ARIMA (autoregressive integrated moving average model), RNN (recurrent neural network) and its variant LSTM (long short-term memory network) have been widely used in time series forecasting.

[0003] The ARIMA model is a statistical model used for time series forecasting. It converts non-stationary time series into stationary time series through difference, autoregression and moving average techniques, and then makes forecasts.

[0004] RNN is a neural network used to process sequence data. It has memory and can capture long-term dependencies in the sequence. In time series prediction, RNN learns long-term dependencies from historical information through its cyclic mechanism and makes predictions based on the features of the new input.

[0005] LSTM is a variant of RNN. It solves the gradient vanishing and gradient exploding problems in traditional RNN by introducing gating mechanisms (forget gate, input gate, output gate). LSTM can handle long-term dependency and short-term memory problems more effectively and is one of the commonly used models in time series forecasting.

[0006] However, financial markets are highly complex, and traditional models often find it difficult to analyze the fluctuations of financial markets at different time scales and in multiple modes, including short-term fluctuations, medium-term trends, and long cycles. They also have many shortcomings in dealing with data uncertainty, the accuracy of time series forecasts, and iteration and generalization capabilities. Summary of the invention

[0007] A brief summary of one or more aspects is given below to provide a basic understanding of these aspects. This summary is not an exhaustive overview of all conceived aspects, and is neither intended to identify the key or critical elements of all aspects nor to define the scope of any or all aspects. Its only purpose is to give some concepts of one or more aspects in a simplified form as a prelude to a more detailed description that will be given later.

[0008] The purpose of the present invention is to solve the above problems and provide a time series prediction method and system based on a multi-granularity time series large model, which can improve the accuracy of time series prediction, effectively deal with data uncertainty, and have excellent iteration and generalization capabilities.

[0009] The technical solution of the present invention is: the present invention discloses a time series prediction method based on a multi-granularity time series large model, the method comprising:

[0010] Step 1: Build a multi-granularity time series model based on the language-based basic model;

[0011] Step 2: Apply hybrid data enhancement methods to enhance the time series data and expand the size of the time series data set;

[0012] Step 3: For each batch of time series data, construct templated prompt words for each batch for context prompts to assist the multi-granularity time series model in understanding the time series;

[0013] Step 4: Convert the original time series data set into multiple sets of two-dimensional vectors according to different granularities, and concatenate the multiple sets of two-dimensional vectors to form a new data representation;

[0014] Step 5: Fine-tune the multi-granularity time series large model so that the pre-trained multi-granularity time series large model can solidify the knowledge of the data set and complete the time series prediction.

[0015] According to an embodiment of the time series prediction method based on a multi-granularity time series large model of the present invention, step 1 further includes:

[0016] Step 1-1: Keep the word segmentation and word embedding modules of the language-based large model and retain its original text recognition capabilities;

[0017] Step 1-2: Add multiple time series matrix vectors of different lengths for processing multi-granularity time series data;

[0018] Step 1-3: Add multiple time series matrix vector ID embedding layers to enhance the understanding of time series position;

[0019] Step 1-4: Add a fully connected layer between the output of the position embedding and the input of the attention mechanism of the language-based large model to act as an adapter.

[0020] According to an embodiment of the time series prediction method based on a multi-granularity time series large model of the present invention, step 2 further includes:

[0021] Step 2-1: Randomly sample from the data set and extract k uniformly distributed time series. The length of each series is l, and the length of each group of data is controlled to be equal, where k is a natural number;

[0022] Step 2-2: Perform Z-score standardization on the selected time series;

[0023] Step 2-3: Sample a set of non-negative weights m1, m2, ... mk , which is required to conform to the Dirichlet distribution and is used for subsequent time series data weighted generation, where

[0024] Step 2-4: Combine the weights generated above and the randomly sampled time series samples to form a new time series, X new =m1(x1)+m2(x2)+…+m k (x k ), where x k Represents the kth randomly sampled time series sample.

[0025] According to an embodiment of the time series prediction method based on a multi-granularity time series large model of the present invention, step 3 further includes:

[0026] Step 3-1: Label the name of the dataset and a description of the dataset. The names and descriptions of different batches of the same dataset should remain consistent.

[0027] Step 3-2: Mark the time series mean, standard deviation, and time frequency of each batch. The mean and standard deviation are floating point types, and the time frequency is in the form of English words.

[0028] According to an embodiment of the time series prediction method based on a multi-granularity time series large model of the present invention, step 4 further includes:

[0029] Step 4-1: Slice the entire time series dataset, including the data after data enhancement, according to the length of l and the sliding window of 1 to obtain the sliced ​​time series;

[0030] Step 4-2: Segment the time series data in the above step 4-1 according to multiple groups of different granularity sizes, so that there is no overlapping part in the middle of the segmented data blocks, and obtain multiple groups of time series groups with different granularity sizes;

[0031] Step 4-3: Transform the multiple groups of time series with different granularities obtained in the above step 4-2 as input data for corresponding time encoding processing so that their dimensions are aligned.

[0032] According to an embodiment of the time series prediction method based on a multi-granularity time series large model of the present invention, step 5 further includes:

[0033] Step 5-1: Freeze the structures in step 1-1, keep their parameters unchanged during fine-tuning, and maintain their original text semantic understanding capabilities;

[0034] Step 5-2: Open up the structures in steps 1-2, 1-3, and 1-4 to train them to gain an understanding of time series.

[0035] The present invention also discloses a time series prediction system based on a multi-granularity time series large model, the system comprising:

[0036] Model building module, which builds a multi-granularity time series model based on the transformation of the language-based basic model;

[0037] The data enhancement module applies a hybrid data enhancement method to enhance the time series data and expand the size of the time series data set;

[0038] The prompt word construction module constructs template prompt words for each batch of time series data for context prompts, assisting the multi-granularity time series model in understanding the time series;

[0039] The vector conversion module converts the original time series data set into multiple groups of two-dimensional vectors according to different granularities, and then concatenates the multiple groups of two-dimensional vectors to form a new data representation;

[0040] The model fine-tuning module fine-tunes the multi-granularity time series large model, so that the pre-trained multi-granularity time series large model solidifies the knowledge of the data set and completes the time series prediction.

[0041] The present invention also discloses a computer device for timing prediction based on a multi-granularity timing large model, characterized in that it comprises a memory, a processor, and program instructions stored in the memory for execution by the processor, wherein the processor executes the program instructions to implement the steps of the timing prediction method based on the multi-granularity timing large model as described above.

[0042] The present invention also discloses a computer-readable storage medium for timing prediction based on a multi-granularity timing large model, which stores program instructions executable by a processor to perform the steps of the timing prediction method based on a multi-granularity timing large model as described above.

[0043] Compared with the prior art, the present invention has the following beneficial effects: the present invention utilizes the semantic understanding ability of a large language model and encodes time series data and its domain-specific knowledge. Specifically, in the scheme of the present invention, a one-dimensional time series is converted into multiple sets of two-dimensional vectors through a multi-granularity representation of time, thereby enhancing the model's time analysis ability. Through the context information and time series alignment method, a templated prompt word is constructed for each batch of time series for context prompts, assisting the multi-granularity time series large model to understand the time series. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] The above features and advantages of the present invention can be better understood after reading the detailed description of the embodiments of the present disclosure in conjunction with the following drawings. In the drawings, the components are not necessarily drawn to scale, and components with similar related properties or features may have the same or similar reference numerals.

[0045] Figure 1 A flow chart of an embodiment of a time series prediction method based on a multi-granularity time series large model of the present invention is shown.

[0046] Figure 2 A schematic diagram showing an example of random sampling.

[0047] Figure 3 A schematic diagram showing an example of a prompt word.

[0048] Figure 4 A schematic diagram showing a multi-granularity segmentation approach.

[0049] Figure 5 A schematic diagram showing the model structure of a multi-granularity time series large model.

[0050] Figure 6 A schematic diagram of an embodiment of a time series prediction system based on a multi-granularity time series large model of the present invention is shown. DETAILED DESCRIPTION

[0051] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. Note that the aspects described below in conjunction with the accompanying drawings and specific embodiments are only exemplary and should not be construed as limiting the scope of protection of the present invention in any way.

[0052] Figure 1 The flow chart of an embodiment of the time series prediction method based on a multi-granularity time series large model of the present invention is shown. Figure 1 , the implementation steps of the method of this embodiment are described in detail as follows.

[0053] Step 1: Build a multi-granularity time series large model based on the language-based basic large model.

[0054] The language-based large model is, for example, the llama3-chinese model.

[0055] Step 1 further includes the following processing steps:

[0056] Step 1-1: If Figure 5 As shown in the left half, the word segmentation and word embedding modules of the language basic model are retained, retaining its original text recognition capabilities.

[0057] Step 1-2: If Figure 5As shown in the right half, multiple (for example, 3) time series matrix vectors of different lengths are added for processing multi-granularity time series data.

[0058] Step 1-3: If Figure 5 As shown in the right half, multiple time series matrix vector ID embedding layers are added to enhance the ability to understand the time series position.

[0059] Step 1-4: Add a fully connected layer between the output of the position embedding and the input of the attention mechanism of the language-based large model to act as an adapter.

[0060] Step 2: Apply a hybrid data enhancement method to enhance the time series data and expand the size of the time series data set.

[0061] Step 2 further includes the following processing steps:

[0062] Step 2-1: If Figure 2 As shown, random sampling is performed from the data set D to extract multiple (eg, k) evenly distributed time series, each of which has a length of l, and the length of each set of data is controlled to be equal.

[0063] Step 2-2: Perform Z-score standardization on the selected time series.

[0064] Step 2-3: Sample a set of non-negative weights m1, m2, ... m k , which is required to conform to the Dirichlet distribution and is used for subsequent time series data weighted generation.

[0065] Step 2-4: Combine the weights generated above and the randomly sampled time series samples to form a new time series, X new =m1(x1)+m2(x2)+…+m k (x k ), where x k Represents the kth randomly sampled time series sample.

[0066] Step 3: For each batch of time series data, construct templated prompt words for each batch for contextual prompts to assist the multi-granularity time series model in understanding the time series.

[0067] Step 3 further includes the following processing steps:

[0068] Step 3-1: If Figure 3 As shown, the name of the labeled dataset and the description of this dataset, where the names and descriptions of different batches of the same dataset should remain consistent.

[0069] Step 3-2: Mark the mean, standard deviation, and time frequency of each batch of time series. The mean and standard deviation are floating point types, and the time frequency is in the form of English words.<second,minute,hour,day,week,month,quarter,year> .

[0070] Step 4: Convert the original time series data set into multiple groups of two-dimensional vectors according to different granularities, and concatenate these groups of two-dimensional vectors to form a new data representation.

[0071] Step 4 further includes the following processing steps:

[0072] Step 4-1: Slice the entire time series dataset, including the data after data enhancement, according to the length of l and the sliding window of 1 to obtain the sliced ​​time series.

[0073] Step 4-2: Split the time series data in step 4-1 above into three groups of different granularity sizes (for example, split the original time series into 5, 4, and 3 parts, respectively). The length of the sequence data is divided into batches, such as Figure 4 As shown, there is no overlapping part in the middle of the segmented data blocks, and three groups of time series with different granularities are obtained.

[0074] Step 4-3: The three groups of time series with different granularities obtained in the above step 4-2 are transformed as input data for the corresponding time encoding processing so that their dimensions are aligned.

[0075] Step 5: Fine-tune the multi-granularity time series large model so that the pre-trained multi-granularity time series large model can solidify the knowledge of the data set and complete the time series prediction.

[0076] Step 5 further includes the following processing:

[0077] Step 5-1: Freeze the structures in step 1-1 and keep their parameters unchanged during fine-tuning to maintain their original text semantic understanding capabilities.

[0078] Step 5-2: Open up the structures in steps 1-2, 1-3, and 1-4 to train them to gain an understanding of time series.

[0079] In the process of time series prediction, the construction of the trainable data set is completed. The prompt words for all batches of the data set are constructed based on business knowledge and aligned with the time series data.

[0080] The application scenario in the above embodiment is, for example, a financial product scenario, and the time series data is financial time series data.

[0081] Figure 6 The principle of an embodiment of the time series prediction system based on a multi-granularity time series large model of the present invention is shown. Figure 6 The system of this embodiment includes: a model construction module, a data enhancement module, a prompt word construction module, a vector conversion module, and a model fine-tuning module.

[0082] The model building module builds a multi-granularity time series large model based on the transformation of the language-based basic large model.

[0083] The model building module is further configured to handle the following processes:

[0084] Step 1-1: If Figure 5 As shown in the left half, the word segmentation and word embedding modules of the language basic model are retained, retaining its original text recognition capabilities.

[0085] Step 1-2: If Figure 5 As shown in the right half, multiple (for example, 3) time series matrix vectors of different lengths are added for processing multi-granularity time series data.

[0086] Step 1-3: If Figure 5 As shown in the right half, multiple time series matrix vector ID embedding layers are added to enhance the ability to understand the time series position.

[0087] Step 1-4: Add a fully connected layer between the output of the position embedding and the input of the attention mechanism of the language-based large model to act as an adapter.

[0088] The data enhancement module applies a hybrid data enhancement method to enhance the time series data and expand the size of the time series data set.

[0089] The data enhancement module is further configured to handle the following processes:

[0090] Step 2-1: If Figure 2 As shown, random sampling is performed from the data set D to extract multiple (eg, k) uniformly distributed time series, each of which has a length of l, and the length of each group of data is controlled to be equal.

[0091] Step 2-2: Perform Z-score standardization on the selected time series.

[0092] Step 2-3: Sample a set of non-negative weights m1, m2, ... m k , which is required to conform to the Dirichlet distribution and is used for subsequent time series data weighted generation.

[0093] Step 2-4: Combine the weights generated above and the randomly sampled time series samples to form a new time series, X new =m1(x1)+m2(x2)+…+m k (x k ), where x k Represents the kth randomly sampled time series sample.

[0094] The prompt word construction module constructs templated prompt words for each batch of time series data for contextual prompts, assisting the multi-granularity time series model in understanding the time series.

[0095] The prompt word building module is further configured to handle the following processes:

[0096] Step 3-1: If Figure 3 As shown, the name of the labeled dataset and the description of this dataset, where the names and descriptions of different batches of the same dataset should remain consistent.

[0097] Step 3-2: Mark the mean, standard deviation, and time frequency of each batch of time series. The mean and standard deviation are floating point types, and the time frequency is in the form of English words.<second,minute,hour,day,week,month,quarter,year> .

[0098] The vector conversion module converts the original time series data set into multiple groups of two-dimensional vectors according to different granularities, and splices the multiple groups of two-dimensional vectors to form a new data representation.

[0099] The vector conversion module is further configured to handle the following processes:

[0100] Step 4-1: Slice the entire time series dataset, including the data after data enhancement, according to the length of l and the sliding window of 1 to obtain the sliced ​​time series.

[0101] Step 4-2: Split the time series data in step 4-1 above into three groups of different granularity sizes (for example, split the original time series into 5, 4, and 3 parts, respectively). The length of the sequence data is divided into batches, such as Figure 4 As shown, there is no overlapping part in the middle of the segmented data blocks, and three groups of time series with different granularities are obtained.

[0102] Step 4-3: The three groups of time series with different granularities obtained in the above step 4-2 are transformed as input data for the corresponding time encoding processing so that their dimensions are aligned.

[0103] The model fine-tuning module fine-tunes the multi-granularity time series large model, so that the pre-trained multi-granularity time series large model solidifies the knowledge of the data set and completes the time series prediction.

[0104] The model fine-tuning module is further configured to handle the following processes:

[0105] Step 5-1: Freeze the structures in step 1-1 and keep their parameters unchanged during fine-tuning to maintain their original text semantic understanding capabilities.

[0106] Step 5-2: Open up the structures in steps 1-2, 1-3, and 1-4 to train them to gain an understanding of time series.

[0107] In the process of time series prediction, the construction of the trainable data set is completed. The prompt words for all batches of the data set are constructed based on business knowledge and aligned with the time series data.

[0108] The present invention also discloses a computer device for time series prediction based on a multi-granularity time series large model, comprising a memory, a processor, and program instructions stored in the memory for execution by the processor, wherein the processor executes the program instructions to implement the steps of an embodiment of the time series prediction method based on a multi-granularity time series large model as described above, and the specific steps are not repeated here.

[0109] The present invention also discloses a computer-readable storage medium for time series prediction based on a multi-granularity time series large model, which stores program instructions executable by a processor, and the steps of an embodiment of the time series prediction method based on a multi-granularity time series large model as described above, and the specific steps are not repeated here.

[0110] Although the above methods are illustrated and described as a series of actions for simplicity of explanation, it should be understood and appreciated that these methods are not limited by the order of the actions, because according to one or more embodiments, some actions may occur in a different order and / or concurrently with other actions from those illustrated and described herein or not illustrated and described herein but understandable to those skilled in the art.

[0111] Those skilled in the art will further appreciate that the various illustrative logic blocks, modules, circuits, and algorithm steps described in conjunction with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or a combination of the two. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps are generally described above in terms of their functionality. Whether such functionality is implemented as hardware or software depends on the specific application and the design constraints imposed on the overall system. The technician may implement the described functionality in different ways for each specific application, but such implementation decisions should not be interpreted as resulting in a departure from the scope of the present invention.

[0112] The various illustrative logic blocks, modules, and circuits described in conjunction with the embodiments disclosed herein may be implemented or performed with a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. The processor may also be implemented as a combination of computing devices, such as a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in cooperation with a DSP core, or any other such configuration.

[0113] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software module may reside in a RAM memory, a flash memory, a ROM memory, an EPROM memory, an EEPROM memory, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to a processor so that the processor can read and write information from / to the storage medium. In an alternative, a storage medium may be integrated into a processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in a user terminal. In an alternative, the processor and the storage medium may reside in a user terminal as discrete components.

[0114] In one or more exemplary embodiments, the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented as a computer program product in software, each function may be stored on or transmitted by a computer-readable medium as one or more instructions or codes. Computer-readable media include both computer storage media and communication media, including any medium that facilitates the transfer of a computer program from one place to another. Storage media may be any available medium that can be accessed by a computer. As an example and not limitation, such a computer-readable medium may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, disk storage or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of an instruction or data structure and can be accessed by a computer. Any connection is also properly referred to as a computer-readable medium. For example, if the software is transmitted from a website, a server, or other remote source using a coaxial cable, a fiber optic cable, a twisted pair, a digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwaves, the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwaves are included in the definition of the medium. Disk and disc as used herein include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc, wherein disk often reproduces data magnetically, while disc reproduces data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.

[0115] The previous description of the disclosure is provided to enable any person skilled in the art to make or use the disclosure. Various modifications to the disclosure will be apparent to those skilled in the art, and the general principles defined herein may be applied to other variations without departing from the spirit or scope of the disclosure. Thus, the disclosure is not intended to be limited to the examples and designs described herein, but should be granted the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A time series prediction method based on a multi-granularity time series large model, characterized in that: Methods include: Step 1: Build a multi-granularity time series model based on the language-based basic model; Step 2: Apply hybrid data enhancement methods to enhance the time series data and expand the size of the time series data set; Step 3: For each batch of time series data, construct templated prompt words for each batch for context prompts to assist the multi-granularity time series model in understanding the time series; Step 4: Convert the original time series data set into multiple sets of two-dimensional vectors according to different granularities, and concatenate the multiple sets of two-dimensional vectors to form a new data representation; Step 5: Fine-tune the multi-granularity time series large model so that the pre-trained multi-granularity time series large model can solidify the knowledge of the data set and complete the time series prediction.

2. The time series prediction method based on a multi-granularity time series large model according to claim 1 is characterized in that: Step 1 further comprises: Step 1-1: Keep the word segmentation and word embedding modules of the language-based large model and retain its original text recognition capabilities; Step 1-2: Add multiple time series matrix vectors of different lengths for processing multi-granularity time series data; Step 1-3: Add multiple time series matrix vector ID embedding layers to enhance the understanding of time series position; Step 1-4: Add a fully connected layer between the output of the position embedding and the input of the attention mechanism of the language-based large model to act as an adapter.

3. The time series prediction method based on a multi-granularity time series large model according to claim 1 is characterized in that: Step 2 further includes: Step 2-1: Randomly sample from the data set and extract k uniformly distributed time series. The length of each series is l, and the length of each group of data is controlled to be equal, where k is a natural number; Step 2-2: Perform Z-score standardization on the selected time series; Step 2-3: Sample a set of non-negative weights m1, m2, ... m k , which is required to conform to the Dirichlet distribution and is used for subsequent time series data weighted generation, where Step 2-4: Combine the weights generated above and the randomly sampled time series samples to form a new time series, X new =m1(x1)+m2(x2)+…+m k (x k ), where x k Represents the kth randomly sampled time series sample.

4. The time series prediction method based on a multi-granularity time series large model according to claim 1, characterized in that: Step 3 further includes: Step 3-1: Label the name of the dataset and a description of the dataset. The names and descriptions of different batches of the same dataset should remain consistent. Step 3-2: Mark the time series mean, standard deviation, and time frequency of each batch. The mean and standard deviation are floating point types, and the time frequency is in the form of English words.

5. The time series prediction method based on a multi-granularity time series large model according to claim 1, characterized in that: Step 4 further includes: Step 4-1: Slice the entire time series dataset, including the data after data enhancement, according to the length of l and the sliding window of 1 to obtain the sliced ​​time series; Step 4-2: Segment the time series data in step 4-1 according to multiple groups of different granularity sizes, so that there is no overlapping part in the data blocks after segmentation, and obtain multiple groups of time series groups with different granularity sizes; Step 4-3: Transform the multiple groups of time series with different granularities obtained in the above step 4-2 as input data for corresponding time encoding processing so that their dimensions are aligned.

6. The time series prediction method based on a multi-granularity time series large model according to claim 1, characterized in that: Step 5 further includes: Step 5-1: Freeze the structures in step 1-1, keep their parameters unchanged during fine-tuning, and maintain their original text semantic understanding capabilities; Step 5-2: Open up the structures in steps 1-2, 1-3, and 1-4 to train them to gain an understanding of time series.

7. A time series prediction system based on a multi-granularity time series large model, characterized in that: The system includes: Model building module, which builds a multi-granularity time series model based on the transformation of the language-based basic model; The data enhancement module applies a hybrid data enhancement method to enhance the time series data and expand the size of the time series data set; The prompt word construction module constructs template prompt words for each batch of time series data for context prompts, assisting the multi-granularity time series model in understanding the time series; The vector conversion module converts the original time series data set into multiple groups of two-dimensional vectors according to different granularities, and then concatenates the multiple groups of two-dimensional vectors to form a new data representation; The model fine-tuning module fine-tunes the multi-granularity time series large model, so that the pre-trained multi-granularity time series large model solidifies the knowledge of the data set and completes the time series prediction.

8. A computer device for time series prediction based on a multi-granularity time series large model, characterized in that: It comprises a memory, a processor and program instructions stored in the memory and executable by the processor, wherein the processor executes the program instructions to implement the steps of the time series prediction method based on a multi-granularity time series large model as described in any one of claims 1 to 6.

9. A computer-readable storage medium for time series prediction based on a multi-granularity time series large model, which stores program instructions executable by a processor to perform the steps of the time series prediction method based on a multi-granularity time series large model as described in any one of claims 1 to 6.

Citation Information

Cited By

  • Industrial equipment service life prediction method based on large model knowledge enhancement

    CN119884653A

  • A method for predicting the service life of industrial equipment based on large model knowledge enhancement

    CN119884653B

  • Time sequence prediction method and device for performing multi-level text alignment by using large model

    CN121117525A

  • Time series prediction method and device for multi-level text alignment using large models

    CN121117525B