A carbon emission prediction method and system
By using a hierarchical federated blockchain architecture and smart contracts to filter data quality, the problem of poor data quality in carbon emission forecasting has been solved, achieving high-precision carbon emission forecasting and data security.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- XIAMEN TAIHE CARBON ENERGY ENVIRONMENTAL PROTECTION TECHNOLOGY CO LTD
- Filing Date
- 2025-07-16
- Publication Date
- 2026-04-17
AI Technical Summary
Existing carbon emission prediction models suffer from poor data quality, resulting in low prediction accuracy and the problem of false data reporting.
A hierarchical federated blockchain architecture is adopted to verify the compliance and quality of data. Data that meets the threshold is selected through smart contracts, and carbon emission prediction is made using a federated learning model.
It improves the accuracy of carbon emission forecasting and protects confidential data of industrial parks and large corporations from data leaks.
Smart Images

Figure CN120875141B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of carbon emission prediction technology, specifically a carbon emission prediction method and system. Background Technology
[0002] Currently, carbon emission prediction models within industrial parks and large corporations typically require production, operational, and process data from each emission-controlled enterprise. However, much of this data is confidential, leading to numerous errors and inaccuracies during the collection of carbon emission-related data. Furthermore, carbon emission monitoring is still in its early stages, and some enterprises, in an effort to reduce emission reduction costs, report false information. Historical carbon emission data is difficult to trace, resulting in poor quality of the raw data used for prediction. When both training and prediction data are of poor quality, problems such as low prediction accuracy and poor generalization ability are likely to occur.
[0003] Chinese patent application CN114662780A discloses a method, apparatus, electronic device, and storage medium for predicting carbon emissions. The method includes: inputting a dataset to be predicted into a trained neural network carbon emission prediction model to obtain carbon emission prediction information corresponding to the dataset; the trained neural network carbon emission prediction model is obtained by training on samples of the dataset to be predicted carrying carbon emission labels; the target hyperparameter of the neural network carbon emission prediction model is obtained by solving an improved particle swarm optimization algorithm, where the improved particle swarm optimization algorithm is obtained by optimizing the parameters of the particle swarm optimization algorithm. This invention can obtain accurate carbon emission prediction information, improve the accuracy of carbon emission prediction, and achieve accurate carbon emission prediction.
[0004] For example, Chinese patent CN115577858B discloses a method, device, and electronic device for predicting carbon emissions based on blockchain. The method includes: acquiring carbon emission data to be predicted; inputting the carbon emission data to be predicted into a trained carbon emission federated model, and outputting predicted carbon emission data. The carbon emission federated model is built based on the following steps: acquiring historical carbon emission data and deploying a blockchain network architecture; building an initial federated learning model based on the blockchain network architecture; wherein the initial federated learning model is built using a deep learning network algorithm with an attention mechanism as a classifier; and training the initial federated learning model using the carbon emission data to be predicted to obtain a trained carbon emission federated model. This method improves the prediction accuracy of traditional carbon emission prediction methods by deploying a deep learning network algorithm on a blockchain architecture to predict carbon emission data.
[0005] The shortcomings of the aforementioned existing technologies are: the lack of verification and processing of carbon emission-related data leads to low accuracy in carbon emission prediction results. Summary of the Invention
[0006] To address the shortcomings of existing technologies, this invention proposes a carbon emission prediction method and system. Utilizing a hierarchical federated blockchain architecture, the system verifies the compliance of data. Once verified, the data is uploaded to the blockchain. The uploaded data is then scored for quality, and data with a confidence level greater than or equal to a threshold, or those that have passed review, are selected. This selected data is then input into a federated learning model for carbon emission prediction, thus improving both data quality and the accuracy of carbon emission prediction.
[0007] To achieve the above objectives, the present invention provides the following technical solution:
[0008] A method for predicting carbon emissions, comprising:
[0009] Collect multi-source data and preprocess the multi-source data, wherein the multi-source data is carbon emission related data;
[0010] A hierarchical federated blockchain architecture is constructed, which divides the target area into blockchain nodes. Each node deploys a lightweight sub-chain, generates a hash digest with a timestamp and stores it on the chain. Sub-chains communicate with each other through a cross-chain interaction mechanism. The hierarchical federated blockchain architecture includes a root chain layer, a sub-chain layer, a consensus cross-chain layer and a federated learning model layer.
[0011] Based on a data quality scoring model, the confidence level of multi-source data is dynamically evaluated, and smart contracts are used to filter the confidence level.
[0012] Each node in the region uses local data to train a carbon emission prediction model to predict the carbon emissions of the node in the region, and generates a regional carbon quota allocation scheme based on the prediction results.
[0013] Specifically, the construction of a hierarchical federated blockchain architecture divides the target area into blockchain nodes. Each node deploys a lightweight sub-chain, generates a timestamped hash digest, and stores it on the chain. Sub-chains communicate with each other through a cross-chain interaction mechanism, including:
[0014] A hierarchical federated blockchain architecture is constructed based on the root chain layer, sub-chain layer, consensus cross-chain layer, and federated learning model layer.
[0015] The target area is divided into independent blocks, each independent block is a blockchain node, and a lightweight sub-chain is deployed in each blockchain node;
[0016] The regional nodes in the lightweight subchain are combined with adjacent regional nodes to form a micro consensus group. Data within a preset time is packaged into sub-blocks. The regional nodes send the sub-blocks to the micro consensus group through the communication network. Each regional node independently verifies the compliance of the data. After passing the verification, it returns a signature. When the number of collected signatures is greater than or equal to 2f+1, the sub-block is marked as valid within the region, where f represents the maximum number of Byzantine nodes that can be tolerated. The regional node is then marked as a consensus node. Otherwise, it is marked as an invalid sub-block.
[0017] Consensus nodes send the sub-blocks marked as valid within the region to all cross-region consensus nodes through the communication network. The consensus node set calculates the weights according to the PoSDQ algorithm, elects the current master node, and the master node aggregates all valid sub-blocks to generate a Merkle tree and packages it into the master block. The master block is synchronized to all nodes through the network.
[0018] A request is initiated through a cross-chain contract. The source subchain submits the request message and its proof to the root chain via the Relayer, and the root chain forwards it to the target subchain.
[0019] Specifically, the regional nodes are nodes for data acquisition and processing.
[0020] Specifically, the method of dynamically evaluating the confidence level of multi-source data based on a data quality scoring model and using smart contracts to filter the confidence level includes:
[0021] Based on the data quality scoring model, the preprocessed multi-source data uploaded to the blockchain is scored, and the scoring dimensions are defined, including: data source qualification, temporal continuity and spatial relevance.
[0022] The confidence index is calculated by weighted summation based on the scoring dimensions, and a confidence threshold is set.
[0023] If the confidence index is less than 60, the smart contract automatically generates a review tag, locks the review tag data, and does not allow it to participate in carbon emission prediction. At the same time, it pushes the data to the designated reviewer for review through on-chain event notification. If the review is successful, the lock is released; if the review fails, the review tag is changed to obsolete data.
[0024] Specifically, each area node uses local data to train a carbon emission prediction model to predict the carbon emissions of the area node, and generates a regional carbon quota allocation scheme based on the prediction results, including:
[0025] Acquire historical carbon emission data and divide the historical carbon emission data into a training set and a test set according to a preset ratio;
[0026] The training set is input into the federated learning model in the hierarchical federated blockchain architecture. The training parameters of the federated learning model are uploaded to the hierarchical federated blockchain architecture. It is determined whether the training parameters have reached the preset convergence requirement. If the convergence requirement is reached, the training ends. Otherwise, the training continues until the training parameters reach the convergence requirement, and the trained federated learning model is obtained.
[0027] Multi-source data from lightweight subchains are input into a trained federated learning model to predict carbon emissions, thus obtaining the predicted carbon emissions for the target region.
[0028] Specifically, the review process includes the following steps:
[0029] Retrieve raw data;
[0030] Cross-validation using external trusted data sources;
[0031] The verification results are uploaded to the blockchain. If the data is confirmed to be valid, it is unlocked; otherwise, it is marked as discarded data.
[0032] Specifically, the multi-source data includes industrial sensor data, satellite remote sensing imagery, traffic flow data, and energy consumption records.
[0033] A carbon emission prediction system for implementing the aforementioned carbon emission prediction method includes: a data processing module, a blockchain processing module, a data filtering module, and a carbon emission prediction module.
[0034] The data processing module is used to collect multi-source data and preprocess the multi-source data, wherein the multi-source data is carbon emission related data;
[0035] The blockchain processing module is used to construct a hierarchical federated blockchain architecture, which divides the target area into blockchain nodes. Each node deploys a lightweight sub-chain, generates a hash digest with a timestamp and stores it on the chain. The sub-chains communicate with each other through a cross-chain interaction mechanism. The hierarchical federated blockchain architecture includes a root chain layer, a sub-chain layer, a consensus cross-chain layer and a federated learning model layer.
[0036] The data filtering module is used to dynamically evaluate the confidence level of multi-source data based on a data quality scoring model, and to filter the confidence level using smart contracts.
[0037] The carbon emission prediction module is used by each regional node to train a carbon emission prediction model using local data, predict the carbon emissions of the regional node, and generate a regional carbon quota allocation scheme based on the prediction results.
[0038] Specifically, the blockchain processing module includes: an architecture construction unit, a region division unit, and a consensus interaction unit;
[0039] The architecture building unit is used to construct a layered federated blockchain architecture based on the root chain layer, sub-chain layer, consensus cross-chain layer, and federated learning model layer.
[0040] The region division unit is used to divide the target region into independent blocks, each independent block being a blockchain node, and a lightweight sub-chain is deployed in each blockchain node;
[0041] The consensus interaction unit is used to form a micro consensus group. Each regional node independently verifies the compliance of the data and filters valid data. All consensus nodes elect the current master node. The master node aggregates all valid sub-blocks to generate a Merkle tree and interacts with the data through cross-chain contracts.
[0042] Compared with the prior art, the beneficial effects of the present invention are:
[0043] 1. This invention proposes a carbon emission prediction method and system. Before uploading data to the blockchain, the preprocessed multi-source data undergoes compliance verification, and compliant data is selected for uploading. After uploading, a data quality scoring model is used to score the quality of the uploaded data, eliminating data that does not meet the quality requirements. Data that meets the quality requirements is then input into a federated learning model for prediction. This two-stage data screening effectively improves data quality. Carbon emission prediction is performed based on high-quality data, which greatly enhances the accuracy of carbon emission prediction.
[0044] 2. This invention proposes a carbon emission prediction method and system that utilizes blockchain to effectively protect carbon emission-related data of industrial parks, large corporations, etc., and prevent the leakage of confidential data. Attached Figure Description
[0045] Figure 1 A flowchart of a carbon emission prediction method provided by the present invention;
[0046] Figure 2 The blockchain architecture diagram provided for this invention;
[0047] Figure 3 The present invention provides a flowchart for processing carbon emission-related data.
[0048] Figure 4 This invention provides an architecture diagram for a carbon emission prediction system. Detailed Implementation
[0049] The present application will now be described in detail with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the present application, but do not limit the present application in any way. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of the present application. These all fall within the protection scope of the present application.
[0050] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0051] It should be noted that, unless there is a conflict, the various features in the embodiments of this application can be combined with each other, all of which are within the protection scope of this application. Furthermore, although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than the module division in the device or the order in the flowchart. In addition, the terms "first," "second," and "third" used in this application do not limit the data or execution order, but only distinguish identical or similar items with essentially the same function and effect.
[0052] Unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The term "and / or" as used in this specification includes any and all combinations of one or more of the associated listed items.
[0053] Example 1
[0054] Please see Figures 1-3 The present invention provides an embodiment of a carbon emission prediction method, comprising the following specific steps:
[0055] Step S1: Collect multi-source data, including industrial sensor data, satellite remote sensing images, traffic flow data and energy consumption records, and preprocess the multi-source data, which is carbon emission related data;
[0056] In this embodiment, the data source type and access method are as follows: industrial sensor data, collected by IoT sensors deployed at factory emission outlets and energy conversion equipment, measuring CO2 concentration (ppm), temperature (°C), and flow rate (m³ / s). 3The system supports parameters such as CO2 concentration (%) and combustion efficiency (%), and supports Modbus and OPCUA protocols. It accesses via 5G / fiber optic through an industrial gateway (such as Huawei AR502H), with a sampling frequency ≥ 1 time / second. Satellite remote sensing imagery is used to acquire CO2 column concentration images (up to 7km × 3.5km resolution), and cloud removal is performed to extract the CO2 concentration matrix bound to geographic coordinates (WGS84 standard). Traffic flow data is integrated with the Gaode Map / Baidu Map real-time traffic API to obtain road traffic flow (vehicles / hour), average vehicle speed (km / h), and congestion index. Millimeter-wave radar is deployed at key intersections to collect heavy truck traffic data. Energy consumption records are obtained by connecting to the State Grid smart meter database and the gas company's SCADA system, acquiring enterprise-level electricity (kWh) and natural gas (m³) data. 3 Consumption data is recorded and encrypted during transmission.
[0057] Preprocessing includes: data cleaning, removing data exceeding the mean ± 3 standard deviations, such as CO2 concentration > 5000 ppm, and filling in missing values using interpolation of data from adjacent grids at the same time; multi-source spatiotemporal alignment, embedding all data into BeiDou / GPS timing chips, calibrating to UTC time via NTP protocol with an error < 1 millisecond, dividing the area into 1km × 1km grids, and using GeoHash encoding to map multi-source data to a unified grid, for example, mapping the sensor coordinates (31.23°N, 121.47°E) of a factory to the GeoHash code "wtw3sjz"; and standardization processing, unifying data units, etc.
[0058] Step S2: Construct a hierarchical federated blockchain architecture, dividing the target area into blockchain nodes. Each node deploys a lightweight sub-chain, generates a hash digest with a timestamp and stores it on the chain, and the sub-chains communicate with each other through a cross-chain interaction mechanism.
[0059] Hash digest generation method: Data fingerprint is generated using SHA256. Inputs include: raw data value, such as CO2 = 450ppm, spatiotemporal tag, such as GeoHash encoding + wtw3sjz, device ID, such as sensor MAC address and calibration certificate hash, which are pre-stored in the TPM chip.
[0060] The specific steps of step S2 are as follows:
[0061] like Figure 2 As shown, step S201: Construct a layered federated blockchain architecture based on the root chain layer, sub-chain layer, consensus cross-chain layer, and federated learning model layer;
[0062] Specifically, the root chain layer is used for node registration, alliance member management, global governance rules and cross-chain table maintenance, and stores the chain head digest, formula parameter hash and cross-chain contract address of each sub-chain; the sub-chain layer contains all lightweight sub-chains, where chain parameters are dynamically set according to regional data scale and network conditions, such as block size, block time, gas limit, etc.; the consensus cross-chain layer builds micro consensus groups and realizes secure data exchange between sub-chains through cross-chain bridges or relayers based on the IBC (Inter-Blockchain Communication) protocol, and ensures the rollback and consistency of cross-chain operations through atomic swaps or hash time-locked contracts (HTLC);
[0063] The federated learning model layer contains federated learning models, which are deep learning network algorithms based on attention mechanisms.
[0064] Step S202: Divide the target region into independent blocks, each independent block being a blockchain node, and deploy a lightweight sub-chain in each blockchain node;
[0065] Specifically, a lightweight subchain is a lightweight modification of a subchain, removing unnecessary modules, such as disabling native cryptocurrency functionality. For example, the target area could be an industrial park, dividing the enterprises in the industrial park into independent blocks, and deploying a lightweight subchain for each enterprise. The lightweight subchain stores carbon emission-related data.
[0066] Step S203: Form a micro consensus group by combining the regional nodes in the lightweight subchain with adjacent regional nodes. The regional nodes are data collection and processing nodes. They package the data within a preset time into sub-blocks and send the sub-blocks to the micro consensus group through the communication network. Each regional node independently verifies the compliance of the data and returns a signature after passing the verification. When the number of collected signatures is greater than or equal to 2f+1, the sub-block is marked as valid within the region, and the regional node is marked as a consensus node. Here, f represents the maximum number of Byzantine nodes that can be tolerated, that is, the maximum number of nodes that can be allowed to malfunction or engage in malicious behavior. Otherwise, it is marked as an invalid sub-block and needs to be returned to the regional node for reprocessing. If it cannot be processed, manual review is triggered.
[0067] Specifically, the regional nodes in the lightweight subchain form a micro-consensus group with 24 adjacent regional nodes. When f=1, that is, 2 out of 3 nodes have valid verification of compliance. If 2 nodes report anomalies, it is marked as an invalid sub-block. Verification of compliance includes timestamp continuity and numerical rationality, etc. The value in the sub-block is a hash value, which is used to ensure that a correct consensus can still be reached when there are f malicious nodes.
[0068] Step S204: The consensus node sends the sub-blocks marked as valid within the region to all cross-region consensus nodes through the communication network. The consensus node set calculates the weights according to the PoSDQ algorithm, elects the current master node, and the master node aggregates all valid sub-blocks to generate a Merkle tree and packages it into a master block. The master block is synchronized to all nodes through the network.
[0069] Specifically, the master node first collects the sub-blocks from the consensus within the region, uses all the sub-block hashes as leaf nodes of the Merkle tree, and arranges them from left to right in the order of receipt. If the number of sub-blocks is odd, the last hash value is copied to form an even number of leaf nodes to ensure the binary tree structure.
[0070] The parent node is calculated recursively. For the first-level parent node: concatenate the hash values of two adjacent leaf nodes and perform a hash operation to generate the parent node hash. This process is repeated, grouping the current-level parent nodes in pairs to generate higher-level parent nodes, until only one node remains as the Merkle root. For example, the first pair of leaf nodes H... sub1 and H sub2 Generate parent node: H parent1 =SHA256(H sub1 +H sub2 The second pair of Hsub3 and Hsub4 generates H parent2 And so on.
[0071] Step S205: Initiate a request through a cross-chain contract. The source subchain submits the request message and its proof to the root chain through the Relayer, and the root chain forwards it to the target subchain.
[0072] A Relayer is a dedicated node or service responsible for transmitting messages, transactions, and state proofs between different blockchains.
[0073] A single main block can aggregate 200 to 2000 sub-blocks, improving on-chain efficiency. Layered packaging adapts to cross-regional consensus, striking a balance between localization efficiency and global consistency. Merkle tree construction is achieved by combining consensus weight and compliance verification. The uniqueness of the Merkle tree path ensures that sub-blocks cannot be tampered with or replaced. The main block is dual-authenticated through consensus node signature and regulatory node verification, improving the security of data interaction.
[0074] Step S3: Based on the data quality scoring model, dynamically evaluate the confidence level of multi-source data and use smart contracts to filter the confidence level;
[0075] The specific steps of step S3 are as follows:
[0076] Step S301: Based on the data quality scoring model, score the preprocessed multi-source data uploaded to the blockchain, and define the scoring dimensions, including: data source qualification, temporal continuity and spatial relevance.
[0077] Specifically, data source qualifications are graded based on the qualifications of the data provider. For example, certified enterprises are rated 4 stars, certified sensors are rated 2 stars, and uncertified sensors are rated 0.5 stars. The specific update mechanism is as follows: when the qualification expires or violates regulations, the star rating is automatically downgraded; for temporal continuity, the data collection interval is checked to see if it meets the preset frequency, such as once per hour. Consecutive missing time windows are penalized. For example, if there are 3 consecutive missing data, the temporal continuity score drops by 30%; for spatial correlation, the logical consistency between block data and adjacent area data is verified, allowing fluctuations of ±15%. If the fluctuation exceeds this range, an anomaly flag is triggered. For example, if the CO2 concentration in area A suddenly increases, the traffic flow in the adjacent area B is checked to see if it changes synchronously.
[0078] Step S302: Calculate the confidence index based on the rating dimensions and set the confidence threshold. The specific calculation formula for the confidence index is: Confidence Index = w1 × Data Source Qualification + w2 × Temporal Continuity + w3 × Spatial Correlation;
[0079] Specifically, w1, w2, and w3 represent the weights of data source qualification, temporal continuity, and spatial relevance, respectively. The weights are dynamically adjusted according to the data type. For example, satellite data emphasizes spatial relevance, so the weight of spatial relevance is increased.
[0080] Step S303: If the confidence index is less than 60, the smart contract automatically generates a label to be reviewed, locks the data of the label to be reviewed, and does not allow it to participate in carbon emission prediction. At the same time, it pushes the data to the designated reviewer for review through on-chain event notification. If the review is successful, the lock is released. If the review fails, the label to be reviewed is changed to obsolete data.
[0081] In this embodiment, the manual review process is as follows: 1. Reviewers retrieve the original data, such as original sensor readings, satellite data, etc.; 2. Cross-validate the data using external trusted data sources; 3. Upload the review results to the blockchain. If the data is confirmed to be valid, it is unlocked; otherwise, it is marked as discarded data.
[0082] In step S2, the compliance of the on-chain data was verified. This step verifies the credibility of the data. Through the data quality scoring model, the credibility of the data is judged from multiple dimensions. The smart contract automatically executes the rules. When the confidence index is less than the preset threshold, the data is manually reviewed. The human review only handles high-risk data to improve efficiency and accuracy. The data quality scoring model is self-learned through the feedback of the human review. Here, the self-learning is the self-learning of the weights. According to the main dimensions of different data, the weights are adjusted and self-learned to improve the accuracy of the model and reduce human intervention.
[0083] For example, a factory's bed dryer reported a CO2 concentration of 250 ppm. Using a data quality scoring model, the data source qualification score was 3 (the company's qualification was valid but not five-star), the temporal continuity score was 4 (no missing data for 10 consecutive hours), and the spatial correlation score was 4 (data from adjacent areas all exceeded 400 ppm, with differences exceeding the threshold). The confidence index was calculated as 0.5×3+0.3×4+0.2×1=2.9. The total confidence index score is out of 5, equivalent to 58 points on a percentage scale. Since the confidence index is below the set threshold of 60, the smart contract was triggered, the data was marked for review, and its use in the prediction model was frozen. An alarm was pushed to the auditor for manual review. The auditor found that the sensor was installed incorrectly, located at a ventilation opening, causing the reading to be too low. The review result was that the review failed, the data was invalid, and the company's qualification score was automatically lowered, and the data source qualification weight was updated.
[0084] Step S4: Each node in the region uses local data to train a carbon emission prediction model to predict the carbon emissions of the node in the region, and generates a regional carbon quota allocation scheme based on the prediction results.
[0085] The specific steps of step S4 are as follows:
[0086] Step S401: Obtain historical carbon emission data, and divide the historical carbon emission data into a training set and a test set according to a preset ratio;
[0087] The preset ratio is generally set to 7:3;
[0088] Step S402: Input the training set into the federated learning model in the hierarchical federated blockchain architecture, upload the training parameters of the federated learning model to the hierarchical federated blockchain architecture, determine whether the training parameters have reached the preset convergence requirement, if the convergence requirement has been reached, the training ends; otherwise, continue training until the training parameters have reached the convergence requirement, and obtain the trained federated learning model.
[0089] In this embodiment, the federated learning model is built using a deep learning network algorithm based on an attention mechanism as a classifier. The step of building the federated learning model using a deep learning network algorithm based on an attention mechanism as a classifier includes: building a deep learning network algorithm model based on an attention mechanism; the structure of this deep learning network algorithm model includes: convolutional layers, a first max-pooling layer, a first grouped convolutional attention module, a second grouped convolutional attention module, a second max-pooling layer, a fully connected layer, and an activation function; the first grouped convolutional attention module and the second grouped convolutional attention module include: multiple sub-convolutional layers and a random forest Gini value calculation layer; based on the historical carbon emission data... This method trains a deep learning network algorithm model based on the attention mechanism to obtain a trained deep learning network algorithm model. Based on multiple deep learning network algorithm models based on the attention mechanism, a federated learning model is constructed. Historical carbon emission data is divided into training and testing sets according to a preset ratio. The training set is input into the initial federated learning model for classification training. The training parameters of the initial federated learning model are uploaded to the central server of the hierarchical federated blockchain architecture. The method determines whether the training parameters have reached a preset convergence requirement. If the convergence requirement is met, training ends, and a trained federated learning model is obtained; otherwise, training continues until the training parameters reach the convergence requirement. This method improves the prediction accuracy of carbon emission prediction methods by constructing a federated learning model using a deep learning network algorithm model based on the attention mechanism.
[0090] Step S403: Input the multi-source data from the lightweight subchain into the trained federated learning model to predict carbon emissions and obtain the carbon emission prediction results for the target area.
[0091] Example 2
[0092] Please see Figure 4 Another embodiment of the present invention provides a carbon emission prediction system, comprising: a data processing module, a blockchain processing module, a data filtering module, and a carbon emission prediction module;
[0093] The data processing module is used to collect multi-source data and preprocess the multi-source data, wherein the multi-source data is carbon emission related data;
[0094] The blockchain processing module is used to construct a hierarchical federated blockchain architecture, which divides the target area into blockchain nodes. Each node deploys a lightweight sub-chain, generates a hash digest with a timestamp and stores it on the chain. The sub-chains communicate with each other through a cross-chain interaction mechanism. The hierarchical federated blockchain architecture includes a root chain layer, a sub-chain layer, a consensus cross-chain layer and a federated learning model layer.
[0095] The data filtering module is used to dynamically evaluate the confidence level of multi-source data based on a data quality scoring model, and to filter the confidence level using smart contracts.
[0096] The carbon emission prediction module is used by each regional node to train a carbon emission prediction model using local data, predict the carbon emissions of the regional node, and generate a regional carbon quota allocation scheme based on the prediction results.
[0097] The blockchain processing module includes: an architecture building unit, a region division unit, and a consensus interaction unit;
[0098] The architecture building unit is used to construct a layered federated blockchain architecture based on the root chain layer, sub-chain layer, consensus cross-chain layer, and federated learning model layer.
[0099] The region division unit is used to divide the target region into independent blocks, each independent block being a blockchain node, and a lightweight sub-chain is deployed in each blockchain node;
[0100] The consensus interaction unit is used to form a micro consensus group. Each regional node independently verifies the compliance of the data and filters valid data. All consensus nodes elect the current master node. The master node aggregates all valid sub-blocks to generate a Merkle tree and interacts with the data through cross-chain contracts.
[0101] In addition, the parts of the technical solutions provided in the embodiments of this application that are consistent with the implementation principles of the corresponding technical solutions in the prior art have not been described in detail, so as to avoid excessive elaboration.
[0102] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the invention. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for predicting carbon emissions, characterized in that, include: Collect multi-source data and preprocess the multi-source data, wherein the multi-source data is carbon emission related data; A hierarchical federated blockchain architecture is constructed, which divides the target area into blockchain nodes. Each node deploys a lightweight sub-chain, generates a hash digest with a timestamp and stores it on the chain. Sub-chains communicate with each other through a cross-chain interaction mechanism. The hierarchical federated blockchain architecture includes a root chain layer, a sub-chain layer, a consensus cross-chain layer and a federated learning model layer. Based on a data quality scoring model, the confidence level of multi-source data is dynamically evaluated, and smart contracts are used to filter the confidence level. Each blockchain node uses local data to train a carbon emission prediction model, predicts the carbon emissions of the blockchain node, and generates a regional carbon quota allocation scheme based on the prediction results. The aforementioned hierarchical federated blockchain architecture divides the target region into blockchain nodes. Each node deploys a lightweight sub-chain, generates a timestamped hash digest, and stores it on the chain. Sub-chains communicate with each other through a cross-chain interaction mechanism, including: A hierarchical federated blockchain architecture is constructed based on the root chain layer, sub-chain layer, consensus cross-chain layer, and federated learning model layer. The target area is divided into independent blocks, each independent block is a blockchain node, and a lightweight sub-chain is deployed in each blockchain node; Blockchain nodes in the lightweight subchain are combined with adjacent blockchain nodes to form a micro-consensus group. Data within a preset time is packaged into sub-blocks. Blockchain nodes send the sub-blocks to the micro-consensus group through a communication network. Each blockchain node independently verifies the compliance of the data. After passing the verification, it returns a signature. When the number of collected signatures is greater than or equal to 2f+1, the sub-block is marked as valid within the target area, where f represents the maximum number of Byzantine nodes that can be tolerated. The blockchain node is then marked as a consensus node. Otherwise, it is marked as an invalid sub-block. Consensus nodes send the sub-blocks marked as valid within the target area to all cross-area consensus nodes through the communication network. The consensus node set calculates weights according to the PoSDQ algorithm, elects the current master node, and the master node aggregates all valid sub-blocks to generate a Merkle tree and packages it into a master block. The master block is synchronized to all nodes through the network. A request is initiated through a cross-chain contract. The source subchain submits the request message and its proof to the root chain via the Relayer, and the root chain forwards it to the target subchain.
2. The carbon emission prediction method as described in claim 1, characterized in that, The blockchain node is a node for data collection and processing.
3. The carbon emission prediction method as described in claim 1, characterized in that, The method of dynamically evaluating the confidence level of multi-source data based on a data quality scoring model and using smart contracts to filter the confidence level includes: Based on the data quality scoring model, the preprocessed multi-source data uploaded to the blockchain is scored, and the scoring dimensions are defined, including: data source qualification, temporal continuity and spatial relevance. The confidence index is calculated by weighted summation based on the scoring dimensions, and a confidence threshold is set. If the confidence index is less than 60, the smart contract automatically generates a review tag, locks the review tag data, and does not allow it to participate in carbon emission prediction. At the same time, it pushes the data to the designated reviewer for review through on-chain event notification. If the review is successful, the lock is released; if the review fails, the review tag is changed to obsolete data.
4. The carbon emission prediction method as described in claim 1, characterized in that, Each blockchain node uses local data to train a carbon emission prediction model, predicts the carbon emissions of the blockchain node, and generates a regional carbon quota allocation scheme based on the prediction results, including: Acquire historical carbon emission data and divide the historical carbon emission data into a training set and a test set according to a preset ratio; The training set is input into the federated learning model in the hierarchical federated blockchain architecture. The training parameters of the federated learning model are uploaded to the hierarchical federated blockchain architecture. It is determined whether the training parameters have reached the preset convergence requirement. If the convergence requirement is reached, the training ends. Otherwise, the training continues until the training parameters reach the convergence requirement, and the trained federated learning model is obtained. Multi-source data from lightweight subchains are input into a trained federated learning model to predict carbon emissions, thus obtaining the predicted carbon emissions for the target area.
5. The carbon emission prediction method as described in claim 3, characterized in that, The review process includes the following steps: Retrieve raw data; Cross-validation using external trusted data sources; The verification results are uploaded to the blockchain. If the data is confirmed to be valid, it is unlocked; otherwise, it is marked as discarded data.
6. The carbon emission prediction method as described in claim 1, characterized in that, The multi-source data includes industrial sensor data, satellite remote sensing imagery, traffic flow data, and energy consumption records.
7. A carbon emission prediction system for implementing the carbon emission prediction method according to any one of claims 1-6, characterized in that, include: Data processing module, blockchain processing module, data filtering module, and carbon emission prediction module; The data processing module is used to collect multi-source data and preprocess the multi-source data, wherein the multi-source data is carbon emission related data; The blockchain processing module is used to construct a hierarchical federated blockchain architecture, which divides the target area into blockchain nodes. Each node deploys a lightweight sub-chain, generates a hash digest with a timestamp and stores it on the chain. The sub-chains communicate with each other through a cross-chain interaction mechanism. The hierarchical federated blockchain architecture includes a root chain layer, a sub-chain layer, a consensus cross-chain layer and a federated learning model layer. The data filtering module is used to dynamically evaluate the confidence level of multi-source data based on a data quality scoring model, and to filter the confidence level using smart contracts. The carbon emission prediction module is used by each blockchain node to train a carbon emission prediction model using local data, predict the carbon emissions of the blockchain node, and generate a regional carbon quota allocation scheme based on the prediction results.
8. A carbon emission prediction system as described in claim 7, characterized in that, The blockchain processing module includes: an architecture construction unit, a region division unit, and a consensus interaction unit; The architecture building unit is used to construct a layered federated blockchain architecture based on the root chain layer, sub-chain layer, consensus cross-chain layer, and federated learning model layer. The region division unit is used to divide the target region into independent blocks, each independent block being a blockchain node, and a lightweight sub-chain is deployed in each blockchain node; The consensus interaction unit is used to form a micro consensus group. Each blockchain node independently verifies the compliance of the data and filters valid data. All consensus nodes elect the current master node. The master node aggregates all valid sub-blocks to generate a Merkle tree and interacts with the data through cross-chain contracts.
Citation Information
Patent Citations
Carbon emission prediction method and device, electronic equipment and storage medium
CN114662780A
Blockchain-based carbon emission prediction methods, devices, and electronic equipment
CN115577858B
Carbon emission prediction method and device based on block chain, and electronic equipment
CN115577858A
Supply chain carbon data credible management method based on block chain
CN120069336A
Multi-node carbon emission intelligent contract verification method based on block chain
CN120238313A