Model Joint Privacy Training and Sharing Method and Device in Power Dispatching Scenario

By adopting the joint privacy training method of alliance chain technology and decision tree model in the power scheduling scenario, the privacy protection problem of multi-party data sharing in the power scheduling scenario is solved, and the data training volume is expanded without leaking the original feature value, which improves the model fit and prediction accuracy.

CN115293347BActive Publication Date: 2025-08-05ELECTRIC POWER RESEARCH INSTITUTE OF STATE GRID QINGHAI ELECTRIC POWER COMPANY +4
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202210968361.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-12
Publication Date
2025-08-05
Estimated Expiration
2042-08-12

AI Technical Summary

Technical Problem

The existing technology is difficult to conduct joint learning while ensuring the privacy of multiple parties in the power scheduling scenario, especially to solve the joint privacy training generated by the power demand prediction model in the massive data scenario of the power department. The existing methods have the problem of large computing power overhead and the easy-to-break single key distribution agency to be distributed, resulting in privacy leakage.

Method used

The federated learning privacy protection solution is built using alliance chain technology, the power dispatching department is added to the alliance chain, the power consumption data is marked through flow labels, the model training data is built based on the negotiated data feature construction strategy, and the decision tree model is used for training. When sharing the model, it is completed locally through smart contracts to ensure data security.

Benefits of technology

It realizes the expansion of data training volume without revealing privacy, improves model fit, and ensures the security and privacy protection of data sharing through blockchain technology, avoids the leakage of original feature values, and improves the accuracy and security of power scheduling prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115293347B_ABST
    Figure CN115293347B_ABST
Patent Text Reader

Abstract

The disclosed embodiment of the present invention discloses a method and device for joint privacy training and sharing of models in a power dispatching scenario, the method comprising: adding the current power dispatching department to the alliance chain as one of the dispatching participants; obtaining the electricity consumption data flowing through other relevant departments processed by the current power dispatching department during power dispatching, and marking the collected electricity consumption data with flow labels; the flow labels are used to characterize the power flow information corresponding to the electricity consumption data; constructing model training data based on a data feature construction strategy pre-negotiated with other power dispatching departments participating in the alliance chain; training a decision tree model; comparing the decision tree model trained by the current power dispatching department with the decision tree models trained by other power dispatching departments; when the target model is a model trained locally by the current power dispatching department, sharing the target model to the alliance chain through a smart contract locally in the current power dispatching department.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of security technology, and in particular to a method and device for joint privacy training and sharing of models in a power dispatching scenario. Background Art

[0002] To balance the individual electricity demands of different regions and users, projects are emerging across the country to build power dispatching systems that comprehensively consider multiple electricity consumption factors. Power system dispatching is a complex system, whereby numerous power plants provide electricity, distributing it to a wide range of users through transmission, transformation, distribution, and power supply networks. We are currently at the intersection of the digital and energy revolutions. Artificial intelligence, a leading technology in this new digital revolution, combined with power dispatching systems will significantly boost the development and technological advancement of power systems. For example, AI can empower a range of traditional power business scenarios, including demand-side response, optimized dispatching, intelligent operations and maintenance, renewable energy consumption, and power asset management, with more intelligent operational capabilities. As a highly specialized industrial system, power dispatching systems typically comprise a range of power business participants. The interactions between these parties generate a vast amount of data related to power production, dispatching, consumption, and storage. This data serves to connect the interactions among all stakeholders in the power dispatching system and is a crucial component for ensuring its normal operation. However, due to the high level of privacy inherent in the data of each participant in power dispatch, using data from regional power grid systems for traditional centralized machine learning model training presents a significant risk of privacy leakage. However, it should also be noted that power dispatching itself is a highly real-time and regular business. Leveraging AI-trained models to calculate and predict power demand would significantly reduce the burden on power dispatchers.

[0003] Since the introduction of deep learning neural networks in 2006, coupled with recent increases in computing power and the advent of the big data era, artificial intelligence has entered its third peak after two periods of ups and downs. AI has generated significant momentum in manufacturing, travel, home living, education, and other fields, but has performed poorly in privacy-intensive sectors such as finance, healthcare, and electricity. Google proposed federated learning in 2016, enabling joint modeling between different companies without sharing private data. Participants in horizontal federated learning extract data from their respective datasets that share common but unique user characteristics for training. However, in horizontal federated learning, when exchanging feature distribution information, it is still possible for other departments in the alliance to obtain it. During the exchange of model information, gradient information could be leaked, allowing attackers to recover sensitive original training data, which could then be leaked to third parties. Privacy protection remains a significant issue in federated learning.

[0004] In response to the above problems, existing technologies make it difficult to conduct joint learning in the scenario of power dispatch while ensuring the privacy of data from multiple parties. In particular, they are unable to solve the problem of joint privacy training for multiple parties to generate power demand forecast models in the scenario of massive data in the power sector. For example, the patent "A method for protecting the privacy of federated learning based on homomorphic encryption in the Internet of Vehicles" (CN112583575A) proposes a method for protecting the privacy of federated learning in the Internet of Vehicles environment, but this privacy protection method is targeted at the Internet of Vehicles environment and does not take into account what kind of data each participant needs to provide to assist in training in the power dispatch scenario. There are many participants in federated learning, and each party has a small amount of data. However, using homomorphic encryption methods for privacy protection in the power dispatch scenario requires a lot of computing power to encrypt and decrypt data, resulting in overall low efficiency and difficulty in putting it into use. The patent "Federated Learning Privacy Protection Method and System Based on Homomorphic Pseudo-Random Numbers" (CN 112149160 A) proposes a federated learning privacy protection method and system based on homomorphic pseudo-random numbers. This method uses a centralized key generator for key generation and distribution. When the VSS is attacked by an adversary, the entire system may be paralyzed, and the private data of all participants will be leaked, resulting in weak privacy protection security.

[0005] Blockchain is a term used in the field of information technology. Essentially, it is a shared database whose stored data or information possesses characteristics such as "unforgeability," "full traceability," "transparency," and "collective maintenance." Based on these characteristics, blockchain technology establishes a solid foundation of trust, creates a reliable mechanism for cooperation, and possesses broad application prospects. A key feature of blockchain is its distributed data storage and sharing based on distributed ledger technology. This sharing process requires all parties involved in maintaining the ledger to adhere to a specific protocol for updating the database, known as "distributed consensus." Consensus can be established in a variety of ways. Technologies in which a few centralized centers maintain the entire distributed ledger form a "consortium chain." Chains in which no centralized center is identified and all nodes jointly maintain the ledger form a "public chain."

[0006] In power dispatch scenarios, timely and accurate prediction of load peaks and troughs is crucial for stabilizing power supply and reducing power resource waste. Power supply spans all provinces, municipalities, and autonomous regions nationwide, and power dispatch departments, power companies, power plants, and energy storage facilities at all levels store a vast amount of private data. Research indicates that current private data in the power system relies solely on desensitization and encryption, lacking adaptability to big data environments. While privacy protection is easier to achieve in closed environments, small, closed systems are far from sufficient for training predictive models in the power industry. Combining federated learning with privacy-preserving technologies can avoid the information silos that arise in traditional machine learning, making it particularly suitable for power systems, which have multiple data sources and strong privacy requirements. Given the characteristics of data generated by upstream and downstream sectors in the power industry, further strengthening privacy protection is necessary. A decentralized, tamper-proof, independent, and secure solution based on a consortium blockchain is needed to better address the use case of multi-party collaborative prediction in power dispatch. This solution can build a self-sustaining privacy-preserving consortium blockchain network for power dispatch departments, define a federated learning process for power dispatch scenarios, and predict power dispatch events based on trained models, promoting a virtuous cycle in power dispatch.

[0007] In summary, existing technologies have the following shortcomings: (1) There is no model joint privacy training technology optimized for power dispatch machine learning scenarios. Homomorphic encryption of samples is an ideal solution in small-scale multi-user scenarios, but for the massive data generated by power system users, power stations, storage stations, and dispatch centers, homomorphic encryption will generate huge computing power and time overhead. (2) Existing technologies have a single secret key distribution mechanism. Once the secret key distribution mechanism is compromised, it may cause the leakage of the entire federation's private data and models. (3) Existing distributed machine learning requires sharing sample information, which may cause privacy leakage during the sharing process. Summary of the Invention

[0008] The embodiments of the present disclosure provide a method and apparatus for joint privacy training and sharing of a model in a power dispatching scenario.

[0009] In a first aspect, embodiments of the present disclosure provide a method for joint privacy training and sharing of models in a power dispatching scenario, including:

[0010] Add the current power dispatching department to the alliance chain as one of the dispatching participants; the dispatching participants of the alliance chain also include other power dispatching departments;

[0011] Obtaining the electricity consumption data processed by the current power dispatching department and flowing through other relevant departments during power dispatching, and marking the collected electricity consumption data with a flow direction label; the flow direction label is used to represent the power flow direction information corresponding to the electricity consumption data;

[0012] Constructing model training data based on a data feature construction strategy pre-negotiated with other power dispatching departments participating in the alliance chain;

[0013] Training a decision tree model locally at the current power dispatching department using the model training data, pre-negotiated hyperparameters, and number of iterations; the decision tree model is used to predict the power flow direction of the power consumption data;

[0014] Comparing the current decision tree model trained by the power dispatching department with the decision tree models trained by other power dispatching departments, and selecting a target model based on the comparison results;

[0015] When the target model is a model obtained by local training of the current power dispatching department, the target model is shared to the alliance chain through a smart contract locally in the current power dispatching department.

[0016] Furthermore, the method further comprises:

[0017] The hyperparameters and iteration rounds currently provided by the power dispatching department are shared on the consortium chain through a smart contract to negotiate whether to use the hyperparameters and iteration rounds currently provided by the power dispatching department or the hyperparameters and iteration rounds provided by other dispatching participants during model training;

[0018] Furthermore, a strategy for constructing model training data based on data features pre-negotiated with other power dispatching departments participating in the alliance chain includes:

[0019] Based on the data feature construction strategy pre-negotiated with other power dispatching departments participating in the alliance chain, each dimensional feature of the current power dispatching department's electricity consumption data is distributed and bucketed to obtain the bucketed feature data of the electricity consumption data, and the bucketed feature data is used as the model training data of the current power dispatching department.

[0020] Furthermore, the decision tree model is trained locally in the current power dispatching department using the model training data, pre-negotiated model hyperparameters, and number of iterations, including:

[0021] Calculate the target prediction value of the current round based on the predicted target value of the previous round and the model prediction value of the previous round;

[0022] Calculating the first-order derivative and the second-order derivative of the decision subtree generated in the current round based on the target prediction value of the current round and the model training data; the first-order derivative and the second-order derivative are Taylor series expansion parameters based on the decision tree model;

[0023] Recursively splitting the decision tree using the first-order derivative, the second-order derivative, and the model training data to obtain a decision subtree constructed in the current round;

[0024] Using the decision subtree to obtain a model prediction value of the current model training data of the power dispatching department;

[0025] Determining whether an iteration termination condition is met based on the model prediction value and the prediction target value of the current round;

[0026] If the iteration termination condition is not met, jump to the step of calculating the target prediction value of the current round based on the prediction target value of the previous round and the model prediction value of the previous round, and repeat until the iteration termination condition is met;

[0027] The decision subtree obtained from multiple rounds of iterations is used as the trained decision tree model.

[0028] Furthermore, the decision tree is recursively split using the first-order derivative, the second-order derivative, and the model training data to obtain a decision subtree constructed in the current round, including:

[0029] Randomly select part of the data from the current model training data of the power dispatching department to construct a bucket information gain histogram;

[0030] Merge the bucket information gain histogram corresponding to the current power dispatching department with the bucket information gain histograms corresponding to other power dispatching departments participating in the alliance chain to obtain a complete histogram;

[0031] Obtaining a split point of the decision subtree of the current round based on the complete histogram;

[0032] Splitting the decision subtree based on the splitting point to obtain a leaf node corresponding to the current split of the decision subtree;

[0033] Jump to the step of randomly selecting part of the data from the current model training data of the power dispatching department to construct a bucket information gain histogram, and repeat the step until the decision subtree splitting stop condition is reached;

[0034] All leaf nodes obtained by splitting are fitted, and the decision subtree constructed in the current round is obtained based on the fitting values obtained by fitting.

[0035] In a second aspect, embodiments of the present disclosure provide a model joint privacy training and sharing device for a power dispatching scenario, comprising:

[0036] A joining module is configured to join the current power dispatching department into the alliance chain as one of the dispatching participants; the dispatching participants of the alliance chain also include other power dispatching departments;

[0037] an acquisition module configured to acquire the electricity consumption data processed by the current power dispatching department and flowing through other relevant departments during power dispatching, and to label the collected electricity consumption data with a flow direction label; the flow direction label is used to represent the power flow direction information corresponding to the electricity consumption data;

[0038] A construction module configured to construct model training data based on a data feature construction strategy pre-negotiated with other power dispatching departments participating in the alliance chain;

[0039] A training module is configured to train a decision tree model locally at the current power dispatching department using the model training data, pre-negotiated hyperparameters, and a number of iterations; the decision tree model is used to predict the power flow direction of the power consumption data;

[0040] a comparison module configured to compare the current decision tree model trained by the power dispatching department with the decision tree models trained by other power dispatching departments, and select a target model based on the comparison result;

[0041] The sharing module is configured to share the target model to the alliance chain through a smart contract locally in the current power dispatching department when the target model is a model obtained by local training of the current power dispatching department.

[0042] Furthermore, the training module is implemented as follows:

[0043] Calculate the target prediction value of the current round based on the predicted target value of the previous round and the model prediction value of the previous round;

[0044] Calculating the first-order derivative and the second-order derivative of the decision subtree generated in the current round based on the target prediction value of the current round and the model training data; the first-order derivative and the second-order derivative are Taylor series expansion parameters based on the decision tree model;

[0045] Recursively splitting the decision tree using the first-order derivative, the second-order derivative, and the model training data to obtain a decision subtree constructed in the current round;

[0046] Using the decision subtree to obtain a model prediction value of the current model training data of the power dispatching department;

[0047] Determining whether an iteration termination condition is met based on the model prediction value and the prediction target value of the current round;

[0048] If the iteration termination condition is not met, jump to the step of calculating the target prediction value of the current round based on the prediction target value of the previous round and the model prediction value of the previous round, and repeat the process until the iteration termination condition is met;

[0049] The decision subtree obtained from multiple rounds of iterations is used as the trained decision tree model.

[0050] The functions can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the functions.

[0051] In one possible design, the apparatus includes a memory and a processor. The memory is configured to store one or more computer instructions that enable the apparatus to perform the corresponding method, and the processor is configured to execute the computer instructions stored in the memory. The apparatus may also include a communication interface for communicating with other devices or a communication network.

[0052] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the method described in any one of the above aspects.

[0053] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium for storing computer instructions used by any of the above-mentioned devices, and when the computer instructions are executed by a processor, they are used to implement the method described in any of the above-mentioned aspects.

[0054] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, which includes computer instructions, and when the computer instructions are executed by a processor, they are used to implement the method described in any of the above aspects.

[0055] The technical solutions provided by the embodiments of the present disclosure may have the following beneficial effects:

[0056] 1. The method provided by the present invention solves the difficulty of low model fit due to too few samples when training a single department model during the power dispatch prediction model training process. The method expands the data training volume by designing a multi-user joint training method, thereby solving this problem. In addition, combined with the non-repudiation characteristics of blockchain technology, the security of joint data training and model sharing is guaranteed. Moreover, since multiple departments jointly establish feature buckets, sample data of power dispatch in multiple regions can be integrated for machine learning without leaking privacy.

[0057] 2. This disclosure provides a privacy-preserving method for horizontal federated learning. In this method, the inter-departmental joint data bucketing process is completed within the blockchain, ensuring the security of data sharing. Furthermore, the data synchronized within the blockchain network only contains feature distribution information, not raw information, so the original specific feature values are not leaked. Specifically, when building a decision tree, the gain histogram needs to be shared between departments, but it is still difficult to infer the local original label information provided by the training participants, so the original specific label values are not leaked.

[0058] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Other features, objectives and advantages of the present disclosure will become more apparent through the following detailed description of non-limiting embodiments in conjunction with the accompanying drawings. In the accompanying drawings:

[0060] Figure 1 A flowchart illustrating a method for joint privacy training and sharing of a model in a power dispatching scenario according to an embodiment of the present disclosure is shown;

[0061] Figure 2 A diagram showing the structure of a federated learning blockchain for a power system constructed according to an embodiment of the present disclosure is shown;

[0062] Figure 3 A flowchart of privacy protection for horizontal federated learning according to an embodiment of the present disclosure is shown;

[0063] Figure 4 A schematic diagram of feature bucketing according to an embodiment of the present disclosure is shown;

[0064] Figure 5 This is a structural diagram of an electronic device suitable for implementing a model joint privacy training and sharing method in a power dispatching scenario according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0065] Hereinafter, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily implement them. In addition, for the sake of clarity, parts not related to the description of the exemplary embodiments are omitted in the accompanying drawings.

[0066] In the present disclosure, it should be understood that terms such as "including" or "having" are intended to indicate the presence of features, numbers, steps, behaviors, components, parts, or combinations thereof disclosed in the present specification, and do not exclude the possibility that one or more other features, numbers, steps, behaviors, components, parts, or combinations thereof exist or are added.

[0067] It should also be noted that, in the absence of conflict, the embodiments and features of the embodiments of the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0068] This disclosure relates to a method for joint privacy training and sharing of models in power dispatch scenarios. The method includes:

[0069] Step S1: Based on the consortium chain, a federated learning privacy-preserving consortium chain infrastructure is constructed within the power system. Relevant power dispatch departments (including multiple power dispatch departments implementing joint model training and power dispatch departments used for verification) are added to the consortium chain as power dispatch participants. The data that the power dispatch departments can provide should include: power dispatch data of power dispatch departments at all levels, as well as data flowing through the dispatch department from their subordinate power generation and storage departments.

[0070] Step S2: Local power dispatching participants clean and discretize the data within their systems, and based on the major categories described by the feature data provided by the power dispatching department, classify the massive feature data they own to form buckets under the current feature conditions. The power dispatching participants then load local data, label information, configure hyperparameters for model training, and upload the configured hyperparameters to the joint model training and sharing blockchain network in the power dispatching scenario through smart contracts. It should be noted that hyperparameters are parameters pre-configured before model training, such as the depth of the tree in the decision tree model. This depth can be understood as the end condition of recursive training.

[0071] Step S3: After each department jointly establishes data buckets, iterative decision tree construction begins. At the end of each iteration, each department generates an independent model and shares it with the power system machine learning consortium chain network. All members of the consortium chain can use these models to make predictions. This disclosure provides a horizontal federated privacy training and sharing technology based on the consortium chain, improving the security of federated learning in the power sector.

[0072] The details of the embodiments of the present disclosure are described in detail below through specific examples.

[0073] Figure 1 The flowchart of the model joint privacy training and sharing method in the power dispatch scenario according to one embodiment of the present disclosure is shown. Figure 1 As shown in Figure 2, the model joint privacy training and sharing method in the power dispatch scenario includes the following steps:

[0074] In step S101, the current power dispatching department is added to the alliance chain as one of the dispatching participants; the dispatching participants of the alliance chain also include other power dispatching departments;

[0075] In step S102, the power consumption data of other relevant departments processed by the current power dispatching department during power dispatching is obtained, and a flow direction label is marked on the collected power consumption data; the flow direction label is used to represent the power flow direction information corresponding to the power consumption data;

[0076] In step S103, model training data is constructed based on a data feature construction strategy pre-negotiated with other power dispatching departments participating in the alliance chain;

[0077] In step S104, a decision tree model is trained locally at the current power dispatching department using the model training data, pre-negotiated hyperparameters, and number of iterations; the decision tree model is used to predict the power flow direction of the power consumption data;

[0078] In step S105, the decision tree model trained by the current power dispatching department is compared with the decision tree models trained by other power dispatching departments, and a target model is selected according to the comparison result;

[0079] In step S106, when the target model is a model obtained by local training of the current power dispatching department, the target model is shared to the alliance chain through a smart contract locally in the current power dispatching department.

[0080] In some optional implementations, the method further includes:

[0081] The hyperparameters and iteration rounds currently provided by the power dispatching department are shared on the consortium chain through a smart contract to negotiate whether to use the hyperparameters and iteration rounds currently provided by the power dispatching department or the hyperparameters and iteration rounds provided by other dispatching participants during model training;

[0082] In some optional implementations, the model training data is constructed based on a data feature construction strategy pre-negotiated with other power dispatching departments participating in the alliance chain, including:

[0083] Based on the data feature construction strategy pre-negotiated with other power dispatching departments participating in the alliance chain, each dimensional feature of the current power dispatching department's electricity consumption data is distributed and bucketed to obtain the bucketed feature data of the electricity consumption data, and the bucketed feature data is used as the model training data of the current power dispatching department.

[0084] In some optional implementations, training the decision tree model locally at the current power dispatching department using the model training data, pre-negotiated model hyperparameters, and number of iterations includes:

[0085] Calculate the target prediction value of the current round based on the predicted target value of the previous round and the model prediction value of the previous round;

[0086] Calculating the first-order derivative and the second-order derivative of the decision subtree generated in the current round based on the target prediction value of the current round and the model training data; the first-order derivative and the second-order derivative are Taylor series expansion parameters based on the decision tree model;

[0087] Recursively splitting the decision tree using the first-order derivative, the second-order derivative, and the model training data to obtain a decision subtree constructed in the current round;

[0088] Using the decision subtree to obtain a model prediction value of the current model training data of the power dispatching department;

[0089] Determining whether an iteration termination condition is met based on the model prediction value and the prediction target value of the current round;

[0090] If the iteration termination condition is not met, jump to the step of calculating the target prediction value of the current round based on the prediction target value of the previous round and the model prediction value of the previous round, and repeat until the iteration termination condition is met;

[0091] The decision subtree obtained from multiple rounds of iterations is used as the trained decision tree model.

[0092] In some optional implementations, the decision tree is recursively split using the first-order derivative, the second-order derivative, and the model training data to obtain a decision subtree constructed in the current round, including:

[0093] Randomly select part of the data from the current model training data of the power dispatching department to construct a bucket information gain histogram;

[0094] Merge the bucket information gain histogram corresponding to the current power dispatching department with the bucket information gain histograms corresponding to other power dispatching departments participating in the alliance chain to obtain a histogram;

[0095] Obtaining a split point of the decision subtree of the current round based on the complete histogram;

[0096] Splitting the decision subtree based on the splitting point to obtain a leaf node corresponding to the current split of the decision subtree;

[0097] Jump to the step of randomly selecting part of the data from the current model training data of the power dispatching department to construct a bucket information gain histogram, and repeat the step until the decision subtree splitting stop condition is reached;

[0098] All leaf nodes obtained by splitting are fitted, and the decision subtree constructed in the current round is obtained based on the fitting values obtained by fitting.

[0099] An implementation of the present disclosure is described in detail below through an example.

[0100] This disclosure proposes a joint privacy training and sharing method for a scheduling prediction model based on a boosting tree in a power scheduling scenario, including:

[0101] Step S1: Figure 2 As shown in the figure, a joint model training and sharing blockchain network is established for power dispatch scenarios. Local power dispatch participants (including regional power dispatch centers ABCD) are added to the blockchain network through internal invitations. Based on their own historical data, each power dispatch center can provide four types of data collected from itself and its subordinate enterprises when needed: 1) From the perspective of the dispatch center, this includes data such as the dispatch plant (as a participant identifier), dispatch electricity prices, dispatch sources, dispatch demand, dispatched electricity volume, and dispatch destinations. 2) From the perspective of the energy storage plant, this includes data such as incoming power volume, outgoing power volume, incoming power sources, incoming power prices, outgoing power prices, and outgoing power destinations. 3) From the perspective of the power company, data such as industrial power prices, residential power prices, industrial power volume, and residential power volume can be shared. 4) From the perspective of the power plant, data such as the power plant (as a participant identifier), produced power volume, outgoing power volume, and outgoing power prices can be shared. The diverse business data provided by each party greatly enriches the dimensionality and depth of the data features available for machine learning, significantly improving the accuracy of the resulting model. These data will be used in the future for operations such as sharing model hyperparameters, merging feature buckets, etc. among these power dispatching centers.

[0102] Step S2: Each power dispatching participant cleans the data within their system. Each participant loads local data, labels, configures model hyperparameters for model training, and uploads these parameters to the joint model training and sharing blockchain network for power dispatch scenarios via smart contracts. Each participant then discretizes their data. Simultaneously, each department classifies its data based on the characteristics of the power dispatching department, forming buckets based on the massive amount of features.

[0103] Step S3: Iterate and build a decision tree based on the bucketed information. After the iteration, each participant generates an independent model and shares it with the power system machine learning consortium chain network. All members of the consortium chain can use these models to make predictions.

[0104] Compared with the prior art, the present disclosure has the following advantages:

[0105] 1. The method provided by the present invention solves the difficulty of low model fit due to too few samples when training a single department model during the power dispatch prediction model training process. The method expands the data training volume by designing a multi-user joint training method, thereby solving this problem. In addition, combined with the non-repudiation characteristics of blockchain technology, the security of joint data training and model sharing is guaranteed. Moreover, since multiple departments jointly establish feature buckets, sample data of power dispatch in multiple regions can be integrated for machine learning without leaking privacy.

[0106] 2. This disclosure provides a privacy-preserving method for horizontal federated learning. In this method, the inter-departmental joint data bucketing process is completed within the blockchain, ensuring the security of data sharing. Furthermore, the data synchronized within the blockchain network only contains feature distribution information, not raw information, so the original specific feature values are not leaked. Specifically, when building a decision tree, the gain histogram needs to be shared between departments, but it is still difficult to infer the local original label information provided by the training participants, so the original specific label values are not leaked.

[0107] The present disclosure provides a joint privacy training and sharing method for models in a power dispatching scenario. The method first adds the power dispatching departments of each region to the blockchain network, and establishes a unique on-chain identification code for each department based on the identity characteristics of these departments (for example: regional code + internal code of the State Grid), combines the public-private key signature algorithm to generate a department certificate, and backs up the identification code and certificate on the chain, thereby ensuring the identity traceability and discriminability of data transmission between departments, thereby improving the efficiency and security of data interaction. Then, during the entire model training process, the privacy data of each department is not shared on the chain, but stored locally, and only the data bucket needs to be jointly constructed. In the process of building a prediction model based on a decision tree, the data shared between departments is the calculated gain histogram, that is, the data obtained by each department after multiple accumulation, multiplication, and division using its own training data, so the original label information cannot be restored by the other party through speculation. Finally, the trained model will be shared on the blockchain for use by all departments, thereby completing the joint model privacy calculation process for model generation in the power dispatching scenario.

[0108] Example 1

[0109] This disclosure provides a method for joint privacy training and sharing of models in a power dispatching scenario, including the following steps:

[0110] Step S1: Using the alliance chain as the underlying technical architecture support, a federated learning privacy protection alliance chain infrastructure is built within the power system, and multiple relevant departments responsible for power dispatch in each region are added to the alliance chain. Each power dispatch department joining the alliance chain will collect the following data for joint model training: data recording the power dispatch situation of the dispatch department, data related to the power generation department processed by the dispatch department, data related to the power storage department processed by the dispatch department, and data provided by the power company processed by the dispatch department.

[0111] Step S2: Figure 3 As shown, after joining the federated learning privacy protection blockchain, the power dispatching department that conducts multi-party joint modeling can start to load locally the data data_x that flows through the power dispatching department, the power generation department, the power storage department, and the power company during each power dispatch; as well as the actual power dispatch flow label data Label_x during this power dispatch. In some embodiments, the flow label can be used to indicate whether the power dispatched by the power dispatching department this time is stored in the storage department or directly transmitted to the power company for direct use. The data in data_x will include data from (1) the power generation department's factory electricity price, factory power quantity, and factory delivery time; (2) the power storage department's current storage power price (price / hour), factory power quantity, and factory delivery time; (3) the power department's current industrial transmission price, current civilian transmission price, current industrial demand power quantity, current civilian demand power quantity, and other data; (4) the power dispatching department's current dispatching power price for civilian use to the power company, the current dispatching power price for industrial use to the power company, the current dispatching power price for energy storage plants, and the expected dispatching time period.

[0112] At the same time, departments can each configure the hyperparameters (i.e., loss function and learning rate) used for model training and the number of iterations required to jointly build a decision tree.

[0113] Step S3: After loading local data and generating configuration hyperparameters, departments participating in the consortium chain can use smart contracts to upload the hyperparameters and iteration numbers required for federated modeling to the blockchain, facilitating recursive training of the inter-departmental model until completion. Furthermore, the parameter upload process is recorded on the blockchain for review by all power dispatch participants within the consortium chain network.

[0114] In one embodiment, in step S1 above, a federated learning privacy-preserving consortium chain infrastructure is constructed within the power system based on the consortium chain. Relevant departments of the power system are added to the consortium chain, including power dispatching departments at all levels, power generation departments, and power storage departments. For the joint modeling scenario of power dispatching, the main participants are the power dispatching departments at all levels (i.e., ABCD), while the power generation and power storage departments are mainly involved to share the final trained model and provide auxiliary reference for their work.

[0115] After step S2 is added to the federated learning privacy-preserving blockchain, the power dispatching department, which needs to conduct multi-party joint modeling, begins loading the data (data_x) processed by the power dispatching department during each power dispatch, flowing through the power dispatching department, the power generation department, the power storage department, and the power company; as well as the actual power dispatch flow label data (label_x) for this power dispatch. It also configures the hyperparameters for model training (i.e., the loss function and learning rate) and the number of rounds of the iterative tree.

[0116] After completing the local data loading in the above step S3, the shared hyperparameters required for federated learning modeling by multiple departments can be uploaded to the blockchain using smart contracts. This step can be negotiated uniformly among the power dispatching departments that join the alliance chain to elect a power dispatching department to provide a set of hyperparameters and iteration rounds for unified use by the departments participating in the joint training; or all departments can first provide a set of hyperparameters and iteration rounds that they each consider reasonable, and finally the departments actually participating in the joint training can select appropriate parameters for training after consultation.

[0117] Step S4: Figure 4 As shown in the figure, Department A and Department B characterize the locally loaded data, data_A and data_B, respectively. Taking Department A as an example, each time a power dispatch is executed, the data recorded by each department (the power dispatch department, the power generation department, the power storage department, and the power company) (such as factory power consumption, factory power price, production power consumption, and production power price) will be used as a data feature of this power dispatch, recorded as data_1, data_2, ...data_n, etc. The data features are then discretized to clean the data according to a specific strategy for several features in each power dispatch, forming bucketed feature data. This optimizes the computational complexity of tree construction and reduces the problem of poor model training results caused by overly discrete values (too large or too small) of certain features.

[0118] like Figure 4As shown in the figure, for the n-dimensional features of each piece of data, each dimension will be distributed in buckets according to the characteristics of the data to obtain bucketed feature data. Specifically, for time-related data (such as: factory delivery time, factory arrival time, expected scheduling period, etc.), they will be divided into 4 buckets according to the actual time. If the factory delivery time is between 12-18 o'clock, the corresponding field of the corresponding bucket is 1, otherwise it is 0. In this way, the dimension of "factory delivery time" is rewritten into a digital sequence consisting of 4 digits 0-1, that is, each field corresponds to a bucket; and for price-related data (such as: factory electricity price, storage electricity price, scheduling electricity price, etc.), it will also be represented by 0-1 according to the price range. Finally, after bucketing, each piece of training data will form a sequence string containing multiple 0-1s. Figure 4 The 4-bit sequence shown is the bucketed feature data. It is understood that sequences larger or smaller than 4 bits can also be used, depending on the actual data. The resulting new representation of the training data (i.e., the bucketed feature data) minimizes overly discrete data while maintaining the inherent meaning of the data to a certain extent.

[0119] In step S4 above, the feature bucketing strategy agreed upon by A and B is called bin_AB. Bin_AB will be synchronized to the federated learning privacy-preserving blockchain during decision tree construction. A and B apply the bin_AB bucketing strategy to their own data (i.e., the bucketing strategy for time data and the bucketing strategy for price data), respectively, to obtain training data sets based on their own data, called bin_AB_a and bin_AB_b. For A and B, the individual features of the original data provided by both parties have been placed into different buckets according to the bucketing strategy. Because the information within the buckets has been processed, bin_AB_a and bin_AB_b do not represent the actual information of the original data, and therefore do not leak the original specific feature values. To further enhance privacy protection and security, the joint modeling departments can negotiate an encryption key and encrypt the feature distribution information with the public key before uploading it. This ensures that only the department with the private key can access the feature distribution information for model training.

[0120] Step S5: Step S5 is mainly a process of iteratively constructing a decision tree, and according to the number of iterations configured in step S2, the current iteration enters the process of generating each decision subtree.

[0121] Step S51: If it is the first round of iteration, that is, no sub-model (decision subtree) has been built yet, and Department A and Department B have no historical iteration prediction values, then the model initialization operation is first performed, that is, the local actual label information is used as the prediction target value of the current round ("equivalent to the actual label" - "0"), and bin_AB_a and bin_AB_b are used for training respectively.

[0122] If it is not the first round of iteration, Department A and Department B will each use the residual of the previous round of training (i.e.: "the predicted target value of the previous round of training" - "the actual predicted value of the previous round of iteration") as the predicted target value of the current round, and substitute their respective training samples bin_AB_a and bin_AB_b, and the predicted target value of the current round into the calculation formula of the decision tree model to calculate the first and second order derivatives Ga, Gb and Ha, Hb required for the generation of the sub-model of the current iteration. The first and second order derivatives are Taylor series expansion parameters based on the current residuals and can be used to construct a prediction model. It should be noted that the final prediction value of the decision tree model is composed of the sum of the values predicted by a series of sub-models, and the training target of each sub-model is obtained by the difference between the predicted target value of the previous round and the actual predicted value of the previous round (called the residual). Moreover, by performing a second-order Taylor series expansion on the residual, the meaning of the sub-model can be expressed mathematically more intuitively, and the loss function of the model (that is, a "penalty" for the current model prediction, used to help reduce errors) can be optimized to improve the model prediction effect.

[0123] Step S52: Department A and Department B will jointly perform recursive splitting of leaf nodes in the decision tree model based on the first and second order derivatives generated in this iteration and the bucketed data sets bin_AB_a and bin_AB_b, ultimately forming several decision subtrees. The process of constructing a decision subtree is as follows:

[0124] Step S521: Based on the local first- and second-order derivatives Ga and Ha, department A uses the bucketed information bin_AB_a and randomly selects half of its buckets to construct a bucketed information gain histogram (Histogram_A) of department A. The horizontal axis of the histogram is each feature, and the vertical axis is the information gain of each feature. Based on the local first- and second-order derivatives Gb and Hb, department B uses the bucketed information bin_AB_b and randomly selects half of its buckets to construct a bucketed information gain histogram (Histogram_B) of department B.

[0125] Step S522: Departments A and B share their respective information gain histograms (Histogram_A and Histogram_B) on the blockchain consortium chain through a smart contract. Departments A and B each use the Reduce Scatter algorithm to merge their histograms and calculate the maximum information gain for each bucket. Information gain indicates the degree of similarity between each bucket and the predicted data label. The greater the similarity, the greater the impact of the feature on classification, and the corresponding information gain value. Therefore, to maximize the classification performance of the decision subtree, the bucket with the maximum information gain is used as the optimal split point for the current model.

[0126] Step S523: After finding the optimal split point, Department A and Department B each find their own optimal split point and perform subtree splitting locally. That is, for the tree of the current layer, its leaf node is the bucket with the maximum information gain. Since A and B randomly select buckets, the following situations may occur: (1) During this round of training, the bucket with the maximum information gain is used by both A and B to calculate the gain histogram, then the optimal split points of A and B will be based on this bucket; (2) If the bucket with the maximum information gain is used by only one party in this round, the user uses this bucket, while the other party continues to look for the bucket with the maximum gain value used by it in this round as the split point. It should be noted that the tree model is a multi-branch model that extends infinitely from the root node downward, including several leaf nodes and leaves, and the leaf nodes are buckets obtained through joint training. Which feature is placed on the leaf node first, that is, which is the optimal split point selected in the current round, can be determined based on the above information gain value. Step S524: Department A and Department B each determine whether the conditions for terminating the split are met. The conditions for ending the recursion are as follows: (1) the optimal split point selected at this time is consistent with the optimal split point obtained last time; (2) the depth of the subtree reaches the set maximum depth. After the recursion ends and the node splitting process is completed, the process continues to step S525. If not, the process returns to the starting step of the recursion and executes the relevant steps in sequence from S521 to continue splitting the next leaf node.

[0127] Step S53: Department A and Department B fit all leaf nodes generated in this round of iteration, calculate the fitting function of these coordinates, and use this to derive the current decision subtree. Next, Department A and Department B each input the local training set (that is, the bucketed feature data constructed above) into the decision subtree they generated, and use the difference between the latest predicted value and the predicted target value of this round to determine the size of the residual. If the residual size meets the model training requirements, the model is considered to have converged, and the iteration will end; otherwise, the latest predicted value will be used as one of the inputs for the next round of iteration.

[0128] In step S51, if this is the first iteration and Department A and Department B do not have historical iteration predictions, the model is initialized. If this is not the first iteration, Department A and Department B each calculate local label information based on the predictions generated by the previous iteration results, and calculate the first- and second-order derivatives Ga, Gb, Ha, and Hb required for the current iteration model update. When Department A and Department B jointly construct the histogram, the first- and second-order derivatives Ga, Gb, Ha, and Hb generated by the local label information are synchronized. This has been calculated multiple times through the data bucket information bin_AB through accumulation, subtraction, multiplication, and division operations.

[0129] If the privacy and security of the model need to be further strengthened, a pair of encryption keys can be negotiated among the participants in the joint modeling. The first- and second-order derivatives Ga, Gb, Ha, and Hb required for iterative model updates can be encrypted using the public key. These first- and second-order derivatives Ga, Gb, Ha, and Hb can then be decrypted and used during local training to improve privacy and security.

[0130] Step S6: The iteration ends, and all decision subtrees generated are output. Department A and Department B each generate an independent model (multiple decision trees) locally. This model is evaluated using a test set to identify the model with the highest accuracy. The corresponding department then shares this model with the consortium blockchain network of Departments A and B via a smart contract.

[0131] Step S7: After the final model is submitted, this model can be used to assist in power dispatch prediction. Since the tree model is composed of multiple subtrees, the prediction result will eventually be the sum of the output results of all subtrees. The method for outputting a certain subtree is as follows: when a bucketed power dispatch test data is input into the model, first query the bucket with the same child node closest to the root node of the tree model. For example, if the bucket in the power dispatch test data is greater than the value of a certain leaf node, you can move forward to the right subtree. Based on this, find the second child node and finally reach the bottom leaf node to get the output of this subtree. For example: when other power dispatch departments need to predict the direction of power dispatch flow, they can directly obtain the final model through smart contracts, and use the data collected from its subordinate departments (ie, power generation department, power storage department) as input for classification prediction and calculation. The sum of the predictions from each subtree might be approximately 1 or 2. This result tells the power dispatching department whether the power generated by the current generation department should be promptly stored in the power storage department (the predicted sum is 1) or transmitted to the power consumption department (the power company, the predicted sum is 2). This prediction result can be used to assist in power dispatching decisions.

[0132] After completing the iteration in the above steps S6 and S7, a model is generated. This is not limited to privacy protection during the model training process. The present disclosure utilizes a chain authentication method to prevent other non-certified departments from joining, ensuring that a certain degree of privacy and security protection is still provided after the model training is completed.

[0133] It should be noted that the above example uses Department A and Department B as examples. In actual applications, there can be more than two departments participating in the alliance chain, for example, it can also include Department C, Department D, etc. When the current power dispatching department is Department A, other power dispatching departments participating in the alliance chain can be part or all of Department B, Department C, and Department D.

[0134] The following are embodiments of the apparatus of the present disclosure, which can be used to execute embodiments of the method of the present disclosure.

[0135] According to an embodiment of the present disclosure, a model-based joint privacy training and sharing device for power dispatching scenarios can be implemented as part or all of an electronic device through software, hardware, or a combination of both. The model-based joint privacy training and sharing device for power dispatching scenarios includes:

[0136] A joining module is configured to join the current power dispatching department into the alliance chain as one of the dispatching participants; the dispatching participants of the alliance chain also include other power dispatching departments;

[0137] an acquisition module configured to acquire the electricity consumption data processed by the current power dispatching department and flowing through other relevant departments during power dispatching, and to label the collected electricity consumption data with a flow direction label; the flow direction label is used to represent the power flow direction information corresponding to the electricity consumption data;

[0138] A construction module configured to construct model training data based on a data feature construction strategy pre-negotiated with other power dispatching departments participating in the alliance chain;

[0139] A training module is configured to train a decision tree model locally at the current power dispatching department using the model training data, pre-negotiated hyperparameters, and a number of iterations; the decision tree model is used to predict the power flow direction of the power consumption data;

[0140] a comparison module configured to compare the current decision tree model trained by the power dispatching department with the decision tree models trained by other power dispatching departments, and select a target model based on the comparison result;

[0141] The sharing module is configured to share the target model to the alliance chain through a smart contract locally in the current power dispatching department when the target model is a model obtained by local training of the current power dispatching department.

[0142] In an optional implementation of this embodiment, the training module is implemented as follows:

[0143] Calculate the target prediction value of the current round based on the predicted target value of the previous round and the model prediction value of the previous round;

[0144] Calculating the first-order derivative and the second-order derivative of the decision subtree generated in the current round based on the target prediction value of the current round and the model training data; the first-order derivative and the second-order derivative are Taylor series expansion parameters based on the decision tree model;

[0145] Recursively splitting the decision tree using the first-order derivative, the second-order derivative, and the model training data to obtain a decision subtree constructed in the current round;

[0146] Using the decision subtree to obtain a model prediction value of the current model training data of the power dispatching department;

[0147] Determining whether an iteration termination condition is met based on the model prediction value and the prediction target value of the current round;

[0148] If the iteration termination condition is not met, jump to the step of calculating the target prediction value of the current round based on the prediction target value of the previous round and the model prediction value of the previous round, and repeat until the iteration termination condition is met;

[0149] The decision subtree obtained from multiple rounds of iterations is used as the trained decision tree model.

[0150] The model joint privacy training and sharing device in the power dispatching scenario in this embodiment corresponds to the model joint privacy training and sharing method in the power dispatching scenario described above. For specific details, please refer to the description of the model joint privacy training and sharing method in the power dispatching scenario above, which will not be repeated here. Figure 5 This is a structural diagram of an electronic device suitable for implementing a model joint privacy training and sharing method in a power dispatching scenario according to an embodiment of the present disclosure.

[0151] like Figure 5 As shown, the electronic device 500 includes a processing unit 501, which can be implemented as a processing unit such as a CPU, a GPU, an FPGA, or an NPU. The processing unit 501 can perform various processes in the embodiment of any of the above methods of the present disclosure according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage portion 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing unit 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0152] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, and the like; an output section 507 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 508 including a hard disk; and a communication section 509 including a network interface card such as a LAN card or a modem. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 510 as needed, so that a computer program read therefrom can be installed in the storage section 508 as needed.

[0153] In particular, according to embodiments of the present disclosure, any of the methods described above with reference to the embodiments of the present disclosure may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for executing any of the methods described in the embodiments of the present disclosure. In such embodiments, the computer program may be downloaded and installed from a network via the communication portion 509 and / or installed from a removable medium 511.

[0154] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the diagram or block diagram can represent a module, program segment or part of the code, and the module, program segment or part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, as well as the combination of boxes in the block diagram and / or flow chart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or can be implemented using a combination of dedicated hardware and computer instructions.

[0155] The units or modules described in the embodiments of the present disclosure may be implemented in software or hardware. The units or modules described may also be provided in a processor, and the names of these units or modules do not, in certain circumstances, limit the units or modules themselves.

[0156] As another aspect, the present disclosure further provides a computer-readable storage medium. This computer-readable storage medium may be included in the apparatus described in the above embodiments, or may be a standalone computer-readable storage medium not incorporated into the apparatus. The computer-readable storage medium stores one or more programs, which are used by one or more processors to execute the methods described in the present disclosure.

[0157] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also encompasses other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the concept of the present disclosure. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.

Claims

1. A model joint privacy training and sharing method in a power dispatch scenario, characterized by: include: Add the current power dispatching department to the alliance chain as one of the dispatching participants; the dispatching participants of the alliance chain also include other power dispatching departments; Obtaining the electricity consumption data processed by the current power dispatching department and flowing through other relevant departments during power dispatching, and marking the collected electricity consumption data with flow direction labels; The flow direction tag is used to represent the power flow direction information corresponding to the power consumption data; Constructing model training data based on a data feature construction strategy pre-negotiated with other power dispatching departments participating in the alliance chain; Training a decision tree model locally at the current power dispatching department using the model training data, pre-negotiated hyperparameters, and number of iterations; the decision tree model is used to predict the power flow direction of the power consumption data; Comparing the current decision tree model trained by the power dispatching department with the decision tree models trained by other power dispatching departments, and selecting a target model based on the comparison results; When the target model is a model obtained by local training of the current power dispatching department, the target model is shared to the alliance chain through a smart contract locally in the current power dispatching department.

2. The method according to claim 1, characterized in that The method further comprises: The hyperparameters and iteration rounds provided by the current power dispatching department are shared on the alliance chain through a smart contract to negotiate whether to use the hyperparameters and iteration rounds provided by the current power dispatching department or the hyperparameters and iteration rounds provided by other dispatching participants when training the model.

3. The method according to claim 1 or 2, characterized in that Model training data is constructed based on a data feature construction strategy pre-negotiated with other power dispatching departments participating in the alliance chain, including: Based on the data feature construction strategy pre-negotiated with other power dispatching departments participating in the alliance chain, each dimensional feature of the current power dispatching department's electricity consumption data is distributed and bucketed to obtain the bucketed feature data of the electricity consumption data, and the bucketed feature data is used as the model training data of the current power dispatching department.

4. The method according to claim 1 or 2, characterized in that Training the decision tree model locally at the current power dispatching department using the model training data, pre-negotiated model hyperparameters, and number of iterations includes: Calculate the target prediction value of the current round based on the predicted target value of the previous round and the model prediction value of the previous round; Calculating the first-order derivative and the second-order derivative of the decision subtree generated in the current round based on the target prediction value of the current round and the model training data; the first-order derivative and the second-order derivative are Taylor series expansion parameters based on the decision tree model; Recursively splitting the decision tree using the first-order derivative, the second-order derivative, and the model training data to obtain a decision subtree constructed in the current round; Using the decision subtree to obtain a model prediction value of the current model training data of the power dispatching department; Determining whether an iteration termination condition is met based on the model prediction value and the prediction target value of the current round; If the iteration termination condition is not met, jump to the step of calculating the target prediction value of the current round based on the prediction target value of the previous round and the model prediction value of the previous round, and repeat the process until the iteration termination condition is met; The decision subtree obtained from multiple rounds of iterations is used as the trained decision tree model.

5. The method according to claim 4, characterized in that The decision tree is recursively split using the first-order derivative, the second-order derivative, and the model training data to obtain a decision subtree constructed in the current round, including: Randomly select part of the data from the current model training data of the power dispatching department to construct a bucket information gain histogram; Merge the bucket information gain histogram corresponding to the current power dispatching department with the bucket information gain histograms corresponding to other power dispatching departments participating in the alliance chain to obtain a complete histogram; Obtaining a split point of the decision subtree of the current round based on the complete histogram; Splitting the decision subtree based on the splitting point to obtain a leaf node corresponding to the current split of the decision subtree; Jump to the step of randomly selecting part of the data from the current model training data of the power dispatching department to construct a bucket information gain histogram, and repeat the step until the decision subtree splitting stop condition is reached; All leaf nodes obtained by splitting are fitted, and the decision subtree constructed in the current round is obtained based on the fitting values obtained by fitting.

6. A model joint privacy training and sharing device in a power dispatching scenario, characterized by: include: A joining module is configured to join the current power dispatching department into the alliance chain as one of the dispatching participants; the dispatching participants of the alliance chain also include other power dispatching departments; an acquisition module configured to acquire the electricity consumption data processed by the current power dispatching department and flowing through other relevant departments during power dispatching, and to mark the collected electricity consumption data with a flow direction label; The flow direction tag is used to represent the power flow direction information corresponding to the power consumption data; A construction module configured to construct model training data based on a data feature construction strategy pre-negotiated with other power dispatching departments participating in the alliance chain; A training module is configured to train a decision tree model locally at the current power dispatching department using the model training data, pre-negotiated hyperparameters, and a number of iterations; the decision tree model is used to predict the power flow direction of the power consumption data; a comparison module configured to compare the current decision tree model trained by the power dispatching department with the decision tree models trained by other power dispatching departments, and select a target model based on the comparison result; The sharing module is configured to share the target model to the alliance chain through a smart contract locally in the current power dispatching department when the target model is a model obtained by local training of the current power dispatching department.

7. The device according to claim 6, characterized in that The training module is implemented as follows: Calculate the target prediction value of the current round based on the predicted target value of the previous round and the model prediction value of the previous round; Calculating the first-order derivative and the second-order derivative of the decision subtree generated in the current round based on the target prediction value of the current round and the model training data; the first-order derivative and the second-order derivative are Taylor series expansion parameters based on the decision tree model; Recursively splitting the decision tree using the first-order derivative, the second-order derivative, and the model training data to obtain a decision subtree constructed in the current round; Using the decision subtree to obtain a model prediction value of the current model training data of the power dispatching department; Determining whether an iteration termination condition is met based on the model prediction value and the prediction target value of the current round; If the iteration termination condition is not met, jump to the step of calculating the target prediction value of the current round based on the prediction target value of the previous round and the model prediction value of the previous round, and repeat the process until the iteration termination condition is met; The decision subtree obtained from multiple rounds of iterations is used as the trained decision tree model.

8. An electronic device, wherein: The method comprises a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the method according to any one of claims 1 to 5.

9. A computer-readable storage medium having computer instructions stored thereon, wherein: When the computer instructions are executed by a processor, the method according to any one of claims 1 to 5 is implemented.

10. A computer program product comprising computer instructions, wherein: When the computer instructions are executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Federated learning privacy protection method and system based on homomorphic pseudo-random numbers

    CN112149160A

  • Federated learning privacy protection method based on homomorphic encryption in Internet of Vehicles

    CN112583575A

  • Prediction model generation method and device, equipment and readable medium

    CN113283948A

  • Training method of horizontal federal xgboost decision tree

    CN113688999A