Carbon emission data anomaly detection method, device, medium, equipment and product
By using time series decomposition and multi-model prediction methods, long-term trends and random fluctuations in carbon emission data are identified and separated, solving the problem of abnormal fluctuations in power plant carbon emission data and achieving more accurate anomaly detection and assessment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUODIAN ENVIRONMENTAL PROTECTION RES INST CO LTD
- Filing Date
- 2025-01-21
- Publication Date
- 2026-07-21
AI Technical Summary
In power plant carbon emission data monitoring, abnormal fluctuations in data caused by factors such as measurement equipment errors and unexpected production situations can affect accurate assessment and decision-making.
Carbon emission data is decomposed into trend, seasonal and residual terms using time series decomposition method, and then predicted using ARIMA and Prophet models. Outliers are identified by comparing the predicted data with the actual data.
It improves the accuracy and robustness of carbon emission data anomaly detection, enhances the ability to detect data fluctuations, and ensures the reliability of decision-making.
Smart Images

Figure CN122432723A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of carbon emission monitoring technology, specifically to a method, apparatus, medium, equipment, and product for detecting anomalies in carbon emission data. Background Technology
[0002] Monitoring and analyzing carbon emission data is crucial for environmental protection and energy conservation and emission reduction during the operation of power plants. Normally, the coal supply to power plants is relatively stable, which theoretically should result in relatively stable fluctuations in carbon emission data over time. However, in actual data collection and processing, various factors, such as errors in measuring equipment, interference in data transmission, and unforeseen circumstances during power plant operation, can cause abnormal fluctuations in carbon emission data. If these abnormal data are not detected and addressed promptly, they will affect the accurate assessment of the power plant's carbon emissions and subsequent decision-making. Summary of the Invention
[0003] The purpose of this disclosure is to provide a method, apparatus, medium, equipment, and product for detecting anomalies in carbon emission data.
[0004] To achieve the above objectives, according to a first aspect of this disclosure, a method for detecting anomalies in carbon emission data is provided, the method comprising: According to the preset time series decomposition method, the first carbon emission data of the first time period is processed to obtain the trend term, seasonal term and residual term corresponding to the first carbon emission data; The trend term and residual term corresponding to the first carbon emission data are input into the pre-generated first prediction model to obtain the first carbon emission prediction data for the second time period. The first carbon emission data is input into a pre-generated second prediction model to obtain the second carbon emission prediction data for the second time period. Obtain the second carbon emission data within the second time period; The first carbon emission prediction data and the second carbon emission prediction data are compared with the second carbon emission data respectively, and abnormal data in the second carbon emission data are identified based on the comparison results.
[0005] Optionally, the first carbon emission data is obtained in the following way: Obtain the raw carbon emission data for the first time period; Determine whether the raw carbon emission data contains any missing data; If it is determined that there are missing data in the original carbon emission data, the missing data in the original carbon emission data is supplemented by a preset missing value processing method to obtain the first carbon emission data.
[0006] Optionally, before the steps of inputting the trend term and residual term corresponding to the first carbon emission data into the pre-generated first prediction model and the step of inputting the first carbon emission data into the pre-generated second prediction model, the method further includes: The first carbon emission data was determined to be in a stable state.
[0007] Optionally, whether the first carbon emission data is in a stationary state can be determined by the following methods: The first carbon emission data is differentially processed to obtain first-order differential data and second-order differential data; According to the preset calculation method, the test statistics corresponding to the first carbon emission data, the first-order difference data and the second-order difference data are determined respectively. The test statistics are used to characterize the probability of the existence of unit roots in the data. If the test statistics corresponding to the first carbon emission data, the first-order difference data, and the second-order difference data are all less than the set hypothesis threshold, the first carbon emission data is determined to be in a stationary state.
[0008] Optionally, the first prediction model is an ARIMA model, and the second prediction model is a Prophet model.
[0009] Optionally, the second time period includes multiple data periods, the second carbon emission data includes the actual emission value of each data period, the first carbon emission prediction data includes the first predicted emission value of each data period, and the second carbon emission prediction data includes the second predicted emission value of each data period. The step of comparing the first carbon emission prediction data and the second carbon emission prediction data with the second carbon emission data, and determining the abnormal data in the second carbon emission data based on the comparison results, includes: Each data period within the second time period is taken as the target data period, and for the target data period: Determine a first difference between the first predicted emission value corresponding to the target data period and the actual emission value corresponding to the target data period; The first difference is compared with a preset threshold to obtain a first comparison result; Determine a second difference between the second predicted emission value corresponding to the target data period and the actual emission value corresponding to the target data period; The second difference is compared with a preset threshold to obtain a second comparison result; If the first comparison result indicates that the first difference is greater than the preset threshold, or if the second comparison result indicates that the second difference is greater than the preset threshold, the actual emission value corresponding to the target data period is determined to be abnormal data.
[0010] According to a second aspect of this disclosure, an anomaly detection device for carbon emission data is provided, the device comprising: The first processing module is used to process the first carbon emission data of the first time period according to the preset time series decomposition method to obtain the trend item, seasonal item and residual item corresponding to the first carbon emission data; The second processing module is used to input the trend term and residual term corresponding to the first carbon emission data into the pre-generated first prediction model to obtain the first carbon emission prediction data for the second time period. The third processing module is used to input the first carbon emission data into the pre-generated second prediction model to obtain the second carbon emission prediction data for the second time period. The first acquisition module is used to acquire the second carbon emission data within the second time period; The first determining module is used to compare the first carbon emission prediction data and the second carbon emission prediction data with the second carbon emission data respectively, and to determine the abnormal data in the second carbon emission data based on the comparison results.
[0011] According to a third aspect of this disclosure, a non-transitory computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps of the method described in the first aspect of this disclosure.
[0012] According to a fourth aspect of this disclosure, an electronic device is provided, comprising: A memory on which computer programs are stored; A processor for executing the computer program in the memory to implement the steps of the method described in the first aspect of this disclosure.
[0013] According to a fifth aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the method described in the first aspect of this disclosure.
[0014] The above technical solution first uses time series decomposition to process the first carbon emission data for the first time period into trend, seasonal, and residual terms. This helps identify and separate long-term trends, periodic changes, and random fluctuations in the first carbon emission data, providing a more accurate data foundation for subsequent data prediction and anomaly detection. Then, using a first and a second prediction model, carbon emission data for the second time period is predicted based on the first carbon emission data, resulting in predicted first and second carbon emission data. These two prediction results are then compared with the actually observed second carbon emission data for the second time period to identify data anomalies. By utilizing the characteristics of different prediction models and then comprehensively judging anomalies based on the different prediction results, the diversity of prediction results is increased, the ability to identify anomalies is improved, and the comparison provides a basis for anomaly judgment, making the anomaly detection results more accurate. This enhances the ability to detect fluctuations in carbon emission data, thereby improving the accuracy and robustness of anomaly detection.
[0015] Other features and advantages of this disclosure will be described in detail in the following detailed description section. Attached Figure Description
[0016] The accompanying drawings are provided to further illustrate the present disclosure and form part of the specification. They are used together with the following detailed description to explain the present disclosure, but do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart of a method for detecting anomalies in carbon emission data according to one embodiment of the present disclosure.
[0017] Figure 2 This is an exemplary schematic diagram of the result obtained by processing the first carbon emission data of the first time period according to a preset time series decomposition method in the anomaly detection method of carbon emission data provided in this disclosure.
[0018] Figure 3 This is a block diagram of an anomaly detection device for carbon emission data provided according to one embodiment of the present disclosure.
[0019] Figure 4 This is a block diagram illustrating an electronic device according to an exemplary embodiment.
[0020] Figure 5 This is a block diagram illustrating an electronic device according to another exemplary embodiment. Detailed Implementation
[0021] The specific embodiments of this disclosure will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit this disclosure.
[0022] It should be noted that all actions involving the acquisition of signals, information, or data in this disclosure are carried out in compliance with the relevant data protection laws and policies of the country where the location is situated, and with authorization from the owner of the relevant device.
[0023] Figure 1 This is a flowchart of a method for detecting anomalies in carbon emission data according to one embodiment of this disclosure. Figure 1 As shown, the method for detecting anomalies in carbon emission data provided in this disclosure may include steps 11 to 15.
[0024] In step 11, the first carbon emission data of the first time period is processed according to the preset time series decomposition method to obtain the trend term, seasonal term and residual term corresponding to the first carbon emission data.
[0025] In this disclosure, by actually observing and recording the carbon emissions of power plants, the corresponding indicator values, i.e., carbon emission data, can be obtained. These indicator values can form a data sequence based on the time they are recorded. Based on the recorded indicator values, a data sequence for a specified period (e.g., a certain year or several months) can be obtained as needed, serving as the carbon emission data for that specific period. The recording of indicator values can be carried out according to a specific data cycle, for example, on a daily basis, meaning that the indicator values of the specified carbon emission indicators are recorded every day.
[0026] Optionally, the target carbon emission indicator can be selected from preset carbon emission indicators according to actual needs. Preset carbon emission indicators may include, but are not limited to: received basis lower heating value, air-dried basis moisture content, received basis ash content, etc. For example, if the target carbon emission indicator is received basis ash content, the corresponding indicator value is the received basis ash content value.
[0027] The first carbon emission data refers to the carbon emission data corresponding to the first time period. It includes the carbon emission data for each data cycle within the first time period, which is a sequence of multiple carbon emission data in chronological order.
[0028] Optionally, the first carbon emission data can be data obtained after preprocessing based on raw carbon emission data obtained from actual observations. Accordingly, the first carbon emission data can be obtained in the following ways: Obtain raw carbon emission data for the first time period; Determine if there are any missing data in the original carbon emission data; If it is determined that there are missing data in the original carbon emission data, the missing data in the original carbon emission data is supplemented by a preset missing value processing method to obtain the first carbon emission data.
[0029] The raw carbon emission data is the original data obtained from actual observation of the carbon emissions of power plants in the first time period. However, the raw data may be missing. For example, data for a certain day in the daily carbon emission data may not be recorded. In order to ensure the completeness and accuracy of subsequent data processing, the missing data in the raw carbon emission data can be identified and supplemented if the missing data is confirmed.
[0030] Therefore, after obtaining the raw carbon emission data for the first time period, it can be determined whether there are any missing data. As mentioned earlier, the raw carbon emission data records data for each data period within the first time period. Therefore, it can be confirmed whether corresponding data exists for each data period to determine if there are any missing data. If it is identified that no data is recorded for a certain data period, it can be determined that the data for that data period is missing. For the parts with missing data, a preset missing value handling method can be used to fill in the missing data. After filling in the missing data for each part, the first carbon emission data without missing data is obtained. Optionally, the preset missing value handling method can be set according to actual needs, such as setting it to the mean, mode, median, etc. of the raw carbon emission data.
[0031] For the first carbon emission data, the corresponding trend term, seasonal term, and residual term can be obtained by processing the data according to a preset time series decomposition method. Optionally, the first carbon emission data can be processed using the time series decomposition method provided by the statsmodels module in Python to obtain the trend term, seasonal term, and residual term. Among them, the trend term reflects the long-term changes and magnitude of the data over time, the seasonal term reflects the fluctuation pattern of the time series at a fixed period, and the residual term is the random disturbance remaining after removing the influence of trend and seasonality. The sum of the three is the first carbon emission data.
[0032] Optionally, after decomposing the primary carbon emission data into trend, seasonal, and residual terms, these terms can be visualized separately, such as... Figure 2 As shown, four images are displayed from top to bottom: the first carbon emission data, the trend term of the first carbon emission data, the seasonal term of the first carbon emission data, and the residual term of the first carbon emission data.
[0033] Therefore, by visualizing the primary carbon emission data and the results obtained through time series decomposition, the inherent structure of the primary carbon emission data can be intuitively revealed. This helps users identify and understand the long-term trends, periodic fluctuations, and random noise in the primary carbon emission data, thereby assisting in more accurate anomaly detection, optimizing subsequent model predictions, and helping users enhance their insight into the overall behavior of the data, thus improving the quality of decision-making and analysis.
[0034] In step 12, the trend term and residual term corresponding to the first carbon emission data are input into the pre-generated first prediction model to obtain the first carbon emission prediction data for the second time period.
[0035] In step 13, the first carbon emission data is input into the pre-generated second prediction model to obtain the second carbon emission prediction data for the second time period.
[0036] Optionally, the first prediction model and the second prediction model can be generated based on different time series models.
[0037] Optionally, before performing steps 12 and 13, the method provided in this disclosure may further include the following steps: The first carbon emission data has been determined to be in a stable state.
[0038] In other words, based on the first carbon emission data, it is first determined whether the first carbon emission data is in a stable state. Steps 12 and 13 will only be executed if the first carbon emission data is in a stable state. This is because only when the data is stable can a stable data foundation be provided for time series analysis and prediction of the time series model, so that the prediction based on the time series model has accuracy. If the data is not stationary, its statistical characteristics will change over time, which will lead to inaccurate model predictions.
[0039] Alternatively, it can be determined whether the initial carbon emission data is in a stationary state by the following methods: The first carbon emission data is differentially processed to obtain first-order differential data and second-order differential data; According to the preset calculation method, the test statistics corresponding to the first carbon emission data, the first difference data, and the second difference data are determined. The test statistics are used to characterize the probability of the existence of unit roots in the data. If the test statistics corresponding to the first carbon emission data, the first difference data, and the second difference data are all less than the set hypothetical critical values, then the first carbon emission data is determined to be in a stationary state.
[0040] This method is equivalent to using the ADF test to determine the stationarity of the data.
[0041] First, the carbon emission data is differentially processed to obtain first-order differencing data (sequences) and second-order differencing data (sequences). Then, the significance level for the test is determined; typically, a significance level of 1%, 5%, or 10% can be chosen. Based on the determined significance level, the corresponding critical value for the hypothesis can be found. Optionally, the critical value for the hypothesis can be obtained from the statistical table of the ADF test, or it can be automatically generated by statistical software based on factors such as sample size.
[0042] Then, using the preset calculation methods provided by the ADF test function in communication and software or programming languages, the first carbon emission data, first-order difference data, and second-order difference data can be processed to perform unit root tests to obtain the corresponding test statistics for each of the three. The obtained test statistics can characterize the probability of the existence of unit roots in the data.
[0043] After obtaining the test statistics for the first carbon emission data, the first-order difference data, and the second-order difference data, they can be compared with the determined hypothesis critical value. If all three test statistics are less than the hypothesis critical value, the null hypothesis of a unit root is rejected, and the first carbon emission data can be considered stationary. Conversely, if any one of the three test statistics is not less than the critical value, the null hypothesis of a unit root is accepted, and the first carbon emission data is considered non-stationary.
[0044] Optionally, if the initial carbon emission data is determined to be non-stationary, subsequent analysis cannot be performed. Therefore, a prompt message can be output to inform the user that the current initial carbon emission data is not stable and cannot be accurately analyzed.
[0045] Optionally, the first prediction model can be an ARIMA model, and the second prediction model can be a Prophet model.
[0046] Optionally, the first prediction model can be generated in the following way: Obtain the first historical carbon emission data, and process the first historical carbon emission data according to the preset time series decomposition method to obtain the trend term, seasonal term and residual term corresponding to the first historical carbon emission data; By analyzing the trend and residual terms corresponding to the first historical carbon emission data, and by analyzing the autocorrelation and partial autocorrelation functions of the trend and residual terms, the range of values for the number of autoregressive terms and the moving average coefficient is initially determined. Then, the optimal difference order is determined based on this range using the information criterion, so as to determine the structure of the ARIMA model. Based on the constructed ARIMA model, the trend term and residual term corresponding to the first historical carbon emission data are used as inputs to the model for fitting. During the fitting process, the model coefficients (e.g., number of autoregressive terms, moving average coefficients) are adjusted according to the fitting effect until the fitting effect meets the requirements. The ARIMA model at this point is used as the first prediction model after training is completed.
[0047] The fitted sequence obtained by fitting the ARIMA model (by summing the trend, seasonal, and residual terms) can be compared with the first historical carbon emission data. The model fitting effect can be evaluated by visualization methods or specified evaluation indicators, such as mean squared error or mean absolute error.
[0048] Alternatively, the second prediction model can be generated in the following way: Obtain the second historical carbon emission data; The second historical carbon emission data is input into the Prophet model, which, based on its own algorithm logic, can decompose the second historical carbon emission data into trend, seasonal, holiday and residual terms. The Prophet model uses its own optimization algorithm to continuously adjust the parameters of the trend term, seasonal term, holiday term, and residual term to minimize the gap between the predicted carbon emissions for future periods and the actual carbon emissions for those periods. This process determines the optimal parameters of the model and results in a trained second prediction model.
[0049] The first and second historical carbon emission data are both carbon emission data without missing values and in a stable state. The methods for handling missing data and determining the stable state have been given in the previous text and will not be repeated here.
[0050] Furthermore, based on the first and second prediction models, the trend term and residual term corresponding to the first carbon emission data can be input into the first prediction model to obtain the predicted carbon emission data for the second time period, i.e., the first carbon emission prediction data. And the first carbon emission data can be input into the second prediction model to obtain the predicted carbon emission data for the second time period, i.e., the second carbon emission prediction data.
[0051] In step 14, the second carbon emission data for the second time period is obtained.
[0052] The second carbon emission data refers to the actual carbon emission data collected during the second time period.
[0053] In step 15, the first carbon emission prediction data and the second carbon emission prediction data are compared with the second carbon emission data, and abnormal data in the second carbon emission data are determined based on the comparison results.
[0054] The second time period may include multiple data periods, thus the second carbon emission data may include the actual emission value of each data period, the first carbon emission prediction data may include the first predicted emission value of each data period, and the second carbon emission prediction data may include the second predicted emission value of each data period.
[0055] In one possible implementation, step 15 may include the following steps: Each data period within the second time period is taken as the target data period, and the following is applied to the target data period: Determine the first difference between the first predicted emission value corresponding to the target data period and the actual emission value corresponding to the target data period; The first difference is compared with a preset threshold to obtain the first comparison result; Determine the second difference between the second predicted emission value corresponding to the target data period and the actual emission value corresponding to the target data period; The second difference is compared with a preset threshold to obtain a second comparison result; If the first comparison result indicates that the first difference is greater than the preset threshold, or if the second comparison result indicates that the second difference is greater than the preset threshold, the actual emission value corresponding to the target data period is determined to be abnormal data.
[0056] In other words, each data period in the second stage can be taken as the target data period, and for each target data period, it can be determined whether there are any anomalies in the carbon emission data of that target data period. After each data period in the second stage is taken as the target data period and the anomalies are determined, the overall data anomaly situation of the second carbon emission data can be determined.
[0057] Specifically, determining whether there are any anomalies in the carbon emission data for a target data period can be done in the following ways: Determine the first difference between the first predicted emission value corresponding to the target data period and the actual emission value corresponding to the target data period; compare the first difference with a preset threshold to obtain a first comparison result; Determine the second difference between the second predicted emission value corresponding to the target data period and the actual emission value corresponding to the target data period; compare the second difference with a preset threshold to obtain a second comparison result; If the first comparison result indicates that the first difference is greater than the preset threshold, or if the second comparison result indicates that the second difference is greater than the preset threshold, the actual emission value corresponding to the target data period is determined to be abnormal data.
[0058] In other words, if the difference between the carbon emission data predicted by either the first or the second prediction model and the actual carbon emission data exceeds a preset threshold, the carbon emission data can be considered abnormal. Since the first prediction model is more effective for short-term predictions and the second prediction model is more effective for long-term predictions, by combining the two prediction models with different advantages, abnormal data can be identified more comprehensively.
[0059] Optionally, the first, second, and third carbon emission prediction data can be visualized to help users assess anomalies in the carbon emission data as a whole. For example, the first, second, and third carbon emission prediction data can be displayed on a single graph along a timeline, with different display methods, such as using line charts of different colors. Alternatively, the first and second carbon emission prediction data can be displayed on one graph along a timeline, with different display methods, such as using line charts of different colors; simultaneously, the second carbon emission prediction data and the second carbon emission data can be displayed on another graph along a timeline, with different display methods, such as using line charts of different colors. This allows users to make targeted comparisons between the prediction results of the two models and the actual carbon emission data.
[0060] It should be noted that in this disclosure, the execution order of step 13 is not strictly limited to steps 11 and 12, and any execution order falls within the protection scope of this disclosure.
[0061] The above technical solution first uses time series decomposition to process the first carbon emission data for the first time period into trend, seasonal, and residual terms. This helps identify and separate long-term trends, periodic changes, and random fluctuations in the first carbon emission data, providing a more accurate data foundation for subsequent data prediction and anomaly detection. Then, using a first and a second prediction model, carbon emission data for the second time period is predicted based on the first carbon emission data, resulting in predicted first and second carbon emission data. These two prediction results are then compared with the actually observed second carbon emission data for the second time period to identify data anomalies. By utilizing the characteristics of different prediction models and then comprehensively judging anomalies based on the different prediction results, the diversity of prediction results is increased, the ability to identify anomalies is improved, and the comparison provides a basis for anomaly judgment, making the anomaly detection results more accurate. This enhances the ability to detect fluctuations in carbon emission data, thereby improving the accuracy and robustness of anomaly detection.
[0062] Figure 3 This is a block diagram of an anomaly detection device for carbon emission data provided according to one embodiment of this disclosure. Figure 3 As shown, the device 30 may include: The first processing module 31 is used to process the first carbon emission data of the first time period according to the preset time series decomposition method to obtain the trend item, seasonal item and residual item corresponding to the first carbon emission data; The second processing module 32 is used to input the trend term and residual term corresponding to the first carbon emission data into the pre-generated first prediction model to obtain the first carbon emission prediction data for the second time period. The third processing module 33 is used to input the first carbon emission data into the pre-generated second prediction model to obtain the second carbon emission prediction data for the second time period. The first acquisition module 34 is used to acquire the second carbon emission data within the second time period; The first determining module 35 is used to compare the first carbon emission prediction data and the second carbon emission prediction data with the second carbon emission data respectively, and determine the abnormal data in the second carbon emission data based on the comparison results.
[0063] Optionally, the first carbon emission data is obtained through the following modules: The second acquisition module is used to acquire the raw carbon emission data of the first time period; The second determining module is used to determine whether there are missing data in the original carbon emission data; The fourth processing module is used to, if it is determined that there are missing data in the original carbon emission data, supplement the missing data in the original carbon emission data using a preset missing value processing method to obtain the first carbon emission data.
[0064] Optionally, the device 30 further includes: The third determining module is used to determine that the first carbon emission data is in a stationary state before the second processing module 32 inputs the trend term and residual term corresponding to the first carbon emission data into the pre-generated first prediction model and the third processing module 33 inputs the first carbon emission data into the pre-generated second prediction model.
[0065] Optionally, the following module can be used to determine whether the first carbon emission data is in a stationary state: The fifth processing module is used to perform differential processing on the first carbon emission data to obtain first-order differential data and second-order differential data; The fourth determining module is used to determine the test statistics corresponding to the first carbon emission data, the first-order difference data and the second-order difference data according to a preset calculation method. The test statistics are used to characterize the probability of the existence of a unit root in the data. The fifth determination module is used to determine that the first carbon emission data is in a stationary state when the test statistics corresponding to the first carbon emission data, the first-order difference data, and the second-order difference data are all less than the set hypothesis threshold.
[0066] Optionally, the first prediction model is an ARIMA model, and the second prediction model is a Prophet model.
[0067] Optionally, the second time period includes multiple data periods, the second carbon emission data includes the actual emission value of each data period, the first carbon emission prediction data includes the first predicted emission value of each data period, and the second carbon emission prediction data includes the second predicted emission value of each data period. The first determining module 35 is used to take each data period within the second time period as a target data period, and for the target data period: A first difference is determined between a first predicted emission value corresponding to the target data period and an actual emission value corresponding to the target data period; the first difference is compared with a preset threshold to obtain a first comparison result; a second difference is determined between a second predicted emission value corresponding to the target data period and an actual emission value corresponding to the target data period; the second difference is compared with a preset threshold to obtain a second comparison result; if the first comparison result indicates that the first difference is greater than the preset threshold, or if the second comparison result indicates that the second difference is greater than the preset threshold, the actual emission value corresponding to the target data period is determined to be abnormal data.
[0068] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0069] This disclosure also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for detecting anomalies in carbon emission data provided in any embodiment of this disclosure.
[0070] This disclosure also provides an electronic device, including: A memory on which computer programs are stored; A processor is configured to execute the computer program in the memory to implement the steps of the method for detecting anomalies in carbon emission data provided in any embodiment of this disclosure.
[0071] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method for detecting anomalies in carbon emission data provided in any embodiment of this disclosure.
[0072] Figure 4 This is a block diagram illustrating an electronic device 700 according to an exemplary embodiment. Figure 4 As shown, the electronic device 700 may include a processor 701 and a memory 702. The electronic device 700 may also include one or more of a multimedia component 703, an input / output (I / O) interface 704, and a communication component 705.
[0073] The processor 701 controls the overall operation of the electronic device 700 to complete all or part of the steps in the aforementioned method for detecting anomalies in carbon emission data. The memory 702 stores various types of data to support the operation of the electronic device 700. This data may include, for example, instructions for any application or method operating on the electronic device 700, and application-related data such as contact data, sent and received messages, pictures, audio, video, etc. The memory 702 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The multimedia component 703 may include a screen and audio components. The screen may be, for example, a touchscreen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signals may be further stored in memory 702 or transmitted via communication component 705. The audio component also includes at least one speaker for outputting audio signals. I / O interface 704 provides an interface between processor 701 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual or physical buttons. Communication component 705 is used for wired or wireless communication between the electronic device 700 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IoT, eMTC, or other 5G technologies, or combinations thereof, is not limited here. Therefore, the corresponding communication component 705 may include: a Wi-Fi module, a Bluetooth module, an NFC module, etc.
[0074] In an exemplary embodiment, the electronic device 700 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above-described method for detecting anomalies in carbon emission data.
[0075] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, which, when executed by a processor, implement the steps of the above-described method for detecting anomalies in carbon emission data. For example, the computer-readable storage medium may be the memory 702 including the program instructions, which may be executed by the processor 701 of the electronic device 700 to complete the above-described method for detecting anomalies in carbon emission data.
[0076] Figure 5 This is a block diagram illustrating an electronic device 1900 according to another exemplary embodiment. For example, the electronic device 1900 may be provided as a server. (Refer to...) Figure 5 The electronic device 1900 includes a processor 1922, which may be one or more, and a memory 1932 for storing computer programs executable by the processor 1922. The computer program stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processor 1922 may be configured to execute the computer program to perform the aforementioned method for detecting anomalies in carbon emission data.
[0077] Additionally, the electronic device 1900 may also include a power supply component 1926 and a communication component 1950. The power supply component 1926 can be configured to perform power management of the electronic device 1900, and the communication component 1950 can be configured to enable communication of the electronic device 1900, such as wired or wireless communication. Furthermore, the electronic device 1900 may also include an input / output (I / O) interface 1958. The electronic device 1900 can operate on an operating system stored in memory 1932.
[0078] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, which, when executed by a processor, implement the steps of the above-described method for detecting anomalies in carbon emission data. For example, the non-transitory computer-readable storage medium may be the memory 1932 including the program instructions, which may be executed by the processor 1922 of the electronic device 1900 to complete the above-described method for detecting anomalies in carbon emission data.
[0079] In another exemplary embodiment, a computer program product is also provided, the computer program product comprising a computer program executable by a programmable device, the computer program having a code portion for performing the above-described method for detecting anomalies in carbon emission data when executed by the programmable device.
[0080] The preferred embodiments of this disclosure have been described in detail above with reference to the accompanying drawings. However, this disclosure is not limited to the specific details of the above embodiments. Within the scope of the technical concept of this disclosure, various simple modifications can be made to the technical solutions of this disclosure, and these simple modifications all fall within the protection scope of this disclosure.
[0081] It should also be noted that the various specific technical features described in the above embodiments can be combined in any suitable manner without contradiction. To avoid unnecessary repetition, this disclosure will not describe the various possible combinations separately.
[0082] Furthermore, various different embodiments of this disclosure can be combined in any way, as long as they do not violate the spirit of this disclosure, they should also be regarded as the content disclosed in this disclosure.
Claims
1. A method for detecting anomalies in carbon emission data, characterized in that, The method includes: According to the preset time series decomposition method, the first carbon emission data of the first time period is processed to obtain the trend term, seasonal term and residual term corresponding to the first carbon emission data; The trend term and residual term corresponding to the first carbon emission data are input into the pre-generated first prediction model to obtain the first carbon emission prediction data for the second time period. The first carbon emission data is input into a pre-generated second prediction model to obtain the second carbon emission prediction data for the second time period. Obtain the second carbon emission data within the second time period; The first carbon emission prediction data and the second carbon emission prediction data are compared with the second carbon emission data respectively, and abnormal data in the second carbon emission data are identified based on the comparison results.
2. The method according to claim 1, characterized in that, The first carbon emission data was obtained in the following way: Obtain the raw carbon emission data for the first time period; Determine whether the raw carbon emission data contains any missing data; If it is determined that there are missing data in the original carbon emission data, the missing data in the original carbon emission data is supplemented by a preset missing value processing method to obtain the first carbon emission data.
3. The method according to claim 1, characterized in that, Before the steps of inputting the trend term and residual term corresponding to the first carbon emission data into the pre-generated first prediction model and the step of inputting the first carbon emission data into the pre-generated second prediction model, the method further includes: The first carbon emission data was determined to be in a stable state.
4. The method according to claim 3, characterized in that, Whether the first carbon emission data is in a stationary state is determined by the following methods: The first carbon emission data is differentially processed to obtain first-order differential data and second-order differential data; According to the preset calculation method, the test statistics corresponding to the first carbon emission data, the first-order difference data and the second-order difference data are determined respectively. The test statistics are used to characterize the probability of the existence of unit roots in the data. If the test statistics corresponding to the first carbon emission data, the first-order difference data, and the second-order difference data are all less than the set hypothesis threshold, the first carbon emission data is determined to be in a stationary state.
5. The method according to claim 1, characterized in that, The first prediction model is the ARIMA model, and the second prediction model is the Prophet model.
6. The method according to claim 1, characterized in that, The second time period includes multiple data periods, the second carbon emission data includes the actual emission value of each data period, the first carbon emission prediction data includes the first predicted emission value of each data period, and the second carbon emission prediction data includes the second predicted emission value of each data period. The step of comparing the first carbon emission prediction data and the second carbon emission prediction data with the second carbon emission data, and determining the abnormal data in the second carbon emission data based on the comparison results, includes: Each data period within the second time period is taken as the target data period, and for the target data period: Determine a first difference between the first predicted emission value corresponding to the target data period and the actual emission value corresponding to the target data period; The first difference is compared with a preset threshold to obtain a first comparison result; Determine a second difference between the second predicted emission value corresponding to the target data period and the actual emission value corresponding to the target data period; The second difference is compared with a preset threshold to obtain a second comparison result; If the first comparison result indicates that the first difference is greater than the preset threshold, or if the second comparison result indicates that the second difference is greater than the preset threshold, the actual emission value corresponding to the target data period is determined to be abnormal data.
7. A device for detecting anomalies in carbon emission data, characterized in that, The device includes: The first processing module is used to process the first carbon emission data of the first time period according to the preset time series decomposition method to obtain the trend item, seasonal item and residual item corresponding to the first carbon emission data; The second processing module is used to input the trend term and residual term corresponding to the first carbon emission data into the pre-generated first prediction model to obtain the first carbon emission prediction data for the second time period. The third processing module is used to input the first carbon emission data into the pre-generated second prediction model to obtain the second carbon emission prediction data for the second time period. The first acquisition module is used to acquire the second carbon emission data within the second time period; The first determining module is used to compare the first carbon emission prediction data and the second carbon emission prediction data with the second carbon emission data respectively, and to determine the abnormal data in the second carbon emission data based on the comparison results.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the method described in any one of claims 1-6.
9. An electronic device, characterized in that, include: A memory on which computer programs are stored; A processor for executing the computer program in the memory to implement the steps of the method according to any one of claims 1-6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-6.