Language model-based time sequence prediction method and prediction device

By linguizing the time series prediction task and combining it with meta-learning tuning, the problem of insufficient heterogeneous data fusion and cross-regional migration capabilities of existing models is solved, and a high-precision, simplified deployment time series prediction method is achieved, which is suitable for multiple types of prediction tasks.

CN120688643AInactive Publication Date: 2025-09-23SHENZHEN SKYWORTH AIR CONDITIONING TECH CO LTD

Patent Information

Application Number
CN202511142699.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-15
Publication Date
2025-09-23
Estimated Expiration
Not applicable · inactive patent

Smart Images

  • Figure CN120688643A_ABST
    Figure CN120688643A_ABST
Patent Text Reader

Abstract

The invention discloses a time sequence prediction method and device based on a language model, and relates to the field of artificial intelligence. The time sequence prediction method based on the language model comprises the following steps of (1) collecting time sequence data which is allowed to comprise heterogeneous information, (2) constructing a natural language cue word according to the time sequence data in the step (1), (3) inputting the natural language cue word in the step (2) into a first large language model, and (4) outputting text representation of a target prediction value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence, and in particular to a time series prediction method and prediction device based on a language model. Background Art

[0002] With the rapid development of artificial intelligence, natural language processing, and big data technologies, traditional time series forecasting tasks are facing new opportunities for transformation. LLMs, in particular, demonstrate the potential for cross-modal and cross-task generalization in terms of general understanding and reasoning capabilities, and have become critical infrastructure for the development of intelligent systems. Against this backdrop, exploring how to apply large language models to the modeling and prediction of time series data has become a cutting-edge research direction in intelligent systems and forecasting.

[0003] Traditional time series forecasting methods mostly rely on statistical models, such as the Autoregressive Integrated Moving Average (ARIMA) model, or deep neural networks, such as the Long Short-Term Memory (LSTM) network, the Temporal Convolutional Network (TCN), and the Spatio-Temporal Graph Convolutional Network (STGCN). While these methods achieve good results in specific scenarios, they generally suffer from bottlenecks such as insufficient model generalization, difficulty integrating heterogeneous data, and poor cold-start performance. On the one hand, traditional models often require rigorous preprocessing and structured modeling of input data, making it difficult to effectively integrate semantic, geographic, and socioeconomic information from multiple heterogeneous sources. On the other hand, in actual deployment, these models often face the problem of zero-shot and small-shot data, where there is no labeled data or a small number of samples in the target area, further hindering their large-scale application.

[0004] In recent years, a new approach to time series prediction using large language models has emerged, leveraging paradigms such as prompt word learning. Researchers have attempted to "linguistically" transform time series prediction tasks, reconstructing the original time series and contextual features into text inputs through natural language descriptions and transforming the prediction objectives into generation tasks. This approach stimulates the generalization capabilities of large language models in open semantic spaces. For example, the PromptCast and Time-LLM large time series language models have initially validated the effectiveness of this paradigm in forecasting tasks such as weather and energy consumption, proposing a new time series prediction paradigm that exhibits a significantly different structural design and training process from traditional models.

[0005] Applying LLMs to scenarios such as urban electric vehicle charging prediction and traffic flow can fully utilize its advantages in zero-sample transfer, self-supervised representation learning, and multimodal fusion. By constructing natural language prompt words and domain alignment mechanisms, it significantly improves prediction accuracy and transfer capabilities. It performs well in scenarios where charging pile area usage data is scarce or heterogeneously distributed, providing an important example for the application exploration of large language models in the field of time series prediction.

[0006] Shortcomings of the prior art / technical problems to be solved by the present invention: 1. Heterogeneous features are difficult to integrate, and the modeling process is highly dependent on structural design: Most current time series forecasting models have structural requirements for input features, making it difficult to flexibly integrate heterogeneous information such as time, space, geography, price, and weather. This results in limited forecasting accuracy and poor adaptability.

[0007] 2. Insufficient generalization ability and difficulty migrating to unseen areas: Traditional deep learning models usually rely on a large number of labeled samples for training. In practical applications, when there is no training data or only very few training samples in the target area, the prediction performance is severely degraded, and the model lacks the ability to migrate across regions.

[0008] 3. It is difficult to strike a balance between accuracy and interpretability, and model deployment is complex: Deep prediction models often sacrifice interpretability while improving accuracy. In addition, the complex steps of feature engineering, model selection, and hyperparameter tuning limit the actual deployment efficiency and application popularity.

[0009] 4. Large language models lack targeted optimization and are difficult to directly adapt to time series tasks: Although LLMs possess powerful semantic understanding capabilities, they were not originally designed for time series prediction, making their direct use limited. Key challenges remain in constructing appropriate prompts and designing adaptation strategies to maximize their potential. Summary of the Invention

[0010] Therefore, the present invention proposes a time series prediction method based on a language model, comprising the following steps: Step 1) collect time series data, which can include heterogeneous information; Step 2) construct natural language prompt words based on the time series data in step 1); Step 3) inputting the natural language prompt word from step 2) into the first language model; Step 4), output the text representation of the target prediction value.

[0011] Preferably, the natural language prompt words include a specified model role, a target indication, and a prediction step size.

[0012] Preferably, step 3-1) is further included between step 3) and step 4), for performing meta-learning tuning to improve the generalization ability of the first large language model in a small sample or zero-sample area.

[0013] Preferably, step 3-2) is further included between step 3) and step 4), loading a second language model that has been pre-trained and aligned and tuned.

[0014] Preferably, in step 3, for the region , the model input format is as follows:

[0015] in, It is a natural language prompt word; Regional static characteristics (such as geographical location, road density, number of charging piles, etc.); is the time series data of the region and its neighborhood. The output of the model is the natural language representation of the target prediction value:

[0016] This paper defines the prediction task objective as a language generation task and trains it using the following loss function:

[0017] in, is the number of sample areas; The number of tokens for the predicted value; Generate probability distributions for large language models.

[0018] Preferably, step 3-1) includes: 1. dividing the task area into a support set and a query set; 2. performing multi-step training on the support set to obtain intermediate model parameters 3. Single-step training on the query set to obtain the optimization direction of the target task ; 4. Use the following formula to update the model parameters:

[0019] in, is the learning rate, which controls the update step size.

[0020] Preferably, the natural language prompt words include: You are an expert in {task name} and are currently working on a forecasting task for {region description}.

[0021] Consider the following time series data: Target area load rate: {time series} Neighborhood average load rate: {time series} Predict the charging demand in the next hour and output only the predicted value.

[0022] Preferably, the time series data comes from urban traffic cells: in urban research or planning, small-scale regional units that divide urban space according to administration, function or traffic flow.

[0023] The present invention also relates to a time series prediction device based on a language model, including a module corresponding to the above-mentioned time series prediction method based on a language model.

[0024] Preferably, the following information is automatically collected: traffic flow, power load and market price.

[0025] The following terms are explained in this document: 1. Large Language Model (LLM): This refers to a natural language processing model built on deep neural networks with a parameter scale exceeding 100 million, demonstrating powerful language comprehension, generation, and reasoning capabilities. Typical examples include GPT, T5, and LLaMA.

[0026] 2. Time Series Forecasting: This refers to the task of predicting trends, values, or states in future time periods based on historical time series data. It is widely used in scenarios such as traffic flow, power load, and market prices.

[0027] 3. Prompt Learning: This technique guides a large, pre-trained language model to complete a specific task. By constructing a reasonable task description and context, prompts can activate the model's relevant knowledge and guide it to generate the target output. In this paper, the time series prediction task is verbalized into a prompt template that "describes the context in natural language and specifies the prediction target" for execution by the LLM.

[0028] 4. Zero-shot forecasting: This method makes predictions based on the model's general capabilities without any training on the target area. This relies on the model's ability to understand the language task and background knowledge and is suitable for data-scarce scenarios.

[0029] 5. Few-shot Forecasting: This refers to the model's ability to complete prediction tasks when only a very small amount of target data (such as 5% or 10%) is used for training.

[0030] 6. Prompt word engineering: This method transforms the original prediction task (such as numerical regression or classification) into a language modeling problem. Specifically, the input (such as time series, geographic information, temperature, etc.) and the task target are combined into a natural language text, which is then fed into the language model, allowing it to complete the prediction output based on language understanding.

[0031] 7. Meta-learning: Meta-learning, or “learning how to learn,” is a training paradigm that improves a model’s ability to quickly adapt to new tasks.

[0032] 8. Reptile algorithm: A model-agnostic meta-learning optimization algorithm. Its basic principle is to perform local updates on multiple tasks, then calculate global directional gradients and update the model's initial parameters, thereby improving the model's generalization ability to new tasks. The Reptile algorithm does not require task-specific structure and is suitable for fine-tuning large language models.

[0033] 9. Natural Language Generation Prediction: This invention transforms the prediction task into a "natural language to natural language" generation task. The large language model directly outputs the text corresponding to the prediction result, avoiding the feature engineering and numerical regression process of traditional models and simplifying the training and deployment process.

[0034] 10. Negative Log-Likelihood (NLL): This is an objective function commonly used in language model training to maximize the probability of the target output sequence.

[0035] 11. Urban Traffic Zone: In urban research or planning, this refers to a small area divided into administrative, functional, or traffic flow zones. Each zone is considered a prediction task unit. In this invention, features and prediction model inputs are constructed separately to support cross-zone generalized modeling. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 This is a structural diagram of the time series prediction system based on a large language model, showing the overall system architecture of the present invention. It includes four core modules: the task languageization module, the natural language-based prediction modeling module, the meta-learning tuning module, and the large language model inference module, reflecting the full-process design of task languageization. Figure 2 This is a meta-learning tuning flowchart, which describes how the present invention introduces the Reptile meta-learning mechanism during the training phase to tune the inter-region model, thereby achieving rapid adaptation and improved generalization capabilities for small sample or unseen regions. Figure 3This is a flowchart of the charging demand prediction technology based on a large language model, showing the entire process from raw data collection, preprocessing, regional division, model training, and prediction generation, highlighting the core idea of ​​combining data-driven and natural language processing in this invention; Figure 4 This is a distribution map of charging piles in a certain district of a city, which shows the geographical distribution range of the experimental data in the embodiment and provides a realistic background for model training and evaluation; Figure 5 This is a comparison table of the prediction performance of each time series prediction method in the next 3 hours and 6 hours; Figure 6 For Figure 1 A summary diagram of . DETAILED DESCRIPTION

[0037] like Figure 1 and Figure 6 As shown, a time series prediction method based on a language model includes the following steps: Step 1) collect time series data, which can include heterogeneous information; Step 2) construct natural language prompt words based on the time series data in step 1); Step 3) inputting the natural language prompt word from step 2) into the first language model; Step 4), output the text representation of the target prediction value.

[0038] Preferably, the natural language prompt words include a specified model role, a target indication, and a prediction step size.

[0039] Preferably, step 3-1) is further included between step 3) and step 4), for performing meta-learning tuning to improve the generalization ability of the first large language model in a small sample or zero-sample area.

[0040] Preferably, step 3-2) is further included between step 3) and step 4), loading a second language model that has been pre-trained and aligned and tuned.

[0041] Preferably, in step 3, for the region , the model input format is as follows:

[0042] in, It is a natural language prompt word; Static characteristics of the region (such as geographical location, road density, number of charging piles, etc.); is the time series data of the region and its neighborhood. The output of the model is the natural language representation of the target prediction value:

[0043] This paper defines the prediction task objective as a language generation task and trains it using the following loss function:

[0044] in, is the number of sample areas; The number of tokens for the predicted value; Generate probability distributions for large language models.

[0045] Preferably, step 3-1) includes: 1. dividing the task area into a support set and a query set; 2. performing multi-step training on the support set to obtain intermediate model parameters 3. Single-step training on the query set to obtain the optimization direction of the target task ; 4. Use the following formula to update the model parameters:

[0046] in, is the learning rate, which controls the update step size.

[0047] Preferably, the natural language prompt words include: You are an expert in {task name} and are currently working on a forecasting task for {region description}.

[0048] Consider the following time series data: Target area load rate: {time series} Neighborhood average load rate: {time series} Predict the charging demand in the next hour and output only the predicted value.

[0049] Preferably, the time series data comes from urban traffic cells: in urban research or planning, small-scale regional units that divide urban space according to administration, function or traffic flow.

[0050] The present invention also relates to a time series prediction device based on a language model, including a module corresponding to the above-mentioned time series prediction method based on a language model.

[0051] Preferably, the following information is automatically collected: traffic flow, power load and market price.

[0052] This paper proposes a universal time series prediction method and system based on a large language model. The core of the method is to uniformly transform complex heterogeneous time series prediction tasks into natural language processing problems through prompt word engineering, giving full play to the advantages of LLM in zero-sample / small-sample semantic understanding, cross-modal reasoning and rapid generalization capabilities, thereby building a time series prediction platform with both prediction accuracy, task versatility and regional adaptability. The overall system structure is as follows Figure 1As shown, the prediction system proposed in this invention mainly consists of the following four core modules: 1. Task Languageization Module: Based on the type of prediction task (such as charging demand prediction, energy consumption prediction, etc.), it collects and constructs static and dynamic characteristics such as space, time, and socio-economic characteristics of the target area and its neighborhood, constructs a structured prompt word template, specifies contextual information such as model role, target indicator, and prediction step size, and forms a unified natural language input. The present invention integrates multiple dimensions of information into the prompt template, including geographic location, weather, historical load rate, etc., and expresses them in a unified natural language. Its prompt word structure is as follows: Example: You are an expert in {task name} and are currently working on a forecasting task for {region description}.

[0053] Consider the following time series data: target_area_load_rate: {time_series}; NeighborhoodAverageLoadRate:{time series}; Predict the charging demand in the next hour and output only the predicted value.

[0054] This prompt word not only helps the model understand the task objective, but also enables it to call upon its pre-trained knowledge, thus maintaining predictive capabilities even in data-scarce scenarios.

[0055] 2. Prediction modeling module based on natural language: Input the above-constructed prompt words into the large language model to generate a text representation of the target prediction value. This module is fine-tuned based on the pre-trained large language model, and by minimizing the negative log-likelihood loss function of the predicted text, it establishes a semantic mapping relationship between the input features and the predicted target, thereby achieving modeling and learning of complex time series rules; traditional time series prediction methods often require structured definition of the input and deep feature engineering. The present invention adopts prompt word learning technology to describe the input and task objectives as natural language text, and input them into the large language model, thereby achieving support for multiple tasks without adjusting the model structure. Specifically, for the region , the model input format is as follows:

[0056] in, It is a natural language prompt word; Static characteristics of the region (such as geographical location, road density, number of charging piles, etc.); is the time series data of the region and its neighborhood. The output of the model is the natural language representation of the target prediction value:

[0057] This paper defines the prediction task objective as a language generation task and trains it using the following loss function:

[0058] in, is the number of sample areas; The number of tokens for the predicted value; Generate probability distributions for large language models.

[0059] 3. Meta-learning tuning module: Use the Reptile meta-learning algorithm to perform task adaptation and migration optimization between regions, improving the model's generalization ability in small or zero-sample areas; Figure 2 As shown in Figure 1, to enhance the model's adaptability to different regions, this paper introduces a model-independent meta-learning method based on Reptile to optimize the large language model. The meta-learning process mainly includes the following steps: 1. Divide the task area into support set and query set; 2. Perform multi-step training on the support set to obtain intermediate model parameters ; 3. Single-step training on the query set to obtain the optimization direction of the target task ; 4. Use the following formula to update the model parameters:

[0060] in, is the learning rate, which controls the update step size.

[0061] 4. Large Language Model Inference Module: This module loads a pre-trained and aligned large language model, generates natural language predictions, and outputs the corresponding predicted values. Based on the pre-trained large language model, this module uses a Transformer architecture to understand and process the input natural language prompts, generating natural language text output containing the prediction results. The model generates the target value through comprehensive semantic modeling of regional features, time series data, and task instructions. The system then parses and extracts the numerical value from the generated text as the final prediction result, which is used for downstream task invocation or system output display.

[0062] The following are specific application scenarios: like Figure 3 As shown in the figure, the overall process includes data collection, data preprocessing, building regional semantic features, constructing Prompt input and serialization, then loading the Sentence-T5 pre-trained model and fine-tuning it using the Reptile algorithm, ultimately achieving the prediction of charging pile usage rates at future points in time.

[0063] S1: Data Collection and Preprocessing: This example selects the operating data of public charging piles in a certain city from June 19 to July 18, 2022, involving 18,061 charging piles and covering 247 urban traffic zones. The original data includes information such as charging timestamps, location coordinates, and charging status. To address the quality issues of the original data, the following processing is performed: 1) cleaning records with missing timestamps and invalid data (such as negative numbers); 2) using time series interpolation to fill in the missing data for short time periods; 3) calculating the charging pile occupancy rate for each traffic zone at a granularity of every 5 minutes. Figure 4 This is a schematic diagram of the distribution of charging piles in a certain district of a city, where the red border represents the area as a dynamic pricing area (charging fees change over time).

[0064] S2: Regional Semantic Feature Construction and Prompt Input Structure: Construct a feature description for each traffic zone, including the following: 1) coordinates and geographic location (address); 2) road length and number of charging stations; 3) average charging station load rate in the surrounding area; and 4) current temperature and humidity information. All of these features are organized using natural language descriptions and combined into the following input template: You are an expert in electric vehicle charging forecasting and are currently working on the forecasting task for area 9527.

[0065] The current temperature in this area is 27 degrees Celsius, the longitude and latitude coordinates are (22°N,…), it contains 46 charging stations, and the road length is 83.23 kilometers.

[0066] Consider the following time series data for the past 4 hours for this region: Target area load ratio: [0.24, 0.26, 0.31, 0.35]; Neighborhood average load ratio: [0.33, 0.31, 0.28, 0.27]; Predict the charging demand in the next hour and output only the predicted value.

[0067] S3: Model Training and Reptile Meta-Learning Tuning: Model input is organized as "Prompt template + regional features + time series data" and converted into language input sequences that conform to the T5 model. The training and test sets are divided as follows: Training set: June 19th to July 9th (21 days in total); Validation set: July 10th to July 14th (5 days); Test set: July 15th to July 18th (4 days).

[0068] The Sentence-T5 model was used as the backbone of the large language model, with the following key parameters set: 1) AdamW optimizer; 2) learning rate: 0.001; 3) batch size: 48; 4) 200 training epochs, with early stopping used to prevent overfitting. The model was fed with token sequences as input, and its task was to generate target digits (occupancy predictions) in natural language. The loss function used was negative log-likelihood (NLL), and Reptile multi-task optimization was implemented by constructing small tasks across multiple regions.

[0069] S4 Evaluation and Comparative Experiments: This paper conducts comparative experimental verification on the general time series prediction method based on the large language model under three settings, including: 1) Full-shot prediction: testing is performed after training in all regions; 2) Few-shot prediction: training is performed using the first 5%, 10%, 15%, and 20% of the training time steps respectively; 3) Zero-shot prediction: prediction is performed directly in unseen regions without additional training.

[0070] In order to comprehensively evaluate the performance of the prediction model, the following two classic indicators are used for quantitative evaluation: 1. Root mean square error, which measures the average deviation between the predicted value and the true value, is defined as:

[0071] in, is the true value, is the predicted value, is the total number of samples.

[0072] 2. Mean absolute error, which measures the average level of the absolute values ​​of all errors and is defined as:

[0073] It's easy to see: A unified time series modeling framework based on the linguistic representation of prompt words: This paper proposes a modeling method that linguistically represents traditional time series prediction tasks. By constructing natural language prompt word templates, it uniformly expresses regional characteristics, time series, and contextual semantics as language input, guiding a large language model to complete the prediction task. This solution breaks away from the traditional model's reliance on input dimensions and structure, offering the advantages of high task versatility and a low threshold for model adaptation, which constitutes one of the core protection points of this invention.

[0074] Support for cross-scenario generalized predictions across heterogeneous regions: This paper designs a meta-learning (Reptile)-based approach to optimize large language models across regions, significantly improving the model's prediction capabilities in regions with few or even no samples. This mechanism enables efficient model migration and generalization in data-scarce regions through rapid iterative updates of the support and query sets.

[0075] A lightweight deployment mechanism based on a universal language input and generated output paradigm: This approach avoids structural regression design by outputting predictions in a language-generated format. This design relies solely on language input and output to execute inference and serve. This design not only simplifies model deployment but also allows for flexible expansion to different prediction targets (such as traffic flow, energy consumption, and electricity prices), providing highly reusable interface logic for multi-scenario applications.

[0076] The technical effect of the present invention is compared as follows Figure 5 As shown, this solution demonstrates excellent prediction accuracy and generalization. Its prediction curves are highly consistent with the ground truth, and it is particularly responsive to rapid fluctuations in charging demand, outperforming traditional models such as LSTM and PIAST. Further quantification of the performance differences reveals that this solution achieves the lowest RMSE and MAE (5.40 and 3.29, respectively) across all time steps, outperforming existing deep models and other language models, demonstrating its robustness and practicality across multiple regions and scenarios.

[0077] Therefore, the following technical effects are achieved: 1. Realizing the fusion of multi-source heterogeneous data and improving the model prediction ability: The present invention uses prompt technology to input heterogeneous information such as regional characteristics and historical time series data in natural language, avoiding the strict dependence of traditional models on input structure, and realizing modeling and prediction in a unified semantic space, which greatly improves the model's ability to integrate various factors in complex urban environments (geographic location, weather, price, neighborhood status, etc.).

[0078] 2. Support for few-shot and zero-shot predictions, enhancing cross-regional generalization: This paper employs a Reptile-based meta-learning approach for alignment and fine-tuning, enabling the model to achieve strong generalization. This allows accurate predictions even in unseen regions (zero-shot) or regions with a small number of samples (few-shot), effectively addressing the poor cold-start capabilities of traditional models and making it suitable for deployments where regional data is scarce.

[0079] 3. Simplified model training and deployment, reducing the burden of feature engineering and structural design: Compared with traditional deep learning methods that require processes such as feature extraction and model structure adjustment, this invention uses a unified language template and pre-trained large language model. Only language input is needed to perform prediction tasks, simplifying the training and deployment process and improving R&D and iteration efficiency.

[0080] 4. Leveraging the open knowledge and reasoning capabilities of the large language model: This paper introduces strategies such as role-playing and zero-shot augmentation into the design of prompt word templates. This enables the large language model to call upon its pre-trained open-world knowledge to comprehensively understand and predict charging behavior, regional characteristics, and dynamic context, thereby improving the model's robustness and generalization performance.

[0081] 5. High prediction accuracy and strong stability: In comparative experiments conducted in multiple real urban areas, the present invention significantly outperformed existing deep learning and LLM methods in three scenarios: full supervision, small sample, and zero sample. It achieved optimal results in indicators such as RMSE and MAE, and the prediction curve responded quickly to fluctuations, making it suitable for demand forecasting in complex dynamic environments.

[0082] 6. Scalability and adaptability: Applicable to various time series prediction scenarios: The language-based modeling framework of the present invention is adaptable to different types of time series prediction tasks (such as energy consumption prediction, traffic flow prediction, etc.), has good versatility and scalability, and provides technical support for building a unified multi-scenario intelligent prediction platform.

[0083] The preferred embodiments of the present invention are exemplarily given above with the aid of the accompanying drawings. However, it should be understood by those skilled in the art that, without exceeding the scope of protection of the appended claims, they can form new technical solutions by adding features, combining features, etc.

Claims

1. A time series prediction method based on a language model, characterized in that: The steps include: Step 1) collect time series data, which can include heterogeneous information; Step 2) construct natural language prompt words based on the time series data in step 1); Step 3) inputting the natural language prompt word from step 2) into the first language model; Step 4), output the text representation of the target prediction value.

2. The time series prediction method based on language model according to claim 1, characterized in that The natural language prompt words include designated model role, target indication, and prediction step size.

3. The time series prediction method based on language model according to claim 2, characterized in that: Between step 3) and step 4), step 3-1) is also included, which is used to perform meta-learning tuning to improve the generalization ability of the first large language model in a small sample or zero-sample area.

4. The time series prediction method based on language model according to claim 3, characterized in that Between step 3) and step 4), step 3-2) is also included, which is to load a second language model that has been pre-trained and aligned and fine-tuned.

5. The time series prediction method based on language model according to claim 4, characterized in that: In step 3, for the region , the model input format is as follows: , in, It is a natural language prompt word; is the regional static characteristic; is the time series data of the region and its neighborhood; the output of the model is the natural language representation of the target prediction value: , This paper defines the prediction task as a language generation task and trains it using the following loss function: , in, is the number of sample areas; The number of tokens for the predicted value; Generate probability distributions for large language models.

6. The time series prediction method based on language model according to claim 5, characterized in that Step 3-1) includes:

1. Dividing the task area into a support set and a query set; 2. Performing multi-step training on the support set to obtain intermediate model parameters 3. Single-step training on the query set to obtain the optimization direction of the target task 4. Update the model parameters using the following formula: , in, is the learning rate, which controls the update step size.

7. The time series prediction method based on language model according to claim 6, characterized in that: The natural language prompt words include: You are an expert in {task name} and are currently working on a forecasting task for {region description}. Consider the following time series data: Target area load rate: {time series} Neighborhood average load rate: {time series} Predict the charging demand in the next hour and output only the predicted value.

8. The time series prediction method based on language model according to claim 7, characterized in that: The time series data comes from urban traffic cells: in urban research or planning, small-scale regional units that divide urban space according to administration, function or traffic flow.

9. A time series prediction device based on a language model, characterized in that: The method comprises a module corresponding to the time series prediction method based on a language model according to any one of claims 1 to 8.

10. The time series prediction device based on language model according to claim 9, characterized in that Automatically collects information such as traffic flow, power load and market prices.

Citation Information

Patent Citations

  • Power load prediction method based on large language model

    CN117634740A

  • Photovoltaic power generation few-sample transferable prediction method based on large language model

    CN120045943A

Cited By

  • Photovoltaic power generation power prediction method and system based on large language model

    CN121172753A