Forecasting time encoding method based on large language model prior

By using a forecast time coding method based on large language model priors, the problems of error accumulation and insufficient fusion of multi-scale features in ocean and weather forecasts are solved, achieving efficient and stable forecasting using a single artificial intelligence model, and improving the overall performance and resource utilization of the forecasting system.

CN119669745BActive Publication Date: 2026-04-10INST OF OCEANOLOGY - CHINESE ACAD OF SCI
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INST OF OCEANOLOGY - CHINESE ACAD OF SCI
Filing Date
2025-02-19
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing technologies in ocean and weather forecasting suffer from problems such as error accumulation, large number of models, high training and maintenance costs, and insufficient fusion of multi-scale features, resulting in poor forecast performance.

Method used

A prediction time encoding method based on large language model priors is adopted. By decomposing and encoding features at different time scales, principal component embeddings are constructed, and dimension mapping is performed through a multilayer perceptron to form a unified temporal embedding, thereby optimizing the model training and prediction process.

Benefits of technology

It improves the accuracy and stability of forecasts, reduces the number of models and training costs, enhances the generalization ability and adaptability of models, simplifies the system architecture, and improves resource utilization and the reliability of the forecast system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119669745B_ABST
    Figure CN119669745B_ABST
Patent Text Reader

Abstract

The application discloses a kind of forecast time coding methods based on large language model prior, belong to marine meteorological technical field.The application systematically encodes the periodicity and nonlinear variation law of marine state variable on different time scales into time embedding, improves the expression ability of time characteristics.The application utilizes the prior knowledge of large language model, optimizes the extraction and mapping process of time characteristics, improves the quality and efficiency of time embedding, converts time information into context semantic embedding, realizes accurate expression and efficient use of time characteristics.The application can improve the prediction accuracy, reduce error accumulation;Reduce model training and maintenance cost;Enhance the expression ability of time characteristics, improve the generalization ability of model;Improve the operation simplicity and practicality of prediction system;Optimize resource utilization, save energy consumption;Improve the reliability and stability of prediction system.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of marine meteorology, and in particular, relates to a prediction time coding method based on a large language model prior. BACKGROUND

[0002] In the field of meteorology and ocean science, continuous weather or ocean state prediction is of great significance for disaster warning, resource management, and environmental protection. With the development of artificial intelligence technology, deep learning-based prediction models have gradually become a research hotspot. However, how to efficiently reuse a single artificial intelligence model to achieve continuous and stable weather or ocean prediction still faces many technical challenges.

[0003] The autoregressive prediction method has the advantage of relatively simple model structure, which can better capture the time dependence relationship in the short term. However, since each step of prediction depends on the result of the previous step, it leads to the accumulation of errors. In addition, autoregressive models are difficult to capture long-term trends and complex periodic changes, limiting their application effect in continuous prediction. Therefore, although the autoregressive method performs well in short-term prediction, it has obvious shortcomings in realizing continuous prediction. To overcome the limitations of the autoregressive prediction method, a multi-model prediction method is proposed. The Xiyang ocean state variable prediction model is a representative of this method, which establishes independent prediction models for different prediction days. This method can optimize model parameters for different time scales, thereby improving the accuracy and stability of prediction to some extent. However, the multi-model prediction method also has significant defects. First, establishing independent models for each prediction period leads to a significant increase in the number of overall models, which in turn causes a sharp rise in training and maintenance costs. Second, the differences in parameters and structure between different models increase the complexity of the system.

[0004] In recent years, researchers have explored the use of time coding technology to achieve continuous prediction of a single model. Lang Ya proposed a prediction method based on prediction time coding, which solves the problem of error accumulation in the autoregressive method to some extent by taking time information as an important input of the model. However, it lacks effective feature expression when dealing with long-term periodic changes, making it difficult to capture long-term trends and complex periodic patterns. Moreover, for nonlinear variation rules of different time scales, it fails to fully consider the fusion of multi-scale features, resulting in poor performance of the model in dealing with multi-scale dynamic processes.

[0005] Currently, common time information encoding methods mainly include fixed frequency encoding and learning encoding. The fixed frequency encoding method maps time information to a high-dimensional space to capture periodic variation characteristics. However, it performs poorly when dealing with non-periodic and long-term trend changes. The learning encoding method uses machine learning techniques such as neural networks to autonomously learn the representation of time characteristics. However, this method often relies on a large amount of data and computing resources. In addition, existing time encoding methods lack effective fusion mechanisms when dealing with different time scale features, resulting in unstable performance of the model when dealing with multi-scale dynamic processes. SUMMARY

[0006] The purpose of the present application is to propose a forecast time encoding method based on large language model prior to make up for the shortcomings of the prior art.

[0007] To achieve the above purpose, the specific technical scheme adopted by the present application is as follows:

[0008] A forecast time encoding method based on large language model prior, comprising the following steps:

[0009] S1: Decomposition and encoding of time characteristics: the time information of the obtained marine state variable is decomposed according to different time scales (year, quarter, month, day) and encoded respectively to capture its periodic and nonlinear variation law;

[0010] S2: Construction of principal component embedding: for the characteristics of year , due to the lack of obvious periodicity and the unenumerable future years, the method of principal component analysis (PCA) is used to construct a learnable principal component embedding;

[0011] S3: Integration and mapping of time embedding: the embedding vectors of different time scales are integrated to form a complete time embedding E(t, τ), and are dimensionally mapped through a multilayer perceptron (MLP) to adapt to the input requirements of the prediction model;

[0012] S4: Model training and optimization: based on the constructed time embedding, the prediction model is trained to realize the short-term prediction of the marine state variable; the time embedding and the model parameters are optimized during the training process to improve the prediction accuracy;

[0013] S5: Using the trained prediction model and complete time embedding to predict the future marine state variable.

[0014] Further, the S1 specifically comprises:

[0015] S1-1: decompose the prediction time into multiple time scales: year is marked as Y, month is marked as M, day is marked as D, and prediction reasoning days are marked as ; where year is used to capture long-term trends, quarter and month are used to reflect medium-term periodic changes, and day is used to capture short-term nonlinear fluctuations;

[0016] S1-2: Periodic change rule encoding:

[0017] S1-21: Periodic changes of year, quarter, and month: For year, quarter, and month, since there is a clear periodic change rule, a discrete learnable Embedding vector is used for representation. Specifically, the month ( ) and day ( ) are mapped to the corresponding discrete Embedding space, and their vector representations are learned through a neural network;

[0018] S1-21: Nonlinear change rule of day: The change of day ( ) has strong nonlinear characteristics, so it needs to be encoded by a nonlinear function to better capture its dynamic change characteristics.

[0019] Further, in S2:

[0020] S2-1: Principal component analysis is performed on the historical marine state variable data, and main components ( , i=1,…,10) are extracted, which can effectively represent the main trend of year characteristics;

[0021] S2-2: Calculate weight coefficients: Use a large language model (Large Language Model, LLM) with prior knowledge, specifically the Llama3.1-8B model fine-tuned on instructions, to generate year corresponding weight coefficients ; This process is achieved by dimension mapping of the context semantic embedding generated by LLM through a multilayer perceptron (Multilayer Perceptron, MLP):

[0022] ;

[0023] Where the LLM model generates context semantic embedding by inputting the prompt word "XXX Year Global Ocean State" to ensure the semantic richness and accuracy of the year feature;

[0024] S2-3: Construction of year embedding: Linear combination of principal component embedding and weight coefficient to obtain the embedding representation of year:

[0025] At the same time, ensure that the weight coefficient satisfies the normalization condition:

[0026] .

[0027] Further, the S3 comprises:

[0028] S3-1: Integration of embedding vectors: embedding of year , embedding of month , embedding of day and embedding of forecast length Vector splicing (⊕) and addition are performed to obtain a complete time embedding representation:

[0029] ;

[0030] Where K is the maximum number of days the forecast model is required to forecast into the future;

[0031] S3-2: Dimension mapping: using a multi-layer perceptron (MLP) to further map the integrated time embedding to match the input dimension requirements of the forecast model; Specifically, the MLP maps the high-dimensional embedding vector to the feature space required by the forecast model through several layers of fully connected neural networks:

[0032] ;

[0033] The time embedding features after dimension mapping can be directly added to the convolutional neural network or attention mechanism neural network as the "initial time-interval time" joint feature information introduced into the prediction system.

[0034] Further, the S4 comprises:

[0035] S4-1: Collect and organize historical marine state variable data, and divide it into training set, validation set and test set in chronological order, to ensure the continuity and integrity of the data;

[0036] S4-2: Design model architecture: select a neural network architecture suitable for time series prediction, such as Long Short-Term Memory (LSTM), Gated Recurrent Unit (GRU) or Transformer model. The model input includes the constructed time embedding E(t, τ) and the corresponding historical state variable;

[0037] S4-3: Loss function setting: use mean square error (MSE) or other loss functions suitable for regression tasks to measure the difference between the predicted results and the true values; optimization algorithm selection: use gradient descent and its variants (such as Adam optimizer) to update parameters to ensure efficient convergence of the model; Hyperparameter tuning: adjust learning rate, batch size, network layer number and other hyperparameters through cross-validation and grid search to optimize model performance;

[0038] S4-4: Optimization of time embedding: During the model training process, the time embedding E(t, τ) is part of the model input, and its parameters (including Embedding vectors and MLP weights) are optimized together with the model parameters to achieve a high coupling between time features and the prediction task.

[0039] Further, in S5:

[0040] S5-1: Prediction input preparation: According to the current time and the prediction length, construct the corresponding time embedding E(t, τ), including the encoding of year, quarter, month, day, and prediction length.

[0041] S5-2: Prediction model inference: Input the constructed time embedding E(t, τ) and the corresponding historical state variables into the prediction model, perform forward propagation, and generate the marine state variable prediction results at future time.

[0042] S5-3: Result verification and optimization: Perform error analysis and verification on the prediction results to ensure the accuracy and reliability of the prediction. According to the feedback results, further optimize the model parameters and time embedding method to improve the prediction performance.

[0043] S5-4: Actual application deployment: Integrate the prediction model into the actual weather or ocean prediction system to provide real-time prediction services for disaster warning, resource management, environmental protection, and other fields.

[0044] Compared with the prior art, the beneficial effects of the present application are:

[0045] The present application optimizes the method of time embedding, realizes efficient prediction of continuous weather or ocean state by a single artificial intelligence model:

[0046] (1) The periodic and nonlinear variation of marine state variables at different time scales is systematically encoded into the time embedding, improving the expression ability of time features. Multi-level embedding vectors are used to organically integrate multi-dimensional time information such as year, quarter, month, and day. By introducing time encoding technology, a single model can efficiently handle multi-period prediction tasks, reducing the number of models and training costs, and improving the overall efficiency and scalability of the prediction system. The unified time encoding method enables a single model to handle a variety of prediction needs from short-term to long-term, simplifying the system architecture and improving resource utilization.

[0047] (2) Utilize the prior knowledge of large language models to optimize the extraction and mapping process of time features, improve the quality and efficiency of time embedding, and convert time information into context semantic embedding to achieve precise expression and efficient use of time features.

[0048] (3) Improve the accuracy and reliability of long-term forecasts. By optimizing the encoding of time information, reducing the cumulative effect of errors, and meeting the practical needs of continuous forecasting, the model can better understand and predict long-term trends and complex periodic changes, improving the credibility and stability of the forecast results.

[0049] (4) Improve the generalization ability and adaptability of the model. By comprehensively encoding multi-scale time features, enhance the adaptability of the model in different time dynamic processes, improve the generalization ability of the model, and enable it to maintain high efficiency in the prediction performance in the changing actual environment. Multi-dimensional time feature expression, adapt to the prediction needs of different regions and different time scales.

[0050] The present application can improve the prediction accuracy, reduce the error accumulation; reduce the model training and maintenance cost; enhance the time feature expression ability, improve the model generalization ability; improve the operation simplicity and practicality of the prediction system; optimize resource utilization, save energy consumption; improve the reliability and stability of the prediction system. Based on experimental data and actual application feedback, the present application has wide popularization value and can be applied to weather and ocean prediction systems worldwide, meeting the prediction needs of different regions and different regions. BRIEF DESCRIPTION OF DRAWINGS

[0051] Figure 1 is the overall flowchart of the present application.

[0052] Figure 2 is the processing flowchart of Example 2. DETAILED DESCRIPTION

[0053] The technical solutions described in the present application will be further described and explained below in conjunction with examples.

[0054] The following examples need to solve the following technical problems:

[0055] (1) Effectively reduce the error accumulation in long-term forecasting. By improving the construction method of time embedding, optimizing the encoding of time information, and reducing the accumulation of errors in the prediction process, the accuracy and reliability of long-term forecasting are fundamentally improved. Specifically, the large language model is used to encode time information more finely and multidimensionally, ensuring that the expression of time features on different time scales is more comprehensive and accurate, thereby effectively suppressing the gradual amplification of errors.

[0056] (2) Reduce the cost of model training and maintenance. Develop a technology that can handle multi-period forecasting in a single model, avoid establishing independent models for different forecasting days, and significantly reduce the overall training and maintenance cost, improve the scalability and practicality of the model. Through a unified time encoding method, a single model can flexibly respond to the needs of different forecasting periods, reducing the number of models, simplifying the system architecture, and reducing resource consumption.

[0057] (3) Enhance the expression ability of multi-scale time features. The periodicity and non-linear variation of marine state variables at different time scales (such as years, quarters, months, and days) are systematically encoded into time embedding, improving the model's ability to capture multi-scale dynamic processes and enhancing the model's generalization ability and adaptability. Through multi-level and multi-dimensional time coding, the model can understand and process changes at different time scales simultaneously, improving the comprehensiveness and accuracy of the forecast.

[0058] (4) Improve the efficiency and effectiveness of time feature coding. Use large language model priors and multi-layer perceptron to efficiently extract and map time features, optimize the expression of time embedding, achieve efficient and comprehensive time information coding, and improve the overall forecasting performance of the model. By introducing advanced natural language processing models as a source of prior knowledge for time information, the semantic understanding and expression ability of time features are improved, thereby enhancing the model's performance in complex time dynamics.

[0059] Example 1:

[0060] A prediction time coding method based on large language model priors, as shown in Figure 2 , is used to more intuitively display the specific implementation steps of the present application:

[0061] S1: Decomposition and coding of time features: The time information of the acquired marine state variables is decomposed according to different time scales (years, quarters, months, and days) and coded separately to capture their periodicity and non-linear variation; specifically including:

[0062] S1-1: Decompose the prediction time into multiple time scales: mark the year as Y, the month as M, the day as D, and the number of days of backward reasoning as ; where the year is used to capture long-term trends, the quarter and month are used to reflect medium-term periodic changes, and the day is used to capture short-term non-linear fluctuations;

[0063] S1-2: Periodic variation coding:

[0064] S1-21: Periodic variation of years, quarters, and months: For years, quarters, and months, since there is a clear periodic variation, a discrete learnable Embedding vector is used for representation. Specifically, map the month ( ) and day ( ) to the corresponding discrete Embedding space, and learn their vector representations through a neural network;

[0065] S1-21: Non-linear variation of days: the number of days ( The changes in () have strong nonlinear characteristics, so they need to be encoded by nonlinear functions to better capture their dynamic changes.

[0066] Step S1 needs to fully consider the interactions between different time scales to ensure the independence and complementarity of each temporal feature. The encoding method should be learnable, capable of adaptively adjusting the embedding vector based on training data. By decomposing and encoding features at different time scales, the dynamic changes of ocean state variables at multiple scales can be comprehensively captured, providing rich temporal information for subsequent temporal embedding integration.

[0067] S2: Construction of Principal Component Embeddings: Year-Specific Due to its lack of obvious periodicity and the unenumerability of future years, principal component analysis (PCA) is used to construct learnable principal component embeddings; specifically including:

[0068] S2-1: Principal component analysis was performed on historical ocean state variable data to extract... The main components ( (i=1,…,10), these principal components can effectively represent the main trends in the changes of year characteristics;

[0069] S2-2: Calculating weight coefficients: Using a Large Language Model (LLM) with prior knowledge, specifically the Llama 3.1-8B model with instruction fine-tuning, generated in [year]. Corresponding weight coefficients This process is achieved by using a multilayer perceptron (MLP) to perform dimensional mapping on the contextual semantic embeddings generated by the LLM:

[0070] ;

[0071] The LLM model generates contextual semantic embeddings by inputting the prompt "Global Ocean State in Year XXX" to ensure the semantic richness and accuracy of the year features.

[0072] S2-3: Construction of Year Embeddings: The principal component embeddings are linearly combined with the weight coefficients to obtain the year embedding representation.

[0073] At the same time, ensure that the weighting coefficients meet the normalization conditions:

[0074] .

[0075] The principal component analysis in the S2 step needs to be based on sufficient historical data to ensure that the extracted principal components can fully reflect the characteristics of the year. The LLM model needs to be fine-tuned with sufficient instructions to accurately generate the context semantic embedding corresponding to the year. Through the construction of principal component embedding, the complex change law of the year can be effectively represented, making up for the shortcomings of traditional periodic encoding methods in dealing with long-term trends and improving the expression ability of time embedding.

[0076] S3: Integration and mapping of time embedding: integrate embedding vectors of different time scales to form a complete time embedding E(t, τ), and perform dimension mapping through a multi-layer perception (MLP) to adapt to the input requirements of the prediction model; specifically including:

[0077] S3-1: Integration of embedding vectors: vector splicing (⊕) and addition are performed on the year embedding , month embedding , day embedding and prediction length embedding to obtain a complete time embedding representation:

[0078] ;

[0079] where K is the maximum number of days the prediction model is required to predict in the future;

[0080] S3-2: Dimension mapping: use a multi-layer perception MLP to further dimension map the integrated time embedding to match the input dimension requirements of the prediction model; specifically, the MLP maps the high-dimensional embedding vector to the feature space required by the prediction model through several layers of fully connected neural networks:

[0081] ;

[0082] The dimension-mapped time embedding features can be directly added to a convolutional neural network or an attention mechanism neural network as joint feature information of the "initial time-interval time" introduced into the prediction system.

[0083] The embedding vectors of each time scale in the S3 step need to have the same dimension or be dimensionally matched through appropriate linear transformation. The MLP structure needs to be optimized to ensure the efficiency and accuracy of embedding mapping. By integrating embedding vectors of different time scales and performing dimension mapping, a comprehensive time feature representation suitable for the prediction model is formed, improving the model's understanding and prediction ability of multi-scale time dynamics.

[0084] S4: Model training and optimization: based on the constructed time embedding, train the prediction model to realize short-term prediction of marine state variables; optimize the time embedding and model parameters during training to improve prediction accuracy; specifically including:

[0085] S4-1: Collect and organize historical marine state variable data, divide into training set, validation set and test set in chronological order, ensure data continuity and integrity;

[0086] S4-2: Design model architecture: select neural network architecture suitable for time series prediction, such as Long Short-Term Memory (LSTM), Gated Recurrent Unit (GRU) or Transformer model. Model input includes constructed time embedding E(t, τ) and corresponding historical state variables;

[0087] S4-3: Loss function setting: use mean square error (MSE) or other loss functions suitable for regression tasks to measure the difference between predicted results and true values; optimization algorithm selection: use gradient descent and its variants (such as Adam optimizer) for parameter update to ensure efficient convergence of the model; hyperparameter tuning: adjust learning rate, batch size, network layer number and other hyperparameters through cross-validation and grid search to optimize model performance;

[0088] S4-4: Optimization of time embedding: in the model training process, time embedding E(t, τ) as part of the model input, its parameters (including Embedding vector and MLP weight) and model parameters are optimized together to achieve high coupling between time features and prediction tasks.

[0089] The step S4 has sufficient training data to cover different time scale variation rules; suitable model architecture can fully utilize the multi-dimensional information of time embedding. This step improves the understanding ability of the prediction model to time characteristics and prediction accuracy through training and optimization, and realizes accurate short-term prediction of marine state variables.

[0090] S5: Use the trained prediction model and complete time embedding to predict future marine state variables; specifically including:

[0091] S5-1: Prediction input preparation: according to the current time and prediction length, construct the corresponding time embedding E(t, τ), including year, quarter, month, day and prediction length encoding.

[0092] S5-2: Prediction model inference: input the constructed time embedding E(t, τ) and corresponding historical state variables into the prediction model, perform forward propagation, and generate marine state variable prediction results for future time.

[0093] S5-3: Result verification and optimization: Perform error analysis and verification on the prediction results to ensure the accuracy and reliability of the prediction. Based on the feedback, further optimize the model parameters and time embedding methods to improve the prediction performance.

[0094] S5-4: Actual application deployment: Integrate the prediction model into the actual weather or ocean prediction system to provide real-time prediction services for disaster warning, resource management, environmental protection, and other fields.

[0095] In the S5 step: The prediction system needs to have real-time data input and processing capabilities to ensure the timeliness of the prediction results. The prediction results need to be strictly verified and calibrated to ensure their application value. This step generates accurate prediction results and applies them to actual scenarios, improving the research and application effect of meteorology and ocean science, and assisting decision-making in related fields.

[0096] The above steps form an organic process chain in the entire technical solution, and each step is related and supported by each other, together achieving the goal of the prediction time coding method based on large language model prior: the decomposition and coding of time features provide a multi-scale time information foundation for subsequent embedding construction. The construction of principal component embedding specifically solves the complexity problem of year characteristics, improving the expression ability of time embedding. The integration and mapping of time embedding organically integrates multi-scale time features to form a comprehensive time embedding suitable for prediction models. Model training and optimization ensure that the prediction model can fully utilize time embedding to achieve high-precision prediction. The generation and application of prediction results convert the expected effect of the technical solution into actual results, providing strong support for meteorology and ocean science.

[0097] Embodiment 2:

[0098] This embodiment takes the ocean and atmospheric reanalysis data at a given time point as the time information input of the time embedding model, and a single inference produces GLORYS12 ocean reanalysis data at the future time point (1-7 days) as output. The time resolution of GLORYS12 data is 1 day, and the spatial resolution is 1 / 12°. The prediction variables include sea water velocity U, V, sea surface height, sea temperature, and sea water salinity. According to the ocean state variables on November 03, 2023, the prediction of the 7th day in the future is performed, and the process of the prediction task is as follows, as shown in Figure 2

[0099] S110 Input current time, prediction length: First, the system needs to obtain the current time (January 1, 2023) and the user-specified prediction length (for example, 10 days in the future). Users can input these time information through the interface, or complete this step by automatically obtaining the current date and prediction requirements. ​

[0100] Input current time: November 03, 2023;

[0101] Input forecast length: 7 days.

[0102] S120 Extract the year, month, day, and forecast length of the current time: The system extracts the specific time features from the input current time (January 1, 2023), including the year, month, and day information, and extracts the forecast length:

[0103] Year (t_Y): 2023;

[0104] Month (t_M): November;

[0105] Day (t_D): 03;

[0106] Forecast length (τ): 7 days.

[0107] S130 Construct the encoding of the year, month, day, and forecast length: According to the extracted time features, the system begins to construct the time embedding vector. The specific time encoding method is as follows:

[0108] Year (t_Y) encoding: For the year, 10 principal component Embedding vectors are generated using principal component analysis, and a multi-layer perceptron (MLP) mapping is used to represent the characteristics of 2023. The linear combination of each principal component vector represents the characteristics of the year.

[0109] Month (t_M) encoding: For the month (November), a discrete learnable Embedding vector representation is used, mapping January to a fixed-dimensional vector.

[0110] Day (t_D) encoding: For the day (03), a discrete learnable Embedding vector representation is also used, mapping January 1 to a fixed-dimensional vector.

[0111] Forecast length (τ) encoding: The forecast length (7 days) is represented using a discrete Embedding vector. Since the forecast length is an integer (τ=7), its corresponding vector is obtained through training.

[0112] S140 Output the time embedding vector and add it to the marine state variable features: After constructing the complete time embedding vector, the system combines it with the historical observation data of marine state variables (such as sea surface temperature, sea surface height, etc.) as the input of the model. The specific operation is as follows:

[0113] Input marine state variables: The system obtains the marine state variable data corresponding to the current time (November 03, 2023), such as sea surface temperature (SST), etc.

[0114] Fusing time embedding with state variables: The time embedding vector E(t, τ) constructed in the previous step is added to the feature data of the ocean state variables (such as SST, etc.) to form a new feature vector, which is used as the input of the deep neural network (MLP).

[0115] In this way, the model can consider both the periodic changes in the time dimension (such as seasonality, annual cycle) and the dynamic changes in the ocean state variables. Then, this fused feature vector is input into the deep neural network to predict the ocean state variables for the next 10 days.

[0116] Traditional autoregressive prediction methods (such as the Pangu model) are prone to error accumulation in long-term prediction, as each step of prediction depends on the results of the previous step, affecting the reliability and accuracy of the prediction. The present invention uses multi-scale time embedding to systematically encode the periodic and nonlinear changes of years, seasons, months, and days, enhancing the model's ability to capture long-term trends and complex dynamics. Through experiments, the following evaluation indicators are used:

[0117] (1) Mean Squared Error (MSE): The long-term prediction MSE of the present invention is reduced by about 20% compared to traditional autoregressive methods.

[0118] (2) Mean Absolute Error (MAE): The MAE of the present invention is reduced in multiple prediction periods, with an average reduction of 15%.

[0119] (3) Coefficient of Determination (R²): The R² value of the present invention in long-term prediction is increased by 10 percentage points, indicating that the model's ability to explain data variation has significantly improved.

[0120] The multi-model prediction method requires independent prediction models for different prediction days, resulting in high training and maintenance costs and high system complexity. The present invention uses a unified time encoding method, allowing a single model to handle multiple time period prediction tasks, significantly reducing the number of models and training resource requirements. Through experiments, the following evaluation indicators are used:

[0121] (1) Model number: Compared to the multi-model prediction method, the present invention only needs one prediction model, reducing the number of models by about 90%.

[0122] (2) Training time: The time required to train a single model is reduced by 50% compared to the multi-model method, for example, from several models trained each day to only half the time.

[0123] (3) Computing resource consumption: The total computing resource consumption of the present invention under the forecast task is reduced by 40%, effectively saving computing costs. Existing time encoding methods have deficiencies in multi-scale feature fusion and long-term trend capture, limiting the model's generalization ability and adaptability. The present invention uses large language model priors (such as Llama3.1-8B) to generate high-quality context semantic embeddings, and effectively represents year features through principal component analysis, ensuring comprehensive expression of time features at different scales. Through experimental verification, the following evaluation indicators are used:

[0124] (1) Cross-region forecast performance: In different geographical regions, the R² value of the present invention method is increased by an average of 12%, showing strong generalization ability.

[0125] (2) Cross-time period stability: The model's performance is stable in different years, seasons, and months, with a standard deviation reduction of 8%, indicating enhanced adaptability to different time periods.

[0126] (3) Transfer learning performance: In the forecast task of migrating to new regions or new time periods, the present invention method's prediction accuracy is improved by 15%, demonstrating its good generalization ability.

[0127] Multi-model forecasting methods require independent operations for different forecast days, increasing system operation complexity and user difficulty. The present invention optimizes the construction and integration process of time embedding, achieving high coupling between time features and forecasting models, making the operation process of the forecasting system more convenient. Through experimental verification, the following evaluation indicators are used:

[0128] (1) User operation steps: The present invention method simplifies user operation steps from the original multi-step to a single step, reducing operation complexity by about 70%.

[0129] (2) System integration time: The integration time of the forecasting system is shortened from two weeks to one week, significantly improving the deployment efficiency of the system.

[0130] (3) User satisfaction survey: In actual application, users' scores for the convenience of the present invention method are increased by an average of 20%, with good feedback.

[0131] Multi-model forecasting methods have high computing resource and energy consumption when dealing with multi-period forecasting tasks, which is not conducive to building a green and efficient forecasting system. The present invention has multi-period forecasting capability of a single model, which not only reduces the number of models but also optimizes the utilization efficiency of computing resources. Through experimental verification, the following evaluation indicators are used:

[0132] (1) Energy consumption (kWh): The total energy consumption of the present invention method under the forecast task is reduced by 40%, meeting the requirements of green computing.

[0133] (2) Computing resource utilization: By optimizing the model structure and time embedding, the computing resource utilization of the present method is improved by 30%, achieving more efficient resource allocation.

[0134] (3) Carbon emissions: With the reduction of energy consumption, the corresponding carbon emissions are reduced by about 35%, contributing to environmental protection and sustainable development. Traditional forecasting methods have poor stability and consistency when facing complex time dynamics, affecting the overall reliability of the system. However, the present invention enhances the understanding and prediction ability of the forecasting model for complex time dynamics through systematic time feature coding and multi-layer perception dimension mapping, improving the overall reliability and stability of the forecasting system. Through experimental verification, the following evaluation indicators are obtained:

[0135] (1) Forecasting result consistency: In different time periods and different forecasting tasks, the forecasting result consistency of the present invention is improved by 15%, reducing forecasting fluctuations.

[0136] (2) Stability test: In multiple repeated experiments, the standard deviation of forecasting error of the present invention is reduced by 10%, indicating that the forecasting result is more stable.

[0137] (3) Failure rate: The failure rate of the forecasting system in long-term operation is reduced from 5% to 2%, significantly improving the reliability of the system.

[0138] Existing forecasting methods have varying performance in practical applications, lacking extensive experimental verification and application case support. However, the present invention method has been extensively experimentally verified in multiple actual forecasting scenarios, demonstrating excellent performance and broad application prospects. Through experimental verification, the following evaluation indicators are obtained:

[0139] (1) Forecasting accuracy: In the marine temperature forecasting experiment of a coastal area, the forecasting accuracy of the present invention method is more than 95%, while the traditional autoregressive method is only 80%.

[0140] (2) Actual application feedback: The present invention has been successfully applied in multiple weather and ocean forecasting systems, with user feedback satisfaction reaching 90%, showing good actual application effect.

[0141] Finally, although the present invention is described in terms of embodiments, each embodiment does not necessarily contain only one independent technical solution. The description of the present invention is only for clarity, and those skilled in the art should consider the present invention as a whole. The technical solutions in each embodiment can be appropriately combined to form other embodiments that can be understood by those skilled in the art.

Claims

1. A large language model prior-based prediction time encoding method, characterized in that, Comprising the following steps: S1: decomposition and coding of time characteristics: the time information of the acquired ocean state variables is decomposed according to different time scales, and is coded respectively; the S1 specifically comprises: S1-1: Decompose the forecast time into multiple time scales: year marked as Y, month marked as M, day marked as D, and forecast reasoning days marked as ; where the year is used to capture long-term trends, the quarter and month are used to reflect medium-term periodic changes, and the day is used to capture short-term nonlinear fluctuations. S1-2: periodic change rule coding: S1-21: Periodic changes of year, quarter, month: For year, quarter and month, discrete learnable Embedding vectors are adopted for representation, mapping month ( ) and day ( ) to corresponding discrete Embedding spaces, learning their vector representations through neural networks; S1-22: Nonlinear variation pattern of days: number of days ( The changes in () have non-linear characteristics and need to be encoded using non-linear functions; S2: Construction of principal component embedding: for the characteristics of the year A method of principal component analysis (PCA) is used to construct a learnable principal component embedding; specifically including: S2-1: Principal component analysis is performed on the historical marine state variable data to extract , i=1,…,10), which are used to represent the change trend of the year characteristics;​ S2-2: Calculate weight coefficients: use large language model LLM with prior knowledge to generate year corresponding weight coefficients This process is achieved by dimension mapping the context semantic embedding generated by LLM through multi-layer perception MLP: Wherein, the LLM model generates context semantic embedding through input prompt word "XXX global ocean state”; S2-3: construction of year embedding: linear combination of principal component embedding and weight coefficient to obtain embedding representation of year: At the same time, ensure that the weight coefficient satisfies the normalization condition: S3: integration and mapping of time embedding: the embedding vectors of different time scales are integrated to form complete time embedding E(t, τ), and are dimensionally mapped through multilayer perception MLP to adapt to the input requirements of the prediction model; the S3 comprises: S3-1: Integration of the embedded vectors: Embedding of the year Embedding of the month Embedding of the day Embedding of the forecast length Vector concatenation (⊕) and addition to get the complete time embedding representation: Wherein, K is the maximum number of days required by the prediction model to predict in the future; S3-2: dimension mapping: the integrated time embedding is further dimensionally mapped using a multilayer perception MLP, and the MLP maps the high-dimensional embedding vector to a feature space required by the prediction model through several layers of fully connected neural network: ; The time embedding features after dimension mapping are added to a convolutional neural network or an attention mechanism neural network as "initial time-interval time” joint feature information introduced into the prediction system; S4: model training and optimization: based on the constructed time embedding, the prediction model is trained to realize short-term prediction of the ocean state variable; the time embedding and the model parameters are optimized during the training process to improve the prediction accuracy; the S4 comprises: S4-1: collect and arrange historical ocean state variable data, and divide them into training set, validation set and test set according to time sequence to ensure the continuity and integrity of the data; S4-2: design model architecture: select a neural network architecture suitable for time series prediction for model construction, and the model input includes the constructed time embedding E(t, τ) and the corresponding historical state variable; S4-3: loss function setting: adopt mean square error MSE loss function to measure the difference between the prediction result and the true value; optimization algorithm selection: use gradient descent method and its variants for parameter update to ensure efficient convergence of the model; hyperparameter tuning: adjust learning rate, batch size, network layer number hyperparameters through cross-validation and grid search method to optimize model performance; S4-4: optimization of time embedding: in the model training process, the time embedding E(t, τ) as part of the model input, its parameters and model parameters are optimized together to realize high coupling between time characteristics and prediction task; S5: use the trained prediction model and complete time embedding to predict the future ocean state variable.

2. The time prediction encoding method of claim 1, wherein, In the S5: S5-1: prediction input preparation: according to the current time and the prediction length, the corresponding time embedding E(t, τ) is constructed, including year, quarter, month, day and prediction length coding; S5-2: prediction model inference: input the constructed time embedding E(t, τ) and the corresponding historical state variable into the prediction model to generate the prediction result of the ocean state variable at the future time. S5-3: Result verification and optimization: Perform error analysis and verification on the prediction results to ensure the accuracy and reliability of the prediction; according to the feedback results, further optimize the model parameters and time embedding method to improve the prediction performance; S5-4: Actual application deployment: Integrate the prediction model into the actual weather or ocean prediction system to provide real-time prediction services.

Citation Information

Patent Citations

  • New energy generation power prediction optimization system and method based on AI large model technology

    CN118249314A