Carbon emission data verification method, device, computer equipment and storage medium
By calculating the sample distance value in the carbon emission dataset and verifying the preset interval range, outliers are identified to determine the abnormal situation of carbon emission samples, the problem of low verification accuracy in the prior art is solved, and more efficient and accurate Carbon emission data verification.
Patent Information
- Application Number
- CN202311400419.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-26
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2043-10-26
AI Technical Summary
The existing carbon emission data verification methods have low accuracy, mainly due to the lack of experience and professionalism of the verification personnel.
By obtaining the carbon emission data set, calculate the distance value between each carbon emission sample, determine the data set to be verified, and verify the distance value according to the preset interval range, identify and process outliers to determine the abnormality of the current carbon emission sample .
It improves the accuracy of carbon emission data verification, avoids problems caused by the professionalism and insufficient time of verification personnel, and can achieve batch processing and reasonable verification of multi-enterprise data.
Smart Images

Figure CN117251816B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of carbon emission management, and in particular to a method, device, computer equipment and storage medium for verifying carbon emission data. Background Art
[0002] In recent years, with the global climate change and increasingly serious environmental problems, carbon emissions (especially corporate carbon emissions) have become one of the main causes of the global greenhouse effect.
[0003] In order to meet the above challenges, verifying the accuracy and reliability of carbon emission data provided by enterprises has become an urgent problem to be solved. At present, the existing verification method is that the verifier verifies the carbon emission data provided by enterprises based on the scale and operating conditions of the enterprises.
[0004] However, the above method has the problem of low verification accuracy. Summary of the invention
[0005] Based on this, it is necessary to provide a verification method, device, computer equipment and storage medium for carbon emission data that can improve the verification accuracy in response to the above technical problems.
[0006] In a first aspect, the present application provides a method for verifying carbon emission data, comprising:
[0007] Obtain a carbon emission data set; the carbon emission data set includes at least two carbon emission samples;
[0008] According to the distance values between each carbon emission sample in the carbon emission data set, the data set to be verified is determined; the data set to be verified includes the distance values corresponding to each carbon emission sample;
[0009] Each distance value in the verification data set is verified according to the preset interval range to obtain a verification result.
[0010] In one embodiment, the carbon emission data set includes a current carbon emission sample and at least one historical carbon emission sample, and each distance value in the verification data set is verified according to a preset interval range to obtain a verification result, including:
[0011] The distance values in the data set to be verified that do not fall within the preset interval are regarded as outliers;
[0012] Based on the outliers and the carbon emission data set, a verification result is obtained; the verification result indicates whether the current carbon emission sample is abnormal.
[0013] In one embodiment, the verification result obtained based on the outlier and the carbon emission data set includes:
[0014] Determine the carbon emission samples corresponding to the outliers from the carbon emission data set;
[0015] Determine whether the carbon emission sample corresponding to the outlier is the current carbon emission sample. If the carbon emission sample corresponding to the outlier is the current carbon emission sample, determine that the current carbon emission sample has an anomaly; if the carbon emission sample corresponding to the outlier is not the current carbon emission sample, determine that the current carbon emission sample does not have an anomaly.
[0016] In one embodiment, if there are multiple distance values that do not fall within the preset interval range, a verification result is obtained based on the outlier value and the carbon emission data set, including:
[0017] Determine whether the carbon emission sample corresponding to each outlier is the current carbon emission sample;
[0018] If the carbon emission samples corresponding to all abnormal values are not the current carbon emission samples, it is determined that there is no abnormality in the current carbon emission sample;
[0019] If the carbon emission sample corresponding to any outlier among the multiple outliers is the current carbon emission sample, it is determined that the current carbon emission sample has an anomaly.
[0020] In one embodiment, the method further comprises:
[0021] Extract quartile parameters from the data set to be verified to obtain a first boundary value and a second boundary value;
[0022] The range between the first boundary value and the second boundary value is used as the preset interval range.
[0023] In one embodiment, the step of determining the data set to be verified based on the distance values between the carbon emission samples in the carbon emission data set includes:
[0024] Calculate the Euclidean distance between each carbon emission sample and any other carbon emission sample;
[0025] Generate a candidate data set corresponding to each carbon emission sample according to the Euclidean distance value between each carbon emission sample and any other carbon emission sample;
[0026] The distance value of the preset location is extracted from the candidate data set corresponding to each carbon emission sample to generate a data set to be verified.
[0027] In one embodiment, the method further comprises:
[0028] Preprocessing the carbon emission data set to obtain a preprocessed carbon emission data set; the preprocessing includes at least one of missing value processing and standardization processing;
[0029] According to the distance values between each carbon emission sample in the carbon emission data set, the data set to be verified is determined, including:
[0030] According to the distance values between each carbon emission sample in the preprocessed carbon emission data set, the data set to be verified is determined.
[0031] In a second aspect, the present application also provides a carbon emission data verification device, including:
[0032] An acquisition module is used to acquire a carbon emission data set; the carbon emission data set includes at least two carbon emission samples;
[0033] A determination module is used to determine the data set to be verified according to the distance relationship between each carbon emission sample in the carbon emission data set; the data set to be verified includes the distance value corresponding to each carbon emission sample;
[0034] The verification module is used to verify each distance value in the verification data set according to a preset interval range to obtain a verification result.
[0035] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0036] Obtain a carbon emission data set; the carbon emission data set includes at least two carbon emission samples;
[0037] According to the distance values between each carbon emission sample in the carbon emission data set, the data set to be verified is determined; the data set to be verified includes the distance values corresponding to each carbon emission sample;
[0038] Each distance value in the verification data set is verified according to the preset interval range to obtain a verification result.
[0039] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0040] Obtain a carbon emission data set; the carbon emission data set includes at least two carbon emission samples;
[0041] According to the distance values between each carbon emission sample in the carbon emission data set, the data set to be verified is determined; the data set to be verified includes the distance values corresponding to each carbon emission sample;
[0042] Each distance value in the verification data set is verified according to the preset interval range to obtain a verification result.
[0043] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0044] Obtain a carbon emission data set; the carbon emission data set includes at least two carbon emission samples;
[0045] According to the distance values between each carbon emission sample in the carbon emission data set, the data set to be verified is determined; the data set to be verified includes the distance values corresponding to each carbon emission sample;
[0046] Each distance value in the verification data set is verified according to the preset interval range to obtain a verification result.
[0047] The above-mentioned verification method, device, computer equipment and storage medium for carbon emission data first obtain a carbon emission data set, then determine the data set to be verified based on the distance value between each carbon emission sample in the carbon emission data set, and then verify each distance value in the data set to be verified based on a preset interval range to obtain a verification result. The above-mentioned method verifies the distance value between each carbon emission sample in the carbon emission data set one by one based on the preset interval range, and obtains a verification agency. Compared with the existing method of verifying carbon emission data based on the experience of the verifier, it avoids the problem of low verification accuracy caused by the professionalism and time shortage of the verifier; in addition, this method can realize the batch processing of a large amount of data and the rationality verification of carbon verification declaration data of multiple enterprises, thereby improving the verification accuracy of carbon emission data. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0049] Figure 1 A diagram of an application environment of a method for verifying carbon emission data in an embodiment;
[0050] Figure 2 A schematic diagram of a flow chart of a method for verifying carbon emission data in one embodiment;
[0051] Figure 3 A schematic diagram of a flow chart of a method for verifying carbon emission data in another embodiment;
[0052] Figure 4 A schematic diagram of a flow chart of a method for verifying carbon emission data in another embodiment;
[0053] Figure 5 A schematic diagram of a flow chart of a method for verifying carbon emission data in another embodiment;
[0054] Figure 6 A schematic diagram of a flow chart of a method for verifying carbon emission data in another embodiment;
[0055] Figure 7 A schematic diagram of a flow chart of a method for verifying carbon emission data in another embodiment;
[0056] Figure 8 A schematic diagram of a flow chart of a method for verifying carbon emission data in another embodiment;
[0057] Fig. 9 A schematic diagram of a flow chart of a method for verifying carbon emission data in another embodiment;
[0058] Fig.10 4 is a structural block diagram of a device for verifying carbon emission data in an embodiment. DETAILED DESCRIPTION
[0059] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0060] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" in the specification and claims of this application and the above-mentioned figure descriptions and any variations thereof are intended to cover non-exclusive inclusions.
[0061] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.
[0062] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0063] In recent years, with the global climate change and increasingly serious environmental problems, carbon emissions (especially corporate carbon emissions) have become one of the main causes of the global greenhouse effect. In order to meet this challenge, it has become an urgent issue to verify the accuracy and reliability of carbon emission data provided by enterprises (for example, fuel combustion data, emission factors, carbon emissions and production data, etc.).
[0064] At present, the existing verification method is based on the experience and knowledge of the verifiers, and verifies the carbon emission data provided by the enterprise according to the data files submitted by the enterprise (the scale of the enterprise, operating conditions, etc.). However, the data verification method based on the experience of the verifiers is often limited by the personal experience and judgment of the verifiers. Different verifiers may come to different conclusions and may be affected by subjective bias. Therefore, the above method has the problem of low verification accuracy. This application aims to solve this problem.
[0065] After introducing the background technology of the carbon emission data verification method provided in the embodiment of the present application, the following briefly describes the implementation environment involved in the carbon emission data verification method provided in the embodiment of the present application. The carbon emission data verification method provided in the embodiment of the present application can be applied to Figure 1 In the computer device shown. The computer device includes a processor and a memory connected by a system bus, and a computer program is stored in the memory. When the processor executes the computer program, the steps of the following method embodiment can be executed. Optionally, the computer device may also include an input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory, and the non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to communicate with an external terminal through a network connection. Optionally, the computer device can be a server, a personal computer, a personal digital assistant, or other terminal devices, such as a tablet computer, a mobile phone, etc., or a cloud or remote server. The embodiment of the present application does not limit the specific form of the computer device.
[0066] Those skilled in the art will understand that Figure 1 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0067] After introducing the application scenarios of the method for verifying carbon emission data provided by the embodiments of the present application, the following focuses on introducing the method for verifying carbon emission data described in the present application.
[0068] In one embodiment, Figure 2 As shown, a method for verifying carbon emission data is provided, which is applied to Figure 1 The computer device in the example is used to illustrate, including the following steps:
[0069] S201. Obtain a carbon emission dataset.
[0070] Among them, the carbon emission data set includes at least two carbon emission samples; the carbon emission sample can be a current carbon emission sample or a historical carbon emission sample; the carbon emission sample can include fuel combustion data, emission factors, carbon emissions and production data, etc.; it should be noted that the data collection subject of the historical carbon emission sample and the current carbon emission sample can be the same enterprise, or it can be an enterprise with the same product, similar process and similar production scale.
[0071] In the embodiment of the present application, when it is necessary to perform accuracy verification on the current carbon emission sample data of a certain enterprise, it is necessary to obtain the historical emission samples of the enterprise, the current emission samples of the enterprise, and the historical emission samples of enterprises of similar size to the enterprise from the carbon emission database in the computer device. It should be noted that the carbon emission database pre-stores historical emission samples of multiple enterprises and current emission samples corresponding to multiple enterprises. The carbon emission database can be pre-installed in the computer device to obtain carbon emission data provided by multiple enterprises, and when receiving the acquisition instruction sent by the computer device, the corresponding carbon emission samples are sent to the computer device.
[0072] S202: Determine a data set to be verified according to the distance values between each carbon emission sample in the carbon emission data set.
[0073] The data set to be verified includes the distance values corresponding to each carbon emission sample.
[0074] In the embodiment of the present application, after the carbon emission data set is obtained, the distance value between each carbon emission sample in the carbon emission data set can be obtained first, and then the data set to be verified is determined according to the distance value between each carbon emission sample. Optionally, after the carbon emission data set is obtained, the distance value between any two carbon emission samples in the carbon emission data set can be obtained first, and then the distance value corresponding to each carbon emission sample is determined according to the average value of the distance value between each carbon emission sample and other carbon emission samples, and then the data set to be verified is formed according to the distance value corresponding to each carbon emission sample.
[0075] S203 , verify each distance value in the verification data set according to a preset interval range to obtain a verification result.
[0076] Among them, the preset interval range can be an interval range determined according to the distance values corresponding to each carbon emission sample, or it can be an interval range manually determined by the verifier based on verification experience, and the embodiments of this application will not be elaborated here.
[0077] In an embodiment of the present application, after obtaining the distance values in the data set to be verified as described above, each distance value in the data set to be verified can be verified one by one according to a preset interval range, and the abnormal values present in each distance value in the data set to be verified can be determined, and whether the current carbon emission sample has an abnormality can be determined based on the abnormal values, and the existence of an abnormality in the current carbon emission sample or the absence of an abnormality in the current carbon emission sample can be determined as the verification result.
[0078] The method for verifying carbon emission data provided in the embodiment of the present application first obtains a carbon emission data set, then determines a data set to be verified based on the distance value between each carbon emission sample in the carbon emission data set, and then verifies each distance value in the data set to be verified based on a preset interval range to obtain a verification result. The above method verifies the distance value between each carbon emission sample in the carbon emission data set one by one based on the preset interval range, and obtains a verification mechanism. Compared with the existing method of verifying carbon emission data based on the experience of the verifier, it avoids the problem of low verification accuracy caused by the lack of professionalism and time of the verifier; in addition, the method can realize the batch processing of a large amount of data and the rationality verification of carbon verification declaration data of multiple enterprises, thereby improving the verification accuracy of carbon emission data.
[0079] In one embodiment, in the above Figure 2 Based on the embodiment shown, the above carbon emission data set includes a current carbon emission sample and at least one historical carbon emission sample. This embodiment can also describe the process of obtaining the verification result, that is, S203 "verify each distance value in the verification data set according to the preset interval range to obtain the verification result", such as Figure 3 As shown, including:
[0080] S301: The distance values in the to-be-verified data set that do not fall within the preset interval are regarded as abnormal values.
[0081] Among them, there can be multiple outliers or a single one.
[0082] In the embodiment of the present application, when the data set to be verified is obtained, it is possible to determine whether the distance value corresponding to each carbon emission sample in the data set to be verified falls within the preset interval, and the distance value corresponding to each carbon emission sample in the data set to be verified that does not fall within the preset interval is taken as an abnormal value. For example, the data set to be verified X can be expressed as: {X1, X2, X3, X4, X5, ..., X M}, where the first X1-X m-1 That is, the distance value between each historical carbon emission sample and other carbon emission samples, X M That is, it is the distance value between the current carbon emission sample and each historical carbon emission sample. Then, after obtaining the data set X to be verified, each distance value in the data set X to be verified can be position-encoded. The data set O after position encoding can be expressed as {01, 02, 03, 04, 05, ..., 0M}. Furthermore, it is determined one by one whether each distance value in the data set X to be verified falls within the preset interval, and the distance values corresponding to the carbon emission samples in the data set X to be verified that do not fall within the preset interval are taken as abnormal values.
[0083] S302. Obtain verification results based on the outliers and the carbon emission data set.
[0084] Among them, the verification result indicates whether the current carbon emission sample is abnormal.
[0085] In an embodiment of the present application, the computer device can pre-encode the position of each distance value in the data set to be verified, and after obtaining the distance value in the carbon emission data set as an abnormal value, return the position code of the abnormal value found in the data set to be verified, and when the position code of the abnormal value is the position code of the distance value between the current carbon emission sample and other historical carbon emission samples, determine the verification result that the current carbon emission sample in the carbon emission data set is abnormal.
[0086] Optionally, two procedures for obtaining validation results based on outlier and carbon emission datasets are provided below:
[0087] Example 1: In one case, the carbon emission data set includes only one abnormal sample, that is, either there is one abnormal sample among multiple historical carbon emission samples, and the current carbon emission sample is normal; or the current carbon emission sample is abnormal, and multiple historical carbon emission samples are normal samples. Then, the above S302 "obtaining a verification result based on the abnormal value and the carbon emission data set" is as follows: Figure 4 As shown, including:
[0088] S3021. Determine the carbon emission samples corresponding to the outliers from the carbon emission data set.
[0089] S3022. Determine whether the carbon emission sample corresponding to the abnormal value is the current carbon emission sample. If so, go to S3023; if not, go to S3024.
[0090] S3023. Determine whether the current carbon emission sample is abnormal.
[0091] S3024. Determine that there is no abnormality in the current carbon emission sample.
[0092] In an embodiment of the present application, after obtaining the outlier value as mentioned above, the distance value corresponding to the carbon emission sample corresponding to the outlier value can be first returned in the data set to be verified based on the outlier value, and the corresponding carbon emission sample can be obtained from the carbon emission data set based on the distance value corresponding to the carbon emission sample, and it can be determined whether the obtained carbon emission sample is the current carbon emission sample, and if the obtained carbon emission sample is the current carbon emission sample, it can be determined that there is an anomaly in the current carbon emission sample, and if the obtained carbon emission sample is not the current carbon emission sample, it can be determined that there is no anomaly in the current carbon emission sample.
[0093] Example 2: In one case, if there are multiple distance values that do not fall within the preset interval, that is, if there may be multiple abnormal samples in multiple historical carbon emission samples, the current carbon emission sample may also be an abnormal sample; if there may be multiple abnormal samples in multiple historical carbon emission samples, the current carbon emission sample may also be a non-abnormal sample, then the above S302 "obtaining a verification result based on the abnormal value and the carbon emission data set" is as follows: Figure 5 As shown, including:
[0094] S3025. Determine whether the carbon emission sample corresponding to each outlier value is the current carbon emission sample. If the carbon emission samples corresponding to all outliers are not the current carbon emission sample, go to S3026. If the carbon emission sample corresponding to any outlier value among multiple outliers is the current carbon emission sample, go to S3027.
[0095] S3026. Determine that there is no abnormality in the current carbon emission sample.
[0096] S3027. Determine whether the current carbon emission sample is abnormal.
[0097] In an embodiment of the present application, after obtaining the multiple outlier values as mentioned above, the distance values corresponding to the multiple carbon emission samples corresponding to the multiple outlier values can be first returned in the data set to be verified based on the multiple outlier values, and the corresponding multiple carbon emission samples can be obtained from the carbon emission data set based on the distance values corresponding to the multiple carbon emission samples, and it can be determined whether the multiple carbon emission samples obtained include the current carbon emission sample, and if the multiple carbon emission samples obtained include the current carbon emission sample, it can be determined that the current carbon emission sample has an anomaly, and if the multiple carbon emission samples obtained are all non-current carbon emission samples, it can be determined that the current carbon emission sample has no anomaly.
[0098] The current carbon emission sample verification method provided in the embodiment of the present application verifies the distance values between each carbon emission sample in the carbon emission data set one by one based on a preset interval range, and obtains a verification agency. Compared with the existing method of verifying carbon emission data based on the experience of verifiers, it avoids the problem of low verification accuracy caused by the lack of professionalism and time of verifiers; in addition, the method can realize batch processing of large amounts of data and rationality verification of carbon verification declaration data of multiple enterprises, thereby improving the verification accuracy of carbon emission data.
[0099] In one embodiment, in the above Figure 2-5 Based on the embodiment shown, Figure 6 As shown, the above method also includes:
[0100] S204. Extract quartile parameters from the data set to be verified to obtain a first boundary value and a second boundary value.
[0101] The first boundary value is the lower boundary of the preset interval range, and the second boundary value is the upper boundary of the preset interval range.
[0102] In the embodiment of the present application, after the data set to be verified is obtained as described above, the distance values between the carbon emission samples in the data set to be verified can be sorted in ascending order to obtain the sorted data set to be verified, and then the distance values of the quarter positions from small to large in the sorted data set to be verified are taken, and the distance values of the three quarter positions from small to large in the sorted data set to be verified are taken, and the first boundary value and the second boundary value are determined according to the distance values of the quarter positions from small to large in the data set to be verified, and the distance values of the three quarter positions from small to large in the data set to be verified. Optionally, a method for obtaining the first boundary value and the second boundary value is provided below:
[0103] Step 1: Obtain the distance values from the smallest to the largest one-quarter of the data set to be verified, as well as the distance values from the smallest to the largest three-quarters of the data set, including:
[0104] a. First, sort the distance values in the data set to be verified from small to large;
[0105] b. Then calculate the location of the distance value from the smallest to the largest quarter of the data set to be verified according to the following formula (1):
[0106]
[0107] Among them, m represents the number of distance values in the data set to be verified, that is, the number of carbon emission samples in the carbon emission data set.
[0108] c. If q1 calculated by the above formula (1) is an integer, then the distance value of the quarter position from small to large in the data set to be verified is the distance value at the position q1; if q1 calculated by the above formula (1) is a non-integer, then the distance value of the quarter position from small to large in the data set to be verified is the average of the distance value at the position before and the distance value at the position after q1. For example, if m = 100, then q1 is 25, that is, the distance value at the 25th position is the distance value of the quarter position from small to large in the data set to be verified; if m = 22, then q1 is 5.5, that is, the distance value of the quarter position from small to large in the data set to be verified is the average of the distance value at the position before and the distance value at the position after 5.5.
[0109] d. Then calculate the position of the distance value from the smallest to the largest three-quarters of the position in the data set to be verified according to the following formula (2):
[0110]
[0111] Among them, m represents the number of distance values in the data set to be verified, that is, the number of carbon emission samples in the carbon emission data set.
[0112] e. If q2 calculated by the above formula (2) is an integer, then the distance value of the three-quarters position from small to large in the data set to be verified is the distance value at the q2 position; if q2 calculated by the above formula (2) is a non-integer, then the distance value of the three-quarters position from small to large in the data set to be verified is the average of the distance value at the previous position and the distance value at the next position of the q2 position. For example, if m = 100, then q3 is 75, that is, the distance value at the 75th position is the distance value of the three-quarters position from small to large in the data set to be verified; if m = 22, then q1 is 16.5, that is, the distance value of the three-quarters position from small to large in the data set to be verified is the average of the distance value at the previous position 16 and the distance value at the next position 17 of the 16.5 position.
[0113] Step 2: After obtaining the distance value from the smallest to the largest one-quarter position and the distance value from the smallest to the largest three-quarter position in the data set to be verified, calculate the difference IQR between the two distance values as shown in the following formula (3):
[0114] IQR = Q3 - Q1 (3);
[0115] Among them, Q3 represents the distance value from the smallest to the largest three-quarters of the position in the data set to be verified, and Q1 represents the distance value from the smallest to the largest one-quarter of the position in the data set to be verified.
[0116] It should be noted that IQR can measure the dispersion of the middle 50% of the data.
[0117] Step 3: Determine the first boundary value and the second boundary value according to the following formula (4):
[0118]
[0119] Among them, S1 represents the first boundary value, and S2 represents the second boundary value.
[0120] S205: Use the range between the first boundary value and the second boundary value as a preset interval range.
[0121] In the embodiment of the present application, after the first boundary value and the second boundary value are obtained as described above, the range between the first boundary value and the second boundary value can be used as the preset boundary value.
[0122] The method for determining the preset interval range provided in the embodiment of the present application determines the preset interval range based on the quartile parameters in the data set to be verified, thereby providing a basis for subsequent verification of each distance value in the data set to be verified based on the preset interval range.
[0123] In one embodiment, in the above Figure 2-5 Based on the embodiment shown, this embodiment can also describe the process of obtaining the data set to be verified, that is, S202 "determine the data set to be verified according to the distance value between each carbon emission sample in the carbon emission data set", such as Figure 7 As shown, including:
[0124] S401. Calculate the Euclidean distance between each carbon emission sample and any other carbon emission sample.
[0125] In the embodiment of the present application, after the carbon emission data set is obtained, the Euclidean distance value between each carbon emission sample in the carbon emission data set and any other carbon emission sample can be calculated. Optionally, the method of calculating the Euclidean distance value between each carbon emission sample and any other carbon emission sample can include:
[0126] Step 1: Based on each carbon emission sample and its corresponding feature item, the carbon emission data set is represented by the following matrix (5):
[0127]
[0128] The carbon emission data set T contains m carbon emission samples, and each carbon emission sample contains n feature items.
[0129] Step 2: Calculate the carbon emission sample T i and carbon emission sample T j Take the carbon emission sample T as an example to calculatei and carbon emission sample T j The Euclidean distance between them can be calculated using the following formula (6):
[0130]
[0131] Among them, d(T i ,T j ) represents the carbon emission sample T i and carbon emission sample T j The Euclidean distance between .
[0132] Furthermore, the Euclidean distance between each carbon emission sample and any other carbon emission sample is calculated according to the above formula (6).
[0133] S402: Generate a candidate data set corresponding to each carbon emission sample according to the Euclidean distance value between each carbon emission sample and any other carbon emission sample.
[0134] In the embodiment of the present application, after the Euclidean distance value between each carbon emission sample and any other carbon emission sample is obtained, the Euclidean distance value between each carbon emission sample and any other carbon emission sample constitutes a candidate data set corresponding to each carbon emission sample. For example, the Euclidean distance value between carbon emission sample 1 and any other carbon emission sample constitutes a candidate data set corresponding to carbon emission sample 1, and the Euclidean distance value between carbon emission sample 2 and any other carbon emission sample constitutes a candidate data set corresponding to carbon emission sample 2.
[0135] S403: extracting the distance value of the preset position from the candidate data set corresponding to each carbon emission sample to generate a data set to be verified.
[0136] After the candidate data set corresponding to each carbon emission sample is obtained as mentioned above, each candidate data in the candidate data set corresponding to each carbon emission sample can be sorted in order from large to small (from small to large), and based on the sorted candidate data, the Kth candidate data is taken as the candidate data of the carbon emission sample. Furthermore, based on the same method, the candidate data of each carbon emission sample is taken, and finally the candidate data corresponding to each carbon emission sample are obtained to form a candidate data set. For example, the Euclidean distances between carbon emission sample 1 and any other carbon emission samples are 2.4, 1.1, 3.6, 0.7, ..., 3.1, respectively. After sorting in descending order, the Euclidean distance values are 0.7, 1.1, 2.4, 3.1, ..., 3.6, and the third Euclidean distance value 2.4 is taken as the candidate data of carbon emission sample 1; the Euclidean distances between carbon emission sample 2 and any other carbon emission samples are 2.1, 1.6, 3.5, 4.7, ..., 0.1, respectively. After sorting in descending order, the Euclidean distance values are 0.1, 1.6, 2.1, 3.5, ..., 4.7, and the third Euclidean distance value 2.1 is taken as the candidate data of carbon emission sample 2, ..., and the candidate data of each carbon emission sample is calculated, and finally the candidate data corresponding to each carbon emission sample is obtained to form a candidate data set.
[0137] The embodiment of the present application provides a method for obtaining a data set to be verified, which determines a verification data set based on the numerical relationship between the Euclidean distance values between each carbon emission sample and other carbon emission samples, thereby laying a foundation for subsequently determining a verification result based on the verification data set.
[0138] In one embodiment, in the above Figure 2 Based on the embodiment shown, Figure 8 As shown, the above method also includes:
[0139] S206: preprocess the carbon emission data set to obtain a preprocessed carbon emission data set.
[0140] The preprocessing includes at least one of missing value processing and standardization processing.
[0141] In the embodiment of the present application, after the carbon emission data set is obtained as described above, the carbon emission data set may be preprocessed to obtain a preprocessed carbon emission data set. Optionally, the carbon emission data set may be processed for missing values to obtain a carbon emission data set after missing value processing, or the carbon emission data set may be standardized to obtain a standardized carbon emission data set, or the carbon emission data set may be processed for missing values and standardized to obtain a carbon emission data set after missing value processing and standardized processing.
[0142] Exemplarily, the process of processing missing values for a carbon emission dataset may include:
[0143] When the total amount of missing data values for a data item in the carbon emission dataset exceeds 10% of the sample size of the carbon emission dataset, the data item will be deleted from the dataset; when the total amount of missing data values for a data item in the carbon emission dataset is less than 10% of the sample size of the carbon emission dataset, data with missing values will be deleted; when there are missing data values in the current carbon emission sample that needs to be verified, the data items with missing data values in the historical carbon emission samples will be deleted.
[0144] For example, the process of standardizing the carbon emission data set can be expressed by the following formula (7):
[0145]
[0146] Among them, x ijnormalized represents the value of the jth eigenvalue of the i-th sample after normalization, x ij represents the jth eigenvalue of the original i-th sample, μ j represents the mean of the jth eigenvalue in the entire data set, σ j represents the standard deviation of the jth feature in the entire dataset.
[0147] The data preprocessing method provided in the embodiment of the present application preprocesses the data including missing values and standard deviations, so that the subsequent accuracy verification results based on the preprocessed data are more accurate.
[0148] In one embodiment, Fig. 9 As shown, a complete verification method for carbon emission data is provided, including:
[0149] S10, obtaining a carbon emission data set of at least two carbon emission samples;
[0150] S11. Calculate the Euclidean distance between each carbon emission sample and any other carbon emission sample;
[0151] S12. Generate a candidate data set corresponding to each carbon emission sample according to the Euclidean distance value between each carbon emission sample and any other carbon emission sample;
[0152] S13, extracting the distance value of the preset position from the candidate data set corresponding to each carbon emission sample to generate a data set to be verified;
[0153] S14, extracting quartile parameters from the data set to be verified to obtain a first boundary value and a second boundary value;
[0154] S15, taking the range between the first boundary value and the second boundary value as the preset interval range;
[0155] S16, taking the distance values in the to-be-verified data set that do not fall within the preset interval as outliers;
[0156] S17, determining whether the carbon emission sample corresponding to each outlier is the current carbon emission sample. If the carbon emission samples corresponding to all outliers are not the current carbon emission samples, then go to S18. If the carbon emission sample corresponding to any outlier among the multiple outliers is the current carbon emission sample, then go to S19.
[0157] S18. Determine that there is no abnormality in the current carbon emission sample;
[0158] S19. Determine whether the current carbon emission sample is abnormal.
[0159] The above method verifies the distance values between each carbon emission sample in the carbon emission data set one by one based on a preset interval range, and obtains a verification agency. Compared with the existing method of verifying carbon emission data based on the experience of verifiers, it avoids the problem of low verification accuracy caused by the lack of professionalism and time of verifiers; in addition, this method can realize batch processing of large amounts of data and rationality verification of carbon verification declaration data of multiple enterprises, thereby improving the verification accuracy of carbon emission data.
[0160] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0161] Based on the same inventive concept, the embodiment of the present application also provides a device for verifying carbon emission data for implementing the method for verifying carbon emission data involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of one or more devices for verifying carbon emission data provided below can refer to the limitations of the method for verifying carbon emission data above, and will not be repeated here.
[0162] In an exemplary embodiment, Fig.10As shown, a device for verifying carbon emission data is provided, comprising: an acquisition module 10, a first determination module 11 and a verification module 12, wherein:
[0163] The acquisition module 10 is used to acquire a carbon emission data set; the carbon emission data set includes at least two carbon emission samples.
[0164] The first determination module 11 is used to determine the data set to be verified according to the distance values between each carbon emission sample in the carbon emission data set; the data set to be verified includes the distance values corresponding to each carbon emission sample.
[0165] The verification module 12 is used to verify each distance value in the verification data set according to a preset interval range to obtain a verification result.
[0166] In an exemplary embodiment, the carbon emission data set includes a current carbon emission sample and at least one historical carbon emission sample, and the verification module 12 includes: a determination unit and an acquisition unit, wherein:
[0167] A determination unit, specifically used to regard the distance values in the to-be-verified data set that do not fall within the preset interval as abnormal values;
[0168] The acquisition unit is specifically used to obtain a verification result based on the outlier and the carbon emission data set; the verification result indicates whether the current carbon emission sample is abnormal.
[0169] In an exemplary embodiment, the above-mentioned acquisition unit is specifically used to determine the carbon emission sample corresponding to the outlier value from the carbon emission data set; determine whether the carbon emission sample corresponding to the outlier value is the current carbon emission sample, if the carbon emission sample corresponding to the outlier value is the current carbon emission sample, then determine that there is an abnormality in the current carbon emission sample; if the carbon emission sample corresponding to the outlier value is not the current carbon emission sample, then determine that there is no abnormality in the current carbon emission sample.
[0170] In an exemplary embodiment, if there are multiple distance values that do not fall within the preset interval range, the above-mentioned acquisition unit determines whether the carbon emission sample corresponding to each abnormal value is the current carbon emission sample; if the carbon emission samples corresponding to all abnormal values are not the current carbon emission samples, it is determined that there is no abnormality in the current carbon emission sample; if the carbon emission sample corresponding to any abnormal value among multiple abnormal values is the current carbon emission sample, it is determined that there is an abnormality in the current carbon emission sample.
[0171] In an exemplary embodiment, the above device further includes: an acquisition module and a second determination module, wherein:
[0172] An acquisition module is used to extract quartile parameters from the data set to be verified to obtain a first boundary value and a second boundary value;
[0173] The second determining module is used to use the range between the first boundary value and the second boundary value as a preset interval range.
[0174] In an exemplary embodiment, the first determining module 11 includes: a calculating unit, a first generating unit and a second generating unit, wherein:
[0175] A calculation unit, specifically used to calculate the Euclidean distance value between each carbon emission sample and any other carbon emission sample;
[0176] A first generating unit is used to generate a candidate data set corresponding to each carbon emission sample according to the Euclidean distance value between each carbon emission sample and any other carbon emission sample;
[0177] The second generating unit is used to extract the distance value of the preset position from the candidate data set corresponding to each carbon emission sample to generate a data set to be verified.
[0178] In an exemplary embodiment, the apparatus further comprises: a processing module, configured to preprocess the carbon emission data set to obtain a preprocessed carbon emission data set; the preprocessing comprises at least one of missing value processing and standardization processing;
[0179] The first determining unit is used to determine the data set to be verified according to the distance values between the carbon emission samples in the preprocessed carbon emission data set.
[0180] Each module in the above-mentioned carbon emission data verification device can be implemented in whole or in part by software, hardware and their combination. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the corresponding operations of each of the above modules.
[0181] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 1As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store carbon emission data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for verifying carbon emission data is implemented.
[0182] Those skilled in the art will understand that Figure 1 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0183] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0184] Obtain a carbon emission data set; the carbon emission data set includes at least two carbon emission samples;
[0185] According to the distance values between each carbon emission sample in the carbon emission data set, the data set to be verified is determined; the data set to be verified includes the distance values corresponding to each carbon emission sample;
[0186] Each distance value in the verification data set is verified according to the preset interval range to obtain a verification result.
[0187] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0188] The distance values in the data set to be verified that do not fall within the preset interval are regarded as outliers;
[0189] Based on the outliers and the carbon emission data set, a verification result is obtained; the verification result indicates whether the current carbon emission sample is abnormal.
[0190] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0191] Determine the carbon emission samples corresponding to the outliers from the carbon emission data set;
[0192] Determine whether the carbon emission sample corresponding to the outlier is the current carbon emission sample. If the carbon emission sample corresponding to the outlier is the current carbon emission sample, determine that the current carbon emission sample has an anomaly; if the carbon emission sample corresponding to the outlier is not the current carbon emission sample, determine that the current carbon emission sample does not have an anomaly.
[0193] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0194] Determine whether the carbon emission sample corresponding to each outlier is the current carbon emission sample;
[0195] If the carbon emission samples corresponding to all abnormal values are not the current carbon emission samples, it is determined that there is no abnormality in the current carbon emission sample;
[0196] If the carbon emission sample corresponding to any outlier among the multiple outliers is the current carbon emission sample, it is determined that the current carbon emission sample has an anomaly.
[0197] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0198] Extract quartile parameters from the data set to be verified to obtain a first boundary value and a second boundary value;
[0199] The range between the first boundary value and the second boundary value is used as the preset interval range.
[0200] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0201] Calculate the Euclidean distance between each carbon emission sample and any other carbon emission sample;
[0202] Generate a candidate data set corresponding to each carbon emission sample according to the Euclidean distance value between each carbon emission sample and any other carbon emission sample;
[0203] The distance value of the preset location is extracted from the candidate data set corresponding to each carbon emission sample to generate a data set to be verified.
[0204] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0205] Preprocessing the carbon emission data set to obtain a preprocessed carbon emission data set; the preprocessing includes at least one of missing value processing and standardization processing;
[0206] According to the distance values between each carbon emission sample in the carbon emission data set, the data set to be verified is determined, including:
[0207] According to the distance values between each carbon emission sample in the preprocessed carbon emission data set, the data set to be verified is determined.
[0208] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0209] Obtain a carbon emission data set; the carbon emission data set includes at least two carbon emission samples;
[0210] According to the distance values between each carbon emission sample in the carbon emission data set, the data set to be verified is determined; the data set to be verified includes the distance values corresponding to each carbon emission sample;
[0211] Each distance value in the verification data set is verified according to the preset interval range to obtain a verification result.
[0212] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0213] The distance values in the data set to be verified that do not fall within the preset interval are regarded as outliers;
[0214] Based on the outliers and the carbon emission data set, a verification result is obtained; the verification result indicates whether the current carbon emission sample is abnormal.
[0215] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0216] Determine the carbon emission samples corresponding to the outliers from the carbon emission data set;
[0217] Determine whether the carbon emission sample corresponding to the outlier is the current carbon emission sample. If the carbon emission sample corresponding to the outlier is the current carbon emission sample, determine that the current carbon emission sample has an anomaly; if the carbon emission sample corresponding to the outlier is not the current carbon emission sample, determine that the current carbon emission sample does not have an anomaly.
[0218] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0219] Determine whether the carbon emission sample corresponding to each outlier is the current carbon emission sample;
[0220] If the carbon emission samples corresponding to all abnormal values are not the current carbon emission samples, it is determined that there is no abnormality in the current carbon emission sample;
[0221] If the carbon emission sample corresponding to any outlier among the multiple outliers is the current carbon emission sample, it is determined that the current carbon emission sample has an anomaly.
[0222] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0223] Extract quartile parameters from the data set to be verified to obtain a first boundary value and a second boundary value;
[0224] The range between the first boundary value and the second boundary value is used as the preset interval range.
[0225] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0226] Calculate the Euclidean distance between each carbon emission sample and any other carbon emission sample;
[0227] Generate a candidate data set corresponding to each carbon emission sample according to the Euclidean distance value between each carbon emission sample and any other carbon emission sample;
[0228] The distance value of the preset location is extracted from the candidate data set corresponding to each carbon emission sample to generate a data set to be verified.
[0229] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0230] Preprocessing the carbon emission data set to obtain a preprocessed carbon emission data set; the preprocessing includes at least one of missing value processing and standardization processing;
[0231] According to the distance values between each carbon emission sample in the carbon emission data set, the data set to be verified is determined, including:
[0232] According to the distance values between each carbon emission sample in the preprocessed carbon emission data set, the data set to be verified is determined.
[0233] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0234] Obtain a carbon emission data set; the carbon emission data set includes at least two carbon emission samples;
[0235] According to the distance values between each carbon emission sample in the carbon emission data set, the data set to be verified is determined; the data set to be verified includes the distance values corresponding to each carbon emission sample;
[0236] Each distance value in the verification data set is verified according to the preset interval range to obtain a verification result.
[0237] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0238] The distance values in the data set to be verified that do not fall within the preset interval are regarded as outliers;
[0239] Based on the outliers and the carbon emission data set, a verification result is obtained; the verification result indicates whether the current carbon emission sample is abnormal.
[0240] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0241] Determine the carbon emission samples corresponding to the outliers from the carbon emission data set;
[0242] Determine whether the carbon emission sample corresponding to the outlier is the current carbon emission sample. If the carbon emission sample corresponding to the outlier is the current carbon emission sample, determine that the current carbon emission sample has an anomaly; if the carbon emission sample corresponding to the outlier is not the current carbon emission sample, determine that the current carbon emission sample does not have an anomaly.
[0243] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0244] Determine whether the carbon emission sample corresponding to each outlier is the current carbon emission sample;
[0245] If the carbon emission samples corresponding to all abnormal values are not the current carbon emission samples, it is determined that there is no abnormality in the current carbon emission sample;
[0246] If the carbon emission sample corresponding to any outlier among the multiple outliers is the current carbon emission sample, it is determined that the current carbon emission sample has an anomaly.
[0247] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0248] Extract quartile parameters from the data set to be verified to obtain a first boundary value and a second boundary value;
[0249] The range between the first boundary value and the second boundary value is used as the preset interval range.
[0250] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0251] Calculate the Euclidean distance between each carbon emission sample and any other carbon emission sample;
[0252] Generate a candidate data set corresponding to each carbon emission sample according to the Euclidean distance value between each carbon emission sample and any other carbon emission sample;
[0253] The distance value of the preset location is extracted from the candidate data set corresponding to each carbon emission sample to generate a data set to be verified.
[0254] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0255] Preprocessing the carbon emission data set to obtain a preprocessed carbon emission data set; the preprocessing includes at least one of missing value processing and standardization processing;
[0256] According to the distance values between each carbon emission sample in the carbon emission data set, the data set to be verified is determined, including:
[0257] According to the distance values between each carbon emission sample in the preprocessed carbon emission data set, the data set to be verified is determined.
[0258] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited thereto. The processors involved in each embodiment provided in this application may be general-purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, data processing logic devices based on quantum computing, etc., but are not limited thereto.
[0259] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0260] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for verifying carbon emission data, characterized in that: The method comprises: Acquire a carbon emission data set; the carbon emission data set includes at least two carbon emission samples; the carbon emission samples include fuel combustion data, emission factors, carbon emissions and production data, etc.; the carbon emission data set includes a current carbon emission sample and at least one historical carbon emission sample; Calculate the Euclidean distance value between each carbon emission sample and any other carbon emission sample; generate a candidate data set corresponding to each carbon emission sample according to the Euclidean distance value between each carbon emission sample and any other carbon emission sample; sort the Euclidean distance values in each candidate data set according to a preset order, and extract the Euclidean distance values at preset positions from each sorted candidate data set to generate a data set to be verified; the data set to be verified includes the distance values corresponding to each carbon emission sample; The distance values in the to-be-verified data set that do not fall within the preset interval are regarded as outliers; A verification result is obtained according to the abnormal value and the carbon emission data set; the verification result indicates whether the current carbon emission sample is abnormal; the carbon emission data set includes one abnormal sample, or at least two abnormal samples; In the case where the carbon emission data set includes one of the abnormal samples, the verification result is obtained based on the abnormal value and the carbon emission data set, including: determining the carbon emission sample corresponding to the abnormal value from the carbon emission data set; determining whether the carbon emission sample corresponding to the abnormal value is the current carbon emission sample, and if the carbon emission sample corresponding to the abnormal value is the current carbon emission sample, determining that the current carbon emission sample has an abnormality; if the carbon emission sample corresponding to the abnormal value is not the current carbon emission sample, determining that the current carbon emission sample does not have an abnormality; In the case where the carbon emission data set includes at least two of the abnormal samples, the verification result is obtained based on the abnormal values and the carbon emission data set, including: determining whether the carbon emission sample corresponding to each of the abnormal values is the current carbon emission sample; if the carbon emission samples corresponding to all abnormal values are not the current carbon emission samples, determining that the current carbon emission sample does not have an abnormality; if the carbon emission sample corresponding to any abnormal value among multiple abnormal values is the current carbon emission sample, determining that the current carbon emission sample has an abnormality; The method for obtaining the preset interval range includes: extracting quartile parameters from the data set to be verified to obtain a first boundary value and a second boundary value; the first boundary value is the lower boundary of the preset interval range, and the second boundary value is the upper boundary of the preset interval range; and the range between the first boundary value and the second boundary value is used as the preset interval range; The extracting quartile parameters from the data set to be verified to obtain the first boundary value and the second boundary value includes: obtaining a first distance value and a second distance value in the data set to be verified; the first distance value is a distance value at one-quarter position after the distance values in the data set to be verified are arranged in ascending order; the second distance value is a distance value at three-quarter position after the distance values in the data set to be verified are arranged in ascending order; determining a difference value according to the second distance value and the first distance value; determining the first boundary value according to the difference value and the first distance value, and determining the second boundary value according to the difference value and the second distance value; The position of the distance value of the quarter position is expressed as: The position where the distance value of the three-quarter position is located is expressed as: The difference is expressed as: The first boundary value is expressed as: The second boundary value is expressed as: in, represents the distance value of the three-quarter positions in the data set to be verified, represents the distance value of the one-quarter position in the data set to be verified; S1 represents the first boundary value, and S2 represents the second boundary value.
2. The method according to any one of claim 1, characterized in that: The preset interval range is determined according to the Euclidean distance value corresponding to each of the carbon emission samples.
3. The method according to claim 1 or 2, characterized in that: The method further comprises: Preprocessing the carbon emission data set to obtain a preprocessed carbon emission data set; the preprocessing includes at least one of missing value processing and standardization processing; The step of determining the data set to be verified according to the distance values between the carbon emission samples in the carbon emission data set includes: The data set to be verified is determined according to the distance values between the carbon emission samples in the preprocessed carbon emission data set.
4. The method according to claim 3, characterized in that The process of standardizing the carbon emission dataset is expressed as: in, represents the value of the jth eigenvalue of the ith sample in the carbon emission dataset after normalization. represents the jth eigenvalue of the i-th sample in the carbon emission dataset, represents the mean of the j-th eigenvalue in the carbon emission dataset, Represents the standard deviation of the jth feature in the carbon emission dataset.
5. The method according to claim 1 or 2, characterized in that: The obtaining of the carbon emission data set includes: The carbon emission data set is obtained from a preset carbon emission database.
6. The method according to claim 5, characterized in that The carbon emission database pre-stores historical emission samples of multiple enterprises and current emission samples of multiple enterprises.
7. The method according to claim 1, characterized in that The data collection subject of the historical carbon emission samples and the data collection subject of the current carbon emission samples are the same enterprise, or are enterprises with the same products but different production scales.
8. A device for verifying carbon emission data, characterized in that: The device comprises: An acquisition module is used to acquire a carbon emission data set; the carbon emission data set includes at least two carbon emission samples; the carbon emission samples include fuel combustion data, emission factors, carbon emissions and production data, etc.; the carbon emission data set includes a current carbon emission sample and at least one historical carbon emission sample; A determination module is used to calculate the Euclidean distance value between each of the carbon emission samples and any other carbon emission samples; generate a candidate data set corresponding to each of the carbon emission samples according to the Euclidean distance value between each of the carbon emission samples and any other carbon emission samples; sort the Euclidean distance values in each of the candidate data sets according to a preset order, and extract the Euclidean distance value of a preset position from each of the sorted candidate data sets to generate a data set to be verified; the data set to be verified includes the distance value corresponding to each of the carbon emission samples; A verification module, used to take the distance value in the data set to be verified that does not fall within the preset interval as an abnormal value; obtain a verification result based on the abnormal value and the carbon emission data set; the verification result indicates whether the current carbon emission sample is abnormal; the carbon emission data set includes one abnormal sample, or at least two abnormal samples; In the case where the carbon emission data set includes an abnormal sample, the verification module is further used to determine the carbon emission sample corresponding to the abnormal value from the carbon emission data set; determine whether the carbon emission sample corresponding to the abnormal value is the current carbon emission sample, and if the carbon emission sample corresponding to the abnormal value is the current carbon emission sample, determine that the current carbon emission sample has an abnormality; if the carbon emission sample corresponding to the abnormal value is not the current carbon emission sample, determine that the current carbon emission sample does not have an abnormality; In the case where the carbon emission data set includes at least two abnormal samples, the verification module is further used to determine whether the carbon emission sample corresponding to each abnormal value is the current carbon emission sample; if the carbon emission samples corresponding to all abnormal values are not the current carbon emission samples, it is determined that the current carbon emission sample does not have an abnormality; if the carbon emission sample corresponding to any abnormal value among multiple abnormal values is the current carbon emission sample, it is determined that the current carbon emission sample has an abnormality; The method for obtaining the preset interval range includes: extracting quartile parameters from the data set to be verified to obtain a first boundary value and a second boundary value; the first boundary value is the lower boundary of the preset interval range, and the second boundary value is the upper boundary of the preset interval range; and the range between the first boundary value and the second boundary value is used as the preset interval range; The extracting quartile parameters from the data set to be verified to obtain the first boundary value and the second boundary value includes: obtaining a first distance value and a second distance value in the data set to be verified; the first distance value is a distance value at one-quarter position after the distance values in the data set to be verified are arranged in ascending order; the second distance value is a distance value at three-quarter position after the distance values in the data set to be verified are arranged in ascending order; determining a difference value according to the second distance value and the first distance value; determining the first boundary value according to the difference value and the first distance value, and determining the second boundary value according to the difference value and the second distance value; The position of the distance value of the quarter position is expressed as: The position where the distance value of the three-quarter position is located is expressed as: The difference is expressed as: The first boundary value is expressed as: The second boundary value is expressed as: in, represents the distance value of the three-quarter positions in the data set to be verified, represents the distance value of the one-quarter position in the data set to be verified; S1 represents the first boundary value, and S2 represents the second boundary value.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Emission monitoring time series data abnormal value detection method for coal-fired unit
CN106599271A
Comprehensive energy station construction carbon emission prediction method based on machine learning
CN116362376A
Training method and device of carbon emission prediction model based on machine learning
CN116596095A
Regional carbon emission situation awareness early warning method
CN116862109A