A method for processing carbon emission data
Through blockchain and random encryption technology, the collaborative decryption process of two servers is used to solve the problem of carbon emission data leakage of emission-controlled enterprises, realize carbon emission comparison between enterprises, protect corporate privacy and promote low-carbon production .
Patent Information
- Application Number
- CN202411170407.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-26
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2044-08-26
AI Technical Summary
When the carbon emission data of emission-controlled enterprises is directly announced, their business secrets may be leaked, resulting in the exposure of sensitive information such as production scale and technical routes. A method is needed to avoid such data leakage and at the same time enable comparison of carbon emissions between enterprises to promote Control enthusiasm.
Using blockchain technology and a combination of random encryption values, private keys and public keys, through the collaborative decryption process of two servers, it ensures that carbon emission data is not leaked during the decryption process, and only provides the size relationship of carbon emissions without exposing it. specific data.
It effectively protects the privacy of emission control companies, prevents data leakage, and enables carbon emissions comparisons between companies, encouraging emission control companies to reduce carbon emissions and promote low-carbon production.
Smart Images

Figure CN118694610B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of carbon emission technology, and in particular to a carbon emission data processing method. Background Art
[0002] In order to promote emission-controlled enterprises to comply with national energy conservation and emission reduction policies, the enthusiasm for emission control can be enhanced by promoting the comparison of carbon emissions among emission-controlled enterprises. However, if the carbon emission data of emission-controlled enterprises are directly published, the commercial secrets of emission-controlled enterprises may be leaked, such as sensitive information such as production scale and technical route.
[0003] Therefore, it is necessary to avoid the leakage of carbon emission data of emission-controlled enterprises. Summary of the invention
[0004] The present invention provides a carbon emission data processing method to achieve the purpose of avoiding leakage of carbon emission data of emission-controlled enterprises.
[0005] In order to achieve the above object, the present invention provides a carbon emission data processing method, comprising:
[0006] The carbon emission monitoring system obtains a carbon emission comparison request from the first enterprise for the second enterprise, and sends the carbon emission comparison request to the first server;
[0007] The first server receives the carbon emission comparison request, and downloads the first encrypted carbon emission monitoring data of the first enterprise and the second encrypted carbon emission monitoring data of the second enterprise from the blockchain;
[0008] The first server calculates a random encryption value based on the first random number, the second random number and the third random number, performs calculation according to the random encryption value, the first ciphertext carbon emission monitoring data and the second ciphertext carbon emission monitoring data to obtain ciphertext carbon data, partially decrypts the ciphertext carbon data based on the first private key to obtain first decrypted carbon data, and sends the ciphertext carbon data and the first decrypted carbon data to the second server;
[0009] After receiving the ciphertext carbon data and the first decrypted carbon data, the second server partially decrypts the ciphertext carbon data based on the second private key to obtain second decrypted carbon data, performs joint decryption based on the first decrypted carbon data and the second decrypted carbon data to obtain third decrypted carbon data, calculates the third decrypted carbon data based on the common public key of the first server and the second server to obtain transition comparison data, and sends the transition comparison data to the first server;
[0010] The first server receives the transition comparison data, corrects the transition comparison data according to the third random number to obtain corrected comparison data, partially decrypts the corrected comparison data based on the first private key to obtain first decrypted comparison data, and sends the first decrypted comparison data to the carbon emission monitoring system;
[0011] The carbon emission monitoring system receives the corrected comparison data and the first decrypted comparison data sent by the first server, partially decrypts the comparison data based on the second private key to obtain second decrypted comparison data, performs joint decryption based on the first decrypted comparison data and the second decrypted comparison data to obtain a decrypted comparison result, and sends the decrypted comparison result to the first enterprise;
[0012] The private key formed by the first private key and the second private key and the shared public key form a key pair.
[0013] Furthermore, the first server calculates a random encryption value based on the first random number, the second random number and the third random number, including:
[0014] The first server selects a first calculation method for the random encryption value according to the value of the third random number;
[0015] The first server substitutes the first random number and the second random number into the first calculation method for calculation to obtain the random encryption value.
[0016] Furthermore, the third random number includes 0 or 1;
[0017] When the third random number is 0, the first calculation method of the random encryption value is specifically: ,in, is a random encrypted value, is the first random number, is the second random number, , and For two arbitrary Strong prime number of bits; Represents the generator, generating a common public key , ; express A random number in which For The set of all positive integers that are mutually prime;
[0018] When the third random number is 1, the first calculation method of the random encryption value is specifically: ,in, is a random encrypted value, is the second random number, , and For two arbitrary Strong prime number of bits; Represents the generator, generating a common public key , , express A random number in For The set of all positive integers that are relatively prime.
[0019] Furthermore, the step of calculating according to the random encryption value, the first ciphertext carbon emission monitoring data and the second ciphertext carbon emission monitoring data to obtain the ciphertext carbon data includes:
[0020] When the third random number is 0, the calculation method of the ciphertext carbon data is: ,in, is the ciphertext carbon data, Indicates the first encrypted carbon emission monitoring data of the first enterprise, The second encrypted carbon emission monitoring data of the second enterprise, , and For two arbitrary A strong prime number of bits, The random encrypted value when the third random number is 0;
[0021] When the third random number is 1, the calculation method of the ciphertext carbon data is: , among which, among which, is the ciphertext carbon data, Indicates the first encrypted carbon emission monitoring data of the first enterprise, The second encrypted carbon emission monitoring data of the second enterprise, , and For two arbitrary A strong prime number of bits, The random encrypted value when the third random number is 1.
[0022] Furthermore, the third decrypted carbon data is calculated to obtain transition comparison data, specifically:
[0023] The second server selects a second calculation method for the transition comparison data according to the third decrypted carbon data;
[0024] The second server performs calculation according to the second calculation method to obtain the transition comparison data.
[0025] Furthermore, after receiving the transition comparison data, the first server calculates and corrects the transition comparison data according to the third random number to obtain corrected comparison data, including:
[0026] The first server selects a calculation method for the corrected comparison data according to the value of the third random number;
[0027] The first server substitutes the transitional comparison data into the calculation method of the corrected comparison data to perform calculation to obtain the corrected comparison data.
[0028] Furthermore, the decryption comparison result includes:
[0029] If the decryption comparison result is 0, the carbon emissions of the first enterprise are greater than or equal to the carbon emissions of the second enterprise;
[0030] If the decryption comparison result is 1, the carbon emissions of the first enterprise are less than the carbon emissions of the second enterprise.
[0031] Furthermore, the carbon emission data processing method further includes:
[0032] Receive carbon emission data of emission-controlled enterprises uploaded by multiple data holders, encrypt the carbon emission data to generate ciphertext carbon emission data, and use the SM2 signature algorithm to generate a carbon emission data signature value for the carbon emission data; the multiple data holders include power companies, heat companies, coal companies, oil companies, gas companies and emission-controlled enterprises, and the first enterprise and the second enterprise are both emission-controlled enterprises;
[0033] The signature value of the carbon emission data of any of the controlled and emission-emitting enterprises is downloaded and signature verified. After the signature verification is passed, all the ciphertext carbon emission data of any of the controlled and emission-emitting enterprises are downloaded and decrypted. All the carbon emission data of any of the controlled and emission-emitting enterprises are calculated and encrypted to obtain ciphertext carbon emission monitoring data, which is uploaded to the blockchain, wherein the ciphertext carbon emission monitoring data includes the first ciphertext carbon emission monitoring data of the first enterprise and the second ciphertext carbon emission monitoring data of the second enterprise.
[0034] Furthermore, the carbon emission data processing method further includes:
[0035] Receive ciphertext carbon emissions calculated and encrypted by multiple data holders based on the carbon emission data using a homomorphic encryption algorithm, and generate a ciphertext carbon emission signature value by applying an SM2 signature algorithm to the ciphertext carbon emissions;
[0036] Based on a multi-party secure computing contract, provide any of the emission-controlled enterprises with all of their ciphertext carbon emissions and perform calculations to obtain the ciphertext carbon emissions total amount calculated by any of the emission-controlled enterprises;
[0037] Compare the encrypted total carbon emissions with the encrypted carbon emissions monitoring data to verify the correctness of the calculation results of the emission-controlled enterprise, and store the verification results on the chain.
[0038] Furthermore, the carbon emission data processing method further includes:
[0039] Receive ciphertext carbon emissions calculated and encrypted by multiple data holders based on the carbon emission data using a homomorphic encryption algorithm, and generate a ciphertext carbon emission signature value by applying an SM2 signature algorithm to the ciphertext carbon emissions;
[0040] Based on a multi-party secure computing contract, provide any of the emission-controlled enterprises with all of their ciphertext carbon emissions and perform calculations to obtain the ciphertext carbon emissions total amount calculated by any of the emission-controlled enterprises;
[0041] Analyze the historical carbon emission data uploaded by the multiple data holders, establish a carbon emission prediction model for the emission-controlled enterprises, and predict the carbon emission prediction data for this year based on the carbon emission prediction model;
[0042] Compare the carbon emission prediction data with the encrypted total carbon emission data. When the deviation between the encrypted total carbon emission data and the carbon emission prediction data is within the error range, the comparison is passed; when the deviation between the encrypted total carbon emission data and the carbon emission prediction data is outside the error range, mark the encrypted total carbon emission data as abnormal data.
[0043] Download and decrypt all the ciphertext carbon emission data of the emission-controlled enterprises marked as abnormal data, calculate and encrypt all the carbon emission data of any emission-controlled enterprise, and obtain ciphertext carbon emission monitoring data;
[0044] Compare the encrypted total carbon emissions with the encrypted carbon emissions monitoring data, verify the correctness of the calculation results of the emission-controlled enterprise, and store the verification results on the chain.
[0045] Compared with the prior art, the carbon emission data processing method of the embodiment of the present invention has the following beneficial effects: the emission-controlled enterprise makes a carbon emission comparison request on the carbon emission monitoring system, and the carbon emission monitoring system sends it to the first server. The first server downloads the encrypted data from the blockchain and uses the first private key to partially decrypt it, and then sends it to the second server for partial decryption. After the decryption is completed, the decryption comparison result is sent to the emission-controlled enterprise through the carbon emission monitoring system. By setting two servers to jointly decrypt, collusion on one server can be prevented, which will lead to unsafe phenomena. The present invention completes the carbon emission comparison between enterprises while ensuring that data is not leaked through the interactive work of the carbon emission monitoring system, the first server and the second server, avoiding the leakage of carbon emission data of emission-controlled enterprises, thereby effectively protecting the privacy of emission-controlled enterprises, and achieving the purpose of encouraging each emission-controlled enterprise to reduce carbon emissions and promote the realization of low-carbon production. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 is a flow chart of a carbon emission data processing method according to an embodiment of the present invention;
[0047] Figure 2 Schematic diagram of a carbon emission monitoring system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0048] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
[0049] See also Figure 1 , Figure 2 As shown, the present invention provides a carbon emission data processing method. The method, through the interactive work of a carbon emission monitoring system, a first server and a second server, completes the carbon emission comparison between enterprises while ensuring that data is not leaked, thereby avoiding the leakage of carbon emission data of controlled and emission-controlled enterprises, thereby effectively protecting the privacy of controlled and emission-controlled enterprises, and achieving the goal of encouraging each controlled and emission-controlled enterprise to reduce carbon emissions and promote the realization of low-carbon production.
[0050] The carbon emission data processing method includes:
[0051] S1, the carbon emission monitoring system obtains a carbon emission comparison request from a first enterprise for a second enterprise, and sends the carbon emission comparison request to a first server, wherein the first enterprise and the second enterprise are both emission-controlled enterprises;
[0052] S2, the first server receives the carbon emission comparison request, and downloads the first encrypted carbon emission monitoring data of the first enterprise and the second encrypted carbon emission monitoring data of the second enterprise from the blockchain;
[0053] S3, the first server calculates a random encryption value based on the first random number, the second random number and the third random number, performs calculation according to the random encryption value, the first ciphertext carbon emission monitoring data and the second ciphertext carbon emission monitoring data to obtain ciphertext carbon data, partially decrypts the ciphertext carbon data based on the first private key to obtain first decrypted carbon data, and sends the ciphertext carbon data and the first decrypted carbon data to the second server;
[0054] S4, after receiving the ciphertext carbon data and the first decrypted carbon data, the second server partially decrypts the ciphertext carbon data based on the second private key to obtain second decrypted carbon data, performs joint decryption on the first decrypted carbon data and the second decrypted carbon data to obtain third decrypted carbon data, calculates the third decrypted carbon data based on the common public key of the first server and the second server to obtain transition comparison data, and sends the transition comparison data to the first server;
[0055] S5, the first server receives the transition comparison data, corrects the transition comparison data according to the third random number to obtain corrected comparison data, partially decrypts the corrected comparison data based on the first private key to obtain first decrypted comparison data, and sends the first decrypted comparison data to the carbon emission monitoring system;
[0056] S6, the carbon emission monitoring system receives the corrected comparison data and the first decrypted comparison data sent by the first server, partially decrypts the comparison data based on the second private key to obtain second decrypted comparison data, performs joint decryption based on the first decrypted comparison data and the second decrypted comparison data to obtain a decrypted comparison result, and sends the decrypted comparison result to the first enterprise;
[0057] The private key formed by the first private key and the second private key and the shared public key form a key pair.
[0058] Specifically, the above steps are carried out on a blockchain-based carbon emission monitoring system, involving an initialization process, the process of which is as follows:
[0059] (1) The regulatory agency initializes the carbon emission monitoring system. The Paillier homomorphic encryption module generates the common public key of the PaillierTD threshold cryptographic system and the first private key , and the first private key Split into two parts, namely and . Then the public key will be shared Public, first private key It is kept by the government regulatory agency. Every entity can obtain the common public key of the PaillierTD threshold cryptographic system. .
[0060] Specifically, first select two Strong prime number of bits and , then calculate , yes and The product of is a numerical value, which is a constant parameter in the algorithm. This value will be used later, so it is named separately. ; , , yes and The least common multiple of is an intermediate calculation result, which will be used below. , Used to generate a common public key , let the public key , private key . Then the first private key Split into two parts, denoted as and , and meet and Then, the Chinese remainder theorem is used to calculate . is a 128-bit random number, which can be further calculated ,in and is an integer. For efficient calculation, Set to 0, a non-negative integer. Used to generate value.
[0061] (2) The regulatory agency sets up two non-collusive servers, namely the first server and the second server. Then, part of the private key and The information is sent to the first server and the second server respectively through the secret channel established in advance. Setting up two servers can prevent collusion on one server, which would lead to insecurity.
[0062] (3) The emission-controlled enterprises and multiple power companies / heat companies / coal companies / oil companies / gas companies are initialized separately and generate the shared public key and the first private key of the SM2 shared public key signature algorithm respectively. The first private key is kept by each of them, and the shared public key is disclosed to all entities. The emission-controlled enterprises obtain part of the private key of the PaillierTD threshold cryptographic system from the regulatory agency through the carbon emission monitoring system. .
[0063] Specifically, the carbon emissions comparison request in S1 is sent by the first enterprise when a carbon emissions privacy comparison is needed. Both the first enterprise and the second enterprise are emission-controlled enterprises. The first enterprise and the second enterprise are not fixed enterprises, but can be any enterprise. The first enterprise sends the carbon emissions comparison request to the first server through the carbon emissions monitoring system.
[0064] Specifically, after receiving the carbon emission comparison request, the first server in S2 downloads the encrypted carbon emission monitoring data of the two controlled enterprises from the blockchain.
[0065] In the embodiment of the present invention, homomorphic encryption technology is used to ensure the privacy of carbon emission data. In addition, the ciphertext comparison and ciphertext operation of the present invention are performed by the first server and the second server in collaboration, and the key is split and sent to the first server and the second server respectively, ensuring that neither server can obtain the privacy of carbon emission data. Nonlinear operations in the ciphertext state can be realized while protecting data privacy, which has the advantages of supporting secure computing to protect the data privacy of emission control enterprises.
[0066] The embodiment of the present invention provides a comparison of carbon emissions between emission-controlled enterprises in order to encourage each emission-controlled enterprise to reduce carbon emissions and promote low-carbon production. The carbon emission monitoring system allows different emission-controlled enterprises to compare their carbon emissions, and will not disclose the carbon emissions of the emission-controlled enterprises. It will only inform the relationship between the carbon emissions of two emission-controlled enterprises.
[0067] In an optional embodiment of the present invention, the first server calculates the random encryption value based on the first random number, the second random number and the third random number, including:
[0068] The first server selects a first calculation method according to the value of the third random number;
[0069] The first server substitutes the first random number and the second random number into the first calculation method for calculation to obtain the random encryption value.
[0070] In an optional embodiment of the present invention, the third random number includes 0 or 1.
[0071] When the third random number is 0, the first calculation method of the random encryption value is specifically: ,in, is a random encrypted value, is the first random number, is the second random number, , and For two arbitrary Strong prime number of bits; Represents the generator, generating a common public key , ; express A random number in which For The set of all positive integers that are mutually prime;
[0072] When the third random number is 1, the first calculation method of the random encryption value is specifically: ,in, is a random encrypted value, is the second random number, , and For two arbitrary Strong prime number of bits; Represents the generator, generating a common public key , , express A random number in which For The set of all positive integers that are relatively prime.
[0073] Optionally, the first server selects a first random number and the second random number , satisfying the first random number , the second random number and ,in is a safety parameter. , and For two arbitrary A strong prime number of bits.
[0074] In an optional embodiment of the present invention, the random encryption value, the first ciphertext carbon emission monitoring data and the second ciphertext carbon emission monitoring data are calculated to obtain the ciphertext carbon data, including:
[0075] When the third random number is 0, the calculation method of the ciphertext carbon data is: ,in, is the ciphertext carbon data, Indicates the first encrypted carbon emission monitoring data of the first enterprise, The second encrypted carbon emission monitoring data of the second enterprise, , and For two arbitrary A strong prime number of bits, The random encrypted value when the third random number is 0;
[0076] When the third random number is 1, the calculation method of the ciphertext carbon data is: , among which, among which, is the ciphertext carbon data, Indicates the first encrypted carbon emission monitoring data of the first enterprise, The second encrypted carbon emission monitoring data of the second enterprise, , and For two arbitrary A strong prime number of bits, The random encrypted value when the third random number is 1.
[0077] In an optional embodiment of the present invention, the third decrypted carbon data is calculated to obtain transition comparison data, specifically:
[0078] The second server selects a second calculation method for the transition comparison data according to the third decrypted carbon data;
[0079] The second server performs calculation according to the second calculation method to obtain the transition comparison data.
[0080] Optionally, if the third decrypted carbon data , the transition comparison data The second calculation method is: ;
[0081] If the third decrypted carbon data , the second calculation method of the transition comparison data is: ;
[0082] in, For transition comparison data, , and For two arbitrary A strong prime number of bits, Represents the generator, generating a common public key , .
[0083] In an optional embodiment of the present invention, the first server receives the transition comparison data, and corrects the transition comparison data according to the third random number to obtain the corrected comparison data, including:
[0084] The first server selects a calculation method for the corrected comparison data according to the value of the third random number;
[0085] The first server substitutes the transitional comparison data into the calculation method of the corrected comparison data to perform calculation to obtain the corrected comparison data.
[0086] The third random number Can be 0 or 1.
[0087] When the third random number When the value is 0, the data is compared after correction The calculation method is , that is, the comparison data after correction and the transition comparison data are equal;
[0088] When the third random number When the value is 0, the data is compared after correction The calculation method is ,in, , and For two arbitrary A strong prime number of bits.
[0089] In an optional embodiment of the present invention, the decryption comparison result has two situations:
[0090] If the decryption comparison result is 0, the carbon emissions of the first enterprise are greater than or equal to the carbon emissions of the second enterprise;
[0091] If the decryption comparison result is 1, the carbon emissions of the first enterprise are less than the carbon emissions of the second enterprise.
[0092] In an optional embodiment of the present invention, carbon emission data of emission-controlled enterprises uploaded by multiple data holders are received, the carbon emission data are encrypted to generate ciphertext carbon emission data, and the carbon emission data are used to generate a carbon emission data signature value using an SM2 signature algorithm; the multiple data holders include power companies, heat companies, coal companies, oil companies, gas companies and emission-controlled enterprises, and the first enterprise and the second enterprise are both emission-controlled enterprises;
[0093] The signature value of the carbon emission data of any of the controlled and emission-emitting enterprises is downloaded and signature verified. After the signature verification is passed, all the ciphertext carbon emission data of any of the controlled and emission-emitting enterprises are downloaded and decrypted. All the carbon emission data of any of the controlled and emission-emitting enterprises are calculated and encrypted to obtain ciphertext carbon emission monitoring data, which is uploaded to the blockchain, wherein the ciphertext carbon emission monitoring data includes the first ciphertext carbon emission monitoring data of the first enterprise and the second ciphertext carbon emission monitoring data of the second enterprise.
[0094] Specifically, the ciphertext carbon emissions uploaded by multiple data holders are the carbon emissions calculated by multiple data holders based on their own carbon emission data, and then encrypted to become ciphertext carbon emissions. For example, the power company uploads the carbon emission data of purchased electricity, the heat company uploads the carbon emission data of purchased heat, the coal company uploads the carbon emission data of purchased coal, the oil company uploads the carbon emission data of purchased oil, the gas company uploads the carbon emission data of purchased gas, and the emission-controlled enterprises upload their own carbon emission data in the production process and the end-of-pipe treatment carbon emission data. By obtaining carbon emission data from multiple data holders, the authenticity of the data can be guaranteed. In the prior art, carbon emission data is generally uploaded and calculated unilaterally by emission-controlled enterprises, and the data obtained in this way is falsified by emission-controlled enterprises, which makes the data untrue.
[0095] Specifically, all the carbon emission data of any emission-controlled enterprise are calculated and encrypted to obtain ciphertext carbon emission monitoring data, that is, all the carbon emission data of the first enterprise are calculated and encrypted to obtain first ciphertext carbon emission monitoring data, and all the carbon emission data of the second enterprise are calculated and encrypted to obtain second ciphertext carbon emission monitoring data, specifically:
[0096] Determining carbon emission factors of multiple carbon emission data according to the carbon emission data uploaded by multiple data holders;
[0097] Calculate the carbon emission amount based on the carbon emission data and the carbon emission factor;
[0098] The carbon emissions of multiple data holders are calculated and encrypted to obtain ciphertext carbon emission monitoring data.
[0099] Specifically, the carbon emission data uploaded by the power company is the carbon emission data of the purchased electricity of the emission-controlled enterprise. The generated encrypted carbon emissions are specifically the encrypted carbon emissions of the purchased electricity , the specific calculation method is:
[0100]
[0101] in, The carbon emission factor representing the carbon emission data of purchased electricity; Indicates a shared public key; , and For two arbitrary Strong prime number of bits; Represented as a generator, generating a common public key , ; express The random numbers in For The set of all positive integers that are mutually prime;
[0102] First, the power company encrypts and signs the carbon emission data of the electricity purchased by the enterprise and uploads it to the blockchain, as follows:
[0103] a) The power company uses the PaillierTD threshold cryptographic system to encrypt the carbon emission data Q of the electricity purchased by the enterprise, and obtains the ciphertext The specific encryption process is:
[0104] .
[0105] b) Use the SM2 signature algorithm to sign and obtain the corresponding signature value , and then the ciphertext value and signature value of the carbon emission data of the electricity purchased by the power company Upload to the blockchain. Specifically, the signing process is:
[0106] .
[0107] Secondly, the PaillierTD threshold cryptographic system and SM2 signature algorithm are used to calculate the ciphertext carbon emissions of the purchased electricity. And signature value Rear winding.
[0108]
[0109] .
[0110] in: The carbon emission factor representing the carbon emission data of purchased electricity.
[0111] The carbon emission data uploaded by the heat company is specifically the carbon emission data of the purchased heat of the emission-controlled enterprise. The generated encrypted carbon emissions are specifically the purchased heat encrypted carbon emissions , the specific calculation method is:
[0112]
[0113] in, Indicates the carbon emission factor of purchased thermal carbon emission data.
[0114] First, the heat company encrypts the carbon emission data of the enterprise’s purchased electricity, signs it, and uploads it to the blockchain. The details are as follows: a) The heat company uses the PaillierTD threshold cryptographic system to encrypt the enterprise’s purchased heat carbon emission data H and obtains the ciphertext The specific encryption process is:
[0115] .
[0116] b) Use the SM2 signature algorithm to sign and obtain the corresponding signature value , and then the ciphertext value and signature value of the thermal carbon emission data purchased by the thermal company Upload to the blockchain. Specifically, the signing process is:
[0117] .
[0118] Secondly, the PaillierTD threshold cryptography system and SM2 signature algorithm are used to calculate the carbon emissions of purchased thermal ciphertext And signature value Rear winding.
[0119] ,
[0120] ,
[0121] Among them, H represents the thermal carbon emission data purchased by the emission-controlled enterprises. Indicates the carbon emissions of purchased thermal ciphertext, Indicates the carbon emission factor of purchased thermal carbon emission data.
[0122] The carbon emission data uploaded by the coal company is specifically the carbon emission data of the purchased coal of the emission-controlled enterprise. The generated encrypted carbon emissions are specifically the encrypted carbon emissions of purchased coal , the specific calculation method is:
[0123] ,
[0124] in, Indicates the carbon emission factor of purchased coal carbon emission data.
[0125] First, the coal company purchases the coal carbon emission data of the enterprise The data is encrypted and signed before being uploaded to the blockchain. The details are as follows: a) The coal company uses the PaillierTD threshold cryptographic system to encrypt the carbon emission data C purchased by the enterprise, and obtains the ciphertext The specific encryption process is:
[0126] .
[0127] b) Use the SM2 signature algorithm to sign and obtain the corresponding signature value , and then the ciphertext value and signature value of the coal carbon emission data purchased by the coal company Upload to the blockchain. Specifically, the signing process is:
[0128] .
[0129] Secondly, the PaillierTD threshold cryptographic system and SM2 signature algorithm are used to calculate the carbon emissions of purchased coal ciphertext And signature value Rear winding.
[0130] ,
[0131] ,
[0132] Among them, C represents the coal carbon emission data purchased by the emission-controlled enterprises. Indicates the carbon emissions of coal purchased. Represents the carbon emission factor of purchased coal carbon emission data.
[0133] The carbon emission data uploaded by the oil company is specifically the carbon emission data of the purchased oil of the emission-controlled enterprises. The generated encrypted carbon emissions are specifically the encrypted carbon emissions of purchased oil , the specific calculation method is:
[0134]
[0135] in, Indicates the carbon emission factor of purchased petroleum carbon emission data.
[0136] First, the oil company encrypts and signs the oil carbon emission data purchased by the enterprise and then uploads it to the blockchain. The details are as follows: a) The oil company uses the PaillierTD threshold cryptographic system to encrypt the oil carbon emission data purchased by the enterprise. Encryption to get ciphertext The specific encryption process is:
[0137] .
[0138] b) Use the SM2 signature algorithm to sign and obtain the corresponding signature value , and then the ciphertext value and signature value of the oil carbon emission data purchased by the oil company Upload to the blockchain. Specifically, the signing process is:
[0139] .
[0140] Secondly, the PaillierTD threshold cryptographic system and SM2 signature algorithm are used to calculate the carbon emissions of the purchased oil ciphertext And signature value Rear winding.
[0141] ,
[0142] ,
[0143] in, It means that emission-controlled enterprises purchase oil carbon emission data. Indicates the carbon emissions of purchased oil ciphertext, Indicates the carbon emission factor of purchased petroleum carbon emission data.
[0144] The carbon emission data uploaded by the gas company is specifically the carbon emission data of the purchased gas of the emission-controlled enterprise. The generated encrypted carbon emissions are specifically the encrypted carbon emissions of purchased gas , the specific calculation method is:
[0145]
[0146] in, Indicates the carbon emission factor of purchased gas carbon emission data.
[0147] First, the gas company encrypts the carbon emission data of the gas purchased by the enterprise, signs it, and then uploads it to the chain. The details are as follows: a) The gas company uses the PaillierTD threshold cryptographic system to encrypt the carbon emission data G of the gas purchased by the enterprise, and obtains the ciphertext The specific encryption process is:
[0148] .
[0149] b) Use the SM2 signature algorithm to sign and obtain the corresponding signature value , and then the ciphertext value and signature value of the gas carbon emission data purchased by the gas company Upload to the blockchain. Specifically, the signing process is:
[0150] .
[0151] Secondly, the PaillierTD threshold cryptographic system and SM2 signature algorithm are used to calculate the carbon emissions of the purchased gas ciphertext And signature value Rear winding.
[0152] ,
[0153] .
[0154] Among them, G represents the carbon emission data of gas purchased by emission-controlled enterprises. Indicates the carbon emissions of purchased gas ciphertext, Indicates the carbon emission factor of purchased gas carbon emission data.
[0155] The carbon emission data uploaded by the emission-controlled enterprises are specifically the carbon emission data of the production process of the emission-controlled enterprises. and end-of-pipe carbon emission data , the generated encrypted carbon emissions are specifically the ciphertext carbon emissions of the emission-controlled enterprise process , the specific calculation method is:
[0156]
[0157] in, The carbon emission factor representing the carbon emission data during the production process; The carbon emission factor representing the end-of-pipe carbon emission data.
[0158] First, emission-controlled enterprises will collect carbon emission data from their production process. and end-of-pipe carbon emission data The details are as follows: a) The emission-controlled enterprise uses the PaillierTD threshold cryptographic system to encrypt the production process carbon emission data P and the end-of-pipe carbon emission data T to obtain the ciphertext and The specific encryption process is:
[0159] ,
[0160] ,
[0161] in yes The random numbers in For The set of all positive integers that are relatively prime.
[0162] b) Use the SM2 signature algorithm to sign and obtain the corresponding signature value and , and then the ciphertext value and signature value of the enterprise process carbon emission data as well as Upload to the blockchain. Specifically, the signing process is:
[0163] ,
[0164] .
[0165] Secondly, the PaillierTD threshold cryptosystem and SM2 signature algorithm are used to calculate the carbon emissions of the ciphertext in its production process. And signature value Rear winding.
[0166] ,
[0167] ,
[0168] in: The carbon emission factor representing the carbon emission data of the production process; The carbon emission factor representing the end-of-pipe carbon emission data.
[0169] Based on the above data, calculate the total amount of ciphertext carbon emissions of the controlled enterprises , the calculation results are stored on the chain, and the specific calculation process is as follows:
[0170] .
[0171] Specifically, the regulatory agency obtains the signature value of the carbon emission data of any emission-controlled enterprise and the ciphertext carbon emission data of the emission-controlled enterprise stored on the blockchain. After the signature value is verified, the ciphertext carbon emission data is downloaded and decrypted. The ciphertext carbon emission data is decrypted to obtain carbon emission data. All carbon emission data of any emission-controlled enterprise are calculated and encrypted to obtain ciphertext carbon emission monitoring data.
[0172] The regulatory agency downloads the encrypted carbon emission data uploaded by the emission-controlled enterprises and power companies / heat companies / coal companies / oil companies / gas companies from the blockchain and carbon emission data signature value After decryption and signature verification, the carbon emission monitoring results of the controlled enterprises are calculated. Among them, the encrypted carbon emission data include: , , , , , , , Carbon emission data signature value include: , , , , , , .
[0173] The processes of decryption, signature verification, and calculation of carbon emission monitoring results R are as follows:
[0174] ,
[0175] ,
[0176] ,
[0177] in, The calculation formula for the total carbon emissions of emitting enterprises.
[0178] Specifically, the decrypted carbon emission data uploaded by any power company, heat company, coal company, oil company, gas company and controlled enterprise of any controlled enterprise is added together to obtain the carbon emission monitoring results of the regulatory agency. .
[0179] Regulators will use carbon emissions monitoring results Use the PaillierTD threshold cryptographic system to encrypt and obtain the ciphertext carbon emission monitoring data , the specific encryption process is:
[0180] .
[0181] In an optional embodiment of the present invention, the carbon emission data processing method further includes:
[0182] Receive ciphertext carbon emissions calculated and encrypted by multiple data holders based on the carbon emission data using a homomorphic encryption algorithm, and generate a ciphertext carbon emission signature value using an SM2 signature algorithm for the ciphertext carbon emissions;
[0183] Based on a multi-party secure computing contract, provide any of the emission-controlled enterprises with all of their ciphertext carbon emissions and perform calculations to obtain the ciphertext carbon emissions total amount calculated by any of the emission-controlled enterprises;
[0184] Compare the encrypted total carbon emissions with the encrypted carbon emissions monitoring data to verify the correctness of the calculation results of the emission-controlled enterprise, and store the verification results on the chain.
[0185] Specifically, because the ciphertext carbon emissions are calculated by multiple data holders based on their uploaded carbon emissions data, in order to reduce carbon emissions, the data holders may reduce the carbon emission factor data to a certain extent during the calculation. By comparing the ciphertext carbon emissions calculated by the emission-controlled enterprises themselves with the documented carbon emissions monitoring data calculated by the regulatory agencies based on carbon emissions data and the carbon emission factors announced by the state, it can be concluded whether the data holders have falsified the data.
[0186] Regulators obtain the encrypted carbon emissions data of emission-controlled enterprises from the blockchain , and with encrypted carbon emission monitoring data If the two are equal, it means that the multi-party security calculation result is correct, otherwise the calculation result is wrong.
[0187] When the calculation result is incorrect, the regulatory agency will further verify which party has made the incorrect calculation result through on-chain carbon emission data, carbon emissions and its signature, and punish the incorrect calculation party (the data holder with incorrect calculation result), store the penalty result on the chain, and require it to recalculate the relevant results.
[0188] Once the calculation results are verified to be correct, the regulatory agency will send the encrypted carbon emission monitoring data to Decrypted into carbon emission monitoring data , and then the carbon emission monitoring data Sent to the corresponding emission-controlled enterprises.
[0189] In this embodiment, both the emission-controlled enterprises and the regulatory agencies can calculate the carbon emissions of the emission-controlled enterprises, which can ensure the authenticity of the data. In addition, the regulatory agencies can play a supervisory role by punishing, warning and educating data holders who falsify data, thereby reducing the occurrence of data falsification.
[0190] In an optional embodiment of the present invention, the carbon emission data processing method further includes:
[0191] Receive ciphertext carbon emissions calculated and encrypted by multiple data holders based on the carbon emission data using a homomorphic encryption algorithm, and generate a ciphertext carbon emission signature value by applying an SM2 signature algorithm to the ciphertext carbon emissions;
[0192] Based on a multi-party secure computing contract, provide any of the emission-controlled enterprises with all of their ciphertext carbon emissions and perform calculations to obtain the ciphertext carbon emissions total amount calculated by any of the emission-controlled enterprises;
[0193] Analyze the historical carbon emission data uploaded by the multiple data holders, establish a carbon emission prediction model for the emission-controlled enterprises, and predict the carbon emission prediction data for this year based on the carbon emission prediction model;
[0194] Compare the carbon emission prediction data with the encrypted total carbon emission data. When the deviation between the encrypted total carbon emission data and the carbon emission prediction data is within the error range, the comparison is passed; when the deviation between the encrypted total carbon emission data and the carbon emission prediction data is outside the error range, mark the encrypted total carbon emission data as abnormal data.
[0195] Download and decrypt all the ciphertext carbon emission data of the emission-controlled enterprises marked as abnormal data, calculate and encrypt all the carbon emission data of any emission-controlled enterprise, and obtain ciphertext carbon emission monitoring data;
[0196] Compare the encrypted total carbon emissions with the encrypted carbon emissions monitoring data, verify the correctness of the calculation results of the emission-controlled enterprise, and store the verification results on the chain.
[0197] Specifically, the carbon emission prediction model is based on the analysis and summary of historical carbon emission data, so as to obtain the prediction model of carbon emission data over the years. The prediction model compares the predicted data with the total ciphertext carbon emissions calculated by the emission-controlled enterprises themselves, conducts a preliminary test on the carbon emissions, marks the data outside the error range, and subsequently calculates the ciphertext carbon emission monitoring data for the marked abnormal data, and then compares the total ciphertext carbon emissions calculated by the emission-controlled enterprises themselves with the ciphertext carbon emission monitoring data.
[0198] If the ciphertext total carbon emissions are inconsistent with the ciphertext carbon emissions monitoring data, the data holder with the incorrect calculation result will be punished, and the record of the punishment will be uploaded to the chain for evidence; if the ciphertext total carbon emissions are consistent with the ciphertext carbon emissions monitoring data, the ciphertext carbon emissions monitoring data will be decrypted and sent to the emission-controlled enterprise.
[0199] The working process of the present invention is as follows: the emission-controlled enterprises can make comparison requests for carbon emission data to understand the carbon emission data of themselves and other enterprises. In this comparison process, the carbon emission data is encrypted, and the emission-controlled enterprises cannot know the carbon emission data of other emission-controlled enterprises. By using two servers at the same time to decrypt the carbon emission data of the emission-controlled enterprises separately, the privacy of the carbon emission data is guaranteed.
[0200] In summary, the embodiments of the present invention provide a carbon emission data processing method, which can motivate emission-controlled enterprises to take more active measures to reduce carbon emissions by comparing carbon emission data among emission-controlled enterprises, thereby promoting the green and low-carbon transformation of the entire industry and even the country. Ensure that all enterprises can be compared under the same standards in terms of carbon emission control, and avoid certain enterprises from gaining unfair competitive advantages due to opaque information disclosure. Avoid directly disclosing the carbon emission data of enterprises, which may leak the company's business secrets, such as sensitive information such as production scale and technical route, and show the relative performance of the company's carbon emission management without leaking specific data.
[0201] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution disclosed in the present invention can be achieved, and the present invention is not limited here.
[0202] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and substitutions can be made without departing from the technical principles of the present invention. These improvements and substitutions should also be regarded as the scope of protection of the present invention.
Claims
1. A method for processing carbon emission data, characterized in that: include: The carbon emission monitoring system obtains a carbon emission comparison request from the first enterprise for the second enterprise, and sends the carbon emission comparison request to the first server; The first server receives the carbon emission comparison request, and downloads the first encrypted carbon emission monitoring data of the first enterprise and the second encrypted carbon emission monitoring data of the second enterprise from the blockchain; The first server calculates a random encryption value based on the first random number, the second random number and the third random number, performs calculation according to the random encryption value, the first ciphertext carbon emission monitoring data and the second ciphertext carbon emission monitoring data to obtain ciphertext carbon data, partially decrypts the ciphertext carbon data based on the first private key to obtain first decrypted carbon data, and sends the ciphertext carbon data and the first decrypted carbon data to the second server; After receiving the ciphertext carbon data and the first decrypted carbon data, the second server partially decrypts the ciphertext carbon data based on the second private key to obtain second decrypted carbon data, performs joint decryption based on the first decrypted carbon data and the second decrypted carbon data to obtain third decrypted carbon data, calculates the third decrypted carbon data based on the common public key of the first server and the second server to obtain transition comparison data, and sends the transition comparison data to the first server; The first server receives the transition comparison data, corrects the transition comparison data according to the third random number to obtain corrected comparison data, partially decrypts the corrected comparison data based on the first private key to obtain first decrypted comparison data, and sends the first decrypted comparison data to the carbon emission monitoring system; The carbon emission monitoring system receives the corrected comparison data and the first decrypted comparison data sent by the first server, partially decrypts the comparison data based on the second private key to obtain second decrypted comparison data, performs joint decryption based on the first decrypted comparison data and the second decrypted comparison data to obtain a decrypted comparison result, and sends the decrypted comparison result to the first enterprise; The private key formed by the first private key and the second private key and the shared public key form a key pair.
2. The carbon emission data processing method according to claim 1, characterized in that: The first server calculates a random encryption value based on the first random number, the second random number, and the third random number, including: The first server selects a first calculation method according to the value of the third random number; The first server substitutes the first random number and the second random number into the first calculation method for calculation to obtain the random encryption value.
3. The carbon emission data processing method according to claim 2, characterized in that: The third random number includes 0 or 1; When the third random number is 0, the first calculation method is specifically: ,in, is a random encrypted value, is the first random number, is the second random number, , and For two arbitrary Strong prime number of bits; Represents the generator, generating a common public key , ; express A random number in which For The set of all positive integers that are mutually prime; When the third random number takes a value of 1, the first calculation method is specifically: ,in, is a random encrypted value, is the second random number, , and For two arbitrary Strong prime number of bits; Represents the generator, generating a common public key , , express A random number in which For The set of all positive integers that are relatively prime.
4. The carbon emission data processing method according to claim 3, characterized in that: The step of calculating according to the random encryption value, the first ciphertext carbon emission monitoring data and the second ciphertext carbon emission monitoring data to obtain the ciphertext carbon data includes: When the third random number is 0, the calculation method of the ciphertext carbon data is: ,in, is the ciphertext carbon data, Indicates the first encrypted carbon emission monitoring data of the first enterprise, The second encrypted carbon emission monitoring data of the second enterprise, , and For two arbitrary A strong prime number of bits, The random encrypted value when the third random number is 0; When the third random number is 1, the calculation method of the ciphertext carbon data is: ,in, is the ciphertext carbon data, Indicates the first encrypted carbon emission monitoring data of the first enterprise, The second encrypted carbon emission monitoring data of the second enterprise, , and For two arbitrary A strong prime number of bits, The random encrypted value when the third random number is 1.
5. The carbon emission data processing method according to claim 1, characterized in that: The third decrypted carbon data is calculated to obtain transition comparison data, specifically: The second server selects a second calculation method according to the third decrypted carbon data; The second server performs calculation according to the second calculation method to obtain the transition comparison data.
6. The carbon emission data processing method according to claim 1, characterized in that: The first server receives the transition comparison data, and calculates and corrects the transition comparison data according to the third random number to obtain corrected comparison data, including: The first server selects a calculation method for the corrected comparison data according to the value of the third random number; The first server substitutes the transitional comparison data into the calculation method of the corrected comparison data to perform calculation to obtain the corrected comparison data.
7. The carbon emission data processing method according to claim 1, characterized in that: The decryption comparison result includes: If the decryption comparison result is 0, the carbon emissions of the first enterprise are greater than or equal to the carbon emissions of the second enterprise; If the decryption comparison result is 1, the carbon emissions of the first enterprise are less than the carbon emissions of the second enterprise.
8. The carbon emission data processing method according to claim 1, characterized in that: Also includes: Receive carbon emission data of emission-controlled enterprises uploaded by multiple data holders, encrypt the carbon emission data to generate ciphertext carbon emission data, and use the SM2 signature algorithm to generate a carbon emission data signature value for the carbon emission data; the multiple data holders include power companies, heat companies, coal companies, oil companies, gas companies and emission-controlled enterprises, and the first enterprise and the second enterprise are both emission-controlled enterprises; The signature value of the carbon emission data of any of the controlled and emission-emitting enterprises is downloaded and signature verified. After the signature verification is passed, all the ciphertext carbon emission data of any of the controlled and emission-emitting enterprises are downloaded and decrypted. All the carbon emission data of any of the controlled and emission-emitting enterprises are calculated and encrypted to obtain ciphertext carbon emission monitoring data, which is uploaded to the blockchain, wherein the ciphertext carbon emission monitoring data includes the first ciphertext carbon emission monitoring data of the first enterprise and the second ciphertext carbon emission monitoring data of the second enterprise.
9. The carbon emission data processing method according to claim 8, characterized in that: Also includes: Receive ciphertext carbon emissions calculated and encrypted by multiple data holders based on the carbon emission data using a homomorphic encryption algorithm, and generate a ciphertext carbon emission signature value by applying an SM2 signature algorithm to the ciphertext carbon emissions; Based on a multi-party secure computing contract, provide any of the emission-controlled enterprises with all of their ciphertext carbon emissions and perform calculations to obtain the ciphertext carbon emissions total amount calculated by any of the emission-controlled enterprises; Compare the encrypted total carbon emissions with the encrypted carbon emissions monitoring data to verify the correctness of the calculation results of the emission-controlled enterprise, and store the verification results on the chain.
10. The carbon emission data processing method according to claim 8, characterized in that: Also includes: Receive ciphertext carbon emissions calculated and encrypted by multiple data holders based on the carbon emission data using a homomorphic encryption algorithm, and generate a ciphertext carbon emission signature value by applying an SM2 signature algorithm to the ciphertext carbon emissions; Based on a multi-party secure computing contract, provide any of the emission-controlled enterprises with all of their ciphertext carbon emissions and perform calculations to obtain the ciphertext carbon emissions total amount calculated by any of the emission-controlled enterprises; Analyze the historical carbon emission data uploaded by the multiple data holders, establish a carbon emission prediction model for the emission-controlled enterprises, and predict the carbon emission prediction data for this year based on the carbon emission prediction model; Compare the carbon emission prediction data with the encrypted total carbon emission data. When the deviation between the encrypted total carbon emission data and the carbon emission prediction data is within the error range, the comparison is passed; when the deviation between the encrypted total carbon emission data and the carbon emission prediction data is outside the error range, mark the encrypted total carbon emission data as abnormal data. Download and decrypt all the ciphertext carbon emission data of the emission-controlled enterprises marked as abnormal data, calculate and encrypt all the carbon emission data of any emission-controlled enterprise, and obtain ciphertext carbon emission monitoring data; Compare the encrypted total carbon emissions with the encrypted carbon emissions monitoring data, verify the correctness of the calculation results of the emission-controlled enterprise, and store the verification results on the chain.
Citation Information
Patent Citations
Active group classifying method based on background servers
CN104410688A
Traffic media data storage method, server, storage medium and system
CN114265815A
Terminal device for performing homomorphic encryption and encryption method of terminal device
CN115134068A
Apparatus and method for secure file transfer
US9397984B1
