Multivariate source-load data prediction method and system based on pre-trained large language model
By converting the source load timing sequence into text mode and using the fine-tuning method of pre-trained large language model, combined with filter calibration technology, the problem of inaccurate prediction of traditional timing prediction models under small sample conditions is solved, and high-accurate multivariate source load prediction is achieved.
Patent Information
- Application Number
- CN202411943114.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-12-27
AI Technical Summary
Traditional timing prediction models are difficult to achieve accurate prediction under small sample conditions, especially in new power systems, due to the missing measurement data of the source load node and poor quality, the source load prediction is inaccurate.
The multivariate source load data prediction method based on pre-trained large language model is adopted. The source load timing sequence is converted into text mode through modal conversion, and the mixed fine-tuning module of multiple experts is used for fine-tuning, combined with filter calibration technology to improve prediction accuracy.
Under small samples and multivariate conditions, accurate prediction of different types of source load timing sequences is achieved, improving the accuracy and reliability of source load prediction.
Smart Images

Figure CN119377397B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a pre-trained model fine-tuning method for a source-load small sample time series prediction task based on a pre-trained large language model and a multivariate scenario, and belongs to the field of fine-tuning of pre-trained deep learning models. Specifically, a multivariate source-load data prediction method and system based on a pre-trained large language model are provided. Background Art
[0002] Under the macro background of the current new power system construction, with the access of a large number of new energy sources to the power grid, the uncertainty of system nodes has increased significantly. The electrification level of terminal energy consumption has increased significantly, such as the rapid development of new loads such as electric vehicle charging infrastructure, and new infrastructure loads such as data centers and 5G base stations. At the same time, the replacement loads of electricity in the industrial, agricultural and living fields are also accelerating, and the proportion of controllable loads such as load aggregation and demand response is increasing, further exacerbating the uncertainty on the load side. Under extreme meteorological conditions, due to insufficient historical data, traditional source-load prediction methods are often difficult to guarantee accuracy. At the same time, in the distribution network scenario, due to the lack of measurement data and poor quality of a large number of source-load nodes, the small sample problem in source-load prediction has become increasingly prominent. Among them, traditional time series prediction models usually rely on simple machine learning weighting strategies, which are difficult to show good generalization ability under small samples, resulting in prediction effects that are difficult to meet actual needs. Summary of the invention
[0003] In response to the above-mentioned inaccurate source-load prediction, especially the technical problem that traditional time series prediction models are difficult to accurately predict under small sample conditions, the technical solution of the present invention makes fine adjustments to the source-load prediction task on the basis of a general large language model, making full use of the powerful generalization ability and rich world knowledge of the pre-trained large language model, thereby effectively responding to the challenges of the source-load prediction task under small sample conditions. That is, the present invention provides a multivariate source-load data prediction method based on a pre-trained large language model, which performs fine adjustments for the source-load prediction task on a general large language model, and can complete different types of source-load time series prediction tasks under small sample and multivariate conditions, thereby improving the accuracy and reliability of source-load prediction.
[0004] To this end, the present invention provides the following technical solutions:
[0005] A multivariate source-load data prediction method based on a pre-trained large language model comprises the following steps:
[0006] S1: Perform modality conversion on the input historical source-load time series, that is, convert the time series modality of the source-load time series into text modality to achieve modality alignment between the source-load data modality and the pre-trained large language model;
[0007] Among them, the input historical source-load time series data is tokenized as the query vector Quary of the multi-head attention layer in the text encoder; the word vector query table of the pre-trained large language model is filtered through the linear layer for dimensionality reduction to obtain the word vector describing the source-load sequence characteristics, and used as the key vector Key and value vector Value of the multi-head attention layer; then the multi-head attention operation is performed and the text encoding of the historical source-load time series is obtained through the feedforward neural network;
[0008] S2: Input the textual encoding obtained in step S1 into the pre-trained large language model based on the multi-expert hybrid fine-tuning module to obtain a predicted time series sequence, wherein the predicted time series sequence is the time series data of all variables at the prediction moment, and the pre-trained large language model based on the multi-expert hybrid fine-tuning module is a pre-trained large language model with a multi-expert Adapter fine-tuning module added after the feed-forward neural network in the Transformer encoder structure of the original pre-trained large language model;
[0009] That is, multiple adapters and a router are set in parallel, and the output of the feedforward neural network is connected to each adapter and the router; the router is connected to each adapter to obtain the weight of each adapter; the weighted sum of all adapters is performed and input into the layer normalization module of the Transformer encoder structure.
[0010] Optionally, the execution prediction time series sequence obtained in step S2 is a preliminary prediction time series sequence. After executing step S2, the method further includes filtering and calibrating the variable data to be predicted in the preliminary prediction time series sequence, as follows:
[0011] Select the leading variables, calculate the cross-correlation function between the specified variable to be predicted and the remaining variables in the historical source-load time series based on the correlation between the multivariate variables, and then select K variables with higher cross-correlation function values as leading variables, and align the time series data of the leading variables with the time series data of the variable to be predicted;
[0012] Generate a filter, process the historical source-load time series through a linear layer to obtain a dynamic state probability, and superimpose the set initial state probability to obtain the probability distribution of each state corresponding to each variable; then multiply the probability distribution of each state corresponding to each variable by a parameter matrix of a linear layer for dimension transformation, and then perform matrix multiplication with the maximum cross-correlation function value corresponding to the leading variable to generate a filter for the leading variable and the variable sequence to be predicted in the preliminary prediction time series;
[0013] Perform fast Fourier transform on the time-aligned leading variables and the sequence of variables to be predicted in the preliminary prediction time series, and filter them using corresponding filters. Then, sum the filtered time series data of the leading variables in K dimensions to obtain a sum sequence. The sum sequence is concatenated with the sequence of the variables to be predicted after filtering (still represented in the frequency domain at this time), and then the frequency domain dimension is reduced by a linear layer. Finally, a calibration deviation sequence is obtained by inverse fast Fourier transform.
[0014] The calibration deviation sequence is used to calibrate the time series data of the variables to be predicted in the preliminary prediction time series sequence.
[0015] It should be noted that existing time series prediction models often adopt the strategy of variable separation, which avoids mutual interference between variables of different modes, but at the same time does not consider the use of correlation between variables as a guide. To this end, the technical solution of the present invention consciously utilizes the lead-lag relationship between variables to perform more targeted prompts and guidance operations on the variables to be predicted, that is, the time series data of the variables to be predicted in the preliminary prediction time series sequence are filtered and calibrated, which effectively improves the reliability and accuracy of the prediction results.
[0016] Alternatively, the cross-correlation function is expressed as:
[0017] ;
[0018] In the formula, is the Fourier transform, is the inverse Fourier transform, j represents the sequence of variables to be predicted, i represents the sequence of other variables, represents conjugation, represents element-by-element multiplication, L is the sequence length of each variable in the historical source-load time series, is the independent variable of the cross-correlation function, is the cross-correlation function between the predicted variable j and the remaining variables i, Refers to the historical sequence of the variable j to be predicted in the input historical source load time series. Refers to the historical sequence of the remaining variables i in the input historical source load time series;
[0019] Among them, the maximum cross-correlation function based on the above cross-correlation function obtains the time offset of the remaining variables relative to the predicted variable ; Then according to the time offset The time series data of the leading variable is shifted so that the time series data of the leading variable is aligned with the time series data of the variable to be predicted in the preliminary prediction time series sequence.
[0020] Optionally, the pre-trained large language model based on the multi-expert hybrid fine-tuning module further introduces a low-rank matrix adaptation method into the original pre-trained large language model, as follows:
[0021] The transformation matrix W of the input query vector Quary and value vector Value in the multi-head attention layer of the original pre-trained large language model q and W v Add a low-rank matrix adapter, that is, in the form of multiplying two low-rank matrices and connecting them to the transformation matrix W of Quary and Value through the residual q and W v Two linear projection matrices, used to update the transformation matrix W q and W v The matrix parameters of .
[0022] Optionally, when the word vector query table of the pre-trained large language model in step S1 is subjected to dimensionality reduction screening by a linear layer, the corresponding screening network structure is:
[0023] A plurality of parallel linear layers and a router are set, wherein the router is connected to each linear layer to determine the weight of each linear layer;
[0024] The word vector lookup table is input into each linear layer and router, and the word units filtered from the word vector lookup table are obtained by weighted summation of all linear layers.
[0025] Optionally, in step S1, the historical source-load time series data is Token-encoded as follows: Patching and channel separation are performed on the historical source-load time series to form a Token sequence corresponding to each variable, and then one-dimensional convolution is used to encode the Token sequence carrying the position information, i.e., as the query vector Quary of the multi-head attention layer;
[0026] Among them, the process of patching and channel separation is as follows:
[0027] The time series data of different variables in the historical source load time series are regarded as different independent channels, and each channel is a sequence of a single variable;
[0028] The sequence of each single channel is grouped to form a Token sequence, that is, the data at adjacent different time points are divided into the same Patch and encoded into a vector as a Token;
[0029] Perform position encoding on the position of each token in the token sequence, and then add the position encoding to the corresponding token sequence to obtain the token sequence with position information corresponding to each variable;
[0030] Furthermore, in step S2, the output layer of the pre-trained large language model based on the hybrid fine-tuning module of multiple experts is provided with three operations: flattening, linear layer and random dropout. The flattening operation restores the source-load time series sequence in the form of Patch, removes repeated time points, and then splices the prediction results of each variable along the dimension direction to obtain the original source-load time series sequence, which is input into the linear layer of the output layer; the linear layer outputs the prediction result as the prediction head, and then performs the random dropout operation.
[0031] Optionally, the method further comprises:
[0032] Before token encoding the source load time series data in step S1, reversible instance normalization processing is performed on the obtained original source load time series data;
[0033] After obtaining the output result of the pre-trained large language model based on the multi-expert hybrid fine-tuning module in step S2, performing inverse instance normalization on the output result;
[0034] Among them, the reversible instance normalization process is as follows:
[0035] like represents the ith complete source-load time series, which contains a sequence of K variables, and the sequence length of each sequence is represented by T x =L+H, the length of the historical sequence is L, and the length of the predicted sequence is H, that is, the mean and variance of each variable in the historical source-load time series are calculated:
[0036] ;
[0037] ;
[0038] In the formula, is the variable k in the i-th source-load timing sequence The mean of is the variable k in the i-th source-load timing sequence The variance of is the variable k in the i-th source-load timing sequence The source load data corresponding to time step t, is the variable k in the i-th source-load timing sequence Source load data corresponding to time step j;
[0039] Then use the mean and variance to normalize each variable as follows:
[0040] ;
[0041] In the formula, , are all learnable affine transformation parameters corresponding to the kth variable, is the set constant, Source Load Data Normalized results;
[0042] The inverse instance is normalized as follows:
[0043] ;
[0044] In the formula, for Corresponding to the output results of the pre-trained large language model based on the multi-expert hybrid fine-tuning module, for Result of inverse instance normalization.
[0045] In another aspect, the present invention further provides a system based on the above-mentioned multivariable source-load data prediction method, comprising at least:
[0046] The modality conversion module is used to perform modality conversion on the input source-load time series sequence, that is, convert the time series modality of the source-load time series sequence into the text modality to achieve the modality alignment between the source-load data modality and the pre-trained large language model;
[0047] Among them, the historical source-load time series data is tokenized as the query vector Quary of the multi-head attention layer in the text encoder; the word vector query table of the pre-trained large language model is filtered through the linear layer for dimensionality reduction to obtain the word vector describing the characteristics of the source-load sequence, and used as the key vector Key and value vector Value of the multi-head attention layer; then the multi-head attention operation is performed and the text encoding of the historical source-load time series is obtained through the feedforward neural network;
[0048] A prediction module is used to input the obtained textual encoding into a pre-trained large language model based on a multi-expert hybrid fine-tuning module to obtain a predicted time series sequence, wherein the predicted time series sequence is the time series data of all variables at the prediction moment. The pre-trained large language model based on the multi-expert hybrid fine-tuning module is obtained by adding a multi-expert Adapter fine-tuning module to the feed-forward neural network in the Transformer encoder structure of the original pre-trained large language model;
[0049] That is, multiple adapters and a router are set in parallel, and the output of the feedforward neural network is connected to each adapter and the router; the router is connected to each adapter to obtain the weight of each adapter; the weighted sum of all adapters is performed and input into the layer normalization module of the Transformer encoder structure.
[0050] In a third aspect, the present invention provides an electronic terminal, comprising at least:
[0051] one or more processors;
[0052] a memory storing one or more computer programs;
[0053] The processor calls the computer program to implement:
[0054] A method for predicting multivariate source-load data based on a pre-trained large language model.
[0055] In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program, wherein the computer program is called by a processor to implement:
[0056] A method for predicting multivariate source-load data based on a pre-trained large language model. Beneficial Effects
[0057] Compared with the existing method, the advantages of the present invention are:
[0058] 1. The technical solution of the present invention adopts the idea of transfer learning and performs fine-tuning for the source load prediction task based on a general large language model. It makes full use of the powerful generalization ability and rich world knowledge of the pre-trained large language model, so that a large number of samples are not required during training, and there is no need to train the model from scratch, which meets the needs of the source load prediction task under small sample conditions.
[0059] Among them, the source load time series data is modally converted, and the source load data in the form of time series is converted into text mode, so that the source load data becomes closer to text, which enables the model to better understand the characteristics of time series data and better exert the generalization ability of the original pre-trained large language model. The input historical source load time series sequence can be modally aligned with the pre-trained large language model, reducing the degree of fine-tuning of the pre-trained model itself in the second stage, and better retaining the world knowledge of the original pre-trained model. In addition, the multi-expert Adapter adapter fine-tuning module is added. While fine-tuning to adapt to the downstream source load prediction task, it also considers the differentiated and specialized time series representations of different source load scenarios and extreme weather, and uses the multi-expert structure to perform more targeted and extensive feature learning.
[0060] 2. In a further preferred embodiment of the present invention, full consideration is given to the fact that the prior art time series prediction model does not consider the use of correlation between variables as a guide. Therefore, the present invention adopts filter calibration. According to the cross-correlation relationship between source and load multivariate variables, the lead and lag time series characteristics between variables are used to generate a filter, and the time series data of the lead sequence and the variable to be predicted in the preliminary prediction time series sequence are filtered and integrated to correct the preliminary prediction results and further improve the prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 It is a schematic diagram of the fine-tuning method of the pre-trained large language model for the source-load small sample time series prediction task;
[0062] Figure 2 It is a schematic diagram of textual coding of source-load time series based on multiple experts;
[0063] Figure 3 This is a schematic diagram of a hybrid fine-tuning module based on multiple experts;
[0064] Figure 4 is a schematic diagram of the filter generator module;
[0065] Figure 5 is a schematic diagram of filter calibration operation;
[0066] Figure 6a , Figure 6b The figure is a comparison diagram of the source load prediction curves of different prediction lengths and the actual source load curves in the simulation test provided by the present invention, wherein: Figure 6a For short-term forecasting, Figure 6b For medium to long term forecast. DETAILED DESCRIPTION
[0067] The technical solution of the present invention provides a multivariate source-load data prediction method based on a pre-trained large language model. One of the cores is to introduce a general large language model in the multivariate source-load prediction and optimize it to realize source-load prediction, especially under small sample and multivariate conditions, to complete different types of source-load time series prediction tasks, and improve the accuracy and reliability of source-load prediction. In addition, the technical solution of the present invention also considers the use of correlation between variables to filter and calibrate the preliminary prediction time series, effectively improving the reliability and accuracy of the prediction results.
[0068] To this end, the technical idea of the present invention is:
[0069] S1: Perform modal conversion on the input historical source-load time series to align it with the text modal data acceptable to the pre-trained large language model, so that the pre-trained large language model can better learn the source-load time series representation.
[0070] S2: Input the textual encoding obtained in step S1 into the pre-trained large language model based on the hybrid fine-tuning module of multiple experts to obtain a preliminary predicted time series. In some implementations, the prediction results obtained in steps S1-S2 are executed; in other implementations, the prediction results obtained in step S2 are preferably used as the preliminary prediction results, and S3 is executed;
[0071] S3: Perform filter calibration on the preliminary predicted time series.
[0072] The present invention will be further described below with reference to the embodiments.
[0073] like Figure 1 As shown, this embodiment provides a multivariate source-load data prediction method based on a pre-trained large language model, comprising the following steps:
[0074] Step 1: Perform reversible instance normalization on the input historical source load time series data to keep the sequence stable.
[0075] Among them, the "source" of the source-load data refers to the power generation end, including variables such as wind speed, wind direction, solar radiation intensity, etc. According to these variables, the power generation of new energy sites such as wind power and photovoltaic power can be predicted; "load" refers to the load, including variables such as temperature, humidity, holiday factors, etc. that affect power consumption, through which the power consumption of the load end can be predicted. It should be understood that in different scenarios / working conditions, when the variables of the original source-load time series data obtained are different or the set variables to be predicted are different, the variables of the original source-load time series data obtained are also different. The technical solution of the present invention does not impose specific constraints on the category and number of variables in the original source-load time series data, nor does it impose constraints on the variables to be predicted. It is generally applicable to various scenarios in this field.
[0076] The reversible instance normalization process is as follows:
[0077] like represents the ith complete source-load time series, which contains a sequence of C variables (i.e., C channels), and the sequence length of each sequence is represented by T x ,Right now , T x =L+H, the length of the historical sequence is L, and the length of the predicted sequence is H, that is, the mean and variance of each variable in the historical source-load time series are calculated:
[0078] ;
[0079] ;
[0080] In the formula, is the variable k in the i-th source-load timing sequence The mean of is the variable k in the i-th source-load timing sequence The variance of is the variable k in the i-th source-load timing sequence The source load data corresponding to time step t, is the variable k in the i-th source-load timing sequence The source load data corresponding to time step j in ; if the sequence length is L time steps, the range of t is between 0-L. Refers to the i-th source-load timing sequence Sum the sequence of the k-th variable;
[0081] Then use the mean and variance to normalize each variable as follows:
[0082] ;
[0083] In the formula, , are all learnable affine transformation parameters corresponding to the kth variable, is a set constant, which is used to prevent variance The denominator is 0. Source Load Data Normalized results.
[0084] It should be understood that this embodiment preferably performs reversible instance normalization processing, and then it is necessary to perform inverse normalization (denormalization) subsequently, that is, step 9. In other feasible embodiments, if reversible instance normalization processing is not performed, it is not necessary to perform denormalization subsequently.
[0085] Step 2: Patching and channel separation are performed on the historical source-load time series to form a Token sequence corresponding to each variable.
[0086] Among them, the present invention uses the existing technology to project the vectors (different variables) formed by different dimensions of the historical source-load time series into the embedding space to form different independent channels, and each channel is a sequence of a single variable. Then, for each single variable sequence, the data of adjacent different time points are divided into the same Patch, and each patch is encoded into a vector. Among them, the division of the patch can be overlapping or non-overlapping in time points, and each patch is a Token. This can reduce the complexity of the model and improve the model's processing efficiency for source-load data, because the computational complexity of the Transformer is quadratic to the number of Tokens. Each Patch represents a Token, rather than each time point representing a Token, which greatly reduces the number of Tokens. In addition, the Patch form can also maintain the locality of the time series, because the adjacent moment values of the time series are very close, and it is more reasonable to use a Patch as the minimum unit of calculation.
[0087] Step 3: Perform position encoding on the position of each token in the token sequence, and then add the position encoding to the corresponding token sequence to obtain the token sequence carrying position information corresponding to each variable.
[0088] In this embodiment, the position encoding (indicates the position of each token in the original sequence according to the time sequence) uses the non-learnable encoding in the form of sine and cosine in the original Transformer, which can reduce the parameter burden when fine-tuning the model. Its calculation formula is ,in , are the first , Components, d is the dimension of the position vector, pos represents the position of the token in the sequence, and if the length of the Token sequence is L, then pos = 0, 1, …, L-1. Then, the calculated position code is added to the Token sequence obtained in step 2 (directly added, the dimension remains unchanged) to obtain the Token sequence carrying the position information.
[0089] Step 4: The Token sequence carrying the position information obtained in step 3 is encoded through the embedding layer to obtain a new encoded Token sequence. The encoding process of the embedding layer in this embodiment is implemented through a one-dimensional convolution operation with a convolution kernel of 3. The number of channels is the vector dimension of the Token. The dimension of the newly encoded Token can be changed by adjusting the number of convolution kernels. The method of using one-dimensional convolution saves a considerable amount of computation compared to the operation of the linear layer, and pays more attention to modeling the relationship between adjacent Tokens, that is, adjacent time. The obtained newly encoded Token is used as the query vector Quary input of the multi-head attention layer.
[0090] So far, steps 2 to 4 can be regarded as token encoding of the historical source load time series data.
[0091] Step 5: Build a multi-expert linear layer model, perform dimensionality reduction screening on the word vector table of the pre-trained large language model, simplify the selection range of word vectors, and obtain targeted word vector representations that are more inclined to describe the characteristics of the source load sequence.
[0092] The pre-trained word vector table comes from a pre-trained large language model, such as LLaMA. The size of the word vector table is E∈V*D, where V is the number of word units in the word vector table and D is the dimension of the vector used to represent the word unit. The linear layer acts on the dimension V, with input dimension V and output dimension V'. Its meaning is to filter the word units of the original word vector table and filter out the word units that are more suitable for describing the characteristics of the source load time series, that is, the number of word units is reduced from V to V', and the final word vector table after filtering is E'∈V'*D.
[0093] like Figure 2As shown, the linear layer model of multiple experts is to set up multiple linear layers and a router in parallel, and the router is connected to each linear layer to determine the weight of each linear layer; the word vector query table inputs each linear layer and the router, and the word element selected from the word vector query table is obtained by weighted summing all linear layers. Among them, the routing selection is realized by a learnable matrix, and the matrix is in the form of random initialization. Different weights are assigned to the output of each linear layer through the matrix and then weighted summed, which is used to adapt to the differences in word selection caused by scene feature differences in different new energy source load scenarios such as wind power and photovoltaics (different linear layers are adapted to the word element screening requirements of different new energy source load scenarios, which is a characteristic of the structure of the linear layer model of multiple experts; and the learnable parameters of the route are dynamically updated during the network training process). Finally, the obtained filtered word vector output is used as the key vector Key and value vector Value input of the multi-head attention layer. Among them, there is no specific requirement for the selection of linear layers, and conventional linear layers can meet the requirements of the present invention.
[0094] Step 6: Perform multi-head attention operation on the query vector Quary, key vector Key and value vector Value obtained in steps 4 and 5, and then process the obtained output through a feedforward neural network to obtain the textual encoding of the historical source-load time series.
[0095] It should be understood that the multi-head attention and feedforward neural network in the text encoder are from the original transformer model, so they will not be described in detail. So far, steps 1 to 6 have achieved text encoding of the source-load time series, so that it is aligned with the text modality data that the pre-trained large language model can accept, so that the pre-trained large language model can better learn the source-load time series representation.
[0096] Step 7: Input the textual encoding obtained in step S1 into the pre-trained large language model based on the multi-expert hybrid fine-tuning module.
[0097] Among them, the present invention optimizes the original pre-trained large language model to form a pre-trained large language model based on a hybrid fine-tuning module of multiple experts, which specifically includes the following two points:
[0098] 1. If Figure 3 As shown, the transformation matrix W of the input Quary and Value in the multi-head attention layer of the pre-trained large language model is q and W v On the top, we add the LoRA (Low Rank Matrix Adapter) fine-tuning method. This method is based on two low-rank matrices W 1 , W 2 multiplied form and connected to W through the residual q and W v Two linear projection matrices are used to update Wq and W v The update formula can be expressed as W Q =W q +W 1 W 2 , where W 1 and W 2 Represents two low-rank matrices whose matrix size after multiplication is W q Same; W q It is the linear projection layer in the original Transformer’s multi-head attention; W Q It represents the equivalent weight after update.
[0099] 2. If Figure 3 As shown in the figure, a multi-expert Adapter fine-tuning method is added between the feedforward neural network and the layer normalization of the original Transformer encoder structure. That is, multiple Adapter adapters and a router are set in parallel, and the output of the feedforward neural network is connected to each Adapter adapter and the router; the router is connected to each Adapter adapter to obtain the weight of each adapter; the weighted sum of all Adapter adapters is taken and input into the layer normalization module of the Transformer encoder structure.
[0100] Among them, the routing is also implemented by a learnable matrix, and its calculation formula is ,in and is a trainable parameter of the router, It is the output corresponding to each of the multiple adapters. After Softmax processing, the output is a set of non-negative probability values, which indicates the probability of each expert being selected. The adapter is composed of a dimensionality-reduced feedforward neural network, a nonlinear function, and a dimensionality-increased feedforward neural network in sequence. This structure can adapt to source-load prediction tasks of different types and scenarios, such as wind power and photovoltaics. It can be understood that a certain adapter is fine-tuned for wind power prediction scenarios, while another adapter is fine-tuned for photovoltaic power generation prediction scenarios.
[0101] It should be understood that any pre-trained large language model can meet the requirements of the present invention, and the current mainstream pre-trained large language models basically use the Transformer architecture.
[0102] Step 8: The output token obtained in step 7 is processed by the output layer to obtain the preliminary predicted source load time series, that is, the source load time series data at the predicted moment of all variables. Among them, the output layer actually includes three operations: flattening, linear layer and Dropout. Flattening actually restores the source load time series in the form of Patch, including splitting each Patch into separate time points, removing duplicate time points, and splicing the prediction results of each variable along the dimension direction to obtain the original form of the source load time series. Then use the linear layer as the prediction head to output the prediction result, and the final Dropout (random deactivation) plays a role in preventing overfitting.
[0103] Step 9: Perform inverse instance normalization on the source-load time series prediction output obtained in step 8, add the non-stationary characteristics of the time series again, and obtain a preliminary predicted time series. The inverse normalization formula is: , where the parameters are the same as the instance normalization parameters in step 1, y represents the initial predicted source load time series output, k represents the number of variables, γ k and β k are all learnable affine transformation parameters, is the mean of each variable, is the variance of each variable, is the variable in the source-load time series data, is the variable in the source-load time series prediction sequence, is a constant.
[0104] Step 10: Select the lead variable.
[0105] like Figure 1 and Figure 4 As shown, referring to step 1, the historical source-load time series is reversibly instance normalized (considering that instance normalization contains two learnable parameters, the two learnable parameter values of instance normalization in the rough estimation stage and the filter calibration stage may be different; and in order to decouple different stages and prevent them from interfering with each other, the historical source-load time series is reversibly instance normalized again); then the cross-correlation function between the variable to be predicted and the remaining variables is calculated, and the calculation formula is:
[0106] ;
[0107] In the formula, is the Fourier transform, is the inverse Fourier transform, j represents the sequence of variables to be predicted, i represents the sequence of other variables, represents conjugation, represents element-by-element multiplication, L is the sequence length of each variable in the historical source-load time series, is the independent variable of the cross-correlation function, is the cross-correlation function between the predicted variable j and the remaining variables i, Refers to the historical sequence of the variable j to be predicted in the input historical source load time series. Refers to the historical sequence of the remaining variables i in the input historical source load time series.
[0108] It should be understood that if the total number of variables is m and the number of variables to be predicted is n, the cross-correlation function between the remaining mn variables and the variables to be predicted will be calculated. If there are multiple variables to be predicted, the above operation will be performed on each variable to be predicted.
[0109] Take the maximum cross-correlation function to get the time offset of the remaining variables relative to the predicted variable . Sort the remaining variables from large to small according to the maximum value of the cross-correlation function, take the K variables with the largest values as the leading variables of the variable to be predicted, save the maximum cross-correlation function value of these K leading variables, and calculate the time offset of the relative variable to be predicted according to the previous result. , shift the K variables in the preliminary prediction time series so that they can be time-aligned with the variables to be predicted, and obtain the aligned K leading sequences. Time offset It represents the time difference between two sequences. For example, if both time series L1 and L2 are at time t, then if L2 is shifted left or right by one unit, time series L2 will become the state at time t-1 or time t+1. It is either 1 or -1.
[0110] Step 11: The calculation of state probability is divided into two parts: dynamic and initial state. The historical source-load time series is processed by the linear layer of this step to obtain the dynamic state probability. The linear layer converts the input dimension from the historical sequence length L to the number of states N, thereby obtaining the representation from the historical sequence to the variable state. The initial state probability is a learnable matrix with a size of K*N, where K represents the number of variables and N represents the number of states of each variable. The value is randomly initialized in accordance with the Gaussian distribution and is updated with the training of the network. It belongs to the network weight parameter. Finally, the dynamic state probability is added to the updated initial state probability to obtain the probability distribution of each state corresponding to each variable. The linear layer of this step is a conventional linear layer, and N is set to 8 in this embodiment. Among them, the state is used to represent the correlation between variables. For example, variables m and n may have a great relationship at time x, but this relationship may not be so strong at time y.
[0111] Step 12: Construct filters corresponding to the leading variables and the variables to be predicted in the preliminary prediction time series.
[0112] like Figure 4As shown, the probability distribution matrix A∈C*N corresponding to each state of each variable obtained in step 11, where C is the total number of variables and N is the number of states of each variable, is multiplied by a parameter matrix W∈N*O of a linear layer for dimension transformation to obtain a matrix B∈C*O, where O is , which means that K+1 filters are generated based on the information of each advance variable. is the dimension of the filter, and then performs matrix multiplication with the maximum mutual correlation function value matrix R of the K leading variables obtained in step 10. The tensor dimension of the mutual correlation function value matrix R is (C, 1, K), which represents the maximum mutual correlation function value between the C variables and their corresponding K leading variables. The B matrix is split, and the tensor dimension of the B matrix after splitting is expressed as , multiply the two matrices and remove the dimensions that are 1 to get , that is, the K groups of filters (each group has K+1 filters) obtained according to each advance variable are integrated into one group, and filters for the preliminary prediction results of the advance variable and the variable to be predicted are generated. The number of filters required to be generated for one variable to be predicted corresponds to K+1 filters; if it is a multivariate, assuming the number of variables is m, the total number of filters generated in this step is m(K+1).
[0113] Since the correlation between variables often changes dynamically, a division operation of the variable's own state is introduced to distinguish the different correlations between a variable and other variables at different time nodes; based on the correlation between variables and the correlation state of the variables, a filter is generated for the preliminary prediction time series of the known leading variables and the variables to be predicted obtained by the model body.
[0114] Step 13: Generate a calibration bias sequence.
[0115] like Figure 5 As shown, the preliminary predicted time series in step 9 is instance normalized, and the normalization formula is the same as above. The technical solution of the present invention takes into account that instance normalization contains two learnable parameters, and the parameter values learned in the rough estimation stage and the filter calibration stage may be different. Secondly, it is to decouple different stages and prevent them from interfering with each other, because not all module parameters are updated synchronously, but are updated through phased training.
[0116] From the preliminary prediction time series, select a segment U from the K aligned leading sequences obtained in step 10. k ∈K*H, K represents the K-aligned leading sequences, H represents the sequence length corresponding to the prediction time period, and the selected time period is the same as the time period corresponding to the preliminary prediction. Among them, for the K leading variable sequences U in this time period in the preliminary prediction time series sequence kand the sequence of variables to be predicted V are all fast Fourier transformed (V∈H, here we take the case where there is only one variable to be predicted, if there are multiple variables, the same operation is performed on other variables to be predicted). If the length of the sequence to be predicted is H, then the frequency domain dimension after the fast Fourier transform is ,Right now ∈ , ∈ ,in is the Fast Fourier Transform.
[0117] Then use the filter generated in step 12 to filter it. The filtering operation is to combine K+1 filters with the frequency domain representation of K leading variables. , and a frequency domain representation of the variable to be predicted Perform element-by-element multiplication (Note: the dimension of a single filter is consistent with the frequency domain dimension of a single variable. , so we can perform element-by-element multiplication). The filtered result is and Here, the filter dimension generated in step 12 is the same as the frequency domain dimension after the variable fast Fourier transform, which is .
[0118] The K filtered look-ahead sequences are summed in K dimensions to obtain a sum sequence, and the frequency domain dimension is still .
[0119] Then it is spliced with the filtered time series of the variable to be predicted, and the frequency domain dimension obtained by splicing is , and then the frequency domain dimension is reduced by the linear layer to become .
[0120] Finally, the calibration deviation sequence is obtained by inverse fast Fourier transform, which is expressed as follows:
[0121] ,in refers to the linear layer used for dimensionality reduction, Refers to splicing in dimension, is the inverse fast Fourier transform, Refers to the calibration deviation sequence after filtering and calibration, with a length of H, which is used to add to the prediction sequence of the variable to be predicted and is only used to calibrate the preliminary prediction results of the variable to be predicted.
[0122] Step 14: Figure 1 As shown, finally, the calibration deviation sequence obtained in step 13 is inverse normalized, and the inverse normalization formula is the same as above (same as step 9) and added to the preliminary prediction result to obtain the final source-load time series prediction result after calibration.
[0123] So far, steps 10 to 14 constitute filtering and calibration of the variables to be predicted in the preliminary prediction time series.
[0124] In summary, the training of the present invention can be divided into three stages. In the first stage, only the parameters of the modal conversion module of the source-load time series sequence are updated, so that the input source-load time series sequence can be modally aligned with the pre-trained large language model, so that the large language model can adapt to the feature expression of the time series sequence. Among them, the first stage can use the time series data of the non-source-load scenario for modal alignment (the updated parameters include the two learnable parameters in the instance normalization, the parameters of the one-dimensional convolution kernel of the embedding layer, and Figure 2 In the second stage, only the multi-expert hybrid fine-tuning module part based on multi-experts is updated, and the pre-trained model is fine-tuned using LoRA and multi-expert adapter to adapt it to the downstream source-load prediction task. In the third stage, the use of the filter correction module is added. On the basis of stage one and stage two, the lead and lag relationship between multiple variables is further utilized as the basis for calibrating the preliminary prediction time series. The second and third stages both use the same source-load data, making full use of limited samples and adapting to the needs of small sample scenarios.
[0125] Preliminary experimental verification shows that the above method can be used to fine-tune the large language model to meet the needs of small sample source load data prediction tasks under multivariate conditions. Figure 6a , Figure 6b This is a comparison chart of the wind power generation prediction curve and the actual power generation curve under different prediction length conditions on the same wind farm data set. As shown in the figure, the short-term and medium- and long-term prediction curves are relatively good, and the true value and the predicted value curves are basically fitted. The input history sequence length selected for short-term prediction is 48 time steps, the prediction length is 12 time steps, the mean square error (MSE) is 0.384, and the mean absolute error (MAE) is 0.327. The input history sequence length selected for medium- and long-term prediction is 336 time steps, the prediction length is 96 time steps, the mean square error (MSE) is 0.737, and the mean absolute error (MAE) is 0.577.
[0126] In some embodiments, the present invention further provides a system based on the above-mentioned multivariable source-load data prediction method, which at least includes: a mode conversion module and a prediction module.
[0127] The modality conversion module is used to perform modality conversion on the input historical source-load time series, that is, convert the time series modality of the source-load time series into the text modality to achieve the modality alignment between the source-load data modality and the pre-trained large language model;
[0128] Among them, the historical source-load time series data is tokenized as the query vector Quary of the multi-head attention layer in the text encoder; the word vector query table of the pre-trained large language model is filtered through the linear layer for dimensionality reduction to obtain the word vector describing the characteristics of the source-load sequence, and used as the key vector Key and value vector Value of the multi-head attention layer; then the multi-head attention operation is performed and the text encoding of the historical source-load time series is obtained through the feedforward neural network;
[0129] The prediction module is used to input the obtained textual encoding into the pre-trained large language model based on the multi-expert hybrid fine-tuning module to obtain a predicted time series sequence, which is the time series data of all variables at the prediction moment. The pre-trained large language model based on the multi-expert hybrid fine-tuning module introduces the low-rank matrix adaptation method and the adapter method into the original pre-trained large language model, as follows:
[0130] The transformation matrix W of the input query vector Quary and value vector Value in the multi-head attention layer of the original pre-trained large language model q and W v Add a low-rank matrix adapter, that is, in the form of multiplying two low-rank matrices and connecting them to the transformation matrix W of Quary and Value through the residual q and W v Two linear projection matrices, used to update the transformation matrix W q and W v Matrix parameters of ;
[0131] The Adapter fine-tuning method of multiple experts is added after the feedforward neural network in the Transformer encoder structure of the original pre-trained large language model. That is, multiple Adapter adapters and a router are set in parallel, and the output of the feedforward neural network is connected to each Adapter adapter and the router; the router is connected to each Adapter adapter to obtain the weight of each adapter; the weighted sum of all Adapter adapters is taken and input into the layer normalization module of the Transformer encoder structure.
[0132] In some implementations, the system further includes a filter calibration module for performing filter calibration on the variables to be predicted in the preliminary prediction time series.
[0133] It should be understood that the specific implementation process of each module please refer to the above method content, the present invention will not be repeated here, and the division of the above functional modules is only for example illustration. In some embodiments, some functional modules can be merged, and some functional modules can be split. Each functional module can be implemented in software or hardware or a combination of software and hardware. Among them, the hardware and software equipment includes but is not limited to general-purpose computer equipment, programmable gate arrays, digital signal processors, microprocessors and their corresponding programming or burning software.
[0134] In some embodiments, the present invention further provides an electronic terminal, comprising at least: one or more processors; and a memory storing one or more computer programs;
[0135] Among them, the processor calls the computer program to implement: the steps of a multivariate source-load data prediction method based on a pre-trained large language model.
[0136] For the specific implementation process of each step, please refer to the description of the above method.
[0137] It should be understood that in the embodiments of the present invention, the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the type of device.
[0138] In some embodiments, the present invention also provides a computer-readable storage medium storing a computer program, wherein the computer program is called by a processor to implement: steps of a multivariate source-load data prediction method based on a pre-trained large language model.
[0139] For the specific implementation process of each step, please refer to the description of the above method.
[0140] The readable storage medium is a computer-readable storage medium, which may be an internal storage unit of the software and hardware device described in any of the aforementioned embodiments, such as a hard disk or memory of a controller. The readable storage medium may also be an external storage device of the controller, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the controller. Furthermore, the readable storage medium may also include both an internal storage unit of the controller and an external storage device. The readable storage medium is used to store the computer program and other programs and data required by the controller. The readable storage medium may also be used to temporarily store data that has been output or is to be output.
[0141] Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned readable storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0142] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes. The present application is a device for realizing the function specified in one flow or multiple flows of the flow chart and / or one or multiple blocks of the block diagram with reference to the instructions executed by the processor according to the method, device (system) and computer program product of the embodiment of the present application. These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which realizes the function specified in one flow or multiple flows of the flow chart and / or one or multiple blocks of the block diagram. These computer program instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0143] It should be emphasized that the examples described in the present invention are illustrative rather than restrictive, and therefore the present invention is not limited to the examples described in the specific embodiments. Any other embodiments derived by those skilled in the art based on the technical solution of the present invention that do not depart from the purpose and scope of the present invention, whether modified or replaced, also fall within the scope of protection of the present invention.
Claims
1. A multivariate source-load data prediction method based on a pre-trained large language model, characterized by: The following steps are involved: S1: Perform modality conversion on the input historical source-load time series, that is, convert the time series modality of the source-load time series into text modality to achieve modality alignment between the source-load data modality and the pre-trained large language model; Among them, the input historical source load time series data is tokenized as the query vector Quary of the multi-head attention layer in the text encoder; the word vector query table of the pre-trained large language model is filtered through the linear layer for dimensionality reduction to obtain the word vector describing the source load sequence characteristics, and used as the key vector Key and value vector Value of the multi-head attention layer; then the multi-head attention operation is performed and the text encoding of the historical source load time series is obtained through the feedforward neural network; S2: Input the textual encoding obtained in step S1 into the pre-trained large language model based on the multi-expert hybrid fine-tuning module to obtain a predicted time series sequence, which is the time series data of all variables at the predicted moment / time period. The pre-trained large language model based on the multi-expert hybrid fine-tuning module is a pre-trained large language model with a multi-expert Adapter fine-tuning module added after the feed-forward neural network in the Transformer encoder structure of the original pre-trained large language model: That is, multiple adapters and a router are set in parallel, and the output of the feedforward neural network is connected to each adapter and the router; the router is connected to each adapter to obtain the weight of each adapter; the weighted sum of all adapters is performed and input into the layer normalization module of the Transformer encoder structure; The execution prediction time series sequence obtained in step S2 is a preliminary prediction time series sequence; S3: Filter and calibrate the variable data to be predicted in the preliminary prediction time series, as follows: Selecting leading variables, calculating the cross-correlation function between the specified variable to be predicted and the remaining variables in the historical source-load time series based on the correlation between the multivariate variables, and then selecting K variables with higher cross-correlation function values as leading variables, and aligning the leading variables with the time series data of the variable to be predicted; Generate a filter, process the historical source-load time series through a linear layer to obtain a dynamic state probability, and superimpose the set initial state probability to obtain the probability distribution of each state corresponding to each variable; then multiply the probability distribution of each state corresponding to each variable by a parameter matrix of a linear layer for dimension transformation, and then perform matrix multiplication with the maximum cross-correlation function value matrix corresponding to the leading variable to generate a filter for the leading variable and the variable sequence to be predicted in the preliminary prediction time series; Perform fast Fourier transform on the time-aligned leading variables and the sequence of variables to be predicted in the preliminary prediction time series, and filter them using corresponding filters. Then, sum the filtered time series data of the leading variables in K dimensions to obtain a sum sequence. The sum sequence is concatenated with the sequence of variables to be predicted after filtering, and then the frequency domain dimension is reduced by a linear layer. Finally, a calibration deviation sequence is obtained by inverse fast Fourier transform. The calibration deviation sequence is used to calibrate the time series data of the variables to be predicted in the preliminary prediction time series sequence.
2. The method according to claim 1, characterized in that: The cross-correlation function is expressed as: ; In the formula, is the Fourier transform, is the inverse Fourier transform, j represents the sequence of variables to be predicted, i represents the sequence of other variables, represents conjugation, represents element-by-element multiplication, L is the sequence length of each variable in the historical source-load time series, is the independent variable of the cross-correlation function, is the cross-correlation function between the predicted variable j and the remaining variables i, Refers to the historical sequence of the variable j to be predicted in the input historical source load time series. Refers to the historical sequence of the remaining variables i in the input historical source load time series; Among them, the maximum cross-correlation function based on the above cross-correlation function obtains the time offset of the remaining variables relative to the predicted variable ; Then according to the time offset The time series data of the leading variable is shifted so that the time series data of the leading variable is aligned with the time series data of the variable to be predicted in the preliminary prediction time series sequence.
3. The method according to claim 1, characterized in that: The pre-trained large language model based on the multi-expert hybrid fine-tuning module also introduces a low-rank matrix adaptation method into the original pre-trained large language model, as follows: The transformation matrix W of the input query vector Quary and value vector Value in the multi-head attention layer of the original pre-trained large language model q and W v Add a low-rank matrix adapter, that is, in the form of multiplying two low-rank matrices and connecting them to the transformation matrix W of Quary and Value through the residual q and W v Two linear projection matrices, used to update the transformation matrix W q and W v The matrix parameters of .
4. The method according to claim 1, characterized in that: When the word vector query table of the pre-trained large language model in step S1 is filtered through the linear layer for dimensionality reduction, the corresponding filtering network structure is: A plurality of parallel linear layers and a router are set, wherein the router is connected to each linear layer to determine the weight of each linear layer; The word vector lookup table is input into each linear layer and router, and the word units filtered from the word vector lookup table are obtained by weighted summation of all linear layers.
5. The method according to claim 1, characterized in that: In step S1, the historical source-load time series data is Token-encoded as follows: Patching and channel separation are performed on the historical source-load time series to form a Token sequence corresponding to each variable, and then one-dimensional convolution is used to encode the Token sequence carrying position information, which is used as the query vector Quary of the multi-head attention layer; Among them, the process of patching and channel separation is as follows: The time series data of different variables in the historical source load time series are regarded as different independent channels, and each channel is a sequence of a single variable; The sequence of each single channel is grouped to form a Token sequence, that is, the data at adjacent different time points are divided into the same Patch and encoded into a vector as a Token; Perform position encoding on the position of each token in the token sequence, and then add the position encoding to the corresponding token sequence to obtain the token sequence with position information corresponding to each variable; Furthermore, in step S2, the output layer of the pre-trained large language model based on the hybrid fine-tuning module of multiple experts is provided with three operations: flattening, linear layer and random dropout. The flattening operation restores the source-load time series sequence in the form of Patch, removes repeated time points, and then splices the prediction results of each variable along the dimension direction to obtain the original source-load time series sequence, which is input into the linear layer of the output layer; the linear layer outputs the prediction result as the prediction head, and then performs the random dropout operation.
6. The method according to claim 1, characterized in that: The method further comprises: Before token encoding the source load time series data in step S1, reversible instance normalization processing is performed on the obtained original source load time series data; After obtaining the output result of the pre-trained large language model based on the multi-expert hybrid fine-tuning module in step S2, performing inverse instance normalization on the output result; Among them, the reversible instance normalization process is as follows: like represents the ith complete source-load time series, which contains a sequence of K variables, and the sequence length of each sequence is represented by T x =L+H, the length of the historical sequence is L, and the length of the predicted sequence is H, that is, the mean and variance of each variable in the historical source-load time series are calculated: In the formula, is the variable k in the i-th source-load timing sequence The mean of is the variable k in the i-th source-load timing sequence The variance of is the variable k in the i-th source-load timing sequence The source load data corresponding to time step t, is the variable k in the i-th source-load timing sequence Source load data corresponding to time step j; Then use the mean and variance to normalize each variable as follows: In the formula, , are all learnable affine transformation parameters corresponding to the kth variable, is the set constant, Source Load Data Normalized results; The inverse instance is normalized as follows: In the formula, for Corresponding to the output results of the pre-trained large language model based on the multi-expert hybrid fine-tuning module, for Result of inverse instance normalization.
7. A system based on the method according to any one of claims 1 to 6, characterized in that: At least: The modality conversion module is used to perform modality conversion on the input historical source-load time series, that is, convert the time series modality of the source-load time series into the text modality to achieve the modality alignment between the source-load data modality and the pre-trained large language model; Among them, the historical source-load time series data is tokenized as the query vector Quary of the multi-head attention layer in the text encoder; the word vector query table of the pre-trained large language model is filtered through the linear layer for dimensionality reduction to obtain the word vector describing the characteristics of the source-load sequence, and used as the key vector Key and value vector Value of the multi-head attention layer; then the multi-head attention operation is performed and the text encoding of the historical source-load time series is obtained through the feedforward neural network; The prediction module is used to input the obtained textual encoding into the pre-trained large language model based on the multi-expert hybrid fine-tuning module to obtain a predicted time series sequence, which is the time series data of all variables at the prediction moment. The pre-trained large language model based on the multi-expert hybrid fine-tuning module is a pre-trained large language model with a multi-expert Adapter fine-tuning module added after the feed-forward neural network in the Transformer encoder structure of the original pre-trained large language model: That is, multiple adapters and a router are set in parallel, and the output of the feedforward neural network is connected to each adapter and the router; the router is connected to each adapter to obtain the weight of each adapter; the weighted sum of all adapters is performed and input into the layer normalization module of the Transformer encoder structure; The filter calibration module is used to perform filter calibration on the variable data to be predicted in the preliminary prediction time series.
8. An electronic terminal, characterized in that: At least: one or more processors; a memory storing one or more computer programs; The processor calls the computer program to implement: The steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: A computer program is stored, which is called by a processor to implement: The steps of the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Modal extension method for pre-training multi-modal language inference model based on continuous learning and transfer learning
CN118469025A
Source load small sample time sequence prediction method, system and device based on pre-trained large language model, and storage medium
CN118839730A
Cited By
Large language model staged pre-training method and system
CN121072639A