Cold station power prediction method, device, equipment and medium
By integrating historical power data of cooling plants with various external variables, and using LSTM models and attention mechanisms to optimize cooling plant power prediction, the problem of underutilization of external variables in existing technologies is solved, and higher accuracy power prediction and optimized control are achieved.
Patent Information
- Application Number
- CN202510375569.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-27
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2045-03-27
AI Technical Summary
Existing methods for predicting cooling plant power do not fully consider external variables, resulting in low prediction accuracy and difficulty in meeting practical application requirements.
By acquiring historical power data of the cooling station and various external variable data, including weather, operation plan, time and pedestrian flow data, the data is encoded and integrated. The Long Short-Term Memory (LSTM) network model is used for feature extraction and prediction, and the model is optimized by combining attention mechanism and loss function.
It significantly improves the accuracy of power prediction for cooling plants, enhances the adaptability and robustness of the model, provides reliable data support for optimized control of cooling plants and power load regulation, reduces energy consumption and improves system efficiency.
Smart Images

Figure CN120497872B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical fields of energy management, artificial intelligence, etc., and particularly relates to a cold station power prediction method and device, equipment and medium. BACKGROUND
[0002] Cold station power prediction has important applications in energy management and optimal control, such as optimal control of cold stations and power demand side load response. Accurate power prediction can help reduce energy consumption, improve system efficiency, and provide support for power grid dispatching. The cold station power prediction method of the related art usually only considers the data generated by the cold station itself for prediction, resulting in low cold station power prediction accuracy and accuracy, which is difficult to meet the actual application requirements. SUMMARY
[0003] The embodiments of the present application aim to at least solve one of the technical problems in the related art. To this end, one object of the present application is to provide a cold station power prediction method, device, equipment and medium, which improves the cold station power prediction accuracy and accuracy.
[0004] The embodiments of the present application provide a cold station power prediction method, which comprises: obtaining cold station historical power data and external variable data, wherein the external variable data includes historical data and future data; according to the data type of the external variable data, data encoding is performed on the external variable data to obtain encoded external variable data; data integration is performed on the cold station historical power data and the encoded external variable data to obtain a target vector; feature extraction is performed on the target vector to obtain time series feature data; and prediction is performed based on the time series feature data to obtain a cold station power prediction result.
[0005] Exemplarily, according to the data type of the external variable data, data encoding is performed on the external variable data to obtain encoded external variable data, which comprises: in the case that the data type of the external variable data is discrete type, data encoding is performed on the external variable data to obtain encoded external variable data; the method further comprises: in the case that the data type of the external variable data is continuous type, the numerical value of the external variable data is taken 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, the data type of the weather data is continuous type, the data types of the operation plan data, the time data, and the people flow data are discrete types, and the external variable data is encoded to obtain encoded external variable data, including: respectively embedding the operation plan data, the time data, and the people flow data to obtain the encoded external variable data; periodically encoding the time data, and / or, performing scale uniform encoding on the time data by an interpolation or down-sampling method to obtain the encoded external variable data.
[0007] Exemplarily, the operation plan data, the time data, and the people flow data are respectively embedded to obtain the encoded external variable data, including: respectively mapping the operation plan data, the time data, and the people flow data to a continuous variable space to obtain the encoded external variable data.
[0008] Exemplarily, the periodic encoding includes a sine function mode and a cosine function mode, the time data is periodically encoded to obtain the encoded external variable data, including: encoding the time data according to the sine function mode to obtain a first variable; encoding the time data according to the cosine function mode to obtain a second variable; and 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, the power prediction model includes an input layer, a long short-term memory (LSTM) layer, a full connection layer, and an output layer, wherein: the input layer is configured to encode external variable data according to a data type of the external variable data to obtain encoded external variable data, and integrate cold 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 LSTM layer is configured to extract features of the target vector to obtain time series feature data; the full connection layer is configured to predict based on the time series feature data to obtain a cold station power prediction result; and the output layer is configured to output the cold station power prediction result.
[0010] Exemplarily, the power prediction model includes an attention mechanism, and the attention mechanism is configured to dynamically adjust weights of the external variable data in the target vector.
[0011] Exemplarily, the power prediction model includes a loss function, and the loss function is configured to measure a deviation between the cold station power prediction result and a true value when training the power prediction model, wherein the loss function includes a regularization term.
[0012] Exemplarily, the weather data includes temperature and humidity; the historical data corresponding to the operation plan of the cold station includes historical start operation of the cold station equipment, historical shutdown operation, and historical water supply temperature setting value of the cold station equipment; and the time data includes holiday data.
[0013] Another embodiment of the present application provides a cold station power prediction device, which comprises: an acquisition module, configured to acquire cold station historical power data and external variable data, wherein the external variable data includes historical data and future data; a first processing module, configured to perform data coding on the external variable data according to the data type of the external variable data, to obtain coded external variable data; a first integration module, configured to perform data integration on the cold station historical power data and the coded external variable data, to obtain a target vector; a first extraction module, configured to perform feature extraction on the target vector, to obtain time series feature data; and a first prediction module, configured to perform prediction based on the time series feature data, to obtain a cold station power prediction result.
[0014] An electronic device is provided in an embodiment of the present application, which comprises a memory and a processor, the memory stores a computer program, and the processor implements the steps of the method of any of the above embodiments when executing the computer program.
[0015] A computer readable storage medium is provided in an embodiment of the present application, which stores a computer program, and the computer program implements the steps of the method of any of the above embodiments when executed by a processor.
[0016] In the above embodiment, the cold station power prediction method comprises: acquiring cold station historical power data and external variable data, wherein the external variable data includes historical data and future data; performing data coding on the external variable data according to the data type of the external variable data, to obtain coded external variable data; performing data integration on the cold station historical power data and the coded external variable data, to obtain a target vector; performing feature extraction on the target vector, to obtain time series feature data; and performing prediction based on the time series feature data, to obtain a cold station power prediction result. This way makes full use of the external variable data by integrating weather data, operation plan data, time data, and people flow data, and respectively coding the external variable data of different time scales, thereby improving the cold station power prediction accuracy, and providing reliable data support for cold station optimization control and power load adjustment, helping to reduce energy consumption, improve system efficiency, and provide support for power grid dispatching.
[0017] Additional aspects and advantages of the present application will be made apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0018] Figure 1A flowchart of a cold station power prediction method provided for an embodiment of the present application is shown in FIG. 1.
[0019] Figure 2 A first time period cold station power prediction effect comparison chart provided for an embodiment of the present application is shown in FIG. 2.
[0020] Figure 3 A second time period cold station power prediction effect comparison chart provided for an embodiment of the present application is shown in FIG. 3.
[0021] Figure 4 A third time period cold station power prediction effect comparison chart provided for an embodiment of the present application is shown in FIG. 4.
[0022] Figure 5 A block diagram of a cold station power prediction device provided for another embodiment of the present application is shown in FIG. 5.
[0023] Figure 6 A block diagram of an electronic device provided for another embodiment of the present application is shown in FIG. 6. DETAILED DESCRIPTION
[0024] Embodiments of the present application are described in detail below with reference to the accompanying drawings, examples of which are shown in the drawings, wherein the same or similar notations represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to explain the present application, and cannot be understood as limiting the present application.
[0025] Cold station power prediction has important applications in energy management and optimal control, such as optimal control of cold stations and power demand side load response. Accurate power prediction can help reduce energy consumption, improve system efficiency, and provide support for power grid dispatching.
[0026] Related art cold station power prediction research mainly focuses on prediction methods based on time series data, such as Autoregressive Integrated Moving Average (ARIMA), Support Vector Machine (SVM), and neural networks. However, these methods have the following defects:
[0027] (1) External variables are not fully considered: related methods mainly rely on historical power data and do not systematically introduce various external variables such as weather, operation plans, holiday information, etc. These external variables have a significant impact on cold station power, and ignoring them will lead to inaccurate prediction results.
[0028] (2) Untreated mixed external variables: External variables have different time scales and types (such as continuous temperature and discrete operation plan), and related methods lack unified coding and integration of these variables. This makes it difficult for the model to capture the complete impact of these variables on the power of the cold station when processing these variables.
[0029] (3) Limited prediction accuracy: Due to the lack of consideration of the dynamic impact of external variables, the prediction accuracy is difficult to meet the actual application requirements. Especially in the case of large changes in external variables, the prediction performance of the model will decrease significantly.
[0030] External variables include weather and weather forecast information: such as temperature, humidity, etc., which directly affect the load demand of the cold station, and high temperature and high humidity weather will increase the power of the cold station; including future operation plans: such as turning on / off the refrigerator, adjusting the water supply temperature, etc., the change of operation plan will directly affect the power consumption of the cold station; including time information: such as weekdays and holidays, the load demand of the cold station on weekdays and holidays is significantly different, and the load is usually lower on holidays; including indoor flow monitoring and prediction information: the change of the flow will affect the indoor temperature, and then affect the power demand of the cold station.
[0031] External variables have a significant impact on the load demand of the cold station, but related methods fail to fully utilize these information, resulting in insufficient prediction accuracy. How to fully utilize these external variables, especially in the future period, some external variables can be predicted in advance, such as weather forecast, operation plan, etc., to improve the prediction accuracy, is a problem to be solved. However, these external variable data have great differences, some are continuous variables, such as temperature and humidity of weather forecast, some are discrete variables, such as holidays or on / off plan, and there are differences in time scale, which poses a challenge to the integration of these variables into the prediction model.
[0032] Therefore, the embodiment of the present application proposes a cold station power prediction method, which fully considers various external variables and improves the prediction accuracy and accuracy of the cold station power.
[0033] Figure 1 The cold station power prediction method flowchart provided by the embodiment of the present application.
[0034] As shown in the cold station power prediction method 100, the cold station power prediction method 100 includes steps S110-S150. Figure 1
[0035] Step S110, obtaining cold station historical power data and external variable data, wherein the external variable data includes historical data and future data.
[0036] Exemplarily, the historical power data is collected, such as collecting the power time series of the cold station in the past period of time, as the historical power data; the external variable data is collected, such as including weather and weather forecast information: such as outdoor humidity and humidity, inputting the historical record of the weather, and obtaining real-time and future weather data through a weather station or a weather forecast API (Application Programming Interface); the operation plan: such as the cold station equipment on / off history, the water supply temperature set value history, etc., and the future operation plan can be provided by the cold station operator; the time information: through the calendar or holiday arrangement, the historical and future time information is obtained; the indoor flow monitoring and prediction information: through the indoor sensor or flow prediction model, the real-time and future flow prediction is obtained, etc.
[0037] In step S120, the external variable data is encoded according to the data type of the external variable data, and the encoded external variable data is obtained.
[0038] Exemplarily, the data type can be continuous variable, discrete variable, etc., the continuous variable in the external variable data is temperature, humidity, etc., the discrete variable is operation plan, holiday time information, flow information, etc., and different data types are encoded respectively, the discrete variable encoding mode is one-hot encoding, binary encoding, etc., and the continuous variable encoding mode is normalization, etc.
[0039] In step S130, the cold station historical power data and the encoded external variable data are integrated, and the target vector is obtained.
[0040] Exemplarily, the cold station historical power data and the encoded external variable data are spliced to obtain a unified target vector, the target vector is input into the power prediction model, and the power prediction model includes a long short-term memory network (LSTM).
[0041] In step S140, the target vector is feature extracted, and the time series feature data is obtained.
[0042] Exemplarily, the LSTM layer of the long short-term memory network (LSTM) extracts the features of the target vector, controls the flow of input information based on the internal forget gate, input gate and output gate, and captures the long-term dependence relationship in the time series.
[0043] In step S150, the time series feature data is predicted, and the cold station power prediction result is obtained.
[0044] Exemplarily, a full connection layer of a Long Short-Term Memory (LSTM) network maps an output of an LSTM layer to a predicted value, and the full connection layer converts the output of the LSTM layer into a cold station power prediction result through a linear transformation. The cold station power prediction result is output by an output layer of the Long Short-Term Memory (LSTM) network, and includes a cold station power prediction result in a future period of time, which can be an hourly, daily or weekly prediction result, and is determined according to actual requirements.
[0045] According to an embodiment of the present application, by integrating weather data, operation plan data, time data, and people flow data, various external variable data are encoded respectively according to different time scales, so that the external variable data is fully utilized, the cold station power prediction accuracy is improved, and reliable data support is provided for cold station optimization control and power load regulation, which helps to reduce energy consumption, improve system efficiency, and provide support for power grid dispatching.
[0046] According to the data type of the external variable data, the external variable data is encoded to obtain encoded external variable data, including: in the case that the data type of the external variable data is discrete, the external variable data is encoded to obtain the encoded external variable data; the method further includes: in the case that the data type of the external variable data is continuous, the numerical value of the external variable data is taken as the encoded external variable data.
[0047] For example, for continuous external variable data such as temperature and humidity, they are directly input into the LSTM model as numerical values without additional processing. For discrete external variable data, it is 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, the data type of the weather data is continuous, the data type of the operation plan data, the time data, and the people flow data is discrete, the external variable data is encoded to obtain encoded external variable data, including: the operation plan data, the time data, and the people flow data are respectively embedded and encoded to obtain the encoded external variable data; the time data is periodically encoded, and / or the time data is uniformly encoded in scale by an interpolation or down-sampling method to obtain the encoded external variable data.
[0049] Specifically, the weather data includes temperature and humidity; the historical data corresponding to the cold station operation plan includes historical start operation of the cold station equipment, historical shutdown operation, and historical water supply temperature setting value of the cold station equipment; and the time data includes holiday data. The embedded coding of the operation plan data, the time data, and the people flow data includes coding by using an embedding layer. The embedding layer is used to map discrete external variables to a continuous space, and the embedding layer can learn a low-dimensional representation of the discrete variables, thereby improving the processing capability of the model for the discrete variables. Periodic coding (such as a sine / cosine function) is used to represent hour, week, and the like. The same time scale is unified by interpolation or down-sampling methods. For example, if the time scale of the weather forecast data is inconsistent with that of the power data, the interpolation method can be used to convert the weather forecast data to the time scale of the power data.
[0050] The interpolation method is a method for estimating unknown data points according to known data points, and is used to fill data between given time scales, so that data of different time scales can be unified to a target time scale. The down-sampling method is used to reduce the time resolution of data by reducing the number of data points, and is used to convert high-time-resolution data into low-time-resolution data to match other data of a coarser time scale. For example, meteorological data of each hour can be down-sampled to data of each day, and the average value of 24 hours of data in a day can be calculated as a representative value of the day.
[0051] In the above embodiment, the scale-unified coding of the time data by using the interpolation or down-sampling method can fill in missing values, more intuitively show the change trend of the data, and by selecting a part of the data for analysis through down-sampling, storage resources and computing time can be saved.
[0052] The embedding coding of the operation plan data, the time data, and the people flow data is performed to obtain the coded external variable data, including: mapping the operation plan data, the time data, and the people flow data to a continuous variable space to obtain the coded external variable data.
[0053] Embedding encoding is a data representation method widely used in machine learning and deep learning, and plays an important role especially in processing discrete data (such as words in text, category labels, etc.). It maps high-dimensional sparse discrete data into low-dimensional dense continuous vectors. The core idea of embedding encoding is to learn a fixed-dimensional vector representation for each discrete element (such as a word, a category, etc.), which is 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 features are closer in distance.
[0054] An embedding layer can be seen as a learnable lookup table. Suppose we have a vocabulary containing V different discrete elements (e.g., words) and we want to map each element to a d-dimensional vector space. An 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 an 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, i.e., the embedding vector e i .
[0055] Exemplarily, the periodic encoding includes a sine function mode and a cosine function mode, and the periodic encoding of the time data obtains the encoded external variable data, including: encoding the time data according to the sine function mode to obtain a first variable; encoding the time data according to the cosine function mode to obtain a second variable; and combining the first variable and the second variable to obtain the encoded external variable data.
[0056] For example, the periodic encoding (such as the sine / cosine function) is used to represent the hour, week and the like. For example, for the hour information, the sine and cosine functions can be used to encode 24 hours into two continuous variables (i.e., a first variable and a second variable) to capture the periodic characteristics of time, wherein the first variable is a sine value and the second variable is a cosine value, and the sine value and the cosine value form a vector to encode the periodic time data.
[0057] The periodic function (such as the sine and cosine functions) has the characteristic of periodic repetition, and their values change cyclically in a fixed period. With this characteristic, the periodic data can be mapped into a period of the sine and cosine functions. For the data with a period T, the sine encoding is shown in formula (1) and the cosine encoding is shown in formula (2):
[0058]
[0059] wherein x is the value of the current data point and T is the period of the data.
[0060] Different periodic data has different periods, for example, for the hour, there are 24 hours in a day, so the period T=24; for the week, there are 7 days in a week, so the period T=7; for the month, there are 12 months in a year, so the period T=12. For each data point x, the sine and cosine encoding values are calculated according to the above formulas, and the calculated sine and cosine encoding values are taken as the encoded external variable data.
[0061] In the above embodiments, the time data is encoded in a periodic encoding manner, avoiding the occurrence of discontinuity problems, enabling the learning of smoother functions, reducing the over-reliance on specific data points, thereby reducing the risk of overfitting, and since low-dimensional data requires less memory and computing resources in the calculation process, the calculation efficiency can be improved.
[0062] The cold station power prediction method is applied to a power prediction model, which includes an input layer, a long short-term memory (LSTM) layer, a full connection layer, and an output layer. The input layer is used to encode external variable data according to its data type, obtain encoded external variable data, and integrate cold station historical power data and encoded external variable data to obtain a target vector, wherein the external variable data includes historical data and future data. The LSTM layer is used to extract features from the target vector to obtain time series feature data. The full connection layer is used to make predictions based on the time series feature data to obtain cold station power prediction results. The output layer is used to output the cold station power prediction results.
[0063] The power prediction model may, for example, include a Long Short-Term Memory (LSTM), which is a special type of Recurrent Neural Network (RNN) that can learn long-term dependencies and effectively solve the gradient vanishing or gradient exploding problems that occur when traditional RNNs process long sequences.
[0064] Input layer: receives historical power data and encoded external variable data. The input layer concatenates these data into a unified vector (target vector) as the input of the LSTM layer.
[0065] LSTM layer: extracts time series features and makes predictions in combination with external variable data. The LSTM layer controls the flow of information through its internal forget gate, input gate, and output gate, thereby capturing long-term dependencies in 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, responsible for passing information between time steps. The state C t of the memory cell can remain unchanged across multiple time steps, thus preserving long-term information. Through the gating mechanism, LSTM can selectively update or forget information in the memory cell.
[0067] The main role of the forget gate is to determine how much information in the previous cell state C t-1 needs to be forgotten. When processing sequential data, some information may become irrelevant as time steps progress. The forget gate can help the model selectively discard this information, preventing it from interfering with subsequent calculations. The input gate is primarily responsible for determining how much information in the current input x t needs to be added to the cell state. At the same time, it generates a candidate cell state for updating the current cell state. The output gate is used to determine how much information in the current cell state C t needs to be output to the hidden state ht of the current time step.
[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 input data, effectively capturing long-term dependencies in sequential 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. The forget gate, input gate, and output gate collectively ensure the performance of LSTM 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 a cold station power prediction result through linear transformation.
[0070] Output layer: generates future cold station power prediction results. The output layer outputs the model's prediction of cold station power over a future period of time.
[0071] In the above embodiment, an LSTM (Long Short-Term Memory) model is used to integrate historical data and external variables for prediction. The LSTM model can capture long-term dependencies in time series and flexibly handle multiple external variables, improving 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, highlighting the impact of important variables. It can dynamically adjust the influence of different external variables on the prediction result, thereby improving the prediction accuracy of the model.
[0074] LSTM (Long Short-Term Memory) is a special type of recurrent neural network that can handle long-term dependencies in sequential data. The attention mechanism allows the model to automatically focus on the importance of different parts of the sequence when processing the sequence. Combining LSTM with attention mechanism can further improve the performance of the model on sequence tasks.
[0075] The attention mechanism provides the model with the ability to dynamically focus on different position information in the sequence. At each time step, the attention mechanism calculates the importance weight of each position in the sequence according to the current task and input, and then performs weighted summation on the sequence information according to these weights to obtain the context vector of the current time step. This context vector can contain key information of different positions in the sequence, which helps 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 attention scores: calculate the attention score of each time step according to the hidden state of the current time step and the hidden state of all time steps. Calculate attention weights: normalize the attention scores through the softmax function to obtain the attention weights of each time step. Calculate context vector: weight the hidden states of all time steps according to the attention weights to obtain the context vector of the current time step. (3) Merge context vector and hidden state: merge (e.g., concatenate) the context vector and the hidden state of the current time step, and then input it to the subsequent fully connected layer for prediction.
[0077] The power prediction model includes a loss function for measuring 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, the present application adopts mean square error (MSE) as the 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, a regularization term (such as L2 regularization) can be introduced 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] The regularization methods include: (1) L1 regularization (Lasso regression): adding the sum of absolute values of model parameters as a regularization term in the loss function, suitable for scenarios that require feature selection. When there are a large number of features in the data set, and some features contribute less to the model, L1 regularization can be used to select important features. (2) L2 regularization (Ridge regression): adding the sum of squares of model parameters as a regularization term in the loss function, widely used in various models, especially in linear regression, logistic regression, neural networks, etc. It can effectively prevent model overfitting. (3) Dropout: In the training process, with a certain probability P, randomly "discard" (set to zero) part of the neurons in the network, so that the structure of the network 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 commonly used in deep learning models such as multi-layer perceptron (MLP), convolutional neural network (CNN), recurrent neural network (RNN), etc. Especially when dealing with large-scale data sets and complex models, it can effectively prevent overfitting. (4) Early stopping: In the model training process, the data set is divided into training set and validation set. After each training iteration, evaluate the model's performance on the validation set. When the performance on the validation set (such as loss function value) no longer improves, or even starts to decline, stop training and select the model parameters at this time 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 training data. For example, in image data, rotation, flipping, scaling, cropping, etc. can be performed; in text data, synonym replacement, insertion, deletion, etc. can be performed. (5) Batch normalization: Before each layer of the neural network, normalize the input data so that the mean 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 constraint: The norm of each neuron's weight vector 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 loss is the average of the square of the difference between the predicted value and the true value, which measures the average squared error between the predicted value and the true value. It is suitable for regression problems, such as time series prediction, stock price prediction, etc., and the goal is to predict a continuous numerical value. (2) Mean Absolute Error (MAE): Mean Absolute Error loss is the average of the absolute value of the difference between the predicted value and the true value, which measures the average absolute error between the predicted value and the true value. It is also suitable for regression problems, and compared to MSE, MAE is less sensitive to outliers because it does not square the error. (3) Cross Entropy Loss: Cross Entropy Loss is commonly used for classification problems, which measures the difference between two probability distributions. For multi-classification problems, the softmax function is usually used to convert the model's output into a probability distribution, and then the cross entropy loss is calculated. It is suitable for classification problems, such as text classification, image classification, etc. (4) Binary Cross Entropy Loss: Binary Cross Entropy Loss is a special case of Cross Entropy Loss for binary classification problems, which measures the difference between two binary probability distributions. It is suitable for binary classification problems, such as sentiment analysis (positive or negative), spam detection (yes or no), etc. In practical applications, the appropriate loss function needs to be selected according to the specific task type (regression or classification) to achieve the best training effect.
[0081] During training of the LSTM model, an appropriate optimizer is selected, such as using the Adam (Adaptive Moment Estimation) optimizer for training. At the same time, early stopping method (Early Stopping) can be considered to prevent overfitting. Early stopping method monitors the loss function value on the validation set, and stops training when the loss function value no longer decreases, thereby preventing model overfitting.
[0082] The data set used for training is: collecting historical power data of cold stations and corresponding external variable data. Ensure the quality and integrity of the data, eliminate outliers and missing values. Divide the training set, validation set and test set to ensure the rationality of the data distribution. Use cross-validation and other methods to evaluate the performance of the model and select the optimal model parameters.
[0083] Figure 2 The first time period cold station power prediction effect comparison chart provided by the embodiment of the present application; Figure 3 The second time period cold station power prediction effect comparison chart provided by the embodiment of the present application; Figure 4 The third time period cold station power prediction effect comparison chart provided by the embodiment of the present application;
[0084] As shown in Figure 2 , Figure 3 , Figure 4 The horizontal axis is the timestamp, and the vertical axis is the power prediction result. In the legend, "y" refers to the actual value of the cold station power; "LSTM" refers to the cold station power prediction result obtained by the LSTM model; "NHITS" stands for N-Hybrid Input-Output, which refers to the cold station power prediction result obtained by another time series prediction model. The input of the LSTM power prediction model is power, and the external variables are weather, outdoor temperature, outdoor humidity, and operation on-off plan. It can be seen that in the case of using external variables, the LSTM curve is closer to the actual value of the cold station power, and the prediction accuracy is significantly improved, and the mean square error (MSE) is reduced by about 40%.
[0085] The cold station power prediction method provided by the present application significantly improves the accuracy of cold station power prediction by comprehensively considering multiple hybrid external variables. The specific effects include: improving the prediction accuracy: by introducing multiple external variables and improving the model structure, the present application can more accurately predict the cold station power, and compared with the traditional method, the prediction error is reduced by more than 20% in typical scenarios; enhancing the robustness of the model: being able to adapt to the dynamic changes of different external variables, the present application 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 decision: providing reliable data support for cold station optimization control and power load regulation, accurate power prediction can help cold station operators to make more reasonable operation plans, reduce energy consumption and improve system efficiency. Wide applicability: can be popularized to power prediction tasks in other fields, such as heating, ventilation and air conditioning systems, industrial energy management, etc. The method and model structure of the present application have universality and can be applied to power prediction tasks in other fields.
[0086] Figure 5 Another embodiment of the present application provides a cold station power prediction device block diagram.
[0087] The present application provides a cold station power prediction device 500, please refer to Figure 5 The cold station power prediction device 500 comprises: 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 cold station historical power data and external variable data, wherein the external variable data comprises historical data and future data.
[0089] The first processing module 520 is configured to encode the external variable data according to a data type of the external variable data, to obtain encoded external variable data.
[0090] The first integration module 530 is configured to integrate the cold station historical power data and the encoded external variable data, to obtain a target vector.
[0091] The first extraction module 540 is configured to extract features of the target vector, to obtain time series feature data.
[0092] The first prediction module 550 is configured to perform prediction based on the time series feature data, to obtain a cold station power prediction result.
[0093] The first processing module 520 is further configured to encode the external variable data according to a data type of the external variable data, to obtain encoded external variable data, including: in a case where the data type of the external variable data is discrete, encoding the external variable data to obtain the encoded external variable data; and the method further includes: in a case where the data type of the external variable data is continuous, taking a numerical value of the external variable data as the encoded external variable data.
[0094] The first processing module 520 is further configured to encode the external variable data to obtain the encoded external variable data, including: embedding and encoding the operation plan data, the time data, and the people flow data respectively, to obtain the encoded external variable data; periodically encoding the time data, and / or performing scale-unified encoding on the time data by an interpolation or down-sampling method, to obtain the encoded external variable data.
[0095] The first processing module 520 is further configured to embed and encode the operation plan data, the time data, and the people flow data respectively, to obtain the encoded external variable data, including: mapping the operation plan data, the time data, and the people flow data into a continuous variable space respectively, to obtain the encoded external variable data.
[0096] The first processing module 520 is further configured to encode the time data according to a sine function mode, to obtain a first variable; encode the time data according to a cosine function mode, to obtain a second variable; and combine the first variable and the second variable, to obtain the encoded external variable data.
[0097] Exemplarily, the cold station power prediction method is applied to a power prediction model, the power prediction model comprising an input layer, a long short-term memory (LSTM) layer, a full connection layer, and an output layer, wherein: the input layer is configured to encode external variable data according to a data type of the external variable data to obtain encoded external variable data, and integrate cold station historical power data and the encoded external variable data to obtain a target vector, wherein the external variable data comprises historical data and future data; the LSTM layer is configured to extract features of the target vector to obtain time series feature data; the full connection layer is configured to predict based on the time series feature data to obtain a cold station power prediction result; and the output layer is configured to output the cold station power prediction result.
[0098] Exemplarily, the power prediction model comprises an attention mechanism, the attention mechanism being configured to dynamically adjust weights of the external variable data in the target vector.
[0099] Exemplarily, the power prediction model comprises a loss function, the loss function being configured to measure a deviation between the cold station power prediction result and a true value when training the power prediction model, wherein the loss function comprises a regularization term.
[0100] Exemplarily, the weather data comprises temperature and humidity; the historical data corresponding to the cold station operation plan comprises historical start-up operations, historical shutdown operations, and historical water supply temperature set values of the cold station equipment; and the time data comprises holiday data.
[0101] It can be understood that the specific description of the cold station power prediction device 500 can refer to the description of the cold station power prediction method in the foregoing, and will not be repeated here.
[0102] Figure 6 An electronic device block diagram is provided for another embodiment of the present application.
[0103] The embodiment of the present application provides an electronic device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the method described above when executing the computer program.
[0104] As shown in Figure 6 , in order to facilitate understanding, the embodiments of the present application show a specific electronic device 600.
[0105] Electronic device 600 is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not intended to limit the implementations of the present disclosure described and / or claimed in this document.
[0106] As shown in Figure 6 Device 600 includes a computing unit 601 that can perform various suitable actions and processes in accordance with computer programs stored in a read-only memory (ROM) 602 or computer programs loaded into a random access memory (RAM) 603 from a storage unit 608. Various programs and data required by electronic device 600 for operation can also be stored in RAM 603. Computing unit 601, ROM 602, and RAM 603 are connected to one another via a bus 604. An input / output (I / O) interface 605 is also connected to bus 604.
[0107] Various components in electronic device 600 are connected to I / O interface 605, including an input unit 606, such as a keyboard, mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a magnetic disk, optical disk, etc.; and a communication unit 609, such as a network card, modem, wireless communication transceiver, etc. Communication unit 609 allows electronic device 600 to exchange information / data with other devices via computer networks, such as the Internet, and / or various telecommunication networks.
[0108] The computing unit 601 can be various general and / or special purpose 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 specialized artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 601 performs the various methods described above. For example, in some embodiments, any one or more of the various methods described above can be implemented as a computer software program tangibly embodied in a machine readable medium, such as the storage unit 608. In some embodiments, portions or all of the computer program can be loaded and / or installed onto the electronic device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded onto 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 various methods described above by other any appropriate means, such as by way of firmware.
[0109] An embodiment of the present application provides a computer readable storage medium, having stored thereon a computer program, which when executed by a processor implements the steps of the method of any of the above embodiments.
[0110] It is to be appreciated that the above description and the examples that follow are intended to be illustrative only and that changes can be made to the description, as represented by the above listed elements, by the steps recited in the flow charts, and by the examples that follow, without departing from the spirit of the application. Accordingly, the scope of the present application is intended to be defined only by the appended claims, and by their equivalents.
[0111] It should be understood that aspects of the application can be implemented in hardware, software, firmware or a combination thereof. In the above embodiments, various steps or methods can be implemented in software or firmware that is stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any of the following techniques, which are well known in the art of hardware implementation, can be used: a hybrid of the above techniques, a mixture of two or more of the above techniques, or a combination of the above techniques with other techniques not listed above.
[0112] In the description of the present application, the use of the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" and the like is intended to indicate that a particular feature, structure, material, or characteristic that follows the term is included in at least one embodiment or example of the present application. Such assertions are not necessarily limiting of any single embodiment or example. Further, using these terms does not necessitate that all embodiments or examples include the recited feature, structure, material or characteristic. For instance, an amo
[0113] In the description of the present application, it needs to be understood that the terms "center", "longitudinal", "transverse", "length", "width", "thickness", "upper", "lower", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", "axial", "radial", "circumferential" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, which are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as limiting the present application.
[0114] In addition, the terms "first", "second", and the like used in the embodiments of the present application are only for the purpose of description, and cannot be understood as indicating or implying relative importance, or implicitly indicating the number of technical features referred to in the embodiments. Therefore, the features defined with "first", "second" and the like in the embodiments of the present application can be explicitly or implicitly indicated to include at least one of the features. In the description of the present application, the meaning of the word "plurality" is at least two or two or more, such as two, three, four, etc., unless otherwise specifically limited in the embodiments.
[0115] In the present application, unless otherwise specifically provided or limited in the embodiments, the terms "mounting", "connecting", "connecting" and "fixing" and the like appearing in the embodiments should be understood broadly, for example, the connection can be fixed connection, or detachable connection, or integral, which can be understood, or can be mechanical connection, electrical connection, etc. Of course, it can also be directly connected, or indirectly connected through an intermediate medium, or the internal communication of two elements, or the interaction relationship between two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific implementation situation.
[0116] In the present application, unless otherwise specifically provided and limited, the first feature "on" or "under" the second feature can be that the first and second features are in direct contact, or the first and second features are indirectly in contact through an intermediate medium. Moreover, the first feature "above", "above" and "above" the second feature can be that the first feature is directly above or obliquely above the second feature, or only indicates that the horizontal height of the first feature is higher than that of the second feature. The first feature "below", "below" and "below" the second feature can be that the first feature is directly below or obliquely below the second feature, or only indicates that the horizontal height of the first feature is less than that of the second feature.
[0117] Although the embodiments of the present application have been shown and described above, it is understood that the above-described embodiments are exemplary and are not to be construed as limiting the present application, and that changes, modifications, substitutions and variations can be made by those skilled in the art without departing from the scope of the present application.
Claims
1. A cold site power prediction method, characterized by, The method comprises: acquiring cold station historical power data and external variable data, wherein the external variable data comprises historical external variable data and future external variable data; data encoding the external variable data according to the data type of the external variable data to obtain encoded external variable data, comprising: in the case that the data type of the external variable data is discrete, data encoding the external variable data to obtain encoded external variable data; the method further comprises: in the case that the data type of the external variable data is continuous, taking the numerical value of the external variable data as the encoded external variable data; data integration of the cold station historical power data and the encoded external variable data to obtain a target vector; feature extraction of the target vector to obtain time series feature data; prediction based on the time series feature data to obtain a cold station power prediction result.
2. The method of claim 1, wherein, The external variable data comprises at least one of weather data, cold station operation plan data, time data, and passenger flow data, the data type of the weather data is continuous; the data type of the operation plan data, the time data, and the passenger flow data is discrete; the data encoding of the external variable data to obtain encoded external variable data comprises: embedded encoding of the operation plan data, the time data, and the passenger flow data respectively to obtain encoded external variable data; periodic encoding of the time data, and / or scale-unified encoding of the time data through interpolation or down-sampling method to obtain encoded external variable data.
3. The method of claim 2, wherein, the embedded encoding of the operation plan data, the time data, and the passenger flow data respectively to obtain encoded external variable data comprises: mapping the operation plan data, the time data, and the passenger flow data into a continuous variable space respectively to obtain encoded external variable data.
4. The method of claim 2, wherein, The periodic encoding comprises a sine function method and a cosine function method, and the periodic encoding of the time data to obtain encoded external variable data comprises: encoding the time data according to a sine function method to obtain a first variable; encoding the time data according to a cosine function method to obtain a second variable; combining the first variable and the second variable to obtain encoded external variable data.
5. The method of claim 1, wherein, The method is applied to a power prediction model, and the power prediction model comprises an input layer, a long short-term memory (LSTM) layer, a full connection layer, and an output layer, wherein: the input layer is configured to data encode the external variable data according to the data type of the external variable data to obtain encoded external variable data, and data integrate the cold station historical power data and the encoded external variable data to obtain a target vector, wherein the external variable data comprises historical data and future data; the long short-term memory (LSTM) layer is configured to feature extract the target vector to obtain time series feature data; and the full connection layer is configured to input the time series feature data to obtain a prediction result. The full connection layer is configured to perform prediction based on the time series feature data to obtain a cold station power prediction result. The output layer is configured to output the cold station power prediction result.
6. The method of claim 5, wherein, The power prediction model comprises an attention mechanism configured to dynamically adjust a weight of external variable data in a target vector.
7. The method of claim 6, wherein, The power prediction model comprises a loss function configured to measure a deviation between the cold station power prediction result and a true value when training the power prediction model, wherein the loss function comprises a regularization term.
8. The method of claim 2, characterized in that: The weather data comprises temperature and humidity. The historical data corresponding to the cold station operation plan comprises historical start operation, historical shutdown operation of the cold station equipment, and historical water supply temperature setting value of the cold station equipment. The time data comprises holiday data.
9. A cold site power prediction apparatus characterized by comprising: The device implements the method of any one of claims 1-8, and the device comprises: An acquisition module configured to acquire cold station historical power data and external variable data, wherein the external variable data comprises historical external variable data and future external variable data; A first processing module configured to perform data coding on the external variable data according to a data type of the external variable data to obtain coded external variable data; A first integration module configured to perform data integration on the cold station historical power data and the coded external variable data to obtain a target vector; A first extraction module configured to perform feature extraction on the target vector to obtain time series feature data; A first prediction module configured to perform prediction based on the time series feature data to obtain a cold station power prediction result.
10. An electronic device comprising a memory and a processor, the memory storing a computer program, characterized in that, The processor executes the computer program to implement the steps of the method of any one of claims 1-8.
11. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the method of any one of claims 1-8.
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 consumer adjustable resource adjustment boundary prediction method and device based on deep learning
CN118350565A