Optimization methods, devices, equipment, and programs for heating network models
By acquiring predicted and actual load data of the heating network and adjusting the hyperparameters of the model using optimization algorithms, the problem of insufficient adaptability of the heating network monitoring model was solved, achieving higher prediction accuracy and monitoring reliability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2026-03-06
AI Technical Summary
Existing heating network monitoring models are difficult to adjust according to actual operating conditions, resulting in poor monitoring reliability.
By acquiring the predicted load data and actual load data of the heating network model, the hyperparameters are optimized using optimization algorithms to obtain optimized hyperparameter values. The model is then adjusted based on the actual load data to adapt it to actual operating conditions.
It improves the prediction accuracy and monitoring reliability of heating network models, enabling them to better adapt to changes in operational data and reduce computational resource consumption.
Smart Images

Figure CN119249662B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of heating pipe networks, and more specifically, to a method, apparatus, equipment, and program product for optimizing a heating pipe network model. Background Technology
[0002] A heating network refers to the network of pipes formed by heating pipes within a heating system. During the heating process, the heating network is responsible for transporting the heat-carrying medium from the heating end to the heat-demanding end, and then returning the medium from the heat-demanding end to the heating end, forming a circulating heating flow path. The heating end is, for example, a heated building, and the heat-demanding end is, for example, a user's home.
[0003] During the heating process, it is necessary to monitor the load on the heating network to predict load trends. Load parameters include, for example, the temperature difference between the output and recovered heating medium, and the flow rate of heating medium entering each household. Monitoring the load allows for adjustments to the subsequent operating data of the heating network, leading to improvements in load conditions.
[0004] Currently, the methods for monitoring heating pipe networks include using pre-trained models. However, the models currently in use are difficult to adjust according to the actual operation of the heating pipe network, resulting in poor reliability of the monitoring. Summary of the Invention
[0005] This application provides an optimization method, apparatus, equipment, and program product for a heating network model, to at least solve the technical problem of poor monitoring reliability of heating networks.
[0006] According to a first aspect of the embodiments of this application, an optimization method for a heating network model is provided, the method comprising:
[0007] During the usage phase of the heating network model, the predicted load data output by the heating network model for predicting the load situation of the heating network in the target time period is obtained.
[0008] Obtain the actual load data of the heating network during the target time period;
[0009] Based on the predicted load data, the actual load data, and the preset optimization algorithm, at least one hyperparameter term of the heating network model is optimized to obtain the optimized hyperparameter value corresponding to the hyperparameter term.
[0010] In this embodiment, the heating network model can predict the load conditions of the heating network and obtain predicted load data. This facilitates the regulation of the heating network based on the predicted load data, improving the load conditions during the target time period and realizing the monitoring of the heating network. Simultaneously, during the application phase of the heating network model, actual load data and optimization algorithms are used, combined with predicted load data, to optimize the hyperparameters of the heating network model. This allows the heating network model to be adjusted according to the actual operation of the heating network, thereby improving the accuracy of subsequent predicted load data and enhancing the reliability of heating network monitoring.
[0011] In conjunction with the first aspect, in an optional implementation of this application embodiment, the step of optimizing at least one hyperparameter term of the heating network model based on the predicted load data, the actual load data, and a preset optimization algorithm to obtain optimized hyperparameter values corresponding to the hyperparameter term includes:
[0012] A first performance evaluation value is calculated based on the predicted load data and the actual load data, wherein the first performance evaluation value is used to characterize the accuracy of the heating network model in making the prediction;
[0013] Determine the objective function based on the first performance evaluation value;
[0014] The objective function is processed using the optimization algorithm to obtain the optimized hyperparameter value corresponding to at least one hyperparameter term of the heating network model.
[0015] In this implementation, since the actual load data represents the real load data of the heating network, the first performance evaluation value can reflect the degree of difference between the predicted load data and the actual load data, thus characterizing the prediction accuracy of the heating network model. Specifically, a larger difference indicates lower prediction accuracy, while a smaller difference indicates higher prediction accuracy. After determining the objective function based on the first performance evaluation value, an optimization algorithm is used to process the objective function, facilitating the finding of the minimum value among the first performance evaluation values. The hyperparameter value corresponding to this minimum value can then be used as the optimization hyperparameter value, thereby optimizing the heating network model. Because actual load data is used in the optimization process, the optimization of the heating network model leads to more accurate predictions, improving prediction accuracy and thus enhancing the monitoring reliability of the heating network.
[0016] In conjunction with the first aspect, in an optional implementation of the embodiments of this application, the first performance evaluation value includes at least one of the mean squared error value, the mean absolute error value, and the Pearson correlation coefficient value.
[0017] Using this implementation method, the mean square error, mean absolute error, and Pearson correlation coefficient can all reflect the degree of difference between the predicted load data and the actual load data. This makes it easier to improve the optimization effect of the objective function generated based on the mean square error, mean absolute error, and / or Pearson correlation coefficient, thereby improving the prediction accuracy and the monitoring reliability of the heating network.
[0018] In conjunction with the first aspect, in an optional implementation of this application embodiment, after optimizing at least one hyperparameter term of the heating network model based on the predicted load data, the actual load data, and a preset optimization algorithm to obtain the optimized hyperparameter value corresponding to the hyperparameter term, the method further includes:
[0019] Obtain the first historical data of the heating network, wherein the first historical data includes historical operating data and historical load data corresponding to the historical operating data;
[0020] The historical operating data is processed using the optimized heating network model to obtain the target predicted load data;
[0021] A second performance evaluation value is calculated based on the target predicted load data and the corresponding historical load data;
[0022] The optimization result is determined based on the first performance evaluation value and the second performance evaluation value, wherein the optimization result is used to characterize the effect of the optimization.
[0023] Using this implementation method, after optimizing the heating network model, historical operating data is used for testing to obtain the optimization results. These results indicate the effectiveness of the optimization. If the optimization is effective or has a good effect, it proves that the optimization has achieved a certain level of success. Conversely, if the optimization results are not effective, relevant personnel can be alerted to manually optimize the heating network model, preventing situations where the optimization algorithm fails to produce any optimization effect and going undetected in a timely manner.
[0024] In conjunction with the first aspect, in an optional implementation of the embodiments of this application, determining the optimization result based on the first performance evaluation value and the second performance evaluation value includes:
[0025] Calculate the difference between the first performance evaluation value and the second performance evaluation value;
[0026] The optimization result is determined based on the magnitude of the difference value, wherein the larger the difference value, the worse the effect of the optimization is.
[0027] Using this implementation method, the difference value is easy to calculate, which helps to save computing resources.
[0028] In conjunction with the first aspect, in one optional implementation of the embodiments of this application, the optimization algorithm includes a Bayesian optimization algorithm.
[0029] Using this implementation, the Bayesian optimization algorithm helps reduce computational load, save computational resources, and thus reduce optimization costs.
[0030] In conjunction with the first aspect, in one optional implementation of the embodiments of this application, the heating network model includes a random forest regression model.
[0031] According to a second aspect of the embodiments of this application, a method for load forecasting of a heating network is provided. The method includes:
[0032] Obtain the operating data of the heating network;
[0033] The operating data is processed using a preset heating network model to obtain predicted load data, wherein the predicted load data is used to characterize the load of the heating network during a target time period.
[0034] At least one hyperparameter of the heating network model is optimized based on the predicted load data and the actual load data of the heating network during the target time period.
[0035] In this embodiment, the heating network model is optimized during the load forecasting process, so that the model can change according to the changes in the operating data. This results in a higher degree of matching between the heating network model and the operating data, leading to more accurate load forecasts and improving the monitoring effect and reliability of the heating network.
[0036] In conjunction with the second aspect, in one optional implementation of the embodiments of this application, the running data includes different types of running data and / or running data obtained by different acquisition methods;
[0037] Before processing the operating data using a preset heating network model to obtain predicted load data, the method further includes:
[0038] The running data is preprocessed using the same or different data processing methods depending on the type and / or acquisition method of the running data.
[0039] The implementation method uses operational data of different types and / or different acquisition methods, requiring the use of multi-label, i.e., multi-dimensional operational data, during the load forecasting process of the heating network. This can lead to a decrease in the prediction accuracy of the heating network model when the dimensions increase, decrease, or change. However, this application optimizes the heating network model based on the predicted load data and the actual load data after the model outputs the predicted load data. This optimized model is applicable to operational data with increased, decreased, or changed dimensions, thereby improving the prediction accuracy and thus enhancing the reliability of heating network monitoring.
[0040] Furthermore, preprocessing operational data helps to increase the difficulty of processing such data by the heating network model, thereby improving data processing efficiency. Additionally, different preprocessing methods may be used depending on the type and / or acquisition method of the operational data, which helps to improve the preprocessing effect.
[0041] In conjunction with the second aspect, in one optional implementation of the embodiments of this application, the operating data includes temperature and pressure; the preprocessing includes feature engineering;
[0042] The method further includes:
[0043] The temperature and pressure are processed using the aforementioned feature engineering to obtain a temperature-pressure ratio, which is then used as the operating data to obtain the heating network model.
[0044] By adopting this implementation method and replacing temperature and pressure with temperature-pressure ratio, it is helpful to reduce the amount of data processing in the heating network model and improve the processing efficiency of the heating network model.
[0045] According to a third aspect of the embodiments of this application, a method for load forecasting of a heating network is provided, the method comprising:
[0046] Obtain the operating data of the heating network;
[0047] The operating data is processed using a preset heating network model to obtain predicted load data, wherein the predicted load data is used to characterize the load of the heating network during a target time period.
[0048] Based on the predicted load data and the actual load data of the heating network during the target time period, at least one hyperparameter term of the heating network model is optimized using the optimization method of the heating network model described above.
[0049] According to a fourth aspect of the embodiments of this application, an optimization device for a heating network model is provided, the device comprising:
[0050] The first acquisition module is used to acquire, during the usage phase of the heating network model, the predicted load data output by the heating network model for predicting the load situation of the heating network in the target time period.
[0051] The second acquisition module is used to acquire the actual load data of the heating network during the target time period.
[0052] The first optimization module is used to optimize at least one hyperparameter of the heating network model based on the predicted load data, the actual load data, and a preset optimization algorithm, so as to obtain the optimized hyperparameter value corresponding to the hyperparameter.
[0053] According to a fifth aspect of the embodiments of this application, an optimization device for a heating network model is provided, the device comprising:
[0054] The third acquisition module is used to acquire the operating data of the heating network;
[0055] The prediction module is used to process the operating data using a preset heating network model to obtain predicted load data, wherein the predicted load data is used to characterize the load of the heating network during a target time period.
[0056] The second optimization module is used to optimize at least one hyperparameter of the heating network model based on the predicted load data and the actual load data of the heating network during the target time period.
[0057] According to a sixth aspect of the embodiments of this application, an electronic device is provided, the electronic device including a memory and a processor;
[0058] The memory is used to store computer programs;
[0059] The processor is used to execute the computer program to implement the steps of the method described above.
[0060] According to a seventh aspect of the present application, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program that, when run on a computer or processor, causes the computer or processor to perform the steps of the method described above.
[0061] According to an eighth aspect of the present application, a computer program product is provided, the computer program product comprising computer instructions that, when executed by a computer or processor, cause the steps of the method described above to be performed.
[0062] The technical effects achieved by the third to eighth aspects mentioned above are similar to those achieved by the corresponding technical means in the first and second aspects, and will not be repeated here. Attached Figure Description
[0063] Figure 1 This is a flowchart of an optimization method for a heating network model provided in an embodiment of this application;
[0064] Figure 2 This is a flowchart illustrating the process of obtaining optimized hyperparameter values in an optimization method for a heating network model provided in an embodiment of this application.
[0065] Figure 3 This is a flowchart of a load forecasting method for a heating network provided in an embodiment of this application;
[0066] Figure 4 This is a schematic diagram of hyperparameter optimization of a load prediction method for a heating network in a specific implementation provided in this application embodiment;
[0067] Figure 5 This is a schematic diagram of the load prediction method for a heating network before optimization in a specific implementation provided in this application embodiment;
[0068] Figure 6 This is an optimized schematic diagram of a load forecasting method for a heating network in a specific implementation provided in this application embodiment;
[0069] Figure 7 This is a structural block diagram of an optimization device for a heating network model provided in an embodiment of this application;
[0070] Figure 8 This is a structural block diagram of a load prediction device for a heating network provided in an embodiment of this application;
[0071] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0072] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0073] It should be understood that "multiple" as mentioned herein refers to two or more. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, to facilitate a clear description of the technical solutions of the embodiments of this application, the terms "first," "second," etc., are used in the embodiments of this application to distinguish identical or similar items with essentially the same function and effect. Those skilled in the art will understand that the terms "first," "second," etc., do not limit the quantity or execution order, and the terms "first," "second," etc., do not necessarily imply differentness.
[0074] Furthermore, the terms “comprising” and “having”, and any variations thereof, are intended to cover non-exclusive inclusion, such that a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such process, method, product, or apparatus.
[0075] First, the terminology used in the embodiments of this application will be introduced.
[0076] Heating network: It is a complex interconnected pipeline system consisting of numerous series and parallel pipelines and various heat users.
[0077] The load of a heating network, also known as the load of a heating network system, refers to the amount of heat or energy that the heating network needs to deliver within a certain time period to meet the user's heat demand. This load is usually expressed as thermal power (energy consumption per unit time), with units of kilowatts (kW) or megawatts (MW). The load of a heating network system is a key parameter in the design and operation of a heating network because it directly affects the network's scale, equipment selection, energy consumption, and the system's economy and efficiency. The load data mentioned in this application may include the flow rate of hot water in the heating network and the supply and return water temperature difference. The supply and return water temperature difference refers to the difference between the temperature of the hot water provided by the energy station of the heating network and the temperature of the recovered hot water.
[0078] Load supply and demand: Supply refers to the heat delivered by the energy stations of the heating network, while demand refers to the heat demanded by the end of the heating network (or users).
[0079] Load supply and demand balance: The heat delivered by the energy stations of the heating network and the heat demanded by the end of the heating network (or users) should be roughly equal in magnitude. If an imbalance occurs, such as the heat delivered by the energy stations being less than the heat demanded by the end of the heating network (or users), the temperature in users' homes will not meet the standards, affecting comfort, causing numerous customer complaints, and creating livelihood issues. If the heat delivered by the energy stations is greater than the heat demanded by the end of the heating network (or users), users' homes will become overheated, and users will usually open windows to dissipate heat, resulting in energy waste and increased costs for the source companies.
[0080] Load forecasting refers to predicting the load on the heating network over a future period. For example, predicting the temperature difference between the supply and return water in the heating network over a future period. Based on the predicted temperature difference, the hot water temperature in the heating network can be adjusted to meet user needs while saving energy.
[0081] Hydraulic imbalance: refers to the mismatch between the flow distribution of hot water in the heating network and the design requirements of each user. The inconsistency between the actual flow and the required flow of each heat user is called the hydraulic imbalance of the heat user.
[0082] Although my country's centralized heating industry has experienced rapid development over a period of time, it still has many shortcomings. High energy consumption and poor heating quality are two fundamental characteristics of my country's centralized heating industry. When abnormalities occur in the heating system, the lack of stable monitoring devices makes it difficult for on-site operators to detect and resolve faults in a timely manner, posing safety hazards. The core control parameter of the heating system is the supply water temperature, and whether the secondary supply water temperature can be stabilized near the set value directly affects the heating quality. Traditional control strategies rely on manual experience or simple PID algorithms to adjust the heating stations, heat sources, pipe networks, and heating terminals. These adjustment methods cannot adapt well to the nonlinear and lag-dependent complex system of centralized heating, making it difficult to accurately control the supply water temperature. Excessive supply water temperature leads to indoor temperatures exceeding the design temperature, causing users to consume excess heat through ventilation, resulting in energy waste. Conversely, insufficient supply water temperature makes it difficult to ensure a comfortable indoor temperature for users, affecting user experience.
[0083] The low energy efficiency of centralized heating systems stems primarily from two factors: the imbalance between supply and demand in the pipe network and hydraulic imbalance within the network. For a large-scale heating system, achieving load balance requires a scientific and relatively accurate forecast of daily load demand, striving for equilibrium between supply and demand. Otherwise, if supply exceeds demand, energy is wasted. Hydraulic imbalance in the pipe network has always been a problem in large-scale heating networks. While a two-tiered pipe network structure has partially addressed this issue, the sheer size of the network and the fact that current secondary pipe networks are dynamic, variable-flow systems increase the difficulty of achieving hydraulic balance in the primary network. Therefore, establishing a stable and reliable pipe network model using appropriate methods to provide high-quality and feasible logic for the intelligent control system is key to solving this problem.
[0084] Based on this, embodiments of this application provide an optimization method for a heating network model, referring to... Figure 1 The flowchart shown is a schematic diagram of the optimization method for the heating network model. The method includes the following processing steps.
[0085] S100. During the use phase of the heating network model, obtain the predicted load data output by the heating network model for predicting the load situation of the heating network in the target time period.
[0086] It should be noted that the heating network model refers to a model capable of predicting the load conditions of the heating network. This model can be a neural network model or any other model capable of load prediction; this embodiment does not impose specific limitations on it. Before the heating network model is officially used, it needs to be trained. Therefore, the heating network model used in the operational phase is the model after training.
[0087] Since this embodiment does not limit the specific structure or specific situation of the heating network model, it also does not limit how the heating network model predicts the load situation to obtain the predicted load data. Different heating network models require different data and the prediction process is also different. Specifically, the required data can be input according to the actual needs of the heating network model used to obtain the predicted load data.
[0088] To facilitate understanding, let's take a heating network model as an example, using a neural network model. During training, historical temperature and pressure data from the heating network are used to train the model, enabling it to predict load conditions based on this data. In the usage phase, the temperature and pressure of the heating network are used as input to the model to obtain the predicted load data.
[0089] The predicted load data refers to the predicted load of the heating network during the target time period. The predicted load data may include the supply and return water temperature difference and / or hot water flow rate of the heating network during the target time period.
[0090] Since the forecast is for the load situation during the target time period, there can be multiple forecast load data points. For example, there can be one forecast load data point for each minute within the target time period.
[0091] S102. Obtain the actual load data of the heating network during the target time period.
[0092] Actual load data refers to the actual load data of the heating network during the target time period. In other words, the load data of the heating network at that time is obtained after the target time period is reached in real life.
[0093] In one embodiment, the number of actual load data should correspond to the number of predicted load data. That is, if each minute of the target time period corresponds to predicted load data, then after the actual time reaches the target time period, one actual load data is acquired every minute, so that the predicted load data and the actual load data can correspond one-to-one in time.
[0094] S104. Based on the predicted load data, the actual load data, and the preset optimization algorithm, optimize at least one hyperparameter term of the heating network model to obtain the optimized hyperparameter value corresponding to the hyperparameter term.
[0095] It should be noted that the hyperparameters of the heating network model need to be able to be modified in real time so that after the optimization algorithm calculates the optimized hyperparameter values, it can directly update the heating network model with the optimized hyperparameter values, without having to rebuild or retrain the heating network model based on the optimized hyperparameter values.
[0096] In this embodiment, the heating network model can predict the load conditions of the heating network and obtain predicted load data. This facilitates the regulation of the heating network based on the predicted load data, improving the load conditions during the target time period and realizing the monitoring of the heating network. Simultaneously, during the application phase of the heating network model, actual load data and optimization algorithms are used, combined with predicted load data, to optimize the hyperparameters of the heating network model. This allows the heating network model to be adjusted according to the actual operation of the heating network, thereby improving the accuracy of subsequent predicted load data and enhancing the reliability of heating network monitoring.
[0097] In one possible embodiment of this application, such as Figure 2 As shown, based on predicted load data, actual load data, and a preset optimization algorithm, at least one hyperparameter term of the heating network model is optimized to obtain the optimized hyperparameter value corresponding to the hyperparameter term, including:
[0098] S200. Calculate the first performance evaluation value based on the predicted load data and the actual load data.
[0099] The first performance evaluation value is used to characterize the accuracy of the heating network model's predictions. Specifically, the first performance evaluation value can be the mean squared error (MSE), the mean absolute error (MAE), and / or the Pearson correlation coefficient (PCC). In other words, any value that can directly or indirectly characterize the prediction accuracy can be used as the first performance evaluation value.
[0100] S202. Determine the objective function based on the first performance evaluation value.
[0101] It should be noted that since the load situation is predicted for a target time period, there must be at least two predicted load data points. Therefore, the objective function can be obtained based on at least two predicted load data points and their corresponding times. In one embodiment, the objective function is represented as a curve composed of a first performance evaluation value and time. For example, if the target time period is from 1:00 AM on B / C day of year A to 1:10 AM on B / C day of year A, and there is a predicted load data point every 2 minutes, then there are 6 predicted load data points corresponding to 0, 2, 4, 6, 8, and 10 minutes. Actual load data is acquired starting at 1:00 AM on B / C day of year A, and is acquired every 2 minutes, resulting in 6 actual load data points. A first performance evaluation value is calculated using the predicted load data corresponding to 0 minutes and the actual load data. This process is repeated to obtain 6 first performance evaluation values corresponding to 0, 2, 4, 6, 8, and 10 minutes respectively. Thus, a curve is obtained with the first performance evaluation value as the ordinate and time as the abscissa; this curve serves as the objective function.
[0102] S204. Use optimization algorithms to process the objective function and obtain the optimized hyperparameter value corresponding to at least one hyperparameter term of the heating network model.
[0103] Specifically, any algorithm that can obtain optimized hyperparameter values based on the objective function can be used as an optimization algorithm. More specifically, the optimization algorithm in this embodiment is a Bayesian optimization algorithm, and in the specific scenario of this application embodiment, its optimization process generally includes the following:
[0104] The input parameter values for Bayesian optimization are:
[0105] objective_function: The objective function to be optimized; bounds: The boundaries of the parameter search space; n_iter: The number of iterations; init_points: The number of initial sampling points; acq_func: The posterior probability function to be selected; kappa: Parameters that control the tradeoff between exploration and development.
[0106] S1: In this embodiment, the objective function to be optimized is the model's performance index on the validation set, namely, the several function formulas used to evaluate the model's performance after its establishment, as mentioned below. These objective functions are collectively referred to as f(x). Besides the objective function f(x) itself, the boundary of the parameter search space also needs to be defined. This boundary is the boundary of the hyperparameter space X, which limits the range of values for the hyperparameter x. This embodiment is for a hot water pipe network system, and the boundary here is usually set according to the temperature and flow requirements of different pipe network systems for the primary or secondary network.
[0107] S2: As a complex system, the hot water pipe network system exhibits non-steady-state behavior under actual operating conditions. This means that the system's state changes over time, and these changes may be irregular or random. Gaussian processes are powerful non-parametric Bayesian modeling tools capable of handling nonlinear relationships and providing estimates of prediction uncertainties. Therefore, in this example, a Gaussian process is chosen as the probabilistic surrogate model.
[0108] A Gaussian process is defined by a prior distribution p(f) on the function space, where f = ...
[0109] [f(x1),f(x2),…,f(x n )] T These are the values of the objective function at n observation points. The Gaussian process assumes that these function values follow a multivariate normal distribution: f ~ N(m,K), where m is the mean vector, K is the covariance matrix, and its elements K ij =k(x i ,y i The kernel function (also known as the covariance function) is calculated from the covariance function. Considering the periodicity of changes in the hot water pipe network, a periodic kernel should be chosen. The general form of the periodic kernel is:
[0110]
[0111] Where, σ 2 Here, L is the signal variance, L is the length scale, and p is the period length. The selection of the length scale and period length should consider the actual application scenario of the hot water pipe network (the variation of real data). In the period kernel, the length scale affects the smoothness of changes within the period. A smaller length scale leads to faster changes within the period, while a larger length scale leads to smoother changes within the period. The period length should be selected based on the periodic characteristics of the actual data. Because of the stability of end-user demand, the data at the same time each day in the hot water pipe network system are similar within a certain period, i.e., repetitive. In this case, the period length should be set to 24.
[0112] S3: Initialize the Gaussian process using a set of initial hyperparameter settings and corresponding objective function values. Let the initial dataset be... Where y i =f(x) i )+ε i , here ε i The observed noise is assumed to follow a zero-mean Gaussian distribution, i.e., ε i ~N(0,σ 2 Enter the initial number of sampling points here, which is the number of hyperparameter settings and corresponding objective function values selected before starting Bayesian optimization.
[0113] After selecting the initial sampling points, evaluate the objective function f(x) at each initial point. i ), thus obtaining the objective function value y. i Then, the initial hyperparameter settings and corresponding objective function values are combined to form the initial dataset. The mean vector m and covariance matrix K of the Gaussian process are then initialized using the initial dataset D. In this embodiment, the mean vector is a linear mean function fitted from the real data, and its formula is shown below:
[0114] m(x) = w T x+b
[0115] Where w is the weight vector and b is the bias term. The magnitude of the weight vector represents the importance of the corresponding objective in the multi-objective optimization problem, and is calculated from the matrix. In the matrix, first calculate the sum 'a' of each row and the sum 'a' of all numbers in the matrix. i , The bias term b controls the distance of the function from the origin, determines the position of the neural network model in space, and is adjusted by the algorithm itself during training.
[0116] S4: Construct the posterior distribution. Using the initial dataset D and a Gaussian process, construct the posterior distribution of the objective function. For a new point X... * The posterior distribution gives the predicted mean μ(X). * ) and prediction variance σ 2 (X * The formula is as follows:
[0117]
[0118] In the formula, μ(X) * For a Gaussian process at a new input point X * The predicted mean at point X, where k* is the new input point X. * The covariance vector between training data points, K is the covariance matrix between training data points, and σ 2y is the variance of the observation noise, I is the identity matrix, and y is the target value vector of the training data.
[0119]
[0120] In the formula, σ 2 (X * For a Gaussian process at a new input point X * The prediction variance at point k(X) * ,X * ) is the new input point X * The covariance between itself and the kernel function in X, i.e., the kernel function in X * The value at point X, k* is the new input point X. * The covariance vector between training data points, K is the covariance matrix between training data points, and σ 2 is the variance of the observation noise, and I is the identity matrix.
[0121] S5: Use the acquisition function to select the next evaluation point. The upper expectation acquisition function is defined as:
[0122] EI(x)=E[max(0,f(x)-f(x + )]
[0123] In the formula, f(x) + If is the currently observed optimal objective function value, then the above equation can be expressed as:
[0124]
[0125] In the formula, Φ and φ are the cumulative distribution function and probability density function of the standard normal distribution, respectively. It is an exploration parameter that controls the trade-off between exploration and exploitation, determining the balance between exploration and utilization. The larger it is, the more exploratory it becomes; The smaller the value, the greater the utilization. In this embodiment, considering the stability of the hot water pipe network system, the value is set by the algorithm itself to maintain a ratio of 1 in 10 actions being an exploration action.
[0126] The confidence upper limit acquisition function is defined as follows:
[0127] UCB(x) = μ(x) + βσ(x)
[0128] In the formula, μ(x) is the predicted mean of the Gaussian process at point x, σ(x) is the predicted standard deviation of the Gaussian process at point x, and β is a hyperparameter that controls the balance between exploration and utilization, and its exploration ratio is consistent with the exploration parameter in the expected upper limit acquisition function.
[0129] S6: Update the probabilistic surrogate model. Evaluate the objective function f(x) at the new point x and add the result to the observed dataset. Then, update the posterior distribution of the Gaussian process using the new dataset.
[0130] S7: Iterative optimization. Repeat steps 4 to 6 until the model's energy efficiency requirements are met or the iteration limit is reached. To ensure that the algorithm's computation time does not exceed 10 minutes, the number of iterations should generally not exceed 50.
[0131] S8: Update and output the optimal combination of hyperparameters found during the optimization process.
[0132] In this embodiment, since the actual load data is the real load data of the heating network, the first performance evaluation value can reflect the degree of difference between the predicted load data and the actual load data, thus characterizing the prediction accuracy of the heating network model. That is, a larger difference indicates lower prediction accuracy, and a smaller difference indicates higher prediction accuracy. After determining the objective function based on the first performance evaluation value, an optimization algorithm is used to process the objective function to find the minimum value among the first performance evaluation values. The hyperparameter value corresponding to the minimum value among the first performance evaluation values can then be used as the optimization hyperparameter value to optimize the heating network model. Because actual load data is used in the optimization process, the optimization of the heating network model can make predictions more accurate, thereby improving the reliability of heating network monitoring.
[0133] Optionally, in one implementation of this embodiment, the first performance evaluation value includes at least one of the mean square error value, the mean absolute error value, and the Pearson correlation coefficient value.
[0134] The calculation formula is as follows:
[0135]
[0136] Where MSE is the mean square error between the predicted load data and the actual load data, y pred For the predicted load data, y represents the actual load data, and n represents the number of samples for the predicted load data.
[0137]
[0138] Where MAE is the mean absolute error between the predicted load data and the actual load data, y pred For the predicted load data, y represents the actual load data, and n represents the number of samples for the predicted load data.
[0139]
[0140] Where PCC is the Pearson correlation coefficient between the predicted load data and the actual load data, y pred To predict load data, y represents the mean of the predicted load data, and y represents the actual load data. This represents the average of the actual load data.
[0141] In this embodiment, the mean square error, mean absolute error, and Pearson correlation coefficient can all reflect the degree of difference between the predicted load data and the actual load data. This makes it easier to improve the optimization effect of the objective function generated based on the mean square error, mean absolute error, and / or Pearson correlation coefficient, thereby improving the prediction accuracy and the monitoring reliability of the heating network.
[0142] Optionally, in one implementation of this embodiment, after optimizing at least one hyperparameter term of the heating network model based on predicted load data, actual load data, and a preset optimization algorithm to obtain optimized hyperparameter values corresponding to the hyperparameter term, the method further includes:
[0143] Obtain the first historical data of the heating network, which includes historical operating data and historical load data corresponding to the historical operating data;
[0144] The optimized heating network model is used to process historical operating data to obtain target predicted load data;
[0145] The second performance evaluation value is calculated based on the target predicted load data and the corresponding historical load data;
[0146] The optimization result is determined based on the first performance evaluation value and the second performance evaluation value, wherein the optimization result is used to characterize the effect of the optimization.
[0147] In other words, the optimization results reflect whether using optimization algorithms to optimize the heating network model has an effect, specifically including positive and negative effects. When the effect is positive, it proves that the optimization improves the prediction accuracy of the heating network model; when the effect is negative, it proves that the optimization reduces the prediction accuracy of the heating network model.
[0148] When the prediction accuracy decreases, an alarm can be triggered so that relevant personnel can be notified of the situation, allowing them to update the optimization algorithm or manually adjust the heating network model to improve prediction accuracy.
[0149] Preferably, the difference between the first performance evaluation value and the second performance evaluation value is calculated, and the optimization result is determined based on the magnitude of the difference. The larger the difference, the worse the optimization effect; conversely, the smaller the difference, the better the optimization effect. For example, the difference values can be partitioned, with each partition corresponding to a different optimization result. A larger difference value for a partition indicates a worse optimization effect. After obtaining the difference values, the partition corresponding to each difference value can be determined, and the optimization result for that partition can be used as the optimization result for that difference value.
[0150] In this embodiment, after optimizing the heating network model, historical operating data is used for testing to obtain the optimization results. These results indicate the effectiveness of the optimization. If the optimization is effective or performs well, it proves that the optimization has achieved a certain effect. Conversely, if the optimization results are not effective, relevant personnel can be alerted to manually optimize the heating network model, preventing situations where the optimization algorithm fails to produce any optimization effect and thus ensuring timely detection.
[0151] Optionally, in one implementation of this embodiment, the optimization algorithm includes a Bayesian optimization algorithm.
[0152] It should be noted that when the optimization algorithm is Bayesian optimization, in addition to setting the objective function, it is also necessary to set the boundary of the parameter search space, the number of iterations, the number of initial sampling points, the selected posterior probability function, and the parameters controlling the exploration-exploitation tradeoff. All of the above-mentioned settings are essential for using the Bayesian optimization algorithm and will not be elaborated upon in this embodiment.
[0153] Using this embodiment, the Bayesian optimization algorithm helps reduce computational load, save computational resources, and thus reduce optimization costs.
[0154] Optionally, in one implementation of this embodiment, the heating network model includes a random forest regression model.
[0155] It should be noted that in the process of training or testing the random forest regression model, in addition to inputting the historical operation data and historical load data of the heating network, it is also necessary to set the hyperparameter values of the following terms: the number of trees in the forest, the maximum number of features used per tree, the maximum depth of each tree, the minimum number of samples required for internal node splitting, the minimum number of samples required for leaf nodes, and the seed of the random number generator.
[0156] This application also provides a method for predicting the load of a heating network, such as... Figure 3 As shown, it includes:
[0157] S300: Obtain operational data of the heating network.
[0158] Operational data refers to data related to the operating status and performance of the heating network, or data that can characterize the features of the heating network. Examples include the temperature, pressure, and flow rate of the heat transfer medium used in the heating network. This embodiment does not specifically limit this. Specifically, the heat transfer medium can be water or oil.
[0159] S302. Process the operating data using a preset heating network model to obtain predicted load data.
[0160] Among them, the predicted load data is used to characterize the load situation of the heating network during the target time period.
[0161] S304. Optimize at least one hyperparameter term of the heating network model based on the predicted load data and the actual load data of the heating network during the target time period.
[0162] In this embodiment, the heating network model is optimized during the load forecasting process, so that the model can change according to the changes in the operating data. This results in a higher degree of matching between the heating network model and the operating data, leading to more accurate load forecasts and improving the monitoring effect and reliability of the heating network.
[0163] Optionally, in one implementation of this embodiment, the running data includes different types of running data and / or running data obtained through different acquisition methods;
[0164] Before processing the operational data using a pre-defined heating network model to obtain predicted load data, the method also includes:
[0165] Preprocess the running data using the same or different data processing methods, depending on the type and / or acquisition method of the running data.
[0166] The types include temperature, pressure, and flow rate, and the acquisition methods include obtaining them through sensors, calculations, and human input.
[0167] Preprocessing includes outlier detection, feature engineering, data normalization, and time series analysis. Specifically, outlier detection uses the Z-Score method based on the mean and standard deviation; feature engineering synthesizes a more representative feature value from two or more features; data normalization uses min-max normalization; and time series analysis uses a smoothing technique based on moving averages.
[0168] Outlier detection primarily utilizes the Z-Score method (standard score method) based on the mean and standard deviation, with the following formula:
[0169]
[0170] Where Z-Score represents the Z-Score value, X is the data for each sample, μ is the mean data value, and σ is the standard deviation of the sample data. A sample refers to the running data.
[0171] The Z-Score represents the degree of deviation of a data point from the overall data distribution. Based on a pre-set threshold, it is determined whether each Z-Score exceeds the threshold. If the absolute value of the Z-Score is greater than the threshold, the sample data is identified as an outlier, and outliers are excluded from subsequent calculations.
[0172] Feature engineering primarily uses two or more features to synthesize a more representative feature value, for example:
[0173] Let a characteristic parameter be set as temperature-pressure ratio (TPRatio), and its calculation formula is as follows:
[0174]
[0175] Where TPRatio is the temperature-pressure ratio, T is the hot water temperature in the current section of the pipe network, and P is the pressure level in the current section of the pipe network.
[0176] Monitoring changes in the temperature-to-pressure ratio (TPR) can better reflect the energy efficiency coefficient of the current heating network. A higher TPR may mean that, under given temperature conditions, the system requires higher pressure to maintain the flow of the heat medium. By optimizing the TPR value, the energy efficiency of the heating network can be improved, reducing energy consumption and losses.
[0177] Data normalization primarily uses the min-max normalization method, and its calculation formula is as follows:
[0178]
[0179] Among them, X scale The value is the normalized value, where X refers to the original sample data. min The minimum value in the sample, X max The maximum value in the sample.
[0180] Normalization is achieved by scaling the original data to a range between 0 and 1 by subtracting the minimum value and dividing by the difference between the maximum and minimum values. This normalization method is primarily used to unify data with different value ranges onto the same scale, enabling reliable comparison and analysis. Using the min-max normalization method, the original data X can be mapped to the range of 0 to 1, where 0 represents the minimum value and 1 represents the maximum value. The processed data has a relative proportional relationship, facilitating tasks such as data analysis and model training.
[0181] Time series analysis mainly uses the smoothing technique of moving average, and its steps are as follows:
[0182] Choose a window size (usually an odd number) that represents the number of data points used to calculate the average; iterate through the data sequence from left to right, calculating the average of the data points in the window for each position; use the calculated average as the smoothed value for that position; repeat the above process until the entire data sequence has been traversed.
[0183] In this embodiment, the operational data has different types and / or different acquisition methods, requiring the use of multi-label, i.e., multi-dimensional operational data, during the load forecasting process of the heating network. This can lead to a decrease in the prediction accuracy of the heating network model when the dimensions increase, decrease, or change. However, because this application optimizes the heating network model based on the predicted load data and the actual load data after the model outputs the predicted load data, the optimized model can be applied to operational data with increased, decreased, or changed dimensions, thereby improving the prediction accuracy and thus enhancing the reliability of heating network monitoring.
[0184] Furthermore, preprocessing operational data helps to increase the difficulty of processing such data by the heating network model, thereby improving data processing efficiency. Additionally, different preprocessing methods may be used depending on the type and / or acquisition method of the operational data, which helps to improve the preprocessing effect.
[0185] Optionally, in one implementation of this embodiment, the operating data includes at least two of the following: supply water temperature, supply water pressure, return water temperature, return water pressure, heating network flow rate, and the opening degree of regulating valves in the heating network; preprocessing includes feature engineering.
[0186] The method also includes:
[0187] The water supply temperature and pressure are processed using the aforementioned characteristic engineering to obtain a temperature-pressure ratio. This temperature-pressure ratio is then used as the operating data to obtain the heating network model.
[0188] And / or, the water supply temperature and heating network flow rate are processed using the aforementioned characteristic engineering to obtain a temperature-to-flow ratio, which is then used as the operating data to obtain the heating network model.
[0189] And / or, calculate the average value of the difference between the supply water temperature and the return water temperature, and process the average value and the heating network flow rate using the characteristic engineering to obtain the flow equalization ratio, so as to use the flow equalization ratio as the operating data to obtain the heating network model.
[0190] And / or, the average value and the valve opening are processed using the characteristic engineering to obtain the uniform opening ratio, which is then used as the operating data to obtain the heating network model.
[0191] And / or, calculate the difference between the supply water pressure and the return water pressure, and process the average value and the difference using the characteristic engineering to obtain the average-to-difference ratio, so as to use the average-to-difference ratio as the operating data to obtain the heating network model.
[0192] Specifically, regarding the characteristic engineering aspects of pretreatment, in the heating field, temperature-pressure ratio, temperature-flow ratio, flow equalization ratio, opening equalization ratio, and difference equalization ratio may be introduced. The temperature-pressure ratio refers to the ratio of supply water temperature to supply water pressure; the temperature-flow ratio refers to the ratio of supply water temperature to heating network flow rate; the flow equalization ratio refers to the ratio of average value to heating network flow rate; the opening equalization ratio refers to the ratio of average value to regulating valve opening degree; and the difference equalization ratio refers to the ratio of average value to difference. The average value is the average difference between the supply water temperature and the return water temperature. That is, a set of supply and return water temperatures is collected at different time points, and the difference between the supply and return water temperatures at each time point is calculated. After obtaining the differences corresponding to multiple time points, the average of these differences is calculated to obtain the average value mentioned above. The difference is the value obtained by subtracting the return water pressure from the supply water pressure.
[0193] The aforementioned characteristic parameters (such as temperature-pressure ratio, temperature-flow ratio, uniform flow ratio, uniform opening ratio, and uniform difference ratio) can be applied to heating networks of different types, scales, and hydraulic and thermal operating conditions. For example, the temperature-flow ratio is suitable for heating networks with high heat exchange efficiency, rapid establishment of thermal balance, and ample flow. In such networks, the supply water temperature is highly correlated with the network flow rate, and the ratio can be directly related to the quality of end-point heating. For larger heating networks with lower heat exchange efficiency and slower establishment of thermal balance, the average value can generally serve as a characteristic indicator of the actual heat exchange effect. Supplemented by one or more characteristic values such as flow rate, electric regulating valve opening, or supply-return pressure difference, it can characterize the actual heat obtained at that node.
[0194] That is, in some application scenarios, the appropriate feature engineering can be selected by obtaining the type, scale, hydraulic and thermal conditions of the heating network.
[0195] Furthermore, in some application scenarios, during the acquisition of data such as supply water temperature, supply water pressure, return water temperature, return water pressure, and heating network flow, month-on-month and / or longitudinal comparisons are performed to filter out outliers. Month-on-month comparison refers to comparing the collected data with data obtained from other upstream and downstream links at the same collection time to filter out significant outliers. Longitudinal comparison refers to comparing the collected data with data collected from the same collection point over a past period to filter out significant outliers. Preferably, whether a data point is a significant outlier can be determined by setting an outlier threshold. For example, data exceeding the outlier threshold is considered a significant outlier, or data whose difference from the average value exceeds the outlier threshold is considered a significant outlier. This embodiment does not specifically limit this.
[0196] In this embodiment, the temperature-pressure ratio is used instead of temperature and pressure, which helps to reduce the amount of data processing in the heating network model and improve the processing efficiency of the heating network model.
[0197] This application also provides a method for load forecasting of a heating network, the method comprising:
[0198] Obtain operational data of the heating network;
[0199] The operating data is processed using a pre-set heating network model to obtain predicted load data, which is used to characterize the load of the heating network during the target time period.
[0200] Based on the predicted load data and the actual load data of the heating network during the target time period, the above-mentioned optimization method for the heating network model is used to optimize at least one hyperparameter term of the heating network model.
[0201] In the above embodiments of this application, the descriptions of each embodiment have their own emphasis. Parts not described in detail in a certain embodiment can be referred to in the relevant descriptions of other embodiments. The steps illustrated in the related flowcharts can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowcharts, in some cases, the steps shown or described may be performed in a different order than that shown here. In other words, the order of steps described in the foregoing embodiments is merely an example. Reasonable adjustments to the order of steps based on the content of the embodiments of this application are also within the protection scope of the embodiments of this application.
[0202] In one specific implementation of this application embodiment, the load forecasting method for heating pipe networks includes the following processing steps:
[0203] like Figure 4-6 As shown, step 1 involves collecting characteristic data of the heating network during the current heating season, such as temperature, pressure, and flow rate.
[0204] Step 2: Preprocess the raw data of the heating network characteristic values.
[0205] In response to step 2, the preprocessing methods that can be used mainly include outlier detection, feature engineering, data normalization, and time series analysis.
[0206] Step 3: Based on the preprocessed data, build a random forest regression model. First, define an empty list to store each decision tree; then, for i in the range [0, n_estimators], randomly sample a portion of training data using replacement, and build a decision tree using the hyperparameters mentioned above, adding the generated decision tree to the list; then, use each generated decision tree to predict the test data: for each sample in the test data, predict the label of that sample in all decision trees, calculate the average of the prediction results of all decision trees, and use this as the final predicted label, saving the final predicted labels of all test samples; finally, return the final predicted label of the test data.
[0207] In response to step 3, the model's input values are: x: training data features, y: training data labels, n_estimators: number of trees in the forest, max_features: maximum number of features used per tree, max_depth: maximum depth of each tree, min_samples_split: minimum number of samples required for internal node splits, min_samples_leaf: minimum number of samples required for leaf nodes, and random_state: seed for the random number generator.
[0208] In response to step 3, the model outputs: y_pred: the predicted label for the test data.
[0209] Step 4: After the model is built, evaluate its performance.
[0210] In response to step 4, the evaluation metrics that can be used mainly include the mean squared error (MSE) between the predicted and actual values, the mean absolute error (MAE) between the predicted and actual values, and the Pearson correlation coefficient (PCC) between the predicted and actual values.
[0211] Step 5: Apply the Bayesian optimization algorithm to optimize the follow-up forest regression model. First, initialize a set of initial sampling points to build the Gaussian process model. These initial points are randomly sampled from points between the boundaries of the parameter search space; then, for t in the range [0, n_iter], perform the following operations: (1) Use the current Gaussian process model and the selected posterior probability function to determine the optimal value of the next parameter. This is based on the core idea of the Bayesian optimizer: using the information of the existing data, perform Bayesian inference through the Gaussian process model to calculate the next possible optimal parameter value. (2) Evaluate the objective function at the next optimal value, that is, calculate the function value of the objective function at this point. (3) Add the evaluation result to the existing observations and retrain the Gaussian process model so that the latest information can be used for prediction in the next iteration; finally, return the found optimal parameter value, that is, the parameter value corresponding to the minimum value of the objective function obtained in all iterations.
[0212] In response to step 5, the input values for the Bayesian optimization algorithm are: objective_function: the objective function to be optimized, bounds: the boundaries of the parameter search space, n_iter: the number of iterations, init_points: the number of initial sampling points, acq_func: the selected posterior probability function, and kappa: the parameter controlling the exploration and development tradeoff.
[0213] In response to step 5, the algorithm outputs: best_params: optimal parameters.
[0214] Step 6: Train the random forest model based on Bayesian optimization on the test set collected during the operation of the heating network in a heating season.
[0215] In response to step 6, the mean squared error and coefficient of determination are used to evaluate the results of model training.
[0216] The above examples illustrate the method embodiments according to this application. The present invention also provides an optimization device for a heating network model. Figure 7 This is a schematic diagram of the structure of an optimization device for a heating pipe network model according to an embodiment of the present invention. (Refer to...) Figure 7 The optimization device for the heating network model includes the following modules.
[0217] The first acquisition module 1 is used to acquire the predicted load data output by the heating network model in the usage phase of the heating network model, which predicts the load of the heating network in the target time period.
[0218] The second acquisition module 2 is used to acquire the actual load data of the heating network during the target time period;
[0219] The first optimization module 3 is used to optimize at least one hyperparameter of the heating network model based on the predicted load data, the actual load data and the preset optimization algorithm, so as to obtain the optimized hyperparameter value corresponding to the hyperparameter.
[0220] In this embodiment, the first acquisition module 1 can predict the load conditions of the heating network using the heating network model and obtain predicted load data. This facilitates the regulation of the heating network based on the predicted load data, improving the load conditions during the target time period and realizing the monitoring of the heating network. During the use phase of the heating network model, the first optimization module 3 uses actual load data and optimization algorithms, combined with predicted load data, to optimize the hyperparameters of the heating network model. This allows the heating network model to be adjusted according to the actual operation of the heating network, thereby improving the accuracy of subsequent predicted load data and enhancing the reliability of heating network monitoring.
[0221] Optionally, the first optimization module 3 includes a performance evaluation unit for calculating a first performance evaluation value based on the predicted load data and the actual load data, wherein the first performance evaluation value is used to characterize the accuracy of the heating network model in making predictions;
[0222] A function unit is used to determine the objective function based on the first performance evaluation value;
[0223] The first optimization unit is used to process the objective function using an optimization algorithm to obtain the optimized hyperparameter value corresponding to at least one hyperparameter term of the heating network model.
[0224] Optionally, the first performance evaluation value includes at least one of the mean squared error value, the mean absolute error value, and the Pearson correlation coefficient value.
[0225] Optionally, the device further includes a historical data acquisition module for acquiring first historical data of the heating network, wherein the first historical data includes historical operating data and historical load data corresponding to the historical operating data;
[0226] The target prediction module is used to process historical operating data using the optimized heating network model to obtain target predicted load data.
[0227] The performance evaluation module is used to calculate a second performance evaluation value based on the target predicted load data and the corresponding historical load data;
[0228] The results module is used to determine the optimization results based on the first performance evaluation value and the second performance evaluation value, wherein the optimization results are used to characterize the effect of the optimization.
[0229] Optionally, the results module includes a difference unit for calculating the difference between the first performance evaluation value and the second performance evaluation value;
[0230] The result unit is used to determine the optimization result based on the magnitude of the difference value, wherein the larger the difference value, the worse the effect of the optimization is.
[0231] Optionally, the optimization algorithm includes a Bayesian optimization algorithm.
[0232] Optionally, the heating network model includes a random forest regression model.
[0233] The above examples illustrate the method embodiments according to this application. The present invention also provides a load prediction device for a heating network. Figure 8 This is a schematic diagram of a load prediction device for a heating network according to an embodiment of the present invention. (Refer to...) Figure 8 The load forecasting device for the heating network includes the following modules.
[0234] The third acquisition module 4 is used to acquire the operating data of the heating network;
[0235] Prediction module 5 is used to process the operating data using a preset heating network model to obtain predicted load data, wherein the predicted load data is used to characterize the load of the heating network during the target time period.
[0236] The second optimization module 6 is used to optimize at least one hyperparameter of the heating network model based on the predicted load data and the actual load data of the heating network during the target time period.
[0237] Optionally, the runtime data includes different types of runtime data and / or runtime data obtained through different acquisition methods;
[0238] The device also includes a preprocessing module for preprocessing the running data using the same or different data processing methods depending on the type and / or acquisition method of the running data.
[0239] Optionally, the operational data includes temperature and pressure; preprocessing includes feature engineering;
[0240] The device also includes a feature engineering module for performing feature engineering on temperature and pressure to obtain a temperature-pressure ratio, which is then used as operating data to process the heating network model.
[0241] The above describes the device embodiments of this application. For detailed descriptions of data, terms, nouns, specific execution processes of steps, technical problems and effects, alternative methods and combinations, please refer to the description in the method embodiments, which will not be repeated here.
[0242] This application also provides a computer program product that includes computer instructions that, when executed by a computer or processor, cause the steps of the above-described method to be performed.
[0243] This application also provides a computer-readable storage medium storing a computer program that, when run on a computer or processor, causes the computer or processor to perform the steps of the above-described method.
[0244] This application also provides an electronic device, including a memory and a processor. The memory stores a computer program, and the processor is used to perform the steps of the method described above when executing the computer program.
[0245] Specifically, such as Figure 9 As shown, the electronic device includes a processor 100, at least one communication bus 200, a user interface 300, at least one external communication interface 400, and a memory 500. The communication bus 200 is configured to enable communication between these components. The user interface 300 may include a display screen, and the external communication interface 400 may include standard wired and wireless interfaces. The memory 500 stores optimization methods for heating network models and / or load forecasting methods for heating networks. The processor 100 is used to employ the aforementioned methods when executing the optimization methods for heating network models and / or load forecasting methods for heating networks stored in the memory 500.
[0246] The descriptions of the above computer program products, computer-readable storage media, and electronic devices are similar to those of the above method embodiments, and have similar beneficial effects. For any technical details not disclosed in the computer program products, computer-readable storage media, and electronic devices of this application, please refer to the descriptions of the method embodiments of this application for understanding.
[0247] The sequence numbers or order of description of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0248] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0249] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0250] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0251] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer, or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital versatile disc (DVD)), or a semiconductor medium (e.g., solid state disk (SSD)). It is worth noting that the computer-readable storage medium mentioned in the embodiments of this application can be a non-volatile storage medium; in other words, it can be a non-transient storage medium.
[0252] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in the embodiments of this application are all authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the scene data of the current frame in the 3D virtual scene involved in the embodiments of this application, the client's device information, and the scene interaction information are all obtained with full authorization.
[0253] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for optimization of a heat distribution network model, characterized in that, The method comprises: In the use stage of the heat supply pipe network model, predicted load data output by the heat supply pipe network model for predicting the load condition of the heat supply pipe network in a target time period is acquired, the number of the predicted load data is at least two, and a target function is obtained according to the at least two predicted load data and corresponding times, the target function being represented as a curve composed of a first performance evaluation value and time; Actual load data of the heat supply pipe network in the target time period is acquired, the actual load data being real load data of the heat supply pipe network; According to the predicted load data, the actual load data and a preset optimization algorithm, at least one hyperparameter of the heat supply pipe network model is optimized to obtain an optimized hyperparameter value corresponding to the hyperparameter; According to the predicted load data, the actual load data and a preset optimization algorithm, at least one hyperparameter of the heat supply pipe network model is optimized to obtain an optimized hyperparameter value corresponding to the hyperparameter, comprising: A first performance evaluation value is calculated according to the predicted load data and the actual load data, wherein the first performance evaluation value is used to represent the accuracy of the prediction of the heat supply pipe network model; A target function is determined according to the first performance evaluation value; The target function is processed by using the optimization algorithm to obtain the optimized hyperparameter value corresponding to the at least one hyperparameter of the heat supply pipe network model; The hyperparameters of the heat supply pipe network model need to be modified in real time, so that after the optimization algorithm calculates the optimized hyperparameter value, the optimized hyperparameter value is directly updated to the heat supply pipe network model without the need to reconstruct or train the heat supply pipe network model according to the optimized hyperparameter value; The target function is processed by using the optimization algorithm to obtain the optimized hyperparameter value corresponding to the at least one hyperparameter of the heat supply pipe network model, comprising: After the target function is determined based on the first performance evaluation value, the target function is processed by using the optimization algorithm, which is beneficial to finding the minimum value in the first performance evaluation value, and the hyperparameter value corresponding to the minimum value in the first performance evaluation value is taken as the optimized hyperparameter value; After the at least one hyperparameter of the heat supply pipe network model is optimized according to the predicted load data, the actual load data and the preset optimization algorithm to obtain the optimized hyperparameter value corresponding to the hyperparameter, the method further comprises: First historical data of the heat supply pipe network is acquired, wherein the first historical data comprises historical operation data and historical load data corresponding to the historical operation data; The historical operation data is processed by using the optimized heat supply pipe network model to obtain target predicted load data; A second performance evaluation value is calculated according to the target predicted load data and the corresponding historical load data; An optimization result is determined according to the first performance evaluation value and the second performance evaluation value, wherein the optimization result is used to represent the effect of the optimization; The optimization result is determined according to the first performance evaluation value and the second performance evaluation value, comprising: A difference value between the first performance evaluation value and the second performance evaluation value is calculated; The optimization result is determined according to the size of the difference value, wherein the larger the difference value is, the worse the optimization result represents the effect of optimization.
2. The optimization method of a heating pipe network model according to claim 1, characterized in that, The first performance evaluation value comprises at least one of a mean square error value, a mean absolute error value and a Pearson correlation coefficient value.
3. The optimization method of a heat supply pipe network model according to any one of claims 1 or 2, characterized in that, The optimization algorithm comprises a Bayesian optimization algorithm.
4. The optimization method of a heat supply network model according to any one of claims 1 or 2, characterized in that, The heat supply network model comprises a random forest regression model.
5. A load forecasting method for a heating pipe network, characterized by, The method comprises: acquiring operation data of the heat supply network; processing the operation data by using a preset heat supply network model to obtain predicted load data, wherein the predicted load data is used to represent the load condition of the heat supply network in a target time period; optimizing at least one hyperparameter of the heat supply network model according to the predicted load data and actual load data of the heat supply network in the target time period; The optimization adopts the optimization method of any one of claims 1-4.
6. The load forecasting method of a heating pipe network according to claim 5, characterized by, The operation data comprises different types of operation data and / or operation data obtained in different ways; Before the operation data is processed by using the preset heat supply network model to obtain the predicted load data, the method further comprises: preprocessing the operation data by using the same or different data processing methods according to the types and / or acquisition methods of the operation data.
7. The load forecasting method of a heating pipe network according to claim 6, characterized by, The operation data comprises at least two of water supply temperature, water supply pressure, return water temperature, return water pressure, heat supply network flow, and regulating valve opening degree in the heat supply network; The preprocessing comprises feature engineering; The method further comprises: processing the water supply temperature and the water supply pressure by the feature engineering to obtain a temperature-pressure ratio, and using the temperature-pressure ratio as the operation data to obtain the processing of the heat supply network model, and / or, processing the water supply temperature and the heat supply network flow by the feature engineering to obtain a temperature-flow ratio, and using the temperature-flow ratio as the operation data to obtain the processing of the heat supply network model, and / or, calculating the average value of the difference between the water supply temperature and the return water temperature and processing the average value and the heat supply network flow by the feature engineering to obtain an average-flow ratio, and using the average-flow ratio as the operation data to obtain the processing of the heat supply network model, and / or, processing the average value and the regulating valve opening degree by the feature engineering to obtain an average-opening ratio, and using the average-opening ratio as the operation data to obtain the processing of the heat supply network model, and / or, calculating the difference between the water supply pressure and the return water pressure and processing the average value and the difference by the feature engineering to obtain an average-difference ratio, and using the average-difference ratio as the operation data to obtain the processing of the heat supply network model.
8. An optimization device for a heat distribution network model, characterized in that The device comprises: a first acquisition module, configured to, in a use stage of a heat supply network model, acquire predicted load data output by the heat supply network model for predicting the load condition of a heat supply network in a target time period, wherein the number of the predicted load data is at least two, and a target function can be obtained according to the at least two predicted load data and corresponding time, and the target function is represented as a curve composed of a first performance evaluation value and time. The second obtaining module is configured to obtain actual load data of the heat supply pipe network in the target time period; The first optimization module is configured to optimize at least one hyperparameter of the heat supply pipe network model according to the predicted load data and the actual load data and a preset optimization algorithm, to obtain an optimized hyperparameter value corresponding to the hyperparameter; The first optimization module is specifically configured to calculate a first performance evaluation value according to the predicted load data and the actual load data, where the first performance evaluation value is used to represent the accuracy of the prediction of the heat supply pipe network model; The target function is determined according to the first performance evaluation value; The optimization algorithm is used to process the target function, to obtain the optimized hyperparameter value corresponding to the at least one hyperparameter of the heat supply pipe network model; The hyperparameters of the heat supply pipe network model need to be modified in real time, so that after the optimization algorithm calculates the optimized hyperparameter value, the optimized hyperparameter value is directly updated to the heat supply pipe network model, without the need to reconstruct or train the heat supply pipe network model according to the optimized hyperparameter value; The processing of the target function by the optimization algorithm to obtain the optimized hyperparameter value corresponding to the at least one hyperparameter of the heat supply pipe network model includes: After the target function is determined based on the first performance evaluation value, the optimization algorithm is used to process the target function, to find the minimum value in the first performance evaluation value, and the hyperparameter value corresponding to the minimum value in the first performance evaluation value is taken as the optimized hyperparameter value; The first optimization module is further configured to obtain first historical data of the heat supply pipe network, where the first historical data includes historical operation data and historical load data corresponding to the historical operation data; The optimized heat supply pipe network model is used to process the historical operation data, to obtain target predicted load data; A second performance evaluation value is calculated according to the target predicted load data and the corresponding historical load data; An optimization result is determined according to the first performance evaluation value and the second performance evaluation value, where the optimization result is used to represent the effect of the optimization; The determination of the optimization result according to the first performance evaluation value and the second performance evaluation value includes: A difference value between the first performance evaluation value and the second performance evaluation value is calculated; The optimization result is determined according to the size of the difference value, where the larger the difference value is, the worse the optimization result represents the effect of the optimization.
9. A load forecasting device for a heat supply network, characterized in that The apparatus includes: The third obtaining module is configured to obtain operation data of the heat supply pipe network; The prediction module is configured to process the operation data by using a preset heat supply pipe network model, to obtain predicted load data, where the predicted load data is used to represent the load condition of the heat supply pipe network in a target time period; The second optimization module is configured to optimize at least one hyperparameter of the heat supply pipe network model according to the predicted load data and actual load data of the heat supply pipe network in the target time period; The optimization adopts the optimization method of any one of claims 1-4.
10. An electronic device, comprising: The electronic device includes a memory and a processor; The memory is configured to store a computer program. The processor is configured to execute the computer program to implement steps of the method in any one of claims 1-7.
11. A computer readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and when the computer program is executed on a computer or a processor, the computer or the processor is caused to execute steps of the method in any one of claims 1-7.
12. A computer program product, characterised in that, The computer program product comprises computer instructions, and when the computer instructions are executed by a computer or a processor, steps of the method in any one of claims 1-7 are caused to be executed.
Citation Information
Patent Citations
Neural network thermal load prediction model automatic optimization method and device
CN115630561A