[go: up one dir, main page]

CN118694610A - A method for processing carbon emission data - Google Patents

A method for processing carbon emission data Download PDF

Info

Publication number
CN118694610A
CN118694610A CN202411170407.9A CN202411170407A CN118694610A CN 118694610 A CN118694610 A CN 118694610A CN 202411170407 A CN202411170407 A CN 202411170407A CN 118694610 A CN118694610 A CN 118694610A
Authority
CN
China
Prior art keywords
data
carbon
carbon emission
ciphertext
emission
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202411170407.9A
Other languages
Chinese (zh)
Other versions
CN118694610B (en
Inventor
杨珂
郭庆雷
王高洲
柏德胜
张学森
刘荫
孙爽
雷明阳
周磊
潘秀魁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Information and Telecommunication Branch of State Grid Shandong Electric Power Co Ltd
State Grid Digital Technology Holding Co Ltd
State Grid Blockchain Technology Beijing Co Ltd
Original Assignee
Information and Telecommunication Branch of State Grid Shandong Electric Power Co Ltd
State Grid Digital Technology Holding Co Ltd
State Grid Blockchain Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Information and Telecommunication Branch of State Grid Shandong Electric Power Co Ltd, State Grid Digital Technology Holding Co Ltd, State Grid Blockchain Technology Beijing Co Ltd filed Critical Information and Telecommunication Branch of State Grid Shandong Electric Power Co Ltd
Priority to CN202411170407.9A priority Critical patent/CN118694610B/en
Publication of CN118694610A publication Critical patent/CN118694610A/en
Application granted granted Critical
Publication of CN118694610B publication Critical patent/CN118694610B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0442Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/58Random or pseudo-random number generators
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/06Energy or water supply
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/20Network architectures or network communication protocols for network security for managing network security; network security policies in general
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0819Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
    • H04L9/0825Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) using asymmetric-key encryption or public key infrastructure [PKI], e.g. key signature or public key certificates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Economics (AREA)
  • Human Resources & Organizations (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Strategic Management (AREA)
  • Computing Systems (AREA)
  • Computer Hardware Design (AREA)
  • Tourism & Hospitality (AREA)
  • Marketing (AREA)
  • General Business, Economics & Management (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Primary Health Care (AREA)
  • Bioethics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Software Systems (AREA)
  • Development Economics (AREA)
  • Educational Administration (AREA)
  • Mathematical Analysis (AREA)
  • Game Theory and Decision Science (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Computational Mathematics (AREA)
  • Medical Informatics (AREA)
  • Water Supply & Treatment (AREA)
  • Public Health (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本发明涉及碳排放技术领域,公开了一种碳排放数据处理方法,包括:获取第一企业的碳排放量比较请求并向第一服务器发送;第一服务器下载密文碳排放监测数据,结合随机数计算随机加密值和密文碳数据,用第一私钥部分解密,得到第一解密碳数据并发给第二服务器,使用第二私钥进行部分解密和联合解密,得到第二解密碳数据和第三解密碳数据,得出过渡比较数据发给第一服务器,计算出校正后比较数据,用第一私钥部分解密,得到第一解密比较数据发给第一企业,基于第二私钥部分解密和联合解密,得到第二解密比较数据和解密比较结果。本发明实施例,控排企业间的碳排放数据在比较过程中是加密的,能够避免碳排放数据泄露,有效地保护控排企业的隐私。

The present invention relates to the field of carbon emission technology, and discloses a carbon emission data processing method, including: obtaining a carbon emission comparison request of a first enterprise and sending it to a first server; the first server downloads ciphertext carbon emission monitoring data, calculates a random encryption value and ciphertext carbon data in combination with a random number, partially decrypts with a first private key, obtains first decrypted carbon data and sends it to a second server, partially decrypts and jointly decrypts with a second private key, obtains second decrypted carbon data and third decrypted carbon data, obtains transition comparison data and sends it to the first server, calculates corrected comparison data, partially decrypts with the first private key, obtains first decrypted comparison data and sends it to the first enterprise, partially decrypts and jointly decrypts based on the second private key, obtains second decrypted comparison data and decryption comparison results. In an embodiment of the present invention, the carbon emission data between emission-controlled enterprises are encrypted during the comparison process, which can avoid leakage of carbon emission data and effectively protect the privacy of emission-controlled enterprises.

Description

Carbon emission data processing method
Technical Field
The invention relates to the technical field of carbon emission, in particular to a carbon emission data processing method.
Background
In order to promote emission control enterprises to comply with national energy conservation and emission reduction policies, the emission control enthusiasm can be improved by promoting the comparison of carbon emission among the emission control enterprises. However, if the carbon emission data of the emission control enterprise is directly published, the business confidentiality of the emission control enterprise, such as the production scale, the technical route and other sensitive information, may be revealed.
Therefore, the situation of carbon emission data leakage of the emission control enterprises is avoided.
Disclosure of Invention
The invention provides a carbon emission data processing method, which aims to avoid the leakage of carbon emission data of a control and emission enterprise.
In order to achieve the above object, the present invention provides a carbon emission data processing method comprising:
The carbon emission monitoring system acquires a carbon emission amount comparison request of a first enterprise aiming at a second enterprise, and sends the carbon emission amount comparison request to a first server;
The first server receives the carbon emission comparison request and downloads first ciphertext carbon emission monitoring data of the first enterprise and second ciphertext carbon emission monitoring data of the second enterprise from a blockchain;
The first server calculates a random encryption value based on a first random number, a second random number and a third random number, calculates 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, decrypts the ciphertext carbon data partially based on a first private key to obtain first decrypted carbon data, and sends the ciphertext carbon data and the first decrypted carbon data to a second server;
After the second server receives the ciphertext carbon data and the first decrypted carbon data, partial decryption is performed on the ciphertext carbon data based on a second private key to obtain second decrypted carbon data, joint decryption is performed on the first decrypted carbon data and the second decrypted carbon data to obtain third decrypted carbon data, calculation is performed on the third decrypted carbon data based on a common public key of the first server and the second server to obtain transitional comparison data, and the transitional comparison data is sent 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, decrypts the corrected comparison data partially based on the first private key to obtain first decryption comparison data, and sends the first decryption comparison data to the carbon emission monitoring system;
the carbon emission monitoring system receives the corrected comparison data and the first decryption comparison data sent by the first server, performs partial decryption on the comparison data based on the second private key to obtain second decryption comparison data, performs joint decryption according to the first decryption comparison data and the second decryption comparison data to obtain a decryption comparison result, and sends the decryption comparison result to the first enterprise;
And the private key formed by the first private key and the second private key and the common public key form a key pair.
Further, the first server calculates a random encryption value based on the first random number, the second random number, and the third random number, and includes:
the first server selects a first calculation method of the random encryption value according to the value of the third random number;
and substituting the first random number and the second random number into the first calculation method by the first server to calculate so as to obtain the random encryption value.
Still further, the third random number includes 0 or 1;
When the third random number is 0, the first calculation method of the random encryption value specifically includes: Wherein, the method comprises the steps of, wherein, In order to randomly encrypt the value of the code,As a result of the first random number,As a result of the second random number,AndIs two arbitraryA strong prime number of bits; Representation generator for generating common public key Representation ofWherein the random number of (c) is, among other things,Is in combination withAll positive integer sets of mutual prime;
when the third random number is 1, the first calculation method of the random encryption value specifically includes: Wherein, the method comprises the steps of, wherein, In order to randomly encrypt the value of the code,As a result of the second random number,AndIs two arbitraryA strong prime number of bits; Representation generator for generating common public key Representation ofWhereinIs in combination withAll positive integer sets of mutual prime.
Further, the calculating 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 includes:
When the third random number is 0, the calculation method of the ciphertext carbon data is as follows Wherein, the method comprises the steps of, wherein,As the ciphertext carbon data, the method comprises the steps of,First ciphertext carbon emission monitoring data representative of a first enterprise,Second ciphertext carbon emission monitoring data representative of a second enterprise,AndIs two arbitraryThe strong prime number of bits is chosen,A random encryption value when the value of the third random number is 0;
When the third random number is 1, the calculation method of the ciphertext carbon data is as follows Wherein, among them,As the ciphertext carbon data, the method comprises the steps of,First ciphertext carbon emission monitoring data representative of a first enterprise,Second ciphertext carbon emission monitoring data representative of a second enterprise,AndIs two arbitraryThe strong prime number of bits is chosen,The random encryption value when the value of the third random number is 1 is taken.
Further, the calculating the third decrypted carbon data may obtain transitional comparison data, specifically:
the second server selects a second calculation method of the transition comparison data according to the third decrypted carbon data;
And the second server calculates according to the second calculation method to obtain the transition comparison data.
Further, after the first server receives the transient comparison data, calculating and correcting the transient comparison data according to the third random number to obtain corrected comparison data, including:
the first server selects a calculation method of the comparison data after correction according to the value of the third random number;
And substituting the transition comparison data into the calculation method of the comparison data after the correction by the first server to calculate so as to obtain the comparison data after the correction.
Still further, the decryption comparison result includes:
If the decryption comparison result is 0, the carbon emission of the first enterprise is larger than or equal to the carbon emission of the second enterprise;
and if the decryption comparison result is 1, the carbon emission of the first enterprise is smaller than that of the second enterprise.
Still further, the carbon emission data processing method further includes:
Receiving carbon emission data of an emission control enterprise uploaded by a plurality of data holders, encrypting the carbon emission data to generate ciphertext carbon emission data, and generating a carbon emission data signature value by using an SM2 signature algorithm for the carbon emission data; the data holders comprise an electric company, a thermodynamic company, a coal company, an oil company, a gas company and a control and discharge enterprise, and the first enterprise and the second enterprise are both the control and discharge enterprise;
Downloading and signature verification are carried out on the carbon emission data signature value of any control and emission enterprise, after signature verification is passed, all the ciphertext carbon emission data of any control and emission enterprise are downloaded and decrypted, all the carbon emission data of any control and emission enterprise are calculated and encrypted, ciphertext carbon emission monitoring data are obtained, and the ciphertext carbon emission monitoring data are uploaded to a block chain, wherein the ciphertext carbon emission monitoring data comprise first ciphertext carbon emission monitoring data of a first enterprise and second ciphertext carbon emission monitoring data of a second enterprise.
Still further, the carbon emission data processing method further includes:
receiving ciphertext carbon emission obtained by a plurality of data holders through calculation and encryption based on homomorphic encryption algorithm according to the carbon emission data, and generating a ciphertext carbon emission signature value by the ciphertext carbon emission through SM2 signature algorithm;
providing all the ciphertext carbon emission amounts for any one of the control and emission enterprises based on multiparty safety calculation contracts, and calculating to obtain ciphertext carbon emission total amounts which are automatically calculated by any one of the control and emission enterprises;
And comparing the total carbon emission amount of the ciphertext with the carbon emission monitoring data of the ciphertext, verifying the correctness of the calculation result of the control and emission enterprise, and storing the verification result in a uplink manner.
Still further, the carbon emission data processing method further includes:
receiving ciphertext carbon emission obtained by a plurality of data holders through calculation and encryption based on homomorphic encryption algorithm according to the carbon emission data, and generating a ciphertext carbon emission signature value by the ciphertext carbon emission through SM2 signature algorithm;
providing all the ciphertext carbon emission amounts for any one of the control and emission enterprises based on multiparty safety calculation contracts, and calculating to obtain ciphertext carbon emission total amounts which are automatically calculated by any one of the control and emission enterprises;
Analyzing according to the historical carbon emission data uploaded by the data holders, establishing a carbon emission prediction model of an emission control enterprise, and predicting the carbon emission prediction data of the year according to the carbon emission prediction model;
Comparing the carbon emission prediction data with the ciphertext carbon emission total amount, and when the deviation of the ciphertext carbon emission total amount and the carbon emission prediction data is in an error range, passing the comparison; when the deviation of the total carbon emission amount of the ciphertext and the carbon emission prediction data is out of an error range, marking the total carbon emission amount of the ciphertext as abnormal data;
downloading and decrypting all the ciphertext carbon emission data of the emission control enterprises marked as abnormal data, calculating and encrypting all the carbon emission data of any emission control enterprise, and obtaining ciphertext carbon emission monitoring data;
and comparing the total carbon emission amount of the ciphertext with the carbon emission monitoring data of the ciphertext, verifying the correctness of the calculation result of the control and emission enterprise, and storing the verification result in a uplink manner.
Compared with the prior art, the carbon emission data processing method provided by the embodiment of the invention has the beneficial effects that: the carbon emission monitoring system sends a carbon emission comparison request to a first server, the first server downloads encrypted data from a blockchain, uses a first private key to perform partial decryption, sends the encrypted data to a second server to perform partial decryption, and sends a decryption comparison result to the carbon emission monitoring system after the decryption is finished. By setting two servers to perform decryption together, collusion on one server can be prevented, and unsafe phenomenon can be caused. According to the invention, through the interaction of the carbon emission monitoring system, the first server and the second server, under the condition that data is not leaked, the carbon emission comparison between enterprises is completed, and the carbon emission data leakage of the emission control enterprises is avoided, so that the privacy of the emission control enterprises can be effectively protected, the purposes of encouraging each emission control enterprise to reduce the carbon emission and promoting the realization of low-carbon production are realized.
Drawings
FIG. 1 is a schematic flow chart of a method for processing carbon emission data according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a carbon emission monitoring system according to an embodiment of the present invention.
Detailed Description
The following describes in further detail the embodiments of the present invention with reference to the drawings and examples. The following examples are illustrative of the invention and are not intended to limit the scope of the invention.
Referring to fig. 1 and 2, the invention provides a carbon emission data processing method, which completes the comparison of carbon emission from enterprise to enterprise under the condition of ensuring that data is not leaked by the interaction of a carbon emission monitoring system, a first server and a second server, and avoids the leakage of carbon emission data of an emission control enterprise, thereby effectively protecting the privacy of the emission control enterprise, realizing the aim of encouraging each emission control enterprise to reduce the carbon emission and promoting the realization of low-carbon production.
The carbon emission data processing method comprises the following steps:
s1, a carbon emission monitoring system obtains a carbon emission comparison request of 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 the emission control enterprises;
S2, the first server receives the carbon emission amount comparison request, and downloads first ciphertext carbon emission monitoring data of the first enterprise and second ciphertext carbon emission monitoring data of the second enterprise from a blockchain;
S3, the first server calculates a random encryption value based on a first random number, a second random number and a third random number, calculates 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, decrypts the ciphertext carbon data partially based on a first private key to obtain first decrypted carbon data, and sends the ciphertext carbon data and the first decrypted carbon data to a second server;
s4, after receiving the ciphertext carbon data and the first decrypted carbon data, the second server performs partial decryption on the ciphertext carbon data based on a 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, performs calculation on the third decrypted carbon data based on a common public key of the first server and the second server to obtain transitional comparison data, and sends the transitional comparison data to the first server;
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, decrypts the corrected comparison data partially based on the first private key to obtain first decryption comparison data, and sends the first decryption comparison data to the carbon emission monitoring system;
S6, the carbon emission monitoring system receives the corrected comparison data and the first decryption comparison data sent by the first server, performs partial decryption on the comparison data based on the second private key to obtain second decryption comparison data, performs joint decryption according to the first decryption comparison data and the second decryption comparison data to obtain a decryption comparison result, and sends the decryption comparison result to the first enterprise;
And the private key formed by the first private key and the second private key and the common public key form a key pair.
Specifically, the steps are performed on a blockchain-based carbon emission monitoring system, and relate to an initialization process, which is as follows:
(1) The regulatory body initializes the carbon emission monitoring system. Generation PAILLIERTD of a common public key for a threshold cryptosystem by a Paillier homomorphic cryptomodule And a first private keyAnd the first private keySplit into two parts, i.eAnd. The public key is then sharedDisclosing, first private keyStored by government regulatory authorities. Each entity can obtain common public key of PAILLIERTD threshold cryptosystem
Specifically, two are first selectedStrong prime number of bitsAndSubsequent calculation ofIs thatAndIs a numerical value, is a constant-type parameter in the algorithm, and is used later, so it is named separatelyIs thatAnd (3) withIs an intermediate calculation, noted as this symbol, and will be used hereinafter. Selecting a generatorFor generating a common public keyCommon public keyPrivate key. Then the first private keySplit into two parts, denoted asAndAnd meet the followingAnd. Then, the Chinese remainder theorem is used for calculation. Can makeIs a 128-bit random number and can be further calculatedWhereinAnd is an integer. For efficient computation, the following will beSet to 0, is a non-negative integer. For generatingValues.
(2) The regulatory body sets two non-colluded servers, namely a first server and a second server. Then the partial private key is usedAndAnd respectively transmitting the first server and the second server through the secret channels which are constructed in advance. By arranging two servers, collusion on one server can be prevented, and unsafe phenomena can be caused.
(3) The control and drainage enterprises and the electric power companies/heating power companies/coal companies/petroleum companies/gas companies respectively initialize, respectively generate a common public key and a first private key of the SM2 common public key signature algorithm, the first private keys are respectively stored, and the common public key is disclosed to all entities. The control and drainage enterprise obtains PAILLIERTD part of private keys of the threshold password system from the supervision organization through the carbon emission monitoring system
Specifically, the carbon emission amount comparison request in S1 is sent by the first enterprise under the condition that the carbon emission privacy comparison is required, the first enterprise and the second enterprise both belong to emission control enterprises, the first enterprise and the second enterprise are not fixed enterprises, and can be any enterprise, and the first enterprise sends the carbon emission amount comparison request to the first server through the carbon emission monitoring system.
Specifically, after receiving the carbon emission comparison request, the first server in S2 downloads ciphertext carbon emission monitoring data of two emission control enterprises designed from the blockchain.
In the embodiment of the invention, the homomorphic encryption technology is adopted to ensure the privacy of the carbon emission data. In addition, the ciphertext comparison and ciphertext operation are cooperatively executed by the first server and the second server, and the secret key is split and sent to the first server and the second server respectively, so that the privacy that both servers cannot acquire carbon emission data is ensured. The nonlinear operation under the ciphertext state can be realized under the condition of protecting the data privacy, and the method has the advantages of supporting the safe calculation to protect the data privacy of the control enterprise and the like.
The embodiment of the invention provides comparison of carbon emission among emission control enterprises, which aims to encourage each emission control enterprise to reduce carbon emission, promote low-carbon production, allow the carbon emission monitoring system to allow the comparison of the carbon emission among different emission control enterprises, and can not leak the carbon emission of the emission control enterprises, and only inform the relationship of the carbon emission among two emission control enterprises.
In an optional embodiment of the present invention, the first server calculates a random encryption value based on the first random number, the second random number, and the third random number, and the method includes:
the first server selects a first calculation method according to the value of the third random number;
and substituting the first random number and the second random number into the first calculation method by the first server to calculate so as to obtain the random encryption value.
In an alternative embodiment of the invention, the third random number comprises 0 or 1.
When the third random number is 0, the first calculation method of the random encryption value specifically includes: Wherein, the method comprises the steps of, wherein, In order to randomly encrypt the value of the code,As a result of the first random number,As a result of the second random number,AndIs two arbitraryA strong prime number of bits; Representation generator for generating common public key Representation ofWherein the random number of (c) is, among other things,Is in combination withAll positive integer sets of mutual prime;
when the third random number is 1, the first calculation method of the random encryption value specifically includes: Wherein, the method comprises the steps of, wherein, In order to randomly encrypt the value of the code,As a result of the second random number,AndIs two arbitraryA strong prime number of bits; Representation generator for generating common public key Representation ofWherein the random number of (c) is, among other things,Is in combination withAll positive integer sets of mutual prime.
Optionally, the first server selects a first random numberAnd a second random numberSatisfy the first random numberSecond random numberAndWhereinIs a safety parameter, which is a function of the safety,AndIs two arbitraryThe strong prime number of bits.
In an optional embodiment of the present invention, the calculating the random encryption value, the first ciphertext carbon emission monitoring data, and the second ciphertext carbon emission monitoring data to obtain ciphertext carbon data includes:
When the third random number is 0, the calculation method of the ciphertext carbon data is as follows Wherein, the method comprises the steps of, wherein,As the ciphertext carbon data, the method comprises the steps of,First ciphertext carbon emission monitoring data representative of a first enterprise,Second ciphertext carbon emission monitoring data representative of a second enterprise,AndIs two arbitraryThe strong prime number of bits is chosen,A random encryption value when the value of the third random number is 0;
When the third random number is 1, the calculation method of the ciphertext carbon data is as follows Wherein, among them,As the ciphertext carbon data, the method comprises the steps of,First ciphertext carbon emission monitoring data representative of a first enterprise,Second ciphertext carbon emission monitoring data representative of a second enterprise,AndIs two arbitraryThe strong prime number of bits is chosen,The random encryption value when the value of the third random number is 1 is taken.
In an optional embodiment of the present invention, the calculating the third decrypted carbon data may obtain transitional comparison data, specifically:
the second server selects a second calculation method of the transition comparison data according to the third decrypted carbon data;
And the second server calculates according to the second calculation method to obtain the transition comparison data.
Optionally, if the third decrypted carbon dataThe transition comparison dataThe second calculation method of (2) is as follows:
If the third decrypted carbon data The second calculation method of the transition comparison data comprises the following steps:
wherein, In order to transition the comparison data,AndIs two arbitraryThe strong prime number of bits is chosen,Representation generator for generating common public key
In an optional embodiment of the present invention, the first server receives the transient comparison data, corrects the transient comparison data according to the third random number, and obtains corrected comparison data, including:
the first server selects a calculation method of the comparison data after correction according to the value of the third random number;
And substituting the transition comparison data into the calculation method of the comparison data to calculate by the first server, so as to obtain the comparison data after the comparison.
Third random numberMay be 0 or 1.
When the third random numberWhen the value is 0, comparing the data after correctionThe calculation method of (1) is thatThat is, the comparison data after the correction is equal to the transition comparison data in value;
When the third random number When the value is 0, comparing the data after correctionThe calculation method of (1) is thatWherein, the method comprises the steps of, wherein,AndIs two arbitraryThe strong prime number of bits.
In an alternative embodiment of the present invention, the decryption comparison result has two cases:
If the decryption comparison result is 0, the carbon emission of the first enterprise is larger than or equal to the carbon emission of the second enterprise;
and if the decryption comparison result is 1, the carbon emission of the first enterprise is smaller than that of the second enterprise.
In an optional embodiment of the invention, carbon emission data of an emission control enterprise uploaded by a plurality of data holders is received, the carbon emission data is encrypted to generate ciphertext carbon emission data, and the carbon emission data is used for generating a carbon emission data signature value by using an SM2 signature algorithm; the data holders comprise an electric company, a thermodynamic company, a coal company, an oil company, a gas company and a control and discharge enterprise, and the first enterprise and the second enterprise are both the control and discharge enterprise;
Downloading and signature verification are carried out on the carbon emission data signature value of any control and emission enterprise, after signature verification is passed, all the ciphertext carbon emission data of any control and emission enterprise are downloaded and decrypted, all the carbon emission data of any control and emission enterprise are calculated and encrypted, ciphertext carbon emission monitoring data are obtained, and the ciphertext carbon emission monitoring data are uploaded to a block chain, wherein the ciphertext carbon emission monitoring data comprise first ciphertext carbon emission monitoring data of a first enterprise and second ciphertext carbon emission monitoring data of a second enterprise.
Specifically, the uploaded ciphertext carbon emission amounts of the plurality of data holders are carbon emission amounts calculated by the plurality of data holders according to the carbon emission data of the data holders, and then are encrypted to ciphertext carbon emission amounts. For example, the electric power company uploads carbon emission data of the purchased electric power, the thermal company uploads carbon emission data of the purchased thermal power, the coal company uploads carbon emission data of the purchased coal, the petroleum company uploads carbon emission data of the purchased petroleum, the gas company uploads carbon emission data of the purchased gas, and the control and exhaust enterprise uploads carbon emission data and carbon emission data of the control and exhaust enterprise in the production process. By acquiring carbon emission data from a plurality of data holders, the authenticity of the data can be ensured. In the prior art, carbon emission data is generally uploaded and calculated unilaterally by a control and discharge enterprise, and the obtained data has the condition of fake making of the control and discharge enterprise, so that the data is unreal.
Specifically, all the carbon emission data of any one control and emission enterprise are calculated and encrypted to obtain ciphertext carbon emission monitoring data, that is, all the carbon emission data of a first enterprise are calculated and encrypted to obtain first ciphertext carbon emission monitoring data, all the carbon emission data of a second enterprise are calculated and encrypted to obtain second ciphertext carbon emission monitoring data, specifically:
Obtaining carbon emission factors of a plurality of carbon emission data according to the carbon emission data uploaded by a plurality of data holders;
calculating according to the carbon emission data and the carbon emission factor to obtain carbon emission;
and calculating and encrypting the carbon emission of the plurality of data holders to obtain ciphertext carbon emission monitoring data.
Specifically, the carbon emission data uploaded by the electric company is specifically the carbon emission data of the purchase electric quantity of the emission control enterpriseThe generated ciphertext carbon emission is specifically the ciphertext carbon emission of the purchased electric quantityThe specific calculation mode is as follows:
wherein, A carbon emission factor representing purchase electricity carbon emission data; Representing a common public key; And Is two arbitraryA strong prime number of bits; Represented as generator, generates a common public key Representation ofIs used for the random number in the random number code,Is in combination withAll positive integer sets of mutual prime;
Firstly, the electric company encrypts and signs the electric quantity carbon emission data purchased by the enterprise and then links the encrypted and signed data, and the specific steps are as follows:
a) The electric company encrypts the carbon emission data Q of the electric quantity purchased by the enterprise by using PAILLIERTD threshold password system to obtain ciphertext . The specific encryption process is as follows:
b) Signing by using SM2 signature algorithm to obtain corresponding signature value Then the ciphertext value and the signature value of the carbon emission data of the electric power purchased by the electric power companyUploading to the blockchain. Specifically, the signing process is:
secondly, calculating the carbon emission of the ciphertext of the purchased electric quantity by using PAILLIERTD threshold password system and SM2 signature algorithm Signature valueAnd (5) back winding.
Wherein: and represents the carbon emission factor of the purchased electricity carbon emission data.
The carbon emission data uploaded by the thermal company is specifically the purchase thermal carbon emission data of the emission control enterpriseThe generated ciphertext carbon emission is specifically the carbon emission of the purchased thermal ciphertextThe specific calculation mode is as follows:
wherein, Representing the carbon emission factor of the purchased thermal carbon emission data.
Firstly, the thermal company encrypts and signs the purchased electricity carbon emission data of the enterprise and then links the encrypted and signed data, and the method is concretely as follows: a) The thermodynamic company encrypts the thermodynamic carbon emission data H purchased by the enterprise by using PAILLIERTD threshold password system to obtain ciphertext. The specific encryption process is as follows:
b) Signing by using SM2 signature algorithm to obtain corresponding signature value Subsequently, the thermal company purchases the ciphertext value and the signature value of the thermal carbon emission dataUploading to the blockchain. Specifically, the signing process is:
Secondly, calculating the carbon emission of the purchased thermal ciphertext by using PAILLIERTD threshold cryptosystem and SM2 signature algorithm Signature valueAnd (5) back winding.
Wherein H represents the purchase of thermal carbon emission data by a control and exhaust enterprise,Represents the carbon emission of the purchased thermal ciphertext,Representing the carbon emission factor of the purchased thermal carbon emission data.
The carbon emission data uploaded by the coal company are specifically the carbon emission data of the purchased coal of the emission control enterpriseThe generated ciphertext carbon emission is specifically the ciphertext carbon emission of purchased coalThe specific calculation mode is as follows:
wherein, Representing the carbon emission factor of the purchased coal carbon emission data.
First, a coal company purchases coal carbon emission data from the enterpriseEncryption and signature are followed by chaining. The method comprises the following steps: a) The coal company encrypts the coal carbon emission data C purchased by the enterprise by using PAILLIERTD threshold password system to obtain ciphertext. The specific encryption process is as follows:
b) Signing by using SM2 signature algorithm to obtain corresponding signature value Then, the coal company purchases ciphertext value and signature value of the coal carbon emission dataUploading to the blockchain. Specifically, the signing process is:
Secondly, calculating the carbon emission of purchased coal ciphertext by using PAILLIERTD threshold password system and SM2 signature algorithm Signature valueAnd (5) back winding.
,
Wherein C represents the data of purchasing coal carbon emission by a control and emission enterprise,Represents the carbon emission amount of ciphertext purchased from coal,Representing the carbon emission factor of the purchased coal carbon emission data.
The carbon emission data uploaded by the petroleum company is specifically purchased petroleum carbon emission data of a control and emission enterpriseThe generated ciphertext carbon emission is specifically the carbon emission of the purchased petroleum ciphertextThe specific calculation mode is as follows:
wherein, Representing the carbon emission factor of the purchased petroleum carbon emission data.
First, the petroleum company encrypts and signs the petroleum carbon emission data purchased by the enterprise and then links the encrypted and signed data. The method comprises the following steps: a) Petroleum company uses PAILLIERTD threshold password system to purchase petroleum carbon emission data from enterprisesEncryption to obtain ciphertext. The specific encryption process is as follows:
b) Signing by using SM2 signature algorithm to obtain corresponding signature value Ciphertext value and signature value of petroleum company purchased petroleum carbon emission dataUploading to the blockchain. Specifically, the signing process is:
secondly, calculating the carbon emission of the purchased petroleum ciphertext by using PAILLIERTD threshold password system and SM2 signature algorithm Signature valueAnd (5) back winding.
Wherein, Indicating that the emission control enterprises purchase petroleum carbon emission data,Represents the carbon emission of the purchased petroleum ciphertext,Representing the carbon emission factor of the purchased petroleum carbon emission data.
The carbon emission data uploaded by the gas company are specifically the carbon emission data of the purchased gas of the emission control enterpriseThe generated ciphertext carbon emission is specifically the carbon emission of the purchased gas ciphertextThe specific calculation mode is as follows:
wherein, Representing the carbon emission factor of the purchased fuel gas carbon emission data.
First, the gas company encrypts and signs the gas carbon emission data purchased by the enterprise and then links the encrypted and signed gas carbon emission data. The method comprises the following steps: a) The gas company encrypts the carbon emission data G of the gas purchased by the enterprise by using PAILLIERTD threshold password system to obtain ciphertext. The specific encryption process is as follows:
b) Signing by using SM2 signature algorithm to obtain corresponding signature value Ciphertext value and signature value of the gas carbon emission data purchased by gas companyUploading to the blockchain. Specifically, the signing process is:
secondly, calculating the carbon emission of the purchased gas ciphertext by using PAILLIERTD threshold password system and SM2 signature algorithm Signature valueAnd (5) back winding.
Wherein G represents the carbon emission data of the fuel gas purchased by the emission control enterprises,Represents the carbon emission of the purchased fuel gas ciphertext,Representing the carbon emission factor of the purchased fuel gas carbon emission data.
The carbon emission data uploaded by the emission control enterprises are specifically carbon emission data in the production process of the emission control enterprisesCarbon emission data for end treatmentThe generated ciphertext carbon emission is specifically the ciphertext carbon emission of the process of the control and discharge enterpriseThe specific calculation mode is as follows:
wherein, A carbon emission factor representing carbon emission data during production; representing the carbon emission factor of the end treatment carbon emission data.
Firstly, the control and emission enterprises control and emit the carbon emission data of the production processCarbon emission data for end treatmentEncryption and signature are followed by chaining. The method comprises the following steps: a) The control and emission enterprise encrypts the carbon emission data P in the production process and the carbon emission data T treated at the tail end by using PAILLIERTD threshold password system to obtain ciphertextAnd. The specific encryption process is as follows:
Wherein the method comprises the steps of Is thatIs used for the random number in the random number code,Is in combination withAll positive integer sets of mutual prime.
B) Signing by using SM2 signature algorithm to obtain corresponding signature valueAndThen the ciphertext value and the signature value of the enterprise process carbon emission dataAndUploading to the blockchain. Specifically, the signing process is:
Secondly, calculating the ciphertext carbon emission in the production process by using PAILLIERTD threshold cryptosystem and SM2 signature algorithm Signature valueAnd (5) back winding.
Wherein: A carbon emission factor representing production process carbon emission data; representing the carbon emission factor of the end treatment carbon emission data.
Based on the data, calculating the total ciphertext carbon emission amount of the control and emission enterpriseThe calculation result is uplink and stored, and the specific calculation process is as follows:
Specifically, the supervisory mechanism acquires a signature value of carbon emission data of any control row enterprise and ciphertext carbon emission data of the control row enterprise, downloads and decrypts the ciphertext carbon emission data after the signature value passes verification, decrypts the ciphertext carbon emission data to obtain carbon emission data, calculates and encrypts all the carbon emission data of any control row enterprise, and obtains ciphertext carbon emission monitoring data.
The supervisory authorities download encrypted form of ciphertext carbon emission data uploaded by the controlling and discharging enterprises, and electric/thermal/coal/petroleum/gas companies, from the blockchainAnd carbon emission data signature valueAfter decryption and signature verification, calculating the carbon emission monitoring result of the emission control enterprise. Wherein, ciphertext carbon emission dataComprising the following steps: Signature value of carbon emission data Comprising the following steps:
the processes of decrypting, verifying the signature and calculating the carbon emission monitoring result R are as follows:
wherein, And (3) a calculation formula for controlling the total carbon emission of the enterprises.
Specifically, adding the decrypted carbon emission data uploaded by any control and emission enterprise, such as an electric company, a thermal company, a coal company, a petroleum company, a gas company and the control and emission enterprise, to obtain a carbon emission monitoring result by a supervision organization
The monitoring result of carbon emission is carried out by the supervision and management institutionEncryption is carried out by using PAILLIERTD threshold password system to obtain ciphertext carbon emission monitoring dataThe specific encryption process is as follows:
in an alternative embodiment of the present invention, the carbon emission data processing method further includes:
receiving ciphertext carbon emission obtained by a plurality of data holders through calculation and encryption based on homomorphic encryption algorithm according to the carbon emission data, and generating a ciphertext carbon emission signature value by the ciphertext carbon emission through SM2 signature algorithm;
providing all the ciphertext carbon emission amounts for any one of the control and emission enterprises based on multiparty safety calculation contracts, and calculating to obtain ciphertext carbon emission total amounts which are automatically calculated by any one of the control and emission enterprises;
And comparing the total carbon emission amount of the ciphertext with the carbon emission monitoring data of the ciphertext, verifying the correctness of the calculation result of the control and emission enterprise, and storing the verification result in a uplink manner.
Specifically, since the ciphertext carbon emission is calculated by a plurality of data holders according to the carbon emission data uploaded by the data holders, the data holders may reduce the data of the carbon emission factor to a certain extent during calculation. By comparing the ciphertext carbon emission total amount calculated by the emission control enterprise with the carbon emission monitoring data calculated by the supervision agency according to the carbon emission data and the carbon emission factors published by the country, whether the data holder has the function of making the data or not can be obtained.
The supervisory mechanism obtains the total ciphertext carbon emission amount of the emission control enterprise from the blockchainAnd with ciphertext carbon emission monitoring dataA comparison is made. If the two are equal, the multi-party safety calculation result is proved to be correct, otherwise, the calculation result is wrong.
When the calculation result is wrong, the supervision organization further verifies which party of calculation result is wrong through the carbon emission data, the carbon emission amount, the signature thereof and the like on the chain, penalizes the wrong party of calculation (the data holder with the wrong calculation result), links the penalized result to verify, and requests the calculation of the related result again.
After the calculation result is verified to be correct, the supervision mechanism monitors the ciphertext carbon emission dataDecryption into carbon emission monitoring dataAnd then the carbon emission monitoring dataAnd sending the data to a corresponding control enterprise.
In the embodiment, the control and discharge enterprises and the supervision authorities can calculate the carbon emission of the control and discharge enterprises, so that the authenticity of data can be ensured, and the supervision function of the supervision authorities can be played by punishing and warning education on the data holder for data counterfeiting, so that the occurrence of the data counterfeiting condition is reduced.
In an alternative embodiment of the present invention, the carbon emission data processing method further includes:
receiving ciphertext carbon emission obtained by a plurality of data holders through calculation and encryption based on homomorphic encryption algorithm according to the carbon emission data, and generating a ciphertext carbon emission signature value by the ciphertext carbon emission through SM2 signature algorithm;
providing all the ciphertext carbon emission amounts for any one of the control and emission enterprises based on multiparty safety calculation contracts, and calculating to obtain ciphertext carbon emission total amounts which are automatically calculated by any one of the control and emission enterprises;
Analyzing according to the historical carbon emission data uploaded by the data holders, establishing a carbon emission prediction model of an emission control enterprise, and predicting the carbon emission prediction data of the year according to the carbon emission prediction model;
Comparing the carbon emission prediction data with the ciphertext carbon emission total amount, and when the deviation of the ciphertext carbon emission total amount and the carbon emission prediction data is in an error range, passing the comparison; when the deviation of the total carbon emission amount of the ciphertext and the carbon emission prediction data is out of an error range, marking the total carbon emission amount of the ciphertext as abnormal data;
downloading and decrypting all the ciphertext carbon emission data of the emission control enterprises marked as abnormal data, calculating and encrypting all the carbon emission data of any emission control enterprise, and obtaining ciphertext carbon emission monitoring data;
and comparing the total carbon emission amount of the ciphertext with the carbon emission monitoring data of the ciphertext, verifying the correctness of the calculation result of the control and emission enterprise, and storing the verification result in a uplink manner.
Specifically, the carbon emission prediction model is analyzed and summarized according to the condition of the historical carbon emission data, so that the prediction model of the carbon emission data in the past year is obtained. The prediction model compares the prediction data with the self-calculated ciphertext carbon emission total amount of the control and emission enterprises, performs a pre-test on the carbon emission amount, marks out data outside an error range, calculates ciphertext carbon emission monitoring data subsequently to marked abnormal data, and compares the self-calculated ciphertext carbon emission total amount of the control and emission enterprises with the ciphertext carbon emission monitoring data.
If the total carbon emission amount of the ciphertext is inconsistent with the carbon emission monitoring data of the ciphertext, punishing a data holder with a wrong calculation result, and uploading punished records to a chain for verification; and if the total carbon emission amount of the ciphertext is consistent with the carbon emission monitoring data of the ciphertext, decrypting the carbon emission monitoring data of the ciphertext and transmitting the decrypted carbon emission monitoring data to the emission control enterprise.
The working process of the invention is as follows: the control and discharge enterprises can provide a comparison request of carbon emission data, know the carbon emission data conditions of the control and discharge enterprises and other enterprises, in the comparison process, the carbon emission data are in an encrypted state, the control and discharge enterprises cannot know the carbon emission data conditions of other control and discharge enterprises, and the privacy of the carbon emission data is guaranteed by decrypting the carbon emission data of the control and discharge enterprises respectively through two servers.
In summary, the embodiment of the invention provides a carbon emission data processing method, which can stimulate the emission control enterprises to take more positive measures to reduce carbon emission by comparing carbon emission data among the emission control enterprises, thereby promoting the green low-carbon transformation of the whole industry and even the country. Ensuring that all businesses can compare under the same criteria in terms of carbon emission control, avoiding that some businesses gain an undue competitive advantage because the information disclosure is opaque. Avoiding the direct disclosure of the carbon emission data of the enterprise may reveal the business confidentiality of the enterprise, such as the production scale, the technical route and other sensitive information, and can display the relative performance of the carbon emission management of the enterprise without revealing specific data.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be executed in parallel, sequentially, or in a different order, and the present invention is not limited herein as long as the desired results of the technical solution disclosed in the present invention can be achieved.
The foregoing is merely a preferred embodiment of the present invention, and it should be noted that modifications and substitutions can be made by those skilled in the art without departing from the technical principles of the present invention, and these modifications and substitutions should also be considered as being within the scope of the present invention.

Claims (10)

1.一种碳排放数据处理方法,其特征在于,包括:1. A method for processing carbon emission data, comprising: 碳排放监测系统获取第一企业针对第二企业的碳排放量比较请求,向第一服务器发送所述碳排放量比较请求;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.根据权利要求1所述的碳排放数据处理方法,其特征在于,所述第一服务器基于第一随机数、第二随机数和第三随机数,计算得到随机加密值,包括:2. The carbon emission data processing method according to claim 1, characterized in that the first server calculates the 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.根据权利要求2所述的碳排放数据处理方法,其特征在于,所述第三随机数包括0或者1;3. The carbon emission data processing method according to claim 2, characterized in that the third random number includes 0 or 1; 当所述第三随机数取值为0时,所述第一计算方法具体为:,其中,为随机加密值,为第一随机数,为第二随机数,为两任意比特的强素数;表示生成元,生成共有公钥表示中的随机数,其中,为与互素的所有正整数集合;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; 当所述第三随机数取值为1时,所述第一计算方法具体为:,其中,为随机加密值,为第二随机数,为两任意比特的强素数;表示生成元,生成共有公钥表示中的随机数,其中,为与互素的所有正整数集合。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.根据权利要求3所述的碳排放数据处理方法,其特征在于,所述根据所述随机加密值、所述第一密文碳排放监测数据和所述第二密文碳排放监测数据进行计算,得到密文碳数据,包括: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 comprises: 当所述第三随机数取值为0时,所述密文碳数据的计算方法为,其中,为密文碳数据,表示第一企业的第一密文碳排放监测数据,表示第二企业的第二密文碳排放监测数据,为两任意比特的强素数,为第三随机数取值为0时的随机加密值;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 is represented. , and For two arbitrary A strong prime number of bits, The random encrypted value when the third random number is 0; 当所述第三随机数取值为1时,所述密文碳数据的计算方法为,其中,为密文碳数据,表示第一企业的第一密文碳排放监测数据,表示第二企业的第二密文碳排放监测数据,为两任意比特的强素数,为第三随机数取值为1时的随机加密值。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 is represented. , and For two arbitrary A strong prime number of bits, The random encrypted value when the third random number is 1. 5.根据权利要求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.根据权利要求1所述的碳排放数据处理方法,其特征在于,所述第一服务器接收所述过渡比较数据,根据所述第三随机数对所述过渡比较数据进行计算较正,得到较正后比较数据,包括:6. The carbon emission data processing method according to claim 1, characterized in that the first server receives the transition comparison data, calculates and corrects the transition comparison data according to the third random number to obtain the corrected comparison data, comprising: 所述第一服务器根据所述第三随机数的值,选择所述较正后比较数据的计算方法;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.根据权利要求1所述的碳排放数据处理方法,其特征在于,所述解密比较结果包括:7. The carbon emission data processing method according to claim 1, wherein the decryption comparison result comprises: 若所述解密比较结果为0时,为所述第一企业的碳排放量大于或者等于所述第二企业的碳排放量;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; 若所述解密比较结果为1时,为所述第一企业的碳排放量小于所述第二企业的碳排放量。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.根据权利要求1所述的碳排放数据处理方法,其特征在于,还包括:8. The carbon emission data processing method according to claim 1, further comprising: 接收多个数据持有方上传的控排企业的碳排放数据,将所述碳排放数据进行加密,生成密文碳排放数据,将所述碳排放数据使用SM2签名算法生成碳排放数据签名值;所述多个数据持有方包括电力公司、热力公司、煤炭公司、石油公司、燃气公司和控排企业,所述第一企业和所述第二企业均为一所述控排企业;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 emission-controlled enterprises is downloaded and signature verified. After the signature verification is passed, all the ciphertext carbon emission data of any of the emission-controlled enterprises are downloaded and decrypted. All the carbon emission data of any of the emission-controlled 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.根据权利要求8所述的碳排放数据处理方法,其特征在于,还包括:9. The carbon emission data processing method according to claim 8, further comprising: 接收多个数据持有方根据所述碳排放数据基于同态加密算法进行计算和加密得到的密文碳排放量,将所述密文碳排放量经过SM2签名算法生成密文碳排放量签名值;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; 基于多方安全计算合约,为任一所述控排企业提供其所有所述密文碳排放量并进行计算,得到任一所述控排企业自行计算的密文碳排放总量;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.根据权利要求8所述的碳排放数据处理方法,其特征在于,还包括:10. The carbon emission data processing method according to claim 8, further comprising: 接收多个数据持有方根据所述碳排放数据基于同态加密算法进行计算和加密得到的密文碳排放量,将所述密文碳排放量经过SM2签名算法生成密文碳排放量签名值;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; 基于多方安全计算合约,为任一所述控排企业提供其所有所述密文碳排放量并进行计算,得到任一所述控排企业自行计算的密文碳排放总量;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 amount. When the deviation between the encrypted total carbon emission amount and the carbon emission prediction data is within the error range, the comparison is passed; when the deviation between the encrypted total carbon emission amount and the carbon emission prediction data is outside the error range, mark the encrypted total carbon emission amount 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; 比对所述密文碳排放总量和所述密文碳排放监测数据,验证所述控排企业计算结果的正确性,并将验证结果上链储存。The encrypted total carbon emissions and the encrypted carbon emissions monitoring data are compared to verify the correctness of the calculation results of the emission-controlled enterprise, and the verification results are stored on the chain.
CN202411170407.9A 2024-08-26 2024-08-26 Carbon emission data processing method Active CN118694610B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411170407.9A CN118694610B (en) 2024-08-26 2024-08-26 Carbon emission data processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411170407.9A CN118694610B (en) 2024-08-26 2024-08-26 Carbon emission data processing method

Publications (2)

Publication Number Publication Date
CN118694610A true CN118694610A (en) 2024-09-24
CN118694610B CN118694610B (en) 2024-10-25

Family

ID=92778438

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411170407.9A Active CN118694610B (en) 2024-08-26 2024-08-26 Carbon emission data processing method

Country Status (1)

Country Link
CN (1) CN118694610B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104410688A (en) * 2014-11-27 2015-03-11 江苏天智互联科技有限公司 Active group classifying method based on background servers
US9397984B1 (en) * 2015-06-25 2016-07-19 Xuesong Hu Apparatus and method for secure file transfer
CN114265815A (en) * 2021-12-21 2022-04-01 中国联合网络通信集团有限公司 Traffic media data storage method, server, storage medium and system
CN115134068A (en) * 2017-12-15 2022-09-30 加密实验室公司 Terminal device for homomorphic encryption and encryption method of terminal device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104410688A (en) * 2014-11-27 2015-03-11 江苏天智互联科技有限公司 Active group classifying method based on background servers
US9397984B1 (en) * 2015-06-25 2016-07-19 Xuesong Hu Apparatus and method for secure file transfer
CN115134068A (en) * 2017-12-15 2022-09-30 加密实验室公司 Terminal device for homomorphic encryption and encryption method of terminal device
CN114265815A (en) * 2021-12-21 2022-04-01 中国联合网络通信集团有限公司 Traffic media data storage method, server, storage medium and system

Also Published As

Publication number Publication date
CN118694610B (en) 2024-10-25

Similar Documents

Publication Publication Date Title
CN108881314B (en) Privacy protection method and system based on CP-ABE ciphertext under fog computing environment
CN110011795B (en) Blockchain-based symmetric group key agreement method
US20140089670A1 (en) Unique code in message for signature generation in asymmetric cryptographic device
CN111563261A (en) Privacy protection multi-party computing method and system based on trusted execution environment
CN113779645B (en) Quantum digital signature and quantum digital signature encryption method
US20240160792A1 (en) Cryptographic method for verifying data
CN112260829B (en) Multi-authorization-based CP-ABE method for supporting mobile equipment under hybrid cloud
CN109951276B (en) Embedded equipment remote identity authentication method based on TPM
CN110599163B (en) Transaction record outsourcing method facing block chain transaction supervision
CN108632296B (en) A dynamic encryption and decryption method for network communication
CN115250176B (en) Carbon emission data processing method and device
CN113438080B (en) A blockchain-based second-hand car information sharing method
CN114553883A (en) Cloud edge terminal cooperative data acquisition and privacy protection method and system based on block chain
CN108985102A (en) Data integrity verification method, device, system and storage medium
CN118586034A (en) Industrial data privacy protection method and system combining blockchain and identity resolution
CN111565108B (en) Signature processing method, device and system
CN110855667A (en) Block chain encryption method, device and system
CN114844622A (en) Private transaction generation and verification method and system based on block chain
CN114861203A (en) Secret intersection solving method based on accidental pseudorandom function
CN115277019B (en) An agile digital signature verification method and system
CN118694610B (en) Carbon emission data processing method
CN118473632B (en) A blockchain-based trusted data element circulation system and method
CN119675879A (en) Multi-dimensional privacy-preserving data aggregation method for industrial Internet of Things based on homomorphic proxy re-encryption
CN111340488A (en) Method and device for generating monitorable secret transaction amount
CN117640150A (en) Terminal authentication method, carbon emission supervision integrated platform and terminal authentication device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant