Machine learning based heating demand prediction method, system, device and medium

By using sensor networks and machine learning technology, heating output data is collected and processed in real time, solving the problem of multi-source heterogeneous time-series data fusion in heating systems, achieving high-precision heating demand prediction, and improving the stability and applicability of prediction results.

CN122243684APending Publication Date: 2026-06-19UNIV OF SHANGHAI FOR SCI & TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
UNIV OF SHANGHAI FOR SCI & TECH
Filing Date
2026-03-27
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing heating systems struggle to effectively integrate multi-source heterogeneous time-series data in demand forecasting, resulting in a tradeoff between long-term stability and sensitivity to short-term load fluctuations, thus impacting overall performance.

Method used

By deploying a sensor network to collect heating output data in real time, and using a layer-by-layer processing mechanism for data processing, including data stability screening and boundary adjustment, a heat demand prediction model is constructed, and machine learning algorithms are used to predict heating demand.

Benefits of technology

It enables comprehensive and continuous acquisition of the operating status of the heating system, improves the availability and reliability of the data, enhances the credibility and engineering applicability of heat demand forecasting, and solves the problems of data stability and time series continuity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122243684A_ABST
    Figure CN122243684A_ABST
Patent Text Reader

Abstract

This invention belongs to the field of heating demand forecasting, specifically a heating demand forecasting method, system, equipment, and medium based on machine learning. The forecasting method includes: dividing the collected real-time heating output data into time subsequences by segmenting the continuous heating output time series according to a preset time window length, and determining the input data for the heat demand forecasting model; constructing a heat demand forecasting model based on machine learning, using the processed heating output data as input data for the heat demand forecasting model, and forecasting the heating demand of the heating system based on the output results of the heat demand forecasting model; this invention adopts a hierarchical and progressive data processing mechanism, sequentially performing basic consistency processing, stability screening, and boundary continuity adjustment on the collected real-time heating output data, thereby improving the usability and reliability of the data layer by layer without introducing complex mathematical modeling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of heating demand forecasting, specifically a heating demand forecasting method, system, equipment, and medium based on machine learning. Background Technology

[0002] Currently, demand forecasting for heating systems relies heavily on historical heating data, outdoor meteorological parameters (such as ambient temperature, humidity, and wind speed), and human experience models. However, in practical engineering applications, models are usually built for a single time scale or a small number of features, and the sources of training data are relatively limited, making it difficult to fully depict the complex nonlinear relationship between heating demand and fluctuations in climate change, building thermal inertia, and user heating behavior. However, existing technologies are mainly limited by the core technical bottleneck of effectively integrating multi-source heterogeneous time-series data and accurately characterizing the dynamic evolution of heating load when achieving high-precision heating demand forecasting. This makes it difficult to balance the long-term stability of forecast results with the sensitivity to short-term load changes in practical applications, thus affecting overall performance. Summary of the Invention

[0003] To address the aforementioned technical problems, this invention provides a machine learning-based heating demand forecasting method to solve the core technical bottlenecks in existing technologies, such as the difficulty in effectively integrating multi-source heterogeneous time-series data and accurately characterizing the dynamic evolution of heating load.

[0004] The machine learning-based heating demand forecasting method includes the following steps: deploying a sensor network to collect real-time heating output data from the heating system, and processing the collected heating output data based on a layer-by-layer processing mechanism, specifically: The collected real-time heating output data is divided into time subsequences by segmenting the continuous heating output time series according to the preset time window length. The data stability of the heating output data under each scan slice is calculated, and the initial parent data slice is determined based on the calculated data stability. Based on the determined initial parent data slice, a boundary adjustment mechanism based on time adjacency is introduced to correct local anomaly offsets, and a first-generation processing data set is determined. The input data of the heat demand prediction model is determined through a data augmentation mechanism. The heating demand of the heating system is predicted based on the output of the heat demand prediction model, specifically as follows: A heat demand prediction model is constructed based on machine learning, and the heat output data after data processing is used as the input data for the heat demand prediction model. The heat demand of the heating system is predicted based on the output results of the heat demand prediction model.

[0005] Preferably, the process of dividing the continuous heating output time series into segments to form time subsequences is as follows: Set the time window length to Then the heating output data can be... Divided into If we scan slices at different times, then we have:

[0006] in, Indicates the first A time-scan slice containing a time interval Heating output data from all internal sensors This represents the total number of time-scan slices divided, and satisfies the formula. For a single time scan slice Then the formula is satisfied. .

[0007] Preferably, the determination of the initial parent data slice is as follows: Calculating the data stability of the heating output data under each scan slice involves calculating the average of the heating output data collected by all sensors under each scan slice, and using this average as the data stability index for the current scan slice. Simultaneously, the real-time heating output data set is divided into... The mean of each scan slice is used as the threshold for the data stability index. The spatial similarity between the data stability index of each scan slice and the data stability index threshold is calculated, and the scan slice with the highest spatial similarity is selected as the initial parent data slice.

[0008] Preferably, the step of selecting the scan slice with the highest spatial similarity as the initial parent data slice is as follows: Time-scanned slices Within the system, the heating output data from all sensors are averaged over time. The average results from different sensors are then aggregated to obtain a stability index at the scan slice level. Simultaneously, the overall average of the stability indices for all scan slices is calculated and used as a reference threshold for data stability. ; By calculating the stability index of the scan slice at each time step Compared with the overall stability reference threshold The similarity relationship between them is used to determine the initial parent data slice.

[0009] Preferably, the introduction of a boundary adjustment mechanism based on temporal adjacency to correct local anomaly offsets is as follows: For a given initial parent data slice, the difference between the heating output data collected by each sensor in the initial parent data slice and the data stability index of the initial parent data slice is calculated. This process is repeated for each sensor, and the heating output data collected by the five sensors with the largest differences is selected from all the calculation results. This selected data is used as the boundary adjustment filter set. Simultaneously, the slice is scanned from adjacent time periods. , The heating output data collected by sensors with the same serial number is used as the boundary adjustment judgment data set. The boundary adjustment filter data set is compared with the boundary adjustment judgment data, and the data boundary is adjusted according to the comparison results.

[0010] Preferably, the data boundary adjustment based on the comparison results is as follows: The cosine similarity between the heating output data collected by the same sensor in the boundary adjustment filtering data set and the boundary adjustment judgment data set is compared. A cosine similarity threshold is set. If the calculated cosine similarity exceeds the set threshold, the heating output data collected by the sensor in the boundary adjustment filtering data set that exceeds the set threshold is subjected to boundary adjustment. This process continues until the cosine similarity between the adjusted heating output data collected by the sensor and the heating output data collected by the same sensor in the boundary adjustment judgment data set is lower than the set threshold. At this point, the boundary adjustment is considered complete, and the heating output data of the initial parent data slice after adjustment is used as the first-generation processing data set.

[0011] Preferably, the step of predicting the heating demand of the heating system based on the output of the heat demand prediction model is as follows: The heating output data from historical operation data is used as the input data for model training, and the corresponding heat demand data is used as the output result for model training. A supervised learning dataset for model training is constructed. The constructed dataset The dataset is divided into a training set and a test set, with the training set accounting for 80% and the test set accounting for 20%. Based on the training set data, a regression model is constructed using the random forest algorithm. Multiple regression decision trees are used to model the input features, which are the heating output data at different time points in the supervised learning dataset. Based on the heat demand data in the supervised learning dataset, the heat demand values ​​predicted by the prediction model are trained and iterated. Once the trained heat demand prediction model is put into actual operation, the heat output data, after real-time collection and processing, will be input into the trained heat demand prediction model. Based on the model's output results, the future heat demand of the heating system can be predicted.

[0012] Preferably, the machine learning-based heating demand forecasting system includes a heating output data acquisition and processing module and a heating demand forecasting module. The heating output data acquisition and processing module collects real-time heating output data of the heating system by deploying a sensor network, and processes the collected heating output data using a layer-by-layer processing mechanism to improve the accuracy of the collected heating output data. The heating demand prediction module constructs a heating demand prediction model using machine learning algorithms, iteratively trains the constructed heating demand prediction model using historical operating data of the heating system, and uses the trained heating demand prediction model to predict the heating demand of the heating system.

[0013] The present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described machine learning-based heating demand prediction method.

[0014] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described machine learning-based heating demand prediction method.

[0015] Compared with the prior art, the present invention has the following beneficial effects: 1. This invention achieves comprehensive and continuous acquisition of the operating status of the heating system by adopting multi-source real-time heating output data acquisition technology based on sensor networks and combining it with a unified data structure organization method. This solves the problem in the prior art that the heating data sources are scattered, the time sequence is inconsistent, and it is difficult to form high-quality input data that can be used for model training.

[0016] 2. This invention adopts a layered and progressive data processing mechanism to perform basic consistency processing, stability screening, and boundary continuity adjustment on the collected real-time heating output data in sequence. This achieves the improvement of data availability and reliability layer by layer without introducing complex mathematical modeling, and solves the technical bottleneck of existing single data cleaning methods that cannot take into account both data stability and temporal continuity.

[0017] 3. By introducing a data organization and processing method based on "scanning slices" as the basic unit, this invention realizes a structured expression of heating output data in the time dimension, enabling the data processing process to take into account both the stable characteristics within a local time period and the overall operating trend. This solves the problem of feature distortion or noise accumulation caused by directly using instantaneous data or long-term series as model input in the prior art.

[0018] 4. By adopting a slice screening and iterative verification mechanism based on data stability indicators, this invention achieves objective evaluation and convergence control of the quality of heating output data, avoids disordered adjustment or infinite iteration in the data processing process, and solves the problems of lack of clear termination conditions and unstable processing results in the prior art.

[0019] 5. This invention uses the heat output data that has undergone multi-layer processing and iterative convergence verification as input data for the heat demand prediction model, thereby providing stable, continuous and representative training and prediction samples for the machine learning model. This effectively improves the credibility and engineering applicability of the heat demand prediction results and solves the problem that the model prediction results are highly sensitive to noise in the original data in the prior art. Attached Figure Description

[0020] Figure 1 This is a schematic diagram of the overall method steps of the machine learning-based heating demand prediction method of the present invention.

[0021] Figure 2 This is a schematic diagram of the overall structure of the heating demand prediction method system based on machine learning of the present invention. Detailed Implementation

[0022] The embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples. The following examples are for illustrative purposes only and should not be construed as limiting the scope of the invention. Example 1

[0023] Reference Figure 1 As an embodiment of the present invention, a heat demand prediction method based on machine learning is provided, including the following steps: S1: Collects real-time heating output data from the heating system and processes the collected data.

[0024] Specifically, collecting real-time heating output data from the heating system involves deploying a sensor network to collect this data in real time. The collected data is then processed using a layer-by-layer processing mechanism to improve its accuracy, providing a precise data foundation for subsequent heating demand forecasting. The specific implementation is as follows: Collecting real-time heating output data from the heating system involves deploying a sensor network to collect this data in real time. Therefore: Assuming the heating system is equipped with Each sensor, during continuous operation time interval If the system collects real-time heating output data from the heating system and constructs it into a real-time heating output data set, then:

[0025]

[0026] in, This represents the collection of real-time heating output data, which is a continuous time series data set. Indicates the heating system is in Real-time heating output data, Indicates the first sensor is in Heating output data collected in real time Indicates the first One sensor in Heating output data collected in real time This indicates the total number of sensors, which is set by the implementers based on the actual application scenario. This indicates the total sampling time.

[0027] Furthermore, before using the collected real-time heating output data as input data for the heat demand prediction model, the real-time heating output data collected by each sensor is processed to ensure the accuracy of the data input into the heat demand prediction model. The specific processing is as follows: Based on a layer-by-layer processing mechanism, the real-time heating output data collected by each sensor is processed layer by layer, and the accuracy of the data is improved layer by layer, as follows: The collected real-time heating output data is divided according to a time axis to form multiple time scan slices. The time scan slices are based on a preset time window length. For continuous heating output time series The time subsequence formed by segmentation is as follows: Set the time window length to Then the heating output data can be... Divided into If we scan slices at different times, then we have:

[0028] in, Indicates the first A time-scan slice containing a time interval Heating output data from all internal sensors This represents the total number of time-scan slices divided, and satisfies the formula. For a single time scan slice Then the formula is satisfied. ; Calculate the data stability of the heating output data under each scan slice, and determine the initial parent data slice based on the calculated data stability, specifically as follows: Calculating the data stability of the heating output data under each scan slice involves calculating the average of the heating output data collected by all sensors under each scan slice, and using this average as the data stability index for the current scan slice. Simultaneously, the real-time heating output data set is divided into... The mean of each scan slice is used as the data stability index threshold. The spatial similarity between the data stability index of each scan slice and the data stability index threshold is calculated, and the scan slice with the highest spatial similarity is selected as the initial parent data slice. .

[0029] It should be noted that for each time-scan slice Define its data stability index This is used to reflect the overall stability of heating output data within a given time period, specifically: Time-scanned slices Within this time period, the heating output data of all sensors are averaged over time. The average results from different sensors are then summarized to obtain a stability index at the scan slice level. Simultaneously, the overall average of the stability indices for all scan slices is calculated and used as a reference threshold for data stability. ; By calculating the stability index of the scan slice at each time step Compared with the overall stability reference threshold The similarity relationship between the data slices was determined by selecting the scan slice with the stability closest to the overall operating state as the initial parent data slice. The similarity was calculated using a similarity metric based on Euclidean distance, specifically: The smaller the Euclidean distance, the closer the operating state of the scanned slice is to the overall system operating level. Therefore, the scanned slice with the smallest Euclidean distance should be selected. As the initial parent data slice.

[0030] Furthermore, in the multi-sensor data acquisition of heating systems, some sensors may generate instantaneous offset values ​​due to short-term interference, communication jitter, or changes in local operating conditions. If such offset data is directly input into the prediction model, it is easy to amplify noise features and affect the model training and prediction stability. Based on the initial parent data slices, a boundary adjustment mechanism based on temporal adjacency is introduced to correct local abnormal offsets. The specific implementation is as follows: For a given initial parent data slice, the difference between the heating output data collected by each sensor in the initial parent data slice and the data stability index of the initial parent data slice is calculated. This process is repeated for each sensor, and the heating output data collected by the five sensors with the largest differences are selected from all the calculation results (this embodiment describes five sensors; in actual applications, the number of sensors should be set by the implementer according to the specific application scenario; this invention does not impose limitations). The selected sensor heating output data is used as the boundary adjustment filtering data set. Simultaneously, adjacent time slices are scanned. , The heating output data collected by sensors with the same serial number is used as the boundary adjustment judgment data set. The boundary adjustment filtered data set is compared with the boundary adjustment judgment data, and the data boundary is adjusted according to the comparison results. Specifically: The cosine similarity between the heating output data collected by the same sensor in the boundary adjustment filtering data set and the boundary adjustment judgment data set is compared. A cosine similarity threshold is set. If the calculated cosine similarity exceeds the set threshold, the heating output data collected by the sensor in the boundary adjustment filtering data set that exceeds the set threshold is subjected to boundary adjustment. This process continues until the cosine similarity between the adjusted heating output data collected by the sensor and the heating output data collected by the same sensor in the boundary adjustment judgment data set is lower than the set threshold. At this point, the boundary adjustment is considered complete, and the heating output data of the initial parent data slice after adjustment is used as the first-generation processing data set.

[0031] It should be noted that boundary adjustment of the heating output data collected by sensors that exceed the set cosine similarity in the boundary adjustment filter dataset involves extracting the heating output data corresponding to the same sensor number from adjacent time scan slices as temporally adjacent reference data. Therefore: From the scanned slices at the previous time Extracting sensors Heating output data ; Scan the slice from the next time point Extracting sensors Heating output data When a time scan slice is missing on one side, only the data from the existing side is used as a reference. Based on the extracted temporal proximity reference data, a temporal consistency reference value is constructed for boundary adjustment. Then we have: when and When both exist, the arithmetic mean of the two is taken as the time consistency reference value; when only one exists, the existing heating output data is directly used as the time consistency reference value. Boundary adjustment is based on time consistency reference values. Perform smoothing correction, specifically: The direction of the time consistency reference value for heating output data that requires boundary adjustment is corrected to ensure that the corrected heating output data is within the range between the data before adjustment and the time consistency reference value, and does not exceed the maximum and minimum value range of the corresponding sensor heating output data of adjacent time scan slices.

[0032] For the corrected heating output data, the cosine similarity is recalculated with the heating output data corresponding to the same sensor number in adjacent time scan slices, resulting in: If the recalculated cosine similarity is lower than the set cosine similarity threshold, the boundary adjustment of the sensor's heating output data is considered complete. Otherwise, the boundary adjustment is not complete, and the boundary adjustment continues until it is lower than the set cosine similarity threshold.

[0033] Based on the first-generation processed dataset, data augmentation processing is performed, specifically as follows: Given the total number of sensors in the determined first-generation processed data set, and based on the sensor serial numbers, the first-generation processed data set is divided into two parts (for sensors with intermediate serial numbers, the data set is divided into two parts with the same number of sensors). Based on the data in these two parts, the data from the first part is compared with the previous scan slice. The latter part of the data is swapped, and the latter part of the data is then included in the next scan slice. The first part of the data is exchanged, and the heating output data after the data exchange is completed is used as the second-generation processing data set.

[0034] It should be noted that for the iterations between the first-generation and second-generation data sets, iterative convergence verification was performed using data stability metrics, specifically: Calculate the data stability index for the first and second generation processed datasets respectively; When the spatial similarity between the data stability index corresponding to the second-generation processed dataset and the data stability index threshold is less than the spatial similarity between the data stability index corresponding to the first-generation processed dataset and the data stability index threshold, it is determined that the iteration has converged. When the number of iterations reaches the maximum number of iterations When this happens, the iteration is forcibly terminated; After the iteration is completed, the second-generation processed dataset becomes the input data for the heat demand prediction model and is used for subsequent heat demand prediction of the heating system.

[0035] S2: Predict the heating demand of the heating system based on the output of the heat demand prediction model.

[0036] Specifically, predicting the heating demand of a heating system based on the output of a heat demand prediction model involves building the model using machine learning, and using the processed heating output data as input. The specific implementation is as follows: Before constructing the heat demand prediction model, a supervised learning dataset for model training is built based on historical heating operation data, specifically: Using the same data collection method and constructing sample data using a time sliding window approach, we have: Set the time window length to If we take historical heating data within the time window and heat demand data at the corresponding time points, then we have:

[0037] in, This represents the collected historical heating output data. express Historical heating output data corresponding to each moment This indicates the length of the set time window, which can be set by the implementer according to the actual application scenario. Simultaneously, based on the collected historical heating output data, the heat demand data for the corresponding time points are extracted, resulting in:

[0038] in, This represents the collected historical heat demand data. express Historical heat demand data corresponding to the given time; Historical heating output data is used as input data for model training, and corresponding heat demand data is used as output data. A supervised learning dataset is then constructed for model training. .

[0039] A heat demand prediction model is constructed using machine learning algorithms. These algorithms can be random forest regression models, gradient boosting regression models, or deep neural network models. This embodiment uses the random forest regression model as an example for illustration, as detailed below: The constructed dataset The dataset is divided into a training set and a test set, with the training set accounting for 80% and the test set accounting for 20%. Based on the training set data, a regression model is constructed using the random forest algorithm. Multiple regression decision trees are used to model the input features, which are the heating output data at different time points in the supervised learning dataset. For any input feature, using the prediction results from all regression decision trees in the random forest, we have:

[0040] in, This represents the predicted heat demand value from the forecasting model. This represents the total number of regression decision trees, which is set by the implementers based on the actual application scenario. This represents the input features within the time window, which are the heating output data at different time points in the supervised learning dataset; Based on the calorie demand data in the supervised learning dataset, the predicted calorie demand values ​​of the prediction model are trained and iterated, specifically as follows: Heat demand value predicted by the prediction model Extracting heat demand data for the corresponding time moments from the supervised learning dataset. And based on the pre-existing calorie demand data, the model is trained using mean squared error for iterative training, then:

[0041] in, This indicates the first [item] in the supervised learning dataset. Caloric requirement data for each sample This indicates the prediction result for the corresponding sample in the heat prediction model, and represents the length of the set time window. The mean squared error is calculated and used for training iteration verification, specifically as follows: Set the mean square error threshold The calculated mean square error is then compared with the set mean square error threshold. If the comparison result satisfies the formula... If the result is positive, it means that the heat demand prediction model has been successfully trained and the prediction results are accurate. Otherwise, it means that the heat demand prediction model has not been successfully trained. The model parameters should be adjusted to continue training the heat demand prediction model until the output results of the trained heat demand prediction model are accurate.

[0042] It should be noted that after the trained heat demand prediction model is put into actual operation, the heat output data after real-time collection and processing will be input into the trained heat demand prediction model. Based on the model output results, the future heat demand of the heating system can be predicted, providing data basis for subsequent heating scheduling and energy allocation.

[0043] Example 2

[0044] Reference Figure 2 As an embodiment of the present invention, a heat demand prediction system based on machine learning is provided, including a heat output data acquisition and processing module and a heat demand prediction module. Specifically, the heating output data acquisition and processing module collects real-time heating output data of the heating system by deploying a sensor network, and uses a layer-by-layer processing mechanism to process the collected heating output data in order to improve the accuracy of the collected heating output data. The heating demand forecasting module constructs a heating demand forecasting model using machine learning algorithms, iteratively trains the model using historical operating data of the heating system, and then uses the trained model to forecast the heating demand of the heating system.

[0045] Furthermore, the heating output data acquisition and processing module is the data foundation layer of the entire heating demand forecasting system. Its core function is to transform the raw, multi-source, and continuous heating output data generated during the operation of the heating system into highly reliable input data that meets the requirements of machine learning modeling. Specifically: Deploy sensor networks at key nodes of the heating system to continuously collect real-time heating output status. Key nodes include, but are not limited to, the output end on the heat source side, key branch nodes of the pipeline network, and return water nodes on the user side, so as to ensure that the collected data can truly reflect the operating characteristics of the heating system at different spatial locations and at different times. After completing real-time data acquisition, the heating output data acquisition and processing module does not directly transmit the raw heating output data to the heating demand prediction module. Instead, it uses the data processing method described in the manual to process the acquired data layer by layer. The layer-by-layer processing mechanism uses time scan slices as the basic processing unit. By structuring the heating output data in the time dimension, the subsequent processing can be carried out around "data consistency within local time periods" and "data continuity between adjacent time periods". During the layer-by-layer processing, the heating output data acquisition and processing module completes basic consistency correction, stability screening, and adjacent time boundary continuity adjustment in sequence according to the coarse-to-fine processing logic. This ensures that the processed heating output data maintains the true operating characteristics while significantly reducing the uncertainty caused by sensor fluctuations, communication delays, or instantaneous load disturbances. Thus, the heating output data acquisition and processing module not only undertakes the data acquisition function but also plays a role in engineering constraints and standardization of data quality. Ultimately, the data output by the heating output data acquisition and processing module is no longer a simple set of raw measurement values, but a set of heating output data that has been verified for stability and meets the requirements of time continuity, providing a reliable data input foundation for the model building and inference of the subsequent heating demand prediction module.

[0046] The heating demand forecasting module is built upon the output of the heating output data acquisition and processing module. Its core function is to use machine learning technology to characterize the inherent patterns of heating system load evolution over time, and based on this, to predict future heating demand. Specifically: In this embodiment, the heating demand prediction module first constructs a heating demand prediction model based on machine learning algorithms. The heating demand prediction model uses the processed heating output data as the main input features and is trained by combining the historical operating data of the heating system. This enables the model to learn the load change patterns of the heating system under different operating conditions. Since the input data has been quality-constrained through the aforementioned layer-by-layer processing mechanism, the model training process no longer needs to undertake complex data cleaning tasks, thus allowing it to focus more on learning the heating demand change patterns themselves. During the model training phase, the heating demand prediction module uses multiple rounds of iterative training on historical operating data to enable the prediction model to gradually establish a mapping relationship between the heating output status and the actual heating demand. The established mapping relationship not only reflects the long-term operating trend, but also retains the load change characteristics of the heating system in a short time scale to a certain extent, thereby improving the practicality of the prediction results in engineering application scenarios. After the model training is completed, the heating demand prediction module receives the latest processed data from the heating output data acquisition and processing module and uses it as the model input to output the heating demand prediction results for the corresponding time or future time period. Since the input data of the prediction model is consistent with the data processing mechanism in the training stage, the stability and consistency of the model inference process are guaranteed at the system level.

[0047] It should be noted that the heating output data acquisition and processing module and the heating demand prediction module are not set up independently, but rather form a cohesive and mutually supportive whole structure based on the methods described in the instruction manual. The former provides a high-quality and learnable data foundation for the latter through data processing design at the method level, while the latter transforms the processed data into heating demand prediction results that are instructive for the operation of the heating system through predictive capabilities at the model level.

[0048] Furthermore, if the aforementioned function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0049] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-including system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.

[0050] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.

[0051] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A heat demand forecasting method based on machine learning, characterized in that: Includes the following steps, A sensor network is deployed to collect real-time heating output data from the heating system, and the collected heating output data is processed based on a layer-by-layer processing mechanism, specifically as follows: The collected real-time heating output data is divided into time subsequences by segmenting the continuous heating output time series according to the preset time window length. The data stability of the heating output data under each scan slice is calculated, and the initial parent data slice is determined based on the calculated data stability. Based on the determined initial parent data slice, a boundary adjustment mechanism based on time adjacency is introduced to correct local anomaly offsets, and a first-generation processing data set is determined. The input data of the heat demand prediction model is determined through a data augmentation mechanism. The heating demand of the heating system is predicted based on the output of the heat demand prediction model, specifically as follows: A heat demand prediction model is constructed based on machine learning, and the heat output data after data processing is used as the input data for the heat demand prediction model. The heat demand of the heating system is predicted based on the output results of the heat demand prediction model.

2. The heating demand forecasting method based on machine learning as described in claim 1, characterized in that: The process of dividing a continuous heating output time series into segments to form time subsequences is as follows: Set the time window length to Then the heating output data can be... Divided into If we scan slices at different times, then we have: ; in, Indicates the first A time-scan slice containing a time interval Heating output data from all internal sensors This represents the total number of time-scan slices divided, and satisfies the formula. For a single time scan slice Then the formula is satisfied. .

3. The heating demand forecasting method based on machine learning as described in claim 2, characterized in that: The determination of the initial parent data slice is as follows: Calculating the data stability of the heating output data under each scan slice involves calculating the average of the heating output data collected by all sensors under each scan slice, and using this average as the data stability index for the current scan slice. Simultaneously, the real-time heating output data set is divided into... The mean of each scan slice is used as the threshold for the data stability index. The spatial similarity between the data stability index of each scan slice and the data stability index threshold is calculated, and the scan slice with the highest spatial similarity is selected as the initial parent data slice.

4. The heating demand forecasting method based on machine learning as described in claim 3, characterized in that: The process of selecting the scan slice with the highest spatial similarity as the initial parent data slice is as follows: Time-scanned slices Within the system, the heating output data from all sensors are averaged over time. The average results from different sensors are then aggregated to obtain a stability index at the scan slice level. Simultaneously, the overall average of the stability indices for all scan slices is calculated and used as a reference threshold for data stability. ; By calculating the stability index of scan slices at each time step Compared with the overall stability reference threshold The similarity relationship between them is used to determine the initial parent data slice.

5. The heating demand forecasting method based on machine learning as described in claim 4, characterized in that: The introduction of a boundary adjustment mechanism based on temporal adjacency to correct local anomalies is as follows: For a given initial parent data slice, the difference between the heating output data collected by each sensor in the initial parent data slice and the data stability index of the initial parent data slice is calculated. This process is repeated for each sensor, and the heating output data collected by the five sensors with the largest differences is selected from all the calculation results. This selected data is used as the boundary adjustment filter set. Simultaneously, the slice is scanned from adjacent time periods. , The heating output data collected by sensors with the same serial number is used as the boundary adjustment judgment data set. The boundary adjustment filter data set is compared with the boundary adjustment judgment data, and the data boundary is adjusted according to the comparison results.

6. The heating demand forecasting method based on machine learning as described in claim 5, characterized in that: The data boundary adjustment based on the comparison results is as follows: The cosine similarity between the heating output data collected by the same sensor in the boundary adjustment filtering data set and the boundary adjustment judgment data set is compared. A cosine similarity threshold is set. If the calculated cosine similarity exceeds the set threshold, the heating output data collected by the sensor in the boundary adjustment filtering data set that exceeds the set threshold is subjected to boundary adjustment. This process continues until the cosine similarity between the adjusted heating output data collected by the sensor and the heating output data collected by the same sensor in the boundary adjustment judgment data set is lower than the set threshold. At this point, the boundary adjustment is considered complete, and the heating output data of the initial parent data slice after adjustment is used as the first-generation processing data set.

7. The heating demand forecasting method based on machine learning as described in claim 6, characterized in that: The heating demand forecasting of the heating system based on the output of the heat demand forecasting model is as follows: The heating output data from historical operation data is used as the input data for model training, and the corresponding heat demand data is used as the output result for model training. A supervised learning dataset for model training is constructed. The constructed dataset The dataset is divided into a training set and a test set, with the training set accounting for 80% and the test set accounting for 20%. Based on the training set data, a regression model is constructed using the random forest algorithm. Multiple regression decision trees are used to model the input features, which are the heating output data at different time points in the supervised learning dataset. Based on the heat demand data in the supervised learning dataset, the heat demand values ​​predicted by the prediction model are trained and iterated. Once the trained heat demand prediction model is put into actual operation, the heat output data, after real-time collection and processing, will be input into the trained heat demand prediction model. Based on the model's output results, the future heat demand of the heating system can be predicted.

8. A system employing the machine learning-based heating demand forecasting method as described in any one of claims 1 to 7, comprising a heating output data acquisition and processing module, and a heating demand forecasting module; The heating output data acquisition and processing module collects real-time heating output data of the heating system by deploying a sensor network, and processes the collected heating output data using a layer-by-layer processing mechanism to improve the accuracy of the collected heating output data. The heating demand prediction module constructs a heating demand prediction model using machine learning algorithms, iteratively trains the constructed heating demand prediction model using historical operating data of the heating system, and uses the trained heating demand prediction model to predict the heating demand of the heating system.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 7.