A method and system for monitoring abnormal carbon emissions based on energy data

Through the decomposition and feature analysis of power energy data, combined with the isolated forest algorithm, the problem of monitoring instruments being affected by electromagnetic noise is solved, the accuracy of carbon emission anomaly detection is improved, and effective monitoring of carbon emissions is achieved.

CN118427760BActive Publication Date: 2024-09-10HANGZHOU JUAO ENERGY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410867128.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-01
Publication Date
2024-09-10
Estimated Expiration
2044-07-01

AI Technical Summary

Technical Problem

During the power energy monitoring process, monitoring instruments are affected by electromagnetic noise, which reduces the accuracy of carbon emission estimates. Existing anomaly detection methods may misclassify normal data into abnormal data, affecting the accuracy of detection results.

Method used

The carbon emission anomaly monitoring method based on energy data is used to obtain the electricity consumption data sequence, decompose it into time periods, calculate the proportion of electricity consumption and energy consumption characteristics, use the isolated forest algorithm to obtain the degree of difference and particularity set, and calculate the abnormal data probability, and then segment the normal power consumption data set for monitoring.

Benefits of technology

Improved the accuracy of carbon emission anomaly detection. Through multi-day electricity consumption data analysis, the energy consumption characteristics of each time period are more universal, correcting the specificity of electricity consumption, clarifying the probability of abnormal data, and improving the accuracy of detection results. .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118427760B
    Figure CN118427760B
Patent Text Reader

Abstract

The present invention relates to the field of data processing technology, and specifically to a method and system for monitoring carbon emissions anomalies based on energy data, including: obtaining a number of electricity consumption data sequences to obtain the electricity consumption of each day; dividing the electricity consumption data sequences into a number of time periods, obtaining the proportion of electricity consumption in each time period within each day and the energy consumption characteristics of each time period, and obtaining the specificity of electricity consumption for each day; combining the energy consumption characteristics of each time period with the difference in the proportion of electricity consumption in the same time period within each day, and obtaining the specificity of electricity consumption for each day; further obtaining the probability that the current node contains abnormal data, and then obtaining the value range of the segmentation value of the current node, obtaining a normal electricity consumption data set, and performing abnormal monitoring of carbon emissions. The present invention aims to solve the problem that when abnormal electricity consumption is obtained through the isolated Senli algorithm, normal electricity consumption under special circumstances may be regarded as abnormal electricity consumption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a method and system for monitoring carbon emission anomalies based on energy data. Background Art

[0002] As the issue of global warming and climate change has attracted more and more attention in society, the monitoring and management of carbon emissions has become increasingly important. Among them, the emission factor method is a widely used carbon emission estimation method. In terms of electric energy, the carbon dioxide emission factor of the power grid is the basis for accurately calculating the indirect greenhouse gas emissions caused by electricity consumption. It is an important parameter for quantitative analysis and promoting carbon emission reduction at the consumer end. Its spatial accuracy and timeliness have a significant impact on the indirect emissions of emission units at different levels such as regions, industries, and enterprises. Therefore, for enterprises, it is necessary to accurately analyze the relationship between carbon emissions and energy consumption to match the accuracy of emission factor calculations. Since the carbon emissions of most enterprises are mainly related to the use of electric energy, the carbon emission data is estimated through electricity data, and the actual monitored emission values ​​are compared with the estimated values ​​to analyze carbon emission anomalies.

[0003] However, in the process of monitoring the power energy of enterprises, the monitoring instrument may be running for too long and be affected by the electromagnetic noise generated by the current, resulting in abnormal monitoring data results, which will affect the accuracy of carbon emission estimation. Therefore, it is necessary to obtain abnormal data in the enterprise electricity consumption data. When obtaining abnormal data in the enterprise electricity consumption data through the random forest method, some normal data with certain differences from the values ​​of most normal data may be segmented out early, resulting in inaccurate abnormal detection results. Summary of the invention

[0004] The present invention provides a method and system for monitoring carbon emission anomalies based on energy data to solve the existing problems.

[0005] The present invention provides a method and system for monitoring carbon emission anomalies based on energy data using the following technical solutions:

[0006] The present invention proposes a method for monitoring carbon emission anomalies based on energy data, which comprises the following steps:

[0007] Acquire a number of power consumption data sequences to obtain the power consumption of each day, wherein the power consumption data sequences correspond to the power consumption data of one day;

[0008] Divide each electricity consumption data series into several time periods to obtain the electricity consumption in each time period of each day; based on the electricity consumption in each time period of each day and the electricity consumption of each day, obtain the electricity consumption proportion of each time period of each day and the energy consumption characteristics of each time period;

[0009] Based on the difference between the power consumption in each time period of each day and the power consumption in the same time period of other days, as well as the energy consumption characteristics of each time period, the specificity of power consumption for each day is obtained; based on the difference between the power consumption specificity of each day and the energy consumption characteristics of each time period and the proportion of power consumption in the same time period of each day, the specificity of power consumption for each day is obtained;

[0010] Through the isolation forest algorithm, the data points in the current node are obtained, and the data points correspond to a date, a time period and power consumption; according to the time period corresponding to each data point in the current node, the difference degree of each data point is obtained, and the difference degree set and the power consumption particularity set of the current node are obtained in combination with the power consumption particularity of the date corresponding to each data point; according to the difference degree set and the power consumption particularity set of the current node, the probability of containing abnormal data in the current node is obtained, and then the final value range of the segmentation value of the current node is obtained; according to the final value range of the segmentation value of the current node, a normal power consumption data set is obtained;

[0011] Based on the normal electricity consumption data set, abnormal carbon emissions are monitored.

[0012] Furthermore, the method of obtaining a plurality of power consumption data sequences to obtain the power consumption of each day includes the following specific methods:

[0013] Get Enterprise The historical electricity consumption data of the day is obtained electricity consumption data series; The electricity consumption data sequence corresponds to The electricity consumption data of the day; each electricity consumption data in the electricity consumption data sequence corresponds to a collection time;

[0014] The first The sum of all the electricity consumption data in the electricity consumption data sequence is recorded as Daily electricity consumption; The preset collection days.

[0015] Furthermore, the specific method of dividing each electricity consumption data sequence into several time periods to obtain the electricity consumption in each time period of each day includes:

[0016] The duration of the preset time period is , according to the collection time of each power consumption data in each power consumption data sequence, each power consumption data sequence is divided into several time periods;

[0017] The first In the electricity consumption data series The sum of all electricity consumption data in a time period is recorded as Days The power consumption in a time period.

[0018] Furthermore, the specific method of obtaining the proportion of electricity consumption in each time period within each day and the energy consumption characteristics of each time period according to the electricity consumption in each time period within each day and the electricity consumption of each day includes:

[0019]

[0020] In the formula, Indicates Energy consumption characteristics of each time period, Indicates the number of days of collection. Indicates Days The power consumption in a certain period of time, Indicates Daily electricity consumption, Indicates Days The proportion of electricity consumption in a time period.

[0021] Furthermore, the specificity of electricity consumption for each day is obtained based on the difference between the electricity consumption in each time period of each day and the electricity consumption in the same time period of other days, as well as the energy consumption characteristics of each time period, including the following specific methods:

[0022]

[0023] In the formula, Indicates The specificity of electricity consumption per day, Indicates the number of time periods in a day. Indicates Energy consumption characteristics of each time period, Indicates the first The variance of electricity consumption in each time period, Indicates Days The power consumption in a certain period of time, Indicates the first The average power consumption in a time period, Represents the normalization function.

[0024] Furthermore, the specificity of electricity consumption for each day is obtained according to the specificity of electricity consumption for each day and the difference between the energy consumption characteristics of each time period and the proportion of electricity consumption in the same time period within each day, including the specific method of:

[0025]

[0026] In the formula, Indicates The special characteristics of daily electricity consumption, Indicates The specificity of electricity consumption per day, Indicates the number of time periods in a day. Indicates Days The power consumption in a certain period of time, Indicates Daily electricity consumption, Indicates Energy consumption characteristics of each time period, represents the hyperbolic tangent function.

[0027] Furthermore, the method of obtaining the difference degree of each data point according to the time period corresponding to each data point in the current node, and combining the electricity consumption particularity of the date corresponding to each data point to obtain the difference degree set and the electricity consumption particularity set of the current node includes the following specific methods:

[0028] Combine the current node with the The data points corresponding to the same time period are recorded as The relative data points of data points;

[0029] The current node The absolute value of the difference between the value of a data point and the mean of all its relative data points is recorded as the value of the first data point in the current node. The difference degree of each data point in the current node is used to form the difference degree set of the current node; among them, the difference degree set of the current node is The difference degree is the The degree of difference between the data points;

[0030] The current node The specificity of electricity consumption on the date corresponding to the data point is recorded as The power consumption particularity of each data point is calculated, and the power consumption particularity of all data points in the current node constitutes the power consumption particularity set of the current node.

[0031] Furthermore, the probability of the current node containing abnormal data is obtained according to the difference degree set and the power consumption particularity set of the current node, including the specific method of:

[0032] Obtain the correlation coefficient between the difference degree set of the current node and the electricity consumption particularity set, and record it as the correlation coefficient of the current node;

[0033] According to the correlation coefficient of the current node, the specific calculation formula for the probability that the current node contains abnormal data is as follows:

[0034]

[0035] In the formula, It indicates the probability that the current node contains abnormal data, and r indicates the correlation coefficient of the current node.

[0036] Furthermore, the specific method of obtaining the value range of the segmentation value of the current node includes:

[0037]

[0038]

[0039] In the formula, Indicates the upper limit of the split value of the current node, Indicates the lower limit of the split value of the current node, Indicates the maximum value of the data points contained in the current node. Indicates the median of the values ​​of the data points contained in the current node. Indicates the minimum value of the data points contained in the current node. Indicates the probability that the current node contains abnormal data;

[0040] The final range of the split value of the current node is: .

[0041] The present invention also proposes a carbon emission anomaly monitoring system based on energy data, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program to implement the steps of the above method.

[0042] The beneficial effects of the technical solution of the present invention are as follows: by acquiring abnormal data in the enterprise's electricity consumption data, the enterprise's energy data is monitored for abnormal carbon emissions, and based on the electricity consumption data of multiple days, the energy consumption characteristics of each time period are obtained, so that the energy consumption characteristics of each time period are more universal; when acquiring the electricity consumption specificity of each day, the influence weight of the electricity consumption of each time period within each day on the electricity consumption specificity of each day is assigned according to the discrete degree of the energy consumption characteristics of each time period and the electricity consumption of the same time period in different days, so that the electricity consumption specificity of the date containing abnormal electricity consumption is less than the electricity consumption specificity of the date under special circumstances; when acquiring the electricity consumption specificity of each day, the electricity consumption specificity of each day is corrected according to the difference between the electricity consumption proportion of each time period within each day and the energy consumption characteristics of each time period, so that the difference between the electricity consumption specificity of the date containing abnormal electricity consumption and the electricity consumption specificity of the electricity consumption data on the date under special circumstances is more obvious, so that the probability of containing abnormal data in the current node is more accurate, thereby improving the accuracy of the abnormality detection result. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0044] Figure 1 The present invention is a flowchart of the steps of a method for monitoring carbon emission anomalies based on energy data. DETAILED DESCRIPTION

[0045] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the specific implementation method, structure, features and effects of a carbon emission anomaly monitoring method and system based on energy data proposed by the present invention in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0046] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0047] The following is a detailed description of a specific scheme of a carbon emission anomaly monitoring method and system based on energy data provided by the present invention in conjunction with the accompanying drawings.

[0048] See also Figure 1 , which shows a flowchart of a method for monitoring carbon emission anomalies based on energy data provided by an embodiment of the present invention, the method comprising the following steps:

[0049] Step S001: Obtain a number of power consumption data sequences to obtain the power consumption for each day.

[0050] This embodiment analyzes the electricity consumption data of the enterprise to monitor the abnormal carbon emissions of the enterprise's energy data, so it is necessary to obtain the enterprise's electricity consumption data.

[0051] Specifically, the enterprise electricity system is used to obtain the enterprise The historical electricity consumption data of the day is obtained electricity consumption data series. The electricity consumption data sequence corresponds to The electricity consumption data of the day. Each electricity consumption data in the electricity consumption data sequence corresponds to a collection time. The sum of all the electricity consumption data in the electricity consumption data sequence is recorded as The number of days for collecting electricity is preset in this embodiment. , this is used as an example for description, and other values ​​may be set in other implementation modes.

[0052] Step S002: Divide each electricity consumption data sequence into several time periods to obtain the electricity consumption in each time period of each day; based on the electricity consumption in each time period of each day and the electricity consumption of each day, obtain the electricity consumption proportion of each time period of each day and the energy consumption characteristics of each time period.

[0053] It should be noted that since the electricity consumption of enterprises has certain time characteristics, when performing anomaly detection on electricity consumption data, the sum of electricity consumption in each time period is used as a data to be detected for anomaly detection. Therefore, according to the collection time of each data in each electricity consumption data sequence, each electricity consumption data sequence is divided into several time periods, and then the electricity consumption in each time period of each day is obtained.

[0054] It should be further explained that, since the time period characteristics of the enterprise's electricity consumption reflect the size of the enterprise's electricity consumption in each time period of a day, the energy consumption characteristics of each time period are calculated based on the electricity consumption in each time period within a day, that is, the time period characteristics of the enterprise's electricity consumption.

[0055] Specifically, the duration of the preset time period is , according to the collection time of each power consumption data in each power consumption data series, each power consumption data series is divided into several time periods. In the electricity consumption data series The sum of all electricity consumption data in a time period is recorded as Days The duration of the time period preset in this embodiment is Hours is used as an example for description, and other values ​​can be set in other implementation modes.

[0056] Furthermore, according to the power consumption in each time period of each day, the energy consumption characteristics of each time period are obtained. The specific calculation formula is as follows:

[0057]

[0058] In the formula, Indicates Energy consumption characteristics of each time period, Indicates the preset number of days for collection. Indicates Days The power consumption in a certain period of time, Indicates Daily electricity consumption, Indicates Days The proportion of electricity consumption in a time period.

[0059] It should be noted that The larger the value, the Days The power consumption in the time period is The greater the proportion of electricity consumption during the day; The larger the value of The power consumption in each time period is relatively large, that is, The greater the energy consumption characteristics of a time period.

[0060] At this point, the energy consumption characteristics of each time period are obtained.

[0061] Step S003: According to the difference between the power consumption in each time period of each day and the power consumption in the same time period of other days, and the energy consumption characteristics of each time period, the power consumption specificity of each day is obtained; according to the difference between the power consumption specificity of each day and the energy consumption characteristics of each time period and the proportion of power consumption in the same time period of each day, the power consumption specificity of each day is obtained.

[0062] It should be noted that, since enterprises may face special situations on some days, the normal electricity consumption in the time period on the date of special situation is different from the normal electricity consumption in the same time period on other days. As a result, when the abnormal electricity consumption is obtained through the isolation forest algorithm, the normal electricity consumption in some time periods on the date when the enterprise faces special situations may be regarded as abnormal electricity consumption. Therefore, the special characteristics of electricity consumption on each day are calculated, and the isolation forest algorithm is improved according to the special characteristics of electricity consumption on each day to obtain the normal electricity consumption.

[0063] It should be further explained that, since a day includes multiple time periods, the specificity of electricity consumption for each day is calculated based on the difference between the electricity consumption in each time period of each day and the electricity consumption in the same time period of other days.

[0064] It should be further explained that when obtaining the specificity of electricity consumption for each day based on the difference between the electricity consumption in each time period of each day and the electricity consumption in the same time period of other days, since the abnormal electricity consumption in a time period of a day is also significantly different from the electricity consumption in the same time period of other days, it is necessary to eliminate the influence of the abnormal electricity consumption on the specificity of electricity consumption for each day as much as possible.

[0065] It should be further explained that when removing the influence of abnormal power consumption on the specificity of power consumption of each day, since the power consumption data in the enterprise power consumption system is obtained based on the power consumption monitoring instrument, the greater the current passing through the power consumption monitoring instrument per unit time, the greater the possibility of abnormal data in the power consumption monitoring instrument; since the power consumption of each time period in each day under normal circumstances is similar to the power consumption of the same time period in other days under normal circumstances, the discrete degree of the same time period in different days and the energy consumption characteristics of each time period jointly reflect the possibility that the power consumption of a time period is abnormal. Therefore, the energy consumption characteristics of each time period and the discrete degree of power consumption in the same time period in different days are used as parameters for calculating the specificity of power consumption of each day.

[0066] Specifically, get the The specific calculation formula for the daily electricity consumption is as follows:

[0067]

[0068] In the formula, Indicates The specificity of electricity consumption per day, Indicates the number of time periods in a day. Indicates Energy consumption characteristics of each time period, Indicates the first The variance of electricity consumption in each time period, Indicates Days The power consumption in a certain period of time, Indicates the first The average power consumption in a time period, Represents a linear normalization function, the normalized object is each day .

[0069] It should be noted that The larger the value, the Days The electricity consumption in this time period is compared with that in other days. The greater the difference in electricity consumption between the time periods, the Days The greater the specificity of electricity consumption in each time period; The larger the value of The greater the possibility that the power consumption in a certain period of time is abnormal; The larger the value of The smaller the value of, the more The power consumption in each time period is relatively similar, which means that The smaller the possibility that the power consumption in a time period is abnormal, the smaller the possibility that the power consumption in the first time period is abnormal. Days The electricity consumption in this time period is compared with that in other days. The more credible the difference in electricity consumption in different time periods; The larger the value, the The greater the possibility of facing special circumstances.

[0070] At this point, the specificity of electricity consumption for each day is obtained.

[0071] It should be noted that since the difference between the electricity usage specificity of the date containing abnormal data and the electricity usage specificity of the date under special circumstances is small, the electricity usage specificity of each day is corrected to make the difference between the electricity usage specificity of the date containing abnormal data and the electricity usage specificity of the date under special circumstances more obvious.

[0072] It should be further explained that when analyzing the special circumstances of electricity consumption data for each day, it is necessary not only to analyze the difference in electricity consumption in each time period within each day, but also to analyze the difference between the proportion of electricity consumption in each time period within each day and the proportion of electricity consumption in each time period within other days. Therefore, according to the difference between the proportion of electricity consumption in each time period within each day and the energy consumption characteristics of each time period, the specificity of electricity consumption for each day is corrected to obtain the specificity of electricity consumption for each day.

[0073] Specifically, get the The specific calculation formula for the special characteristics of daily electricity consumption is as follows:

[0074]

[0075] In the formula, Indicates The special characteristics of daily electricity consumption, Indicates The specificity of electricity consumption per day, Indicates the number of time periods in a day. Indicates Days The power consumption in a certain period of time, Indicates Daily electricity consumption, Indicates Energy consumption characteristics of each time period, represents a hyperbolic tangent function, which is used for normalization processing in this embodiment.

[0076] It should be noted that the electricity consumption specificity of the date under special circumstances is greater than that of the date containing abnormal circumstances; and the difference between the electricity consumption proportion of each time period on the date under special circumstances and the electricity consumption proportion of each time period on other days is greater than the difference between the electricity consumption proportion of each time period on the date containing abnormal circumstances and the electricity consumption proportion of each time period on other days. Therefore, according to right to adjust the size.

[0077] At this point, the characteristics of electricity consumption every day are obtained.

[0078] Step S004: Obtain the data points in the current node through the isolation forest algorithm; obtain the difference degree and electricity consumption characteristics of each data point according to the time period corresponding to each data point in the current node, and obtain the difference degree set and electricity consumption characteristics set of the current node in combination with the electricity consumption characteristics of the date corresponding to each data point; obtain the probability that the current node contains abnormal data according to the difference degree set and electricity consumption characteristics set of the current node, and then obtain the final value range of the segmentation value of the current node; obtain the normal electricity consumption data set according to the final value range of the segmentation value of the current node.

[0079] It should be noted that due to special circumstances faced by enterprises on some days, the electricity consumption in the time period on the date of special circumstances is different from the normal electricity consumption in the same time period on other days. When the electricity consumption of each time period is detected by the isolation forest algorithm, the electricity consumption in the time period affected by special circumstances will be regarded as abnormal electricity consumption. Therefore, when obtaining abnormal electricity consumption according to the isolation forest algorithm, the probability of abnormal data being contained in a set of data for which a split value needs to be selected is calculated based on the particularity of electricity consumption on each day, and the value range of the set of data for which a split value needs to be selected is adjusted. Among them, the set of data for which a split value needs to be selected is the data in the current node.

[0080] It should be further explained that when calculating the probability that the current node contains abnormal data, the difference between the electricity consumption in a time period on a date under special circumstances and the same time period on other days is large, and the electricity consumption of the date under special circumstances is large; the difference between the electricity consumption in a time period on a date under normal circumstances and the same time period on other days is small, and the electricity consumption of the date under normal circumstances is small; therefore, according to the correlation between the electricity consumption specificity of the date corresponding to each data point in the current node and each data point in the current node, the probability that the current node contains abnormal data is obtained.

[0081] Specifically, the power consumption in each time period is used as the data to be detected. Use the isolation forest algorithm to obtain several groups of data for which split values ​​need to be selected. Select any group of data for which split values ​​need to be selected as the data in the current node. Set the number of samples extracted each time in the isolation forest algorithm to , the number of trees is The number of samples extracted in this embodiment is preset , the number of preset trees , this is used as an example for description, and other values ​​may be set in other implementation modes.

[0082] Furthermore, a data point in the current node corresponds to the power consumption in a time period in a day, that is, a data point corresponds to a date, time period and value. The data points corresponding to the same time period are recorded as The relative data point of the data point. The relative data points of the data points include the data points. The absolute value of the difference between the value of a data point and the mean of all its relative data points is recorded as the value of the first data point in the current node. The difference degree of each data point in the current node is used to form the difference degree set of the current node. The difference degree is the The difference between the data points in the current node. The specificity of electricity consumption on the date corresponding to the data point is recorded as The power consumption specialness of each data point in the current node is combined into the power consumption specialness set of the current node. The power consumption characteristic is the The specificity of electricity consumption at each data point.

[0083] Further, the correlation coefficient between the difference degree set of the current node and the power consumption particularity set is obtained, which is recorded as the correlation coefficient of the current node. Wherein, obtaining the correlation coefficient is a well-known technology and is not described in detail in this embodiment. According to the correlation coefficient of the current node, the probability that the current node contains abnormal data is obtained, and the specific calculation formula is as follows:

[0084]

[0085] In the formula, It indicates the probability that the current node contains abnormal data, and r indicates the correlation coefficient of the current node.

[0086] It should be noted that The larger the value, the more the power consumption corresponding to the data points contained in the current node is normal, that is, the smaller the probability that the current node contains abnormal data.

[0087] It should be further explained that when adjusting the value range of the split value of the current node according to the probability that the current node contains abnormal data, the principle of the isolation forest algorithm shows that the middle value of the values ​​of all data points in the current node has the lowest probability of being abnormal data. Therefore, the middle value of the values ​​of all data points in the current node and the values ​​between the maximum and minimum values ​​are used as the two value intervals of the split value, and the above two intervals are adjusted according to the probability that the current node contains abnormal data points.

[0088] Specifically, according to the probability of the current node containing abnormal data points, the calculation formula for obtaining the upper and lower thresholds of the segmentation value of the current node is as follows:

[0089]

[0090]

[0091] In the formula, Indicates the upper limit of the split value of the current node, Indicates the lower limit of the split value of the current node, Indicates the maximum value of the data points contained in the current node. Indicates the median value of the data points contained in the current node. Indicates the minimum value of the data points contained in the current node. Indicates the probability that the current node contains abnormal data. The final range of the split value of the current node is: .

[0092] After obtaining the current node segmentation value selection range, the historical power consumption data is processed for anomaly detection through the isolation forest algorithm to obtain abnormal power consumption. The abnormal power consumption is filtered out from the data to be detected to obtain a normal power consumption data set, where the normal power consumption data set contains a certain amount of power consumption. Obtaining abnormal data through the isolation forest algorithm is an existing method and will not be described in detail here.

[0093] Step S005: Perform abnormal monitoring of carbon emissions based on the normal electricity consumption data set.

[0094] Specifically, after obtaining the enterprise's power energy consumption data, the carbon emissions of each electricity consumption in the normal electricity consumption data set are obtained based on the 2021 electricity carbon dioxide emission factors released by the Ministry of Ecology and Environment and the National Bureau of Statistics, combined with the proportion of local electricity sources. Among them, estimating the carbon emissions of a power consumption is an existing public technology, which will not be repeated in this embodiment.

[0095] Furthermore, the electricity consumption in the normal electricity consumption data set is mapped to a coordinate system with the horizontal axis being the electricity consumption value and the vertical axis being the carbon emissions. The fitting function is constructed using the least squares method. The electricity consumption of the enterprise at every moment of every day is input into the fitting function to obtain the fitted carbon emissions at every moment of every day, and the carbon dioxide emission factor is used to calculate the carbon emissions at every moment of every day. When the absolute value of the difference between the fitted carbon emissions at any moment of any day and the calculated carbon emissions is greater than the ratio threshold, the ratio of the fitted carbon emissions to the fitted carbon emissions is greater than the ratio threshold. , then the carbon emissions of the enterprise at that time on that day are abnormal.

[0096] Furthermore, the ratio threshold value preset in this embodiment is , this is used as an example for description, and other values ​​may be set in other implementation modes.

[0097] At this point, this embodiment is completed.

[0098] Another embodiment of the present invention provides a carbon emission anomaly monitoring system based on energy data, the system comprising a memory, a processor, and a computer program stored in the memory and running on the processor, and when the processor executes the computer program, the above method steps S001 to S005 are implemented.

[0099] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for monitoring carbon emission anomalies based on energy data, characterized in that: The method comprises the following steps: Acquire a number of power consumption data sequences to obtain the power consumption of each day, wherein the power consumption data sequences correspond to the power consumption data of one day; Divide each electricity consumption data series into several time periods to obtain the electricity consumption in each time period of each day; based on the electricity consumption in each time period of each day and the electricity consumption of each day, obtain the electricity consumption proportion of each time period of each day and the energy consumption characteristics of each time period; Based on the difference between the power consumption in each time period of each day and the power consumption in the same time period of other days, as well as the energy consumption characteristics of each time period, the specificity of power consumption for each day is obtained; based on the difference between the power consumption specificity of each day and the energy consumption characteristics of each time period and the proportion of power consumption in the same time period of each day, the specificity of power consumption for each day is obtained; Through the isolation forest algorithm, the data points in the current node are obtained, and the data points correspond to a date, a time period and power consumption; according to the time period corresponding to each data point in the current node, the difference degree of each data point is obtained, and the difference degree set and the power consumption particularity set of the current node are obtained in combination with the power consumption particularity of the date corresponding to each data point; according to the difference degree set and the power consumption particularity set of the current node, the probability of containing abnormal data in the current node is obtained, and then the final value range of the segmentation value of the current node is obtained; according to the final value range of the segmentation value of the current node, a normal power consumption data set is obtained; Based on the normal electricity consumption data set, abnormal carbon emissions monitoring is performed; The specific method of obtaining the power consumption specificity of each day according to the difference between the power consumption of each time period of each day and the power consumption of the same time period of other days, as well as the energy consumption characteristics of each time period, includes: In the formula, Indicates The specificity of electricity consumption per day, Indicates the number of time periods in a day. Indicates Energy consumption characteristics of each time period, Indicates the first The variance of electricity consumption in each time period, Indicates Days The power consumption in a certain period of time, Indicates the first The average power consumption in a time period, represents the normalization function; The specific method of obtaining the specificity of electricity consumption for each day based on the specificity of electricity consumption for each day and the difference between the energy consumption characteristics of each time period and the proportion of electricity consumption in the same time period within each day is as follows: In the formula, Indicates The particularity of electricity consumption every day, Indicates The specificity of electricity consumption per day, Indicates the number of time periods in a day. Indicates Days The power consumption in a certain period of time, Indicates Daily electricity consumption, Indicates Energy consumption characteristics of each time period, represents the hyperbolic tangent function; The specific method of obtaining the value range of the segmentation value of the current node includes: In the formula, Indicates the upper limit of the split value of the current node, Indicates the lower limit of the split value of the current node, Indicates the maximum value of the data points contained in the current node. Indicates the median of the values ​​of the data points contained in the current node. Indicates the minimum value of the data points contained in the current node. Indicates the probability that the current node contains abnormal data; The final range of the split value of the current node is: .

2. According to claim 1, a method for monitoring carbon emission anomalies based on energy data is characterized in that: The specific method of obtaining a plurality of power consumption data sequences to obtain the power consumption of each day includes: Get Enterprise The historical electricity consumption data of the day is obtained electricity consumption data series; The electricity consumption data sequence corresponds to The electricity consumption data of the day; each electricity consumption data in the electricity consumption data sequence corresponds to a collection time; The first The sum of all the electricity consumption data in the electricity consumption data sequence is recorded as Daily electricity consumption; The preset collection days.

3. The method for monitoring carbon emission anomalies based on energy data according to claim 2 is characterized in that: The specific method of dividing each electricity consumption data sequence into several time periods to obtain the electricity consumption in each time period of each day includes: The duration of the preset time period is , according to the collection time of each power consumption data in each power consumption data sequence, each power consumption data sequence is divided into several time periods; The first In the electricity consumption data series The sum of all electricity consumption data in a time period is recorded as Days The power consumption in a time period.

4. The method for monitoring carbon emission anomalies based on energy data according to claim 1 is characterized in that: The specific method of obtaining the proportion of electricity consumption in each time period of each day and the energy consumption characteristics of each time period according to the electricity consumption in each time period of each day and the electricity consumption of each day includes: In the formula, Indicates Energy consumption characteristics of each time period, Indicates the number of days of collection. Indicates Days The power consumption in a certain period of time, Indicates Daily electricity consumption, Indicates Days The proportion of electricity consumption in a time period.

5. The method for monitoring carbon emission anomalies based on energy data according to claim 1 is characterized in that: The specific method of obtaining the difference degree of each data point according to the time period corresponding to each data point in the current node and combining the electricity consumption particularity of the date corresponding to each data point to obtain the difference degree set and electricity consumption particularity set of the current node includes: Combine the current node with the The data points corresponding to the same time period are recorded as The relative data points of data points; The current node The absolute value of the difference between the value of a data point and the mean of all its relative data points is recorded as the value of the first data point in the current node. The difference degree of each data point in the current node is used to form the difference degree set of the current node; among them, the difference degree set of the current node is The difference degree is the The degree of difference between the data points; The current node The specificity of electricity consumption on the date corresponding to the data point is recorded as The power consumption particularity of each data point is calculated, and the power consumption particularity of all data points in the current node constitutes the power consumption particularity set of the current node.

6. The method for monitoring carbon emission anomalies based on energy data according to claim 1 is characterized in that: The specific method of obtaining the probability of the current node containing abnormal data according to the difference degree set and the power consumption particularity set of the current node includes: Obtain the correlation coefficient between the difference degree set of the current node and the electricity consumption particularity set, and record it as the correlation coefficient of the current node; According to the correlation coefficient of the current node, the specific calculation formula for the probability that the current node contains abnormal data is as follows: In the formula, It indicates the probability that the current node contains abnormal data, and r indicates the correlation coefficient of the current node.

7. A carbon emission anomaly monitoring system based on energy data, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of a carbon emission anomaly monitoring method based on energy data as described in any one of claims 1 to 6 are implemented.