Cold station power prediction method, device, equipment and medium
By integrating multiple external variable data and using LSTM models to predict cold station power, the problem of insufficient prediction accuracy in the prior art is solved, and higher precision power prediction and optimization control are achieved.
Patent Information
- Application Number
- CN202510375569.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-27
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2045-03-27
AI Technical Summary
The existing cold station power prediction method does not fully consider external variables, resulting in insufficient prediction accuracy and accuracy, which makes it difficult to meet the practical application needs.
By obtaining the historical power data of the cold station and a variety of external variable data, including weather, operation plan, time information and flow data, data are encoded and integrated, and feature extraction and prediction are used for long-term and short-term memory network (LSTM) model, combining attention mechanisms and loss function optimization models.
It significantly improves the accuracy and accuracy of cold station power prediction, supports cold station optimization control and power load regulation, reduces energy consumption, and enhances the robustness and adaptability of the model.
Smart Images

Figure CN120497872A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to technical fields such as energy management and artificial intelligence, and in particular to a cooling station power prediction method, device, equipment and medium. Background Art
[0002] Cold plant power forecasting has important applications in energy management and optimization control, such as optimal control of cold plants and demand-side load response. Accurate power forecasting can help reduce energy consumption, improve system efficiency, and support grid scheduling. However, existing cold plant power forecasting methods typically only consider data generated by the cold plant itself. This results in low precision and accuracy, making it difficult to meet practical application requirements. Summary of the Invention
[0003] The embodiments of the present invention aim to at least partially solve one of the technical problems in the related art. To this end, one object of the present invention is to provide a cooling station power prediction method, apparatus, device and medium to improve the cooling station power prediction precision and accuracy.
[0004] An embodiment of the present invention provides a cooling station power prediction method, which includes: obtaining historical power data and external variable data of the cooling station, wherein the external variable data includes historical data and future data; encoding the external variable data according to the data type of the external variable data to obtain the encoded external variable data; integrating the historical power data of the cooling station and the encoded external variable data to obtain a target vector; extracting features of the target vector to obtain time series feature data; and performing prediction based on the time series feature data to obtain a cooling station power prediction result.
[0005] Exemplarily, data encoding is performed on the external variable data according to the data type of the external variable data to obtain the encoded external variable data, including: when the data type of the external variable data is a discrete type, data encoding is performed on the external variable data to obtain the encoded external variable data; the method also includes: when the data type of the external variable data is a continuous type, using the numerical value of the external variable data as the encoded external variable data.
[0006] Exemplarily, the external variable data includes at least one of weather data, cold station operation plan data, time data, and people flow data, and the data type of the weather data is a continuous type; the data types of the operation plan data, time data, and people flow data are discrete types; data encoding is performed on the external variable data to obtain the encoded external variable data, including: embedded encoding of the operation plan data, time data, and people flow data respectively to obtain the encoded external variable data; periodic encoding of the time data, and / or, scale-uniform encoding of the time data by interpolation or downsampling methods to obtain the encoded external variable data.
[0007] Exemplarily, the operation plan data, time data, and people flow data are respectively embedded-encoded to obtain the encoded external variable data, including: mapping the operation plan data, time data, and people flow data into continuous variable space to obtain the encoded external variable data.
[0008] Exemplarily, periodic coding includes a sine function method and a cosine function method, which periodically encodes the time data to obtain encoded external variable data, including: encoding the time data according to the sine function method to obtain the first variable; encoding the time data according to the cosine function method to obtain the second variable; combining the first variable and the second variable to obtain the encoded external variable data.
[0009] Exemplarily, the cold station power prediction method is applied to a power prediction model, which includes an input layer, a long short-term memory network LSTM layer, a fully connected layer and an output layer, wherein: the input layer is used to encode the external variable data according to the data type of the external variable data to obtain the encoded external variable data, and to integrate the historical power data of the cold station and the encoded external variable data to obtain a target vector, wherein the external variable data includes historical data and future data; the long short-term memory network LSTM layer is used to extract features from the target vector to obtain time series feature data; the fully connected layer is used to make predictions based on the time series feature data to obtain the cold station power prediction results; the output layer is used to output the cold station power prediction results.
[0010] Exemplarily, the power prediction model includes an attention mechanism for dynamically adjusting the weights of external variable data in a target vector.
[0011] Exemplarily, the power prediction model includes a loss function, which is used to measure the deviation between the cold station power prediction result and the true value when training the power prediction model, wherein the loss function includes a regularization term.
[0012] Illustratively, weather data includes temperature and humidity; historical data corresponding to the cooling station operation plan includes historical startup operations, historical shutdown operations, and historical set values of water supply temperature of cooling station equipment; and time data includes holiday data.
[0013] Another embodiment of the present invention provides a cooling station power prediction device, which includes: an acquisition module for acquiring historical power data and external variable data of the cooling station, wherein the external variable data includes historical data and future data; a first processing module for encoding the external variable data according to the data type of the external variable data to obtain the encoded external variable data; a first integration module for integrating the historical power data of the cooling station and the encoded external variable data to obtain a target vector; a first extraction module for extracting features from the target vector to obtain time series feature data; and a first prediction module for performing prediction based on the time series feature data to obtain a cooling station power prediction result.
[0014] An embodiment of the present invention provides an electronic device including a memory and a processor. The memory stores a computer program, and the processor implements the steps of the method of any one of the above embodiments when executing the computer program.
[0015] An embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the method of any one of the above embodiments are implemented.
[0016] In the above-described embodiment, the cooling station power prediction method includes: obtaining historical cooling station power data and external variable data, wherein the external variable data includes historical data and future data; encoding the external variable data according to the data type of the external variable data to obtain encoded external variable data; integrating the historical cooling station power data and the encoded external variable data to obtain a target vector; extracting features from the target vector to obtain time series feature data; and performing prediction based on the time series feature data to obtain a cooling station power prediction result. This method integrates multiple external variable data such as weather data, operation plan data, time data, and passenger flow data, and separately encodes external variable data at different time scales, thereby fully utilizing the external variable data and improving the accuracy of cooling station power prediction. It also provides reliable data support for cooling station optimization control and power load regulation, helping to reduce energy consumption, improve system efficiency, and provide support for power grid scheduling.
[0017] Additional aspects and advantages of the present invention will be set forth in part in the description which follows and, in part, will be obvious from the description which follows, or may be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1A flow chart of a cooling station power prediction method provided in an embodiment of the present invention;
[0019] Figure 2 A comparison chart of cooling station power prediction results for the first time period provided by an embodiment of the present invention;
[0020] Figure 3 A comparison chart of cooling station power prediction results for the second time period provided by an embodiment of the present invention;
[0021] Figure 4 A comparison chart of cooling station power prediction results for the third time period provided by an embodiment of the present invention;
[0022] Figure 5 A block diagram of a cooling station power prediction device provided in another embodiment of the present invention;
[0023] Figure 6 A block diagram of an electronic device provided in accordance with another embodiment of the present invention. DETAILED DESCRIPTION
[0024] The following describes embodiments of the present invention in detail, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and are not to be construed as limiting the present invention.
[0025] Cooling plant power forecasting has important applications in energy management and optimization control, such as optimal control of cooling plants and load response on the power demand side. Accurate power forecasting can help reduce energy consumption, improve system efficiency, and support grid scheduling.
[0026] Research on cooling station power prediction has primarily focused on prediction methods based on time series data, such as autoregressive integrated moving average (ARIMA), support vector machine (SVM), and neural network. However, these methods have the following drawbacks:
[0027] (1) Insufficient consideration of external variables: Related methods mainly rely on historical power data and do not systematically introduce a variety of exogenous variables, such as weather, operation plans, holiday information, etc. These external variables have a significant impact on the power of the cooling station, and ignoring them will lead to inaccurate prediction results.
[0028] (2) Unprocessed mixed external variables: External variables have different time scales and types (e.g., continuous temperature, discrete operation schedule), and the related methods lack a unified encoding and integration of these variables. This makes it difficult for the model to capture the complete impact of these variables on the cooling plant power.
[0029] (3) Limited prediction accuracy: Since the dynamic influence of external variables is not taken into account, the prediction accuracy is difficult to meet the actual application requirements. In particular, when the external variables change greatly, the prediction performance of the model will drop significantly.
[0030] External variables include weather and weather forecast information: such as temperature and humidity, which directly affect the load demand of the cooling station. High temperature and high humidity weather will cause the power of the cooling station to increase; including future operation plans: such as turning on / off the chiller, adjusting the water supply temperature, etc., changes in the operation plan will directly affect the power consumption of the cooling station; including time information: such as weekdays and holidays, there is a significant difference in the load demand of the cooling station on weekdays and holidays, and the load is usually lower on holidays; including indoor crowd monitoring and prediction information: changes in crowd flow will affect the indoor temperature, and thus affect the power demand of the cooling station.
[0031] External variables significantly influence cooling plant load demand, but relevant methods fail to fully utilize this information, resulting in insufficient forecast accuracy. The challenge is to fully utilize these external variables, especially for future periods, as some can be predicted in advance, such as weather forecasts and operational plans, to improve forecast accuracy. However, these external variable data vary significantly. Some are continuous, such as temperature and humidity in weather forecasts, while others are discrete, such as holidays or power-on and power-off schedules. These variables also vary in timescale, making integration of these variables into forecasting models challenging.
[0032] In view of this, an embodiment of the present application proposes a cooling station power prediction method, which fully considers various external variables and improves the cooling station power prediction precision and accuracy.
[0033] Figure 1 This is a flow chart of a cooling station power prediction method provided in an embodiment of the present invention.
[0034] like Figure 1 As shown, the cooling station power prediction method 100 includes steps S110 to S150.
[0035] Step S110 , obtaining historical power data and external variable data of the cooling station, wherein the external variable data includes historical data and future data.
[0036] For example, historical power data, such as collecting the power time series of the cooling station over a period of time in the past, is used as historical power data; external variable data, such as weather and weather forecast information: such as outdoor humidity and humidity, input weather history records, and obtain real-time and future weather data through weather station or weather forecast API (Application Programming Interface); operation plan: such as cooling station equipment on / off history, water supply temperature setting value history, etc., in the future, the cooling station operator can provide future operation plans; time information: obtain historical and future time information through calendar or holiday arrangements; indoor crowd monitoring and prediction information: obtain real-time and future crowd number forecasts through indoor sensors or crowd prediction models.
[0037] Step S120 , encoding the external variable data according to the data type of the external variable data to obtain encoded external variable data.
[0038] Exemplarily, the data type can be a continuous variable, a discrete variable, etc. The continuous variables in the external variable data include temperature, humidity, etc., and the discrete variables include operation plans, holiday time information, and passenger flow information. By encoding different data types separately, the discrete variable encoding method can be one-hot encoding, binary encoding, etc., and the continuous variable encoding method can be normalization, etc.
[0039] Step S130 : integrating the historical power data of the cooling station and the encoded external variable data to obtain a target vector.
[0040] For example, the historical power data of the cooling station and the encoded external variable data are concatenated to obtain a unified target vector, which is then fed into a power prediction model. The power prediction model may include a Long Short-Term Memory (LSTM) network.
[0041] Step S140: extract features from the target vector to obtain time series feature data.
[0042] For example, the LSTM layer of the Long Short-Term Memory (LSTM) network extracts features of the target vector and controls the flow of input information based on its internal forget gate, input gate, and output gate, thereby capturing long-term dependencies in the time series.
[0043] Step S150 , performing prediction based on the time series characteristic data to obtain a cooling station power prediction result.
[0044] For example, a fully connected layer of a long short-term memory (LSTM) network maps the LSTM layer output to a predicted value. The fully connected layer then converts the LSTM layer output into a cooling plant power forecast through a linear transformation. The output layer of the LSTM network outputs the cooling plant power forecast, including forecasts for the future. These forecasts can be hourly, daily, or weekly, depending on actual needs.
[0045] According to the embodiments of the present application, by integrating multiple external variable data such as weather data, operation plan data, time data, and crowd flow data, the external variable data of different time scales are encoded separately, so that the external variable data are fully utilized, and the power prediction accuracy of the cooling station is improved; and reliable data support is provided for the optimization control of the cooling station and the power load regulation, which helps to reduce energy consumption, improve system efficiency, and provide support for power grid scheduling.
[0046] According to the data type of the external variable data, the external variable data is data-encoded to obtain the encoded external variable data, including: when the data type of the external variable data is a discrete type, the external variable data is data-encoded to obtain the encoded external variable data; the method also includes: when the data type of the external variable data is a continuous type, using the numerical value of the external variable data as the encoded external variable data.
[0047] For example, continuous external variable data, such as temperature and humidity, can be directly input into the LSTM model as numerical values without additional processing. Discrete external variable data must be encoded before being input into the LSTM model.
[0048] Exemplarily, the external variable data includes at least one of weather data, cold station operation plan data, time data, and people flow data, and the data type of the weather data is a continuous type; the data types of the operation plan data, time data, and people flow data are discrete types; data encoding is performed on the external variable data to obtain the encoded external variable data, including: embedded encoding of the operation plan data, time data, and people flow data respectively to obtain the encoded external variable data; periodic encoding of the time data, and / or, scale-uniform encoding of the time data by interpolation or downsampling methods to obtain the encoded external variable data.
[0049] Specifically, weather data includes temperature and humidity; historical data corresponding to the cold station operation plan includes historical startup operations, historical shutdown operations, and historical set values of the water supply temperature of the cold station equipment; time data includes holiday data. Embedded coding of the operation plan data, time data, and crowd flow data includes encoding using an embedding layer. An embedding layer is used to map discrete external variables to a continuous space. The embedding layer can learn low-dimensional representations of discrete variables, thereby improving the model's processing capabilities for discrete variables. Periodic coding (such as sine / cosine functions) is used to represent information such as hours and weeks. Interpolation or downsampling methods are used to unify to the same time scale. For example, for weather forecast data, if its time scale is inconsistent with the power data, it can be converted to the time scale of the power data through interpolation methods.
[0050] Interpolation is a method that estimates unknown data points based on known data points. It is used to fill in data between given time scales, allowing data at different time scales to be unified onto the target time scale. Downsampling reduces the temporal resolution of data by reducing the number of data points, converting high-resolution data into low-resolution data to match data at coarser time scales. For example, if hourly meteorological data is downsampled to daily data, the average of the 24-hour data can be calculated as the representative value for that day.
[0051] In the above embodiment, the time data is uniformly coded on a scale by interpolation or downsampling methods, which can fill missing values and more intuitively display the changing trend of the data. Moreover, by selecting a portion of the data for analysis through downsampling, storage resources and computing time can be saved.
[0052] Embedded coding is performed on the operation plan data, time data, and people flow data respectively to obtain coded external variable data, including: mapping the operation plan data, time data, and people flow data respectively into a continuous variable space to obtain the coded external variable data.
[0053] Embedded encoding is a data representation method widely used in machine learning and deep learning, playing a particularly important role when processing discrete data (such as words in text and category labels). It maps high-dimensional, sparse, discrete data into low-dimensional, dense, continuous vectors. The core idea of embedded encoding is to learn a fixed-dimensional vector representation for each discrete element (such as a word or category), called an embedding vector. These embedding vectors exist in a low-dimensional continuous space, in which the vectors corresponding to elements with similar semantics or characteristics are close to each other.
[0054] The embedding layer can be regarded as a learnable lookup table. Suppose we have a vocabulary containing V different discrete elements (such as words), and we want to map each element into a d-dimensional vector space. The embedding layer can be represented by a Vxd matrix E, where each row of the matrix corresponds to the embedding vector of an element in the vocabulary. For the input discrete element (usually represented by its index i in the vocabulary, 0 ≤ i < V), the output of the embedding layer is the i-th row of the matrix E, that is, the embedding vector e i .
[0055] Exemplarily, the periodic encoding includes a sine function method and a cosine function method. Periodically encoding the time data to obtain the encoded external variable data includes: encoding the time data in the sine function method to obtain a first variable; encoding the time data in the cosine function method to obtain a second variable; combining the first variable and the second variable to obtain the encoded external variable data.
[0056] For example, use periodic encoding (such as sine / cosine functions) to represent information such as hours and weeks. For example, for hour information, the sine and cosine functions can be used to encode 24 hours into two consecutive variables (i.e., the first variable and the second variable) to capture the periodic characteristics of time. Among them, the first variable is the sine value, the second variable is the cosine value, and the sine value and the cosine value form a vector for encoding periodic time data.
[0057] Periodic functions (such as sine and cosine functions) have the characteristic of periodic repetition, and their values cycle within a fixed period. With this characteristic, periodic data can be mapped into one period of the sine and cosine functions. For data with a period of T, its sine encoding is shown in formula (1) and its cosine encoding is shown in formula (2):
[0058]
[0059] where x is the value of the current data point and T is the period of the data.
[0060] Different periodic data have different periods. For example, for hours, there are 24 hours in a day, so the period T = 24; for weeks, there are 7 days in a week, so the period T = 7; for months, there are 12 months in a year, so the period T = 12. For each data point x, calculate its sine and cosine encoding values according to the above formula respectively, and use the calculated sine and cosine encoding values as the encoded external variable data.
[0061] In the above embodiment, the time data is encoded in a periodic encoding manner, which avoids the occurrence of discontinuity problems, can learn smoother functions, reduces excessive dependence on specific data points, and thus reduces the risk of overfitting. In addition, since low-dimensional data requires less memory and computing resources during the calculation process, computing efficiency can be improved.
[0062] The cold station power prediction method is applied to the power prediction model. The power prediction model includes an input layer, a long short-term memory network LSTM layer, a fully connected layer and an output layer, wherein: the input layer is used to encode the external variable data according to the data type of the external variable data to obtain the encoded external variable data, and to integrate the historical power data of the cold station and the encoded external variable data to obtain the target vector, wherein the external variable data includes historical data and future data; the long short-term memory network LSTM layer is used to extract features of the target vector to obtain time series feature data; the fully connected layer is used to make predictions based on the time series feature data to obtain the cold station power prediction results; the output layer is used to output the cold station power prediction results.
[0063] Power prediction models include, for example, Long Short-Term Memory (LSTM) networks. LSTM is a special type of recurrent neural network (RNN) that can learn long-term dependencies and effectively solve the vanishing or exploding gradient problems that occur in traditional RNNs when processing long sequences.
[0064] Input layer: Receives historical power data and encoded external variable data. The input layer concatenates this data into a unified vector (target vector) as input to the LSTM layer.
[0065] LSTM layer: Extracts time series features and combines them with external variable data for prediction. The LSTM layer controls the flow of information through its internal forget gate, input gate, and output gate, thereby capturing long-term dependencies in the time series.
[0066] LSTM (Long Short-Term Memory) can effectively capture long-term dependencies in sequence data by introducing memory cells (Cell State) and gating mechanisms (forget gate, input gate, and output gate). The memory cell (Cell State) is the core of LSTM and is responsible for transferring information between time steps. The state of the memory cell C t It can remain unchanged over multiple time steps, thus preserving long-term information. Through the gating mechanism, LSTM can selectively update or forget the information in the memory unit.
[0067] The main function of the forget gate is to determine the cell state C at the previous moment t-1 How much information needs to be forgotten. When processing sequence data, as time steps advance, some information may no longer be important. The forget gate can help the model selectively discard this information to avoid irrelevant information from interfering with subsequent calculations. The input gate is mainly responsible for determining the current input x t How much information needs to be added to the cell state. At the same time, it generates a candidate cell state to update the current cell state. The output gate is used to determine the current cell state C t How much information needs to be output to the hidden state ht at the current moment.
[0068] The forget gate, input gate, and output gate work together to enable LSTM to dynamically adjust the cell state and hidden state based on the input data, effectively capturing long-term dependencies in sequence data. Specifically, the forget gate controls the retention of old information, the input gate controls the addition of new information, and the output gate controls the output of cell state information. Together, the forget gate, input gate, and output gate ensure the LSTM's performance when processing long sequences.
[0069] Fully connected layer: maps the output of the LSTM layer to the predicted value. The fully connected layer converts the output of the LSTM layer into the cold station power prediction result through linear transformation.
[0070] Output layer: Generates future cooling station power forecast results. The output layer outputs the model's cooling station power forecast results for a period of time in the future.
[0071] In the above embodiment, the LSTM (Long Short-Term Memory) model is used to fuse historical data and external variables for prediction. The LSTM model can capture long-term dependencies in time series and flexibly handle multiple external variables to improve prediction accuracy.
[0072] The power prediction model includes an attention mechanism, which is used to dynamically adjust the weights of external variable data in the target vector.
[0073] The attention mechanism assigns weights to different external variables, highlights the influence of important variables, and can dynamically adjust the influence of different external variables on the prediction results, thereby improving the prediction accuracy of the model.
[0074] LSTM (Long Short-Term Memory) is a specialized recurrent neural network capable of handling long-term dependencies in sequential data. The attention mechanism allows the model to automatically focus on the importance of different parts of a sequence when processing it. Combining LSTM with the attention mechanism can further improve the model's performance on sequence tasks.
[0075] The attention mechanism provides a model with the ability to dynamically focus on information at different positions in a sequence. At each time step, the attention mechanism calculates the importance weights for each position in the sequence based on the current task and input. It then performs a weighted summation of the sequence information based on these weights to generate a context vector for the current time step. This context vector can contain key information from different positions in the sequence, helping the model better understand and process the sequence.
[0076] The specific implementation steps are as follows: (1) LSTM encoding: Encode the input sequence through LSTM to obtain the hidden state of each time step. (2) Attention calculation: Calculate the attention score: Calculate the attention score of each time step based on the hidden state of the current time step and the hidden state of all time steps. Calculate the attention weight: Normalize the attention score through the softmax function to obtain the attention weight of each time step. Calculate the context vector: Perform weighted summation of the hidden states of all time steps according to the attention weight to obtain the context vector of the current time step. (3) Merge the context vector and hidden state: Merge the context vector and the hidden state of the current time step (for example, splicing), and then input it into the subsequent fully connected layer for prediction.
[0077] The power prediction model includes a loss function, which is used to measure the deviation between the cold station power prediction result and the true value when training the power prediction model, wherein the loss function includes a regularization term.
[0078] Exemplarily, this application uses mean square error (MSE) as a loss function to measure the deviation between the predicted value and the true value. MSE can reflect the overall difference between the predicted value and the true value and is a commonly used regression loss function. Other loss functions such as mean absolute error loss (MAE) can also be used. At the same time, it can be considered to introduce a regularization term (such as L2 regularization) to prevent overfitting. The regularization term can limit the complexity of the model, prevent the model from overfitting on the training set, and improve the generalization ability of the model.
[0079] Regularization methods include: (1) L1 regularization (Lasso regression): Add the sum of the absolute values of the model parameters as a regularization term in the loss function. It is suitable for scenarios where feature selection is required. When there are a large number of features in the dataset and some features contribute little to the model, L1 regularization can be used to filter out important features. (2) L2 regularization (Ridge regression): Add the sum of the squares of the model parameters as a regularization term in the loss function. It is widely used in various models, especially in linear regression, logistic regression, neural network models, etc., and can effectively prevent model overfitting. (3) Dropout: During the training process, some neurons in the network are randomly "discarded" (set to zero) with a certain probability P, so that the network structure is different each time it is trained. This can reduce the co-adaptation relationship between neurons and force the network to learn more robust features. It is often used in deep learning models such as multi-layer perceptron (MLP), convolutional neural network (CNN), recurrent neural network (RNN), etc., especially when processing large-scale datasets and complex models, which can effectively prevent overfitting. (4) Early Stopping: During the model training process, the dataset is divided into a training set and a validation set. After each training iteration, the performance of the model on the validation set is evaluated. When the performance on the validation set (such as the loss function value) no longer improves or even begins to decline, the training is stopped and the model parameters at this time are selected as the final model parameters. (5) Data Augmentation: By performing a series of transformations on the original data, new training data is generated, thereby increasing the diversity of the training data. For example, in image data, operations such as rotation, flipping, scaling, and cropping can be performed; in text data, operations such as synonym replacement, insertion, and deletion can be performed. (5) Batch Normalization: Before each layer of the neural network is input, the input data is normalized so that the mean of the input data is zero and the variance is one. This can speed up the training process of the model, reduce internal covariate shift, and also has a certain regularization effect. (6) Max-Norm Regularization: The norm of the weight vector of each neuron in the neural network is constrained so that it does not exceed a pre-set maximum value c. If the norm of the weight vector exceeds c, it is scaled to a norm equal to c.
[0080] Common LSTM loss functions include: (1) Mean Squared Error (MSE): Mean Squared Error is the average of the squares of the differences between the predicted value and the true value. It measures the average squared error between the predicted value and the true value. It is suitable for regression problems, such as time series prediction and stock price prediction, where the goal is to predict a continuous value. (2) Mean Absolute Error (MAE): Mean Absolute Error is the average of the absolute values of the differences between the predicted value and the true value. It measures the average absolute error between the predicted value and the true value. It is also suitable for regression problems. Compared with MSE, MAE is less sensitive to outliers because it does not square the error. (3) Cross Entropy Loss: Cross Entropy Loss is often used for classification problems. It measures the difference between two probability distributions. For multi-classification problems, the softmax function is usually used to convert the output of the model into a probability distribution, and then the cross entropy loss is calculated. It is suitable for classification problems, such as text classification and image classification. (4) Binary Cross Entropy Loss: Binary cross entropy loss is a special case of cross entropy loss in binary classification problems. It measures the difference between two binary probability distributions. It is suitable for binary classification problems, such as sentiment analysis (positive or negative) and spam detection (yes or no). In practical applications, it is necessary to select an appropriate loss function based on the specific task type (regression or classification) to achieve the best training results.
[0081] When training the LSTM model, choose an appropriate optimizer, such as the Adam (Adaptive Moment Estimation) optimizer. You can also consider using early stopping to prevent overfitting. Early stopping monitors the loss function value on the validation set and stops training when the loss function value stops decreasing, thus preventing overfitting.
[0082] The training dataset consists of historical cooling plant power data and corresponding external variable data. Data quality and integrity were ensured, and outliers and missing values were removed. The datasets were divided into training, validation, and test sets to ensure a reasonable data distribution. Cross-validation and other methods were used to evaluate model performance and select optimal model parameters.
[0083] Figure 2 A comparison chart of cooling station power prediction results for the first time period provided by an embodiment of the present invention; Figure 3 A comparison chart of cooling station power prediction results for the second time period provided by an embodiment of the present invention; Figure 4 This is a comparison chart of cooling station power prediction effects in the third time period provided by an embodiment of the present invention.
[0084] like Figure 2 、 Figure 3 、 Figure 4 As shown in the figure, the horizontal axis represents the timestamp, and the vertical axis represents the power prediction result. In the legend, "y" refers to the actual cooling plant power value; "LSTM" refers to the cooling plant power prediction result obtained by the LSTM model; "NHITS" stands for N-Hybrid Input-Output, which refers to the cooling plant power prediction result obtained by another time series prediction model. The LSTM power prediction model uses power as input, and the external variables are weather, outdoor temperature, outdoor humidity, and the power on / off schedule. As can be seen, when using external variables, the LSTM curve is closer to the actual cooling plant power value, significantly improving prediction accuracy and reducing the mean square error (MSE) by approximately 40%.
[0085] The cooling station power prediction method proposed in the present invention significantly improves the accuracy of cooling station power prediction by comprehensively considering a variety of mixed external variables. Specific effects include: improving prediction accuracy: by introducing a variety of external variables and improving the model structure, the present invention can more accurately predict cooling station power. Compared with traditional methods, the prediction error is reduced by more than 20% in typical scenarios; enhancing model robustness: being able to adapt to the dynamic changes of different external variables. The present invention enhances the adaptability of the model to different external variables by unified coding and integration of multiple external variables; supporting optimization control and load regulation decisions: providing reliable data support for cooling station optimization control and power load regulation. Accurate power prediction can help cooling station operators formulate more reasonable operation plans, reduce energy consumption and improve system efficiency. Wide applicability: It can be extended to power prediction tasks in other fields, such as HVAC systems, industrial energy consumption management, etc. The method and model structure of the present invention are universal and can be applied to power prediction tasks in other fields.
[0086] Figure 5 A block diagram of a cooling station power prediction device provided in another embodiment of the present invention.
[0087] The embodiment of the present invention provides a cooling station power prediction device 500, see Figure 5 The cooling station power prediction device 500 includes: an acquisition module 510 , a first processing module 520 , a first integration module 530 , a first extraction module 540 , and a first prediction module 550 .
[0088] Exemplarily, the acquisition module 510 is configured to acquire historical power data and external variable data of the cooling station, wherein the external variable data includes historical data and future data.
[0089] Exemplarily, the first processing module 520 is configured to perform data encoding on the external variable data according to the data type of the external variable data to obtain encoded external variable data.
[0090] Illustratively, the first integration module 530 is configured to perform data integration on the cooling station historical power data and the encoded external variable data to obtain a target vector.
[0091] Exemplarily, the first extraction module 540 is used to perform feature extraction on the target vector to obtain time series feature data.
[0092] Exemplarily, the first prediction module 550 is configured to perform prediction based on time series characteristic data to obtain a cooling station power prediction result.
[0093] Exemplarily, the first processing module 520 is also used to encode the external variable data according to the data type of the external variable data to obtain the encoded external variable data, including: when the data type of the external variable data is a discrete type, encoding the external variable data to obtain the encoded external variable data; the method also includes: when the data type of the external variable data is a continuous type, using the numerical value of the external variable data as the encoded external variable data.
[0094] Exemplarily, the first processing module 520 is also used for external variable data including at least one of weather data, cold station operation plan data, time data, and people flow data, the data type of weather data is continuous type; the data type of operation plan data, time data, and people flow data is discrete type; data encoding is performed on the external variable data to obtain encoded external variable data, including: embedded encoding of the operation plan data, time data, and people flow data respectively to obtain encoded external variable data; periodic encoding of time data, and / or, scale-uniform encoding of time data by interpolation or downsampling methods to obtain encoded external variable data.
[0095] Exemplarily, the first processing module 520 is also used to perform embedded encoding on the operation plan data, time data, and crowd flow data respectively to obtain the encoded external variable data, including: mapping the operation plan data, time data, and crowd flow data respectively into the continuous variable space to obtain the encoded external variable data.
[0096] Exemplarily, the first processing module 520 is also used to encode the time data in a sine function manner to obtain a first variable; encode the time data in a cosine function manner to obtain a second variable; and combine the first variable and the second variable to obtain encoded external variable data.
[0097] Exemplarily, the cold station power prediction method is applied to a power prediction model, which includes an input layer, a long short-term memory network LSTM layer, a fully connected layer and an output layer, wherein: the input layer is used to encode the external variable data according to the data type of the external variable data to obtain the encoded external variable data, and to integrate the historical power data of the cold station and the encoded external variable data to obtain a target vector, wherein the external variable data includes historical data and future data; the long short-term memory network LSTM layer is used to extract features from the target vector to obtain time series feature data; the fully connected layer is used to make predictions based on the time series feature data to obtain the cold station power prediction results; the output layer is used to output the cold station power prediction results.
[0098] Exemplarily, the power prediction model includes an attention mechanism for dynamically adjusting the weights of external variable data in a target vector.
[0099] Exemplarily, the power prediction model includes a loss function, which is used to measure the deviation between the cold station power prediction result and the true value when training the power prediction model, wherein the loss function includes a regularization term.
[0100] Illustratively, weather data includes temperature and humidity; historical data corresponding to the cooling station operation plan includes historical startup operations, historical shutdown operations, and historical set values of water supply temperature of cooling station equipment; and time data includes holiday data.
[0101] It can be understood that for the detailed description of the cooling station power prediction device 500 , reference can be made to the above description of the cooling station power prediction method, which will not be repeated here.
[0102] Figure 6 A block diagram of an electronic device provided in accordance with another embodiment of the present invention.
[0103] An embodiment of the present application provides an electronic device including a memory and a processor, wherein the memory stores a computer program, and the processor implements the above method when executing the computer program.
[0104] like Figure 6 As shown, for ease of understanding, the embodiment of the present application shows a specific electronic device 600.
[0105] The electronic device 600 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are intended to be examples only and are not intended to limit implementations of the present disclosure described and / or claimed herein.
[0106] like Figure 6 As shown, the device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. Various programs and data required for the operation of the electronic device 600 can also be stored in the RAM 603. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0107] Multiple components in the electronic device 600 are connected to the I / O interface 605, including an input unit 606, such as a keyboard, a mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a magnetic disk, an optical disk, etc.; and a communication unit 609, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 609 allows the electronic device 600 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0108] The computing unit 601 can be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 601 performs the various methods described above. For example, in some embodiments, any one or more of the above-described methods can be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 608. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of any one or more of the various methods described above can be performed. Alternatively, in other embodiments, the computing unit 601 can be configured to perform any one or more of the above-described methods by any other appropriate means (e.g., by means of firmware).
[0109] An embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the method of any one of the above embodiments are implemented.
[0110] It should be noted that the logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing the logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, apparatus, or device (e.g., a computer-based system, a system including a processor, or other system that can fetch and execute instructions from an instruction execution system, apparatus, or device), or in conjunction with such instruction execution system, apparatus, or device. For purposes of the present invention, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transmit a program for use by an instruction execution system, apparatus, or device, or in conjunction with such instruction execution system, apparatus, or device. More specific examples (non-exhaustive list) of computer-readable media include the following: an electrical connection portion having one or more wires (electronic device), a portable computer disk cartridge (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and programmable read-only memory (EPROM or flash memory), fiber optic devices, and portable compact disc read-only memory (CDROM). Furthermore, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing it in another suitable manner if necessary, and then storing it in a computer memory.
[0111] It should be understood that various parts of the present invention can be implemented using hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0112] In the description of the present invention, reference to terms such as "one embodiment," "some embodiments," "examples," "specific examples," or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In the present invention, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
[0113] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential" and the like to indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as limiting the present invention.
[0114] In addition, the terms "first" and "second" used in the embodiments of the present invention are only used for descriptive purposes and should not be understood as indicating or implying relative importance, or implicitly indicating the number of technical features indicated in this embodiment. Therefore, the features defined by the terms "first" and "second" in the embodiments of the present invention can explicitly or implicitly indicate that the embodiment includes at least one of such features. In the description of the present invention, the word "plurality" means at least two or two or more, such as two, three, four, etc., unless otherwise clearly and specifically defined in the embodiments.
[0115] In the present invention, unless otherwise clearly specified or limited in the embodiments, the terms "installed," "connected," "connect," and "fixed" appearing in the embodiments should be understood in a broad sense. For example, the connection may be a fixed connection, a detachable connection, or an integral connection. It can also be a mechanical connection, an electrical connection, etc.; of course, it can also be a direct connection, or an indirect connection through an intermediate medium, or it can be internal communication between two elements, or an interaction between two elements. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood based on the specific implementation.
[0116] In the present invention, unless otherwise expressly specified or limited, when a first feature is "above" or "below" a second feature, it may mean that the first and second features are in direct contact, or that the first and second features are in indirect contact through an intermediary. Furthermore, when a first feature is "above," "above," or "above" a second feature, it may mean that the first feature is directly above or diagonally above the second feature, or simply means that the first feature is at a higher level than the second feature. When a first feature is "below," "below," or "below" a second feature, it may mean that the first feature is directly below or diagonally below the second feature, or simply means that the first feature is at a lower level than the second feature.
[0117] Although the embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are illustrative and are not to be construed as limitations on the present invention. A person skilled in the art may change, modify, replace and modify the above embodiments within the scope of the present invention.
Claims
1. A cooling station power prediction method, characterized in that: The method comprises: Acquiring historical power data and external variable data of the cooling station, wherein the external variable data includes historical data and future data; encoding the external variable data according to the data type of the external variable data to obtain encoded external variable data; Performing data integration on the cooling station historical power data and the encoded external variable data to obtain a target vector; Performing feature extraction on the target vector to obtain time series feature data; A prediction is performed based on the time series characteristic data to obtain a cooling station power prediction result.
2. The method according to claim 1, characterized in that The step of encoding the external variable data according to the data type of the external variable data to obtain the encoded external variable data includes: When the data type of the external variable data is a discrete type, encoding the external variable data to obtain encoded external variable data; The method further includes: when the data type of the external variable data is a continuous type, using the value of the external variable data as the encoded external variable data.
3. The method according to claim 2, characterized in that The external variable data includes at least one of weather data, cold station operation plan data, time data, and people flow data, wherein the data type of the weather data is continuous; the data types of the operation plan data, the time data, and the people flow data are discrete; The step of encoding the external variable data to obtain the encoded external variable data includes: Performing embedded coding on the operation plan data, the time data, and the people flow data to obtain coded external variable data; The time data is periodically encoded, and / or the time data is scale-uniformly encoded by an interpolation or downsampling method to obtain encoded external variable data.
4. The method according to claim 3, characterized in that The operation plan data, the time data, and the people flow data are respectively embedded-encoded to obtain encoded external variable data, including: The operation plan data, the time data, and the people flow data are respectively mapped into a continuous variable space to obtain encoded external variable data.
5. The method according to claim 3, characterized in that The periodic encoding includes a sine function method and a cosine function method. The periodic encoding of the time data to obtain the encoded external variable data includes: Encoding the time data in a sinusoidal function manner to obtain a first variable; Encoding the time data in a cosine function manner to obtain a second variable; The first variable and the second variable are combined to obtain encoded external variable data.
6. The method according to claim 1, characterized in that The method is applied to a power prediction model, characterized in that the power prediction model includes an input layer, a long short-term memory network (LSTM) layer, a fully connected layer, and an output layer, wherein: The input layer is configured to encode the external variable data according to a data type of the external variable data to obtain encoded external variable data, and to integrate the cooling station historical power data and the encoded external variable data to obtain a target vector, wherein the external variable data includes historical data and future data; The long short-term memory network (LSTM) layer is used to extract features from the target vector to obtain time series feature data; The fully connected layer is used to make predictions based on the time series feature data to obtain a cooling station power prediction result; The output layer is used to output the cooling station power prediction result.
7. The method according to claim 6, characterized in that The power prediction model includes an attention mechanism for dynamically adjusting the weight of external variable data in a target vector.
8. The method according to claim 7, characterized in that The power prediction model includes a loss function, which is used to measure the deviation between the cold station power prediction result and the true value when training the power prediction model, wherein the loss function includes a regularization term.
9. The method according to claim 3, characterized in that: The weather data includes temperature and humidity; The historical data corresponding to the cooling station operation plan includes historical startup operations, historical shutdown operations, and historical set values of the cooling station equipment's water supply temperature; The time data includes holiday data.
10. A cooling station power prediction device, characterized in that: The device comprises: An acquisition module, configured to acquire historical power data of the cooling station and external variable data, wherein the external variable data includes historical data and future data; a first processing module, configured to perform data encoding on the external variable data according to a data type of the external variable data to obtain encoded external variable data; A first integration module is configured to integrate the cooling station historical power data and the encoded external variable data to obtain a target vector; A first extraction module is used to extract features from the target vector to obtain time series feature data; The first prediction module is used to perform prediction based on the time series characteristic data to obtain a cooling station power prediction result.
11. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 9 are implemented.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Multi-dimensional short-term power load prediction method based on improved K-means clustering CCA-BiLSTM
CN114358185A
Photovoltaic power generation power prediction method and device, computer equipment and storage medium
CN117318026A
Power prediction method, electronic equipment and storage medium
CN117807402A
Power consumer adjustable resource adjustment boundary prediction method and device based on deep learning
CN118350565A
Quantum-based photovoltaic ultra-short-term power prediction method
CN119338039A