Carbon emission monitoring method based on blockchain

By using blockchain technology and advanced neural network algorithms in carbon emission monitoring, the problems of data expansion and training stability are solved, monitoring accuracy and data security are improved, and more accurate carbon emission monitoring and management are achieved.

CN118194137BActive Publication Date: 2024-09-13JIANGXI SHUANGYUAN ELECTRIC POWER HIGH-TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410606965.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-16
Publication Date
2024-09-13
Estimated Expiration
2044-05-16

AI Technical Summary

Technical Problem

Existing carbon emission monitoring technology lacks multiple constraints in data expansion, resulting in insufficient data to cover the complexity and diversity of the real world. Neural network training methods are prone to gradient disappearance, gradient explosion, or falling into local optimal solutions. Classification algorithm parameters Settings are not flexible enough, and data storage and management lack adequate security and non-tamperability.

Method used

A blockchain-based carbon emission monitoring method is adopted, data is expanded through enhanced nonlinear mixed integer programming SMOTE algorithm, vortex optimization neural network and autoencoding neural network based on tensor decomposition and optimization are used for feature extraction and dimensionality reduction, combined with The extreme learning machine classification algorithm is based on the covariate matrix and stores the data on the blockchain to ensure the security and non-tamperability of the data.

Benefits of technology

It achieves efficient data expansion under multiple constraints, improves the stability and performance of neural network training, enhances classification accuracy and model generalization capabilities, and ensures data security and transparency through blockchain storage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118194137B
    Figure CN118194137B
Patent Text Reader

Abstract

The present invention discloses a carbon emission monitoring method based on blockchain, comprising the following steps: respectively using a trained enhanced nonlinear mixed integer programming SMOTE algorithm, a vortex optimization neural network, an autoencoder neural network based on tensor decomposition and optimization, and an extreme learning machine classification algorithm based on a covariate matrix for data expansion, data feature extraction, feature dimension reduction, and dimensionality reduction feature classification, and applying them to blockchain storage; the present invention can perform efficient data expansion by introducing nonlinear mixed integer programming in the data expansion process; the vortex optimization neural network algorithm of the present invention simulates the formation, evolution, and dissipation process of vortices in nature to optimize the parameters in the neural network, thereby improving the stability and performance of the neural network training, especially in solving the problems of gradient disappearance, gradient explosion, or falling into a local optimal solution.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of carbon emission technology, and specifically to a carbon emission monitoring method based on blockchain. Background Art

[0002] Traditional carbon emission monitoring methods face multiple challenges such as difficulty in data collection, low monitoring accuracy, insufficient data security and trust. In order to overcome these difficulties, improve the efficiency and accuracy of carbon emission monitoring, and ensure the security and immutability of data, this paper proposes a blockchain-based carbon emission monitoring method, which integrates advanced data processing and machine learning technologies to achieve efficient monitoring and management of industrial carbon emissions.

[0003] The Chinese invention patent with application number CN202311493041.4 proposes a combined heuristic carbon emission optimization method based on the Pareto strategy, builds a carbon emission prediction optimization model, including a carbon peak input module, an energy consumption prediction module, an energy system optimization module and a carbon emission assessment feedback module, obtains energy consumption carbon emission related data and inputs them into the carbon peak input module, uses the LMDI factor decomposition method to decompose the energy carbon emission driving factors, and selects the input data based on the decomposition results. The energy consumption prediction module calculates and processes the input data to obtain the prediction results. The energy system optimization module receives the prediction results and uses the carbon emission optimization target model to solve and expand the optimization to obtain the optimization results. The carbon emission assessment feedback module evaluates the optimization results and sets the carbon emission reduction path in combination with the LMDI decomposition results. This method uses a variety of heuristic algorithms in the optimization process to obtain the optimal combination of energy, electricity and carbon emissions in the study area.

[0004] The Chinese invention patent with application number CN202211133720.6 proposes a training method, device, medium and computing equipment for a carbon emission prediction model. It includes: obtaining historical carbon emission data and historical light brightness data; wherein the historical carbon emission data includes historical carbon emission quantum data of multiple regions; the historical light brightness data includes historical light brightness sub-data of multiple regions; fitting the historical carbon emission quantum data of each region and the historical light brightness sub-data of each region to obtain the relationship functions corresponding to each region; wherein each relationship function represents the relationship between carbon emissions and light brightness in the corresponding region; according to the historical carbon emission data, historical light brightness data and each relationship function, the carbon emission prediction model is trained for the purpose of improving the prediction accuracy of the carbon emission prediction model. The present invention improves the accuracy of the carbon emission prediction data obtained by the carbon emission prediction model.

[0005] The Chinese invention patent with application number CN202410107976.2 proposes a carbon emission data prediction method and device, including: using the user's current power data, key feature data affecting carbon emissions in the historical period, and power data as the input of a pre-trained long short-term memory network, and obtaining the key feature data affecting carbon emissions in the user's predicted period output by the pre-trained long short-term memory network; using the key feature data affecting carbon emissions in the user's predicted period and the carbon emissions in the historical period as the input of a pre-trained autoregressive distributed lag model, and obtaining the carbon emissions in the user's predicted period output by the pre-trained autoregressive distributed lag model. The present invention makes full use of the advantages of power big data and ensures the comprehensiveness and real-time nature of the data. Through precise feature analysis, the key features that affect carbon emissions can be accurately extracted, thus laying a solid foundation for the establishment of subsequent carbon emission prediction models.

[0006] The prior art has the following deficiencies:

[0007] 1. Existing technologies often fail to consider multiple constraints in data expansion, resulting in the generated data being insufficient to cover the complexity and diversity of the real world.

[0008] 2. Existing neural network training methods may face problems such as gradient vanishing, gradient exploding, or falling into local optimal solutions, which will affect the stability of training and model performance.

[0009] 3. Existing classification algorithms may perform poorly on complex or variable data sets due to inflexible parameter settings or poor adaptability.

[0010] 4. Traditional data storage and management methods may lack sufficient security and immutability, affecting the reliability of data and the accuracy of decision-making. Summary of the invention

[0011] In view of the shortcomings of the prior art, the present invention provides a carbon emission monitoring method based on blockchain, which aims to solve the problems mentioned in the background technology.

[0012] To achieve the above purpose, the present invention provides the following technical solution: a carbon emission monitoring method based on blockchain, comprising the following steps:

[0013] Step S1: collect monitoring data through carbon emission monitoring equipment to build an original carbon emission monitoring data set, and annotate the collected data. The annotated categories are divided into two categories: normal emission and abnormal emission;

[0014] Step S2: using the trained enhanced nonlinear mixed integer programming SMOTE algorithm to expand the collected data;

[0015] The enhanced nonlinear mixed integer programming SMOTE algorithm is achieved by introducing nonlinear mixed integer programming into the data generation process in the SMOTE algorithm. In addition, an adaptive adjustment mechanism is adopted in the enhanced nonlinear mixed integer programming SMOTE algorithm.

[0016] Step S3: construct a feature extraction model, use the augmented data to train the feature extraction model to obtain a trained feature extraction model, and use the trained feature extraction model to extract features of the augmented data;

[0017] The feature extraction model uses a vortex optimization neural network, which optimizes its own parameters by simulating the formation, evolution and dissipation process of the vortex;

[0018] Step S4: construct a feature dimensionality reduction model, use the features of the augmented data to train the feature dimensionality reduction model, and obtain a trained feature dimensionality reduction model; use the trained feature dimensionality reduction model to reduce the dimensions of the features of the augmented data, and obtain features after dimensionality reduction;

[0019] The feature dimension reduction model adopts an autoencoder neural network based on tensor decomposition and optimization, and further adopts a dynamic optimization mechanism to adaptively adjust the parameters in the encoding and decoding processes according to the error feedback in the training process of the autoencoder neural network based on tensor decomposition and optimization;

[0020] Step S5: construct a classifier, and use the features after dimensionality reduction to train the classifier to obtain a trained classifier;

[0021] The classifier adopts the extreme learning machine classification algorithm based on the covariate matrix, and the classification algorithm adopts an adaptive mechanism to dynamically adjust the parameters of the covariate matrix and the extreme learning machine;

[0022] Step S6: Apply the trained feature extraction model, the trained feature dimension reduction model, and the trained classifier to blockchain storage.

[0023] Furthermore, the specific process of obtaining the trained enhanced nonlinear mixed integer programming SMOTE algorithm is as follows:

[0024] Step S2.11: Analyze the original carbon emission monitoring data set, where the analysis includes the distribution and category imbalance of the original carbon emission monitoring data set. Specifically, define the feature vector of the original carbon emission monitoring data set as ,in, Indicates features, calculate the mean of the feature vector of the original carbon emission monitoring data set and standard deviation To evaluate the distribution of the original carbon emission monitoring data set, it is expressed as:

[0025] ;

[0026] ;

[0027] In the formula, Indicates the number of features in each feature vector;

[0028] Step S2.12: According to the analysis results of the original carbon emission monitoring data set, set the constraints of nonlinear mixed integer programming , expressed as:

[0029] ;

[0030] In the formula, is the mean of the feature vector of the original carbon emission monitoring dataset after data expansion; is the standard deviation of the feature vector of the original carbon emission monitoring dataset after data augmentation;

[0031] Step S2.13: Adopt an adaptive adjustment mechanism to dynamically adjust the data expansion of the original carbon emission monitoring data set, optimize the data production strategy, and adjust the quality control parameters; specifically, define the adjustment parameters of the adaptive adjustment mechanism , where the adjustment parameters of the adaptive adjustment mechanism are Including adjustment parameters for the data expansion of the original carbon emission monitoring data set And the quality control parameters of the original carbon emission monitoring data set , the data production strategy is optimized through a feedback loop, expressed as:

[0032] ;

[0033] In the formula, Represents new data generated by the adaptive adjustment mechanism; Data quality assessment of the original carbon emission monitoring dataset after data expansion Function of is the adjustment amount;

[0034] The class imbalance of the original carbon emission monitoring data set before and after data expansion is set to and , then the adjustment parameter of the adaptive adjustment mechanism is The calculation method is expressed as:

[0035] ;

[0036] In the formula, Adjust sensitivity parameters for presets;

[0037] Step S2.14: Based on the set nonlinear mixed integer programming constraints and adaptive adjustment mechanism, the enhanced nonlinear mixed integer programming SMOTE algorithm is used to expand the data; specifically, the original carbon emission monitoring data set S is expanded to obtain the expanded data set: , by enhancing the nonlinear mixed integer programming SMOTE algorithm to generate new data, that is, augmented data, each augmented data From the original data That is, the data in the original carbon emission monitoring data set is generated through nonlinear mixed integer programming and is expressed as:

[0038] ;

[0039] In the formula, Represents constraints based on and the tuning parameters of the adaptive tuning mechanism The process of generating new data;

[0040] Step S2.15: Evaluate the quality of the expanded data using a quality evaluation index; specifically, the quality of the expanded data is evaluated using a plurality of quality evaluation indicators. To conduct an assessment, The mth quality assessment indicator representing the quality of the expanded data; the evaluation content includes the expanded data set The representativeness and diversity of the internal augmented data, etc., the evaluation function is defined as:

[0041] ;

[0042] In the formula, It is an evaluation function used to comprehensively consider the quality indicators of each expanded data to evaluate the expanded data set Overall quality; Represents the quality assessment of the expanded data set; in calculating the quality assessment of the expanded data set Consider expanding the dataset Representativeness of internal augmented data and diversity As a quality indicator, Calculated by weighted average:

[0043] ;

[0044] In the formula, Indicates the representativeness of the augmented data The weight of the indicator; Indicates the diversity of augmented data The weight of the indicator;

[0045] Step S2.16: According to the expanded data quality assessment results and the feedback during the training of the enhanced nonlinear mixed integer programming SMOTE algorithm, the enhanced nonlinear mixed integer programming SMOTE algorithm adaptively adjusts the data generation strategy and constraints, and enters the next loop iteration until the preset data expansion amount is reached or the performance of the enhanced nonlinear mixed integer programming SMOTE algorithm meets the requirements; specifically, the adaptive adjustment of the data generation strategy and constraints is expressed as:

[0046] ;

[0047] ;

[0048] In the formula, Represents new data generated by the adaptive adjustment mechanism; represents the updated constraints; Indicates adjustment parameters The gradient of the loss function; Representing constraints The gradient of the loss function; is the loss function;

[0049] Among them, setting the loss function Tuning parameters relative to the adaptive tuning mechanism The gradient of It is expressed as:

[0050] ;

[0051] In the formula, Represents the loss function About the Quality Assessment of the Augmented Dataset The partial derivative of Represents the quality assessment of the expanded dataset About the adjustment parameters of the adaptive adjustment mechanism The partial derivative of .

[0052] Furthermore, the class imbalance of the data in the original carbon emission monitoring dataset is quantitatively evaluated by comparing the ratio of the number of data in each category. The number of data in the normal emission category is , the number of data classified as abnormal emissions is , the data category imbalance in the original carbon emission monitoring dataset It is expressed as:

[0053] ;

[0054] Among them, new data The generation is based on the original data The properties of the original data are nonlinearly combined and adjusted. The specific process is as follows: One property of , then the new data The properties of are obtained through nonlinear transformation:

[0055] ;

[0056] In the formula, Represents the corresponding attributes of the new data, and According to the constraints and the tuning parameters of the adaptive tuning mechanism Dynamically adjusted coefficients are used to control the range and direction of changes in the attribute values ​​of new data.

[0057] Furthermore, the process of training the vortex optimization neural network using augmented data is as follows:

[0058] Step S3.11: randomly generate a set of vortices in the vortex optimization neural network parameter space, each vortex represents a possible parameter vector, including weight w and bias b; specifically, initialize the parameter vector of the vortex optimization neural network , during initialization, the parameter vector of each vortex is It is randomly generated in the parameter space, conforming to the uniform distribution, and the total number of vortices after initialization is set to , then the initialization process is expressed as:

[0059] ;

[0060] In the formula, Represents the parameter vector The initial value of represents uniform distribution; and are the lower and upper bounds of the parameter space respectively;

[0061] Step S3.12: Calculate the performance of the parameter vector of each vortex on the training set, where the training set is divided from the augmented data according to a certain ratio, and the vortices are sorted according to the performance; specifically, the loss function is used Calculate the performance of the parameter vector of each vortex on the training set, according to the calculated loss function The vortices are sorted by the values ​​of :

[0062] ;

[0063] In the formula, represents the loss function of the neural network corresponding to the Nth vortex;

[0064] Step S3.13: Dynamically update the vortexes, dynamically adjust the positions and intensities of the vortices according to the ranking of the vortex sorting and the distances between the vortices, and simulate the interaction and evolution of the vortices; specifically, in the dynamic update stage of the vortexes, simulate the interaction of the vortices and adjust the positions of the vortices in the parameter space, and set the first Vortex and Vortex The distance between , then Dynamic update of vortex It is expressed as:

[0065] ;

[0066] In the formula, is a hyperparameter that adjusts the effect of distance; It is based on The vortex and The regulation function of the distance between vortices; is the adaptive vortex factor; is a regulatory factor based on environmental feedback;

[0067] Step S3.14: Simulate the merging and classification of vortices in nature; specifically, set the merging threshold and split threshold , when the distance between two vortices is less than the merging threshold When the strength of a vortex exceeds the splitting threshold, the two current vortices are merged into a new vortex. When , the vortex is split into two new vortices;

[0068] The operation of merging two vortices into a new vortex is expressed as:

[0069] ;

[0070] In the formula, Represents the new vortex obtained after merging;

[0071] The operation of splitting a vortex into two new vortices is expressed as:

[0072] ;

[0073] In the formula, Indicates that based on A random perturbation vector of a vortex parameter vector is used to generate two new vortex parameter vectors; The first new vortex indicating the split; A second new vortex indicating the split;

[0074] Step S3.15: Select the best performing vortex through a domain-based search strategy, perform a local search to adjust the parameter vector of the vortex, and simulate the local absorption and energy concentration phenomenon of the vortex in the fluid; specifically, in the domain-based search strategy, the local search method is expressed as:

[0075] ;

[0076] In the formula, represents the vortex after local search; represents the first learning rate; Indicates that the mean is 0 and the covariance matrix is Gaussian distribution of

[0077] Among them, the covariance matrix According to the historical moving direction and speed of the vortex in the parameter space, dynamic adjustment is performed to adapt to different search stages and characteristics. The dynamic adjustment is expressed as:

[0078] ;

[0079] In the formula, is the adjusted covariance matrix; is the covariance matrix before adjustment; Represents the second learning rate parameter; Indicates The change of a vortex in T iterations;

[0080] Step S3.16: The vortex is attenuated by adjusting the life value of the vortex. When the life value of the vortex is lower than a certain threshold, it is eliminated. The health of a vortex is , then the decay rule of the vortex is:

[0081] ;

[0082] In the formula, is the health value after the vortex decays; The amount of vortex health reduction;

[0083] Step S3.17: Repeat steps S3.12 to S3.16 until the vortex optimization neural network reaches a preset maximum number of iterations. After each round of iteration, the state of the vortex is updated and the performance of the vortex is re-evaluated.

[0084] Further, based on The vortex and The adjustment function of the distance between vortices The calculation method uses an exponential decay model to reflect the characteristics of the interaction force between vortices weakening with increasing distance, which is expressed as:

[0085] ;

[0086] In the formula, and denote the first vortex influence hyperparameter and the second vortex influence hyperparameter, respectively, which are used to control the amplitude and decay rate of the interaction force between vortices;

[0087] Among them, The vortex and The distance between the vortices It is calculated based on the Euclidean distance of its own parameter vector and is expressed as:

[0088] ;

[0089] In the formula, represents the dimension of the parameter vector; and Respectively The vortex and The vortex in dimensional parameter vector value;

[0090] Among them, the adaptive vortex factor The information entropy of the vortex distribution is calculated using adaptive vortex guided learning. for:

[0091] ;

[0092] In the formula, Indicates The proportion of a vortex in all vortices is calculated by the inverse of the vortex loss function, which is expressed as:

[0093] ;

[0094] In the formula, Indicates The loss function of the neural network corresponding to each vortex;

[0095] Among them, according to the information entropy of vortex distribution The adaptive vortex factor The search strategy for adjusting the vortex is calculated as:

[0096] ;

[0097] In the formula, Indicates a preset maximum adjustment strength; is the maximum information entropy value that can be achieved theoretically; represents the momentum adjustment factor; Indicates The vortex in the recent The average momentum vector in iterations;

[0098] Among them, the momentum adjustment factor and the average momentum vector It is obtained by adjusting the time series momentum and calculating the The vortex in the recent The average momentum vector in iterations It is expressed as:

[0099] ;

[0100] In the formula, Indicates The parameter vector of the vortex after the tth iteration; Indicates The vortex in The parameter vector after iterations;

[0101] Defining the Momentum Adjustment Factor It is used to measure the size and consistency of the average momentum vector and is expressed as:

[0102] ;

[0103] In the formula, for and The angle between

[0104] Among them, the regulatory factors based on environmental feedback The calculation method is expressed as:

[0105] ;

[0106] In the formula, Represents the Sigmoid mapping function, which is used to map environmental feedback to the (0, 1) interval; is the environmental feedback function, used to evaluate the The characteristics of the environment around a vortex are calculated as:

[0107] ;

[0108] In the formula, Indicates The Hessian matrix of the loss function at the vortex position; is the modulus of the gradient;

[0109] Among them, the random perturbation vector Based on the local gradient information of the current vortex position, the calculation method is expressed as:

[0110] ;

[0111] In the formula, and They represent the hyperparameters that control the gradient direction and random perturbation intensity respectively; Indicates in vortex The gradient information calculated at the position; Indicates that the mean is 0 and the covariance matrix is Gaussian noise.

[0112] Furthermore, the specific process of training the autoencoder neural network based on tensor decomposition and optimization is as follows:

[0113] Step S4.11: Convert the features of the augmented data into a tensor format; specifically, set the features of the augmented data to the original tensor ,in, , are the length, width, and height of the original tensor respectively; Represents the dimension of the original tensor;

[0114] Step S4.12: Initialize all network parameters of the autoencoder neural network based on tensor decomposition and optimization, including the weights and biases of the encoder, the weights and biases of the decoder, and the core tensors of the autoencoder neural network based on tensor decomposition and optimization in the tensor decomposition process; specifically, set the weight matrices of the encoder and the decoder to be and ,in, is the dimension of the feature reduced dimension of the augmented data, and ; Set the bias vectors of the encoder and decoder to and ;

[0115] Step S4.13: Input raw tensor First, it is compressed into a low-dimensional representation through the encoder, and then the low-dimensional representation is reconstructed back to the original data space through the decoder; specifically, given the original tensor , first pass the encoder to transform the original tensor Mapped to a low-dimensional feature space, the encoding is obtained , expressed as:

[0116] ;

[0117] In the formula, is the ReLU activation function;

[0118] coding Reconstructed into a reconstructed tensor through the decoder , expressed as:

[0119] ;

[0120] Step S4.14: Calculate the reconstruction error by comparing the reconstructed data with the original data , using the back propagation algorithm based on the reconstruction error To update the parameters of the autoencoder neural network based on tensor decomposition and optimization; specifically, the mean square error is used to calculate the original tensor and reconstruct the tensor The difference between them is calculated as:

[0121] ;

[0122] In the formula, and Respectively represent the dimensions of the original tensor before reconstruction and the dimensions of the original tensor after reconstruction; by calculating the reconstruction error The partial derivatives of all the parameters of the encoder To update the encoder parameters;

[0123] Step S4.15: Based on the reconstruction error The feedback of the encoder and decoder is used to dynamically adjust the parameters of the encoder and decoder in the encoding and decoding process to optimize the performance of the encoder; specifically, the adjustment factor is used According to the reconstruction error of the current iteration Size, dynamically adjust the learning rate of the encoder, expressed as:

[0124] ;

[0125] In the formula, is the initial learning rate of the encoder; To adjust the sensitivity parameters;

[0126] Step S4.16: In the training process of the autoencoder neural network based on tensor decomposition and optimization, a meta-learning strategy is used to improve the generalization ability of the autoencoder neural network based on tensor decomposition and optimization; specifically, the objective function of the meta-learning strategy is set as , Based on a set of new training tasks The cumulative reconstruction error is expressed as:

[0127] ;

[0128] In the formula, Indicates The reconstruction error of the training task;

[0129] Gradient descent is used to update the objective function of the meta-learning strategy, which is expressed as:

[0130] ;

[0131] In the formula, represents the set of parameters of the encoder in the meta-learning strategy; The learning rate representing the objective function of the meta-learning strategy; represents the parameters of the encoder in the updated meta-learning strategy; represents the parameters of the encoder in the meta-learning strategy before updating; Represents the gradient of the loss function of the encoder parameter update process in the meta-learning strategy;

[0132] The training set is divided into multiple batches for training. Each training batch is used as a training task, and the error between training tasks is dynamically adjusted. , expressed as:

[0133] ;

[0134] In the formula, is the learning rate of the objective function of the initial meta-learning strategy; To adjust the function;

[0135] Step S4.17: Repeat the iteration steps S4.12 to S4.16 until the autoencoder neural network based on tensor decomposition and optimization meets the preset maximum number of iterations.

[0136] Furthermore, the weight of the encoder The calculation is done by minimizing the features of the original data, i.e. the augmented data, and the reconstructed data, i.e. the encoding Specifically, the objective function of encoder training is set , then the difference between the original data and the reconstructed data is calculated as:

[0137] ;

[0138] In the formula, represents the Frobenius norm, which is used to measure the difference between matrices; represents the transpose of the encoder weights;

[0139] Among them, the decoder weight The iterative update aims to minimize the difference between the low-dimensional representation and the reconstructed data, that is, the reconstruction error , the update rule is implemented by gradient descent method, for the reconstruction error Weights for the encoder The partial derivative of is updated, expressed as:

[0140] ;

[0141] In the formula, represents the learning rate for updating the decoder weights; is the reconstruction error About the encoder weights The partial derivative of represents the updated decoder weight; represents the decoder weights before update.

[0142] Furthermore, the specific process of using the reduced-dimensional features to train the extreme learning machine classification algorithm based on the covariate matrix is ​​as follows:

[0143] Step S5.11: Assume that the feature set after dimensionality reduction is ,in, Represents the number of data, each feature vector after dimensionality reduction Corresponding to the data of a training extreme learning machine classification algorithm based on the covariate matrix, the target output vector set is ,in, yes The corresponding classification label;

[0144] Set the initial parameters of the extreme learning machine classification algorithm based on the covariate matrix, including the number of hidden layer nodes, the initial covariate matrix structure and the learning rate; specifically, initialize the number of hidden layer nodes of the extreme learning machine classification algorithm based on the covariate matrix , weight matrix and the bias vector , where the weight matrix of the extreme learning machine classification algorithm based on the covariate matrix is The dimension is , Represents the dimension of the input features, the bias vector of the extreme learning machine classification algorithm based on the covariate matrix The dimension is , then the weight matrix and the bias vector The initialization method is expressed as:

[0145] ;

[0146] ;

[0147] In the formula, Indicates the generation of a A random matrix of

[0148] Step S5.12: Set the reduced feature set Input the extreme learning machine classification algorithm based on the covariate matrix to obtain the target output vector set ;

[0149] The activation value of each hidden layer node and the prediction result of the output layer in the extreme learning machine classification algorithm based on the covariate matrix are calculated; specifically, the method of calculating the activation value of each hidden layer node and the prediction result of the output layer is expressed as:

[0150] ;

[0151] In the formula, is the Sigmoid activation function;

[0152] Step S5.13: Preset an adaptive strategy to analyze the training performance of the extreme learning machine classification algorithm based on the covariate matrix, including classification accuracy and error rate; when the performance of the extreme learning machine classification algorithm based on the covariate matrix does not reach the expected goal, adjust the number of hidden layer nodes and the structure of the covariate matrix according to the feedback results of the extreme learning machine classification algorithm based on the covariate matrix during the training process; specifically, dynamically adjust according to the performance feedback of the extreme learning machine classification algorithm based on the covariate matrix during the training process. and The size and value of the performance evaluation function ,in, is the predicted output of the output layer, calculating the performance of the extreme learning machine classification algorithm based on the covariate matrix and adjusting it according to performance feedback , expressed as:

[0153] ;

[0154] ;

[0155] In the formula, Indicates that according to the performance evaluation function Determine the amount of adjustment for the extreme learning machine classification algorithm based on the covariate matrix; Indicates adjustment strategy; Indicates the number of hidden layer nodes after dynamic adjustment; Represents the weight of the dynamically adjusted extreme learning machine classification algorithm based on the covariate matrix;

[0156] Step S5.14: Use the back propagation algorithm to calculate the reconstruction error of the extreme learning machine classification algorithm based on the covariate matrix, and update the parameters of the extreme learning machine classification algorithm based on the covariate matrix according to the reconstruction error result, including weights and biases; specifically, use the error back propagation algorithm to update the weights of the extreme learning machine classification algorithm based on the covariate matrix and bias , reconstruction error , then the update method of weights and biases is expressed as:

[0157] ;

[0158] ;

[0159] In the formula, represents the learning rate of the extreme learning machine classification algorithm based on the covariate matrix; represents the weight update gradient; represents the bias update gradient;

[0160] Step S5.15: Repeat steps S5.12 to S5.14 until the maximum number of iterations preset for the extreme learning machine classification algorithm based on the covariate matrix is ​​reached.

[0161] Furthermore, The function calculation based on the difference between the performance of the current extreme learning machine classification algorithm based on the covariate matrix and the expected performance of the current extreme learning machine classification algorithm based on the covariate matrix is ​​expressed as:

[0162] ;

[0163] In the formula, represents the parameter for adjusting sensitivity; and They respectively represent the expected performance index of the current extreme learning machine classification algorithm based on the covariate matrix and the performance index of the current extreme learning machine classification algorithm based on the covariate matrix;

[0164] Among them, the weight update gradient is calculated It is expressed as:

[0165] ;

[0166] In the formula, represents the transpose of the hidden layer output; Represents the error between the output layer prediction and the actual target;

[0167] Among them, the calculation bias update gradient It is expressed as:

[0168] ;

[0169] In the formula, and Represent the predicted output and actual target of a single data respectively.

[0170] Furthermore, the specific process of step S6 is: based on the trained feature extraction model, the trained feature dimensionality reduction model and the trained classifier, the newly collected data is predicted and processed to obtain a prediction result, and then the prediction result and its related information are encoded into a blockchain transaction, and the encoded blockchain transaction is broadcast to all nodes through the blockchain network, waiting for verification and confirmation. When the verification and confirmation are completed, the encoded blockchain transaction is added to a new block on the blockchain for permanent storage.

[0171] Compared with the existing technology, the present invention has the following beneficial effects:

[0172] (1) The present invention introduces nonlinear mixed integer programming in the data expansion process, which can perform efficient data expansion under the multiple constraints of data distribution characteristics, category imbalance degree and data quality indicators.

[0173] (2) The vortex optimization neural network algorithm of the present invention simulates the formation, evolution and dissipation process of vortices in nature to optimize the parameters in the neural network, thereby improving the stability and performance of neural network training, especially in solving problems such as gradient vanishing, gradient exploding or falling into local optimal solutions.

[0174] (3) The present invention adopts a non-autoencoder neural network based on tensor decomposition and optimization, which integrates tensor decomposition technology and can effectively process and represent multidimensional data and better capture multidimensional relationships and patterns in the data. In addition, the dynamic optimization mechanism can adaptively adjust the parameters in the encoding and decoding process according to the error feedback during the training process.

[0175] (4) The extreme learning machine classification algorithm based on the covariate matrix adopted in the present invention adopts an adaptive mechanism to dynamically adjust the parameters of the covariate matrix and the extreme learning machine, thereby improving the classification accuracy and the generalization ability of the model.

[0176] (5) The present invention enhances the security, immutability and transparency of data by storing carbon emission data and prediction results on the blockchain, providing relevant parties with a reliable data source and supporting more accurate decision-making and policy making. BRIEF DESCRIPTION OF THE DRAWINGS

[0177] Figure 1 The figure is a flow chart of the method of the present invention. DETAILED DESCRIPTION

[0178] like Figure 1As shown, the present invention provides a technical solution: a carbon emission monitoring method based on blockchain, comprising the following steps:

[0179] Step S1: Collect monitoring data through carbon emission monitoring equipment to build an original carbon emission monitoring data set. The detected data includes carbon emissions ,temperature ,humidity , wind speed , industrial production etc.; Carbon emission monitoring equipment includes flue gas analyzers, greenhouse gas monitoring stations, etc.

[0180] The collected data are manually labeled and the labeled categories are divided into two categories: normal emissions and abnormal emissions.

[0181] Step S2: using the trained enhanced nonlinear mixed integer programming SMOTE algorithm to expand the collected data;

[0182] The collection, labeling and preprocessing of training data are time-consuming and labor-intensive. Insufficient training data can easily lead to poor generalization ability of the model and affect the accuracy of the model.

[0183] The enhanced nonlinear mixed integer programming SMOTE algorithm introduces nonlinear mixed integer programming into the data generation process in the SMOTE algorithm, so that the data expansion process can be carried out under multiple constraints, including but not limited to the distribution characteristics of the data, the degree of category imbalance and data quality indicators; in addition, an adaptive adjustment mechanism is adopted in the enhanced nonlinear mixed integer programming SMOTE algorithm, which can dynamically adjust the data generation strategy according to the characteristics of the current original carbon emission monitoring data set and the feedback of the enhanced nonlinear mixed integer programming SMOTE algorithm during training, including adjusting the number and distribution of the expanded data and the preferred direction of data generation.

[0184] The process of training the enhanced nonlinear mixed integer programming SMOTE algorithm is as follows:

[0185] Step S2.11: Analyze the original carbon emission monitoring data set to determine the basic requirements and goals of data expansion; the analysis includes the distribution and category imbalance of the data in the original carbon emission monitoring data set;

[0186] Specifically, the feature vector of the original carbon emission monitoring data set is defined as ,in, Indicates features (such as temperature, humidity, carbon emissions, etc.), calculate the mean of the feature vector of the original carbon emission monitoring data set and standard deviation To evaluate the distribution of the original carbon emission monitoring data set, it is expressed as:

[0187] (1);

[0188] (2);

[0189] In the formula, Indicates the number of features in each feature vector;

[0190] Among them, the category imbalance of the data in the original carbon emission monitoring dataset is quantitatively evaluated by comparing the ratio of the number of data in each category. Assume that the data in the original carbon emission monitoring dataset includes two categories: normal emission and abnormal emission. The number of normal emission data is , the number of abnormal emission data is , the class imbalance of the original carbon emission monitoring dataset It can be expressed as:

[0191] (3);

[0192] Step S2.12: According to the analysis results of the original carbon emission monitoring data set, set the constraints of nonlinear mixed integer programming to ensure that data expansion takes into account data distribution, category balance and quality control; in this embodiment, taking data distribution as an example, the constraints The limits of the mean and standard deviation of the feature vector of the original carbon emission monitoring data set are set and can be expressed as:

[0193]

[0194] In the formula, is the mean of the feature vector of the original carbon emission monitoring dataset after data expansion; is the standard deviation of the feature vector of the original carbon emission monitoring dataset after data augmentation.

[0195] Step S2.13: Adopt an adaptive adjustment mechanism to dynamically adjust the data expansion amount of the original carbon emission monitoring data set, optimize the data production strategy, and adjust the quality control parameters to ensure that the enhanced nonlinear mixed integer programming SMOTE algorithm can self-optimize according to the feedback of the training process;

[0196] Specifically, define the adjustment parameters of the adaptive adjustment mechanism , where the adjustment parameters of the adaptive adjustment mechanism are Including adjustment parameters for the data expansion of the original carbon emission monitoring data set And the quality control parameters of the original carbon emission monitoring data set , the data production strategy is optimized through a feedback loop and can be expressed as:

[0197] (5);

[0198] In the formula, Represents new data generated by the adaptive adjustment mechanism; Data quality assessment of the original carbon emission monitoring dataset after data expansion Function of It is the adjustment amount, which is determined by the feedback during the training of the enhanced nonlinear mixed integer programming SMOTE algorithm.

[0199] The class imbalance of the original carbon emission monitoring data set before and after data expansion is set to and , then the adjustment parameter of the adaptive adjustment mechanism is The calculation method can be expressed as:

[0200] (6);

[0201] In the formula, is a preset adjustment sensitivity parameter used to control the magnitude of the adjustment range; in this embodiment, Set to 0.1.

[0202] Step S2.14: Based on the set nonlinear mixed integer programming constraints and adaptive adjustment mechanism, the enhanced nonlinear mixed integer programming SMOTE algorithm is used to perform data expansion. During the data expansion process, the enhanced nonlinear mixed integer programming SMOTE algorithm will automatically adjust the quantity and quality of the generated new data according to its current performance and the eigenvector of the original carbon emission monitoring data set, so as to maximize the training effect of the enhanced nonlinear mixed integer programming SMOTE algorithm.

[0203] Specifically, the original carbon emission monitoring data set S, the expanded data set obtained by data expansion is , by enhancing the nonlinear mixed integer programming SMOTE algorithm to generate new data, that is, augmented data, each augmented data From the original data That is, the data in the original carbon emission monitoring data set is generated through nonlinear mixed integer programming and can be expressed as:

[0204] (7);

[0205] In the formula, Represents constraints based on and the tuning parameters of the adaptive tuning mechanism The process of generating new data.

[0206] Among them, new data The generation is based on the original data The properties of are nonlinearly combined and adjusted. The specific process is as follows:

[0207] Assume the original data One property of , then the new data The properties of can be obtained through nonlinear transformation:

[0208] (8);

[0209] In the formula, Represents the corresponding attributes of the new data, and According to the constraints and the tuning parameters of the adaptive tuning mechanism The dynamically adjusted coefficient is used to control the range and direction of change of the attribute value of the new data; in this embodiment, Set to 0.05, Set to .

[0210] Step S2.15: Evaluate the expanded data using quality assessment indicators to ensure the effectiveness and efficiency of data expansion;

[0211] Specifically, the quality of the expanded data is evaluated through multiple quality assessment indicators. To conduct an assessment, The mth quality assessment indicator representing the quality of the expanded data; the evaluation content includes the expanded data set The representativeness and diversity of the internal augmented data, etc., the evaluation function can be defined as:

[0212] (9);

[0213] In the formula, It is an evaluation function used to comprehensively consider the quality indicators of each expanded data to evaluate the expanded data set Overall quality; represents the quality assessment of the expanded data set; in this embodiment, when calculating the quality assessment of the expanded data set Consider expanding the dataset Representativeness of internal augmented data and diversity As a quality assessment indicator, Calculated by weighted average:

[0214] (10);

[0215] In the formula, Indicates the representativeness of the augmented data The weight of the indicator; Indicates the diversity of augmented data The weight of the indicator; in this embodiment, and Both are set to 0.5.

[0216] Step S2.16: According to the expanded data quality assessment result and the feedback during the training of the enhanced nonlinear mixed integer programming SMOTE algorithm, the enhanced nonlinear mixed integer programming SMOTE algorithm adaptively adjusts the data generation strategy and constraint conditions, and enters the next loop iteration until the preset data expansion amount is reached or the performance of the enhanced nonlinear mixed integer programming SMOTE algorithm meets the requirements;

[0217] Specifically, the adaptive adjustment data generation strategy and constraints can be expressed as:

[0218] (11);

[0219] (12);

[0220] In the formula, Represents new data generated by the adaptive adjustment mechanism; represents the updated constraints; Indicates adjustment parameters The gradient of the loss function; Representing constraints The gradient of the loss function; is the loss function, taking into account the quality assessment of the expanded dataset And the training objective of the enhanced nonlinear mixed integer programming SMOTE algorithm ; and is the learning rate of the adaptive adjustment mechanism; in this embodiment, Set to 0.001; Set to 0.005.

[0221] Among them, setting the loss function Tuning parameters relative to the adaptive tuning mechanism The gradient of It can be expressed as:

[0222] (13);

[0223] In the formula, Represents the loss function About the Quality Assessment of the Augmented Dataset The partial derivative of Represents the quality assessment of the expanded dataset About the adjustment parameters of the adaptive adjustment mechanism The partial derivative of .

[0224] Step S3: construct a feature extraction model, use the augmented data to train the feature extraction model to obtain a trained feature extraction model, and use the trained feature extraction model to extract features of the augmented data;

[0225] Some existing solutions may encounter problems such as gradient vanishing, gradient exploding, or falling into local optimal solutions when using neural networks for feature extraction, affecting the stability of training and the performance of the model; the feature extraction model of the present invention adopts a vortex optimization neural network, which is inspired by the vortex phenomenon and optimizes the parameters (weight w and bias b) in the neural network by simulating the formation, evolution and dissipation process of the vortex; in fluid dynamics, vortices can increase the chaos and complexity of the fluid, thereby guiding the search process in the parameter space towards a better solution. By simulating this natural process, the vortex optimization neural network aims to find a parameter vector that can minimize the neural network loss function, without relying on the gradient-based neural network parameter optimization method.

[0226] Among them, the training process of the vortex optimization neural network using augmented data is as follows:

[0227] Step S3.11: randomly generate a set of vortices in the vortex optimization neural network parameter space, each vortex represents a possible parameter vector (including weight w and bias b); specifically, initialize the parameter vector of the vortex optimization neural network , during initialization, the parameter vector of each vortex is It is randomly generated in the parameter space, conforming to the uniform distribution, and the total number of vortices after initialization is set to , then the initialization process can be expressed as:

[0228] (14);

[0229] In the formula, Represents the parameter vector The initial value of represents uniform distribution; and They are the lower and upper bounds of the parameter space, respectively, and are preset manually.

[0230] Step S3.12: Calculate the performance of the parameter vector of each vortex on the training set. The training set can be divided from the extended data according to a certain ratio, and the vortices are sorted according to the performance. Specifically, the loss function is used. Calculate the performance of the parameter vector of each vortex on the training set, according to the calculated loss function The vortices are sorted by the values ​​of :

[0231] (15);

[0232] In the formula, represents the loss function of the neural network corresponding to the Nth vortex;

[0233] In this embodiment, the loss function is the cross entropy loss.

[0234] Step S3.13: Dynamically update the vortexes, dynamically adjust the positions and intensities of the vortices according to the ranking of the vortex sorting and the distances between the vortices, and simulate the interaction and evolution of the vortices; specifically, in the dynamic update stage of the vortexes, simulate the interaction of the vortices and adjust the positions of the vortices in the parameter space, and set the first Vortex and Vortex The distance between , then Dynamic update of vortex It can be expressed as:

[0235] (16);

[0236] In the formula, is a hyperparameter that adjusts the effect of distance; It is based on The vortex and The regulation function of the distance between vortices; is the adaptive vortex factor; is a regulatory factor based on environmental feedback;

[0237] In this embodiment, based on The vortex and The adjustment function of the distance between vortices The calculation method of can use the exponential decay model to reflect the characteristics of the interaction force between vortices weakening with increasing distance, which can be expressed as:

[0238] (17);

[0239] In the formula, and Respectively represent the first vortex influence hyperparameter and the second vortex influence hyperparameter, which are used to control the amplitude and attenuation rate of the interaction force between vortices; in this embodiment, Set to 0.5, Set to 0.1.

[0240] Among them, The vortex and The distance between the vortices It is calculated based on the Euclidean distance of its own parameter vector and can be expressed as:

[0241] (18);

[0242] In the formula, represents the dimension of the parameter vector; and Respectively The vortex and The vortex in dimensional parameter vector value.

[0243] Among them, the adaptive vortex factor The information entropy of the vortex distribution is calculated by adaptive vortex guided learning. for:

[0244] (19);

[0245] In the formula, Indicates The proportion of a vortex in all vortices is calculated by the inverse of the vortex loss function, which can be expressed as:

[0246] (20);

[0247] In the formula, Indicates The loss function of the neural network corresponding to each vortex;

[0248] Among them, according to the information entropy of vortex distribution The adaptive vortex factor The search strategy for adjusting the vortex can be expressed as:

[0249] (twenty one);

[0250] In the formula, Indicates a preset maximum adjustment strength; is the maximum information entropy value that can be achieved theoretically; represents the momentum adjustment factor; Indicates The vortex in the recent The average momentum vector over iterations.

[0251] Among them, the momentum adjustment factor and the average momentum vector It is obtained through time series momentum adjustment. The time series momentum adjustment aims to adjust the exploration trend of the vortex by analyzing its historical movement trend in the parameter space, considering the movement direction and speed of the vortex in the historical iteration, calculating its momentum, and then using this momentum information to guide future parameter updates; specifically, calculate the first The vortex in the recent The average momentum vector in iterations It can be expressed as:

[0252] (twenty two);

[0253] In the formula, Indicates The parameter vector of the vortex after the tth iteration; Indicates The vortex in The parameter vector after iterations.

[0254] Defining the Momentum Adjustment Factor It is used to measure the size and consistency of the average momentum vector and can be expressed as:

[0255] (twenty three);

[0256] In the formula, for and The angle between is used to measure the consistency between the latest moving direction and the average momentum vector direction, and the smaller the angle, the higher the consistency of the average momentum vector.

[0257] Among them, the regulatory factors based on environmental feedback The calculation method can be expressed as:

[0258] (twenty four);

[0259] In the formula, Represents the Sigmoid mapping function, which is used to map environmental feedback to the (0, 1) interval; is the environmental feedback function used to evaluate the vortex The characteristics of the surrounding environment can be expressed as:

[0260] (25);

[0261] In the formula, Indicates The Hessian matrix of the loss function at each vortex position is used to evaluate local concavity; is the modulus of the gradient, which is used to evaluate the steepness of the parameter space.

[0262] Step S3.14: Simulate the merging and classification phenomenon of vortices in nature to promote the diversity of solution space and explore the parameter region of new parameter space; specifically, set the merging threshold and split threshold , when the distance between two vortices is less than the merging threshold When the strength of a vortex exceeds the splitting threshold, the two current vortices are merged into a new vortex. When , the vortex is split into two new vortices;

[0263] The operation of merging two vortices into a new vortex can be expressed as:

[0264] (26);

[0265] In the formula, Represents the new vortex obtained after merging;

[0266] The operation of splitting a vortex into two new vortices can be expressed as:

[0267] (27);

[0268] In the formula, Indicates that based on A random perturbation vector of a vortex parameter vector is used to generate two new vortex parameter vectors; The first new vortex indicating the split; Indicates the second new vortex that splits.

[0269] Among them, the random perturbation vector The local gradient information based on the current vortex position is generated to increase the randomness and exploration of the search process. The calculation method can be expressed as:

[0270] (28);

[0271] In the formula, and They represent the hyperparameters that control the gradient direction and random perturbation intensity respectively; Indicates in vortex The gradient information calculated at the position; Indicates that the mean is 0 and the covariance matrix is Gaussian noise; in this embodiment, Set to 1.0, Set to 0.1.

[0272] Step S3.15: Through the domain-based search strategy, the best performing vortex is selected, and a local search is performed to adjust the parameter vector of the vortex to simulate the local absorption and energy concentration phenomenon of the vortex in the fluid; specifically, in the domain-based search strategy, the local search method can be expressed as:

[0273] (29);

[0274] In the formula, represents the vortex after local search; represents the first learning rate; Indicates that the mean is 0 and the covariance matrix is The Gaussian distribution of is used to generate random perturbations of the parameter vector; in this embodiment, Set to 0.001.

[0275] Among them, the covariance matrix According to the historical moving direction and speed of the vortex in the parameter space, dynamic adjustment is performed to adapt to different search stages and characteristics. The dynamic adjustment can be expressed as:

[0276] (30);

[0277] In the formula, is the adjusted covariance matrix; is the covariance matrix before adjustment; represents the second learning rate parameter, which is used to control the influence of the historical movement direction of the vortex in the parameter space on the current search stage. Indicates The change of a vortex in T iterations; in this embodiment, Set to 0.005.

[0278] Step S3.16: Attenuate the vortex, simulate the dissipation process of vortex energy in nature, gradually eliminate the vortex with poor performance, and release resources to generate new vortices or vortices with better performance; specifically, the attenuation of the vortex is achieved by adjusting the life value of the vortex. The vortex will be eliminated if its life value is lower than a certain threshold. Set the first The health of a vortex is , then the decay rule of the vortex is:

[0279] (31);

[0280] in, is the health value after the vortex decays; The amount by which the vortex's health is reduced.

[0281] Step S3.17: Repeat S3.2-S3.6 until the vortex optimization neural network reaches a preset maximum number of iterations. After each round of iteration, the state of the vortex is updated and the performance of the vortex is re-evaluated to ensure that the vortex optimization neural network progresses toward the optimal solution; in this embodiment, the maximum number of iterations is 1000 times.

[0282] Step S4: construct a feature dimensionality reduction model, use the features of the expanded data to train the feature dimensionality reduction model, and obtain a trained feature dimensionality reduction model; use the trained feature dimensionality reduction model to reduce the dimensions of the features of the expanded data to obtain the reduced-dimensional features.

[0283] The feature dimensionality reduction model of the present invention adopts an autoencoder neural network based on tensor decomposition and optimization. The neural network integrates tensor decomposition, can effectively process and represent multidimensional data, and better capture multidimensional relationships and patterns in the data; in addition, the present invention adopts a dynamic optimization mechanism to adaptively adjust the parameters in the encoding and decoding processes according to the error feedback in the training process of the autoencoder neural network based on tensor decomposition and optimization.

[0284] The specific process of training the autoencoder neural network based on tensor decomposition and optimization is as follows:

[0285] Step S4.11: Convert the features of the augmented data into tensor format, and use the tensor decomposition capability of the autoencoder neural network based on tensor decomposition and optimization to better represent and process multidimensional data; specifically, set the features of the augmented data to the original tensor ,in, , are the length, width, and height of the original tensor respectively; Represents the dimensions of the original tensor.

[0286] Step S4.12: Initialize all network parameters of the autoencoder neural network based on tensor decomposition and optimization, including the weights and biases of the encoder, the weights and biases of the decoder, and the core tensors of the autoencoder neural network based on tensor decomposition and optimization in the tensor decomposition process; specifically, set the weight matrices of the encoder and the decoder to be and ,in, is the dimension of the feature reduced dimension of the augmented data, and ; Set the bias vectors of the encoder and decoder to and .

[0287] Step S4.13: Input raw tensor First, it is compressed into a low-dimensional representation through the encoder, and then the low-dimensional representation is reconstructed back to the original data space through the decoder; specifically, given the original tensor , first pass the encoder to transform the original tensor Mapped to a low-dimensional feature space, the encoding is obtained , expressed as:

[0288] (32);

[0289] In the formula, is the ReLU activation function.

[0290] coding Reconstructed into a reconstructed tensor through the decoder , which can be expressed as:

[0291] (33);

[0292] Among them, the weight of the encoder The calculation is done by minimizing the original data (i.e., the features of the augmented data) and the reconstructed data (i.e., the encoding ) to achieve the difference between them; specifically, set the objective function of encoder training , then the difference between the original data and the reconstructed data can be expressed as:

[0293] (34);

[0294] In the formula, represents the Frobenius norm, which is used to measure the difference between matrices; Represents the transpose of the encoder weights.

[0295] Among them, the decoder weight The iterative update aims to minimize the difference between the low-dimensional representation and the reconstructed data, that is, the reconstruction error , the update rule is implemented by gradient descent method, for the reconstruction error Weights for the encoder The partial derivative of is updated, which can be expressed as:

[0296] (35);

[0297] In the formula, represents the learning rate for updating the decoder weights; is the reconstruction error About the encoder weights The partial derivative of represents the updated decoder weight; represents the decoder weights before update.

[0298] Step S4.14: Calculate the reconstruction error by comparing the reconstructed data with the original data , using the back propagation algorithm based on the reconstruction error To update the parameters of the autoencoder neural network based on tensor decomposition and optimization; specifically, the mean square error is used to calculate the original tensor and reconstruct the tensor The difference between them can be expressed as:

[0299] (36);

[0300] In the formula, and Respectively represent the dimensions of the original tensor before reconstruction and the dimensions of the original tensor after reconstruction; by calculating the reconstruction error The partial derivatives of all the parameters of the encoder to update the encoder parameters.

[0301] Step S4.15: Based on the reconstruction error The feedback of the encoder and decoder is used to dynamically adjust the parameters of the encoder and decoder in the encoding and decoding process to optimize the performance of the encoder; specifically, the adjustment factor is used According to the reconstruction error of the current iteration Size, dynamically adjust the learning rate of the encoder, which can be expressed as:

[0302] (37);

[0303] In the formula, is the initial learning rate of the encoder; To adjust the sensitivity parameter; in this embodiment, Set to 0.01.

[0304] Step S4.16: In the training process of the autoencoder neural network based on tensor decomposition and optimization, a meta-learning strategy is used to improve the generalization ability of the autoencoder neural network based on tensor decomposition and optimization; specifically, the objective function of the meta-learning strategy is set as , Based on a set of new training tasks The cumulative reconstruction error can be expressed as:

[0305] (38);

[0306] In the formula, Indicates The reconstruction error of the training task;

[0307] Gradient descent is used to update the objective function of the meta-learning strategy, which can be expressed as:

[0308] (39);

[0309] In the formula, represents the set of parameters of the encoder in the meta-learning strategy; The learning rate representing the objective function of the meta-learning strategy; represents the parameters of the encoder in the updated meta-learning strategy; represents the parameters of the encoder in the meta-learning strategy before updating; Represents the gradient of the loss function with respect to the encoder parameter update process in the meta-learning strategy.

[0310] The training set is divided into multiple batches for training. Each training batch is used as a training task, and the error between training tasks is dynamically adjusted. , which can be expressed as:

[0311] (40);

[0312] In the formula, is the learning rate of the objective function of the initial meta-learning strategy; is an adjustment function; in this embodiment, the adjustment function uses a sigmoid function to ensure The value of is within a reasonable range; Represents the total error accumulated when the objective function of the meta-learning strategy is updated; in this embodiment Set to 0.01.

[0313] Step S4.17: Repeat the iteration steps S4.12 to S4.16 until the autoencoder neural network based on tensor decomposition and optimization meets the preset maximum number of iterations; in this embodiment, the maximum number of iterations is set to 1000 times.

[0314] Step S5: construct a classifier, and use the features after dimensionality reduction to train the classifier to obtain a trained classifier;

[0315] The classifier of the present invention adopts an extreme learning machine classification algorithm based on a covariate matrix. The classification algorithm adopts an adaptive mechanism to dynamically adjust the parameters of the covariate matrix and the extreme learning machine to adapt to changes in characteristics of different carbon emission data, thereby improving its own generalization ability.

[0316] The specific process of using the reduced-dimensional features to train the extreme learning machine classification algorithm based on the covariate matrix is ​​as follows:

[0317] Step S5.11: Assume that the feature set after dimensionality reduction is ,in, Represents the number of data, each feature vector after dimensionality reduction Corresponding to the data of a training extreme learning machine classification algorithm based on the covariate matrix, the target output vector set is ,in, yes The corresponding classification label.

[0318] Set the initial parameters of the extreme learning machine classification algorithm based on the covariate matrix, including the number of hidden layer nodes, the initial covariate matrix structure and the learning rate; in this embodiment, the number of hidden layer nodes is set to ; Specifically, initialize the number of hidden layer nodes of the extreme learning machine classification algorithm based on the covariate matrix , weight matrix and the bias vector , where the weight matrix of the extreme learning machine classification algorithm based on the covariate matrix is The dimension is , Represents the dimension of the input features, the bias vector of the extreme learning machine classification algorithm based on the covariate matrix The dimension is , then the weight matrix and the bias vector The initialization method can be expressed as:

[0319] (41);

[0320] (42);

[0321] In the formula, Indicates the generation of a A random matrix.

[0322] Step S5.12: Set the reduced feature set Input the extreme learning machine classification algorithm based on the covariate matrix to obtain the target output vector set ;

[0323] The activation value of each hidden layer node and the prediction result of the output layer in the extreme learning machine classification algorithm based on the covariate matrix are calculated; specifically, the method of calculating the activation value of each hidden layer node and the prediction result of the output layer can be expressed as:

[0324] (43);

[0325] In the formula, is the Sigmoid activation function.

[0326] Step S5.13: Preset an adaptive strategy to analyze the training performance of the extreme learning machine classification algorithm based on the covariate matrix, including classification accuracy and error rate; if the performance of the extreme learning machine classification algorithm based on the covariate matrix does not meet the expected goal, adjust the number of hidden layer nodes and the structure of the covariate matrix according to the feedback results of the extreme learning machine classification algorithm based on the covariate matrix during the training process; specifically, dynamically adjust according to the performance feedback of the extreme learning machine classification algorithm based on the covariate matrix during the training process. and The size and value of the performance evaluation function ,in, is the predicted output of the output layer, calculating the performance of the extreme learning machine classification algorithm based on the covariate matrix and adjusting it according to performance feedback , which can be expressed as:

[0327] (44);

[0328] (45);

[0329] In the formula, Indicates that according to the performance evaluation function Determine the amount of adjustment for the extreme learning machine classification algorithm based on the covariate matrix; Indicates adjustment strategy; Indicates the number of hidden layer nodes after dynamic adjustment; Represents the weight of the dynamically adjusted extreme learning machine classification algorithm based on the covariate matrix;

[0330] in, The function calculation based on the difference between the performance of the current extreme learning machine classification algorithm based on the covariate matrix and the expected performance of the current extreme learning machine classification algorithm based on the covariate matrix can be expressed as:

[0331] (46);

[0332] In the formula, represents the parameter for adjusting sensitivity; and They respectively represent the expected performance index of the current extreme learning machine classification algorithm based on the covariate matrix and the performance index of the current extreme learning machine classification algorithm based on the covariate matrix; in this embodiment, the sensitivity parameter is adjusted is 0.1.

[0333] Step S5.14: Use the back propagation algorithm to calculate the reconstruction error of the extreme learning machine classification algorithm based on the covariate matrix, and update the parameters of the extreme learning machine classification algorithm based on the covariate matrix according to the reconstruction error result, including weights and biases; specifically, use the error back propagation algorithm to update the weights of the extreme learning machine classification algorithm based on the covariate matrix and bias , reconstruction error , then the update method of weights and biases can be expressed as:

[0334] (47);

[0335] (48);

[0336] In the formula, represents the learning rate of the extreme learning machine classification algorithm based on the covariate matrix; represents the weight update gradient; represents the bias update gradient; in this embodiment, Set to 0.01.

[0337] Among them, the weight update gradient is calculated It can be expressed as:

[0338] (49);

[0339] In the formula, represents the transpose of the hidden layer output; Represents the error between the predicted result of the output layer and the actual target.

[0340] Among them, the calculation bias update gradient It can be expressed as:

[0341] (50);

[0342] In the formula, and Representing the predicted output and actual target of a single data respectively, the summation operation traverses all training data to calculate the total gradient of the extreme learning machine classification algorithm bias.

[0343] Step S5.15: Repeat steps S5.12 to S5.14 until the maximum number of iterations preset for the extreme learning machine classification algorithm based on the covariate matrix is ​​reached; in this embodiment, the maximum number of iterations preset is set to 1000 times.

[0344] Step S6: Apply the trained feature extraction model, the trained feature dimension reduction model, and the trained classifier to blockchain storage.

[0345] Specifically, based on the trained feature extraction model, the trained feature dimensionality reduction model and the trained classifier, the newly collected data is predicted and processed to obtain the prediction result. The prediction result and its related information (such as timestamp, data source, prediction accuracy index, etc.) are then encoded into a blockchain transaction, and the encoded blockchain transaction is broadcast to all nodes through the blockchain network, waiting for verification and confirmation. After the verification and confirmation are completed, the encoded blockchain transaction is added to a new block on the blockchain for permanent storage.

[0346] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A carbon emission monitoring method based on blockchain, characterized in that: The steps include: Step S1: collect monitoring data through carbon emission monitoring equipment to build an original carbon emission monitoring data set, and annotate the collected data. The annotated categories are divided into two categories: normal emission and abnormal emission; Step S2: using the trained enhanced nonlinear mixed integer programming SMOTE algorithm to expand the collected data; The enhanced nonlinear mixed integer programming SMOTE algorithm is achieved by introducing nonlinear mixed integer programming into the data generation process in the SMOTE algorithm. In addition, an adaptive adjustment mechanism is adopted in the enhanced nonlinear mixed integer programming SMOTE algorithm. Step S3: construct a feature extraction model, use the augmented data to train the feature extraction model to obtain a trained feature extraction model, and use the trained feature extraction model to extract features of the augmented data; The feature extraction model uses a vortex optimization neural network, which optimizes its own parameters by simulating the formation, evolution and dissipation process of the vortex; Step S4: construct a feature dimensionality reduction model, use the features of the augmented data to train the feature dimensionality reduction model, and obtain a trained feature dimensionality reduction model; use the trained feature dimensionality reduction model to reduce the dimensions of the features of the augmented data, and obtain features after dimensionality reduction; The feature dimension reduction model adopts an autoencoder neural network based on tensor decomposition and optimization, and also adopts a dynamic optimization mechanism to adaptively adjust the parameters in the encoding and decoding processes according to the error feedback in the training process of the autoencoder neural network based on tensor decomposition and optimization; Step S5: construct a classifier, and use the features after dimensionality reduction to train the classifier to obtain a trained classifier; The classifier adopts the extreme learning machine classification algorithm based on the covariate matrix, and the classification algorithm adopts an adaptive mechanism to dynamically adjust the parameters of the covariate matrix and the extreme learning machine; Step S6: Apply the trained feature extraction model, the trained feature dimension reduction model, and the trained classifier to blockchain storage; The process of training the vortex optimization neural network using augmented data is as follows: Step S3.11: randomly generate a set of vortices in the vortex optimization neural network parameter space, each vortex represents a possible parameter vector, including weight w and bias b; specifically, initialize the parameter vector of the vortex optimization neural network , Indicates weights, Indicates bias, during initialization, the parameter vector of each vortex It is randomly generated in the parameter space, conforming to the uniform distribution, and the total number of vortices after initialization is set to , then the initialization process is expressed as: ; In the formula, Represents the parameter vector The initial value of represents uniform distribution; and are the lower and upper bounds of the parameter space respectively; Step S3.12: Calculate the performance of the parameter vector of each vortex on the training set, where the training set is divided from the augmented data according to a certain ratio, and the vortices are sorted according to the performance; specifically, the loss function is used Calculate the performance of the parameter vector of each vortex on the training set, according to the calculated loss function The vortices are sorted by the values ​​of : ; In the formula, represents the loss function of the neural network corresponding to the Nth vortex; Step S3.13: Dynamically update the vortexes, dynamically adjust the positions and intensities of the vortices according to the ranking of the vortex sorting and the distances between the vortices, and simulate the interaction and evolution of the vortices; specifically, in the dynamic update stage of the vortexes, simulate the interaction of the vortices and adjust the positions of the vortices in the parameter space, and set the first Vortex and Vortex The distance between , then Dynamic update of vortex It is expressed as: ; In the formula, is a hyperparameter that adjusts the effect of distance; It is based on The vortex and indivual Regulation function of the distance between vortices; is the adaptive vortex factor; is a regulatory factor based on environmental feedback; Step S3.14: Simulate the merging and classification of vortices in nature; specifically, set the merging threshold and split threshold , when the distance between two vortices is less than the merging threshold When the strength of a vortex exceeds the splitting threshold, the two current vortices are merged into a new vortex. When , the vortex is split into two new vortices; The operation of merging two vortices into a new vortex is expressed as: ; In the formula, Represents the new vortex obtained after merging; The operation of splitting a vortex into two new vortices is expressed as: ; In the formula, Indicates that based on A random perturbation vector of the vortex parameter vector; The first new vortex indicating the split; A second new vortex indicating the split; Step S3.15: Select the best performing vortex through a domain-based search strategy, perform a local search to adjust the parameter vector of the vortex, and simulate the local absorption and energy concentration phenomenon of the vortex in the fluid; specifically, in the domain-based search strategy, the local search method is expressed as: ; In the formula, represents the vortex after local search; represents the first learning rate; Indicates that the mean is 0 and the covariance matrix is Gaussian distribution of Among them, the covariance matrix According to the historical moving direction and speed of the vortex in the parameter space, dynamic adjustment is performed to adapt to different search stages and characteristics. The dynamic adjustment is expressed as: ; In the formula, is the adjusted covariance matrix; is the covariance matrix before adjustment; Represents the second learning rate parameter; Indicates The change of a vortex in T iterations; Step S3.16: The vortex is attenuated by adjusting the life value of the vortex. When the life value of the vortex is lower than a certain threshold, it is eliminated. The health of a vortex is , then the decay rule of the vortex is: ; In the formula, is the health value after the vortex decays; The amount of vortex health reduction; Step S3.17: Repeat steps S3.12 to S3.16 until the vortex optimization neural network reaches a preset maximum number of iterations. After each round of iteration, the state of the vortex is updated and the performance of the vortex is re-evaluated; The specific process of training the autoencoder neural network based on tensor decomposition and optimization is as follows: Step S4.11: Convert the features of the augmented data into a tensor format; specifically, set the features of the augmented data to the original tensor ,in, , are the length, width, and height of the original tensor respectively; Represents the dimension of the original tensor; Step S4.12: Initialize all network parameters of the autoencoder neural network based on tensor decomposition and optimization, including the weights and biases of the encoder, the weights and biases of the decoder, and the core tensors of the autoencoder neural network based on tensor decomposition and optimization in the tensor decomposition process; specifically, set the weight matrices of the encoder and the decoder to be and ,in, is the dimension of the feature reduced dimension of the augmented data, and ; Set the bias vectors of the encoder and decoder to and ; Step S4.13: Input raw tensor First, it is compressed into a low-dimensional representation through the encoder, and then the low-dimensional representation is reconstructed back to the original data space through the decoder; specifically, given the original tensor , first pass the encoder to transform the original tensor Mapped to a low-dimensional feature space, the encoding is obtained , expressed as: ; In the formula, is the ReLU activation function; coding Reconstructed into a reconstructed tensor through the decoder , expressed as: ; Step S4.14: Calculate the reconstruction error by comparing the reconstructed data with the original data , using the back propagation algorithm based on the reconstruction error To update the parameters of the autoencoder neural network based on tensor decomposition and optimization; specifically, the mean square error is used to calculate the original tensor and reconstruct the tensor The difference between them is calculated as: ; In the formula, and Respectively represent the dimensions of the original tensor before reconstruction and the dimensions of the original tensor after reconstruction; by calculating the reconstruction error The partial derivatives of all the parameters of the encoder To update the encoder parameters; Step S4.15: Based on the reconstruction error The feedback of the encoder and decoder is used to dynamically adjust the parameters of the encoder and decoder in the encoding and decoding process to optimize the performance of the encoder; specifically, the adjustment factor is used According to the reconstruction error of the current iteration Size, dynamically adjust the learning rate of the encoder, expressed as: ; In the formula, is the initial learning rate of the encoder; To adjust the sensitivity parameters; Step S4.16: Set the objective function of the meta-learning strategy to , Based on a set of new training tasks The cumulative reconstruction error is expressed as: ; In the formula, Indicates The reconstruction error of the training task; Gradient descent is used to update the objective function of the meta-learning strategy, which is expressed as: ; In the formula, represents the set of parameters of the encoder in the meta-learning strategy; The learning rate representing the objective function of the meta-learning strategy; represents the parameters of the encoder in the updated meta-learning strategy; represents the parameters of the encoder in the meta-learning strategy before updating; Represents the gradient of the loss function of the encoder parameter update process in the meta-learning strategy; The training set is divided into multiple batches for training. Each training batch is used as a training task, and the error between training tasks is dynamically adjusted. , expressed as: ; In the formula, is the learning rate of the objective function of the initial meta-learning strategy; To adjust the function; Step S4.17: Repeat the iteration steps S4.12 to S4.16 until the autoencoder neural network based on tensor decomposition and optimization meets the preset maximum number of iterations; The specific process of using the reduced-dimensional features to train the extreme learning machine classification algorithm based on the covariate matrix is ​​as follows: Step S5.11: Assume that the feature set after dimensionality reduction is ,in, Represents the number of data, each feature vector after dimensionality reduction Corresponding to the data of a training extreme learning machine classification algorithm based on the covariate matrix, the target output vector set is ,in, yes The corresponding classification label; Set the initial parameters of the extreme learning machine classification algorithm based on the covariate matrix, including the number of hidden layer nodes, the initial covariate matrix structure and the learning rate; specifically, initialize the number of hidden layer nodes of the extreme learning machine classification algorithm based on the covariate matrix , weight matrix and the bias vector , where the weight matrix of the extreme learning machine classification algorithm based on the covariate matrix is The dimension is , Represents the dimension of the input features, the bias vector of the extreme learning machine classification algorithm based on the covariate matrix The dimension is , then the weight matrix and the bias vector The initialization method is expressed as: ; ; In the formula, Indicates the generation of a A random matrix of Step S5.12: Set the reduced feature set Input the extreme learning machine classification algorithm based on the covariate matrix to obtain the target output vector set ; The activation value of each hidden layer node and the prediction result of the output layer in the extreme learning machine classification algorithm based on the covariate matrix are calculated; specifically, the method of calculating the activation value of each hidden layer node and the prediction result of the output layer is expressed as: ; In the formula, is the Sigmoid activation function; Step S5.13: Preset an adaptive strategy to analyze the training performance of the extreme learning machine classification algorithm based on the covariate matrix, including classification accuracy and error rate; when the performance of the extreme learning machine classification algorithm based on the covariate matrix does not reach the expected goal, adjust the number of hidden layer nodes and the structure of the covariate matrix according to the feedback results of the extreme learning machine classification algorithm based on the covariate matrix during the training process; specifically, dynamically adjust according to the performance feedback of the extreme learning machine classification algorithm based on the covariate matrix during the training process. and The size and value of the performance evaluation function ,in, is the predicted output of the output layer, calculates the performance of the extreme learning machine classification algorithm based on the covariate matrix, and adjusts it according to performance feedback , expressed as: ; ; In the formula, Indicates that according to the performance evaluation function Determine the amount of adjustment for the extreme learning machine classification algorithm based on the covariate matrix; Indicates adjustment strategy; Indicates the number of hidden layer nodes after dynamic adjustment; Represents the weight of the dynamically adjusted extreme learning machine classification algorithm based on the covariate matrix; Step S5.14: Use the back propagation algorithm to calculate the reconstruction error of the extreme learning machine classification algorithm based on the covariate matrix, and update the parameters of the extreme learning machine classification algorithm based on the covariate matrix according to the reconstruction error result, including weights and biases; specifically, use the error back propagation algorithm to update the weights of the extreme learning machine classification algorithm based on the covariate matrix and bias , reconstruction error , then the update method of weights and biases is expressed as: ; ; In the formula, represents the learning rate of the extreme learning machine classification algorithm based on the covariate matrix; represents the weight update gradient; represents the bias update gradient; Step S5.15: repeating steps S5.12 to S5.14 until the maximum number of iterations preset by the extreme learning machine classification algorithm based on the covariate matrix is ​​reached; Among them, based on The vortex and The adjustment function of the distance between vortices The calculation method uses an exponential decay model to reflect the characteristics of the interaction force between vortices weakening with increasing distance, which is expressed as: ; In the formula, and denote the first vortex influence hyperparameter and the second vortex influence hyperparameter, respectively; Among them, The vortex and The distance between the vortices It is calculated based on the Euclidean distance of its own parameter vector and is expressed as: ; In the formula, represents the dimension of the parameter vector; and Respectively The vortex and The vortex in dimensional parameter vector value; Among them, the adaptive vortex factor The information entropy of the vortex distribution is calculated by adaptive vortex guided learning. for: ; In the formula, Indicates The proportion of a vortex in all vortices is calculated by the inverse of the vortex loss function and is expressed as: ; In the formula, Indicates The loss function of the neural network corresponding to each vortex; Among them, according to the information entropy of vortex distribution The adaptive vortex factor The search strategy for adjusting the vortex is calculated as: ; In the formula, Indicates a preset maximum adjustment strength; is the maximum information entropy value that can be achieved theoretically; represents the momentum adjustment factor; Indicates The vortex in the recent The average momentum vector in iterations; Among them, the momentum adjustment factor and the average momentum vector It is obtained by adjusting the time series momentum and calculating the The vortex in the recent The average momentum vector in iterations It is expressed as: ; In the formula, Indicates The parameter vector of the vortex after the tth iteration; Indicates The vortex in The parameter vector after iterations; Defining the Momentum Adjustment Factor It is used to measure the size and consistency of the average momentum vector and is expressed as: ; In the formula, for and The angle between Among them, the regulatory factors based on environmental feedback The calculation method is expressed as: ; In the formula, Represents the Sigmoid mapping function; is the environmental feedback function, and its calculation method is expressed as: ; In the formula, Indicates The Hessian matrix of the loss function at the vortex position; is the modulus of the gradient; Among them, the random perturbation vector Based on the local gradient information of the current vortex position, the calculation method is expressed as: ; In the formula, and They represent the hyperparameters that control the gradient direction and random perturbation intensity respectively; Indicates in vortex The gradient information calculated at the position; Indicates that the mean is 0 and the covariance matrix is Gaussian noise; Among them, the weight of the encoder The calculation is done by minimizing the features of the original data, i.e. the augmented data, and the reconstructed data, i.e. the encoding Specifically, the objective function of encoder training is set , then the difference between the original data and the reconstructed data is calculated as: ; In the formula, represents the Frobenius norm; represents the transpose of the encoder weights; Among them, the decoder weight The iterative update aims to minimize the difference between the low-dimensional representation and the reconstructed data, that is, the reconstruction error , the update rule is implemented by gradient descent method, for the reconstruction error Weights for the encoder The partial derivative of is updated, expressed as: ; In the formula, represents the learning rate for updating the decoder weights; is the reconstruction error About the encoder weights The partial derivative of represents the updated decoder weight; represents the decoder weight before updating; in, The function calculation based on the difference between the performance of the current extreme learning machine classification algorithm based on the covariate matrix and the expected performance of the current extreme learning machine classification algorithm based on the covariate matrix is ​​expressed as: ; In the formula, represents the parameter for adjusting sensitivity; and They respectively represent the expected performance index of the current extreme learning machine classification algorithm based on the covariate matrix and the performance index of the current extreme learning machine classification algorithm based on the covariate matrix; Among them, the weight update gradient is calculated It is expressed as: ; In the formula, represents the transpose of the hidden layer output; Represents the error between the output layer prediction and the actual target; Among them, the calculation bias update gradient It is expressed as: ; In the formula, and Represent the predicted output and actual target of a single data respectively.

2. The blockchain-based carbon emission monitoring method according to claim 1 is characterized in that: The specific process of obtaining the trained enhanced nonlinear mixed integer programming SMOTE algorithm is as follows: Step S2.11: Analyze the original carbon emission monitoring data set, where the analysis includes the distribution and category imbalance of the original carbon emission monitoring data set. Specifically, define the feature vector of the original carbon emission monitoring data set as ,in, Indicates features, calculate the mean of the feature vector of the original carbon emission monitoring data set and standard deviation To evaluate the distribution of the original carbon emission monitoring data set, it is expressed as: ; ; In the formula, Indicates the number of features in each feature vector; Step S2.12: Set the constraints of nonlinear mixed integer programming based on the analysis results of the original carbon emission monitoring data set , expressed as: ; In the formula, is the mean of the feature vector of the original carbon emission monitoring dataset after data expansion; is the standard deviation of the feature vector of the original carbon emission monitoring dataset after data augmentation; Step S2.13: Adopt an adaptive adjustment mechanism to dynamically adjust the data expansion of the original carbon emission monitoring data set, optimize the data production strategy, and adjust the quality control parameters; specifically, define the adjustment parameters of the adaptive adjustment mechanism , where the adjustment parameters of the adaptive adjustment mechanism are Including adjustment parameters for the data expansion of the original carbon emission monitoring data set And the quality control parameters of the original carbon emission monitoring data set , the data production strategy is optimized through a feedback loop, expressed as: ; In the formula, Represents new data generated by the adaptive adjustment mechanism; Data quality assessment of the original carbon emission monitoring dataset after data expansion Function of is the adjustment amount; The class imbalance of the original carbon emission monitoring data set before and after data expansion is set to and , then the adjustment parameters of the adaptive adjustment mechanism are The calculation method is expressed as: ; In the formula, Adjust sensitivity parameters for presets; Step S2.14: Based on the set constraints and adaptive adjustment mechanism of nonlinear mixed integer programming, the enhanced nonlinear mixed integer programming SMOTE algorithm is used to expand the data; specifically, the original carbon emission monitoring data set S is expanded to obtain an expanded data set , by enhancing the nonlinear mixed integer programming SMOTE algorithm to generate new data, that is, augmented data, each augmented data From the original data That is, the data in the original carbon emission monitoring data set is generated through nonlinear mixed integer programming, which can be expressed as: ; In the formula, Represents constraints based on and the tuning parameters of the adaptive tuning mechanism The process of generating new data; Step S2.15: Evaluate the quality of the expanded data using a quality evaluation index; specifically, the quality of the expanded data is evaluated using a plurality of quality evaluation indicators. To conduct an assessment, The mth quality evaluation indicator representing the quality of the augmented data; the evaluation function is defined as: ; In the formula, is the function to be evaluated; Represents the quality assessment of the augmented dataset; in calculating the quality assessment of the augmented dataset Consider expanding the dataset Representativeness of internal augmented data and diversity As a quality assessment indicator, Calculated by weighted average: ; In the formula, Indicates the representativeness of the augmented data The weight of the indicator; Indicates the diversity of augmented data The weight of the indicator; Step S2.16: According to the expanded data quality assessment results and the feedback during the training of the enhanced nonlinear mixed integer programming SMOTE algorithm, the enhanced nonlinear mixed integer programming SMOTE algorithm adaptively adjusts the data generation strategy and constraints, and enters the next loop iteration until the preset data expansion amount is reached or the performance of the enhanced nonlinear mixed integer programming SMOTE algorithm meets the requirements; specifically, the adaptive adjustment of the data generation strategy and constraints is expressed as: ; ; In the formula, Represents new data generated by the adaptive adjustment mechanism; represents the updated constraints; Indicates adjustment parameters The gradient of the loss function; Representing constraints The gradient of the loss function; is the loss function; Represents the training objective of the enhanced nonlinear mixed integer programming SMOTE algorithm; and The learning rate of the adaptive adjustment mechanism; Among them, setting the loss function Tuning parameters relative to the adaptive tuning mechanism The gradient of It is expressed as: ; In the formula, Represents the loss function About the quality assessment of the augmented dataset The partial derivative of Represents the quality assessment of the expanded dataset About the adjustment parameters of the adaptive adjustment mechanism The partial derivative of .

3. The blockchain-based carbon emission monitoring method according to claim 2 is characterized in that: in, The class imbalance of the data in the original carbon emission monitoring dataset is quantitatively evaluated by comparing the ratio of the number of data in each category. The number of data in the normal emission category is , the number of data classified as abnormal emissions is , the data category imbalance in the original carbon emission monitoring dataset It is expressed as: ; Among them, new data The generation is based on the original data The properties of the original data are nonlinearly combined and adjusted. The specific process is as follows: One property of , then the new data The properties of are obtained through nonlinear transformation: ; In the formula, Represents the corresponding attributes of the new data, and According to the constraints and the tuning parameters of the adaptive tuning mechanism Dynamically adjusted coefficient.

4. The blockchain-based carbon emission monitoring method according to claim 1 is characterized in that: The specific process of step S6 is: based on the trained feature extraction model, the trained feature dimensionality reduction model and the trained classifier, the newly collected data is predicted and processed to obtain the prediction result, and then the prediction result and its related information are encoded into a blockchain transaction, and the encoded blockchain transaction is broadcast to all nodes through the blockchain network, waiting for verification and confirmation. After the verification and confirmation are completed, the encoded blockchain transaction is added to a new block on the blockchain for permanent storage.