Carbon emission data anomaly detection method, device, medium, equipment and product
By using a prediction model trained with multiple machine learning algorithms to comprehensively analyze carbon emission data, the problem of data anomalies in carbon emission monitoring has been solved, and more accurate anomaly detection has been achieved.
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 existing carbon emission monitoring, statistical accuracy is reduced due to data anomalies, and rule maintenance and updates are difficult.
Multiple prediction models were used, trained based on random forest, support vector machine and neural network algorithms respectively. By analyzing and predicting coal quality parameters and comparing them with actual carbon emission data, anomalies were identified.
This improves the reliability and accuracy of anomaly detection in carbon emission data, enabling timely detection of abnormalities and facilitating the implementation of countermeasures.
Smart Images

Figure CN122432722A_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] During carbon emission monitoring, raw data may contain anomalies due to false alarms, omissions, or other reasons, significantly reducing the accuracy of carbon emission statistics. Currently, the identification of anomalies in carbon emission data is typically based on rules developed through manual experience, which presents difficulties in maintaining and updating these rules. 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: The target coal quality parameters are input into multiple pre-generated prediction models to obtain multiple prediction results of carbon emission data. The multiple prediction models include a first prediction model, a second prediction model, and a third prediction model trained using different machine learning algorithms. The multiple prediction results include the first prediction data output by the first prediction model, the second prediction data output by the second prediction model, and the third prediction data output by the third prediction model. Obtain the actual carbon emission data corresponding to the target coal quality parameters; The actual carbon emission data is compared with the first, second, and third predicted data, respectively, and the results of the comparison are used to determine whether the actual carbon emission data is abnormal.
[0005] Optionally, the first prediction model is a model built based on the random forest algorithm, the second prediction model is a model built based on the support vector machine algorithm, and the third prediction model is a model built based on the neural network. The first prediction model, the second prediction model, and the third prediction model are generated based on multiple sets of training samples in the training sample set. Each set of training samples includes coal quality parameter samples and carbon emission data samples corresponding to the coal quality parameter samples.
[0006] Optionally, the coal quality parameter samples are determined in the following way: Multiple raw coal quality parameters are obtained, and each raw coal quality parameter includes parameter values corresponding to multiple preset attributes; Based on the parameter values of each original coal quality parameter corresponding to multiple preset attributes, a correlation analysis is performed on the multiple preset attributes to determine the correlation coefficient between each pair of preset attributes. Based on the correlation coefficient between any two preset attributes, target attributes for model training are selected from the preset attributes. For each of the original coal quality parameters, the parameter value corresponding to the target attribute in the original coal quality parameters is determined as the coal quality parameter sample.
[0007] Optionally, the step of selecting target attributes for model training from the preset attributes based on the correlation coefficient between every two preset attributes includes: The preset attributes are filtered based on the correlation coefficient between each pair of preset attributes, so that the correlation coefficient between each pair of filtered target attributes is less than the preset coefficient.
[0008] Optionally, comparing the actual carbon emission data with the first predicted data, the second predicted data, and the third predicted data, and determining whether the actual carbon emission data is abnormal based on the comparison results, includes: According to the preset error calculation method, the first error between the first predicted data and the actual carbon emission data is determined; According to the preset error calculation method, the second error between the second predicted data and the actual carbon emission data is determined; According to the preset error calculation method, the third error between the third predicted data and the actual carbon emission data is determined; Based on the first error, the second error, the third error, and the error threshold, it is determined whether the actual carbon emission data is abnormal.
[0009] Optionally, determining whether the actual carbon emission data is abnormal based on the first error, the second error, the third error, and the error threshold includes: Based on the comparison result between the first error and the error threshold, the first anomaly detection result is determined; Based on the comparison result between the second error and the error threshold, the second anomaly detection result is determined; The third anomaly detection result is determined based on the comparison between the third error and the error threshold. Based on the first anomaly detection result, the second anomaly detection result, and the third anomaly detection result, it is determined whether the actual carbon emission data is abnormal.
[0010] Optionally, determining whether the actual carbon emission data is abnormal based on the first error, the second error, the third error, and the error threshold includes: Determine the weights corresponding to the first prediction model, the second prediction model, and the third prediction model; Based on the weights, the first error, the second error, and the third error are weighted and averaged to obtain the target error. Based on the comparison between the target error and the error threshold, it is determined whether the actual carbon emission data is abnormal.
[0011] According to a second aspect of this disclosure, an anomaly detection device for carbon emission data is provided, the device comprising: The processing module is used to input the target coal quality parameters into multiple pre-generated prediction models to obtain multiple prediction results of carbon emission data. The multiple prediction models include a first prediction model, a second prediction model, and a third prediction model trained using different machine learning algorithms. The multiple prediction results include the first prediction data output by the first prediction model, the second prediction data output by the second prediction model, and the third prediction data output by the third prediction model. The first acquisition module is used to acquire the actual carbon emission data corresponding to the target coal quality parameters; The first determining module is used to compare the actual carbon emission data with the first predicted data, the second predicted data, and the third predicted data, respectively, and determine whether the actual carbon emission data is abnormal based on the comparison results.
[0012] 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.
[0013] 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.
[0014] 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.
[0015] The above technical solution inputs multiple target coal quality parameters into several prediction models trained using different machine learning algorithms. These models output different predicted data: a first prediction model outputs first predicted data, a second prediction model outputs second predicted data, and a third prediction model outputs third predicted data. Furthermore, the actual carbon emission data corresponding to the target coal quality parameters is obtained and compared with the predicted data output by each model. Since different prediction models are based on different machine learning algorithms, their processing methods and prediction capabilities for the target coal quality parameters vary. Using multiple prediction models in combination allows for analysis and prediction of the target coal quality parameters from different perspectives, increasing the comprehensiveness and accuracy of carbon emission data prediction. Moreover, comparing the prediction results of multiple models with actual carbon emission data helps identify prediction biases between different models, thus more accurately determining whether the actual carbon emission data is abnormal. Therefore, the reliability and accuracy of anomaly detection in carbon emission data provide a more comprehensive and effective means for monitoring carbon emission data, facilitating the timely detection of anomalies and enabling prompt countermeasures.
[0016] Other features and advantages of this disclosure will be described in detail in the following detailed description section. Attached Figure Description
[0017] 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.
[0018] Figure 2 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 3 This is a block diagram illustrating an electronic device according to an exemplary embodiment.
[0020] Figure 4 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 13.
[0024] In step 11, the target coal quality parameters are input into multiple pre-generated prediction models to obtain multiple prediction results of carbon emission data. The multiple prediction models include a first prediction model, a second prediction model, and a third prediction model trained using different machine learning algorithms. The multiple prediction results include the first prediction data output by the first prediction model, the second prediction data output by the second prediction model, and the third prediction data output by the third prediction model.
[0025] The target coal quality parameters can be determined based on the originally collected coal quality parameters. Typically, power plant data can be collected, including coal quality parameter data. The original coal quality parameter data may include parameter values corresponding to multiple preset attributes, each representing a specific coal quality property. Optionally, preset attributes may include, but are not limited to, coal feed rate, total moisture content, air-dried basis moisture content, ash content, and volatile matter. The target coal quality parameters are constructed by selecting the attribute values of the target attribute from the multiple preset attribute values. The target attribute can be determined in a certain way, which will be given later. Optionally, the ash content value and the volatile matter value can be selected as the target coal quality parameters.
[0026] Optionally, the target coal quality parameter can be the coal quality parameter for a specific time period, that is, the coal quality parameter is the time series data composed of coal quality parameters corresponding to multiple collection times within a specific time period.
[0027] This disclosure provides multiple prediction models, all of which are used to predict carbon emission data corresponding to input coal quality parameters. Typically, there are multiple carbon emission indicators. This disclosure allows selection of a key carbon emission indicator from these multiple indicators, followed by data prediction and subsequent actual value collection for the selected indicator. If anomaly detection is required for carbon emission data of multiple indicators, the anomaly detection methods provided in this disclosure can be applied separately for each carbon emission indicator.
[0028] Multiple prediction models can include a first prediction model, a second prediction model, and a third prediction model trained using different machine learning algorithms. The appropriate machine learning algorithm can be selected based on actual needs to leverage the advantages of different algorithms in carbon emission data prediction, thereby improving the accuracy and comprehensiveness of carbon emission data prediction. For example, multiple prediction models can all be models that take ash content and volatile matter as inputs and the received basis lower heating value as output.
[0029] Optionally, the first prediction model can be a model built based on the random forest algorithm, the second prediction model can be a model built based on the support vector machine algorithm, and the third prediction model can be a model built based on the neural network algorithm. The first, second, and third prediction models are generated by training multiple sets of training samples within the training sample set, each set of training samples including coal quality parameter samples and corresponding carbon emission data samples.
[0030] As mentioned earlier, power plants can be continuously monitored by collecting data on various preset coal quality parameters and carbon emission indicators. This data collection can be conducted at a set interval, such as daily. Based on the collected data, training samples can be determined to train the prediction model, thus forming a training sample set.
[0031] Alternatively, coal quality parameter samples can be determined in the following ways: Obtain multiple raw coal quality parameters, each of which includes parameter values corresponding to multiple preset attributes; Based on the parameter values of each original coal quality parameter corresponding to multiple preset attributes, a correlation analysis is performed on the multiple preset attributes to determine the correlation coefficient between each pair of preset attributes. Based on the correlation coefficient between any two preset attributes, target attributes for model training are selected from the preset attributes. For each original coal quality parameter, the parameter value corresponding to the target attribute in the original coal quality parameter is determined as the coal quality parameter sample.
[0032] The original coal quality parameters contain various preset attribute parameter values. Once the original coal quality parameters are obtained, they can be preprocessed to obtain preprocessed original coal quality parameters.
[0033] Optionally, preprocessing may include, but is not limited to: data cleaning using preset tools, and data standardization using preset methods. For example, the preset tool could be Pandas, and data cleaning may include, but is not limited to, deleting original coal quality parameters with too many missing values, and deleting original coal quality parameters with duplicates. For example, the preset method could be the z-score method.
[0034] For the multiple raw coal quality parameters obtained, correlation analysis can be performed on the multiple preset attributes based on the parameter values corresponding to these raw coal quality parameters, in order to obtain the correlation coefficient between each pair of preset attributes. Optionally, for each pair of preset attributes, the Pearson correlation analysis method can be used to determine their correlation coefficient based on the multiple parameter values corresponding to each of these two attributes.
[0035] Furthermore, based on the correlation coefficient between any two preset attributes, the target attribute can be selected from the preset attributes.
[0036] Alternatively, the target attribute can be determined in the following ways: The preset attributes are filtered based on the correlation coefficient between each pair of preset attributes, so that the correlation coefficient between each pair of selected target attributes is less than the preset coefficient.
[0037] In other words, for two preset attributes with a correlation coefficient greater than or equal to the preset coefficient, only one can be retained while the other is filtered out. This results in the correlation coefficient between each pair of target attributes being filtered out being less than the preset coefficient.
[0038] This reduces the correlation between target attributes used for model training, preventing excessive multicollinearity caused by high correlation in the input data during training. This avoids problems such as unstable estimated coefficients and reduced interpretability, thus improving model stability. Furthermore, it simplifies the model structure, reduces complexity, and improves performance.
[0039] Once the target attribute for model training is determined, the parameter value corresponding to the target attribute can be selected from the original coal quality parameters as a coal quality parameter sample.
[0040] When collecting data from power plants, in addition to coal quality parameter data, carbon emission data can also be collected. Thus, based on the coal quality parameter sample, carbon emission data for a specified carbon emission indicator corresponding to the collected carbon emission data can be obtained from the collected carbon emission data, serving as the carbon emission data sample.
[0041] Using the above method, multiple sets of coal quality parameter samples and corresponding carbon emission data samples can be obtained from the original coal quality parameters to form a training sample set.
[0042] After obtaining the training sample set, the model can be trained based on the training sample set.
[0043] The first prediction model can be a model built based on the random forest algorithm, and its training process can refer to the following: A random forest model is constructed, in which a subset of features and split points are randomly selected based on the training sample set to build decision trees, so that each decision tree independently classifies the samples, and the final classification result is determined by voting. In each training process, coal quality parameter samples are input into the random forest model used in this training to obtain the output results of the random forest model. The difference information between the output results of the random forest model and the carbon emission data samples is calculated. If the first training stop condition is not met, the hyperparameters of the random forest model used in this training are updated according to the difference information. The updated random forest model is then used for the next training until the first training stop condition is met. If the first stopping condition is met, the current random forest model is determined as the first prediction model.
[0044] When updating the hyperparameters of the random forest model, the updated hyperparameters may include, but are not limited to, the number of trees and the node splitting method.
[0045] Optionally, the first training stop condition can be set according to actual needs, such as the number of training iterations reaching a preset number, the training duration reaching a preset duration, the gap information being less than a preset gap, the model precision reaching a preset precision, or the model recall reaching a preset recall.
[0046] Random forests are insensitive to noise and outliers, and can effectively detect outliers even in the presence of a large amount of noise or outliers.
[0047] The second prediction model can be a model built based on the support vector machine algorithm, and its training process can be referenced as follows: Construct a support vector machine model; In each training process, coal quality parameter samples are input into the support vector machine model used in this training to obtain the output results of the support vector machine model. The first loss value of the predefined loss function is calculated using the output results of the support vector machine model and the carbon emission data samples. If the second stopping training condition is not met, the parameters of the support vector machine model used in this training are updated according to the first loss value. The updated support vector machine model is then used for the next training until the second stopping training condition is met. If the second stopping training condition is met, the current support vector machine model is determined as the second prediction model.
[0048] When updating the parameters of a support vector machine model, the updated parameters may include, but are not limited to, normal vectors and biases.
[0049] Optionally, the second training stop condition can be set according to actual needs, such as the number of training iterations reaching a preset number, the training duration reaching a preset duration, the first loss value being less than a preset loss value, the model precision reaching a preset precision, or the model recall reaching a preset recall.
[0050] Among them, support vector machines have strong robustness, can handle abnormal samples well, reduce overfitting, and help improve the effect of anomaly detection.
[0051] The third prediction model can be a model built on a neural network, and its training process can refer to the following: Build a neural network model to initialize the structure of the neural network (such as the number of layers, number of neurons, etc.). By using coal quality parameter samples as input to the model and carbon emission data samples as the target output, the neural network model is trained to obtain a trained third prediction model.
[0052] In each training process, coal quality parameter samples are input into the neural network model used in this training to obtain the output results of the neural network model. The second loss value of the predefined loss function is calculated using the output results of the neural network model and carbon emission data samples. If the third training stop condition is not met, the parameters of the neural network model used in this training are updated according to the second loss value. The updated neural network model is then used for the next training until the third training stop condition is met. If the third stopping training condition is met, the current neural network model is determined as the third prediction model.
[0053] When updating the parameters of a neural network model, the updated parameters may include, but are not limited to, network weights and biases.
[0054] Optionally, the third training stop condition can be set according to actual needs, such as the number of training iterations reaching a preset number, the training duration reaching a preset duration, the second loss value being less than a preset loss value, the model precision reaching a preset precision, or the model recall reaching a preset recall.
[0055] Among them, neural networks have high prediction accuracy, and they can automatically learn and adapt to the characteristics and patterns of data, which helps to improve the accuracy and reliability of anomaly detection.
[0056] Through the above method, a first prediction model, a second prediction model, and a third prediction model can be obtained. These models, after training, possess the ability to predict the carbon emission data corresponding to the input coal quality parameters. Therefore, by inputting the target coal quality parameters into the first, second, and third prediction models respectively, we can obtain the first prediction data output by the first prediction model, the second prediction data output by the second prediction model, and the third prediction data output by the third prediction model. The first, second, and third prediction data all include the predicted values obtained from the carbon emission data prediction.
[0057] In step 12, the actual carbon emission data corresponding to the target coal quality parameters are obtained.
[0058] When collecting data from a power plant, in addition to coal quality parameter data, carbon emission data can also be collected; that is, actual carbon emission data under the current coal quality parameters can be collected. The carbon emission data can be carbon emission data collected for preset carbon emission indicators. Optionally, 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. During data collection, carbon emission data for all preset carbon emission indicators can be collected, and then the carbon emission data for the specific carbon emission indicator of interest in this disclosure can be obtained from it as the actual carbon emission data in step 12.
[0059] Specifically, if the target coal quality parameter is the coal quality parameter of a single collection time, then the actual carbon emission data is the single carbon emission data corresponding to the target coal quality parameter; if the target coal quality parameter is time series data composed of coal quality parameters of multiple collection times within a specified collection period, then the actual carbon emission data is a sequence composed of the actual carbon emission data corresponding to these multiple collection times.
[0060] In step 13, the actual carbon emission data is compared with the first, second, and third predicted data, respectively, and the results of the comparison are used to determine whether the actual carbon emission data is abnormal.
[0061] Optionally, step 13 may include the following steps: According to the preset error calculation method, the first error between the first predicted data and the actual carbon emission data is determined; According to the preset error calculation method, the second error between the second predicted data and the actual carbon emission data is determined; According to the preset error calculation method, the third error between the third predicted data and the actual carbon emission data is determined; Based on the first error, second error, third error, and error threshold, determine whether the actual carbon emission data is abnormal.
[0062] The preset error calculation method can be set according to actual needs. For example, the preset error calculation method can be to calculate the difference. Another example is to calculate the mean square error.
[0063] Therefore, based on the preset error calculation method, the first error between the first predicted data and the actual carbon emission data, the second error between the second predicted data and the actual carbon emission data, and the third error between the third predicted data and the actual carbon emission data can be determined. Then, based on the first error, the second error, the third error, and the error threshold, it can be determined whether the actual carbon emission data is abnormal.
[0064] In one possible implementation, determining whether the actual carbon emission data is abnormal based on a first error, a second error, a third error, and an error threshold may include the following steps: The first anomaly detection result is determined based on the comparison between the first error and the error threshold. The second anomaly detection result is determined based on the comparison between the second error and the error threshold. The third anomaly detection result is determined based on the comparison between the third error and the error threshold. Based on the first, second, and third anomaly detection results, determine whether the actual carbon emission data is abnormal.
[0065] Optionally, an error threshold can be preset, and the first anomaly detection result, the second anomaly detection result, and the third anomaly detection result can be determined based on the error threshold. The error threshold can be set according to actual needs.
[0066] If the first error is greater than the error threshold, the first anomaly detection result can be determined to be abnormal; if the first error is less than or equal to the error threshold, the first anomaly detection result can be determined to be normal.
[0067] If the second error is greater than the error threshold, the second anomaly detection result can be determined to be abnormal; if the second error is less than or equal to the error threshold, the second anomaly detection result can be determined to be normal.
[0068] If the third error is greater than the error threshold, the third anomaly detection result can be determined to be abnormal; if the third error is less than or equal to the error threshold, the third anomaly detection result can be determined to be normal.
[0069] Furthermore, based on the results of the first, second, and third anomaly detections, it can be comprehensively determined whether the actual carbon emission data is abnormal.
[0070] In one possible implementation, anomalies in actual carbon emission data can be determined by: If the first, second, and third anomaly detection results are all abnormal, the actual carbon emission data is determined to be abnormal.
[0071] Therefore, if the data predicted by the three prediction models are all judged as abnormal, then the actual carbon emission data can be judged as abnormal, which can improve the accuracy of anomaly detection in carbon emission data.
[0072] In another possible implementation, anomalies in actual carbon emission data can be determined by the following method: If the first, second, and third anomaly detection results are abnormal, the actual carbon emission data is determined to be abnormal.
[0073] Therefore, as long as the data predicted by any one of the three prediction models is determined to be abnormal, the actual carbon emission data is also determined to be abnormal, which can cover more abnormal data and improve the comprehensiveness of anomaly detection in carbon emission data.
[0074] In another possible implementation, anomalies in actual carbon emission data can be determined by the following method: If the number of anomalies in the first, second, and third anomaly detection results reaches a preset number, the actual carbon emission data is determined to be abnormal.
[0075] The preset quantity can be set according to actual needs. That is, if the number of anomalies in the first, second, and third anomaly detection results reaches the preset quantity, the actual carbon emission data can be determined to be abnormal. For example, the preset quantity can be 2, so as long as there are two or more anomalies in the first, second, and third anomaly detection results, the actual carbon emission data can be determined to be abnormal.
[0076] Therefore, after judging based on the data predicted by the three prediction models, a comprehensive judgment is made through voting. As long as the number of anomalies reaches the preset number, the actual carbon emission data can be determined to be abnormal.
[0077] In another possible implementation, determining whether the actual carbon emission data is abnormal based on a first error, a second error, a third error, and an error threshold may include the following steps: Determine the weights corresponding to the first prediction model, the second prediction model, and the third prediction model; Based on the weights, the first error, the second error, and the third error are weighted and averaged to obtain the target error. Based on the comparison between the target error and the error threshold, it is determined whether the actual carbon emission data is abnormal.
[0078] The weights of the first, second, and third prediction models can be set according to actual needs.
[0079] Based on the first error, the second error, and the third error, as well as the weights corresponding to the first prediction model, the second prediction model, and the third prediction model, a weighted average can be calculated to obtain the target error.
[0080] Then, the target error is compared with an error threshold. If the target error is greater than the error threshold, the actual carbon emission data can be determined to be abnormal. If the target error is not greater than the error threshold, the actual carbon emission data can be determined to be normal.
[0081] Therefore, the prediction results of multiple prediction models can be considered comprehensively, and the accuracy of anomaly detection in carbon emission data can be improved by reasonably allocating weights.
[0082] It should be noted that the above text is the anomaly detection result for a specific time obtained by comparing a single predicted value with the actual value. If the target coal quality parameters and the actual carbon emission data are both sequence data, anomaly detection can be performed on each data point in the sequence data in the same way as described above. In this way, the anomaly points in the sequence data can be identified.
[0083] The above technical solution inputs multiple target coal quality parameters into several prediction models trained using different machine learning algorithms. These models output different predicted data: a first prediction model outputs first predicted data, a second prediction model outputs second predicted data, and a third prediction model outputs third predicted data. Furthermore, the actual carbon emission data corresponding to the target coal quality parameters is obtained and compared with the predicted data output by each model. Since different prediction models are based on different machine learning algorithms, their processing methods and prediction capabilities for the target coal quality parameters vary. Using multiple prediction models in combination allows for analysis and prediction of the target coal quality parameters from different perspectives, increasing the comprehensiveness and accuracy of carbon emission data prediction. Moreover, comparing the prediction results of multiple models with actual carbon emission data helps identify prediction biases between different models, thus more accurately determining whether the actual carbon emission data is abnormal. Therefore, the reliability and accuracy of anomaly detection in carbon emission data provide a more comprehensive and effective means for monitoring carbon emission data, facilitating the timely detection of anomalies and enabling prompt countermeasures.
[0084] Figure 2 This is a block diagram of an anomaly detection device for carbon emission data provided according to one embodiment of this disclosure. Figure 2 As shown, the device 20 may include: Processing module 21 is used to input the target coal quality parameters into multiple pre-generated prediction models to obtain multiple prediction results of carbon emission data. The multiple prediction models include a first prediction model, a second prediction model, and a third prediction model trained using different machine learning algorithms. The multiple prediction results include first prediction data output by the first prediction model, second prediction data output by the second prediction model, and third prediction data output by the third prediction model. The first acquisition module 22 is used to acquire the actual carbon emission data corresponding to the target coal quality parameters; The first determining module 23 is used to compare the actual carbon emission data with the first predicted data, the second predicted data and the third predicted data respectively, and determine whether the actual carbon emission data is abnormal based on the comparison results.
[0085] Optionally, the first prediction model is a model built based on the random forest algorithm, the second prediction model is a model built based on the support vector machine algorithm, and the third prediction model is a model built based on the neural network. The first prediction model, the second prediction model, and the third prediction model are generated based on multiple sets of training samples in the training sample set. Each set of training samples includes coal quality parameter samples and carbon emission data samples corresponding to the coal quality parameter samples.
[0086] Optionally, the coal quality parameter sample is determined through the following module: The second acquisition module is used to acquire multiple raw coal quality parameters, each of which includes parameter values corresponding to multiple preset attributes; The second determining module is used to perform correlation analysis on the multiple preset attributes based on the parameter values of each original coal quality parameter corresponding to multiple preset attributes, and to determine the correlation coefficient between each pair of preset attributes. The filtering module is used to filter out target attributes for model training from the preset attributes based on the correlation coefficient between every two preset attributes. The third determining module is used to determine the parameter value corresponding to the target attribute in each of the original coal quality parameters as the coal quality parameter sample.
[0087] Optionally, the filtering module is used to filter the preset attributes based on the correlation coefficient between each pair of preset attributes, so that the correlation coefficient between each pair of filtered target attributes is less than the preset coefficient.
[0088] Optionally, the first determining module 23 includes: The first determining submodule is used to determine the first error between the first predicted data and the actual carbon emission data according to a preset error calculation method; The second determination submodule is used to determine the second error between the second predicted data and the actual carbon emission data according to a preset error calculation method. The third determination submodule is used to determine the third error between the third predicted data and the actual carbon emission data according to a preset error calculation method. The fourth determination submodule is used to determine whether the actual carbon emission data is abnormal based on the first error, the second error, the third error, and the error threshold.
[0089] Optionally, the fourth determining submodule includes: The fifth determining submodule is used to determine the first anomaly detection result based on the comparison result between the first error and the error threshold. The sixth determining submodule is used to determine the second anomaly detection result based on the comparison result between the second error and the error threshold. The seventh determining submodule is used to determine the third anomaly detection result based on the comparison result between the third error and the error threshold; The eighth determination submodule is used to determine whether the actual carbon emission data is abnormal based on the first anomaly detection result, the second anomaly detection result, and the third anomaly detection result.
[0090] Optionally, the fourth determining module includes: The eighth determination submodule is used to determine the weights corresponding to the first prediction model, the second prediction model, and the third prediction model. The processing submodule is used to perform a weighted average of the first error, the second error, and the third error according to the weights to obtain the target error; The ninth determining submodule is used to determine whether the actual carbon emission data is abnormal based on the comparison result between the target error and the error threshold.
[0091] 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.
[0092] This disclosure also provides a non-transitory computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the steps of the method described in any embodiment of this disclosure.
[0093] 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 described in any embodiment of this disclosure.
[0094] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the methods described in any embodiment of this disclosure.
[0095] Figure 3 This is a block diagram illustrating an electronic device 700 according to an exemplary embodiment. Figure 3 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.
[0096] 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.
[0097] 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.
[0098] 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.
[0099] Figure 4 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 4 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.
[0100] 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.
[0101] 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.
[0102] 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.
[0103] 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.
[0104] 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.
[0105] 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: The target coal quality parameters are input into multiple pre-generated prediction models to obtain multiple prediction results of carbon emission data. The multiple prediction models include a first prediction model, a second prediction model, and a third prediction model trained using different machine learning algorithms. The multiple prediction results include the first prediction data output by the first prediction model, the second prediction data output by the second prediction model, and the third prediction data output by the third prediction model. Obtain the actual carbon emission data corresponding to the target coal quality parameters; The actual carbon emission data is compared with the first, second, and third predicted data, respectively, and the results of the comparison are used to determine whether the actual carbon emission data is abnormal.
2. The method according to claim 1, characterized in that, The first prediction model is a model built based on the random forest algorithm, the second prediction model is a model built based on the support vector machine algorithm, and the third prediction model is a model built based on the neural network. The first prediction model, the second prediction model, and the third prediction model are generated based on multiple sets of training samples in the training sample set. Each set of training samples includes coal quality parameter samples and carbon emission data samples corresponding to the coal quality parameter samples.
3. The method according to claim 2, characterized in that, The coal quality parameter samples were determined in the following way: Multiple raw coal quality parameters are obtained, and each raw coal quality parameter includes parameter values corresponding to multiple preset attributes; Based on the parameter values of each original coal quality parameter corresponding to multiple preset attributes, a correlation analysis is performed on the multiple preset attributes to determine the correlation coefficient between each pair of preset attributes. Based on the correlation coefficient between any two preset attributes, target attributes for model training are selected from the preset attributes. For each of the original coal quality parameters, the parameter value corresponding to the target attribute in the original coal quality parameters is determined as the coal quality parameter sample.
4. The method according to claim 3, characterized in that, The step of selecting target attributes for model training from the preset attributes based on the correlation coefficient between every two preset attributes includes: The preset attributes are filtered based on the correlation coefficient between each pair of preset attributes, so that the correlation coefficient between each pair of filtered target attributes is less than the preset coefficient.
5. The method according to claim 1, characterized in that, The step of comparing the actual carbon emission data with the first predicted data, the second predicted data, and the third predicted data, and determining whether the actual carbon emission data is abnormal based on the comparison results, includes: According to the preset error calculation method, the first error between the first predicted data and the actual carbon emission data is determined; According to the preset error calculation method, the second error between the second predicted data and the actual carbon emission data is determined; According to the preset error calculation method, the third error between the third predicted data and the actual carbon emission data is determined; Based on the first error, the second error, the third error, and the error threshold, it is determined whether the actual carbon emission data is abnormal.
6. The method according to claim 5, characterized in that, The step of determining whether the actual carbon emission data is abnormal based on the first error, the second error, the third error, and the error threshold includes: Based on the comparison result between the first error and the error threshold, the first anomaly detection result is determined; Based on the comparison result between the second error and the error threshold, the second anomaly detection result is determined; The third anomaly detection result is determined based on the comparison between the third error and the error threshold. Based on the first anomaly detection result, the second anomaly detection result, and the third anomaly detection result, it is determined whether the actual carbon emission data is abnormal.
7. The method according to claim 5, characterized in that, The step of determining whether the actual carbon emission data is abnormal based on the first error, the second error, the third error, and the error threshold includes: Determine the weights corresponding to the first prediction model, the second prediction model, and the third prediction model; Based on the weights, the first error, the second error, and the third error are weighted and averaged to obtain the target error. Based on the comparison between the target error and the error threshold, it is determined whether the actual carbon emission data is abnormal.
8. A device for detecting anomalies in carbon emission data, characterized in that, The device includes: The processing module is used to input the target coal quality parameters into multiple pre-generated prediction models to obtain multiple prediction results of carbon emission data. The multiple prediction models include a first prediction model, a second prediction model, and a third prediction model trained using different machine learning algorithms. The multiple prediction results include the first prediction data output by the first prediction model, the second prediction data output by the second prediction model, and the third prediction data output by the third prediction model. The first acquisition module is used to acquire the actual carbon emission data corresponding to the target coal quality parameters; The first determining module is used to compare the actual carbon emission data with the first predicted data, the second predicted data, and the third predicted data, respectively, and determine whether the actual carbon emission data is abnormal based on the comparison results.
9. 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-7.
10. 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-7.
11. 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-7.