Cold load prediction method and system based on large language model
By combining a large language model with patch embedding, cross-modal alignment, and cue prefix techniques, the accuracy of cold load prediction in complex building scenarios is addressed, achieving high-precision and stable cold load prediction, reducing computational burden, and improving the robustness and interpretability of the model.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-09
- Publication Date
- 2026-03-10
AI Technical Summary
Existing methods for predicting cooling loads are not accurate enough in complex building scenarios and cannot meet the needs of real-time prediction. Furthermore, existing data-driven models have shortcomings in feature engineering and model structure optimization, resulting in low prediction accuracy and robustness.
By employing a large language model combined with patch embedding, cross-modal alignment, and cue prefix techniques, time series data are mapped to the language model space through linear projection and multi-head self-attention mechanism, and cue templates are constructed to improve prediction accuracy and robustness.
It enables accurate prediction of cooling load variation trends without the need for a dedicated time series model, improving prediction accuracy and stability, reducing computational burden, and offering advantages in interpretability and engineering applications.
Smart Images

Figure CN121638575A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent prediction technology for building energy systems, specifically to a method and system for predicting cooling load based on a large language model. Background Technology
[0002] Approximately 50% of the energy consumption in building energy systems is used for indoor environmental and temperature regulation, making it a significant source of building carbon emissions. Within building energy systems, high-efficiency air conditioning rooms based on ice storage technology are a crucial component, playing a vital role in ensuring the stable operation of HVAC systems in large buildings.
[0003] Existing traditional air conditioning systems typically rely on manual experience for operation and maintenance, and real-time parameter feedback for adjustment. Under conditions of significant fluctuations in cooling load, these systems suffer from response lag, resulting in a coefficient of performance (COP) generally remaining around 2.5–3.0. In contrast, high-efficiency air conditioning systems, through the introduction of integrated control, dynamic optimization, and artificial intelligence optimization, can construct a closed-loop structure of "perception-analysis-decision-control," significantly improving the energy efficiency and energy-saving potential of the air conditioning system.
[0004] In the operation and control of ice storage cooling systems, the accuracy of cooling load forecasting is crucial. Large forecast deviations can lead to excessive ice storage and energy waste, or necessitate operating cooling equipment during peak electricity price periods when ice storage is insufficient, thus increasing system operating costs. Existing cooling load forecasting methods mainly fall into two categories. One is the mechanistic modeling method, which establishes a thermal balance mathematical model based on building thermodynamic principles and physical properties. This method can accurately simulate building cooling loads and has good interpretability. However, this type of method requires a large number of detailed building parameters, resulting in a computationally intensive and costly modeling process, and is only suitable for relatively simple building scenarios. As building structures and spatial distributions become increasingly complex, this type of model struggles to meet the demands of real-time forecasting. The other is the data-driven method, which utilizes historical operating data of the air conditioning system (such as temperature and humidity) to establish a nonlinear mapping relationship between the input and the cooling load through statistical learning or deep learning models. This type of method is highly flexible and efficient, suitable for existing buildings where building parameters are missing or difficult to obtain, and supports real-time forecasting and control. However, existing data-driven models still need to be optimized in terms of feature engineering and model structure to combine the characteristics of industrial applications, so as to improve their prediction accuracy and robustness under complex working conditions. Summary of the Invention
[0005] The purpose of this application is to provide a method and system for predicting cold load based on a large language model, so as to solve the above-mentioned technical problems.
[0006] The first aspect proposes a cold load prediction method based on a large language model, which includes the following steps: S1. Obtain the pre-processed cooling load time series data; S2. Divide the cold load time series data into multiple patches, perform linear projection on the patches to obtain fixed-dimensional patch embeddings, map the patch embeddings to the word embedding space of the pre-trained large language model, and obtain the input representation received by the pre-trained large language model; calculate the statistical feature information of the cold load time series data, and construct the prompt prefix based on the statistical feature information and domain knowledge; S3. Concatenate the input representation with the prompt prefix to form the input sequence; S4. Input the input sequence into the pre-trained large language model to obtain the cold load prediction results for a fixed future time period; In the above technical solution, by using patch embedding, cross-modal alignment and cue prefix construction, the large language model can understand the structural features and scenario knowledge of time series data, thereby achieving accurate prediction of cold load change trends without the need for a dedicated time series model.
[0007] Furthermore, step S1 includes: S11, Collect historical cooling load datasets and perform outlier repair and missing value imputation on the historical cooling load datasets; S12, downsample the repaired dataset and normalize the downsampled dataset to obtain cold load time series data, wherein min-max is used for normalization.
[0008] In the above technical solution, outlier repair, missing value imputation, downsampling and normalization reduce noise and scale uniformity in the subsequent model input data, significantly improving prediction stability and reducing the computational burden of the model.
[0009] Furthermore, step S11 includes: S111, sort the values of the historical cooling load dataset by numerical value, calculate the quartile positions, and obtain... , and The position of the quartile is calculated as follows:
[0010] In the formula, The number of historical datasets for cooling load; S112, Calculate the interquartile range , in response to data points less than or greater than The value was identified as an outlier. , For coefficient parameters; S113 uses cubic spline interpolation to repair outliers and missing values.
[0011] In the above technical solution, extreme points are identified by a robust statistical detection method based on interquartile range, and cubic spline interpolation is used for smoothing and repair, making the time series more continuous and stable and improving the model's feature extraction capability.
[0012] Furthermore, step S2 includes: S21, the normalized cooling load time series data is divided into multiple patches, the first... A patch is defined as In the formula, For patch length, This represents the sliding window step size; S22, Perform linear projection on each patch to obtain a fixed-dimensional patch embedding. The mapping relationship of the patch embedding is as follows: In the formula, For trainable embedding weights, For patch length, The number of features at each time point, For vectorization operations, For bias terms; S23, the patch embeddings are combined in chronological order to form a temporal feature sequence, and based on the embedding layer and multi-head self-attention mechanism, the temporal feature sequence is mapped to the feature space of the pre-trained large language model to obtain the temporal feature representation; the complete word embedding dictionary of the pre-trained large language model is then processed. Perform dimensionality reduction or trainable linear projection (e.g., PCA or linear mapping) and cross-modal alignment via multi-head cross attention to form input representations that can be fed into a pre-trained large language model.
[0013] In the above technical solution, by segmentation and linear projection, time series can be represented with feature dimensions consistent with the language model; by cross-modal alignment, a seamless connection between time series features and word embedding space is achieved, improving the model's ability to understand the input.
[0014] Furthermore, step S23 includes: S231: The embeddings of each patch are arranged in chronological order to form a temporal feature sequence. Through the embedding layer and multi-head self-attention mechanism, the temporal feature sequence is projected to the same feature dimension as the large language model. Time feature representation is obtained. ,in, In the formula, For the input multivariate time series, Given the length of the input sequence, For the number of variables, To define the feature dimensions for pre-training large language models, To execute the channel dimension from arrive Mapping; S232, Complete word embedding dictionary for pre-trained large language models Perform dimensionality reduction or trainable linear projection (e.g., PCA or linear mapping) to obtain a low-dimensional word vector space. In the formula, , For vocabulary size, For predefined low dimensions, and satisfying ; S233 aligns temporal feature representations and low-dimensional word vector spaces based on a multi-head cross-attention mechanism, using temporal feature representations as query vectors. low-dimensional word vector space as a key vector Sum value vector The projection relationship is as follows In the formula, These are the linear projection matrices of the query, key, and value, respectively, and are obtained through... The aligned input representation is calculated, where, Alignment features mapped to the word embedding space of a pre-trained large language model. To query the similarity matrix between the vector and the key vector, The dimension of the query / key vector.
[0015] In the above technical solution, the time series features are aligned dimension by dimension with the word vector space of the large language model, enabling the language model to accurately receive and interpret time information and improve prediction accuracy.
[0016] Furthermore, step S2 includes: S21', based on the normalized cooling load time series data, calculate the minimum, maximum and median values to obtain the first statistical characteristic; S22' uses continuous wavelet transform to normalize the discrete-time series. Multi-scale time-frequency decomposition is performed, where the mathematical form of the continuous wavelet transform is: , In the formula, Input signal In scale The transform coefficients obtained after the continuous wavelet transform, For the continuous form of the input signal, For wavelet basis functions, the Morlet wavelet basis is preferred. Here are the wavelet scaling parameters. For scale, is the conjugate complex number of the wavelet basis; S23': Calculate the average energy of each scale based on the wavelet transform coefficients, and select the scale values corresponding to the scales with the highest average energy as lag features; select the scale values corresponding to the scales with the lowest average energy as trend reversal features. S24' combines the lag feature, trend reversal feature, and the first statistical feature to form statistical feature information; S25': Construct a prompt template based on statistical feature information. The prompt template includes dataset context, task instructions and input statistical information. Insert domain knowledge of cold load prediction into the prompt template to form a prompt prefix.
[0017] In the above technical solution, local variation features and trend features of time series are extracted through multi-scale wavelet analysis, and cue prefixes are constructed by combining statistics, so that the language model has the semantic understanding ability of cold load change mechanism, thereby improving the interpretability and robustness of prediction.
[0018] Furthermore, the formula for calculating average energy is: In the formula, For scale The average energy below, Here are the wavelet scaling parameters. For the first The first time series sample within the first time series sample Each time step The normalized length of the time series. For scale and time step The wavelet transform coefficients are used. The periodic and trend components are quantitatively extracted using an average energy metric, providing key feature support for constructing cue prefixes.
[0019] Furthermore, the historical cooling load dataset includes one or more of the following: outdoor temperature, outdoor humidity, indoor temperature, instantaneous cooling capacity, and the temperature difference between ethylene glycol supply and return water. Introducing multi-source environmental and system variables enhances the multi-dimensional information content of the prediction input, thereby improving the comprehensiveness and robustness of the prediction.
[0020] Secondly, this application proposes an application of a cooling load forecasting method based on a large language model. This method, described in the first aspect, is applied to an ice storage cooling system. By applying the forecasting method to the ice storage system, cooling load scheduling and energy consumption optimization are achieved, thereby improving system operating efficiency and energy-saving effects.
[0021] Thirdly, this application proposes a cold load prediction system based on a large language model, which includes: The data processing module is configured to acquire pre-processed cooling load time series data; The prompt prefix construction module is configured to divide the cold load time series data into multiple patches, perform linear projection on the patches to obtain fixed-dimensional patch embeddings, map the patch embeddings to the word embedding space of the pre-trained large language model to obtain the input representation received by the pre-trained large language model, calculate the statistical feature information of the cold load time series data, and construct prompt prefixes based on the statistical feature information and domain knowledge. The input sequence module is configured to concatenate the input representation with the prompt prefix to form an input sequence. The prediction results module is configured to input the input sequence into a pre-trained large language model to obtain the prediction results of the cold load for a fixed period of time in the future.
[0022] Compared with the prior art, the beneficial results of the present invention are as follows: (1) This application introduces continuous wavelet transform into the task of cold load prediction for the first time. By performing time-frequency decomposition on the time series at multiple scales, it captures both the short-term fluctuation components and long-term trend changes of the cold load, thereby effectively identifying non-stationary local periodic features and trend turning points that are difficult to extract using traditional Fourier or sliding window methods. Furthermore, this invention automatically selects key scales through average energy measurement, making the extracted lag features more physically meaningful, improving the completeness and discriminativeness of the cold load input features, and significantly enhancing the model's adaptability to periodic heating and cooling loads.
[0023] (2) This application constructs a structured prompt template (Prompt) to explicitly write the task description, input statistical features, multi-scale periodic information, and cold load domain knowledge into the text prefix, enabling the pre-trained large language model to automatically obtain prior semantic information about cold load changes before prediction. This mechanism guides the model to automatically focus on key temporal structures rather than blindly fitting curves, thereby improving the model's stability, generalization, and noise resistance. At the same time, since the Prompt itself has a clear textual meaning, the model's decision-making process is interpretable, allowing maintenance personnel to understand the prediction basis based on the prompt content, facilitating verification and manual intervention, and significantly enhancing the model's credibility in engineering scenarios.
[0024] (3) The Encoder_PCA cross-modal alignment framework constructed in this application first uses an embedding layer and a multi-head self-attention mechanism to project the patched time series onto the language model feature space. Then, it uses dimensionality reduction or trainable linear projection (e.g., PCA or linear mapping) to the original word vector space and performs query-key-value mapping based on multi-head cross-attention, thereby achieving cross-modal fusion of time features and word embeddings. This mechanism solves the problem that pre-trained language models cannot directly understand continuous numerical time series data, enabling them to parse time relationships and capture time-series dependency structures, thus achieving high-precision cold load prediction. The alignment method of this invention has a small number of parameters, is simple to implement, and can adapt to large language model architectures of different scales, exhibiting wide adaptability.
[0025] (4) Unlike traditional approaches that rely on full model fine-tuning, this invention freezes the main parameters of the large language model and trains only the patch projection layer, cross-modal alignment layer, and Prompt-related modules. This lightweight design significantly reduces training costs and memory usage, while avoiding overfitting issues caused by full model fine-tuning, enabling the model to maintain good predictive performance under different building types, climate conditions, and seasonal operating conditions. Furthermore, since the internal parameters of the model are not modified, the system deployment is more stable, maintenance is simpler, and it has significant advantages in engineering applications. Attached Figure Description
[0026] The accompanying drawings are included to provide a further understanding of the embodiments and are incorporated in and constitute a part of this specification. The drawings illustrate embodiments and, together with the description, serve to explain the principles of the invention. Many anticipated advantages of the embodiments and other embodiments of the invention will be readily recognized as they become better understood through reference to the following detailed description. Elements in the drawings are not necessarily to scale. The same reference numerals refer to corresponding similar parts.
[0027] Figure 1 This is a flowchart of a cold load prediction method based on a large language model according to an embodiment of this application; Figure 2 This is an example of a prompt template according to the embodiments of this application; Figure 3 This is a schematic diagram of the prediction process of a large language model-based cooling load prediction method according to an embodiment of this application in the application of an ice storage system. Figure 4 This is a comparison result diagram of a 24-hour load forecasting scenario according to an embodiment of this application; Figure 5 This is a comparison result diagram of a 2-hour load forecasting scenario according to an embodiment of this application; Figure 6 This is a framework diagram of a cold load prediction system based on a large language model according to an embodiment of this application. Detailed Implementation
[0028] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0029] refer to Figure 1 , Figure 1A flowchart illustrating the cold load prediction method based on a large language model according to an embodiment of this application is shown. As shown in the figure, the method includes the following steps: S1. Obtain the pre-processed cooling load time series data.
[0030] In some specific embodiments, step S1 includes: S11. Collect historical cooling load dataset and perform outlier repair and missing value filling on the historical cooling load dataset. The historical cooling load dataset includes one or more of the following: outdoor temperature, outdoor humidity, indoor temperature, instantaneous cooling capacity, and ethylene glycol supply and return water temperature difference. Specifically, step S11 includes: S111: Collect historical cooling load datasets and perform outlier repair and missing value imputation on the historical cooling load datasets; S112, Calculate the interquartile range , in response to data points less than or greater than The value was identified as an outlier. , The coefficient parameter is preferably 1.5, and the position of the quartile is calculated as follows:
[0031] In the formula, This represents the number of historical datasets for cold load.
[0032] S113 uses cubic spline interpolation to repair outliers and missing values.
[0033] S12, downsample the repaired dataset and normalize the downsampled dataset to obtain cold load time series data, wherein min-max is used for normalization.
[0034] S2. Divide the cold load time series data into multiple patches, perform linear projection on the patches to obtain fixed-dimensional patch embeddings, map the patch embeddings to the word embedding space of the pre-trained large language model, and obtain the input representation received by the pre-trained large language model; calculate the statistical feature information of the cold load time series data, and construct the prompt prefix based on the statistical feature information and domain knowledge.
[0035] In some specific embodiments, step S2 includes: S21, the normalized cooling load time series data is divided into multiple patches, the first... A patch is defined as In the formula, For patch length, This represents the sliding window step size; S22, Perform linear projection on each patch to obtain a fixed-dimensional patch embedding. The mapping relationship of the patch embedding is as follows: In the formula, For trainable embedding weights, For patch length, The number of features at each time point, For vectorization operations, For bias terms; S23, the patch embeddings are combined in chronological order to form a temporal feature sequence, and based on the embedding layer and multi-head self-attention mechanism, the temporal feature sequence is mapped to the feature space of the pre-trained large language model to obtain the temporal feature representation; the complete word embedding dictionary of the pre-trained large language model is then processed. Perform dimensionality reduction or trainable linear projection (e.g., PCA or linear mapping) and cross-modal alignment via multi-head cross attention to form input representations that can be fed into a pre-trained large language model.
[0036] Specifically, step S23 includes: S231: The embeddings of each patch are arranged in chronological order to form a temporal feature sequence. Through the embedding layer and multi-head self-attention mechanism, the temporal feature sequence is projected to the same feature dimension as the large language model. Time feature representation is obtained. ,in, In the formula, For the input multivariate time series, Given the length of the input sequence, For the number of variables, To define the feature dimensions for pre-training large language models, To execute the channel dimension from arrive Mapping; S232, Complete word embedding dictionary for pre-trained large language models Perform dimensionality reduction or trainable linear projection (e.g., PCA or linear mapping) to obtain a low-dimensional word vector space. In the formula, , For vocabulary size, For predefined low dimensions, and satisfying ; S233 aligns temporal feature representations and low-dimensional word vector spaces based on a multi-head cross-attention mechanism, using temporal feature representations as query vectors. low-dimensional word vector space as a key vector Sum value vector The projection relationship is as follows In the formula, These are the linear projection matrices of the query, key, and value, respectively, and are obtained through... The aligned input representation is calculated, where, Alignment features mapped to the word embedding space of a pre-trained large language model. To query the similarity matrix between the vector and the key vector, The dimension of the query / key vector.
[0037] Step S2 also includes: S21', based on the normalized cooling load time series data, calculate the minimum, maximum and median values to obtain the first statistical characteristic; S22' uses continuous wavelet transform to normalize the discrete-time series. Multi-scale time-frequency decomposition is performed, where the mathematical form of the continuous wavelet transform is: , In the formula, Input signal In scale The transform coefficients obtained after the continuous wavelet transform, For the continuous form of the input signal, For wavelet basis functions, the Morlet wavelet basis is preferred. Here are the wavelet scaling parameters. For scale, is the conjugate complex number of the wavelet basis; S23': Calculate the average energy of each scale based on the wavelet transform coefficients, select the scale values corresponding to the scales with the highest average energy as lag features, and select the scale values corresponding to the scales with the lowest average energy as trend reversal features. S24' combines the lag feature, trend reversal feature, and the first statistical feature to form statistical feature information; S25': Construct a prompt template based on statistical feature information. The prompt template includes dataset context, task instructions and input statistical information. Insert domain knowledge of cold load prediction into the prompt template to form a prompt prefix.
[0038] For details, please refer to the following: Figure 2 , Figure 2 An example of a prompt template according to an embodiment of this application is shown, such as Figure 2As shown, the prompt template consists of three parts: task description, statistical information, and ending input. The task description indicates the prediction objective, such as "Based on information from the previous ** steps, predict the load for the next ** steps." The statistical information characterizes the features of the input data, such as "The minimum value of the input data is **, the maximum value is **, the median is **, the trend is **, the first 5 lag values are **, and the trend changes at these lag values: **." The ending input indicates the input statistics for the specific task's configuration and calculation, such as "Where ** is the input statistics for the specific task's configuration and calculation." Further inserting professional knowledge content into the prompt template, such as domain knowledge like "The cooling load every half hour is crucial in ice storage system load prediction, and the cooling load exhibits significant periodicity," can enhance the large language model's semantic understanding and reasoning ability for the prediction task, thereby improving the accuracy and stability of the cooling load prediction results.
[0039] S3. Concatenate the input representation with the prompt prefix to form the input sequence.
[0040] S4. Input the input sequence into the pre-trained large language model to obtain the cold load prediction results for a fixed period in the future.
[0041] Example The high-efficiency air conditioning room is based on an ice storage system. This system consists of two dual-mode centrifugal chillers, one base-load chiller, several cooling towers and water pumps, and other necessary auxiliary components. It features multiple sensors for collecting multi-dimensional operational data. The dual-mode centrifugal chiller has a cooling capacity of 701.1 RT in air conditioning mode and 546 RT in ice-making mode. The base-load heat recovery centrifugal chiller has a cooling capacity of 400 RT, a maximum recovery temperature of 45℃, and a recovery flow rate of 25–40 m³ / h. The cooling towers have a processing capacity of 300 m³ / h. The water pumps include: plate heat exchanger chilled water pumps and cooling water pump A, base-load chilled water pumps, heat pump chilled water pumps, and cooling water pump B, with rated flow rates ranging from 105 m³ / h to 725 m³ / h, rated heads from 31 m to 64 m, and rated speeds of 1480 rpm for all pumps.
[0042] Auxiliary components include: an air-cooled screw heat pump unit with a cooling capacity of 605.27kW and a heating capacity of 603kW; an ice storage device with a cold storage capacity of 707RTH; a cooling plate heat exchanger with a heat exchange capacity of 4200kW, a cold side (25% ethylene glycol) temperature of 3.5 / 11℃, and a hot side (water) temperature of 7 / 12℃; an ethylene glycol pump with a rated flow rate of 532m³ / h, a rated head of 41m, and a rated speed of 1450rpm; an ethylene glycol makeup water tank with an effective volume of 1m³; the ethylene glycol is a 100% pure polyester-grade solution (containing preservatives); and the ice storage air conditioning automatic control system consists of a PLC and a host computer.
[0043] In cooling load forecasting, the final forecast result can be obtained by using a cooling load forecasting method based on a large language model. (Reference) Figure 3 , Figure 3 The cooling load prediction process in an ice storage system application according to an embodiment of this application is illustrated. For example... Figure 3 As shown, the method includes the following steps: Step 301: Obtain the historical cooling load dataset. The historical cooling load dataset includes one or more of the following: outdoor temperature, outdoor humidity, indoor temperature, instantaneous cooling capacity, and the temperature difference between ethylene glycol supply and return water.
[0044] Step 302: Repair outliers and fill in missing values. The historical cooling load dataset is processed to repair outliers and fill in missing data. First, the values in the historical cooling load dataset are sorted from largest to smallest, and the quartile positions are calculated.
[0045] in, The number of historical datasets for cooling load; secondly, calculate... , and through Identify outliers, below or higher Data points were considered outliers. Finally, cubic spline interpolation was used to repair outliers and missing values. For example, temperature gaps caused by sensor communication interruptions could be recovered through interpolation; abnormal spikes in compressor current were identified and corrected.
[0046] Step 303: Downsample the dataset. The processed historical dataset is downsampled to obtain a sampled dataset. The original data is stored at the second-level sampling rate; downsampling to 30-minute intervals significantly reduces model computation while preserving the daily cyclical characteristics of the cooling load.
[0047] Step 304: After normalizing the dataset, proceed with steps 305 and 307. First, use the min-max normalization formula to map the values to... Interval. Specifically, using The data is normalized, among which... For the original time series in The value at each moment, The minimum value in the time series dataset. The maximum value in the time series dataset. For the normalized first Each sample value; through this normalization process, the original data can be mapped to... Intervals are used to eliminate differences between different units of measurement.
[0048] Step 305: Calculate statistical features. Based on the normalized cooling load time series data, calculate the minimum, maximum, and median values, and extract lag features using continuous wavelet transform (CWT). First, perform a continuous wavelet transform (CWT) on the normalized sequence to obtain time-frequency coefficients at different scales. Second, calculate the wavelet energy at each scale, selecting the five scales with the highest energy as short-term lag features and the two scales with the lowest energy as trend reversal lags. Finally, use the maximum, minimum, median, lag features, and trend reversal lags as statistical information to provide input for the subsequent construction of the prompt word. Specifically, this includes the following steps: Continuous wavelet transform is used to normalize the discrete-time series. Multi-scale time-frequency decomposition is performed, where, , The normalized time series length. For the first A number of time series samples. The mathematical form of continuous wavelet transform can be expressed as: , In the formula, Input signal In scale The transform coefficients obtained after the continuous wavelet transform, The input signal is in continuous form, but in actual calculations it is derived from a discrete-time sequence. Approximate substitution For wavelet basis functions, choose the Morlet wavelet basis, and the center frequency of the Morlet wavelet basis is... , Let be the scale parameter of the wavelet, and the scale range satisfy . , For scale, is the conjugate complex number of the wavelet basis.
[0049] Calculate the average energy at each scale, and select the five scales with the highest energy as lag features, and the two scales with the lowest energy as trend reversal lags. The formula for calculating the average energy is: In the formula, For scale The average energy below, Here are the wavelet scaling parameters. For the first The first time series sample within the first time series sample Each time step For scale and time step The wavelet transform coefficients reflect the signal's scale. and the Energy intensity at each time step.
[0050] Step 306: For the text description and background knowledge-constructed Prompt for the specific problem of cold load prediction, proceed to step 309. Based on the statistical feature information obtained in step 305 and combined with the requirements of the cold load prediction scenario, construct a prompt prefix (Prompt) containing task description, input statistical information, and cold load domain knowledge to guide the large language model to perform a specific time series prediction task.
[0051] Step 307, Patch Division. The normalized data is divided into multiple patches, where the first... Each patch is defined as In the formula, For patch length, Let be the step size of the sliding window. The patch is linearly projected to form a fixed-dimensional patch embedding, which serves as the model input. The relationship between the linear projection layer and the fixed-dimensional vector embedding is as follows: In the formula, For trainable embedding weights, For patch length, The number of features at each time point, For vectorization operations, This is a bias term.
[0052] Step 308, Encoder_PCA Alignment. The Encoder_PCA module includes linear projection, a Transformer encoding layer, and a multi-head cross-attention mechanism. It maps patch temporal features to a hidden dimension consistent with the semantic basis vector space and aligns temporal features with the semantic basis across modalities through cross-attention, generating input representations suitable for large language models. Specifically, it includes: Step a, input the given time feature sequence, By using an embedding layer and a multi-head self-attention mechanism (MHSA), the time series is projected onto the same feature dimension as the pre-trained large language model. ,get In the formula For the input multivariate time series, Given the length of the input sequence, For the number of variables, To define the feature dimensions for pre-training large language models, To execute the channel dimension from arrive The mapping.
[0053] Step b, apply dimensionality reduction or trainable linear projection (e.g., PCA or linear mapping) to the complete word embedding dictionary of the pre-trained large language model. Dimensionality reduction is performed to obtain a low-dimensional word vector space. In the formula, , For predefined low dimensions, and satisfying .
[0054] Step c, align time stamps and text embeddings using a multi-head cross-attention mechanism. Use time-series features as the query. Word embeddings after dimensionality reduction As a key ( ) and value ( ), and its projection relationship is ,in, The linear projection matrices for the query, key, and value are respectively used, and the aligned text features are finally obtained through multi-head cross-attention calculation. In the formula, The aligned text features for the attention output are the "text semantic vectors" that are ultimately used as input to the Time Series–Large Language Model (Time-LLM) framework for large language models (LLM). The dimension of the query / key vector is used to scale the dot product. To query the similarity with the key, To query the similarity matrix between the vector and the key vector, The dimension of the query / key vector.
[0055] Step 309, Pre-train Time-LLM. The input representation aligned with Encoder_PCA is concatenated with the constructed Prompt to form an input sequence, which is then input into the pre-trained large language model Time-LLM. The model's semantic reasoning ability is used to obtain the cold load prediction results for future time periods.
[0056] Furthermore, the trained large language model is used for both long-term and short-term cold load predictions. Throughout the prediction process, the LLM parameters are kept frozen, and only relatively lightweight pre-trained models are used as the backbone network, such as the BERT-base model with approximately 3.5 million parameters. (Reference) Figure 4 , Figure 4 The diagram shows a comparison of 24-hour load forecasting results between embodiments of this application and other forecasting algorithms. For example... Figure 4As shown in (a), the horizontal axis represents the time step, and the vertical axis represents the normalized cooling load, with one time step corresponding to 30 minutes. The Time-LLM model prediction curve in this embodiment of the application highly matches the normalized true value curve in its overall trend. It can not only capture the periodic changes between day and night, but also accurately reflect the rapid rise of load in the peak range and the gradual decline in the trough range. Compared with methods such as ETIME-LLM, Informer, DLINear, PatchTST, TimesNet, and LightTS, its overall fitting effect is superior. Figure 4 As shown in (b), the horizontal axis represents the time step, and the vertical axis represents the normalized residual. In the residual comparison, the Time-LLM model of this application embodiment exhibits a lower residual amplitude and a smaller fluctuation range, especially in the peak and valley ranges of the cooling load, which can still maintain stable prediction accuracy, thereby verifying the accuracy and robustness of the method in long-term prediction.
[0057] Continue to refer to Figure 5 , Figure 5 The diagram shows a comparison of the results of this application's embodiments and other prediction algorithms in a 2-hour load prediction scenario. Figure 5 As shown in (a), the horizontal axis represents the time step, and the vertical axis represents the normalized cooling load. One time step corresponds to 30 minutes, therefore a 2-hour prediction window corresponds to approximately 4 time steps. Although the horizontal axis ranges from 0 to 50, the focus of the actual evaluation is on the short-term prediction interval. It can be seen that the Time-LLM model used in this application's embodiment also exhibits superior fitting performance within the short-term prediction interval. Its prediction curve and the normalized true value curve are highly consistent in both overall trend and local fluctuations, accurately reflecting the rise, fall, and minor fluctuations of the cooling load in the short term. Figure 5 As shown in (b), the horizontal axis represents the time step, and the vertical axis represents the normalized residual. In the comparison of short-term prediction residuals, the Time-LLM model of this application embodiment has a residual close to zero within the local window range, and the prediction results are smoother and more stable. Compared with other methods, it can better cope with short-term fluctuations in cooling load, indicating that this method also has high accuracy and strong robustness in short-term prediction.
[0058] Continue to refer to Figure 6 As an implementation of the above method, in a second aspect, this application provides an embodiment of the framework diagram 600 of a cooling load prediction system based on the Time-LLM model. This system embodiment is similar to... Figure 1 Corresponding to the illustrated method embodiment, this system can be specifically applied to various electronic devices. The system 600 includes a data processing module 601, a cue prefix construction module 602, an input representation module 603, an input sequence module 604, and a prediction result module 605, all interconnected. Data processing module 601 is configured to acquire preprocessed cooling load time series data; The prompt prefix construction module 602 is configured to divide the cold load time series data into multiple patches, perform linear projection on the patches to obtain fixed-dimensional patch embeddings, map the patch embeddings to the word embedding space of the pre-trained large language model to obtain the input representation received by the pre-trained large language model, calculate the statistical feature information of the cold load time series data, and construct prompt prefixes based on the statistical feature information and domain knowledge. The input sequence module 603 is configured to concatenate the input representation with the prompt prefix to form an input sequence; The prediction result module 604 is configured to input the input sequence into a pre-trained large language model to obtain the prediction result of the cold load for a fixed period of time in the future.
[0059] Although the principles of the present invention have been described in detail above with reference to preferred embodiments, those skilled in the art should understand that the above embodiments are merely illustrative explanations of the implementation of the present invention and are not intended to limit the scope of the present invention. The details in the embodiments do not constitute a limitation on the scope of the present invention. Any obvious changes, such as equivalent transformations or simple substitutions, based on the technical solutions of the present invention without departing from the spirit and scope of the present invention fall within the protection scope of the present invention.
Claims
1. A cold load prediction method based on a large language model, characterized in that, The method comprises: S1, obtaining preprocessed cold load time series data; S2, dividing the cold load time series data into multiple patches, performing linear projection on the patches to obtain patch embeddings of a fixed dimension, mapping the patch embeddings to a word embedding space of a pre-trained large language model to obtain an input representation received by the pre-trained large language model, calculating statistical feature information of the cold load time series data, and constructing a prompt prefix based on the statistical feature information and domain knowledge; S3, concatenating the input representation and the prompt prefix to form an input sequence; S4, inputting the input sequence into the pre-trained large language model to obtain a future fixed period cold load prediction result. 2.The cold load prediction method based on a large language model according to claim 1, wherein, The S1 step comprises: S11, collecting a cold load historical data set, and performing outlier repair and missing value filling on the cold load historical data set; S12, downsampling the repaired data set, and performing normalization processing on the downsampled data set to obtain the cold load time series data, wherein min-max normalization processing is used.
3. The cold load prediction method based on a large language model according to claim 2, characterized in that, The S11 step comprises: S111, sort the values of the cold load history data set by numerical value, calculate the quartile position, and obtain 、 and The quartile position is calculated as: In the formula, is the number of cold load history data sets; S112, calculate the interquartile range , in response to the data point being less than or greater than , determine as an outlier, wherein , is a coefficient parameter; S113, repairing the outliers and the missing values using a cubic spline interpolation method. 4.The cold load prediction method based on a large language model according to claim 1, wherein, The S2 step comprises: S21, the normalized cooling load time series data is divided into multiple patches, the first patch is defined as , wherein, , the formula is patch length, is the sliding window step. S22, performing linear projection on each of the patches to obtain patch embeddings with fixed dimensions, a mapping relationship of the patch embeddings being , wherein, is a trainable embedding weight, is a patch length, is a feature number at each time point, is a vectorization operation, is a bias term; S23, embedding the patch into a time feature sequence combined in time sequence, and mapping the time feature sequence to a feature space of the pre-trained large language model based on an embedding layer and a multi-head self-attention mechanism to obtain a time feature representation; and A dimension reduction or trainable linear projection is performed and cross-modal alignment is completed through multi-head cross-attention to form an input representation capable of being input to the pre-trained large language model.
5. The cold load estimation method based on a large language model according to claim 4, characterized in that, The S23 step comprises: S231, the time feature sequence is projected to the same feature dimension as the large language model through an embedding layer and a multi-head self-attention mechanism , obtaining a time feature representation , wherein , in the formula, is an input multivariate time series, is the length of the input sequence, is the number of variables, is the feature dimension of the pre-trained large language model, is a mapping from to the execution channel dimension; S232, a complete word embedding dictionary of the pre-trained large language model performing dimension reduction or trainable linear projection to obtain a low-dimensional word vector space wherein, , is a size of a vocabulary, is a predefined low dimensionality, and satisfies ; S233, aligning the time feature representation and the low-dimensional word vector space based on a multi-head cross-attention mechanism, taking the time feature representation as a query vector , the low-dimensional word vector space as a key vector and a value vector , and the projection relationship is , wherein, are linear projection matrices of the query, the key and the value, respectively, and the aligned input representation is calculated by , wherein, is an aligned feature mapped to the pre-trained large language model word embedding space, is a similarity matrix of the query vector and the key vector, is the dimension of the query / key vector. 6.The cold load prediction method based on a large language model according to claim 1, wherein, The S2 step comprises: S21', calculating a minimum value, a maximum value and a median based on the normalized cold load time series data to obtain a first statistical feature; S22', the normalized discrete time series is subjected to a continuous wavelet transform a multi-scale time-frequency decomposition is performed, wherein the mathematical form of the continuous wavelet transform is , wherein is the input signal is the continuous form of the input signal, is the transform coefficient obtained after the continuous wavelet transform at scale is the continuous form of the input signal, is the wavelet basis function, preferably a Morlet wavelet basis, is the scale parameter of the wavelet, is the scale size, is the complex conjugate of the wavelet basis; S23', calculating the average energy of each scale according to the wavelet transform coefficients, selecting the scale values corresponding to a plurality of scales with the highest average energy as lag features, and selecting the scale values corresponding to a plurality of scales with the lowest average energy as trend turning features; S24', combining the lag features, the trend turning features and the first statistical features to form the statistical feature information; S25', constructing a prompt template based on the statistical feature information, the prompt template comprising a data set context, a task instruction and input statistical information, and inserting domain knowledge of cold load prediction in the prompt template to form the prompt prefix.
7. The cold load estimation method based on a large language model according to claim 6, characterized in that, The formula for calculating the average energy is as follows: In the formula, For scale The average energy below, Here are the wavelet scaling parameters. For the first The first time series sample within the first time series sample Each time step The normalized time series length. For scale and time step The wavelet transform coefficients. 8.The cold load prediction method based on a large language model according to claim 2, wherein, The cold load historical data set comprises one or more of outdoor temperature, outdoor humidity, indoor temperature, instantaneous cooling capacity, and glycol supply and return water temperature difference.
9. An application of a cold load prediction method based on a large language model, characterized by, The large language model-based cold load prediction method of any one of claims 1-8 is applied to an ice storage system. 10.A cold load prediction system based on a large language model, characterized in that, The system comprises: a data processing module configured to obtain preprocessed cold load time series data; a prompt prefix construction module configured to divide the cold load time series data into multiple patches, perform linear projection on the patches to obtain patch embeddings of a fixed dimension, map the patch embeddings to a word embedding space of a pre-trained large language model to obtain an input representation received by the pre-trained large language model, calculate statistical feature information of the cold load time series data, and construct a prompt prefix based on the statistical feature information and domain knowledge; an input sequence module configured to concatenate the input representation and the prompt prefix to form an input sequence; an input sequence module configured to concatenate the input representation and the prompt prefix to form an input sequence; A prediction result module is configured to input the input sequence into the pre-trained large language model to obtain a future fixed time period cooling load prediction result.