CN114118641B - Wind power plant power prediction method, GBDT model longitudinal training method and device - Google Patents

Wind power plant power prediction method, GBDT model longitudinal training method and device Download PDF

Info

Publication number
CN114118641B
CN114118641B CN202210110542.9A CN202210110542A CN114118641B CN 114118641 B CN114118641 B CN 114118641B CN 202210110542 A CN202210110542 A CN 202210110542A CN 114118641 B CN114118641 B CN 114118641B
Authority
CN
China
Prior art keywords
data
node
training
feature
held
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210110542.9A
Other languages
Chinese (zh)
Other versions
CN114118641A (en
Inventor
凡航
陈智隆
郝天一
陈琨
王国赛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huakong Tsingjiao Information Technology Beijing Co Ltd
Original Assignee
Huakong Tsingjiao Information Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huakong Tsingjiao Information Technology Beijing Co Ltd filed Critical Huakong Tsingjiao Information Technology Beijing Co Ltd
Priority to CN202210110542.9A priority Critical patent/CN114118641B/en
Publication of CN114118641A publication Critical patent/CN114118641A/en
Application granted granted Critical
Publication of CN114118641B publication Critical patent/CN114118641B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • G06N20/10Machine learning using kernel methods, e.g. support vector machines [SVM]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/06Electricity, gas or water supply
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J3/00Circuit arrangements for ac mains or ac distribution networks
    • H02J3/004Generation forecast, e.g. methods or systems for forecasting future energy generation
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J3/00Circuit arrangements for ac mains or ac distribution networks
    • H02J3/38Arrangements for parallely feeding a single network by two or more generators, converters or transformers
    • H02J3/381Dispersed generators
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J2203/00Indexing scheme relating to details of circuit arrangements for AC mains or AC distribution networks
    • H02J2203/10Power transmission or distribution systems management focussing at grid-level, e.g. load flow analysis, node profile computation, meshed network optimisation, active network management or spinning reserve management
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J2300/00Systems for supplying or distributing electric power characterised by decentralized, dispersed, or local generation
    • H02J2300/20The dispersed energy generation being of renewable origin
    • H02J2300/28The renewable source being wind energy
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/46Secure multiparty computation, e.g. millionaire problem
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02EREDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
    • Y02E10/00Energy generation through renewable energy sources
    • Y02E10/70Wind energy
    • Y02E10/76Power conversion electric or electronic aspects

Abstract

The application discloses a wind power plant power prediction method, a GBDT model longitudinal training method and a device, and the method comprises the following steps: acquiring node splitting standards of decision trees included in a pre-trained GBDT model, wherein the GBDT model is obtained by training an active side data node, a ciphertext computing node and a passive side data node through information interaction and data computation in a ciphertext mode based on characteristic data of a plurality of samples held by the active side data node and the ciphertext computing node; sending the node splitting standard to a passive side data node with the characteristics corresponding to the node splitting standard, so that the passive side data node performs node splitting according to the received node splitting standard to obtain a node splitting result; and inputting the wind power characteristic data and the node splitting result of the wind power plant to be predicted into the GBDT model for power prediction, and obtaining the wind power plant power at a second preset number of future moments after the specified moment of the wind power plant to be predicted. By adopting the scheme, the accuracy of predicting the power of the wind power plant by using the GBDT model is improved.

Description

Wind power plant power prediction method, GBDT model longitudinal training method and device
Technical Field
The application relates to the technical field of machine learning and multi-party safety calculation, in particular to a wind power plant power prediction method, a GBDT model longitudinal training method and a device.
Background
In the related technology of wind power plants, the power of the wind power plants is often required to be predicted, the prediction of the power of the wind power plants refers to the prediction of the total power of the wind power plants within a period of time in the future according to a certain time interval, and the prediction of the power of the wind power plants refers to the prediction of the total power of the wind power plants within a period of time in the future according to a certain time interval, for example, within 4 hours in the future, the prediction is performed according to a time interval not less than 15 minutes.
Accurate wind farm power prediction is of great significance to scheduling department for heliostat power generation plans, adjusting the operation modes of power systems and the like, and provides important information for trading of power spot markets.
The existing wind power plant power prediction can adopt a physical method, an accumulation method based on single wind power plant prediction, a spatial scale-up method and the like. The physical method has the characteristics of clear flow, strong interpretability of a prediction result and poor prediction precision. The accumulation method based on single wind farm prediction does not fully consider the correlation among wind farms in the prediction process. The spatial upscaling method is coarse in granularity when correlation among wind power plants is considered.
Currently, researches propose that a machine learning method is adopted for power prediction of a wind farm, for example, a GBDT (Gradient Boosting Decision Tree) model, which is a set of supervised learning algorithms for model training using a Decision Tree technology, can be used for power prediction of the wind farm. And (3) enabling the model prediction result to be close to the true value used in training by a mode of fitting a plurality of decision trees, wherein the target value fitted by each decision tree is equal to the difference value between the true value of the training set and the predicted values of a plurality of decision trees. The GBDT model is typically applied to classification, regression, and other problems.
At present, in the practical application of using a GBDT model to predict the power of a wind farm, a large amount of sample feature data is often needed when the GBDT model is trained, and for some users of the GBDT model, the users may not own enough multiple types of feature data, and cannot train out the GBDT model meeting a certain prediction precision requirement, so that the power of the wind farm cannot be predicted more accurately by using the GBDT model.
Disclosure of Invention
The embodiment of the application provides a wind power plant power prediction method, a GBDT model longitudinal training method and a device, and aims to solve the problem that in the prior art, the accuracy of prediction of wind power plant power by using a GBDT model is low.
The embodiment of the application provides a wind power plant power prediction method, which is applied to an active side data node in a training system, wherein the training system comprises: a plurality of data nodes and ciphertext computational nodes, the plurality of data nodes comprising: an active side data node and at least one passive side data node, the method comprising:
acquiring node splitting criteria of each decision tree included in a pre-trained GBDT model, wherein the GBDT model is obtained by training the active data node, the ciphertext computation node and the passive data node through ciphertext information interaction and data computation based on feature data of a plurality of samples held by the active data node, the plurality of data nodes have feature data of different types of features of the same sample, the active data node further holds a target value, the sample is represented by time, and the feature data held by the active data node includes: the target value of the wind farm power at a first preset number of moments before the moment of the wind farm is the wind farm power at a second preset number of moments after the moment of the wind farm;
aiming at the node splitting standard of each decision tree, sending the node splitting standard to the passive side data node which holds the characteristic corresponding to the node splitting standard, so that the passive side data node performs node splitting according to the received node splitting standard and based on the characteristic data of the characteristic at the appointed moment of each wind power plant to obtain the node splitting result of the decision tree, wherein each wind power plant held by the passive side data node is the wind power plant participating in the GBDT model training;
receiving the node splitting result sent by the passive data node;
and inputting the wind power characteristic data of the wind power plant to be predicted and the received node splitting result into the GBDT model for power prediction to obtain the wind power plant power of the wind power plant at the second preset number of future moments after the specified moment of the wind power plant to be predicted, wherein the wind power characteristic data comprises the wind power plant power of the wind power plant at the first preset number of historical moments before the specified moment of the wind power plant to be predicted.
The embodiment of the present application further provides a vertical training method for a GBDT model, which is applied to an active data node in a training system, where the training system includes: a plurality of data nodes and ciphertext computational nodes, the plurality of data nodes comprising: an active data node and at least one passive data node, the plurality of data nodes having feature data of different kinds of features of the same sample, the active data node further holding a target value, wherein the sample is represented by a time, the feature data held by the active data node includes: the method comprises the following steps that wind farm power of a first preset number of moments before the moment of the wind farm is obtained, and a target value is the wind farm power of a second preset number of moments after the moment of the wind farm, and the method comprises the following steps:
acquiring feature data and a target value of each feature of a plurality of samples held by the user;
calculating training data of each characteristic according to a training mode of the GBDT model by using characteristic data and a target value of each characteristic of a plurality of samples held by the current layer of the current decision tree of the initial GBDT model;
receiving training data of each characteristic held by the passive data node, which is sent by the ciphertext computing node in a ciphertext mode, wherein the training data of each characteristic held by the passive data node is obtained by computing the ciphertext computing node according to a training mode of a GBDT model through information interaction and data computing between the ciphertext computing node and the passive data node and based on the characteristic data of each characteristic of the multiple samples held by the passive data node;
and completing the training of the current layer according to the training mode of the GBDT model by using the training data of each characteristic held by the passive data node and the received training data of each characteristic held by the passive data node.
The embodiment of the present application further provides a vertical training method for a GBDT model, which is applied to a passive data node in a training system, where the training system includes: a plurality of data nodes and ciphertext computational nodes, the plurality of data nodes comprising: an active data node and at least one passive data node, the plurality of data nodes having feature data of different kinds of features of the same sample, the active data node further holding a target value, wherein the sample is represented by a time, the feature data held by the active data node includes: the method comprises the following steps that wind farm power of a first preset number of moments before the moment of the wind farm is obtained, and a target value is the wind farm power of a second preset number of moments after the moment of the wind farm, and the method comprises the following steps:
acquiring feature data of each feature of a plurality of samples held by the user;
aiming at the current layer of the current decision tree of the initial GBDT model, calculating training data of each characteristic held by the ciphertext calculation node based on the characteristic data of each characteristic of a plurality of samples held by the ciphertext calculation node and the data calculation according to the training mode of the GBDT model, so that the ciphertext calculation node sends the training data of each characteristic held by the passive data node to the active data node in a ciphertext mode, so that the active data node uses the training data of each characteristic held by the active data node and receives the training data of each characteristic held by the passive data node, and completes the training of the current layer according to the training mode of the GBDT model, the training data of each characteristic held by the active data node uses the characteristic data and the target value of each characteristic of a plurality of samples held by the active data node, and calculating according to the training mode of the GBDT model.
The embodiment of the present application further provides a method for vertical training of a GBDT model, which is applied to ciphertext computing nodes in a training system, where the training system includes: a plurality of data nodes and ciphertext computational nodes, the plurality of data nodes comprising: an active data node and at least one passive data node, the plurality of data nodes having feature data of different kinds of features of the same sample, the active data node further holding a target value, wherein the sample is represented by a time, the feature data held by the active data node includes: the method comprises the following steps that wind farm power of a first preset number of moments before the moment of the wind farm is obtained, and a target value is the wind farm power of a second preset number of moments after the moment of the wind farm, and the method comprises the following steps:
calculating training data of each feature held by the passive data node according to a training mode of the GBDT model based on feature data of each feature of a plurality of samples held by the passive data node through information interaction and data calculation between the current layer of a current decision tree of an initial GBDT model and the passive data node;
and sending training data of each characteristic held by the passive data node to the active data node in a ciphertext mode, so that the active data node completes training of the current layer by using the training data of each characteristic held by the active data node and the received training data of each characteristic held by the passive data node according to the training mode of the GBDT model, and the training data of each characteristic held by the active data node is calculated by using the characteristic data and the target value of each characteristic of a plurality of samples held by the active data node and the training mode of the GBDT model.
The embodiment of the present application further provides a wind farm power prediction apparatus, which is applied to an active data node in a training system, where the training system includes: a plurality of data nodes and ciphertext computational nodes, the plurality of data nodes comprising: an active side data node and at least one passive side data node, the apparatus comprising:
a splitting criterion obtaining module, configured to obtain node splitting criteria of each decision tree included in a pre-trained GBDT model, where the GBDT model is obtained by performing ciphertext-based information interaction and data calculation on the active data node, the ciphertext calculation node, and the passive data node, and training based on feature data of multiple samples that are respectively held, where the multiple data nodes have feature data of different types of features of the same sample, and the active data node further holds a target value, where a sample is represented by a time, and the feature data held by the active data node includes: the target value of the wind farm power at a first preset number of moments before the moment of the wind farm is the wind farm power at a second preset number of moments after the moment of the wind farm;
a splitting standard sending module, configured to send a node splitting standard to the passive data node having the feature corresponding to the node splitting standard, so that the passive data node performs node splitting according to the received node splitting standard and based on the feature data of the feature at the specified time of each wind farm, so as to obtain a node splitting result of the decision tree, where each wind farm held by the passive data node is a wind farm participating in the GBDT model training;
a splitting result receiving module, configured to receive the node splitting result sent by the passive data node;
and the power prediction module is used for inputting the wind power characteristic data of the wind power plant to be predicted and the received node splitting result into the GBDT model for power prediction to obtain the wind power plant power of the wind power plant at the second preset number of future moments after the specified moment of the wind power plant to be predicted, wherein the wind power characteristic data comprises the wind power plant power of the wind power plant at the first preset number of historical moments before the specified moment of the wind power plant to be predicted.
The embodiment of the present application further provides a vertical training device of GBDT model, which is applied to an active data node in a training system, where the training system includes: a plurality of data nodes and ciphertext computational nodes, the plurality of data nodes comprising: an active data node and at least one passive data node, the plurality of data nodes having feature data of different kinds of features of the same sample, the active data node further holding a target value, wherein the sample is represented by a time, the feature data held by the active data node includes: the device comprises the following steps that the wind farm power of the wind farm at a first preset number of moments before the moment is targeted, and the target value is the wind farm power of the wind farm at a second preset number of moments after the moment, wherein the device comprises:
the characteristic data acquisition module is used for acquiring characteristic data and a target value of each characteristic of a plurality of samples held by the characteristic data acquisition module;
the training data calculation module is used for calculating the training data of each characteristic by using the characteristic data and the target value of each characteristic of a plurality of samples held by the training data calculation module per se according to the training mode of the GBDT model aiming at the current layer of the current decision tree of the initial GBDT model;
a training data receiving module, configured to receive training data of each feature held by the passive data node, where the training data of each feature is sent in a ciphertext mode of the ciphertext computing node, and the training data of each feature held by the passive data node is obtained by computing, for the ciphertext computing node, in a training mode of a GBDT model based on feature data of each feature of the multiple samples held by the passive data node through information interaction and data computation with the passive data node;
and the model training module is used for completing the training of the current layer according to the training mode of the GBDT model by using the training data of each characteristic held by the model training module and the received training data of each characteristic held by the passive side data node.
The embodiment of the present application further provides a vertical training device of GBDT model, which is applied to a passive data node in a training system, where the training system includes: a plurality of data nodes and ciphertext computational nodes, the plurality of data nodes comprising: an active data node and at least one passive data node, the plurality of data nodes having feature data of different kinds of features of the same sample, the active data node further holding a target value, wherein the sample is represented by a time, the feature data held by the active data node includes: the device comprises the following steps that the wind farm power of the wind farm at a first preset number of moments before the moment is targeted, and the target value is the wind farm power of the wind farm at a second preset number of moments after the moment, wherein the device comprises:
the characteristic data acquisition module is used for acquiring characteristic data of each characteristic of a plurality of samples held by the characteristic data acquisition module;
a training data calculation module, configured to calculate, for a current layer of a current decision tree of an initial GBDT model, training data for each feature of a plurality of samples held by the current layer, based on feature data for each feature of the plurality of samples held by the current layer and data calculation, according to a training mode of the GBDT model, so that the ciphertext calculation node sends the training data for each feature held by the passive data node to the active data node in a ciphertext mode, so that the active data node uses the training data for each feature held by the active data node and receives the training data for each feature held by the passive data node, and completes training for the current layer according to the training mode of the GBDT model, and the training data for each feature held by the active data node uses the feature data and a target value for each feature of the plurality of samples held by the active data node, and calculating according to the training mode of the GBDT model.
The embodiment of the present application further provides a vertical training device of GBDT model, which is applied to ciphertext computing nodes in a training system, where the training system includes: a plurality of data nodes and ciphertext computational nodes, the plurality of data nodes comprising: an active data node and at least one passive data node, the plurality of data nodes having feature data of different kinds of features of the same sample, the active data node further holding a target value, wherein the sample is represented by a time, the feature data held by the active data node includes: the device comprises the following steps that the wind farm power of the wind farm at a first preset number of moments before the moment is targeted, and the target value is the wind farm power of the wind farm at a second preset number of moments after the moment, wherein the device comprises:
a training data calculation module, configured to calculate, for a current layer of a current decision tree of an initial GBDT model, training data of each feature held by a passive data node according to a training mode of the GBDT model based on feature data of each feature of a plurality of samples held by the passive data node through information interaction and data calculation with the passive data node;
and a training data sending module, configured to send training data of each feature held by the passive data node to the active data node in a ciphertext manner, so that the active data node uses the training data of each feature held by itself, and receives the training data of each feature held by the passive data node, and completes training of the current layer according to the training manner of the GBDT model, where the training data of each feature held by the active data node is calculated for the active data node using the feature data and the target value of each feature of multiple samples held by itself according to the training manner of the GBDT model.
Embodiments of the present application further provide an electronic device, including a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to: the method for predicting the power of the wind power plant is realized, or the method for longitudinally training the GBDT model applied to the data node of the active side is realized, the method for longitudinally training the GBDT model applied to the data node of the passive side is realized, and the method for longitudinally training the GBDT model applied to the ciphertext computing node is realized.
An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements any of the above methods for predicting power of a wind farm, or implements any of the above methods for longitudinally training a GBDT model applied to an active data node, implements any of the above methods for longitudinally training a GBDT model applied to a passive data node, and implements any of the above methods for longitudinally training a GBDT model applied to a ciphertext computing node.
The embodiment of the present application further provides a computer program product containing instructions, which when run on a computer, enables the computer to implement any of the above-mentioned wind farm power prediction methods, or implement any of the above-mentioned GBDT model longitudinal training methods applied to an active data node, implement any of the above-mentioned GBDT model longitudinal training methods applied to a passive data node, and implement any of the above-mentioned GBDT model longitudinal training methods applied to a ciphertext computing node.
The beneficial effect of this application includes:
in the method for predicting power of a wind farm provided in the embodiment of the present application, in the process of predicting the power of the wind farm to be predicted at a specific time, a passive data node performs node splitting based on the held characteristic data of each characteristic of each wind farm at the specific time according to the node splitting standard of the decision tree of a pre-trained GBDT model to obtain the node splitting result of the decision tree, and sends the node splitting result to an active data node, so that the active data node inputs the wind power characteristic data including the wind farm power at a first preset number of historical times before the specific time of the wind farm to be predicted and the node splitting result into the GBDT model for power prediction to obtain the wind farm power at a second preset number of future times after the specific time of the wind farm to be predicted, wherein the pre-trained GBDT model is used, the data exchange and data calculation of the data nodes of the active side and the cryptograph and the data nodes of the passive side in the cryptograph mode are obtained by training based on the feature data of a plurality of samples held by the data nodes, the data nodes have feature data of different types of features of the same sample, the data nodes of the active side also hold a target value, wherein the sample is represented by time, and the feature data held by the data nodes of the active side comprises the following steps: the target value is the wind farm power at a second preset number of moments after the moment of the wind farm. In the training process of the used GBDT model, the GBDT model is obtained by training based on the feature data of a plurality of different features held by a plurality of data nodes, and compared with the model obtained by training only by using the feature data of the features held by the data nodes of the active side, the GBDT model uses more feature data, so that the GBDT model has higher prediction precision, and more accurate wind power plant power can be obtained by using the GBDT model to carry out power prediction.
In the above-mentioned GBDT model longitudinal training method provided in the embodiment of the present application, a plurality of data nodes participating in training have feature data of different types of features of the same sample, and the master data node further holds a target value, and represents a sample at a time, and the feature data held by the master data node includes: in the process of training the GBDT model, an active side data node, a passive side data node and a ciphertext calculation node respectively calculate training data of each characteristic according to the training mode of the GBDT model aiming at the current layer of the current decision tree of the initial GBDT model, and transmit the training data in a ciphertext mode, and the active side data node finishes training the current layer by using the training data of each characteristic, so that the characteristic data of multiple characteristics of the wind farm held by different data nodes is used for longitudinally training the DT model, and the characteristic data of a sample held by each data node is ensured not to be leaked by each data node participating in training.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
The accompanying drawings are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the principles of the application and not to limit the application. In the drawings:
FIG. 1 is a flowchart of a method for predicting power of a wind farm provided in an embodiment of the present application;
fig. 2 is a schematic structural diagram of a longitudinal training system of a GBDT model according to an embodiment of the present disclosure;
fig. 3 is a flowchart of a vertical training method applied to a GBDT model of an active data node according to an embodiment of the present disclosure;
fig. 4 is a flowchart of a vertical training method applied to a GBDT model of a passive data node according to an embodiment of the present disclosure;
fig. 5 is a flowchart of a vertical training method applied to a GBDT model of a ciphertext computing node according to an embodiment of the present application;
fig. 6 is a flowchart of a vertical training method of a GBDT model according to an embodiment of the present disclosure;
FIG. 7 is a schematic structural diagram of a wind farm power prediction device provided in an embodiment of the present application;
FIG. 8-1 is a schematic structural diagram of a vertical training apparatus applied to a GBDT model of an active data node according to an embodiment of the present application;
fig. 8-2 is a schematic structural diagram of a vertical training apparatus applied to a GBDT model of an active data node according to another embodiment of the present disclosure;
FIG. 9-1 is a schematic structural diagram of a vertical training apparatus applied to a GBDT model of passive data nodes according to an embodiment of the present application;
FIG. 9-2 is a schematic structural diagram of a vertical training apparatus applied to a GBDT model of passive data nodes according to another embodiment of the present application;
fig. 9-3 are schematic structural diagrams of a vertical training apparatus applied to a GBDT model of a passive data node according to another embodiment of the present disclosure;
fig. 10 is a schematic structural diagram of a vertical training apparatus of a GBDT model applied to a ciphertext computing node according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to provide an implementation scheme of an implementation scheme for improving the accuracy of prediction of wind power plant power by using a GBDT model, the embodiment of the application provides a wind power plant power prediction method, a GBDT model longitudinal training method and a device. And the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
The embodiment of the application provides a wind power plant power prediction method, which is applied to an active side data node in a training system, wherein the training system comprises: a plurality of data nodes and ciphertext computational nodes, the plurality of data nodes comprising: an active side data node and at least one passive side data node, as shown in fig. 1, the method includes:
step 11, obtaining node splitting criteria of each decision tree included in a pre-trained GBDT model, where the GBDT model is obtained by performing information interaction and data computation in a ciphertext manner for an active data node, a ciphertext computation node, and a passive data node, and training based on feature data of multiple samples held by each GBDT model, where the multiple data nodes have feature data of different types of features of the same sample, and the active data node also holds a target value, where the sample is represented by time, and the feature data held by the active data node includes: the target value of the wind farm power at a first preset number of moments before the moment of the wind farm is the wind farm power at a second preset number of moments after the moment of the wind farm;
step 12, aiming at the node splitting standard of each decision tree, sending the node splitting standard to a passive side data node which holds the characteristic corresponding to the node splitting standard, so that the passive side data node performs node splitting according to the received node splitting standard and based on the held characteristic data of the characteristic at the appointed moment of each wind power plant to obtain a node splitting result of the decision tree, wherein each wind power plant held by the passive side data node is a wind power plant participating in GBDT model training;
step 13, receiving a node splitting result sent by the passive side data node;
and 14, inputting the wind power characteristic data of the wind power plant to be predicted and the received node splitting result into the GBDT model for power prediction to obtain the wind power plant power of a second preset number of future moments after the specified moment of the wind power plant to be predicted, wherein the wind power characteristic data comprises the wind power plant power of a first preset number of historical moments before the specified moment of the wind power plant to be predicted.
By adopting the wind power plant power prediction method provided by the embodiment of the application, in the training process of the used GBDT model, the model is obtained by training based on the feature data of a plurality of different features held by a plurality of data nodes, and compared with the model obtained by training only using the feature data of the features held by the active data nodes, the GBDT model has higher prediction precision, so that more accurate wind power plant power can be obtained by using the GBDT model for power prediction.
In addition, in the process of using the GBDT model to predict the power of the wind power plant, the characteristic data of different characteristics of other wind power plants having a certain time and space relation with the wind power plant to be predicted can be used, and compared with the method for predicting the power based on the limited wind power characteristic data of the wind power plant to be predicted, the method can further improve the accuracy of prediction.
Further, in an embodiment of the present application, the feature data of the feature at the specified time of each wind farm, which is held by the passive data node, may further include: the predicted wind speeds at a third preset number of future moments after the specified moment of each wind farm;
correspondingly, in the process of GBDT model training, the characteristic data held by the passive data node includes: predicted wind speeds at a third preset number of times after the time of each wind farm.
In the embodiment of the application, the wind power plant to be predicted is one of the wind power plants which are held by the data node of the active side and used for carrying out GBDT model training.
In the practical application of the method for predicting the power of the wind farm provided by the embodiment of the application, the designated time can be selected based on the predicted need, and the first preset number, the second preset number and the third preset number can all be flexibly set based on the actual need, for example, the power of the wind farm in the wind power characteristic data can be the power of the wind farm at 40 historical times before the designated time, the predicted wind speed can be the predicted wind speed at 20 future times after the designated time, and the predicted power of the wind farm can be the power of the wind farm at 16 future times after the designated time, wherein in each time, the interval between every two adjacent times can be 15 minutes.
At present, in practical application of using a GBDT model to perform power prediction of a wind farm, a large amount of feature data of various features is often required when the GBDT model is trained, and some users of the GBDT model may not own feature data of sufficient kinds of features, so that a plurality of participants can share the feature data of the features held by the participants to perform training of the GBDT model.
In this case, the feature data of various features when the GBDT model is trained are held by different participants, for example, different participants hold power data and wind speed data of different wind farms, and it is not desirable to leak the feature data of the features held by the participants themselves, so that effective training of the GBDT model cannot be achieved.
In order to solve the above problem, an embodiment of the present application provides a vertical training scheme of a GBDT model, which is applied to a training system including data nodes and ciphertext computation nodes, as shown in fig. 2, where the data nodes include: an active side data node and at least one passive side data node.
Each data node in the training system belongs to one data provider, each data node has a plurality of same samples for training, each data node holds characteristic data of at least one characteristic of the samples, different data nodes can hold characteristic data of different characteristics, and the data nodes are mainly used for local characteristic data storage and plaintext calculation.
The master data node of the data nodes also holds a target value required for the GBDT model training for each sample, which may also be referred to as target data or label data, and may be the target value of each sample, for example.
In the embodiment of the present application, in order to implement longitudinal training, a time represents a sample, and a plurality of different times represent different samples, a plurality of times may be selected as a plurality of samples for training, and each data node has the same plurality of samples, for example, sample 1 is time 1, sample 2 is time 2, and sample 3 is time 3;
correspondingly, the characteristic data of different types of characteristics with time as a sample can be characteristic data of a certain characteristic of different wind farms, such as wind farm power of the wind farm 1 at time 1 and wind farm power of the wind farm 2 at time 1, or characteristic data of different characteristics of the same wind farm, such as wind farm power of the wind farm 3 at time 1 and wind speed of the wind farm 3 at time 1;
specifically, in this embodiment of the application, the characteristic data held by the master data node may include, by taking a time as a sample: the target value is the wind farm power at a second preset number of moments after the moment of the wind farm.
The ciphertext computing node implements ciphertext computation in the GBDT model training by using a ciphertext computing protocol, which may be a feasible protocol, for example, in this embodiment, an SS4 protocol, which is an encryption protocol based on Secret sharing (Secret sharing), may be used.
Multiple ciphertext computing nodes may be included, depending on the needs of the ciphertext computing protocol employed.
In the embodiment of the application, the longitudinal training of the GBDT model, namely the training of longitudinal split federal learning (fed learning), is completed among the driving side data node, the driven side data node and the ciphertext computing node together through information interaction and data computation, wherein the information interaction and the data computation between the ciphertext computing node and the data node adopt a ciphertext mode, so that each data node can be ensured not to reveal characteristic data which is characterized by itself.
Based on the training system, an embodiment of the present application provides a vertical training method for a GBDT model, which is applied to an active data node in the training system, as shown in fig. 3, and includes:
step 31, acquiring feature data and target values of each feature of a plurality of samples held by the user;
step 32, calculating training data of each feature according to a training mode of the GBDT model by using feature data and a target value of each feature of a plurality of samples held by the current layer of the current decision tree of the initial GBDT model;
step 33, receiving training data of each characteristic held by the passive data node and transmitted in a ciphertext mode of the ciphertext computing node, wherein the training data of each characteristic held by the passive data node is obtained by computing the ciphertext computing node according to the training mode of the GBDT model through information interaction and data computing between the ciphertext computing node and the passive data node and based on the characteristic data of each characteristic of a plurality of samples held by the passive data node;
and step 34, completing the training of the current layer according to the training mode of the GBDT model by using the training data of each characteristic held by the passive side data node and the received training data of each characteristic held by the passive side data node.
Correspondingly, an embodiment of the present application further provides a vertical GBDT model training method, which is applied to a passive data node in a training system, as shown in fig. 4, and includes:
step 41, acquiring feature data of each feature of a plurality of samples held by the user;
step 42, calculating training data of each feature held by the current decision tree of the initial GBDT model by the current layer of the current decision tree of the initial GBDT model based on the feature data of each feature of the plurality of samples held by the current layer and the ciphertext calculation node according to the training mode of the GBDT model, so that the ciphertext calculation node sends the training data of each feature held by the passive data node to the active data node in the ciphertext mode, so that the active data node uses the training data of each feature held by the active data node and the received training data of each feature held by the passive data node, and completes training of the current layer according to the training mode of the GBDT model, the training data of each feature held by the active data node uses the feature data and the target value of each feature of the plurality of samples held by the active data node, and calculating according to the training mode of the GBDT model.
Correspondingly, an embodiment of the present application further provides a method for vertical training of a GBDT model, which is applied to a ciphertext computing node in a training system, as shown in fig. 5, and includes:
step 51, aiming at the current layer of the current decision tree of the initial GBDT model, calculating training data of each characteristic held by the passive data node based on the characteristic data of each characteristic of a plurality of samples held by the passive data node according to the training mode of the GBDT model through information interaction and data calculation with the passive data node;
and step 52, transmitting the training data of each characteristic held by the passive data node to the active data node in a ciphertext mode, so that the active data node finishes training the current layer by using the training data of each characteristic held by the active data node and the received training data of each characteristic held by the passive data node according to the training mode of the GBDT model, and the training data of each characteristic held by the active data node is calculated by using the characteristic data and the target value of each characteristic of a plurality of samples held by the active data node for the active data node according to the training mode of the GBDT model.
By adopting the GBDT model longitudinal training method provided by the embodiment of the application, the characteristic data of various characteristics of the wind power plant held by different data nodes is used for carrying out the longitudinal training of the GBDT model, and the characteristic data of the sample held by each data node participating in the training is ensured not to be leaked.
The method and apparatus provided herein are described in detail below with reference to the accompanying drawings using specific embodiments.
The embodiment of the present application provides a vertical training method for a GBDT model, as shown in fig. 6, including the following steps:
step 601, the data node initializes data (data _ init).
In this step, data initialization is performed on all data nodes, and the original feature data held is initialized. Specifically, the discretizer can be generated in columns, and the function of the discretizer is to convert the original characteristic data of the floating point type into the discrete data of the integer type for the training of the subsequent GBDT model. The generated discretized data can be stored locally at the data node.
In the embodiment of the application, a time represents a sample, a plurality of different times represent different samples, a plurality of times can be selected as a plurality of samples for training, and each data node has a plurality of same samples, for example, sample 1 is time 1, sample 2 is time 2, and sample 3 is time 3;
correspondingly, the feature data of different types of features with the time as a sample can be the feature data of a certain feature of different wind power plants;
specifically, in this embodiment of the present application, the feature data held by the data node of the master takes a time as a sample, and includes: the wind farm power at a first preset number of moments before the moment of the wind farm, and the feature data held by the passive data node may include: predicted wind speeds at a third preset number of times after the time of each wind farm.
Step 602, the active side data node performs model initialization (model _ init) of the GBDT model to obtain an initial GBDT model, where the initial GBDT model includes multiple decision trees.
Step 603, the data node of the active party uses the first decision tree in the untrained decision trees as the current decision tree according to the arrangement sequence of the decision trees included in the initial GBDT model, performs tree initialization (tree _ init) on the current decision tree, after the current decision tree is initialized, the node structure of the current decision tree is already determined, and a plurality of samples for training are all distributed to the root node of the current decision tree.
In this step, in addition to determining the node structure of the current decision tree, the gradient of each sample may be calculated for the current decision tree, and the gradient of each sample in the multiple samples is calculated according to the loss function of the initial GBDT model, so as to be used for subsequent gradient aggregation and calculation of the score gain value.
In the embodiment of the present application, for the current decision tree, the gradient of each sample in the multiple samples may be specifically calculated by using the following formula:
Figure DEST_PATH_IMAGE001
Figure 941902DEST_PATH_IMAGE002
wherein the content of the first and second substances,
Figure DEST_PATH_IMAGE003
for the first of a plurality of samples
Figure 195484DEST_PATH_IMAGE004
The first order gradient of the individual samples,
Figure DEST_PATH_IMAGE005
is as follows
Figure 542283DEST_PATH_IMAGE004
The second order gradient of the individual samples,
Figure 596826DEST_PATH_IMAGE006
as a loss function of the initial GBDT model,
Figure DEST_PATH_IMAGE007
is as follows
Figure 370879DEST_PATH_IMAGE004
The target value for each of the samples is,
Figure 878083DEST_PATH_IMAGE008
to train the first
Figure DEST_PATH_IMAGE009
When making decision tree, before using
Figure 90890DEST_PATH_IMAGE010
A decision tree pair
Figure 937623DEST_PATH_IMAGE004
The sum of the predicted values for the prediction is performed for each sample.
The gradient of each sample generated in the step and the ciphertext mode are sent to the ciphertext computing node for subsequent gradient aggregation by the ciphertext computing node.
In the embodiment of the application, the target value is the power of the wind farm at a second preset number of moments after the moment of the wind farm.
Step 604, according to the arrangement order of the nodes of each layer included in the current decision tree (the order from the root node to the child node), taking the first layer of the untrained layers as the current layer, and performing layer initialization (tree _ depth _ init) on the current layer.
In this step, specifically, the master data node obtains node numbers of nodes of which a plurality of samples are located in the current layer, respectively, based on a node splitting result of a previous layer of the current layer, and when the current layer is a first layer to which the root node belongs, the plurality of samples are located in the root node.
The node numbers of the acquired samples can be represented by generating a node number vector.
Step 605, the master data node performs node number transmission (tree _ depth _ insts), that is, the node numbers of the obtained multiple samples are sent to the passive data node.
In this step, node numbers of a plurality of samples can also be forwarded to the passive data node through the ciphertext computing node.
Step 606, the data node executes characteristic value binning (tree _ depth _ split), that is, each data node performs binning on all samples included in the node according to the respective node numbers of the multiple samples and the number of bins of each characteristic held by the data node for each node of the current layer, so as to obtain a binning result, which is used as the binning result of the characteristic.
In this step, for a feature, binning all samples included in one node may be understood as dividing a plurality of continuous feature value intervals for the feature in advance, where each feature value interval corresponds to one bin, and according to feature data of the feature of a sample, allocating the sample to the bin corresponding to the feature value interval to which the feature data belongs, where a boundary of each feature value interval is equivalent to a boundary of the corresponding bin.
In this step, the binning operation is executed regardless of whether the active side data node or the passive side data node is used, and the passive side data node further sends the obtained binning result to the ciphertext calculation node.
Step 607, the master data node performs gradient aggregation (tree _ depth _ gradient), and the ciphertext computing node performs gradient aggregation (tree _ depth _ grad).
The active side data node respectively aggregates the gradients of the samples contained in the sub-boxes aiming at each sub-box of the sub-box result of each characteristic held by the active side data node to obtain a gradient aggregation result aiming at the characteristic, and the gradient aggregation result is used as the training data of the characteristic;
and the ciphertext computing node respectively aggregates the gradients of the samples included in the sub-boxes according to the ciphertext mode aiming at each sub-box of the sub-box result of each characteristic held by the passive data node based on the gradient of each sample received by the ciphertext mode and the sub-box result of each characteristic held by the passive data node to obtain the gradient aggregation result aiming at the characteristic as the training data of the characteristic.
And the ciphertext computing node sends the gradient aggregation result of each characteristic held by the passive data node to the data node of the active side in a ciphertext mode.
Step 608, the master data node performs node splitting (tree _ depth _ collect), that is, for various splitting standards that can be used for node splitting of the current layer, a score gain value for node splitting according to each splitting standard is calculated respectively by using a gradient aggregation result of each feature, and the splitting standard with the highest score gain value is used as the splitting standard of the current layer.
In this step, various splitting criteria are determined based on all the bin boundaries of all the features, for example, a node may be a splitting criterion according to a feature, which is a splitting criterion according to a feature, and if the feature data of the feature of a sample is smaller than the bin boundary, the sample is assigned to the left child node of the node, and if the feature data of the feature of the sample is not smaller than the bin boundary, the sample is assigned to the right child node of the node.
In this step, for each splitting standard that can be used for splitting the node of the current layer, the score gain value of each splitting standard may be specifically calculated by using the following formula:
Figure DEST_PATH_IMAGE011
wherein the content of the first and second substances,
Figure 944893DEST_PATH_IMAGE012
for the score gain value of the splitting criterion, the sample set
Figure DEST_PATH_IMAGE013
For node splitting according to the splitting criterion a set of samples assigned to the left child node, a set of samples
Figure 608568DEST_PATH_IMAGE014
For node splitting according to the splitting criterion the set of samples assigned to the right child node,
Figure DEST_PATH_IMAGE015
and
Figure 297170DEST_PATH_IMAGE016
is a preset parameter.
Wherein, the splitting criteria are determined according to the bin boundaries, so the sample set
Figure 60727DEST_PATH_IMAGE013
Gradient sum value of, sample set
Figure 238898DEST_PATH_IMAGE014
May be calculated based on the gradient aggregation result of each bin of each feature of each node of the current layer.
In this step, after the score gain values for node splitting according to each splitting criterion are respectively calculated and the splitting criterion of the current layer is selected, weights of the left child node and the right child node of each node of the current layer can be calculated according to the splitting criterion of the current layer.
Specifically, the following formula may be adopted to calculate the weights of the left child node and the right child node of each node of the current layer:
Figure DEST_PATH_IMAGE017
Figure 658378DEST_PATH_IMAGE018
wherein the content of the first and second substances,
Figure DEST_PATH_IMAGE019
is the weight of the left child node,
Figure 885091DEST_PATH_IMAGE020
is the weight of the right child node;
front side
Figure 440838DEST_PATH_IMAGE010
The first decision tree pair in each decision tree
Figure 914544DEST_PATH_IMAGE004
The predicted value of the sample is predicted according to the decision tree
Figure 761933DEST_PATH_IMAGE004
When the individual samples are classified, the
Figure 448129DEST_PATH_IMAGE004
The weight of the node where the sample is located.
Step 609, the active data node performs split information transfer (tree _ depth _ sendmatch), that is, the feature corresponding to the split standard of the current layer is sent to the passive data node having the feature.
In this step, the feature corresponding to the splitting criterion of the current layer may also be forwarded to the passive data node holding the feature through the ciphertext computing node.
In the embodiment of the present application, the splitting criterion may be represented by a feature and a feature threshold corresponding to the splitting criterion.
Step 610, the data node performs a split comparison (tree _ depth _ compare), that is, when the feature corresponding to the splitting criterion of the current layer includes a feature held by the data node, according to the splitting criterion of the current layer, the data node performs node splitting based on the feature data of the feature corresponding to the splitting criterion of multiple samples held by the data node, so as to obtain a node splitting result of the feature of the current layer, where the node splitting result can indicate to which child node of the node the sample of each node located at the current layer is to be allocated, that is, to which left child node or right child node of the node.
In this step, the active side data node and the passive side data node execute the step as long as the features corresponding to the splitting standard of the current layer include the features of the active side data node and the passive side data node.
In step 611, the passive data node performs the split result transmission (tree _ depth _ recompute), that is, the node split result of the characteristic owned by the passive data node itself is sent to the active data node.
In this step, the node splitting result of the characteristic held by the current layer itself may also be forwarded to the master data node through the ciphertext computing node.
In the embodiment of the application, the node splitting result obtained by the active side data node splitting the node according to the splitting standard and the node splitting result obtained by each passive side data node splitting the node according to the splitting standard are jointly used as the node splitting result of the current layer.
Step 612, after receiving the node splitting result sent by the passive data node, the active data node allocates each sample belonging to the node to the left child node or the right child node of the node according to the node splitting result of the current layer, and completes the training of the current layer (tree _ depth _ finish).
If the current layer is not the last layer of the current decision tree, go back to step 604, start training of the next layer of the current decision tree, and if the current layer is the last layer of the current decision tree, execute step 613.
Step 613, the data node of the active side generates a tree model of the current decision tree, i.e. the training of the current decision tree is completed (tree _ finish).
In this step, the cache data stored in the current decision tree may also be deleted.
If the current decision tree is not the last decision tree of the GBDT model, the above step 603 is returned to, training of the next decision tree of the GBDT model is started, and if the current decision tree is the last decision tree of the GBDT model, the following step 614 is performed.
And step 614, the active data node generates the GBDT model after training, namely, the model _ finish of the GBDT model is finished.
In this step, the cache data stored in the GBDT model may also be deleted.
By adopting the method for longitudinally training the GBDT model provided by the embodiment of the application, through the gradient aggregation step based on ciphertext calculation, the data of each participant can be ensured not to leak original characteristic data or key sensitive intermediate data in the training process of the model, and the balance between the algorithm safety and the algorithm operation efficiency can be better realized.
Based on the same inventive concept, according to the wind farm power prediction method provided in the above embodiment of the present application, correspondingly, another embodiment of the present application further provides a wind farm power prediction device, which is applied to an active data node in a training system, and the training system includes: a plurality of data nodes and ciphertext computational nodes, the plurality of data nodes comprising: an active side data node and at least one passive side data node, the apparatus shown in fig. 7, comprising:
a splitting criterion obtaining module 71, configured to obtain node splitting criteria of each decision tree included in a pre-trained GBDT model, where the GBDT model is obtained by performing information interaction and data computation in a ciphertext manner for an active data node, a ciphertext computation node, and a passive data node, and is obtained by performing training based on feature data of multiple samples that are respectively held, the multiple data nodes have feature data of different types of features of the same sample, and the active data node further holds a target value, where a sample is represented by time, and the feature data held by the active data node includes: the target value of the wind farm power at a first preset number of moments before the moment of the wind farm is the wind farm power at a second preset number of moments after the moment of the wind farm;
a splitting criterion sending module 72, configured to send the node splitting criterion to a passive data node that holds a feature corresponding to the node splitting criterion, so that the passive data node performs node splitting according to the received node splitting criterion and based on feature data of the feature at a specific time of each wind farm, to obtain a node splitting result of the decision tree, where each wind farm held by the passive data node is a wind farm participating in the GBDT model training;
a splitting result receiving module 73, configured to receive a node splitting result sent by a passive data node;
and the power prediction module 74 is configured to input the wind power characteristic data of the wind farm to be predicted and the received node splitting result into the GBDT model to perform power prediction, so as to obtain wind farm powers at a second preset number of future times after the specified time of the wind farm to be predicted, where the wind power characteristic data includes wind farm powers at a first preset number of historical times before the specified time of the wind farm to be predicted.
Further, the feature data of the feature at the specified time of each wind farm held by the passive data node includes: the predicted wind speeds at a third preset number of future moments after the specified moment of each wind farm;
in the process of GBDT model training, the characteristic data held by the passive data node includes: predicted wind speeds at a third preset number of times after the time of each wind farm.
The embodiment of the present application further provides a vertical training device of GBDT model, which is applied to an active data node in a training system, and the training system includes: a plurality of data nodes and ciphertext computational nodes, the plurality of data nodes comprising: an active data node and at least one passive data node, the plurality of data nodes having characteristic data of different kinds of characteristics of the same sample, the active data node further holding a target value, wherein the sample is represented by a time, the characteristic data held by the active data node includes: as shown in fig. 8-1, the device includes:
a feature data acquisition module 81 for acquiring feature data and a target value of each of a plurality of samples held by itself;
a training data calculation module 82, configured to calculate, for a current layer of a current decision tree of the initial GBDT model, training data of each feature according to a training mode of the GBDT model by using feature data and a target value of each feature of multiple samples held by the training data calculation module;
the training data receiving module 83 is configured to receive training data of each feature held by the passive data node and transmitted in a ciphertext mode of the ciphertext computing node, and the training data of each feature held by the passive data node, and calculate the ciphertext computing node based on the feature data of each feature of the multiple samples held by the passive data node according to the training mode of the GBDT model through information interaction and data computation with the passive data node;
and the model training module 84 is configured to complete training of the current layer according to the training mode of the GBDT model by using the training data of each feature held by the model training module and the received training data of each feature held by the passive data node.
Further, as shown in fig. 8-2, the method further includes:
a binning module 85, configured to obtain node numbers of nodes of a plurality of samples respectively located in a current layer based on a node splitting result of a previous layer of the current layer before calculating training data of each feature according to a training mode of a GBDT model by using feature data and a target value of each feature of the plurality of samples that are held by itself, where the plurality of samples are all located in a root node when the current layer is a first layer to which the root node belongs;
respectively carrying out box separation on all samples included in each node of the current layer according to the respective node numbers of a plurality of samples and the box separation number of each characteristic held by the node, so as to obtain a box separation result, wherein the box separation result is used as the box separation result of the characteristic;
the training data calculation module 82 is specifically configured to calculate training data of each feature according to the training mode of the GBDT model and the binning result, using the feature data and the target value of each feature of the multiple samples held by the training data calculation module.
Further, the training data calculation module 82 is specifically configured to calculate training data of each feature according to a training mode of the GBDT model and a binning result by using feature data and a target value of each feature of a plurality of samples held by the training data calculation module, and includes:
calculating the gradient of each sample in the plurality of samples by using a target value according to a loss function of the initial GBDT model aiming at the current decision tree;
aggregating the gradients of the samples included in the sub-boxes respectively aiming at each sub-box of the sub-box result of each characteristic held by the user, and obtaining a gradient aggregation result aiming at the characteristic as training data of the characteristic;
the training data receiving module 83 is specifically configured to receive a gradient aggregation result of each feature held by a passive data node, which is sent in a ciphertext computing node ciphertext manner, as training data of the feature, the gradient aggregation result of each feature held by the passive data node, and for each sub-box of the ciphertext computing node, which is respectively for each sub-box of the sub-box result of each feature held by the passive data node, according to the ciphertext manner, the gradients of the samples included in the sub-box are aggregated, and the gradients of each sample are sent to the ciphertext computing node in the ciphertext manner, and the sub-box result of each feature held by the passive data node is obtained by sub-box the passive data node;
the model training module 84 is specifically configured to, for various splitting criteria that can be used for performing node splitting of the current layer, use the gradient aggregation result of each feature to calculate a score gain value for performing node splitting according to each splitting criterion, where each splitting criterion is a splitting criterion determined based on all bin boundaries of all features and having a highest score gain value, and is used as the splitting criterion of the current layer.
Further, the model training module 84 is further configured to, when the current layer is not the last layer of the last decision tree, perform node splitting according to the splitting criterion of the current layer based on feature data of features corresponding to the splitting criterion of multiple samples through information interaction and data calculation with the passive data node to obtain a node splitting result of the current layer, when the current layer is the last layer of the current decision tree, the training of the current decision tree is completed, and when the current layer is the last layer of the last decision tree, the training of the GBDT model is completed.
Further, the characteristic data held by the passive data node includes: predicted wind speeds at a third preset number of times after the time of each wind farm.
The embodiment of the present application further provides a vertical training device of GBDT model, which is applied to a passive data node in a training system, where the training system includes: a plurality of data nodes and ciphertext computational nodes, the plurality of data nodes comprising: an active data node and at least one passive data node, the plurality of data nodes having characteristic data of different kinds of characteristics of the same sample, the active data node further holding a target value, wherein the sample is represented by a time, the characteristic data held by the active data node includes: as shown in fig. 9-1, the device includes:
a feature data acquiring module 91 configured to acquire feature data of each of a plurality of samples held by the self;
a training data calculation module 92, configured to calculate training data of each feature held by a current decision tree of the initial GBDT model according to a training mode of the GBDT model based on feature data of each feature of multiple samples held by the current decision tree of the initial GBDT model by information interaction and data calculation with a ciphertext calculation node, so that the ciphertext calculation node sends the training data of each feature held by the passive data node to an active data node in a ciphertext mode, so that the active data node uses the training data of each feature held by the active data node and the received training data of each feature held by the passive data node, and completes training of the current decision tree according to the training mode of the GBDT model, the training data of each feature held by the active data node uses the feature data and a target value of each feature of the multiple samples held by the active data node, and calculating according to the training mode of the GBDT model.
Further, as shown in fig. 9-2, the method further includes:
the binning module 93 is configured to receive node numbers of nodes of the multiple samples, which are located in a current layer, of the multiple samples before calculating training data of each feature of the multiple samples, which is held by the binning module, according to a training mode of the GBDT model based on feature data of each feature of the multiple samples, which is held by the binning module, through information interaction and data calculation with a ciphertext calculation node, and before calculating the training data of each feature held by the binning module, which is held by the binning module, according to a node number of a previous layer of the current layer, where the node number of each of the multiple samples is obtained by an active data node based on a node splitting result of the previous layer of the current layer, and when the current layer is a first layer to which a root node belongs, the multiple samples are located in the root node;
respectively carrying out box separation on all samples included in each node of the current layer according to the respective node numbers of a plurality of samples and the box separation number of each characteristic held by the node, so as to obtain a box separation result, wherein the box separation result is used as the box separation result of the characteristic;
the training data calculation module 92 is specifically configured to calculate, through information interaction and data calculation with the ciphertext calculation node, training data of each feature that is held by itself based on feature data of each feature of multiple samples that is held by itself according to a training mode of the GBDT model and a binning result of each feature.
Further, the training data calculation module 92 is specifically configured to send the binning result of each feature held by the ciphertext calculation node to the ciphertext calculation node, so that the ciphertext calculation node aggregates the gradients of the samples included in the binning according to a ciphertext manner for each binning result of each feature held by the passive data node to obtain a gradient aggregation result of each feature held by the passive data node, and uses the gradient aggregation result of each feature to calculate a score gain value for performing node splitting according to each splitting criterion for each splitting criterion determined based on all binning boundaries of all features, and the division standard with the highest scoring gain value is used as the division standard of the current layer, the gradient aggregation result of each characteristic held by the data node of the active side is obtained by aggregating the gradients of the samples included in the sub-box for each sub-box of the sub-box result of each characteristic held by the data node of the active side.
Further, as shown in fig. 9-3, the method further includes:
and a model training module 94, configured to perform node splitting according to the splitting criterion of the current layer based on feature data of features corresponding to the splitting criterion of multiple samples through information interaction and data calculation with a master data node when the current layer is not the last layer of the last decision tree, to obtain a node splitting result of the current layer, where training of the current decision tree is completed when the current layer is the last layer of the current decision tree, and training of the GBDT model is completed when the current layer is the last layer of the last decision tree.
Further, the characteristic data held by the passive data node includes: predicted wind speeds at a third preset number of times after the time of each wind farm.
The embodiment of the present application further provides a vertical training device of GBDT model, which is applied to ciphertext computing nodes in a training system, where the training system includes: a plurality of data nodes and ciphertext computational nodes, the plurality of data nodes comprising: an active data node and at least one passive data node, the plurality of data nodes having characteristic data of different kinds of characteristics of the same sample, the active data node further holding a target value, wherein the sample is represented by a time, the characteristic data held by the active data node includes: as shown in fig. 10, the device includes:
a training data calculation module 101, configured to calculate, based on feature data of each feature of multiple samples held by a passive data node, training data of each feature held by the passive data node according to a training mode of a GBDT model, through information interaction and data calculation with the passive data node for a current layer of a current decision tree of an initial GBDT model;
the training data sending module 102 is configured to send training data of each feature held by the passive data node to the active data node ciphertext mode, so that the active data node uses the training data of each feature held by itself and receives the training data of each feature held by the passive data node, and completes training of the current layer according to the training mode of the GBDT model, the training data of each feature held by the active data node uses the feature data and the target value of each feature of multiple samples held by itself for the active data node, and the training data are calculated according to the training mode of the GBDT model.
Further, the training data calculation module 101 is specifically configured to receive a binning result of each held feature sent by a passive data node, where the binning result is obtained by binning, according to the binning number of each feature held by the passive data node, all samples included in the node based on the node numbers of the nodes of the multiple samples located in the current layer, respectively for each node of the current layer, where the node numbers of the multiple samples are obtained by an active data node based on the node splitting result of the previous layer of the current layer, and when the current layer is a first layer to which a root node belongs, the multiple samples are located in the root node;
receiving the gradient of each sample sent by the data node ciphertext mode of the active side, wherein the gradient of each sample is obtained by calculating the target value of the data node of the active side aiming at the current decision tree according to the loss function of the initial GBDT model;
respectively aggregating the gradients of the samples contained in the sub-boxes according to a ciphertext mode aiming at each sub-box of the sub-box result of each characteristic held by the passive data node to obtain a gradient aggregation result aiming at the characteristic, and using the gradient aggregation result as the training data of the characteristic;
the training data sending module 102 is specifically configured to send a gradient aggregation result of each feature held by the passive data node to the active data node in a ciphertext manner, so that the active data node uses the gradient aggregation result of each feature to respectively calculate a score gain value for node splitting according to each splitting standard for various splitting standards that can be used for node splitting of a current layer, each splitting standard is a splitting standard that is determined based on all bin boundaries of all features and has the highest score gain value, and is used as a splitting standard of the current layer, and the gradient aggregation result of each feature held by the active data node is obtained by aggregating gradients of samples included in each bin for each bin of bin results of each feature held by the active data node.
Further, the characteristic data held by the passive data node includes: predicted wind speeds at a third preset number of times after the time of each wind farm.
The functions of the above modules may correspond to the corresponding processing steps in the flows shown in fig. 1 to fig. 6, and are not described herein again.
The above-described apparatuses provided in the embodiments of the present application can be realized by a computer program. It should be understood by those skilled in the art that the above-mentioned division of modules is only one of many divisions of modules, and if the division into other modules or no division into modules is performed, it is within the scope of the present application as long as the above-mentioned devices have the above-mentioned functions.
Embodiments of the present application further provide an electronic device, as shown in fig. 11, including a processor 111 and a machine-readable storage medium 112, where the machine-readable storage medium 112 stores machine-executable instructions capable of being executed by the processor 111, and the processor 111 is caused by the machine-executable instructions to: the method for predicting the power of the wind power plant is realized, or the method for longitudinally training the GBDT model applied to the data node of the active side is realized, the method for longitudinally training the GBDT model applied to the data node of the passive side is realized, and the method for longitudinally training the GBDT model applied to the ciphertext computing node is realized.
An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when being executed by a processor, the computer program implements any one of the above-mentioned wind farm power prediction methods, or implements any one of the above-mentioned GBDT model longitudinal training methods applied to an active-side data node, implements any one of the above-mentioned GBDT model longitudinal training methods applied to a passive-side data node, and implements any one of the above-mentioned GBDT model longitudinal training methods applied to a ciphertext computing node.
The embodiment of the present application further provides a computer program product containing instructions, which when run on a computer, enables the computer to implement any of the above-mentioned wind farm power prediction methods, or implement any of the above-mentioned GBDT model longitudinal training methods applied to an active data node, implement any of the above-mentioned GBDT model longitudinal training methods applied to a passive data node, and implement any of the above-mentioned GBDT model longitudinal training methods applied to a ciphertext computing node.
The machine-readable storage medium in the electronic device may include a Random Access Memory (RAM) and a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus, the electronic device, the computer-readable storage medium, and the computer program product embodiment, since they are substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (21)

1. A wind power plant power prediction method is applied to an active side data node in a training system, and the training system comprises: a plurality of data nodes and ciphertext computational nodes, the plurality of data nodes comprising: an active side data node and at least one passive side data node, the method comprising:
the method includes the steps of obtaining node splitting standards of decision trees included in a pre-trained gradient boosting decision tree GBDT model, wherein the GBDT model is obtained by training on the basis of feature data of a plurality of samples held by an active data node, a ciphertext computing node and a passive data node through information interaction and data computation in a ciphertext mode, the data nodes have feature data of different types of features of the same sample, the active data node further holds a target value, the sample is represented by time, different samples are represented by different times, the multiple times are selected as the samples used for training, and the feature data held by the active data node includes: the target value of the wind farm power at a first preset number of moments before the moment of the wind farm is the wind farm power at a second preset number of moments after the moment of the wind farm;
aiming at the node splitting standard of each decision tree, sending the node splitting standard to the passive side data node which holds the characteristic corresponding to the node splitting standard, so that the passive side data node performs node splitting according to the received node splitting standard and based on the characteristic data of the characteristic at the appointed moment of each wind power plant to obtain the node splitting result of the decision tree, wherein each wind power plant held by the passive side data node is the wind power plant participating in the GBDT model training;
receiving the node splitting result sent by the passive data node;
and inputting the wind power characteristic data of the wind power plant to be predicted and the received node splitting result into the GBDT model for power prediction to obtain the wind power plant power of the wind power plant at the second preset number of future moments after the specified moment of the wind power plant to be predicted, wherein the wind power characteristic data comprises the wind power plant power of the wind power plant at the first preset number of historical moments before the specified moment of the wind power plant to be predicted.
2. The method of claim 1, wherein the characteristic data for the characteristic at the specified time for each wind farm maintained by the passive data node comprises: the predicted wind speeds at a third preset number of future moments after the specified moment of each wind farm;
in the process of the GBDT model training, the feature data held by the passive data node includes: predicted wind speeds at a third preset number of times after the time of each wind farm.
3. A method for vertical training of a GBDT model is applied to an active data node in a training system, and the training system comprises: a plurality of data nodes and ciphertext computational nodes, the plurality of data nodes comprising: an active data node and at least one passive data node, the plurality of data nodes having feature data of different kinds of features of the same sample, the active data node further holding a target value, wherein the sample is represented by a time, different times represent different samples, the times are selected as the samples for training, and the feature data held by the active data node includes: the method comprises the following steps that wind farm power of a first preset number of moments before the moment of the wind farm is obtained, and a target value is the wind farm power of a second preset number of moments after the moment of the wind farm, and the method comprises the following steps:
acquiring feature data and a target value of each feature of a plurality of samples held by the user;
calculating training data of each characteristic according to a training mode of the GBDT model by using characteristic data and a target value of each characteristic of a plurality of samples held by the current layer of the current decision tree of the initial GBDT model;
receiving training data of each characteristic held by the passive data node, which is sent by the ciphertext computing node in a ciphertext mode, wherein the training data of each characteristic held by the passive data node is obtained by computing the ciphertext computing node according to a training mode of a GBDT model through information interaction and data computing between the ciphertext computing node and the passive data node and based on the characteristic data of each characteristic of the multiple samples held by the passive data node;
and completing the training of the current layer according to the training mode of the GBDT model by using the training data of each characteristic held by the passive data node and the received training data of each characteristic held by the passive data node.
4. The method according to claim 3, wherein before the calculating the training data of each feature using the feature data and the target value of each feature of the plurality of samples owned by the user in the training manner of the GBDT model, the method further comprises:
obtaining node numbers of nodes of a plurality of samples respectively located in the current layer based on a node splitting result of a layer above the current layer, wherein when the current layer is a first layer to which a root node belongs, the plurality of samples are located in the root node;
respectively performing binning on all samples included in each node of the current layer according to the respective node numbers of the multiple samples and the binning number of each feature held by the node, so as to obtain binning results, wherein the binning results serve as the binning results of the features;
the calculating the training data of each feature according to the training mode of the GBDT model by using the feature data and the target value of each feature of a plurality of samples held by the GBDT model comprises the following steps:
and calculating the training data of each characteristic according to the training mode of the GBDT model and the classification result by using the characteristic data and the target value of each characteristic of a plurality of samples held by the user.
5. The method according to claim 4, wherein the calculating of the training data of each feature using the feature data and the target value of each feature of the plurality of samples owned by the user according to the training mode of the GBDT model and the binning result comprises:
calculating a gradient for each of the plurality of samples for the current decision tree using the target value according to a penalty function of the initial GBDT model;
aggregating the gradients of the samples included in the sub-boxes respectively aiming at each sub-box of the sub-box result of each characteristic held by the user, and obtaining a gradient aggregation result aiming at the characteristic as training data of the characteristic;
the receiving of the training data of each feature held by the passive data node sent in the ciphertext computing node ciphertext manner includes:
receiving a gradient aggregation result of each feature held by the passive data node, which is sent by the ciphertext computing node in a ciphertext mode, as training data of the feature, wherein the gradient aggregation result of each feature held by the passive data node is obtained by aggregating, according to the ciphertext mode, gradients of samples included in each sub-box for each sub-box of a sub-box result of each feature held by the passive data node for the ciphertext computing node, the gradient of each sample is sent to the ciphertext computing node in the ciphertext mode, and the sub-box result of each feature held by the passive data node is obtained by sub-box the sample for the passive data node;
the training of the current layer is completed by using the training data of each characteristic held by the passive data node and the received training data of each characteristic held by the passive data node according to a training mode of a GBDT model, and the training comprises the following steps:
and calculating a score gain value for node splitting according to each splitting standard by using a gradient aggregation result of each feature for various splitting standards which can be used for node splitting of the current layer, wherein the various splitting standards are determined based on all box boundaries of all features and are used as the splitting standard of the current layer, and the splitting standard has the highest score gain value.
6. The method of claim 5, further comprising:
when the current layer is not the last layer of the last decision tree, performing node splitting according to the splitting standard of the current layer and based on the feature data of the features corresponding to the splitting standard of the multiple samples through information interaction and data calculation with the passive data nodes to obtain a node splitting result of the current layer, when the current layer is the last layer of the current decision tree, finishing the training of the current decision tree, and when the current layer is the last layer of the last decision tree, finishing the training of a GBDT model.
7. The method according to any of claims 3-6, wherein the feature data held by the passive data node comprises: predicted wind speeds at a third preset number of times after the time of each wind farm.
8. A method for vertical training of a gradient boosting decision tree GBDT model is applied to a passive data node in a training system, and the training system comprises: a plurality of data nodes and ciphertext computational nodes, the plurality of data nodes comprising: an active data node and at least one passive data node, the plurality of data nodes having feature data of different kinds of features of the same sample, the active data node further holding a target value, wherein the sample is represented by a time, different times represent different samples, the times are selected as the samples for training, and the feature data held by the active data node includes: the method comprises the following steps that wind farm power of a first preset number of moments before the moment of the wind farm is obtained, and a target value is the wind farm power of a second preset number of moments after the moment of the wind farm, and the method comprises the following steps:
acquiring feature data of each feature of a plurality of samples held by the user;
aiming at the current layer of the current decision tree of the initial GBDT model, calculating training data of each characteristic held by the ciphertext calculation node based on the characteristic data of each characteristic of a plurality of samples held by the ciphertext calculation node and the data calculation according to the training mode of the GBDT model, so that the ciphertext calculation node sends the training data of each characteristic held by the passive data node to the active data node in a ciphertext mode, so that the active data node uses the training data of each characteristic held by the active data node and receives the training data of each characteristic held by the passive data node, and completes the training of the current layer according to the training mode of the GBDT model, the training data of each characteristic held by the active data node uses the characteristic data and the target value of each characteristic of a plurality of samples held by the active data node, and calculating according to the training mode of the GBDT model.
9. The method according to claim 8, further comprising, before the computing training data of each feature owned by itself based on the feature data of each feature of the plurality of samples owned by itself in the training manner of the GBDT model through information interaction and data computation with the ciphertext computing node, the method further comprising:
receiving node numbers of nodes of a plurality of samples respectively located on the current layer, wherein the node numbers of the samples are obtained by the data node of the active side based on a node splitting result of a layer above the current layer, and when the current layer is a first layer to which a root node belongs, the samples are all located on the root node;
respectively performing binning on all samples included in each node of the current layer according to the respective node numbers of the multiple samples and the binning number of each feature held by the node, so as to obtain binning results, wherein the binning results serve as the binning results of the features;
the calculating, by information interaction and data calculation with the ciphertext computing node, training data of each feature owned by itself based on feature data of each feature of a plurality of samples owned by itself according to a training mode of a GBDT model includes:
and calculating the training data of each characteristic held by the node on the basis of the characteristic data of each characteristic of a plurality of samples held by the node and according to the training mode of the GBDT model and the box separation result of each characteristic through information interaction and data calculation with the ciphertext calculation node.
10. The method of claim 9, wherein the computing training data of each characteristic owned by the ciphertext computing node based on the characteristic data of each characteristic of the plurality of samples owned by the ciphertext computing node according to the training mode of the GBDT model and the binning result of each characteristic comprises:
sending the binning result of each characteristic held by the ciphertext computing node to the ciphertext computing node, so that the ciphertext computing node respectively aggregates the gradients of the samples included in the binning according to a ciphertext mode aiming at each binning result of each characteristic held by the passive data node to obtain a gradient aggregation result of each characteristic held by the passive data node, wherein the gradient of each sample is sent to the ciphertext computing node in the ciphertext mode of the active data node, so that the active data node respectively calculates a scoring gain value for node splitting according to each splitting standard by using the gradient aggregation result of each characteristic aiming at each splitting standard capable of being used for node splitting of the current layer, and each splitting standard is determined based on all binning boundaries of all characteristics, and the division standard with the highest scoring gain value is used as the division standard of the current layer, and the gradient aggregation result of each characteristic held by the data node of the active party is obtained by aggregating the gradients of the samples included in the sub-box for each sub-box of the sub-box result of each characteristic held by the data node of the active party respectively.
11. The method of claim 10, further comprising:
when the current layer is not the last layer of the last decision tree, performing node splitting according to the splitting standard of the current layer and based on the feature data of the feature corresponding to the splitting standard of the multiple samples through information interaction and data calculation with the master data node to obtain a node splitting result of the current layer, when the current layer is the last layer of the current decision tree, finishing training of the current decision tree, and when the current layer is the last layer of the last decision tree, finishing training of a GBDT model.
12. The method according to any of claims 8-11, wherein the feature data held by the passive data node comprises: predicted wind speeds at a third preset number of times after the time of each wind farm.
13. A method for longitudinally training a gradient boosting decision tree GBDT model is applied to ciphertext computing nodes in a training system, and the training system comprises: a plurality of data nodes and ciphertext computational nodes, the plurality of data nodes comprising: an active data node and at least one passive data node, the plurality of data nodes having feature data of different kinds of features of the same sample, the active data node further holding a target value, wherein the sample is represented by a time, different times represent different samples, the times are selected as the samples for training, and the feature data held by the active data node includes: the method comprises the following steps that wind farm power of a first preset number of moments before the moment of the wind farm is obtained, and a target value is the wind farm power of a second preset number of moments after the moment of the wind farm, and the method comprises the following steps:
calculating training data of each feature held by the passive data node according to a training mode of the GBDT model based on feature data of each feature of a plurality of samples held by the passive data node through information interaction and data calculation between the current layer of a current decision tree of an initial GBDT model and the passive data node;
and sending training data of each characteristic held by the passive data node to the active data node in a ciphertext mode, so that the active data node completes training of the current layer by using the training data of each characteristic held by the active data node and the received training data of each characteristic held by the passive data node according to the training mode of the GBDT model, and the training data of each characteristic held by the active data node is calculated by using the characteristic data and the target value of each characteristic of a plurality of samples held by the active data node and the training mode of the GBDT model.
14. The method of claim 13, wherein the computing training data for each feature held by the passive data node based on the feature data for each feature of the plurality of samples held by the passive data node in a manner trained by a GBDT model through information interaction and data computation with the passive data node comprises:
receiving a binning result of each held characteristic sent by the passive data node, where the binning result is obtained by binning all samples included in the node by the passive data node for each node of the current layer based on a node number of a node where a plurality of samples are located in the current layer, and according to a binning number of each characteristic held by the passive data node, where the node number of the plurality of samples is obtained by the active data node based on a node splitting result of a previous layer of the current layer, and when the current layer is a first layer to which a root node belongs, the plurality of samples are located in the root node;
receiving the gradient of each sample sent by the master data node in a ciphertext mode, wherein the gradient of each sample is calculated by the master data node according to the loss function of the initial GBDT model and the target value aiming at the current decision tree;
respectively aggregating the gradients of the samples included in the sub-boxes according to a ciphertext mode aiming at each sub-box of the sub-box result of each characteristic held by the passive side data node to obtain a gradient aggregation result aiming at the characteristic, and using the gradient aggregation result as the training data of the characteristic;
the sending of the training data of each feature held by the passive data node to the master data node ciphertext mode includes:
sending the gradient aggregation result of each feature held by the passive data node to the master data node in a ciphertext manner, so that the master data node uses the gradient aggregation result of each feature to calculate a score gain value for node splitting according to each splitting standard for various splitting standards capable of being used for node splitting of the current layer, the splitting standard is determined based on all box boundaries of all features and is the splitting standard with the highest score gain value, the score gain value is used as the splitting standard of the current layer, the gradient aggregation result of each feature held by the master data node is obtained by aggregating the gradient of samples included in each box for each box of the box results of each feature held by the master data node.
15. The method according to claim 13 or 14, wherein the feature data held by the passive data node comprises: predicted wind speeds at a third preset number of times after the time of each wind farm.
16. A wind power plant power prediction device is applied to an active data node in a training system, and the training system comprises: a plurality of data nodes and ciphertext computational nodes, the plurality of data nodes comprising: an active side data node and at least one passive side data node, the apparatus comprising:
a splitting criterion obtaining module, configured to obtain node splitting criteria of each decision tree included in a pre-trained GBDT model, where the GBDT model is obtained by performing information interaction and data computation in a ciphertext manner for the active data node, the ciphertext computation node, and the passive data node, and training based on feature data of multiple samples that are respectively held, where the multiple data nodes have feature data of different types of features of the same sample, and the active data node further holds a target value, where a time represents a sample, a plurality of different times represent different samples, and a plurality of times are selected as the multiple samples for training, where the feature data held by the active data node includes: the target value of the wind farm power at a first preset number of moments before the moment of the wind farm is the wind farm power at a second preset number of moments after the moment of the wind farm;
a splitting standard sending module, configured to send a node splitting standard to the passive data node having the feature corresponding to the node splitting standard, so that the passive data node performs node splitting according to the received node splitting standard and based on the feature data of the feature at the specified time of each wind farm, so as to obtain a node splitting result of the decision tree, where each wind farm held by the passive data node is a wind farm participating in the GBDT model training;
a splitting result receiving module, configured to receive the node splitting result sent by the passive data node;
and the power prediction module is used for inputting the wind power characteristic data of the wind power plant to be predicted and the received node splitting result into the GBDT model for power prediction to obtain the wind power plant power of the wind power plant at the second preset number of future moments after the specified moment of the wind power plant to be predicted, wherein the wind power characteristic data comprises the wind power plant power of the wind power plant at the first preset number of historical moments before the specified moment of the wind power plant to be predicted.
17. A vertical training device of a GBDT model for gradient boosting decision trees is applied to an active data node in a training system, and the training system comprises: a plurality of data nodes and ciphertext computational nodes, the plurality of data nodes comprising: an active data node and at least one passive data node, the plurality of data nodes having feature data of different kinds of features of the same sample, the active data node further holding a target value, wherein the sample is represented by a time, different times represent different samples, the times are selected as the samples for training, and the feature data held by the active data node includes: the device comprises the following steps that the wind farm power of the wind farm at a first preset number of moments before the moment is targeted, and the target value is the wind farm power of the wind farm at a second preset number of moments after the moment, wherein the device comprises:
the characteristic data acquisition module is used for acquiring characteristic data and a target value of each characteristic of a plurality of samples held by the characteristic data acquisition module;
the training data calculation module is used for calculating the training data of each characteristic by using the characteristic data and the target value of each characteristic of a plurality of samples held by the training data calculation module per se according to the training mode of the GBDT model aiming at the current layer of the current decision tree of the initial GBDT model;
a training data receiving module, configured to receive training data of each feature held by the passive data node, where the training data of each feature is sent in a ciphertext mode of the ciphertext computing node, and the training data of each feature held by the passive data node is obtained by computing, for the ciphertext computing node, in a training mode of a GBDT model based on feature data of each feature of the multiple samples held by the passive data node through information interaction and data computation with the passive data node;
and the model training module is used for completing the training of the current layer according to the training mode of the GBDT model by using the training data of each characteristic held by the model training module and the received training data of each characteristic held by the passive side data node.
18. A Gradient Boost Decision Tree (GBDT) model longitudinal training device applied to a passive data node in a training system, the training system comprising: a plurality of data nodes and ciphertext computational nodes, the plurality of data nodes comprising: an active data node and at least one passive data node, the plurality of data nodes having feature data of different kinds of features of the same sample, the active data node further holding a target value, wherein the sample is represented by a time, different times represent different samples, the times are selected as the samples for training, and the feature data held by the active data node includes: the device comprises the following steps that the wind farm power of the wind farm at a first preset number of moments before the moment is targeted, and the target value is the wind farm power of the wind farm at a second preset number of moments after the moment, wherein the device comprises:
the characteristic data acquisition module is used for acquiring characteristic data of each characteristic of a plurality of samples held by the characteristic data acquisition module;
a training data calculation module, configured to calculate, for a current layer of a current decision tree of an initial GBDT model, training data for each feature of a plurality of samples held by the current layer, based on feature data for each feature of the plurality of samples held by the current layer and data calculation, according to a training mode of the GBDT model, so that the ciphertext calculation node sends the training data for each feature held by the passive data node to the active data node in a ciphertext mode, so that the active data node uses the training data for each feature held by the active data node and receives the training data for each feature held by the passive data node, and completes training for the current layer according to the training mode of the GBDT model, and the training data for each feature held by the active data node uses the feature data and a target value for each feature of the plurality of samples held by the active data node, and calculating according to the training mode of the GBDT model.
19. A gradient boosting decision tree GBDT model longitudinal training device is applied to ciphertext computing nodes in a training system, and the training system comprises: a plurality of data nodes and ciphertext computational nodes, the plurality of data nodes comprising: an active data node and at least one passive data node, the plurality of data nodes having feature data of different kinds of features of the same sample, the active data node further holding a target value, wherein the sample is represented by a time, different times represent different samples, the times are selected as the samples for training, and the feature data held by the active data node includes: the device comprises the following steps that the wind farm power of the wind farm at a first preset number of moments before the moment is targeted, and the target value is the wind farm power of the wind farm at a second preset number of moments after the moment, wherein the device comprises:
a training data calculation module, configured to calculate, for a current layer of a current decision tree of an initial GBDT model, training data of each feature held by a passive data node according to a training mode of the GBDT model based on feature data of each feature of a plurality of samples held by the passive data node through information interaction and data calculation with the passive data node;
and a training data sending module, configured to send training data of each feature held by the passive data node to the active data node in a ciphertext manner, so that the active data node uses the training data of each feature held by itself, and receives the training data of each feature held by the passive data node, and completes training of the current layer according to the training manner of the GBDT model, where the training data of each feature held by the active data node is calculated for the active data node using the feature data and the target value of each feature of multiple samples held by itself according to the training manner of the GBDT model.
20. An electronic device comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to: implementing the method of any one of claims 1-2, or implementing the method of any one of claims 3-7, implementing the method of any one of claims 8-12, implementing the method of any one of claims 13-15.
21. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method of any one of claims 1 to 2, or carries out the method of any one of claims 3 to 7, carries out the method of any one of claims 8 to 12, and carries out the method of any one of claims 13 to 15.
CN202210110542.9A 2022-01-29 2022-01-29 Wind power plant power prediction method, GBDT model longitudinal training method and device Active CN114118641B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210110542.9A CN114118641B (en) 2022-01-29 2022-01-29 Wind power plant power prediction method, GBDT model longitudinal training method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210110542.9A CN114118641B (en) 2022-01-29 2022-01-29 Wind power plant power prediction method, GBDT model longitudinal training method and device

Publications (2)

Publication Number Publication Date
CN114118641A CN114118641A (en) 2022-03-01
CN114118641B true CN114118641B (en) 2022-04-19

Family

ID=80361756

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210110542.9A Active CN114118641B (en) 2022-01-29 2022-01-29 Wind power plant power prediction method, GBDT model longitudinal training method and device

Country Status (1)

Country Link
CN (1) CN114118641B (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103699944A (en) * 2013-12-31 2014-04-02 国电南京自动化股份有限公司 Wind and photovoltaic generation power prediction system with multiple prediction modes
CN107180192A (en) * 2017-05-09 2017-09-19 北京理工大学 Android malicious application detection method and system based on multi-feature fusion
CN108875955A (en) * 2017-05-10 2018-11-23 腾讯科技(深圳)有限公司 Gradient based on parameter server promotes the implementation method and relevant device of decision tree
CN111695697A (en) * 2020-06-12 2020-09-22 深圳前海微众银行股份有限公司 Multi-party combined decision tree construction method and device and readable storage medium
CN112084519A (en) * 2020-09-18 2020-12-15 支付宝(杭州)信息技术有限公司 GBDT model training method and device based on access mode protection
CN112418653A (en) * 2020-11-19 2021-02-26 重庆邮电大学 Number portability and network diver identification system and method based on machine learning algorithm
CN112508299A (en) * 2020-12-18 2021-03-16 南方电网科学研究院有限责任公司 Power load prediction method and device, terminal equipment and storage medium
WO2021081445A1 (en) * 2019-10-25 2021-04-29 Xy.Health, Inc. System and method with federated learning model for geotemporal data associated medical prediction applications
CN112926064A (en) * 2021-02-08 2021-06-08 华控清交信息科技(北京)有限公司 Model training method and device, data processing system and electronic equipment
CN113392164A (en) * 2020-03-13 2021-09-14 京东城市(北京)数字科技有限公司 Method, main server, service platform and system for constructing longitudinal federated tree
CN113515760A (en) * 2021-05-28 2021-10-19 平安国际智慧城市科技股份有限公司 Horizontal federal learning method, device, computer equipment and storage medium
CN113688999A (en) * 2021-08-23 2021-11-23 神州融安科技(北京)有限公司 Training method of transverse federated xgboost decision tree
CN113947211A (en) * 2021-10-11 2022-01-18 京东科技控股股份有限公司 Federal learning model training method and device, electronic equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108539738B (en) * 2018-05-10 2020-04-21 国网山东省电力公司电力科学研究院 Short-term load prediction method based on gradient lifting decision tree
CN111598186B (en) * 2020-06-05 2021-07-16 腾讯科技(深圳)有限公司 Decision model training method, prediction method and device based on longitudinal federal learning
CN113887141A (en) * 2021-10-14 2022-01-04 中国科学院电工研究所 Micro-grid group operation strategy evolution method based on federal learning

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103699944A (en) * 2013-12-31 2014-04-02 国电南京自动化股份有限公司 Wind and photovoltaic generation power prediction system with multiple prediction modes
CN107180192A (en) * 2017-05-09 2017-09-19 北京理工大学 Android malicious application detection method and system based on multi-feature fusion
CN108875955A (en) * 2017-05-10 2018-11-23 腾讯科技(深圳)有限公司 Gradient based on parameter server promotes the implementation method and relevant device of decision tree
WO2021081445A1 (en) * 2019-10-25 2021-04-29 Xy.Health, Inc. System and method with federated learning model for geotemporal data associated medical prediction applications
CN113392164A (en) * 2020-03-13 2021-09-14 京东城市(北京)数字科技有限公司 Method, main server, service platform and system for constructing longitudinal federated tree
CN111695697A (en) * 2020-06-12 2020-09-22 深圳前海微众银行股份有限公司 Multi-party combined decision tree construction method and device and readable storage medium
CN112084519A (en) * 2020-09-18 2020-12-15 支付宝(杭州)信息技术有限公司 GBDT model training method and device based on access mode protection
CN112418653A (en) * 2020-11-19 2021-02-26 重庆邮电大学 Number portability and network diver identification system and method based on machine learning algorithm
CN112508299A (en) * 2020-12-18 2021-03-16 南方电网科学研究院有限责任公司 Power load prediction method and device, terminal equipment and storage medium
CN112926064A (en) * 2021-02-08 2021-06-08 华控清交信息科技(北京)有限公司 Model training method and device, data processing system and electronic equipment
CN113515760A (en) * 2021-05-28 2021-10-19 平安国际智慧城市科技股份有限公司 Horizontal federal learning method, device, computer equipment and storage medium
CN113688999A (en) * 2021-08-23 2021-11-23 神州融安科技(北京)有限公司 Training method of transverse federated xgboost decision tree
CN113947211A (en) * 2021-10-11 2022-01-18 京东科技控股股份有限公司 Federal learning model training method and device, electronic equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于时空神经网络的风电场超短期风速预测模型;凡航;《电力系统自动化》;20200507;第45卷(第01期);第28-35页 *
解密Angel powerFL联邦学习平台中的纵向GBDT算法;腾讯大数据;《https://cloud.tencent.com/developer/article/1694641》;20200909;全文 *

Also Published As

Publication number Publication date
CN114118641A (en) 2022-03-01

Similar Documents

Publication Publication Date Title
Yu et al. A fairness-aware incentive scheme for federated learning
Zhang et al. Workload prediction for cloud cluster using a recurrent neural network
CN113095510B (en) Federal learning method and device based on block chain
CN105427129A (en) Information delivery method and system
CN104239194A (en) Task completion time prediction method based on BP (Back Propagation) neural network
CN104156463A (en) Big-data clustering ensemble method based on MapReduce
CN114945044B (en) Method, device and equipment for constructing digital twin platform based on federal learning
Li et al. Feel: Federated end-to-end learning with non-iid data for vehicular ad hoc networks
AU2020101405A4 (en) An Efficient Distributed Method for Real-Time Traffic Flow Prediction
CN113065046A (en) Product defect detection equipment and method
Kong et al. Trust based recommendation system in service-oriented cloud computing
CN114118641B (en) Wind power plant power prediction method, GBDT model longitudinal training method and device
CN114118312B (en) Vertical training method, device, electronic equipment and system for GBDT model
Pooja et al. Analysis of clustering algorithms for facility location allocation problems
CN114118638B (en) Wind power plant power prediction method, GBDT model transverse training method and device
He et al. Federated continuous learning based on stacked broad learning system assisted by digital twin networks: An incremental learning approach for intrusion detection in uav networks
CN114386533B (en) Transverse training method, device, electronic equipment and system for GBDT model
CN115630398A (en) Personalized differential privacy protection method, device and system based on small sample data
CN109492597A (en) The method for building up and device of driving behavior model based on SVM algorithm
Shi et al. Research on monthly flow uncertain reasoning model based on cloud theory
Chou et al. Pseudo-reward algorithms for contextual bandits with linear payoff functions
CN111027709B (en) Information recommendation method and device, server and storage medium
Niu et al. Short term load forecasting model based on support vector machine
Bilokon et al. Mathematical and computer modeling of the sprinklers pollution processes in irrigation systems
CN114065950B (en) Gradient aggregation method and device in GBDT model training and electronic equipment

Legal Events

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