Method, device, computer device and program product for generating a carbon footprint label for a company
Patent Information
- Application Number
- CN202610798063.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-04
- Publication Date
- 2026-09-25
AI Technical Summary
[0003]在相关技术中,企业碳排标签的生成方式仍以集中取数、离线汇总与周期性静态发布为主,难以适应多主体协同与业务实时化的趋势,存在时效性严重滞后的问题
[0061]上述企业碳排标签的生成方法、装置、计算机设备、计算机可读存储介质和计算机程序产品,首先,获取本地区域目标企业碳排放的相关特征,并对相关特征进行缺失值和异常值的处理,得到本地区域目标企业处理后的相关特征;对处理后的相关特征进行标准化处理,得到本地区域目标企业的标准化特征数据;获取中心服务器下发的本地模型的初始全局参数,基于初始全局参数和标准化特征数据,对本地模型进行训练,计算本地更新参数;将本地更新参数加密后发送至中心服务器,并接收中心服务器发送的全局更新参数;基于全局更新参数,对本地模型进行更新,得到更新后的本地模型;将标准化特征数据输入至更新后的本地模型,得到本地区域目标企业碳排放对应的回归值评分;将回归值评分按照预设方式进行映射,生成目标企业碳排放的等级标签。如此,通过实现多企业联合建模,结合加密机制,确保数据不出域、隐私不泄露,满足多主体协同场景下的合规要求;同时,通过构建统一隐空间并进行跨域分布对齐,有效降低不同企业、不同产线、不同批次之间的数据分布差异,显著提升模型在异构场景下的迁移泛化能力和标签生成精度。
Smart Images

Figure CN122819633A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a method, apparatus, computer equipment, computer-readable storage medium, and computer program product for generating corporate carbon emission labels. Background Technology
[0002] As applications of supply chain carbon transparency, product carbon footprint, and carbon labeling in trading continue to expand, corporate carbon emission labels are gradually transforming from traditional result display tools into crucial data carriers supporting procurement decisions, order allocation, green finance pricing, and dynamic supervision. The industry is placing higher demands on carbon emission labels, requiring them to be cross-enterprise, cross-process, comparable, traceable, and transferable.
[0003] In related technologies, the generation of corporate carbon emission labels still mainly relies on centralized data collection, offline aggregation, and periodic static release, which is difficult to adapt to the trend of multi-entity collaboration and real-time business operations, resulting in a serious time lag. Summary of the Invention
[0004] Therefore, it is necessary to provide a method, apparatus, computer equipment, computer-readable storage medium, and computer program product for generating enterprise carbon emission labels that can improve the accuracy of enterprise carbon emission label generation, in response to the above-mentioned technical problems.
[0005] Firstly, this application provides a method for generating corporate carbon emission labels, including:
[0006] The relevant characteristics of carbon emissions of target enterprises in the local area are obtained, and the missing values and outliers of the relevant characteristics are processed to obtain the processed relevant characteristics of target enterprises in the local area.
[0007] The processed features are standardized to obtain standardized feature data of target enterprises in the local area.
[0008] Obtain the initial global parameters of the local model issued by the central server, train the local model based on the initial global parameters and the standardized feature data, and calculate the local update parameters.
[0009] The local update parameters are encrypted and sent to the central server, and the central server sends global update parameters; the global update parameters are determined by the central server based on the local update parameters of all local regions.
[0010] Based on the global update parameters, the local model is updated to obtain the updated local model;
[0011] The standardized feature data is input into the updated local model to obtain the regression score corresponding to the carbon emissions of the target enterprise in the local area.
[0012] The regression value scores are mapped according to a preset method to generate a carbon emission level label for the target enterprise.
[0013] In one embodiment, the processed relevant features are standardized to obtain standardized feature data of the target enterprise in the local area, including:
[0014] The processed relevant features are then subjected to unit unification processing, data conversion processing, and encoding conversion processing to obtain the converted relevant features.
[0015] The difference between the transformed relevant features and the mean of the transformed relevant features is calculated. The quotient between the difference and the standard deviation of the transformed relevant features is converted into a distribution form to obtain the standardized feature data of the target enterprises in the local area.
[0016] In one embodiment, training the local model based on the initial global parameters and the standardized feature data, and calculating the local update parameters, includes:
[0017] The standardized feature data is input into the local model to calculate the main task loss, maximum mean difference loss, and domain discrimination loss during the training process.
[0018] A joint loss function is constructed based on the main task loss, the maximum mean difference loss, and the domain discrimination loss;
[0019] Based on the joint loss function, local parameters are calculated, and the difference between the local parameters and the initial global parameters is used as the local update parameters.
[0020] In one embodiment, the process of encrypting the local update parameters includes:
[0021] The local update parameters are pruned to obtain the pruned local update parameters;
[0022] The clipped local update parameters are denoised to obtain the denoised local update parameters.
[0023] The noisy local update parameters are converted into ciphertext according to a preset method to obtain the encrypted local update parameters.
[0024] In one embodiment, the step of adding noise to the clipped local update parameters to obtain noisy local update parameters includes:
[0025] Generate a Gaussian noise vector with the same dimensions as the clipped local update parameter;
[0026] The Gaussian noise vector is fused with the clipped local update parameters to obtain the noisy local update parameters.
[0027] In one embodiment, the method further includes:
[0028] Before inputting the standardized feature data into the updated local model, a consistency check is performed between the current version on the local server and the current version on the central server.
[0029] Secondly, this application also provides an apparatus for generating corporate carbon emission labels, comprising:
[0030] The processing module is used to acquire relevant characteristics of carbon emissions of target enterprises in the local area, and to process the missing and outlier values of the relevant characteristics to obtain the processed relevant characteristics of the target enterprises in the local area.
[0031] The processing module is also used to standardize the processed features to obtain standardized feature data of the target enterprise in the local area.
[0032] The calculation module is used to obtain the initial global parameters of the local model issued by the central server, train the local model based on the initial global parameters and the standardized feature data, and calculate the local update parameters.
[0033] The receiving module is used to encrypt the local update parameters and send them to the central server, and to receive the global update parameters sent by the central server; the global update parameters are determined by the central server based on the local update parameters of all local regions.
[0034] The update module is used to update the local model based on the global update parameters to obtain the updated local model;
[0035] The input module is used to input the standardized feature data into the updated local model to obtain the regression score corresponding to the carbon emissions of the target enterprise in the local area.
[0036] The generation module is used to map the regression value scores according to a preset method to generate a carbon emission level label for the target enterprise.
[0037] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0038] The relevant characteristics of carbon emissions of target enterprises in the local area are obtained, and the missing values and outliers of the relevant characteristics are processed to obtain the processed relevant characteristics of target enterprises in the local area.
[0039] The processed features are standardized to obtain standardized feature data of target enterprises in the local area.
[0040] Obtain the initial global parameters of the local model issued by the central server, train the local model based on the initial global parameters and the standardized feature data, and calculate the local update parameters.
[0041] The local update parameters are encrypted and sent to the central server, and the central server sends global update parameters; the global update parameters are determined by the central server based on the local update parameters of all local regions.
[0042] Based on the global update parameters, the local model is updated to obtain the updated local model;
[0043] The standardized feature data is input into the updated local model to obtain the regression score corresponding to the carbon emissions of the target enterprise in the local area.
[0044] The regression scores are mapped according to a preset method to generate a carbon emission level label for the target enterprise.
[0045] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0046] The relevant characteristics of carbon emissions of target enterprises in the local area are obtained, and the missing values and outliers of the relevant characteristics are processed to obtain the processed relevant characteristics of target enterprises in the local area.
[0047] The processed features are standardized to obtain standardized feature data of target enterprises in the local area.
[0048] Obtain the initial global parameters of the local model issued by the central server, train the local model based on the initial global parameters and the standardized feature data, and calculate the local update parameters.
[0049] The local update parameters are encrypted and sent to the central server, and the central server sends global update parameters; the global update parameters are determined by the central server based on the local update parameters of all local regions.
[0050] Based on the global update parameters, the local model is updated to obtain the updated local model;
[0051] The standardized feature data is input into the updated local model to obtain the regression score corresponding to the carbon emissions of the target enterprise in the local area.
[0052] The regression scores are mapped according to a preset method to generate a carbon emission level label for the target enterprise.
[0053] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:
[0054] The relevant characteristics of carbon emissions of target enterprises in the local area are obtained, and the missing values and outliers of the relevant characteristics are processed to obtain the processed relevant characteristics of target enterprises in the local area.
[0055] The processed features are standardized to obtain standardized feature data of target enterprises in the local area.
[0056] Obtain the initial global parameters of the local model issued by the central server, train the local model based on the initial global parameters and the standardized feature data, and calculate the local update parameters.
[0057] The local update parameters are encrypted and sent to the central server, and the central server sends global update parameters; the global update parameters are determined by the central server based on the local update parameters of all local regions.
[0058] Based on the global update parameters, the local model is updated to obtain the updated local model;
[0059] The standardized feature data is input into the updated local model to obtain the regression score corresponding to the carbon emissions of the target enterprise in the local area.
[0060] The regression scores are mapped according to a preset method to generate a carbon emission level label for the target enterprise.
[0061] The aforementioned method, apparatus, computer equipment, computer-readable storage medium, and computer program product for generating enterprise carbon emission labels firstly acquire relevant characteristics of carbon emissions of target enterprises in the local area, and process these characteristics for missing and outlier values to obtain processed relevant characteristics of the target enterprises in the local area; then, standardize these processed relevant characteristics to obtain standardized feature data of the target enterprises in the local area; next, acquire the initial global parameters of the local model issued by the central server, train the local model based on the initial global parameters and standardized feature data, and calculate local update parameters; encrypt the local update parameters and send them to the central server, and receive the global update parameters sent by the central server; update the local model based on the global update parameters to obtain the updated local model; input the standardized feature data into the updated local model to obtain the regression score corresponding to the carbon emissions of the target enterprises in the local area; finally, map the regression score according to a preset method to generate a level label for the carbon emissions of the target enterprises. Thus, by enabling multi-enterprise joint modeling and combining it with encryption mechanisms, we can ensure that data does not leave the domain and privacy is not leaked, thus meeting the compliance requirements in multi-entity collaborative scenarios. At the same time, by constructing a unified latent space and performing cross-domain distribution alignment, we can effectively reduce the differences in data distribution between different enterprises, different production lines, and different batches, and significantly improve the model's transfer and generalization capabilities and label generation accuracy in heterogeneous scenarios. Attached Figure Description
[0062] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0063] Figure 1 This is an application environment diagram of a method for generating corporate carbon emission labels in one embodiment;
[0064] Figure 2 This is a flowchart illustrating a method for generating corporate carbon emission labels in one embodiment;
[0065] Figure 3 This is a structural block diagram of a device for generating corporate carbon emission labels in one embodiment;
[0066] Figure 4 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0067] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0068] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.
[0069] The enterprise carbon emission label generation method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or located on the cloud or other network servers. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, drones, low-altitude aircraft, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, projection devices, etc. Portable wearable devices can include smartwatches, smart bracelets, head-mounted devices, etc. Head-mounted devices can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. Server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0070] In one exemplary embodiment, such as Figure 2 As shown, a method for generating corporate carbon emission labels is provided, which can be applied to... Figure 1 Taking server 104 as an example, the explanation includes the following steps 202 to 214. Wherein:
[0071] Step 202: Obtain relevant characteristics of carbon emissions of target enterprises in the local area, and process the missing and outlier values of the relevant characteristics to obtain the processed relevant characteristics of target enterprises in the local area.
[0072] Among them, the relevant features are the raw production / energy consumption and other carbon emission-related data collected from target enterprises in the local area.
[0073] For example, missing values in relevant features are filled by forward imputation or by the mean of the same type, and outliers in relevant features are removed or backfilled by a threshold method based on the mean and standard deviation, thus obtaining the processed relevant features of the target enterprise in the local area.
[0074] Step 204: Standardize the processed features to obtain standardized feature data of target enterprises in the local area.
[0075] Optionally, the processed features can be standardized or normalized to obtain standardized feature data of the target enterprises in the local area.
[0076] Step 206: Obtain the initial global parameters of the local model issued by the central server, train the local model based on the initial global parameters and standardized feature data, and calculate the local update parameters.
[0077] For example, the initial global parameters of the local model are obtained from the central server, and the local model is trained based on the initial global parameters and standardized feature data. After training is completed, the local update parameters are determined.
[0078] Step 208: Encrypt the local update parameters and send them to the central server, and receive the global update parameters sent by the central server.
[0079] The global update parameters are determined by the central server based on the local update parameters of all local regions.
[0080] Optionally, the local update parameters are encrypted and sent to the central server, and the central server is received with global update parameters determined by all regions based on the local update parameters.
[0081] In some embodiments, the central server will also , The preset threshold is sent to the local area along with the global update parameters.
[0082] In some embodiments, the central server determines the global update parameters based on the local update parameters of all regions through federated optimization (FedAvg), as shown in the following formula.
[0083]
[0084] in, Let be the set of local regions participating in the t-th round of sampling. Let be the sample size of the i-th power. Participate in local updates.
[0085] In some embodiments, cross-domain consistency needs to be verified before sending global update parameters to the local region. If the value is below the preset threshold, the global update parameters are sent to the local region to verify that the main task error and cross-domain consistency are both taken into account. The specific formula is shown below.
[0086]
[0087] in, To preset weights, Implicit representation of source / target domain, The model output for both domains on the validation set. This is an unbiased estimator.
[0088] In some embodiments, the local region selected by the central server must meet the minimum participation frequency constraint, as shown in the following formula.
[0089]
[0090] in, For indicator functions, For the set of local regions selected in the t-th round, The minimum participation rate is set, and if this requirement is not met, the priority of sampling in the corresponding local area will be increased in subsequent rounds.
[0091] Step 210: Update the local model based on the global update parameters to obtain the updated local model.
[0092] For example, the local model is updated based on the global update parameters sent by the central server to obtain the updated local model.
[0093] Step 212: Input the standardized feature data into the updated local model to obtain the regression score corresponding to the carbon emissions of the target enterprises in the local area.
[0094] Optionally, standardized feature data can be input into the updated local model to obtain regression scores corresponding to the carbon emissions of target enterprises in the local area.
[0095] Step 214: Map the regression value scores according to a preset method to generate a carbon emission level label for the target enterprise.
[0096] For example, the regression score is mapped according to a preset method to generate a carbon emission level label for the target enterprise.
[0097] In some embodiments, the default method is to determine the carbon emission level label corresponding to the target enterprise according to the range of regression value scores, and the specific assessment formula is shown below.
[0098]
[0099] Among them, A, B, and C are preset carbon emission level labels. Score the regression values. , This is a preset threshold.
[0100] In some embodiments, The calculation formula is shown below.
[0101]
[0102] in, For quantile functions, W is the length of the value window.
[0103] In other embodiments, the threshold is smoothed when frequent changes in the threshold are not required, as shown in the following formula.
[0104]
[0105] in, This is the estimated value for the current window. This is the effective value of the previous threshold. This is the smoothing coefficient.
[0106] In some embodiments, where calibration is required based on a threshold standard for a proportional target, such as when a local area desires the grade label to be close to the target... Observation ratio within window W Then it can be minimized when the threshold is updated, as shown in the following formula.
[0107]
[0108] in, The proportion of the k-th class within the window. For the target ratio, For calibration purposes.
[0109] In some embodiments, the following conditions are met simultaneously over Q consecutive evaluation periods:
[0110]
[0111] in, The error of the main task in the e-th evaluation is... The relative convergence threshold, To align the threshold, local model training is completed when certain conditions are met.
[0112] The above-mentioned method for generating corporate carbon emission labels involves: acquiring relevant characteristics of carbon emissions of target enterprises in the local area; processing missing and outlier values in these characteristics to obtain processed relevant characteristics; standardizing these processed characteristics to obtain standardized feature data for the target enterprises in the local area; acquiring initial global parameters of the local model from the central server; training the local model based on the initial global parameters and standardized feature data; encrypting the local update parameters and sending them to the central server, and receiving global update parameters from the central server; updating the local model based on the global update parameters to obtain the updated local model; inputting the standardized feature data into the updated local model to obtain regression score corresponding to the carbon emissions of the target enterprises in the local area; and mapping the regression score according to a preset method to generate a level label for the carbon emissions of the target enterprises. Thus, by enabling multi-enterprise joint modeling and combining it with encryption mechanisms, we can ensure that data does not leave the domain and privacy is not leaked, thus meeting the compliance requirements in multi-entity collaborative scenarios. At the same time, by constructing a unified latent space and performing cross-domain distribution alignment, we can effectively reduce the differences in data distribution between different enterprises, different production lines, and different batches, and significantly improve the model's transfer and generalization capabilities and label generation accuracy in heterogeneous scenarios.
[0113] In an exemplary embodiment, the processed relevant features are standardized to obtain standardized feature data of target enterprises in the local area. This includes: performing unit unification processing, data conversion processing, and encoding conversion processing on the processed relevant features to obtain converted relevant features; calculating the difference between the converted relevant features and the mean of the converted relevant features; converting the quotient between the difference and the standard deviation of the converted relevant features into a distribution form to obtain standardized feature data of target enterprises in the local area.
[0114] In practice, the processed relevant features are standardized in terms of units and caliber to obtain the transformed relevant features. The difference between the transformed relevant features and the mean of the transformed relevant features is calculated. The quotient between the difference and the standard deviation of the transformed relevant features is converted into a distribution form to obtain the standardized feature data of the target enterprise in the local area. The specific calculation formula is as follows.
[0115]
[0116] in, Here, x represents the standardized feature data, and x represents the processed relevant features. The mean of the processed relevant features determined by the local sliding window. The standard deviation of the processed relevant features determined for the local sliding window. It is a stable term.
[0117] Among these features, the units and scope are unified to be consistent with the same type of measurement units for relevant characteristics in all regions, the power and energy conversion is clear, and the Boolean / enumeration fields are deterministically encoded.
[0118] In some embodiments, the processed relevant features can also be normalized to obtain standardized feature data, and the specific calculation formula is shown below.
[0119]
[0120] in, Here, x represents the standardized feature data, and x represents the processed relevant features. The minimum value among the processed relevant features. The maximum value among the relevant features after processing. It is a stable term.
[0121] In some embodiments, when new data is accessed, online updates are performed using sliding statistics, and the specific update formula is shown below.
[0122]
[0123] in, Let be the mean of the relevant features after processing at time t. Let be the standard deviation of the relevant features after processing at time t. This is the smoothing coefficient.
[0124] exist and continued In the case of a window, freeze the normalization caliber and write the version to the local area.
[0125] In the above embodiments, by normalizing or standardizing, the differences in data dimensions and distribution between different enterprises are eliminated, making heterogeneous data comparable and laying the foundation for cross-domain modeling.
[0126] In an exemplary embodiment, training a local model based on initial global parameters and standardized feature data, and calculating local update parameters, includes: inputting standardized feature data into the local model, calculating the main task loss, maximum mean difference loss, and domain discrimination loss during training; constructing a joint loss function based on the main task loss, maximum mean difference loss, and domain discrimination loss; calculating local parameters based on the joint loss function, and using the difference between the local parameters and the initial global parameters as the local update parameters.
[0127] In practice, the local model includes a feature extractor. and shared predictors Standardized feature data Mapped to the unified latent space Z, the local model output is shown in the following formula.
[0128]
[0129] in, The output of the local model (can be regression values or regression value scores). For local extractor parameters, To share predictor parameters, the initial global parameters are: and .
[0130] The maximum mean difference (MMD) loss during training is calculated using the formula shown below.
[0131]
[0132] in, The implicit representation distribution of the source / target domain. For kernel functions, the smaller the value, the closer the distributions of the two domains are.
[0133] The unbiased estimate of the maximum mean difference is calculated using the formula shown below.
[0134]
[0135] in, This represents the number of samples in the source / target domain.
[0136] The formula for an example of a radially based core is shown below.
[0137]
[0138] in, For the core width, you can choose between median heuristics or grid method.
[0139] In some embodiments, Domain Adversarial Adaptive Neural Network (DANN) is performed, as shown in the following formula.
[0140]
[0141] Where D is the domain discriminator. The main task loss is calculated using squared error for regression and cross-entropy for classification. This is a weighting factor.
[0142] Based on the main task loss, maximum mean difference loss, and domain discrimination loss, a weighted sum is performed to construct a joint loss function. The specific formula of the regression is shown below.
[0143]
[0144] The specific formula for the classification is shown below.
[0145]
[0146] Where M is the batch size. Here, CE represents the loss weights, and CE represents the cross-entropy. To predict probabilities, To determine the loss in the domain.
[0147] Based on the joint loss function, the gradient of the joint loss with respect to the local model is calculated. The gradient descent method is used to update the initial global parameters to obtain the local parameters. The difference between the local parameters and the initial global parameters is used as the local update parameters.
[0148] In the above embodiments, the difference between the local parameters and the initial global parameters is used as the update parameter for uploading. This preserves the knowledge increment gained in this round of training, facilitates weighted aggregation by the central server, and provides a unified processing object for subsequent differential privacy noise addition and homomorphic encryption. This design effectively improves the consistency, stability, and accuracy of cross-enterprise carbon emission label generation while protecting data privacy.
[0149] In an exemplary embodiment, the process of encrypting the local update parameters includes: trimming the local update parameters to obtain trimmed local update parameters; adding noise to the trimmed local update parameters to obtain noisy local update parameters; and converting the noisy local update parameters into ciphertext according to a preset method to obtain encrypted local update parameters.
[0150] In practice, the local update parameters are pruned to obtain pruned local update parameters; the pruned local update parameters are then denoised to obtain denoised local update parameters; the denoised local update parameters are then converted into ciphertext according to a preset method to obtain encrypted local update parameters, as shown in the following formula.
[0151]
[0152] in, For the local update parameters of the i-th local region in round t, This represents the additive homomorphic encryption operator. This is a homomorphic addition.
[0153] In some embodiments, differential privacy upload and budget accounting can also be performed on locally updated parameters, as shown in the following formula.
[0154]
[0155] Where C is the pruning threshold, used to limit the sensitivity of unilateral updates. Noise figure To meet - Differential privacy upload volume, It is zero-mean Gaussian noise.
[0156] The formula for calculating the overall privacy budget cap is as follows.
[0157]
[0158] Where T is the update cycle of the global parameters. For single-round privacy loss, This represents the failure probability.
[0159] In one embodiment, given a pruning threshold C and a target single-round privacy loss... In the case of noise figure Should follow The choices are monotonically decreasing, and the combination satisfies the aforementioned total budget. Not exceeding the upper limit threshold The specific formula is shown below.
[0160]
[0161] in, The upper limit is the total budget allowed.
[0162] In the above embodiments, through differential privacy cropping and noise addition processing, as well as optional homomorphic encryption mechanisms, attackers or central servers can effectively prevent the original data, gradients, or any recoverable intermediate representation of the enterprise from the uploaded parameter increments, fundamentally protecting the data privacy and trade secrets of all participating parties and meeting regulatory compliance requirements.
[0163] In an exemplary embodiment, the clipped local update parameters are subjected to noise processing to obtain noisy local update parameters, including: generating a Gaussian noise vector with the same dimension as the clipped local update parameters; and fusing the Gaussian noise vector with the clipped local update parameters to obtain noisy local update parameters.
[0164] In practice, a Gaussian noise vector with the same dimension as the clipped local update parameters is generated; the Gaussian noise vector is then fused with the clipped local update parameters to obtain the noisy local update parameters.
[0165] In the above embodiments, by adding noise to the locally updated parameters, a controllable random perturbation is injected into the parameter increment of each participant without significantly affecting the model aggregation accuracy, thereby achieving strict differential privacy protection.
[0166] In one exemplary embodiment, the method for generating enterprise carbon emission labels further includes: performing a consistency check between the current version on the local server and the current version on the central server before inputting standardized feature data into the updated local model.
[0167] In practice, before inputting standardized feature data into the updated local model, the current version on the local server is checked for consistency with the current version on the central server. If the consistency check passes, the standardized feature data is input into the updated local model for data processing.
[0168] In the above embodiments, consistency verification ensures that all participating companies use the exact same model parameters, normalization criteria, and threshold mapping rules during inference, thereby eliminating the problem of incomparable and unreproducible label results caused by version inconsistencies.
[0169] To illustrate the method for generating corporate carbon emission labels in this application in detail, an embodiment is provided below. For example, this application describes a method for generating corporate carbon emission labels in a specific scenario.
[0170] First, the three companies collected relevant features at 15-minute sampling intervals; each company completed the standardization and normalization locally; the central server then distributed the initial parameters. With threshold .
[0171] No. In one round, the center samples several local regions to participate: each local region executes the procedure locally. Each round generates local update parameters. After cropping and adding noise (homomorphic encryption if necessary), upload; the center aggregates according to FedAvg to obtain... And evaluate on a public validation set. Errors compared to the main task; if the target is met, release a new version; otherwise, roll back and fine-tune the loss weights.
[0172] Launching the first After a statistical period, use the window within Estimating quantile functions renew The new threshold is released and bound to a version by the central server, and takes effect uniformly across all participating parties.
[0173] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.
[0174] Based on the same inventive concept, this application also provides an apparatus for generating corporate carbon emission labels to implement the above-described method for generating corporate carbon emission labels. The solution provided by this apparatus is similar to the solution described in the above-described method. Therefore, the specific limitations in one or more embodiments of the corporate carbon emission label generation apparatus provided below can be found in the limitations of the corporate carbon emission label generation method described above, and will not be repeated here.
[0175] In one exemplary embodiment, such as Figure 3 As shown, a device for generating corporate carbon emission labels is provided, comprising: a processing module 301, a calculation module 302, a receiving module 303, an updating module 304, an input module 305, and a generation module 306, wherein:
[0176] The processing module is used to obtain relevant characteristics of carbon emissions of target enterprises in the local area, and to process the missing and outlier values of the relevant characteristics to obtain the processed relevant characteristics of the target enterprises in the local area.
[0177] The processing module is also used to standardize the processed features to obtain standardized feature data of the target enterprise in the local area.
[0178] The calculation module is used to obtain the initial global parameters of the local model issued by the central server, train the local model based on the initial global parameters and the standardized feature data, and calculate the local update parameters.
[0179] The receiving module is used to encrypt the local update parameters and send them to the central server, and to receive the global update parameters sent by the central server; the global update parameters are determined by the central server based on the local update parameters of all local areas.
[0180] The update module is used to update the local model based on the global update parameters to obtain the updated local model.
[0181] The input module is used to input the standardized feature data into the updated local model to obtain the regression score corresponding to the carbon emissions of target enterprises in the local area.
[0182] The generation module is used to map the regression value scores according to a preset method to generate a carbon emission level label for the target enterprise.
[0183] Each module in the aforementioned carbon emission label generation device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0184] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 4 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a method for generating corporate carbon emission labels.
[0185] The display unit of this computer device is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of this computer device can be a touch layer covering the display screen, or buttons, a trackball, or a touchpad set on the casing of the computer device, or an external keyboard, touchpad, or mouse, etc.
[0186] Those skilled in the art will understand that Figure 4The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0187] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0188] The relevant characteristics of carbon emissions of target enterprises in the local area are obtained, and the missing values and outliers of the relevant characteristics are processed to obtain the processed relevant characteristics of target enterprises in the local area.
[0189] The processed features are standardized to obtain standardized feature data of target enterprises in the local area.
[0190] Obtain the initial global parameters of the local model issued by the central server, train the local model based on the initial global parameters and the standardized feature data, and calculate the local update parameters.
[0191] The local update parameters are encrypted and sent to the central server, and the central server sends global update parameters; the global update parameters are determined by the central server based on the local update parameters of all local regions.
[0192] Based on the global update parameters, the local model is updated to obtain the updated local model;
[0193] The standardized feature data is input into the updated local model to obtain the regression score corresponding to the carbon emissions of the target enterprise in the local area.
[0194] The regression value scores are mapped according to a preset method to generate a carbon emission level label for the target enterprise.
[0195] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0196] The relevant characteristics of carbon emissions of target enterprises in the local area are obtained, and the missing values and outliers of the relevant characteristics are processed to obtain the processed relevant characteristics of target enterprises in the local area.
[0197] The processed features are standardized to obtain standardized feature data of target enterprises in the local area.
[0198] Obtain the initial global parameters of the local model issued by the central server, train the local model based on the initial global parameters and the standardized feature data, and calculate the local update parameters.
[0199] The local update parameters are encrypted and sent to the central server, and the central server sends global update parameters; the global update parameters are determined by the central server based on the local update parameters of all local regions.
[0200] Based on the global update parameters, the local model is updated to obtain the updated local model;
[0201] The standardized feature data is input into the updated local model to obtain the regression score corresponding to the carbon emissions of the target enterprise in the local area.
[0202] The regression value scores are mapped according to a preset method to generate a carbon emission level label for the target enterprise.
[0203] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:
[0204] The relevant characteristics of carbon emissions of target enterprises in the local area are obtained, and the missing values and outliers of the relevant characteristics are processed to obtain the processed relevant characteristics of target enterprises in the local area.
[0205] The processed features are standardized to obtain standardized feature data of target enterprises in the local area.
[0206] Obtain the initial global parameters of the local model issued by the central server, train the local model based on the initial global parameters and the standardized feature data, and calculate the local update parameters.
[0207] The local update parameters are encrypted and sent to the central server, and the central server sends global update parameters; the global update parameters are determined by the central server based on the local update parameters of all local regions.
[0208] Based on the global update parameters, the local model is updated to obtain the updated local model;
[0209] The standardized feature data is input into the updated local model to obtain the regression score corresponding to the carbon emissions of the target enterprise in the local area.
[0210] The regression value scores are mapped according to a preset method to generate a carbon emission level label for the target enterprise.
[0211] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0212] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0213] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0214] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for generating corporate carbon emission labels, characterized in that, Applied to a local server, the method includes: The relevant characteristics of carbon emissions of target enterprises in the local area are obtained, and the missing values and outliers of the relevant characteristics are processed to obtain the processed relevant characteristics of target enterprises in the local area. The processed features are standardized to obtain standardized feature data of target enterprises in the local area. Obtain the initial global parameters of the local model issued by the central server, train the local model based on the initial global parameters and the standardized feature data, and calculate the local update parameters. The local update parameters are encrypted and sent to the central server, and the central server sends global update parameters; the global update parameters are determined by the central server based on the local update parameters of all local regions. Based on the global update parameters, the local model is updated to obtain the updated local model; The standardized feature data is input into the updated local model to obtain the regression score corresponding to the carbon emissions of the target enterprise in the local area. The regression scores are mapped according to a preset method to generate a carbon emission level label for the target enterprise.
2. The method according to claim 1, characterized in that, The standardization process for the processed relevant features to obtain standardized feature data of target enterprises in the local area includes: The processed relevant features are then subjected to unit unification, data conversion, and encoding conversion to obtain the converted relevant features. The difference between the transformed relevant features and the mean of the transformed relevant features is calculated. The quotient between the difference and the standard deviation of the transformed relevant features is converted into a distribution form to obtain the standardized feature data of the target enterprises in the local area.
3. The method according to claim 1, characterized in that, The step of training the local model based on the initial global parameters and the standardized feature data, and calculating the local update parameters, includes: The standardized feature data is input into the local model to calculate the main task loss, maximum mean difference loss, and domain discrimination loss during the training process. A joint loss function is constructed based on the main task loss, the maximum mean difference loss, and the domain discrimination loss; Based on the joint loss function, local parameters are calculated, and the difference between the local parameters and the initial global parameters is used as the local update parameters.
4. The method according to claim 1, characterized in that, The process of encrypting the locally updated parameters includes: The local update parameters are pruned to obtain the pruned local update parameters; The clipped local update parameters are denoised to obtain the denoised local update parameters. The noisy local update parameters are converted into ciphertext according to a preset method to obtain the encrypted local update parameters.
5. The method according to claim 4, characterized in that, The step of adding noise to the clipped local update parameters to obtain noisy local update parameters includes: Generate a Gaussian noise vector with the same dimensions as the clipped local update parameter; The Gaussian noise vector is fused with the clipped local update parameters to obtain the noisy local update parameters.
6. The method according to claim 1, characterized in that, The method further includes: Before inputting the standardized feature data into the updated local model, a consistency check is performed between the current version on the local server and the current version on the central server.
7. A device for generating corporate carbon emission labels, characterized in that, The device includes: The processing module is used to acquire relevant characteristics of carbon emissions of target enterprises in the local area, and to process the missing and outlier values of the relevant characteristics to obtain the processed relevant characteristics of the target enterprises in the local area. The processing module is also used to standardize the processed features to obtain standardized feature data of the target enterprise in the local area. The calculation module is used to obtain the initial global parameters of the local model issued by the central server, train the local model based on the initial global parameters and the standardized feature data, and calculate the local update parameters. The receiving module is used to encrypt the local update parameters and send them to the central server, and to receive the global update parameters sent by the central server; the global update parameters are determined by the central server based on the local update parameters of all local regions. The update module is used to update the local model based on the global update parameters to obtain the updated local model; The input module is used to input the standardized feature data into the updated local model to obtain the regression score corresponding to the carbon emissions of the target enterprise in the local area. The generation module is used to map the regression value scores according to a preset method to generate a carbon emission level label for the target enterprise.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.