Gas heating load separation method and device based on gas consumption behavior pattern recognition and medium
By combining a temporal convolutional network model with heating equipment constraints, interference from domestic gas consumption is identified and eliminated, achieving precise separation of gas heating load. This solves the problem of load statistical distortion in existing technologies and improves the scientific nature and safety of gas system design.
Patent Information
- Application Number
- CN202511877320.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-12
- Publication Date
- 2026-03-13
AI Technical Summary
Existing technologies make it difficult to accurately separate heating loads from integrated gas consumption data, leading to distorted load statistics and affecting the design and operational safety of gas transmission and distribution systems.
A method based on gas consumption behavior pattern recognition is adopted, which utilizes a temporal convolutional network model and the physical constraints of heating equipment to identify and eliminate interference from domestic gas consumption and accurately separate heating loads.
It improves the accuracy and reliability of heating load separation, ensures the scientific and economical design of gas systems, and reduces the risks of investment waste and insufficient gas supply.
Smart Images

Figure CN121658979A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer data processing technology, and in particular to a method, device and medium for separating gas heating loads based on gas consumption behavior pattern recognition. Background Technology
[0002] The planning, design, operation, scheduling, and safety verification of gas transmission and distribution systems all heavily rely on an accurate understanding of the gas load characteristics of end users, especially the hourly load composition and statistical patterns of different types of equipment. Among these, the scientific determination of the simultaneous operation coefficient of gas appliances is the core basis for deciding on pipeline diameter, gas storage facility capacity, and pressure regulating equipment selection, directly affecting the economic efficiency of project investment, the reliability of the gas supply system, and the safety of long-term operation.
[0003] Currently, urban gas companies primarily analyze residential gas consumption patterns based on smart gas meters, such as NB-IoT meters, collecting hourly or daily cumulative gas consumption data. This data represents the sum of gas consumption from all gas appliances in a user's home, including cooking stoves, gas water heaters, and wall-hung boiler heating systems, presenting a unified metering format. In heating areas, especially for users with individual gas wall-hung boilers, their total gas consumption typically includes seasonal, high-load heating gas consumption and non-seasonal, intermittent cooking and domestic hot water consumption. Existing technologies often directly use this total gas consumption data to calculate the simultaneous operating coefficient, or only perform simple outlier removal, a method with inherent limitations.
[0004] First, mixed loads lead to statistical distortion. The simultaneous operation coefficient should reflect the probability of similar gas-consuming devices being used simultaneously during peak hours. However, when calculating directly using total gas consumption data, the coefficient inevitably includes the randomness of gas consumption from completely unrelated devices such as cooking and hot water, causing the calculation results to fail to accurately reflect the usage patterns of gas heating equipment. The calculated coefficients often deviate from reality. If the value is too large, it will lead to overly conservative selection of pipelines and equipment, increasing unnecessary construction costs; if the value is too small, it may result in insufficient gas supply capacity during peak hours, posing safety hazards. Second, existing data cleaning methods struggle to handle the specific noise in this field. Anomalies in gas consumption data are not limited to transmission errors or pulse interference, but also include pattern noise generated by actual user behavior. For example, family gatherings may lead to prolonged, high-load cooking gas consumption, with flow patterns highly similar to heating loads; equipment debugging and atypical lifestyles can generate abnormal sequences that do not conform to conventional statistical distributions. Existing cleaning methods based on thresholds or general statistical models, such as Z-score and IQR, are good at handling isolated point anomalies, but lack the ability to identify the aforementioned long-lasting and complex pattern anomalies. Behavioral noise that is not effectively removed from the analysis data will further affect the accuracy of the statistical characteristics of the load. Therefore, how to effectively identify and separate the actual heating load of users from the total gas consumption data of the fused metering, improve the quality of gas load analysis data, and provide a reliable data foundation for accurately calculating the simultaneous working coefficient of heating appliances and optimizing the design of gas transmission and distribution systems is a technical problem that needs to be solved. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of the existing technology by providing a gas heating load separation method, equipment and medium based on gas consumption behavior pattern recognition. By training a temporal convolutional network model on pure domestic gas consumption data, abnormal morphological regions are identified, and spatiotemporal matching and joint correction are performed with constraints based on the physical characteristics of the equipment. This accurately distinguishes and eliminates continuous domestic gas consumption interference, thereby accurately separating a physically reliable heating load sequence from the fused metering data.
[0006] The objective of this invention can be achieved through the following technical solutions: According to one aspect of the present invention, a method for separating gas heating loads based on gas consumption behavior pattern recognition is provided, the specific steps of which include: S1. Collect raw hourly gas flow data for the whole year from NB-IoT smart gas meters deployed in target residential users; preprocess the raw hourly gas flow data, correct abnormal accumulated values caused by data transmission interruption, and remove obvious outliers based on historical statistical thresholds to obtain basic cleaned gas flow data. S2. Select the non-heating season flow data from the gas flow data after basic cleaning as the training data for the temporal convolutional network model, and train the model. S3. Input the gas flow data after the basic cleaning throughout the year into the trained temporal convolutional network model to obtain the reconstructed gas flow sequence and abnormal data sequence. Mark the segments in the abnormal data sequence that exceed the abnormal data threshold as potential non-heating behavior interference zones. Calculate the adaptive baseline gas flow based on the flow data during the non-heating season, and separate the portion of the gas flow data after basic cleaning that exceeds the adaptive baseline gas flow per hour into the initial heating load. Obtain the heating physical constraints based on the physical operating parameters of the heating equipment. Compare the initial heating load with the heating physical constraints, and record the segments in the initial heating load that violate the constraints as physical violation segments. S4. Perform spatiotemporal matching between the physical violation segments and the potential non-heating behavior interference zone, and modify the initial heating load according to the matching results. When the initial heating load no longer generates new matching segments, the physically corrected heating load sequence is obtained. The physically corrected heating load sequence is compensated based on the first residual sequence to obtain the final heating load sequence.
[0007] Further, in S1, the specific steps for correcting the abnormal cumulative value caused by data transmission interruption include: detecting the time interval between adjacent data points in the original hourly gas flow data; if the time interval is greater than a preset interruption time threshold, and the flow value of the first data point after the time interval is greater than a preset multiple of the preset flow high threshold, then it is determined to be a data transmission interruption cumulative value; the flow value of the current data point is evenly distributed within the interruption time interval to obtain the corrected hourly flow value.
[0008] Further, in step S1, statistical measures are calculated using the user's non-heating season gas flow data to detect hourly gas flow data throughout the year. Any data meeting any criterion is identified as a significant outlier and replaced. The criteria include: The hourly gas flow rate data is greater than the third quartile plus three times the interquartile range; The absolute value of the Z-score standardized value of the hourly gas consumption data is greater than 3; The hourly gas flow rate data is greater than the 99th percentile of all hourly flow rate data for the corresponding user during the non-heating season.
[0009] Furthermore, the data processing steps of the temporal convolutional network model in S3 include: The basic gas flow data after cleaning throughout the year is standardized and then input into a trained temporal convolutional network. Temporal features are extracted by the encoder. A new standardized flow sequence is reconstructed based on the temporal features by the decoder. The reconstructed standardized flow sequence is destandardized to obtain the reconstructed gas flow sequence. The point-by-point reconstruction error between the input temporal convolutional network and the reconstructed gas flow sequence at each time step is calculated. The point-by-point reconstruction error is normalized by a sliding window to obtain an abnormal data sequence.
[0010] Further, the calculation of the adaptive reference gas flow rate in S3 specifically includes: calculating the 90th percentile of all hourly flow rate data during the non-heating season as the first candidate value; adding the mean and twice the standard deviation of all hourly flow rate data during the non-heating season as the second candidate value; extracting the hourly flow rate data for the preset cooking period each day from the flow rate data during the non-heating season, and calculating the 85th percentile of the flow rate data during the cooking period as the third candidate value; comparing the first candidate value, the second candidate value, and the third candidate value to obtain the minimum value, which is taken as the adaptive reference gas flow rate.
[0011] Furthermore, the heating physical constraints in S3 include power change rate constraints, minimum continuous operating time constraints, and minimum continuous downtime constraints; Among them, the power change rate constraint is that the change in load between adjacent time points must be less than or equal to the maximum power change rate. The minimum continuous operating time constraint is that when the load value changes from below or equal to the minimum adjustable load to above the minimum adjustable load, it must continue to operate for at least a preset continuous operating time unit. The minimum continuous downtime constraint is that when the load value changes from above the minimum adjustable load to below the minimum adjustable load, the system must continue to operate for at least the preset downtime unit.
[0012] Furthermore, the spatiotemporal matching in S4 specifically includes: if a physical violation segment falls entirely within a potential non-heating behavior interference zone in time, then the physical violation segment is completely removed from the initial heating load; if a physical violation segment is not covered by any potential non-heating behavior interference zone, then the load of the segment is smoothly corrected according to the heating physical constraints to make it meet the constraint conditions.
[0013] Further, the compensation based on the first residual sequence in S4 includes the following steps: calculating the difference between the gas flow data after basic cleaning and the heating load sequence after physical correction to obtain the first residual sequence; performing time-frequency analysis on the first residual sequence to extract the signal component that is negatively correlated with the outdoor temperature and whose energy is concentrated in the low-frequency band; and compensating the signal component into the heating load sequence after physical correction to generate the final heating load sequence.
[0014] According to a second aspect of the present invention, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the program to implement the method described thereon.
[0015] According to a third aspect of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method described thereon.
[0016] Compared with the prior art, the present invention has the following beneficial effects: (1) This invention utilizes a temporal convolutional network model trained on non-heating season data to identify potential non-heating behavior interference zones with abnormal morphology, such as long-term group meals, in the annual data. It generates physical violation segments based on equipment physical parameters and further defines the spatiotemporal matching rules between the two. It combines data-driven pattern recognition with equipment-driven physical verification to accurately identify and eliminate continuous behavioral noise that is similar to the heating load pattern but does not conform to the equipment operation rules. At the same time, it retains or reasonably corrects abnormalities that do not violate physical laws, ensuring that the load separation process has both behavioral sensitivity and physical rationality. This improves the authenticity and credibility of the heating load sequence extracted from the fused metering data. The simultaneous working coefficient calculated from this sequence can more accurately reflect the concurrent use probability of the heating equipment itself, rather than being distorted by life behavior noise. This allows gas companies to make decisions based on a more reliable load basis when designing pipeline expansion and configuring peak-shaving gas storage facilities, effectively avoiding the dual risks of investment waste or insufficient gas supply capacity caused by coefficient distortion, and improving the scientific and economical nature of planning and design.
[0017] (2) The adaptive reference gas flow rate in this invention is the minimum of the 90th percentile of the non-heating season data, the sum of the mean and twice the standard deviation, and the 85th percentile of the cooking period. Time-frequency analysis is performed on the separated residuals, and low-frequency signals negatively correlated with outdoor temperature are extracted for compensation. This achieves adaptation to individual user gas usage habits, ensures the rigor of the living baseline setting, and reduces false positives of misjudging high living gas consumption as heating. In addition, the residual compensation step achieves the capture and enhancement of weak heating signals with extremely low signal-to-noise ratio, making the load separation method more universal and robust to different scenarios. Whether it is different users with large differences in gas usage habits or weak heating scenarios in transitional seasons and energy-saving buildings, this invention can provide more accurate separation results. It provides a high-quality data foundation for constructing large-scale, high-precision user-level heating load maps and for in-depth research on refined energy consumption patterns under different building types and user behaviors, supporting the formulation of differentiated demand-side management strategies and the collaborative optimization of regional energy systems.
[0018] (3) This invention corrects the cumulative value of transmission interruption based on the characteristics of gas data and removes outliers based on multiple criteria in non-heating season statistics. The temporal convolutional network model is trained using flow data from the non-heating season, which effectively repairs the distorted data caused by physical problems such as NB-IoT communication and initially purifies the data quality from a statistical perspective. The temporal convolutional network model is trained using pure non-heating season data, so that the data it learns is the basic gas consumption behavior of users and does not contain any heating characteristics. This ensures that the model is highly sensitive to long-term anomalies of heating or heating-like conditions, and improves the stability and reliability of this invention in real and complex industrial data environments. It can withstand and automatically correct common communication failures and temporary equipment interference, reducing the need for manual intervention and data disposal. At the same time, the meaning of non-heating season data is deeply embedded in the model training stage, with clear physical meaning and domain specificity. This provides a complete and reliable technical path for the gas industry to process massive amounts of smart meter data on a large scale and automatically, and extract high-quality information flow from it, accelerating the transformation of data assets into decision-making value. Attached Figure Description
[0019] Figure 1 A flowchart of a gas heating load separation method based on gas consumption behavior pattern recognition; Figure 2 This is the curve showing the simultaneous operation coefficient of the gas appliances in this embodiment; Figure 3 This is a peak hourly gas consumption distribution map of the data selected in this embodiment. Detailed Implementation
[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0021] like Figure 1 As shown, this embodiment provides a method for separating gas heating loads based on gas consumption behavior pattern recognition, and the specific steps include: S1. Collect raw hourly gas flow data for the whole year from NB-IoT smart gas meters deployed in target residential users; preprocess the raw hourly gas flow data, correct abnormal accumulated values caused by data transmission interruption, and remove obvious outliers based on historical statistical thresholds to obtain basic cleaned gas flow data. S2. Select the non-heating season flow data from the gas flow data after basic cleaning as the training data for the temporal convolutional network model, and train the model. S3. Input the gas flow data after the basic cleaning throughout the year into the trained temporal convolutional network model to obtain the reconstructed gas flow sequence and abnormal data sequence. Mark the segments in the abnormal data sequence that exceed the abnormal data threshold as potential non-heating behavior interference zones. Calculate the adaptive baseline gas flow based on the flow data during the non-heating season, and separate the portion of the gas flow data after basic cleaning that exceeds the adaptive baseline gas flow per hour into the initial heating load. Obtain the heating physical constraints based on the physical operating parameters of the heating equipment. Compare the initial heating load with the heating physical constraints, and record the segments in the initial heating load that violate the constraints as physical violation segments. S4. Perform spatiotemporal matching between the physical violation segments and the potential non-heating behavior interference zone, and modify the initial heating load according to the matching results. When the initial heating load no longer generates new matching segments, the physically corrected heating load sequence is obtained. The physically corrected heating load sequence is compensated based on the first residual sequence to obtain the final heating load sequence.
[0022] In S1, raw hourly gas flow data for the entire year is collected from N households in the target residential community that have installed NB-IoT smart gas meters. The data collection frequency is set to collect data once per hour on the hour. Each data point includes a timestamp and the corresponding cumulative gas flow difference, i.e., the gas consumption for that hour, in cubic meters.
[0023] Due to potential instability in NB-IoT networks, data uploads may be interrupted. Upon recovery, the accumulated traffic during the interruption may be included in the first hour after recovery, resulting in abnormally high values. The specific steps to correct abnormal accumulated values caused by data transmission interruptions include: detecting the time interval between adjacent data points in the original hourly gas flow data; if the time interval is greater than a preset interruption time threshold, and the flow value of the first data point after the time interval is greater than a preset multiple of the preset high flow threshold, it is determined to be a data transmission interruption accumulated value; the flow value of the current data point is then evenly distributed across the interruption time interval to obtain the corrected hourly flow value.
[0024] In S1, statistics are calculated using user non-heating season gas flow data. Hourly gas flow data for the entire year is then analyzed, and any outlier meeting any of the following criteria is identified and replaced. These criteria include: Hourly gas flow rate data greater than the third quartile plus three times the interquartile range is used to detect values that appear extremely abrupt in the annual data due to any reason. For example, extremely high readings caused by equipment failure or large positive values caused by system errors.
[0025] The absolute value of the standardized Z-score for hourly gas consumption data must be greater than 3. The Z-score measures how much a data point deviates from the mean of its population, expressed as a multiple of the standard deviation. This means the value falls outside the range of more than 3 standard deviations from the mean (approximately 0.27% probability for a normal distribution). A data point is flagged if it stands out significantly compared to a user's normal gas consumption habits when there is no heating. For example, a moderately high flow rate late at night in summer, when gas consumption is typically low, might be due to equipment malfunction or a minor leak. This value might not trigger the interquartile range criterion, but it would be captured by the Z-score criterion because it significantly deviates from the normal non-heating season pattern.
[0026] The hourly gas flow rate data is greater than the 99th percentile of all hourly flow rate data for the corresponding user during the non-heating season. The 99th percentile of the user's non-heating season flow rate data is directly used as the threshold. Scenarios such as family gatherings and long-term multi-person showers that would generate higher domestic gas consumption are considered reasonable anomalies, while all points that significantly exceed the historical highest domestic gas consumption level are marked.
[0027] The combined use of these three criteria forms a defense system that strengthens both generality detection and domain-specificity. This system aims to efficiently and robustly eliminate various errors mixed in with the data, providing a clean data foundation for the subsequent core load separation algorithm. It removes harmful noise while preserving potential effective signals to the greatest extent possible.
[0028] The training dataset is constructed from the local non-heating season gas flow data selected from the basic gas flow data after cleaning. In this example, 5136 hours of data points are used. A temporal convolutional network with an encoder-decoder structure is adopted. The encoder consists of three stacked causal dilated convolutional layers with a kernel size of 3 and dilation coefficients of 1, 2, and 4 respectively. Each layer is followed by a ReLU activation function and a dropout layer (dropout rate of 0.1). The decoder consists of three transposed convolutional layers, progressively upsampling the feature maps output by the encoder to the same length as the input sequence. The standardized training dataset is used as both the input and expected output of the model. The mean squared error (MSE) is used as the loss function, the Adam optimizer is adopted, the learning rate is set to 0.001, and the training period is 100 epochs. The training objective is to enable the model to reconstruct the normal gas consumption pattern during the non-heating season.
[0029] The data processing steps for the temporal convolutional network model in S3 include: The gas flow data after the basic cleaning throughout the year is standardized and then input into the trained temporal convolutional network. Temporal features are extracted by the encoder part; a new standardized flow sequence is reconstructed based on the temporal features by the decoder part; the reconstructed new standardized flow sequence is destandardized to obtain the reconstructed gas flow sequence; the point-by-point reconstruction error between the input temporal convolutional network and the reconstructed gas flow sequence at each time step is calculated; the point-by-point reconstruction error is normalized by a sliding window to obtain the abnormal data sequence.
[0030] Segments in the anomalous data sequence that exceed the anomalous data threshold are marked as potential non-heating behavior disturbance zones. These zones typically correspond to anomalous gas usage patterns (such as family gatherings) that have not been learned by the model and have a long duration.
[0031] The calculation of the adaptive reference gas flow rate in S3 specifically includes: calculating the 90th percentile of all hourly flow rate data during the non-heating season as the first candidate value; adding the mean and twice the standard deviation of all hourly flow rate data during the non-heating season as the second candidate value; extracting the hourly flow rate data for the preset cooking time period each day from the flow rate data during the non-heating season, and calculating the 85th percentile of the flow rate data during the cooking time period as the third candidate value; comparing the first candidate value, the second candidate value, and the third candidate value to obtain the minimum value, which is taken as the adaptive reference gas flow rate.
[0032] The heating physical constraints in S3 include power change rate constraints, minimum continuous operating time constraints, and minimum continuous downtime constraints. Among them, the power change rate constraint is that the change in load between adjacent time points must be less than or equal to the maximum power change rate. The minimum continuous operating time constraint is that when the load value changes from below or equal to the minimum adjustable load to above the minimum adjustable load, it must continue to operate for at least a preset continuous operating time unit. The minimum continuous downtime constraint is that when the load value changes from above the minimum adjustable load to below the minimum adjustable load, the system must continue to operate for at least the preset downtime unit.
[0033] The spatiotemporal matching in S4 specifically includes: if a physical violation segment falls entirely within a potential non-heating behavior interference zone in time, it is determined to be a high-confidence residential disturbance, and the physical violation segment is completely removed from the initial heating load. If a physical violation segment is not covered by any potential non-heating behavior interference zone, it is determined to be possibly an extreme operating condition or equipment transient, and the load segment is smoothly corrected according to the heating physical constraints to meet the constraints. After completing one round of correction, the updated heating load is again subjected to violation segment identification and matching until no new physical violation segments that can be matched with interference zones are generated. Finally, the physically corrected heating load sequence is obtained.
[0034] In S4, compensation is based on the first residual sequence. The specific steps include: calculating the difference between the gas flow data after basic cleaning and the heating load sequence after physical correction to obtain the first residual sequence; performing time-frequency analysis of the first residual sequence using discrete wavelet transform, selecting the db4 wavelet basis, and decomposing it to the 5th level; extracting the approximation coefficients from the 4th and 5th levels to reconstruct the signal, obtaining the low-frequency component, which represents a slowly changing signal; and extracting the signal component that is negatively correlated with outdoor temperature and whose energy is concentrated in the low-frequency band.
[0035] The signal components are compensated and incorporated into the physically corrected heating load sequence to generate the final heating load sequence. Specifically, the hourly outdoor temperature for the same period is obtained, the sliding correlation coefficient between the low-frequency component and the hourly outdoor temperature for the same period is calculated, a negative correlation threshold is set, and the low-frequency component values corresponding to the time periods with sliding correlation coefficients below the negative correlation threshold are extracted and recorded as weak heating signals, which serve as the actual heating load driven by outdoor temperature but with slight amplitude. The final heating load sequence is a combination of the physically corrected heating load sequence and the weak heating signal.
[0036] In this embodiment, the analysis is based on the final separated heating load sequence, and the mean and standard deviation are calculated. Assuming that the heating behavior of each user is independent and identically distributed, the total heating load S of N users is... N Follows a normal distribution Given a confidence level CL of 0.99, calculate the upper quantile Q corresponding to this confidence level under this distribution. max (N, CL); then the concurrent operation coefficient K(N) when the number of users is N is: , in, The rated flow rate for a single household heating system.
[0037] Calculate and output the working coefficient curve for the number of users N from 1 to a preset maximum value, such as 2000, as shown in this embodiment. Figure 2 As shown, the calculated working coefficient results are consistent with actual gas consumption, and their values are much smaller than the test values. This is of great significance for addressing over-selection of facilities and reducing project costs, providing a direct and reliable basis for the design of gas transmission and distribution networks. Simultaneously, the final separated heating load sequence visually demonstrates the statistical characteristics of the load, such as... Figure 3 As shown.
[0038] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the described module can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0039] The electronic device of this invention includes a central processing unit (CPU), which can perform various appropriate actions and processes according to computer program instructions stored in read-only memory (ROM) or loaded from a storage unit into random access memory (RAM). The RAM may also store various programs and data required for device operation. The CPU, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.
[0040] Multiple components in the device are connected to an I / O interface, including: input units such as a keyboard, mouse, etc.; output units such as various types of displays, speakers, etc.; storage units such as disks, optical disks, etc.; and communication units such as network interface cards, modems, wireless transceivers, etc. The communication unit allows the device to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks. The processing unit performs the various methods and processes described above, such as the method of the present invention. For example, in some embodiments, the method of the present invention may be implemented as a computer software program tangibly contained in a machine-readable medium, such as a storage unit. In some embodiments, part or all of the computer program may be loaded and / or installed on the device via ROM and / or the communication unit. When the computer program is loaded into RAM and executed by the CPU, one or more steps of the method of the present invention described above may be performed. Alternatively, in other embodiments, the CPU may be configured to execute the method of the present invention by any other suitable means (e.g., by means of firmware).
[0041] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0042] The program code used to implement the methods of the present invention can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0043] In the context of this invention, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0044] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for separating gas heating loads based on gas consumption behavior pattern recognition, characterized in that, The specific steps include: S1. Collect raw hourly gas flow data for the whole year from NB-IoT smart gas meters deployed in target residential users; preprocess the raw hourly gas flow data, correct abnormal accumulated values caused by data transmission interruption, and remove obvious outliers based on historical statistical thresholds to obtain basic cleaned gas flow data. S2. Select the non-heating season flow data from the gas flow data after basic cleaning as the training data for the temporal convolutional network model, and train the model. S3. Input the gas flow data after the basic cleaning throughout the year into the trained temporal convolutional network model to obtain the reconstructed gas flow sequence and abnormal data sequence. Mark the segments in the abnormal data sequence that exceed the abnormal data threshold as potential non-heating behavior interference zones. Calculate the adaptive baseline gas flow based on the flow data during the non-heating season, and separate the portion of the gas flow data after basic cleaning that exceeds the adaptive baseline gas flow per hour into the initial heating load. Obtain the heating physical constraints based on the physical operating parameters of the heating equipment. Compare the initial heating load with the heating physical constraints, and record the segments in the initial heating load that violate the constraints as physical violation segments. S4. Perform spatiotemporal matching between the physical violation segments and the potential non-heating behavior interference zone, and modify the initial heating load according to the matching results. When the initial heating load no longer generates new matching segments, the physically corrected heating load sequence is obtained. The physically corrected heating load sequence is compensated based on the first residual sequence to obtain the final heating load sequence.
2. The gas heating load separation method based on gas consumption behavior pattern recognition according to claim 1, characterized in that, In step S1, the specific steps for correcting the abnormal cumulative value caused by data transmission interruption include: detecting the time interval between adjacent data points in the original hourly gas flow data; if the time interval is greater than a preset interruption time threshold, and the flow value of the first data point after the time interval is greater than a preset multiple of the preset flow high threshold, then it is determined to be a data transmission interruption cumulative value; the flow value of the current data point is evenly distributed within the interruption time interval to obtain the corrected hourly flow value.
3. The gas heating load separation method based on gas consumption behavior pattern recognition according to claim 1, characterized in that, In step S1, statistical measures are calculated using the user's non-heating season gas flow data. The hourly gas flow data for the entire year is then analyzed, and any outlier that meets any criterion is identified and replaced. These criteria include: The hourly gas flow rate data is greater than the third quartile plus three times the interquartile range; The absolute value of the Z-score standardized value of the hourly gas consumption data is greater than 3; The hourly gas flow rate data is greater than the 99th percentile of all hourly flow rate data for the corresponding user during the non-heating season.
4. The gas heating load separation method based on gas consumption behavior pattern recognition according to claim 1, characterized in that, The data processing steps for the temporal convolutional network model in S3 include: The basic gas flow data after cleaning throughout the year is standardized and then input into a trained temporal convolutional network. Temporal features are extracted by the encoder. A new standardized flow sequence is reconstructed based on the temporal features by the decoder. The reconstructed standardized flow sequence is destandardized to obtain the reconstructed gas flow sequence. The point-by-point reconstruction error between the input temporal convolutional network and the reconstructed gas flow sequence at each time step is calculated. The point-by-point reconstruction error is normalized by a sliding window to obtain an abnormal data sequence.
5. The gas heating load separation method based on gas consumption behavior pattern recognition according to claim 1, characterized in that, The calculation of the adaptive reference gas flow rate in S3 specifically includes: calculating the 90th percentile of all hourly flow rate data during the non-heating season as the first candidate value; adding the mean and twice the standard deviation of all hourly flow rate data during the non-heating season as the second candidate value; extracting the hourly flow rate data for the preset cooking period each day from the flow rate data during the non-heating season, and calculating the 85th percentile of the flow rate data during the cooking period as the third candidate value; comparing the first candidate value, the second candidate value, and the third candidate value to obtain the minimum value, which is taken as the adaptive reference gas flow rate.
6. The gas heating load separation method based on gas consumption behavior pattern recognition according to claim 1, characterized in that, The heating physical constraints in S3 include power change rate constraints, minimum continuous operating time constraints, and minimum continuous downtime constraints. Among them, the power change rate constraint is that the change in load between adjacent time points must be less than or equal to the maximum power change rate. The minimum continuous operating time constraint is that when the load value changes from below or equal to the minimum adjustable load to above the minimum adjustable load, it must continue to operate for at least a preset continuous operating time unit. The minimum continuous downtime constraint is that when the load value changes from above the minimum adjustable load to below the minimum adjustable load, the system must continue to operate for at least the preset downtime unit.
7. The gas heating load separation method based on gas consumption behavior pattern recognition according to claim 1, characterized in that, The spatiotemporal matching in S4 specifically includes: if a physical violation segment falls entirely within a potential non-heating behavior interference zone in time, then the physical violation segment is completely removed from the initial heating load; if a physical violation segment is not covered by any potential non-heating behavior interference zone, then the load of the segment is smoothly corrected according to the heating physical constraints to make it meet the constraint conditions.
8. The gas heating load separation method based on gas consumption behavior pattern recognition according to claim 1, characterized in that, The compensation based on the first residual sequence in S4 includes the following steps: calculating the difference between the gas flow data after basic cleaning and the heating load sequence after physical correction to obtain the first residual sequence; performing time-frequency analysis on the first residual sequence to extract the signal component that is negatively correlated with the outdoor temperature and whose energy is concentrated in the low-frequency band; and compensating the signal component into the heating load sequence after physical correction to generate the final heating load sequence.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 8.