Method, device and equipment for training prediction model

By acquiring and training time series sets and fine-tuning the pre-trained model using a low-rank adapter, the problem of insufficient flexibility of time series prediction models in tasks with different step sizes is solved, and the accuracy and efficiency of multi-task prediction are improved.

CN121390362APending Publication Date: 2026-01-23SWEET POTATO TECHNOLOGY (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511586053.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-31
Publication Date
2026-01-23

AI Technical Summary

Technical Problem

Existing time series forecasting models lack flexibility when handling forecasting tasks of different time lengths, resulting in insufficient forecasting error and accuracy, which affects the effectiveness of business decisions.

Method used

By acquiring the first and second time series sets, the initial prediction model is pre-trained. Based on the pre-trained model, the model is configured for multiple prediction tasks, and the pre-trained model is fine-tuned using a low-rank adapter. Finally, the updated prediction model is trained to obtain a trained prediction model capable of handling multiple tasks.

Benefits of technology

It improves the accuracy of multi-task prediction, ensuring that other tasks can be processed based on accurate single-task prediction results during the multi-task prediction process, thereby reducing computing resource consumption and storage costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121390362A_ABST
    Figure CN121390362A_ABST
Patent Text Reader

Abstract

Embodiments of the invention provide a prediction model training method, apparatus and device. The method comprises the steps of obtaining a first time sequence set and a second time sequence set; calling an initial prediction model to execute a specified prediction task for the first time sequence set, and pre-training the initial prediction model based on a single-task prediction result of the specified prediction task to obtain a pre-trained prediction model; based on the pre-trained prediction model, performing model configuration on a plurality of prediction tasks to obtain an updated prediction model; and calling the updated prediction model to execute the plurality of prediction tasks for the second time sequence set, and training the updated prediction model based on a multi-task prediction result of the plurality of prediction tasks to obtain a trained prediction model.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present specification relate to the technical field of computer technology, and in particular to a training method, device and equipment of a prediction model. BACKGROUND

[0002] In the field of large-scale time series prediction, multi-step prediction is one of the core tasks. Multi-step prediction, unlike single-step prediction, requires historical time series data to be used as input to a model to output prediction results for multiple consecutive time steps in the future. It is widely used in key business scenarios such as energy load scheduling, urban traffic flow control, and supply chain demand planning.

[0003] In practical applications, the accuracy of multi-step prediction directly determines the effectiveness of business decisions. Accurate multi-step prediction can optimize resource allocation, avoid potential risks, and reduce operating costs, etc. However, small prediction errors can be amplified over multiple time steps, leading to significant decision-making errors and resulting in huge economic losses or resource waste. Therefore, how to train a prediction model to accurately perform multi-step prediction is a technical problem that needs to be solved. SUMMARY

[0004] Therefore, the embodiments of the present specification provide a training method of a prediction model. One or more embodiments of the present specification also relate to a task prediction method, a training device of a prediction model, a time series data processing device, a computing device, a computer-readable storage medium, and a computer program product to solve the technical defects in the prior art.

[0005] According to a first aspect of the embodiments of the present specification, a training method of a prediction model is provided, comprising: obtaining a first time series set and a second time series set; calling an initial prediction model to perform a specified prediction task on the first time series set, and pre-training the initial prediction model based on a single-task prediction result of the specified prediction task to obtain a pre-trained prediction model; based on the pre-trained prediction model, performing model configuration for multiple prediction tasks respectively to obtain an updated prediction model; calling the updated prediction model to perform the multiple prediction tasks on the second time series set, and training the updated prediction model based on a multi-task prediction result of the multiple prediction tasks to obtain a trained prediction model.

[0006] According to a second aspect of the embodiments of the present specification, a task prediction method is provided, comprising: obtaining time series data to be processed; input the to-be-processed time series data into the trained prediction model to generate target prediction results of multiple prediction tasks, the prediction model being trained by the training method of the prediction model.

[0007] According to a third aspect of the embodiments of the present specification, a training device of a prediction model is provided, the device comprising: a sample obtaining module configured to obtain a first time series set and a second time series set; a first training module configured to invoke an initial prediction model to perform a specified prediction task on the first time series set, and pre-train the initial prediction model based on a single-task prediction result of the specified prediction task to obtain a pre-trained prediction model; a model configuration module configured to perform model configuration on multiple prediction tasks based on the pre-trained prediction model to obtain an updated prediction model; a second training module configured to invoke the updated prediction model to perform the multiple prediction tasks on the second time series set, and train the updated prediction model based on multi-task prediction results of the multiple prediction tasks to obtain a trained prediction model.

[0008] According to a fourth aspect of the embodiments of the present specification, a time series data processing device is provided, comprising: a to-be-processed data obtaining module configured to obtain to-be-processed time series data; a to-be-processed data input module configured to input the to-be-processed time series data into the trained prediction model to generate target prediction results of multiple prediction tasks, the trained prediction model being trained by the training method of the prediction model.

[0009] According to a fifth aspect of the embodiments of the present specification, a computing device is provided, comprising: a memory and a processor; the memory is configured to store computer executable instructions, and the processor is configured to execute the computer executable instructions, the computer executable instructions being executed by the processor to implement the steps of the above method.

[0010] According to a sixth aspect of the embodiments of the present specification, a computer readable storage medium is provided, which stores computer executable instructions, the instructions being executed by the processor to implement the steps of the above method.

[0011] According to a seventh aspect of the embodiments of the present specification, a computer program product is provided, comprising a computer program or instructions, the computer program or instructions being executed by the processor to implement the steps of the above method.

[0012] The training method of the prediction model provided in this embodiment can obtain a first time series set and a second time series set, call an initial prediction model to perform a specified prediction task on the first time series set, pretrain the initial prediction model based on a single-task prediction result of the specified prediction task to obtain a pretraining prediction model, configure the pretraining prediction model based on the pretraining prediction model for multiple prediction tasks to obtain an updated prediction model, call the updated prediction model to perform the multiple prediction tasks on the second time series set, and train the updated prediction model based on a multi-task prediction result of the multiple prediction tasks to obtain a trained prediction model. In this specification embodiment, the initial prediction model can be trained by using the first time series set to obtain a pretraining prediction model capable of processing a specified prediction task, i.e., a single task. The pretraining prediction model is configured for multiple prediction tasks to obtain an updated prediction model, and the updated prediction model is trained for the multiple prediction tasks to obtain a trained prediction model capable of processing multiple tasks. Since the trained prediction model is obtained by training the model having the single-task prediction capability for the multiple prediction tasks, the trained prediction model can process other tasks in the multiple tasks based on accurate single-task prediction results in the process of performing multi-task prediction, thereby improving the accuracy of multi-task prediction. BRIEF DESCRIPTION OF DRAWINGS

[0013] Figure 1 FIG. 1 is a flowchart of a training method of a prediction model according to an embodiment of the present specification; Figure 2 FIG. 2 is a flowchart of a model training method based on a step-invariant representation method according to an embodiment of the present specification; Figure 3 FIG. 3 is a flowchart of a model training method based on a stepwise representation adaptive method according to an embodiment of the present specification; Figure 4 FIG. 4 is a flowchart of a model training method based on an optimized stepwise representation adaptive method according to an embodiment of the present specification; Figure 5 FIG. 5 is a flowchart of a task prediction method according to an embodiment of the present specification; Figure 6 FIG. 6 is a flowchart of a task prediction method according to an embodiment of the present specification; Figure 7 FIG. 7 is a structural schematic diagram of a training device of a prediction model according to an embodiment of the present specification; Figure 8 FIG. 8 is a structural schematic diagram of a time series data processing device according to an embodiment of the present specification; Figure 9 FIG. 9 is a structural block diagram of a computing device according to an embodiment of the present specification. DETAILED DESCRIPTION

[0014] In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present description. However, the present description can be practiced without the specific details, and it is understood that the present description is not limited to the embodiments described herein. In other instances, well-known methods, procedures, components, and circuits have not been described in detail for the sake of clarity and conciseness.

[0015] The terminology used in this description is for the purpose of describing particular embodiments only and is not intended to be limiting of one or more embodiments of the present description. As used in one or more embodiments of the present description and the appended claims, the singular forms "a," "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.

[0016] It will be understood that, although the terms first, second, etc. can be used herein to describe various information, these terms are not intended to denote a temporal or chronological order. Rather, these terms are used solely to distinguish one from another only. For example, without departing from the scope of one or more embodiments of the present description, first can be termed second and, similarly, second can be termed first. The term "if can be construed to mean "when" or "upon" or "in response to determining" depending on the context, as used herein.

[0017] In addition, it should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in one or more embodiments of the present description are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation portal for user to choose authorization or refusal.

[0018] In the present description, a training method of a prediction model is provided, and the present description also relates to a task prediction method, a training device of a prediction model, a time series data processing device, a computing device, a computer readable storage medium, and a computer program product, which are described in detail one by one in the following embodiments.

[0019] In large-scale time series forecasting tasks, accurate multi-step forecasts are crucial for business decision-making. However, traditional time series forecasting models (such as Transformer-based models) lack flexibility in handling forecasting tasks with different step sizes. For example, these models typically use a uniform shared representation to handle forecasting tasks with different step sizes, which makes them unable to effectively adapt to the characteristic differences between different forecasting step sizes. This affects the model's data processing performance in large-scale time series forecasting tasks and easily introduces unavoidable forecasting errors, thus impacting the accuracy of the forecasting task.

[0020] See Figure 1 , Figure 1 This is a flowchart illustrating a training method for a prediction model according to an embodiment of this specification. The training method for the prediction model includes the following specific steps: Step S102: Obtain the first time series set and the second time series set.

[0021] In the embodiments of this specification, the time series set can be a collection of time series data, such as a time sequence data set. Optionally, the time series data included in the time series set can be single-modal language data such as images, text, and speech, or it can be multimodal language data including at least two modalities of images, text, and speech.

[0022] In the embodiments of this specification, the time series set includes time series data that can be data from a multi-task prediction scenario. Optionally, the multi-task prediction scenario can be a weather monitoring scenario, an energy load scheduling scenario, an urban traffic flow control scenario, a text generation scenario, a speech generation scenario, etc. Multi-task prediction can refer to task prediction under multiple step sizes. Here, step size refers to the number of prediction tasks or the number of prediction results output by the model. For example, if the time series set includes time series data from a weather monitoring scenario, such as temperature data for a certain time period, multi-task prediction can refer to predicting the temperature for multiple future time periods based on the temperature data for that specific time period, and the model can output the temperature prediction results for multiple future time periods. Similarly, if the time series set includes time series data from an urban traffic flow scenario, such as traffic flow data for a certain time period, multi-task prediction can refer to predicting the traffic flow for multiple future time periods based on the traffic flow data for that specific time period, and the model can output the traffic flow prediction results for multiple future time periods. For example, the temporal set contains temporal data that is data in the speech generation scenario, such as speech data arranged in chronological order. Multi-task prediction can refer to predicting multiple subsequent speech data based on this speech data. The model can output the prediction results of multiple speech data arranged in chronological order.

[0023] As a specific implementation, the first time series set and the second time series set can be used as training samples to train the prediction model. Optionally, the first time series set can be used to perform single-task prediction, and the second time series set can be used to perform multi-task prediction. The single-task prediction can refer to task prediction at a single step, and the multi-task prediction can refer to task prediction at multiple steps. Optionally, the first time series set can include first historical time series data and first target time series data corresponding to the first historical time series data, and the first target time series data can be data of a future time period of the first historical time series data. The second time series set can include second historical time series data and second target time series data corresponding to the second historical time series data, and the second target time series data can be data of multiple future time periods of the second historical time series data.

[0024] In the embodiments of the present specification, there are various ways to obtain the first time series set and the second time series set. For example, time series data can be obtained from an open source time series database, or time series data can be collected from a business system, or a large language model can be used to generate time series data, etc. Optionally, the obtained time series data can include data of different time granularities, such as second-level data, minute-level data, hour-level data, etc.

[0025] In actual applications, the first time series set and the second time series set can be from the same or different data sources. After obtaining the first time series set and the second time series set, the time series set can be processed through data preprocessing such as normalization, denoising, filling missing values, etc. to improve data quality, thereby improving the data prediction accuracy of the trained prediction model.

[0026] In step S104, an initial prediction model is called to perform a specified prediction task on the first time series set, and the initial prediction model is pre-trained based on a single-task prediction result of the specified prediction task to obtain a pre-trained prediction model.

[0027] In the embodiments of the present specification, the first time series set can be used to train the initial prediction model to obtain a pre-trained prediction model capable of single-task prediction.

[0028] Optionally, the initial prediction model can be a time series prediction model based on a neural network, such as a Transformer model, a Long Short-Term Memory (LSTM) model, or a Gated Recurrent Unit (GRU), etc.

[0029] As a specific implementation, the specified prediction task can be a single-step prediction task. Alternatively, the specified prediction task can be a specific prediction task in a multi-step prediction task, etc.

[0030] In an embodiment of the present specification, the first historical time series data in the first time series set can be input into an initial prediction model, and the initial prediction model can perform single-step prediction on the first historical time series data, so that the initial prediction model can output a single-task prediction result. The single-task prediction result can refer to the result of single-step prediction.

[0031] Optionally, the initial prediction model can be pre-trained according to the single-task prediction result. For example, a first loss can be calculated according to the first target time series data in the first time series set and the single-task prediction result, and the parameters of the initial prediction model can be adjusted according to the first loss, so as to obtain a pre-trained prediction model. Optionally, the pre-trained prediction model can be a model with single-task prediction capability.

[0032] In an embodiment of the present specification, the pre-trained prediction model with single-task prediction capability can be obtained by calling the initial prediction model to perform a specified prediction task on the first time series set. The pre-trained prediction model can be used as a foundation model for subsequent model training, providing a high-quality representation basis for subsequent multi-step prediction.

[0033] In step S106, based on the pre-trained prediction model, model configuration is performed for each of the plurality of prediction tasks, and an updated prediction model is obtained.

[0034] In an embodiment of the present specification, for any one of the plurality of prediction tasks, the any one prediction task can be a prediction task under multiple steps. For example, if the plurality of prediction tasks is five prediction tasks, each of the five prediction tasks can be a prediction task under multiple steps.

[0035] Optionally, the model configuration for each of the plurality of prediction tasks can be performed for each of the plurality of prediction tasks, so as to obtain an updated prediction model for each of the plurality of prediction tasks. Continuing the above example, if the plurality of prediction tasks is five prediction tasks, the model configuration for the five prediction tasks can obtain an updated prediction model for the five prediction tasks. As a specific implementation, the obtained updated prediction model can be one updated prediction model, or a plurality of updated prediction models corresponding to the plurality of prediction tasks. For example, if the plurality of prediction tasks is five prediction tasks, the model configuration can obtain one updated prediction model, or five updated prediction models.

[0036] Optionally, the model configuration can be adjusting the parameters of the pre-trained prediction model, such as increasing the parameters of the pre-trained prediction model, deleting the parameters of the pre-trained prediction model, and the like.

[0037] As a specific implementation, the model configuration can be performed by using a low-rank adaptation manner. The low-rank adaptation (LoRA) is a parameter-efficient fine-tuning method, which adjusts the model weights by introducing a low-rank matrix, so as to adapt to new tasks without significantly increasing the number of parameters.

[0038] In the embodiments of the present specification, the model configuration is performed for multiple prediction tasks, and the obtained updated prediction model for each prediction task can be used for training of each prediction task to obtain a model capable of processing each step prediction task.

[0039] In step S108, the updated prediction model is called to perform the multiple prediction tasks on the second time series set, and the updated prediction model is trained based on the multi-task prediction results of the multiple prediction tasks to obtain a trained prediction model.

[0040] In the embodiments of the present specification, the updated prediction model can be trained by using the second time series set to obtain a prediction model capable of performing multiple task predictions.

[0041] Optionally, the updated prediction model can be trained for any prediction task in the multiple prediction tasks. For example, the time series data corresponding to any prediction task in the second time series set can be determined, and then the updated prediction model is trained by using the time series data. For example, the time series data corresponding to any prediction task includes certain historical time series data and certain target time series data, and the certain target time series data can be data in multiple time periods in the future of the certain historical time series data. Optionally, the certain historical time series data can be input into the updated prediction model, and the updated prediction model performs multi-step prediction on the certain historical time series data, so that the updated prediction model can output a multi-task prediction result, and the multi-task prediction result can represent a multi-step prediction result.

[0042] As a specific implementation, the embodiments of the present specification can also pre-train the updated prediction model according to the multi-task prediction result, for example, the second loss can be calculated according to the certain target time series data and the multi-task prediction result, and the parameters of the initial updated prediction model are adjusted according to the second loss, so as to obtain a trained prediction model. Optionally, the trained prediction model can be a model having single-task prediction capability and multi-task prediction capability.

[0043] In the embodiments of the present specification, the initial prediction model can be trained using the first time series set to obtain a pre-trained prediction model capable of processing a specified prediction task, i.e., a single task. The pre-trained prediction model is configured for multiple prediction tasks to obtain an updated prediction model, and the updated prediction model is trained for multiple prediction tasks to obtain a trained prediction model capable of processing multiple tasks. Since the trained prediction model is trained for multiple prediction tasks based on a model with single task prediction capability, it can process other tasks in the multiple tasks based on accurate single task prediction results during the execution of the multiple task prediction process, thereby improving the accuracy of the multiple task prediction.

[0044] As a specific implementation, the target time series set can be obtained first, and then the target time series set can be divided to conveniently obtain the first time series set and the second time series set. Optionally, the first time series set and the second time series set can be obtained, specifically including: The target time series set is obtained, the target time series set including historical time series data and target time series data, the target time series data being data of the historical time series data in future time periods; The target time series set is divided into the first time series set and the second time series set according to the target time series data, the first time series set including first historical time series data and first target time series data under the specified prediction task, and the second time series set including second historical time series data and second target time series data under the multiple prediction tasks.

[0045] In the embodiments of the present specification, there are various ways to obtain the target time series set. For example, the target time series set can be obtained from an open source time series database, or the target time series set can be collected from a business system, or the target time series set can be generated using a large language model, etc. Optionally, the obtained target time series set can include data of different time granularities, such as second-level data, minute-level data, hour-level data, etc. Optionally, the obtained target time series set can be a data set in various scenarios, such as data in weather monitoring scenarios, energy load scheduling scenarios, urban traffic flow control scenarios, text generation scenarios, voice generation scenarios, etc.

[0046] Optionally, the target time series set can include historical time series data and target time series data, and the target time series data can be data of the historical time series data in future time periods. For example, the historical time series data can be temperature data in a certain time period, and the target time series data can be temperature data in future time periods of the certain time period.

[0047] Optionally, the target time series set can be divided into a first time series set and a second time series set according to the target time series data. For example, the target time series set can be divided into a first time series set and a second time series set according to the number of time periods included in the target time series data. For example, the first time series set can include first historical time series data and first target time series data corresponding to the first historical time series data, and the first target time series data can be data of a future time period of the first historical time series data. The second time series set can include second historical time series data and second target time series data corresponding to the second historical time series data, and the second target time series data can be data of multiple future time periods of the second historical time series data.

[0048] In an embodiment of the present specification, an initial prediction model can be trained based on the first time series set, so that a pre-training prediction model with single-task prediction capability can be obtained, thereby providing a high-quality representation basis for subsequent multi-step prediction. Optionally, the first time series set includes first historical time series data and first target time series data under a specified prediction task; the initial prediction model is called to perform the specified prediction task on the first time series set, and the initial prediction model is pre-trained based on a single-task prediction result of the specified prediction task. Specifically, it can include: The initial prediction model is called to perform the specified prediction task on the first historical time series data, and a single-task prediction result of the specified prediction task is obtained.

[0049] Based on the first target time series data and the single-task prediction result, a first loss is calculated.

[0050] The initial prediction model is pre-trained based on the first loss.

[0051] Optionally, the first time series set can include first historical time series data and first target time series data corresponding to the first historical time series data, and the first target time series data can be data of a future time period of the first historical time series data.

[0052] As a specific implementation, the initial prediction model is called to perform the specified prediction task on the first historical time series data, which can specifically be inputting the first historical time series data into the initial prediction model to obtain a single-task prediction result of the initial prediction model on the first historical time series data. The single-task prediction result can be a prediction result under a single-step length.

[0053] As a specific embodiment, the first loss can be calculated based on the first target time series data and the single-task prediction result by using a mean squared error (MSE), a mean absolute error (MAE), or a cross-entropy loss function. The first loss can be used to measure the difference between the single-task prediction result and the first target time series data. For example, if the first target time series data is "the average temperature on Wednesday is 20℃" and the single-task prediction result is "the average temperature on Wednesday is 21℃", the first loss can reflect the difference between the two.

[0054] Optionally, based on the first loss, the initial prediction model is pre-trained, for example, the parameters of the initial prediction model can be iteratively adjusted by using a gradient descent algorithm (such as an Adam optimizer) to minimize the first loss, thereby obtaining a pre-trained prediction model.

[0055] In actual applications, in the process of training (such as fine-tuning) a large model, the traditional way is to fine-tune all parameters of the large model. However, this way will cause high consumption of computing resources due to the large number of parameters of the large model, and will also increase the storage cost of multiple customized models. Therefore, in order to reduce the computing resource consumption of model parameter fine-tuning and avoid the storage cost of multiple customized models, a low-rank adaptation technology can be used to fine-tune the pre-trained prediction model in the embodiments of the present specification. Optionally, the model configuration based on the pre-trained prediction model for multiple prediction tasks to obtain an updated prediction model can specifically include: The pre-trained prediction model is fine-tuned by using a low-rank adapter for multiple prediction tasks to obtain an updated prediction model for predicting the multiple prediction tasks.

[0056] The low-rank adapter (Low-Rank Adaptation, LoRA) is an efficient model fine-tuning method for adapting a pre-trained model (especially a large language model) to a specific task without modifying all parameters of the model. The core idea of the low-rank adapter is to fine-tune by adding a low-rank decomposition update matrix to the weight matrix of the pre-trained model, and only train the parameters of these low-rank matrices while freezing the original model parameters. This method significantly reduces the computing and storage costs, while the performance is close to that of full-parameter fine-tuning on many tasks.

[0057] In the embodiments of the present specification, the pre-trained prediction model can be fine-tuned by using a low-rank adapter for multiple prediction tasks. Specifically, the pre-trained prediction model can be fine-tuned by using a low-rank adapter for any prediction task in the multiple prediction tasks, thereby obtaining an updated prediction model for predicting the multiple prediction tasks.

[0058] Among them, fine-tuning (Supervised Fine-tuning, SFT) is also called supervised fine-tuning or supervised fine-tuning, which is a technology that further optimizes the model to adapt to a specific task or field using labeled data of a specific task on the basis of a pre-trained model. For example, if the pre-trained model is trained on a general image classification task, fine-tuning may involve further training the model on a dataset in a specific field such as medical imaging or satellite images. The core of fine-tuning is to retain the general capabilities of large language models and improve the professional capabilities of the model in specific fields or scenarios.

[0059] In practical applications, time series data has strong autocorrelation, which makes there is correlation between multiple prediction steps. The embodiments of the present specification can utilize the correlation between prediction steps to fine-tune the pre-trained prediction model, improve the training efficiency and training effect of the model. Optionally, the pre-trained prediction model is fine-tuned by using a low-rank adapter for multiple prediction tasks to obtain an updated prediction model for predicting the multiple prediction tasks, which can specifically include: The pre-trained model is processed by a low-rank adapter to obtain a pre-trained model containing multiple low-rank adapter modules.

[0060] The outputs of the multiple low-rank adapter modules are adaptively weighted to obtain an updated prediction model for predicting the multiple prediction tasks.

[0061] In the embodiments of the present specification, the pre-trained model is processed by a low-rank adapter, which can be configured with a low-rank adapter module, such as injecting a low-rank adapter module into the pre-trained model. The low-rank adapter module can be a trainable low-rank matrix, through which the model can be adapted to a specific task, such as adapting the model to multiple prediction tasks.

[0062] Optionally, in order to utilize the correlation between prediction steps to fine-tune the pre-trained prediction model and improve the training efficiency and training effect of the model, the embodiments of the present specification can adaptively weight the outputs of the multiple low-rank adapter modules. Specifically, the partial parameter sharing between different low-rank adapters can be achieved through a mixture-of-experts mechanism, so that the model can utilize the correlation between prediction steps, enrich the supervision signal, and thus improve the effect of step-specific adaptation.

[0063] In an embodiment of the present specification, the second time series set can be used to train the updated prediction model for multiple prediction tasks to obtain a trained prediction model. Optionally, the second time series set comprises second historical time series data and second target time series data under the multiple prediction tasks; and the updated prediction model is invoked to perform the multiple prediction tasks on the second time series set, and the updated prediction model is trained based on multi-task prediction results of the multiple prediction tasks, which can specifically include: The updated prediction model is invoked to perform the multiple prediction tasks on the second historical time series data to obtain multi-task prediction results of the multiple prediction tasks.

[0064] Based on the second target time series data and the multi-task prediction results, a second loss is calculated.

[0065] The updated prediction model is trained based on the second loss.

[0066] Optionally, the second time series set can comprise second historical time series data and second target time series data corresponding to the second historical time series data, and the second target time series data can be data of a plurality of future time periods of the second historical time series data.

[0067] As a specific implementation, the updated prediction model is invoked to perform the multiple prediction tasks on the second historical time series data, which can specifically be inputting the second historical time series data into the updated prediction model to obtain multi-task prediction results of the updated prediction model on the second historical time series data. The multi-task prediction results can be prediction results at multiple steps.

[0068] As a specific implementation, the second loss can be calculated based on the second target time series data and the multi-task prediction results by using a mean square error (MSE), a mean absolute error (MAE), or a cross-entropy loss function. The second loss can be used to measure the difference between the multi-task prediction results and the second target time series data. For example, if the second target time series data is “traffic flow is congested at 17:50 pm” and the multi-task prediction result is “traffic flow is congested at 17:40 pm”, the second loss can reflect the difference between the two.

[0069] Optionally, the updated prediction model can be trained based on the second loss, such as iteratively adjusting parameters of the updated prediction model by using a gradient descent algorithm (such as an Adam optimizer) to minimize the second loss, thereby obtaining a trained prediction model.

[0070] In an embodiment of the present specification, the second historical time series data can be used to gradually predict the prediction tasks until the prediction tasks are performed. Optionally, the calling the updated prediction model to perform the plurality of prediction tasks on the second historical time series data to obtain the multi-task prediction results of the plurality of prediction tasks can specifically include: Based on the second historical time series data, the updated prediction model outputs the task prediction result of the first time step.

[0071] Based on the second historical time series data and the task prediction result of the first time step, the updated prediction model outputs the task prediction result of the second time step.

[0072] The iteration is sequentially performed until the multi-task prediction results of the plurality of prediction tasks are generated, wherein the generation of the task prediction result of the current time step depends on the second historical time series data and the task prediction result of the previous time step.

[0073] Optionally, the second historical time series data can be input into the updated prediction model to make the updated prediction model output the task prediction result of the first time step, wherein the first time step can refer to the first step length, and the prediction result of the first step length can represent the prediction result of the second historical time series data in the first unit time in the future. For example, if the second historical time series data is historical temperature data representing the temperature data from 0 o'clock to 8 o'clock, and the prediction task is to predict the temperature data of each hour in the future, the task prediction result of the first time step can represent the temperature data of the first hour in the future, i.e., the temperature data of 9 o'clock.

[0074] As a specific implementation, the second historical time series data and the task prediction result of the first time step can be input into the updated prediction model, so that the updated prediction model can output the task prediction result of the second time step. The second time step can be the next time step of the first time step, and the second time step can refer to the second step length, and the prediction result of the second step length can represent the prediction result of the second historical time series data in the second unit time in the future. Continuing the above example, the task prediction result of the second time step can represent the temperature data of the second time in the future, i.e., the temperature data of 10 o'clock.

[0075] Further, the second historical time series data and the task prediction result of the second time step can also be input into the updated prediction model, so that the updated prediction model outputs the task prediction result of the third time step.

[0076] In an embodiment of the present specification, the calling the updated prediction model to perform the plurality of prediction tasks can be an iterative process, and the task prediction result of the current time step can be output according to the second historical time series data and the task prediction result of the previous time step until the multi-task prediction results of the plurality of prediction tasks are generated.

[0077] As a specific embodiment, the task prediction result of the current time step can also be output according to the second historical time series data and the task prediction results of the previous time steps, until the multi-task prediction result of the multiple prediction tasks is generated. For example, in the process of obtaining the task prediction result of the third time step, the second historical time series data, the task prediction result of the first time step and the task prediction result of the second time step can be input into the updated prediction model, so that the updated prediction model outputs the task prediction result of the third time step.

[0078] In the embodiments of the present specification, since the updated prediction model is obtained by training the single-step prediction task, the prediction accuracy of the updated prediction model for the single-step prediction task is relatively high, so that the updated prediction model can output the accurate task prediction result of the first time step, and then in the process of iterative training, the updated prediction model can accurately output the task prediction result of the second time step, the task prediction result of the third time step and the like based on the task prediction result of the first time step, until the multiple prediction tasks are executed, so that the trained prediction model has high data prediction accuracy.

[0079] As a specific embodiment, in order to improve the performance of the trained prediction model, the test time series set can also be used to test it. Optionally, the training method of the prediction model can also include: Obtaining a test time series set.

[0080] Testing the trained prediction model according to the test time series set to obtain a test result.

[0081] Adjusting the parameters of the trained prediction model according to the test result.

[0082] In the embodiments of the present specification, the test time series set can be obtained according to the way of obtaining the target time series set. For example, the test time series set can be obtained from an open source time series database, or the test time series set can be collected from a business system, or the test time series set can be generated by using a large language model, etc. Optionally, the obtained test time series set can include data of different time granularity, such as second-level data, minute-level data, hour-level data, etc. Optionally, the obtained test time series set can be a data set in various scenarios, such as data in weather monitoring scenarios, energy load scheduling scenarios, urban traffic flow control scenarios, text generation scenarios, voice generation scenarios, etc.

[0083] As a specific embodiment, the test time series set can also be obtained from the target time series set. For example, after obtaining the target time series set, the target time series set is divided into a first time series set, a second time series set and a test time series set, etc.

[0084] Optionally, the test time series set may include test time series data and corresponding target test time series data. The target test time series data may be data from multiple future time periods of the test time series data. Testing the trained prediction model based on the test time series set can be achieved by inputting the test time series data into the trained prediction model, allowing the model to make predictions based on the test time series data, thereby obtaining the test results. Optionally, the test results can be results under a single step size or test results under multiple step sizes.

[0085] Optionally, the parameters of the trained prediction model can be adjusted based on the test results. This can be done by calculating a third loss based on the target time-series data and the test results, and then adjusting the parameters of the trained prediction model based on this third loss. Specifically, algorithms such as gradient descent can be used to adjust the parameters of the trained prediction model, thereby minimizing the third loss and obtaining the adjusted prediction model.

[0086] In practical applications, deep prediction models generally adopt a training method that generates complete sequences synchronously. However, this method has an expressiveness bottleneck due to its reliance on step-invariant representations, which can lead to prediction errors.

[0087] Figure 2 This is a schematic diagram illustrating a training model based on a step-size invariant representation method, provided in one embodiment of this specification. Figure 2 As shown, let This represents the encoder output. Direct prediction methods generate predictions through linear layers with learnable parameters, where the weights... Bias The formula is as follows:

[0088] in, For the first The method assumes that the step size is constant, representing a predicted value for the future step size. R The assumption is optimal for all prediction step sizes, and different linear transformations are sufficient to achieve accurate predictions across all prediction ranges. However, this assumption becomes problematic when different prediction step sizes require fundamentally different representational features (especially in long-term prediction scenarios with large T values). That is, regardless of encoder quality, sharing the same representation across all prediction step sizes will inevitably introduce modeling errors. Given the significant limitations of step-invariant representations, a prediction strategy that can leverage the advantages of step-specific representations is urgently needed.

[0089] In the embodiments of the present specification, a foundation model for single-step prediction can be trained first. Given a history sequence, the training process can be described as:

[0090]

[0091] where the encoder extracts features R ; the single-step prediction value is generated by a single-output linear projection with weights and bias . The pre-training objective is the mean squared error of single-step prediction , which lays a solid foundation for subsequent step-specific adaptation.

[0092] After completing the single-step prediction (T = 1) pre-training, the model can be adapted for multi-step prediction (T ≥ 2). Figure 3 is a flowchart of training a model based on step-specific representation adaptation according to an embodiment of the present specification, as shown in Figure 3 for each prediction step , a step-specific low-rank adaptation module is introduced in the selected encoder linear layer, while the original encoder and decoder weights are frozen, to generate step-specific representations .

[0093] Specifically, for the selected linear layer with weight matrix , the weight of each step is modified as follows; where and are LoRA matrices, and the rank .

[0094] For each prediction step , the modified encoder generates the process of step-specific prediction as follows:

[0095] where the adaptation objective is the mean squared error of the first step prediction. It is worth noting that only the LoRA matrix needs to be optimized to minimize the adaptation objective, and the remaining parameters of the foundation model remain frozen. Repeat this process for each prediction step 1 < T , which can enable the model to avoid expression bottlenecks while achieving prediction for different steps.

[0096] The embodiments of the present specification successfully break through the expression bottleneck by transitioning from "step-invariant representation" to "step-specific representation". Since both the pre-trained model and the adaptive model adopt a single output design, the prediction error is eliminated. The step-specific representation is optimized for each prediction step , and it is no longer mandatory for all prediction values to be a "linear combination of the same representation basis".

[0097] In practical applications, time series data has strong autocorrelation, which makes there is correlation between multiple prediction steps. However, the step-by-step representation adaptive approach generates step-specific representations by assigning independent LoRA matrices to each prediction step and uses a single output layer for prediction. This "independent processing" approach has two limitations: (1) the number of adaptive times increases linearly with the prediction span, resulting in high computational cost; (2) although step-specific representations can be obtained, ignoring inter-step correlations will affect the prediction accuracy.

[0098] In the embodiments of the present specification, based on the optimized step-by-step representation adaptive approach, the model performance and efficiency can be improved by utilizing the dependency between prediction steps. Figure 4 is a flowchart of training a model based on an optimized step-by-step representation adaptive approach provided by an embodiment of the present specification, as Figure 4 shown, in practical applications, the T-step label sequence can be divided into K consecutive segments, each segment containing S steps (S is the number of steps within the segment). Further, the output dimension of the base model can be increased from 1 to S, so that a single adaptation can jointly generate step-specific representations for S future steps, thereby reducing the number of required adaptations. The segment-based adaptation strategy in the embodiments of the present specification not only utilizes the step dependency within the segment to improve accuracy and efficiency, but also maintains the expressiveness of step-specific representations under the premise that S≤L+1.

[0099] Optionally, to further utilize the dependency between segments, partial parameter sharing between different LoRA modules can be achieved through a mixture-of-experts mechanism. Specifically, suppose there are P expert matrices, each expert matrix is represented as and . For a selected linear layer in the encoder with weights M , the step-specific adaptive formula for segment k is as follows:

[0100] wherein is a learnable normalization weight vector for adaptively combining each segment P The design allows the expert matrix to be shared among segments, enabling the model to utilize the inter-segment dependency in the label sequence, enrich the supervision signal, and thus improve the effect of step-specific adaptation.

[0101] Figure 5 is a flowchart of a task prediction method provided by an embodiment of the present specification, as shown in Figure 5 The task prediction method can include the following steps: In step S502, obtain the time series data to be processed.

[0102] In an embodiment of the present specification, the time series data to be processed can be time series data. Optionally, the time series data can be single-modal language data such as images, texts, and speeches, or multi-modal language data containing at least two modalities of images, texts, and speeches.

[0103] Optionally, the time series data to be processed can be data in a multi-task prediction scenario. Optionally, the multi-task prediction scenario can be a weather monitoring scenario, an energy load scheduling scenario, a city traffic flow control scenario, a text generation scenario, a speech generation scenario, etc.

[0104] In step S504, input the time series data to be processed into the trained prediction model to generate target prediction results of multiple prediction tasks, wherein the prediction model is trained by the training method of the prediction model.

[0105] In an embodiment of the present specification, the trained prediction model can generate target prediction results of multiple prediction tasks based on the time series data to be processed. The multiple prediction tasks can be prediction tasks at multiple steps.

[0106] As a specific implementation, the time series data to be processed is input into the trained prediction model, and target prediction results of single prediction tasks can also be generated. The single prediction task can be a prediction task at a single step.

[0107] Optionally, the prediction model can be trained by the training method of the prediction model, and the specific training process can refer to the description in the foregoing, which will not be repeated here.

[0108] In an embodiment of the present specification, since the trained prediction model is trained based on a model with single-task prediction capability for multiple prediction tasks, it can process other tasks in the multiple tasks based on accurate single-task prediction results in the process of multi-task prediction, thereby improving the accuracy of multi-task prediction for the time series data to be processed.

[0109] In actual applications, the trained prediction model can generate target prediction results of multiple prediction tasks step by step. Optionally, the input of the to-be-processed time series data into the trained prediction model to generate target prediction results of multiple prediction tasks can specifically include the following steps: outputting, by the prediction model, a task prediction result of a first time step based on the to-be-processed time series data.

[0110] outputting, by the prediction model, a task prediction result of a second time step based on the to-be-processed time series data and the task prediction result of the first time step.

[0111] iterating sequentially until target prediction results of multiple prediction tasks are generated, wherein generation of a task prediction result of a current time step depends on the to-be-processed time series data and a task prediction result of a previous time step.

[0112] In the embodiments of the present specification, the to-be-processed time series data can be input into the prediction model, so that the prediction model outputs a task prediction result of a first time step based on the to-be-processed data. The first time step can refer to a first step, and the prediction result of the first step can represent a prediction result of a second historical time series data in a future first unit time.

[0113] Further, the to-be-processed time series data and the task prediction result of the first time step can be input into the prediction model, so that the prediction model can output a task prediction result of a second time step based on the to-be-processed time series data and the task prediction result of the first time step. The second time step can be a next time step of the first time step, and the second time step can refer to a second step, and the prediction result of the second step can represent a prediction result of the second historical time series data in a future second unit time.

[0114] iterating sequentially until target prediction results of multiple prediction tasks are generated, wherein generation of a task prediction result of a current time step depends on the to-be-processed time series data and a task prediction result of a previous time step.

[0115] In the embodiments of the present specification, the task prediction method can further include: feeding back the target prediction result to the client.

[0116] receiving result feedback information sent by the client, wherein the result feedback information reflects a modification suggestion of the target prediction result by the client.

[0117] adjusting model parameters of the prediction model according to the result feedback information.

[0118] It should be noted that the result feedback information refers to feedback information provided by the client after evaluating the target prediction result based on the task prediction demand. The result feedback information usually contains opinions on prediction accuracy, relevance, etc. For example, if the user thinks that the target prediction result is inaccurate, the client can feed back this information to the server. The task prediction demand refers to the specific purpose or problem to be solved that the user hopes to achieve by interacting with the trained prediction model.

[0119] In actual applications, there are various ways to adjust the model parameters of the prediction model according to the result feedback information, which can be selected according to actual conditions, and the embodiments of the present specification do not make any limitation on this. In a possible implementation manner of the present specification, the user can be sent a pre-set optimization prompt information such as “I am very sorry to bring you inaccurate information. Please point out where it is not accurate enough or provide the correct answer to the related question, and I will correct and optimize my answer as soon as possible to better serve you”, the model optimization data sent by the client in response to the optimization prompt information is used to adjust the parameters of the trained prediction model. In another possible implementation manner of the present specification, the model optimization data for the result feedback information is read from other data acquisition devices or databases, and the model optimization data is used to adjust the parameters of the trained prediction model.

[0120] Referring to Figure 6 , Figure 6 is a flow timing diagram of a task prediction method provided by an embodiment of the present specification. The task prediction method can be applied to a task prediction platform, which can include a client and a server. The client is a terminal device for providing to-be-processed timing data, and the server is a server for providing task prediction services to the client. Figure 6 As shown in The client receives to-be-processed timing data provided by the user.

[0121] The client sends the to-be-processed timing data provided by the user to the server.

[0122] The server inputs the to-be-processed timing data into the trained prediction model to obtain target prediction results of multiple prediction tasks output by the trained prediction model.

[0123] The server sends the target prediction results of the multiple prediction tasks to the client.

[0124] The client receives and displays the target prediction results of the multiple prediction tasks.

[0125] Corresponding to the training method embodiment of the prediction model described above, the present specification also provides a training device embodiment of the prediction model, Figure 7is a structural schematic diagram of a training device of a prediction model provided by an embodiment of the present specification. As shown in Figure 7 The training device of the prediction model can include: The sample acquisition module 702 is configured to acquire a first time series set and a second time series set.

[0126] The first training model 704 is configured to call an initial prediction model to perform a specified prediction task on the first time series set, and pre-train the initial prediction model based on a single-task prediction result of the specified prediction task, to obtain a pre-trained prediction model.

[0127] The model configuration module 706 is configured to perform model configuration on a plurality of prediction tasks based on the pre-trained prediction model, respectively, to obtain an updated prediction model.

[0128] The second training module 708 is configured to call the updated prediction model to perform the plurality of prediction tasks on the second time series set, and train the updated prediction model based on a multi-task prediction result of the plurality of prediction tasks, to obtain a trained prediction model.

[0129] As a specific implementation, the first time series set includes first historical time series data and first target time series data under the specified prediction task; the first training module 704 can be specifically configured to call the initial prediction model to perform the specified prediction task on the first historical time series data, to obtain a single-task prediction result of the specified prediction task.

[0130] Based on the first target time series data and the single-task prediction result, a first loss is calculated.

[0131] Based on the first loss, the initial prediction model is pre-trained.

[0132] As a specific implementation, the model configuration module 706 can be specifically configured to: For a plurality of prediction tasks, a low-rank adapter is used to fine-tune the pre-trained prediction model, to obtain an updated prediction model for predicting the plurality of prediction tasks.

[0133] As a specific implementation, for a plurality of prediction tasks, a low-rank adapter is used to fine-tune the pre-trained prediction model, to obtain an updated prediction model for predicting the plurality of prediction tasks, which can specifically include: The pre-trained model is subjected to low-rank adaptation processing, to obtain a pre-trained model containing a plurality of low-rank adaptation modules.

[0134] Adaptively weight processing outputs of the plurality of low-rank adaptation modules to obtain an updated prediction model for predicting the plurality of prediction tasks.

[0135] As a specific embodiment, the second time series set includes second historical time series data and second target time series data under the plurality of prediction tasks. The calling of the updated prediction model performs the plurality of prediction tasks on the second time series set, and trains the updated prediction model based on multi-task prediction results of the plurality of prediction tasks, specifically including: The calling of the updated prediction model performs the plurality of prediction tasks on the second time series set, and trains the updated prediction model based on multi-task prediction results of the plurality of prediction tasks, specifically including:

[0136] Based on the second target time series data and the multi-task prediction results, a second loss is calculated.

[0137] Based on the second loss, the updated prediction model is trained.

[0138] As a specific embodiment, the second training module 708 can be specifically configured to: Based on the second historical time series data, the updated prediction model outputs a task prediction result of a first time step.

[0139] Based on the second historical time series data and the task prediction result of the first time step, the updated prediction model outputs a task prediction result of a second time step.

[0140] Iterate in sequence until the multi-task prediction results of the plurality of prediction tasks are generated, wherein the generation of the task prediction result of the current time step depends on the second historical time series data and the task prediction result of the previous time step.

[0141] As a specific embodiment, the training device of the prediction model can further include: A test time series set acquisition module is configured to acquire a test time series set.

[0142] A test module is configured to test the trained prediction model according to the test time series set to obtain a test result. A parameter adjustment module is configured to adjust parameters of the trained prediction model according to the test result.

[0143] The above is a schematic scheme of the training device of the prediction model according to the embodiment. It should be noted that the technical scheme of the training device of the prediction model and the technical scheme of the training method of the prediction model belong to the same concept, and the technical scheme of the training device of the prediction model is not described in detail. The details can be seen from the description of the technical scheme of the training method of the prediction model.

[0144] Corresponding to the above-mentioned time series data processing method embodiment, the present specification also provides a time series data processing device embodiment, Figure 8 is a structural schematic diagram of a time series data processing device provided by an embodiment of the present specification. As shown in Figure 8 , the time series data processing device can include: The to-be-processed data acquisition module 802 is configured to acquire to-be-processed time series data.

[0145] The to-be-processed data input module 804 is configured to input the to-be-processed time series data into the trained prediction model to generate target prediction results of multiple prediction tasks, wherein the trained prediction model is obtained through the above-mentioned time series data processing training.

[0146] As a specific implementation, the to-be-processed data input module 804 can be specifically configured to: output a task prediction result of a first time step based on the to-be-processed time series data through the prediction model.

[0147] output a task prediction result of a second time step based on the to-be-processed time series data and the task prediction result of the first time step through the prediction model.

[0148] iteratively, until the target prediction results of the multiple prediction tasks are generated, wherein the generation of the task prediction result of the current time step depends on the to-be-processed time series data and the task prediction result of the previous time step.

[0149] As a specific implementation, the time series data processing device can further include: The result feedback module is configured to feed back the target prediction results to the client.

[0150] The feedback information receiving module is configured to receive result feedback information sent by the client, wherein the result feedback information reflects the modification suggestions of the client on the target prediction results.

[0151] The model parameter adjusting module is configured to adjust the model parameters of the prediction model according to the result feedback information.

[0152] The above is a schematic scheme of the time series data processing apparatus of the embodiment. It should be noted that the technical scheme of the time series data processing apparatus and the technical scheme of the time series data processing method described above belong to the same concept, and the details of the technical scheme of the time series data processing apparatus which are not described in detail can be referred to the description of the technical scheme of the time series data processing method.

[0153] Figure 9 A structural block diagram of a computing device provided by one embodiment of the present specification is shown. The components of the computing device 900 include, but are not limited to, a memory 910 and a processor 920. The processor 920 is connected with the memory 910 through a bus 930, and a database 950 is used to save data.

[0154] The computing device 900 also includes an access device 940, which enables the computing device 900 to communicate via one or more networks 960. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 940 can include one or more of any type of network interface (e.g., a network interface card (NIC)) such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC), or a wired or wireless network interface.

[0155] In one embodiment of the present specification, the above-mentioned components of the computing device 900 and other components not shown in the Figure 9 may be connected to each other, for example, through a bus. It should be understood that Figure 9 The structural block diagram of the computing device shown is only for the purpose of example, and is not a limitation on the scope of the present specification. Those skilled in the art can add or replace other components as needed.

[0156] The computing device 900 can be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a content computer, a netbook, etc.), a mobile phone (e.g., a smartphone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 900 can also be a mobile or stationary server.

[0157] The processor 920 is configured to execute computer program / instructions, which when executed by the processor, implement the steps of the training method of the prediction model or the task prediction method.

[0158] The above is a schematic scheme of the computing device of the embodiment. It should be noted that the technical scheme of the computing device belongs to the same concept as the technical scheme of the training method of the prediction model and the task prediction method, and the details of the technical scheme of the computing device that are not described in detail can be referred to the description of the technical scheme of the training method of the prediction model or the task prediction method.

[0159] An embodiment of the present specification also provides a computer readable storage medium storing computer program / instructions, which when executed by the processor, implement the steps of the training method of the prediction model or the task prediction method.

[0160] The above is a schematic scheme of the computer readable storage medium of the embodiment. It should be noted that the technical scheme of the storage medium belongs to the same concept as the technical scheme of the training method of the prediction model and the task prediction method, and the details of the technical scheme of the storage medium that are not described in detail can be referred to the description of the technical scheme of the training method of the prediction model or the task prediction method.

[0161] An embodiment of the present specification also provides a computer program product comprising computer program / instructions, which when executed by the processor, implement the steps of the training method of the prediction model or the task prediction method.

[0162] The above is a schematic scheme of the computer program product of the embodiment. It should be noted that the technical scheme of the computer program product belongs to the same concept as the technical scheme of the training method of the prediction model and the task prediction method, and the details of the technical scheme of the computer program product that are not described in detail can be referred to the description of the technical scheme of the training method of the prediction model or the task prediction method.

[0163] The above-described embodiments of the application have several aspects, no single one of which is solely responsible for the application's desirable attributes. Without limiting the scope of the application as expressed by the claims which follow, some further embodiments make these aspects even more useful. Other embodiments can result in less desirable attributes.

[0164] The computer readable medium can include any entity or apparatus capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier signal, telecommunication signal, software distribution medium, etc. It should be noted that the computer readable medium can include appropriate contents according to the requirements of patent practice, for example, according to the patent practice in some regions, the computer readable medium does not include electrical carrier signals and telecommunication signals.

[0165] It should be noted that for the foregoing method embodiments, the purposes of brief description are to express them as a combination of a series of acts, but those skilled in the art should know that the embodiments of the present specification are not limited by the order of the described acts, because according to the embodiments of the present specification, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification are all preferred embodiments, and the acts and modules involved are not necessarily all the embodiments of the present specification.

[0166] In the above embodiments, the description of each embodiment has its own emphasis, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.

[0167] The preferred embodiments of the present specification disclosed above are only used to help explain the present specification. The alternative embodiments do not describe all the details and limit the application to the specific embodiments. Obviously, according to the content of the embodiments of the present specification, many modifications and changes can be made. The present specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of the present specification, so that those skilled in the art can well understand and use the present specification. The present specification is limited by the claims and their entire scope and equivalents.

Claims

1. A method for training a prediction model, characterized in that, The method comprises: obtaining a first time series set and a second time series set; calling an initial prediction model to perform a specified prediction task on the first time series set, and pre-training the initial prediction model based on a single-task prediction result of the specified prediction task to obtain a pre-trained prediction model; based on the pre-trained prediction model, model configuration is performed on a plurality of prediction tasks respectively to obtain an updated prediction model; calling the updated prediction model to perform the plurality of prediction tasks on the second time series set, and training the updated prediction model based on a multi-task prediction result of the plurality of prediction tasks to obtain a trained prediction model.

2. The method of claim 1, wherein, The first time series set comprises first historical time series data and first target time series data under the specified prediction task; The calling of the initial prediction model to perform the specified prediction task on the first time series set, and the pre-training of the initial prediction model based on the single-task prediction result of the specified prediction task comprises: calling the initial prediction model to perform the specified prediction task on the first historical time series data to obtain a single-task prediction result of the specified prediction task; calculating a first loss based on the first target time series data and the single-task prediction result; pre-training the initial prediction model based on the first loss.

3. The method of claim 1, wherein, The pre-training of the initial prediction model based on the first loss comprises: performing model fine-tuning on the pre-trained prediction model by using a low-rank adapter for the plurality of prediction tasks to obtain an updated prediction model for predicting the plurality of prediction tasks.

4. The method of claim 3, wherein, The model fine-tuning of the pre-trained prediction model by using the low-rank adapter for the plurality of prediction tasks to obtain the updated prediction model for predicting the plurality of prediction tasks comprises: performing low-rank adaptation processing on the pre-trained model to obtain a pre-trained model comprising a plurality of low-rank adaptation modules; performing adaptive weighting processing on outputs of the plurality of low-rank adaptation modules to obtain the updated prediction model for predicting the plurality of prediction tasks.

5. The method of claim 1, wherein, The second time series set comprises second historical time series data and second target time series data under the plurality of prediction tasks; The calling of the updated prediction model to perform the plurality of prediction tasks on the second time series set, and the training of the updated prediction model based on the multi-task prediction result of the plurality of prediction tasks comprises: calling the updated prediction model to perform the plurality of prediction tasks on the second historical time series data to obtain a multi-task prediction result of the plurality of prediction tasks; calculating a second loss based on the second target time series data and the multi-task prediction result; training the updated prediction model based on the second loss.

6. The method of claim 5, wherein, The calling of the updated prediction model to perform the plurality of prediction tasks on the second historical time series data to obtain the multi-task prediction result of the plurality of prediction tasks comprises: outputting a task prediction result of a first time step by the updated prediction model based on the second historical time series data; output a task prediction result of a second time step based on the second historical time series data and the task prediction result of the first time step; iteratively generate the multi-task prediction results of the multiple prediction tasks, wherein a task prediction result of a current time step is generated based on the second historical time series data and a task prediction result of a previous time step.

7. The method of claim 1, wherein, The method further comprises: obtaining a test time series set; testing the trained prediction model based on the test time series set to obtain a test result; adjusting parameters of the trained prediction model based on the test result.

8. A task prediction method characterized by, comprises: obtaining to-be-processed time series data; inputting the to-be-processed time series data into the trained prediction model to generate target prediction results of multiple prediction tasks, the prediction model being trained by the method of any one of claims 1 to 7.

9. The method of claim 8, wherein, The inputting the to-be-processed time series data into the trained prediction model to generate target prediction results of multiple prediction tasks comprises: outputting a task prediction result of a first time step based on the to-be-processed time series data; outputting a task prediction result of a second time step based on the to-be-processed time series data and the task prediction result of the first time step; iteratively generate the multi-task prediction results of the multiple prediction tasks, wherein a task prediction result of a current time step is generated based on the to-be-processed time series data and a task prediction result of a previous time step.

10. The method of claim 8, wherein, After the generating the target prediction results of the multiple prediction tasks, the method further comprises: feeding back the target prediction results to a client; receiving result feedback information sent by the client, wherein the result feedback information reflects modification suggestions of the client on the target prediction results; adjusting model parameters of the prediction model based on the result feedback information.

11. A device for training a prediction model, characterized in that, The device comprises: a sample obtaining module configured to obtain a first time series set and a second time series set; a first training module configured to call an initial prediction model to perform a specified prediction task on the first time series set, and pre-train the initial prediction model based on a single-task prediction result of the specified prediction task to obtain a pre-trained prediction model; a model configuration module configured to perform model configuration on multiple prediction tasks based on the pre-trained prediction model to obtain an updated prediction model; a second training module configured to call the updated prediction model to perform the multiple prediction tasks on the second time series set, and train the updated prediction model based on multi-task prediction results of the multiple prediction tasks to obtain a trained prediction model.

12. A timing data processing apparatus, characterized by comprising: comprises: a to-be-processed data obtaining module configured to obtain to-be-processed time series data; a to-be-processed data inputting module configured to input the to-be-processed time series data into a trained prediction model to generate target prediction results of multiple prediction tasks, the trained prediction model being trained by the method of any one of claims 1 to 7.

13. A computing device, comprising: comprises: a memory and a processor; The memory is configured to store computer programs / instructions, and the processor is configured to execute the computer programs / instructions, and the computer programs / instructions, when executed by the processor, implement the steps of the method according to any one of claims 1 to 10.

14. A computer-readable storage medium, characterized in that, The computer program / instruction is stored in the memory, and when executed by the processor, implements the steps of the method according to any one of claims 1 to 10.

15. A computer program product, characterised in that, The computer program / instruction is stored in the memory, and when executed by the processor, implements the steps of the method according to any one of claims 1 to 10.