Data processing method of XGBoost model based on cross-feature federation
Through distributed computing nodes and pipeline parallel processing technology, the XGBoost model training efficiency in cross-feature federated learning is improved, solving the problem of long waiting time for unlabeled parties when the amount of data is large, and achieving more efficient data processing and model training.
Patent Information
- Application Number
- CN202210336835.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-31
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2042-03-31
AI Technical Summary
In the cross-feature federated learning scenario, the training efficiency of the XGBoost model is low, especially when the amount of data is large, the unlabeled party needs to wait for a long time to obtain the required information, resulting in low data processing efficiency.
The gradient parameters of the label side's data are determined through distributed computing nodes, the gradient parameters are generated and encrypted into gradient ciphertext, and sent to the unlabeled side using pipeline parallel processing. The unlabeled side constructs histogram information based on the gradient ciphertext and its own data. And synchronized to the labeling party for node splitting based on gradient information.
It improves data processing efficiency, reduces data processing waiting time for unlabeled parties, is suitable for large-scale data training, and improves the training efficiency of XGBoost model in cross-feature federated learning.
Smart Images

Figure CN114648073B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of federated learning, and in particular to a data processing method based on an XGBoost model across feature federation, a data processing device based on an XGBoost model across feature federation, a computer-readable medium, and an electronic device. Background Art
[0002] Federated learning technology aims to combine data from different parties and implement model training without leaking local data to other parties. In the training of the extreme gradient boosting model (eXtremeGradient Boosting, XGBoost) in the cross-feature federated learning scenario, XGBoost generally trains multiple decision trees in series through gradient boosting to improve the model accuracy.
[0003] Unlike the centralized XGBoost algorithm, the XGBoost model in the cross-feature federated learning scenario needs to combine the features of different participants to establish multiple node trees, while ensuring that the labels held by the label party will not be leaked to the unlabeled party. When the label party processes sample data based on the XGBoost model, it is usually necessary to calculate the corresponding gradient parameters based on the labels and encrypt them, and then send the encrypted gradient parameters to the unlabeled party. Then, the label party and the unlabeled party perform histogram calculations in parallel based on information such as gradients.
[0004] However, this method is inefficient. When the amount of data is large, the unlabeled party needs to wait for a long time to obtain the required information. Summary of the invention
[0005] The purpose of the embodiments of the present disclosure is to provide a data processing method based on an XGBoost model across feature federation, a data processing system based on an XGBoost model across feature federation, a data processing device based on an XGBoost model across feature federation, a computer-readable medium, and an electronic device, which can be applied to large-scale data training, improve data processing efficiency, and reduce the data processing waiting time of the unlabeled party.
[0006] A first aspect of an embodiment of the present disclosure provides a data processing method based on an XGBoost model across feature federations, including:
[0007] Determine the gradient parameters corresponding to the label side data through the distributed computing nodes, and determine the first histogram information for multi-dimensionally characterizing the label side data according to the gradient parameters;
[0008] Encrypting the gradient parameters to obtain the gradient ciphertext, and sending the gradient ciphertext corresponding to the labeled party data to the unlabeled party based on the pipeline parallel processing method; wherein the unlabeled party is used to determine the second histogram information used for multi-dimensional characterization of the party data according to the gradient ciphertext and the party data, and send the second histogram information to the labeled party;
[0009] Determine node splitting information according to the first histogram information and the second histogram information, and perform node splitting processing on the first feature node tree constructed based on the label side data according to the node splitting information;
[0010] The node splitting information is synchronized to the unlabeled party; wherein the unlabeled party is used to perform node splitting processing on the second characteristic node tree constructed based on the data of the party according to the node splitting information.
[0011] In an exemplary embodiment of the present disclosure, the method further includes:
[0012] Selecting a first data set from the label side data according to a preset ratio;
[0013] Construct a first feature node tree according to the first data set;
[0014] Selecting a first target feature node from each feature node according to a gain value corresponding to each feature node in the first feature node tree;
[0015] Selecting a second target feature node from each feature node according to the gradient parameter corresponding to each feature node;
[0016] Feature data for constructing a new feature node tree is determined according to the first target feature node, the second target feature node and the remaining feature nodes; wherein the remaining feature nodes are feature nodes other than the first target feature node and the second target feature node in each feature node.
[0017] In an exemplary embodiment of the present disclosure, determining first histogram information for multi-dimensionally characterizing label side data according to a gradient parameter includes:
[0018] Determine the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the left branch node in the first feature node tree according to the gradient parameter, and determine the histogram sub-information corresponding to the right branch node according to the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the left branch node, until the first histogram information is determined; or,
[0019] The histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the right branch node in the first feature node tree is determined according to the gradient parameter, and the histogram sub-information corresponding to the left branch node is determined according to the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the right branch node, until the first histogram information is determined.
[0020] In an exemplary embodiment of the present disclosure, the unlabeled party is used to determine second histogram information for multi-dimensionally characterizing the party's data according to the gradient ciphertext and the party's data, including:
[0021] The unlabeled party is used to determine the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the left branch node in the second feature node tree according to the gradient ciphertext and the party's data when receiving the gradient ciphertext, and determine the histogram sub-information corresponding to the right branch node according to the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the left branch node, until the second histogram information is determined; or,
[0022] The unlabeled party is used to determine the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the right branch node in the second feature node tree according to the gradient ciphertext and its own data when receiving the gradient ciphertext, and determine the histogram sub-information corresponding to the left branch node according to the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the right branch node, until the second histogram information is determined.
[0023] In an exemplary embodiment of the present disclosure, determining the gradient parameters corresponding to the label side data through the distributed computing nodes includes:
[0024] Control the distributed computing nodes to obtain corresponding data slices from the shared storage space based on their respective corresponding pointer data, and calculate the gradient parameters corresponding to the data slices; wherein the label side data is composed of multiple data slices;
[0025] The gradient parameters corresponding to the label side data are determined according to the gradient parameters corresponding to the data slices.
[0026] In an exemplary embodiment of the present disclosure, the node splitting information includes at least splitting feature data and a splitting position corresponding to the splitting feature data.
[0027] A second aspect of the embodiments of the present disclosure provides a data processing system for an XGBoost model in a cross-feature federated learning scenario, including:
[0028] The label side is used to determine the gradient parameters corresponding to the label side data through the distributed computing nodes, and determine the first histogram information used to characterize the label side data in multiple dimensions according to the gradient parameters; encrypt the gradient parameters to obtain the gradient ciphertext, and send the gradient ciphertext corresponding to the label side data to the unlabeled side based on the pipeline parallel processing method;
[0029] The unlabeled party is used to determine second histogram information for multi-dimensionally characterizing the party's data according to the gradient ciphertext and the party's data, and send the second histogram information to the labeled party;
[0030] The label side is further used to determine the node splitting information according to the first histogram information and the second histogram information, and perform node splitting processing on the first feature node tree constructed based on the label side data according to the node splitting information; and synchronize the node splitting information to the unlabeled side;
[0031] The unlabeled party is also used to perform node splitting processing on the second feature node tree constructed based on the party data according to the node splitting information.
[0032] A third aspect of an embodiment of the present disclosure provides a device for determining a congestion index applied to a highway, comprising:
[0033] A distributed processing unit, used to determine a gradient parameter corresponding to the label side data through a distributed computing node, and determine first histogram information for multi-dimensionally characterizing the label side data according to the gradient parameter;
[0034] A data transmission unit, used for encrypting the gradient parameters to obtain the gradient ciphertext, and sending the gradient ciphertext corresponding to the labeled party data to the unlabeled party based on the pipeline parallel processing method; wherein the unlabeled party is used to determine the second histogram information for multi-dimensionally characterizing the party data according to the gradient ciphertext and the party data, and send the second histogram information to the labeled party;
[0035] A node splitting processing unit, used to determine node splitting information according to the first histogram information and the second histogram information, and perform node splitting processing on the first feature node tree constructed based on the label side data according to the node splitting information;
[0036] The data transmission unit is also used to synchronize the node splitting information to the unlabeled party; wherein the unlabeled party is used to perform node splitting processing on the second characteristic node tree constructed based on the data of the party according to the node splitting information.
[0037] In an exemplary embodiment of the present disclosure, the above-mentioned device further includes:
[0038] A data selection unit, used for selecting a first data set from the label side data according to a preset ratio;
[0039] A node tree construction unit, used to construct a first feature node tree according to the first data set;
[0040] A node selection unit is used to select a first target feature node from each feature node according to a gain value corresponding to each feature node in the first feature node tree; and select a second target feature node from each feature node according to a gradient parameter corresponding to each feature node;
[0041] The node tree construction unit is also used to determine feature data for constructing a new feature node tree based on the first target feature node, the second target feature node and the remaining feature nodes; wherein the remaining feature nodes are feature nodes other than the first target feature node and the second target feature node.
[0042] In an exemplary embodiment of the present disclosure, the distributed processing unit determines first histogram information for multi-dimensionally characterizing label side data according to the gradient parameter, including:
[0043] Determine the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the left branch node in the first feature node tree according to the gradient parameter, and determine the histogram sub-information corresponding to the right branch node according to the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the left branch node, until the first histogram information is determined; or,
[0044] The histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the right branch node in the first feature node tree is determined according to the gradient parameter, and the histogram sub-information corresponding to the left branch node is determined according to the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the right branch node, until the first histogram information is determined.
[0045] In an exemplary embodiment of the present disclosure, the unlabeled party is used to determine second histogram information for multi-dimensionally characterizing the party's data according to the gradient ciphertext and the party's data, including:
[0046] The unlabeled party is used to determine the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the left branch node in the second feature node tree according to the gradient ciphertext and the party's data when receiving the gradient ciphertext, and determine the histogram sub-information corresponding to the right branch node according to the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the left branch node, until the second histogram information is determined; or,
[0047] The unlabeled party is used to determine the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the right branch node in the second feature node tree according to the gradient ciphertext and its own data when receiving the gradient ciphertext, and determine the histogram sub-information corresponding to the left branch node according to the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the right branch node, until the second histogram information is determined.
[0048] In an exemplary embodiment of the present disclosure, the distributed processing unit determines the gradient parameters corresponding to the label side data through the distributed computing nodes, including:
[0049] Control the distributed computing nodes to obtain corresponding data slices from the shared storage space based on their respective corresponding pointer data, and calculate the gradient parameters corresponding to the data slices; wherein the label side data is composed of multiple data slices;
[0050] The gradient parameters corresponding to the label side data are determined according to the gradient parameters corresponding to the data slices.
[0051] In an exemplary embodiment of the present disclosure, the node splitting information includes at least splitting feature data and a splitting position corresponding to the splitting feature data.
[0052] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable medium is provided, on which a computer program is stored. When the program is executed by a processor, the data processing method based on the XGBoost model across feature federation as described in the first aspect of the above embodiment is implemented.
[0053] According to a fifth aspect of an embodiment of the present disclosure, there is provided an electronic device, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the data processing method based on the XGBoost model across feature federation as described in the first aspect of the above embodiment.
[0054] According to a sixth aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the above-mentioned various optional implementations.
[0055] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0056] In the technical solutions provided by some embodiments of the present disclosure, the gradient parameters corresponding to the labeled party data can be determined by distributed computing nodes, and the first histogram information for multi-dimensional characterization of the labeled party data can be determined according to the gradient parameters; the gradient parameters are encrypted to obtain the gradient ciphertext, and the gradient ciphertext corresponding to the labeled party data is sent to the unlabeled party based on the pipeline parallel processing method; wherein the unlabeled party is used to determine the second histogram information for multi-dimensional characterization of the unlabeled party data according to the gradient ciphertext and the own data, and send the second histogram information to the labeled party; determine the node splitting information according to the first histogram information and the second histogram information, and perform node splitting processing on the first feature node tree constructed based on the labeled party data according to the node splitting information; synchronize the node splitting information to the unlabeled party; wherein the unlabeled party performs node splitting processing on the second feature node tree constructed based on the own data according to the node splitting information. The implementation of the above technical solution can be applied to large-scale data training, and the distributed computing nodes are used to improve the data processing efficiency, and the gradient ciphertexts to be sent to the unlabeled party are sent to the unlabeled party in batches based on the distributed computing nodes and the pipeline parallel processing method, thereby reducing the data processing waiting time of the unlabeled party.
[0057] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0059] Figure 1 A schematic diagram schematically shows an exemplary system architecture of a data processing method and device based on a cross-feature federation XGBoost model to which an embodiment of the present disclosure can be applied;
[0060] Figure 2 A schematic diagram of the structure of a computer system of an electronic device suitable for implementing an embodiment of the present disclosure is shown;
[0061] Figure 3 A flowchart of a data processing method based on an XGBoost model across feature federation according to an embodiment of the present disclosure is schematically shown;
[0062] Figure 4 A flowchart of a data processing method based on an XGBoost model across feature federation according to another embodiment of the present disclosure is schematically shown;
[0063] Figure 5 A sequence diagram schematically shows a data processing system for an XGBoost model in a cross-feature federated learning scenario according to an embodiment of the present disclosure;
[0064] Figure 6 The structural block diagram of a data processing device based on an XGBoost model across feature federation in one embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0065] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.
[0066] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0067] Figure 1 The schematic diagram schematically shows an exemplary system architecture of a data processing method and device based on an XGBoost model across feature federation to which an embodiment of the present disclosure can be applied.
[0068] like Figure 1As shown, the system architecture 100 may include one or more of terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc. The terminal devices 101, 102, 103 may be various electronic devices with display screens, including but not limited to desktop computers, portable computers, smart phones, tablet computers, etc. It should be understood that Figure 1 The number of terminal devices, networks and servers in is only illustrative. According to the implementation requirements, there can be any number of terminal devices, networks and servers. For example, server 105 can be a server cluster composed of multiple servers. For example, server 105 can execute: determining the gradient parameters corresponding to the label party data through distributed computing nodes, and determining the first histogram information for multi-dimensional characterization of the label party data according to the gradient parameters; encrypting the gradient parameters to obtain the gradient ciphertext, and sending the gradient ciphertext corresponding to the label party data to the unlabeled party based on the pipeline parallel processing method; wherein the unlabeled party is used to determine the second histogram information for multi-dimensional characterization of the unlabeled party data according to the gradient ciphertext and the party data, and send the second histogram information to the label party; determine the node splitting information according to the first histogram information and the second histogram information, and perform node splitting processing on the first feature node tree constructed based on the label party data according to the node splitting information; synchronize the node splitting information to the unlabeled party; wherein the unlabeled party is used to perform node splitting processing on the second feature node tree constructed based on the party data according to the node splitting information.
[0069] Figure 2 A schematic diagram of the structure of a computer system of an electronic device suitable for implementing an embodiment of the present disclosure is shown.
[0070] It should be noted that Figure 2 The computer system 200 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0071] like Figure 2 As shown, the computer system 200 includes a central processing unit (CPU) 201, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 202 or the program loaded from the storage part 208 to the random access memory (RAM) 203. In the (RAM) 203, various programs and data required for system operation are also stored. The (CPU) 201, the (ROM) 202 and the (RAM) 203 are connected to each other through a bus 204. An input / output (I / O) interface 205 is also connected to the bus 204.
[0072] The following components are connected to the (I / O) interface 205: an input section 206 including a keyboard, a mouse, etc.; an output section 207 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 208 including a hard disk, etc.; and a communication section 209 including a network interface card such as a LAN card, a modem, etc. The communication section 209 performs communication processing via a network such as the Internet. A drive 210 is also connected to the (I / O) interface 205 as needed. A removable medium 211, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 210 as needed, so that a computer program read therefrom is installed into the storage section 208 as needed.
[0073] In particular, according to an embodiment of the present disclosure, the process described below with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 209, and / or installed from a removable medium 211. When the computer program is executed by the central processing unit (CPU) 201, various functions defined in the method and apparatus of the present application are executed.
[0074] It should be noted that the computer-readable medium shown in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0075] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0076] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, and the units described may also be arranged in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.
[0077] As another aspect, the present application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by an electronic device, the electronic device implements the method described in the following embodiment. For example, the electronic device may implement the following method. Figure 3 The various steps shown, etc.
[0078] This example embodiment provides a data processing method based on an XGBoost model with cross-feature federation. Figure 3 As shown, the data processing method based on the XGBoost model across feature federation may include the following steps S310 to S340, specifically:
[0079] Step S310: determining the gradient parameters corresponding to the label side data through the distributed computing nodes, and determining the first histogram information for multi-dimensionally characterizing the label side data according to the gradient parameters.
[0080] Step S320: Encrypt the gradient parameters to obtain the gradient ciphertext, and send the gradient ciphertext corresponding to the labeled party data to the unlabeled party based on the pipeline parallel processing method; wherein the unlabeled party is used to determine the second histogram information for multi-dimensional characterization of the unlabeled party data according to the gradient ciphertext and its own data, and send the second histogram information to the labeled party.
[0081] Step S330: determining node splitting information according to the first histogram information and the second histogram information, and performing node splitting processing on the first feature node tree constructed based on the label side data according to the node splitting information.
[0082] Step S340: Synchronize the node splitting information to the unlabeled party; wherein the unlabeled party is used to perform node splitting processing on the second characteristic node tree constructed based on the data of the party according to the node splitting information.
[0083] It should be noted that steps S310 to S340 can be applied to cross-feature federated learning scenarios, which may include a label party (guest) including labels and feature data and an unlabeled party (host) including feature data, wherein the label party (guest) includes one or more label fields, and different label fields are used to describe the corresponding feature data through different dimensions. This application does not limit the number of label parties (guest) and unlabeled parties (host) in cross-feature federated learning scenarios.
[0084] Implementation Figure 3 The data processing method of the XGBoost model based on cross-feature federation shown can be applied to large-scale data training, and the distributed computing nodes are used to improve the data processing efficiency. The gradient ciphertexts that need to be sent to the unlabeled party are sent to the unlabeled party in batches based on the distributed computing nodes and pipeline parallel processing, thereby reducing the data processing waiting time of the unlabeled party.
[0085] Next, the above steps of this exemplary embodiment are described in more detail.
[0086] In step S310, the gradient parameters corresponding to the label side data are determined by the distributed computing nodes, and the first histogram information for multi-dimensionally characterizing the label side data is determined according to the gradient parameters.
[0087] Specifically, when the amount of data of the label side data is greater than a preset threshold, the gradient parameter corresponding to the label side data can be determined by a distributed computing node. Wherein, the preset threshold can be a numerical value set by the user, and the magnitude of the numerical value can be millions / tens of millions / hundreds of millions / hundreds of billions, etc., which is not limited in the embodiments of the present application. The first histogram information determined according to the gradient parameter may include the amount of label side data in each histogram interval, the first-order gradient (also understood as the first-order derivative) and the second-order gradient (also understood as the second-order derivative) of each label side data, the statistical value of the first-order gradient, the statistical value of the second-order gradient, etc., which is not limited in the embodiments of the present application. In addition, it should be noted that, optionally, when the amount of data of the label side data is less than or equal to the preset threshold, the steps of the embodiments of the present application can also be performed to realize the training of the XGBoost model in the cross-feature federated learning scenario.
[0088] Among them, the distributed computing node may include multiple computing nodes, and the present application does not limit the number of computing nodes. In addition, both the label party data and the local data may include one or more fields (such as user ID, gender, age, etc.). For example, the label party data can be represented as Table 1 below, and the local data can be represented as Table 2 below; wherein, the violation frequency can be a label field held by the label party but not held by the non-label party.
[0089] User ID Name Frequency of violations 1 ** 0 2 *** 3 3 ## 5 4 ### 1 5 $$$ 0
[0090] Table 1
[0091] User ID gender age 1 male 20 2 female 43 3 female Fourty 4 male 21 5 male 32
[0092] Table 2
[0093] As an optional embodiment, the gradient parameters corresponding to the label side data are determined through distributed computing nodes, including: controlling the distributed computing nodes to obtain corresponding data slices from the shared storage space based on their respective corresponding pointer data, and calculating the gradient parameters corresponding to the data slices; wherein the label side data is composed of multiple data slices; and determining the gradient parameters corresponding to the label side data according to the gradient parameters corresponding to the data slices.
[0094] Specifically, after controlling the distributed computing nodes to obtain corresponding data slices from the shared storage space based on their respective corresponding pointer data, the distributed computing nodes are used to store the corresponding data slices in the local node memory according to the preset storage rules. Each computing node corresponds to a local node memory, and then calls the data from the local node memory in sequence and calculates the corresponding gradient parameters; wherein the preset storage rules are at least used to limit the storage format.
[0095] In addition, before controlling the distributed computing nodes to obtain corresponding data slices from the shared storage space based on their respective corresponding pointer data, the above method may also include: dividing the label party data into multiple data sets according to a preset classification rule, so as to perform a first histogram information calculation based on the multiple data sets; wherein each data set corresponds to a different interval, for example, [0~10], [11~20], [21~50], etc., which is not limited to the embodiments of the present application.
[0096] It can be seen that the implementation of this optional embodiment can solve the problem in the prior art that large-scale data cannot be fully read during the data reading stage due to limited single-machine memory. Distributed processing of data is achieved by having distributed computing nodes read their respective corresponding data from shared storage based on pointer data, thereby improving data reading efficiency and data processing efficiency, and more efficiently determining the gradient parameters corresponding to the data of each label party.
[0097] As an optional embodiment, determining first histogram information for multi-dimensionally characterizing label side data according to the gradient parameter includes:
[0098] Determine the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the left branch node in the first feature node tree according to the gradient parameter, and determine the histogram sub-information corresponding to the right branch node according to the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the left branch node, until the first histogram information is determined; or,
[0099] The histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the right branch node in the first feature node tree is determined according to the gradient parameter, and the histogram sub-information corresponding to the left branch node is determined according to the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the right branch node, until the first histogram information is determined.
[0100] Specifically, the histogram sub-information corresponding to the parent node includes the amount of label data for each histogram interval corresponding to the parent node, the first-order gradient and second-order gradient of each label data, the statistical value of the first-order gradient, the statistical value of the second-order gradient, etc. The embodiment of the present application is not limited to this, and the histogram sub-information corresponding to the left branch node is the same.
[0101] The histogram sub-information corresponding to the right branch node is determined according to the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the left branch node, including: p Histogram sub-information corresponding to the left branch node L Substitute the expression histogram p =histogram L +histogram R To determine the histogram sub-information corresponding to the right branch node R .
[0102] The histogram sub-information corresponding to the left branch node is determined according to the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the right branch node, including: p Histogram sub-information corresponding to the right branch node R Substitute the expression histogram p =histogram L +histogram R To determine the histogram sub-information corresponding to the left branch node L .
[0103] It can be seen that by implementing this optional embodiment, the histogram sub-information of the child node on the other side can be determined based on the histogram sub-information of the parent node and the child node on one side, that is, the histogram difference calculation, thereby improving the efficiency of calculating the histogram information, and further improving the training efficiency of the XGBoost model based on the histogram information.
[0104] In step S320, the gradient parameters are encrypted to obtain gradient ciphertext, and the gradient ciphertext corresponding to the labeled party data is sent to the unlabeled party based on a pipeline parallel processing method; wherein the unlabeled party is used to determine the second histogram information used to multi-dimensionally characterize its own data based on the gradient ciphertext and its own data, and send the second histogram information to the labeled party.
[0105] Specifically, encrypting the gradient parameters to obtain the gradient ciphertext includes: controlling the distributed computing nodes to encrypt the gradient parameters to obtain the gradient ciphertext by homomorphic encryption or asymmetric encryption, wherein the gradient ciphertext may be represented by a numerical value, a string, etc., which is not limited in the embodiments of the present application. Controlling the distributed computing nodes to encrypt the gradient parameters may improve encryption efficiency.
[0106] Specifically, the gradient ciphertext corresponding to the labeled party data is sent to the unlabeled party based on the pipeline parallel processing method, including: sending a gradient ciphertext to the unlabeled party every time a gradient ciphertext is completed, so as to realize the gradient ciphertext transmission based on the pipeline parallel processing method. Among them, sending the gradient ciphertext corresponding to the labeled party data to the unlabeled party based on the pipeline parallel processing method can avoid the consumption of a large amount of bandwidth by ultra-large-scale gradient ciphertext transmission, and realize that in the case of limited bandwidth, gradient ciphertext transmission can be performed while consuming a small amount of bandwidth, thereby improving transmission efficiency. In addition, sending the gradient ciphertext corresponding to the labeled party data to the unlabeled party based on the pipeline parallel processing method can also avoid the waiting time of the unlabeled party. In the present application, the unlabeled party does not need to wait for the labeled party to process all the gradient ciphertexts of the labeled party data, and can perform fragmented histogram information calculation based on the fragmented ciphertext transmission.
[0107] In addition, the second histogram information may include the amount of unlabeled data in each histogram interval, the first-order gradient (also understood as the first-order derivative) and the second-order gradient (also understood as the second-order derivative) of each unlabeled data, the statistical value of the first-order gradient, the statistical value of the second-order gradient, etc., which is not limited to the embodiments of the present application.
[0108] As an optional embodiment, the unlabeled party is used to determine second histogram information for multi-dimensionally characterizing the unlabeled party data according to the gradient ciphertext and the party data, including:
[0109] The unlabeled party is used to determine the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the left branch node in the second feature node tree according to the gradient ciphertext and the party's data when receiving the gradient ciphertext, and determine the histogram sub-information corresponding to the right branch node according to the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the left branch node, until the second histogram information is determined; or,
[0110] The unlabeled party is used to determine the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the right branch node in the second feature node tree according to the gradient ciphertext and its own data when receiving the gradient ciphertext, and determine the histogram sub-information corresponding to the left branch node according to the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the right branch node, until the second histogram information is determined.
[0111] The histogram sub-information corresponding to the right branch node is determined according to the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the left branch node, until the second histogram information is determined, including: the histogram sub-information corresponding to the parent node is histogram sub-information corresponding to the left branch node p Histogram sub-information corresponding to the left branch node L Substitute the expression histogram p =histogram L +histogram R To determine the histogram sub-information corresponding to the right branch node R , until the second histogram information is determined.
[0112] The histogram sub-information corresponding to the left branch node is determined according to the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the right branch node, until the second histogram information is determined, including: the histogram sub-information corresponding to the parent node is histogram sub-information corresponding to the right branch node p Histogram sub-information corresponding to the right branch node R Substitute the expression histogram p =histogram L +histogram R To determine the histogram sub-information corresponding to the left branch node L , until the second histogram information is determined.
[0113] It can be seen that by implementing this optional embodiment, the unlabeled party can determine the histogram sub-information of the parent node and the child nodes on one side based on the gradient ciphertext, and then determine the histogram sub-information of the child nodes on the other side based on the histogram sub-information of the parent node and the child nodes on one side. In this way, the unlabeled party can share the gradient ciphertext of the labeled party without leaking local data on the labeled party. At the same time, it can also improve the efficiency of the unlabeled party in calculating the histogram information, thereby improving the training efficiency of the XGBoost model based on the histogram information.
[0114] In step S330, node splitting information is determined according to the first histogram information and the second histogram information, and node splitting processing is performed on the first feature node tree constructed based on the label side data according to the node splitting information.
[0115] Specifically, the node splitting information includes at least splitting feature data and a splitting position corresponding to the splitting feature data, wherein the splitting feature data is used to indicate the specific features that need to be split, and the splitting position is used to indicate which node is to be split.
[0116] In addition, node splitting information is determined according to the first histogram information and the second histogram information, and node splitting processing is performed on the first feature node tree constructed based on the label side data according to the node splitting information, including: based on the expression Calculate the gain value Gain corresponding to each node in the first feature node tree; where, I L and I R are the samples that fall on the left child node and the right child node after the node is split according to a certain feature partition point, respectively. i and h i are the first-order derivative and second-order derivative of the corresponding loss function of sample i, and λ and γ are training hyperparameters. Then, all gain values Gain are traversed to determine the maximum split gain, node split information is determined according to the node corresponding to the maximum split gain, and node split processing is performed on the first feature node tree constructed based on the label data according to the node split information.
[0117] Furthermore, when the node splitting gain is less than the set minimum splitting gain or the node layer reaches the maximum depth of the tree or the number of samples on the node is less than the preset number (such as 50), the node will not be further split. The final node can be understood as a leaf node j, and the weight value of the leaf node j is It can be expressed as: The predicted output corresponding to the sample falling on the leaf node is the weight value of the leaf node; Assuming that XGBoost has trained and generated T trees, when predicting a new sample, it actually predicts which leaf node the sample will eventually fall on based on the feature data of the sample and the optimal partitioning of each non-leaf node. The weight value of the leaf node is the prediction output of the corresponding tree for the sample. Finally, the prediction outputs corresponding to the T trees are added up to get the final prediction value of the sample. Sample x i Prediction results It can be expressed as Among them, f t (x i ) is the t-th tree for sample x i Predict the results.
[0118] As an optional embodiment, the method further includes: selecting a first data set from the label side data according to a preset ratio; constructing a first feature node tree according to the first data set; selecting a first target feature node from each feature node according to the gain value corresponding to each feature node in the first feature node tree; selecting a second target feature node from each feature node according to the gradient parameter corresponding to each feature node; determining feature data for constructing a new feature node tree according to the first target feature node, the second target feature node and the remaining feature nodes; wherein the remaining feature nodes are feature nodes other than the first target feature node and the second target feature node in each feature node. The new feature node tree introduced in this paragraph corresponds to the label side.
[0119] This application does not limit the number of the first target feature node, the second target feature node, and the remaining feature nodes.
[0120] Specifically, selecting a first target feature node from each feature node according to the gain value corresponding to each feature node in the first feature node tree includes: selecting nodes with the top N% of gain values from each feature node as the first target feature node according to the gain value corresponding to each feature node in the first feature node tree. Wherein, N can be expressed as a numerical value, such as 50.
[0121] Specifically, a second target feature node is selected from each feature node according to the gradient parameters corresponding to each feature node, including: according to the gradient parameters corresponding to each feature node, a node with the gradient parameters in the front α% is selected from each feature node as the second target feature node, where α can be expressed as a numerical value, such as 80.
[0122] Furthermore, the above method may further include: randomly selecting β nodes from the feature nodes other than the first target feature node and the second target feature node as the remaining target feature nodes. The feature nodes other than the first target feature node and the second target feature node may be understood as small gradient samples, and β may be expressed as a numerical value, such as 5.
[0123] Specifically, determining feature data for constructing a new feature node tree according to the first target feature node, the second target feature node, and the remaining feature nodes includes: calculating a preset weight c (eg, ) and the weighted sum of the remaining feature nodes; determining feature data for constructing a new feature node tree according to the first target feature node, the second target feature node and the weighted sum; or,
[0124] Calculate the weighted sum of the preset weight a (e.g., 1) and the first target feature node, calculate the weighted sum of the preset weight b (e.g., 1) and the second target feature node, calculate the preset weight c (e.g., ) and the weighted sum of the remaining feature nodes; determine the feature data for constructing a new feature node tree based on the above weighted sums.
[0125] In addition, the above method also includes: the unlabeled party can also select a second data set from its own data according to a preset ratio (e.g., 30%); construct a second feature node tree according to the first data set; select a third target feature node from each feature node according to the gain value corresponding to each feature node in the second feature node tree; select a fourth target feature node from each feature node according to the gradient parameter corresponding to each feature node; determine feature data for constructing a new feature node tree according to the third target feature node, the fourth target feature node and the remaining feature nodes; wherein the remaining feature nodes are feature nodes other than the third target feature node and the fourth target feature node in each feature node. The new feature node tree introduced in this paragraph corresponds to the unlabeled party.
[0126] It should be noted that the aforementioned first target feature node and second target feature node are feature data determined by the labeling party and used to construct a new feature node tree of the labeling party, while the third target feature node and fourth target feature node are feature data determined by the unlabeled party and used to construct a new feature node tree of the unlabeled party. Among them, the specific implementation methods of constructing a new feature node tree by the unlabeled party and the labeling party are the same, and the node names of the first target feature node, the second target feature node, the third target feature node, and the fourth target feature node are only used to distinguish them as different nodes, and no other limitations are made.
[0127] It can be seen that the implementation of this optional embodiment can achieve bidirectional node reduction, that is, the first target feature node is selected from each feature node according to the gain value corresponding to each feature node in the first feature node tree, and the second target feature node is selected from each feature node according to the gradient parameter corresponding to each feature node, and then a new feature node tree is constructed according to the selected nodes to reduce the amount of training while ensuring the training accuracy.
[0128] In step S340, the node splitting information is synchronized to the unlabeled party; wherein the unlabeled party is used to perform node splitting processing on the second characteristic node tree constructed based on the data of the party according to the node splitting information.
[0129] Specifically, the unlabeled party is used to perform node splitting processing on the second feature node tree constructed based on the party data according to the node splitting information, including: the unlabeled party is used to perform node splitting processing based on the expression Calculate the gain value Gain corresponding to each node in the second feature node tree; traverse all gain values Gain to determine the maximum split gain, determine the node splitting information according to the node corresponding to the maximum split gain, and perform node splitting processing on the second feature node tree constructed based on the unlabeled data according to the node splitting information.
[0130] See also Figure 4 , Figure 4 The flowchart of the data processing method based on the XGBoost model of cross-feature federation according to another embodiment of the present disclosure is schematically shown. Figure 4 As shown, the data processing method based on the XGBoost model across feature federation includes: steps S400 to S490.
[0131] Step S400: The tag party controls the distributed computing nodes to obtain corresponding data slices from the shared storage space based on the corresponding pointer data, and calculates the gradient parameters corresponding to the data slices. The tag party data is composed of multiple data slices. Then, the gradient parameters corresponding to the tag party data are determined according to the gradient parameters corresponding to the data slices. Then, step S410 or step S420 is executed.
[0132] Step S410: The labeling party determines the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the left branch node in the first feature node tree according to the gradient parameter, and determines the histogram sub-information corresponding to the right branch node according to the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the left branch node, until the first histogram information is determined.
[0133] Step S420: The labeling party determines the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the right branch node in the first feature node tree according to the gradient parameter, and determines the histogram sub-information corresponding to the left branch node according to the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the right branch node, until the first histogram information is determined.
[0134] Step S430: The labeled party encrypts the gradient parameters to obtain gradient ciphertext, and sends the gradient ciphertext corresponding to the labeled party data to the unlabeled party based on the pipeline parallel processing method. Then, step S440 or step S450 is executed.
[0135] Step S440: When the unlabeled party receives the gradient ciphertext, it determines the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the left branch node in the second feature node tree based on the gradient ciphertext and its own data, and determines the histogram sub-information corresponding to the right branch node based on the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the left branch node, until the second histogram information is determined.
[0136] Step S450: When the unlabeled party receives the gradient ciphertext, it determines the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the right branch node in the second feature node tree based on the gradient ciphertext and its own data, and determines the histogram sub-information corresponding to the left branch node based on the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the right branch node, until the second histogram information is determined.
[0137] Step S460: The label side determines the node splitting information according to the first histogram information and the second histogram information, and performs node splitting processing on the first feature node tree constructed based on the label side data according to the node splitting information.
[0138] Step S470: The labeled party synchronizes the node splitting information to the unlabeled party, so that the unlabeled party performs node splitting processing on the second feature node tree constructed based on the data of the party according to the node splitting information.
[0139] Step S480: The labeling party selects a first data set from the labeling party data according to a preset ratio, and constructs a first feature node tree according to the first data set, and selects a first target feature node from each feature node according to a gain value corresponding to each feature node in the first feature node tree, and selects a second target feature node from each feature node according to a gradient parameter corresponding to each feature node.
[0140] Step S490: The labeling party determines the feature data used to construct a new feature node tree based on the first target feature node, the second target feature node and the remaining feature nodes; wherein the remaining feature nodes are feature nodes other than the first target feature node and the second target feature node.
[0141] It should be noted that steps S400 to S490 are Figure 3 The steps and their embodiments shown correspond to each other. For the specific implementation of steps S400 to S490, please refer to Figure 3 The steps and embodiments shown are not described in detail here.
[0142] It can be seen that implementation Figure 4 The method shown can be applied to large-scale data training, and the distributed computing nodes are used to improve the data processing efficiency. The gradient ciphertexts that need to be sent to the unlabeled party are sent to the unlabeled party in batches based on the distributed computing nodes and pipeline parallel processing, thereby reducing the data processing waiting time of the unlabeled party.
[0143] based on Figure 3 The method shown, the present application also discloses a data processing system for an XGBoost model in a cross-feature federated learning scenario, which may specifically include a label side and an unlabel side.
[0144] The label side is used to determine the gradient parameters corresponding to the label side data through the distributed computing nodes, and determine the first histogram information used to characterize the label side data in multiple dimensions according to the gradient parameters; encrypt the gradient parameters to obtain the gradient ciphertext, and send the gradient ciphertext corresponding to the label side data to the unlabeled side based on the pipeline parallel processing method;
[0145] The unlabeled party is used to determine second histogram information for multi-dimensionally characterizing the party's data according to the gradient ciphertext and the party's data, and send the second histogram information to the labeled party;
[0146] The label side is further used to determine the node splitting information according to the first histogram information and the second histogram information, and perform node splitting processing on the first feature node tree constructed based on the label side data according to the node splitting information; and synchronize the node splitting information to the unlabeled side;
[0147] The unlabeled party is also used to perform node splitting processing on the second feature node tree constructed based on the party data according to the node splitting information.
[0148] For the data processing system of the XGBoost model applied to the cross-feature federated learning scenario, the interaction process between the label party and the unlabel party can be found in Figure 5 , Figure 5 The following schematically shows a sequence diagram of a data processing system for an XGBoost model in a cross-feature federated learning scenario according to an embodiment of the present disclosure. Figure 5 As shown, the sequence diagram includes: step S510 to step S570.
[0149] Step S510: Determine the gradient parameters corresponding to the label side data through the distributed computing nodes, and determine the first histogram information for multi-dimensionally characterizing the label side data according to the gradient parameters.
[0150] Step S520: The labeled party encrypts the gradient parameters to obtain gradient ciphertext, and sends the gradient ciphertext corresponding to the labeled party data to the unlabeled party based on a pipeline parallel processing method.
[0151] Step S530: The unlabeled party determines second histogram information for multi-dimensionally characterizing the unlabeled party data according to the gradient ciphertext and the party's own data.
[0152] Step S540: The unlabeled party sends the second histogram information to the labeled party.
[0153] Step S550: The label side determines the node splitting information according to the first histogram information and the second histogram information, and performs node splitting processing on the first feature node tree constructed based on the label side data according to the node splitting information.
[0154] Step S560: The labeled party synchronizes the node splitting information to the unlabeled party.
[0155] Step S570: The unlabeled party performs node splitting processing on the second characteristic node tree constructed based on its own data according to the node splitting information.
[0156] Among them, XGBoost involved in the embodiment of the present application is a classic algorithm in Boosting. The principle of the Boosting algorithm is to integrate the results of multiple weak classifications to form a strong classifier. XGBoost continues the principle of the Boosting algorithm and integrates multiple node tree models together. Its core idea is to continuously fit the residual between the prediction result of the previous node tree and the true label, so that the final prediction result is as close to the true label as possible. In XGBoost, it is necessary to continuously add node trees, and each node tree can be regarded as a weak classifier. For each newly added node tree, the node of the node tree will split the node into left and right child nodes according to the division point of the sample feature, and the node splitting will be performed at the division point with the largest node splitting gain, thereby gradually forming a node tree.
[0157] Based on this, when the amount of data of the label party data is greater than the threshold of 100 million, the gradient parameters corresponding to the label party data are determined through the distributed computing nodes, and the first histogram information used to multi-dimensionally characterize the label party data is determined according to the gradient parameters. In order not to leak local data, the label party can encrypt the gradient parameters to obtain the gradient ciphertext, and then send the gradient ciphertext corresponding to the label party data to the unlabeled party based on the pipeline parallel processing method. After receiving the gradient ciphertext, the unlabeled party can determine the second histogram information used to multi-dimensionally characterize the unlabeled party data based on the gradient ciphertext combined with its own data. The unlabeled party can synchronize the second histogram information to the label party, so that the label party can realize the node splitting based on the XGBoost model in the cross-feature federated learning scenario to realize model training. Furthermore, the label party can also synchronize the information used for node splitting to the unlabeled party, so that the unlabeled party can realize the node splitting based on the XGBoost model in the absence of label data to realize model training.
[0158] It can be seen that implementation Figure 5 The system shown can be applied to large-scale data training, and can improve data processing efficiency by using distributed computing nodes. The gradient ciphertexts that need to be sent to the unlabeled party can be sent to the unlabeled party in batches based on distributed computing nodes and pipeline parallel processing, thereby reducing the data processing waiting time of the unlabeled party.
[0159] See also Figure 6 , Figure 6 The structure block diagram of a data processing device based on an XGBoost model of cross-feature federation according to an embodiment of the present disclosure is schematically shown. Figure 6 As shown, the data processing device 600 based on the XGBoost model of cross-feature federation includes: a distributed processing unit 601, a data transmission unit 602, and a node splitting processing unit 603.
[0160] The distributed processing unit 601 is used to determine the gradient parameters corresponding to the label side data through the distributed computing nodes, and determine the first histogram information for multi-dimensionally characterizing the label side data according to the gradient parameters;
[0161] The data transmission unit 602 is used to encrypt the gradient parameters to obtain the gradient ciphertext, and send the gradient ciphertext corresponding to the labeled party data to the unlabeled party based on the pipeline parallel processing method; wherein the unlabeled party determines the second histogram information for multi-dimensionally characterizing the unlabeled party data according to the gradient ciphertext and the party data, and sends the second histogram information to the labeled party;
[0162] A node splitting processing unit 603 is used to determine node splitting information according to the first histogram information and the second histogram information, and perform node splitting processing on the first feature node tree constructed based on the label side data according to the node splitting information;
[0163] The data transmission unit 602 is also used to synchronize the node splitting information to the unlabeled party; wherein the unlabeled party is used to perform node splitting processing on the second characteristic node tree constructed based on the data of the party according to the node splitting information.
[0164] The node splitting information at least includes splitting feature data and a splitting position corresponding to the splitting feature data.
[0165] It can be seen that the implementation Figure 6 The device shown can be applied to large-scale data training, and can use distributed computing nodes to improve data processing efficiency. Based on distributed computing nodes and pipeline parallel processing, the gradient ciphertext that needs to be sent to the unlabeled party can be sent to the unlabeled party in batches, thereby reducing the data processing waiting time of the unlabeled party.
[0166] In an exemplary embodiment of the present disclosure, the above-mentioned device further includes:
[0167] A data selection unit, used for selecting a first data set from the label side data according to a preset ratio;
[0168] A node tree construction unit, used to construct a first feature node tree according to the first data set;
[0169] A node selection unit is used to select a first target feature node from each feature node according to a gain value corresponding to each feature node in the first feature node tree; and select a second target feature node from each feature node according to a gradient parameter corresponding to each feature node;
[0170] The node tree construction unit is also used to determine feature data for constructing a new feature node tree based on the first target feature node, the second target feature node and the remaining feature nodes; wherein the remaining feature nodes are feature nodes other than the first target feature node and the second target feature node.
[0171] It can be seen that the implementation of this optional embodiment can achieve bidirectional node reduction, that is, the first target feature node is selected from each feature node according to the gain value corresponding to each feature node in the first feature node tree, and the second target feature node is selected from each feature node according to the gradient parameter corresponding to each feature node, and then a new feature node tree is constructed according to the selected nodes to reduce the amount of training while ensuring the training accuracy.
[0172] In an exemplary embodiment of the present disclosure, the distributed processing unit 601 determines first histogram information for multi-dimensionally characterizing label side data according to the gradient parameter, including:
[0173] Determine the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the left branch node in the first feature node tree according to the gradient parameter, and determine the histogram sub-information corresponding to the right branch node according to the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the left branch node, until the first histogram information is determined; or,
[0174] The histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the right branch node in the first feature node tree is determined according to the gradient parameter, and the histogram sub-information corresponding to the left branch node is determined according to the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the right branch node, until the first histogram information is determined.
[0175] It can be seen that by implementing this optional embodiment, the histogram sub-information of the child node on the other side can be determined based on the histogram sub-information of the parent node and the child node on one side, that is, the histogram difference calculation, thereby improving the efficiency of calculating the histogram information, and further improving the training efficiency of the XGBoost model based on the histogram information.
[0176] In an exemplary embodiment of the present disclosure, the unlabeled party determines second histogram information for multi-dimensionally characterizing the unlabeled party data according to the gradient ciphertext and the party data, including:
[0177] The unlabeled party is used to determine the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the left branch node in the second feature node tree according to the gradient ciphertext and the party's data when receiving the gradient ciphertext, and determine the histogram sub-information corresponding to the right branch node according to the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the left branch node, until the second histogram information is determined; or,
[0178] The unlabeled party is used to determine the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the right branch node in the second feature node tree according to the gradient ciphertext and its own data when receiving the gradient ciphertext, and determine the histogram sub-information corresponding to the left branch node according to the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the right branch node, until the second histogram information is determined.
[0179] It can be seen that by implementing this optional embodiment, the unlabeled party can determine the histogram sub-information of the parent node and the child nodes on one side based on the gradient ciphertext, and then determine the histogram sub-information of the child nodes on the other side based on the histogram sub-information of the parent node and the child nodes on one side. In this way, the unlabeled party can share the gradient ciphertext of the labeled party without leaking local data on the labeled party. At the same time, it can also improve the efficiency of the unlabeled party in calculating the histogram information, thereby improving the training efficiency of the XGBoost model based on the histogram information.
[0180] In an exemplary embodiment of the present disclosure, the distributed processing unit 601 determines the gradient parameters corresponding to the label side data through the distributed computing nodes, including:
[0181] Control the distributed computing nodes to obtain corresponding data slices from the shared storage space based on their respective corresponding pointer data, and calculate the gradient parameters corresponding to the data slices; wherein the label side data is composed of multiple data slices;
[0182] The gradient parameters corresponding to the label side data are determined according to the gradient parameters corresponding to the data slices.
[0183] It can be seen that the implementation of this optional embodiment can solve the problem in the prior art that large-scale data cannot be fully read during the data reading stage due to limited single-machine memory. Distributed processing of data is achieved by having distributed computing nodes read their respective corresponding data from shared storage based on pointer data, thereby improving data reading efficiency and data processing efficiency, and more efficiently determining the gradient parameters corresponding to the data of each label party.
[0184] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0185] Since the various functional modules of the data processing device based on the XGBoost model across feature federation in the example embodiment of the present disclosure correspond to the steps of the example embodiment of the data processing method based on the XGBoost model across feature federation mentioned above, for details not disclosed in the device embodiment of the present disclosure, please refer to the embodiment of the data processing method based on the XGBoost model across feature federation mentioned above in the present disclosure.
[0186] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0187] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A data processing method based on an XGBoost model with cross-feature federation, characterized in that: include: Determine a gradient parameter corresponding to the label side data through a distributed computing node, and determine first histogram information for multi-dimensionally characterizing the label side data according to the gradient parameter; Encrypting the gradient parameter to obtain a gradient ciphertext, and sending the gradient ciphertext corresponding to the labeled party data to the unlabeled party based on a pipeline parallel processing method; wherein the unlabeled party determines second histogram information for multi-dimensionally characterizing the unlabeled party data according to the gradient ciphertext and the party's data, and sends the second histogram information to the labeled party; the pipeline parallel processing method means sending one gradient ciphertext to the unlabeled party each time one gradient ciphertext is completed; Determine node splitting information according to the first histogram information and the second histogram information, and perform node splitting processing on a first feature node tree constructed based on the label side data according to the node splitting information; The node splitting information is synchronized to the unlabeled party; wherein the unlabeled party performs node splitting processing on the second characteristic node tree constructed based on the data of the party according to the node splitting information; The tag party data and the own party data both include the following fields: user ID, name; the tag party data also includes: tag fields not held by the untagged party; The step of determining the gradient parameter corresponding to the label side data by using the distributed computing node includes: Controlling the distributed computing nodes to obtain corresponding data slices from the shared storage space based on their respective corresponding pointer data, and calculating gradient parameters corresponding to the data slices; wherein the label side data is composed of multiple data slices; The gradient parameters corresponding to the label side data are determined according to the gradient parameters corresponding to the data slices.
2. The method according to claim 1, characterized in that The method further comprises: Selecting a first data set from the label side data according to a preset ratio; Constructing the first feature node tree according to the first data set; Selecting a first target feature node from each feature node according to a gain value corresponding to each feature node in the first feature node tree; Selecting a second target feature node from each feature node according to the gradient parameters corresponding to each feature node corresponding to each feature node; Determine feature data for constructing a new feature node tree according to the first target feature node, the second target feature node and the remaining feature nodes; wherein the remaining feature nodes are feature nodes other than the first target feature node and the second target feature node among the feature nodes.
3. The method according to claim 1, characterized in that Determining first histogram information for multi-dimensionally characterizing label side data according to the gradient parameter includes: Determine the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the left branch node in the first feature node tree according to the gradient parameter, and determine the histogram sub-information corresponding to the right branch node according to the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the left branch node, until the first histogram information is determined; or, The histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the right branch node in the first feature node tree is determined according to the gradient parameter, and the histogram sub-information corresponding to the left branch node is determined according to the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the right branch node, until the first histogram information is determined.
4. The method according to claim 1, characterized in that: The unlabeled party is used to determine second histogram information for multi-dimensionally characterizing the local data according to the gradient ciphertext and the local data, including: The unlabeled party is used to determine the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the left branch node in the second feature node tree according to the gradient ciphertext and the local data when receiving the gradient ciphertext, and determine the histogram sub-information corresponding to the right branch node according to the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the left branch node, until the second histogram information is determined; or, The unlabeled party is used to determine the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the right branch node in the second feature node tree according to the gradient ciphertext and the local data when receiving the gradient ciphertext, and determine the histogram sub-information corresponding to the left branch node according to the histogram sub-information corresponding to the parent node and the histogram sub-information corresponding to the right branch node, until the second histogram information is determined.
5. The method according to any one of claims 1 to 4, characterized in that: The node splitting information at least includes splitting feature data and a splitting position corresponding to the splitting feature data.
6. A data processing system for an XGBoost model in a cross-feature federated learning scenario, characterized in that: include: The label side is used to determine the gradient parameters corresponding to the label side data through the distributed computing nodes, and determine the first histogram information used to characterize the label side data in multiple dimensions according to the gradient parameters; Encrypting the gradient parameters to obtain gradient ciphertexts, and sending the gradient ciphertexts corresponding to the tagged party data to the untagged party based on a pipeline parallel processing method; the pipeline parallel processing method means sending one gradient ciphertext to the untagged party each time one gradient ciphertext is completed; The unlabeled party is used to determine second histogram information for multi-dimensionally characterizing the own data according to the gradient ciphertext and the own data, and send the second histogram information to the labeled party; The label side is further used to determine node splitting information according to the first histogram information and the second histogram information, and perform node splitting processing on the first feature node tree constructed based on the label side data according to the node splitting information; and synchronize the node splitting information to the unlabeled side; The unlabeled party is further used to perform node splitting processing on a second characteristic node tree constructed based on the local data according to the node splitting information; The tag party data and the own party data both include the following fields: user ID, name; the tag party data also includes: tag fields not held by the untagged party; The label side is used to control the distributed computing nodes to obtain corresponding data slices from the shared storage space based on their respective corresponding pointer data, and calculate the gradient parameters corresponding to the data slices; wherein the label side data is composed of multiple data slices; and the gradient parameters corresponding to the label side data are determined according to the gradient parameters corresponding to the data slices.
7. A data processing device based on an XGBoost model with cross-feature federation, characterized in that: include: A distributed processing unit, used to determine a gradient parameter corresponding to the label side data through a distributed computing node, and determine first histogram information for multi-dimensionally characterizing the label side data according to the gradient parameter; A data transmission unit, used for encrypting the gradient parameter to obtain a gradient ciphertext, and sending the gradient ciphertext corresponding to the labeled party data to the unlabeled party based on a pipeline parallel processing method; wherein the unlabeled party is used to determine second histogram information for multi-dimensional characterization of the unlabeled party data according to the gradient ciphertext and the party data, and send the second histogram information to the labeled party; the pipeline parallel processing method means sending one gradient ciphertext to the unlabeled party every time one gradient ciphertext is completed; A node splitting processing unit, configured to determine node splitting information according to the first histogram information and the second histogram information, and perform node splitting processing on a first feature node tree constructed based on the label side data according to the node splitting information; The data transmission unit is further used to synchronize the node splitting information to the unlabeled party; wherein the unlabeled party is used to perform node splitting processing on the second characteristic node tree constructed based on the local data according to the node splitting information; The tag party data and the own party data both include the following fields: user ID, name; the tag party data also includes: tag fields not held by the untagged party; The distributed processing unit determines the gradient parameters corresponding to the label side data through the distributed computing nodes, including: controlling the distributed computing nodes to obtain corresponding data slices from the shared storage space based on their respective corresponding pointer data, and calculating the gradient parameters corresponding to the data slices; wherein the label side data is composed of multiple data slices; and determining the gradient parameters corresponding to the label side data according to the gradient parameters corresponding to the data slices.
8. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the data processing method of the XGBoost model based on cross-feature federation according to any one of claims 1 to 5 is implemented.
9. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the data processing method of the XGBoost model based on cross-feature federation as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Multi-party joint decision tree construction method and device and readable storage medium
CN111695697A
Longitudinal federal modeling method based on LightGBM algorithm
CN113591152A
