Federated learning data processing method, apparatus and device

By obtaining gradient information from the first device in the federated learning system to update the object classification conditions of the classification model, the problem of inaccurate feature data binning in the prior art is solved, and the training effect of deep neural networks is improved.

CN114969465BActive Publication Date: 2025-10-28JD DIGITS HAIYI INFORMATION TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111251714.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-25
Publication Date
2025-10-28
Estimated Expiration
2041-10-25

AI Technical Summary

Technical Problem

In existing technologies, when continuous statistical features are binned using equal-frequency and equal-interval binning methods, the accuracy of feature data binning is low, resulting in poor training performance of deep neural networks.

Method used

The first device in the federated learning system is used to obtain the model parameters of the classification model. The object classification conditions of each classification node in the classification model are updated through gradient information until the model converges. The classification interval corresponding to each feature is determined, and the object classification conditions are used to accurately bin the data.

Benefits of technology

It improves the accuracy of continuous feature binning and enhances the training effect of deep neural networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114969465B_ABST
    Figure CN114969465B_ABST
Patent Text Reader

Abstract

This application provides a federated learning data processing method, apparatus, and device, applied to a federated learning system. The federated learning system includes a first device and a second device. The first device includes multiple first features of multiple objects, and the second device includes multiple second features of the multiple objects. The method includes: the first device acquiring model parameters of a classification model corresponding to the i-th iteration processing, and acquiring gradient information of multiple first intervals corresponding to each first feature and gradient information of multiple second intervals corresponding to each second feature based on the model parameters; the first device updating the object classification conditions corresponding to the classification nodes in the classification model based on the gradient information of the multiple first intervals and the gradient information of the multiple second intervals; when the classification model converges, the first device determining at least one classification interval corresponding to each first feature and each second feature based on the converged classification model. This improves the accuracy of feature classification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a federated learning data processing method, apparatus, and device. Background Technology

[0002] When training deep neural networks, continuous statistical features need to be binned to enhance the non-linear expressive power of the features, thereby improving the training effect of deep neural networks.

[0003] Currently, when binning continuous statistical features, methods like equal-frequency or equal-interval binning can be used based on human experience. For example, if the continuous range of user age features is 1-100 years old, human experience can be used to divide the user age features into two equal bins, resulting in discrete user age feature ranges: 1-50 years old and 51-100 years old. However, binning based on equal intervals and frequencies cannot accurately bin continuous statistical features, leading to low accuracy in feature data binning and poor training performance of deep neural networks. Summary of the Invention

[0004] This application provides a federated learning data processing method, apparatus, and device to address the technical problems of low accuracy in feature data binning and poor training effect of deep neural networks in the prior art.

[0005] In a first aspect, embodiments of this application provide a federated learning data processing method applied to a federated learning system, the federated learning system including a first device and a second device, the first device including at least one first feature of a plurality of objects, the second device including at least one second feature of the plurality of objects, the method including:

[0006] The first device obtains the model parameters of the classification model corresponding to the i-th iteration processing. The classification model includes multiple classification nodes, and each classification node corresponds to an object classification condition.

[0007] The first device obtains gradient information of multiple first intervals corresponding to each first feature and gradient information of multiple second intervals corresponding to each second feature based on the model parameters.

[0008] The first device updates the object classification conditions corresponding to each classification node in the classification model based on the gradient information of multiple first intervals corresponding to each first feature and the gradient information of multiple second intervals corresponding to each second feature.

[0009] The number of iterations is increased sequentially until the classification model converges. Then, the first device determines at least one classification interval corresponding to each first feature and each second feature based on the converged classification model.

[0010] In one possible implementation, for any one of the plurality of classification nodes; based on the gradient information of the plurality of intervals corresponding to each first feature and the gradient information of the plurality of intervals corresponding to each second feature, the object classification conditions corresponding to the classification node in the classification model are updated, including:

[0011] The first device determines multiple candidate classification conditions based on multiple first intervals corresponding to each first feature and multiple second intervals corresponding to each second feature;

[0012] The first device determines the classification loss value corresponding to each candidate classification condition;

[0013] The first device updates the object classification condition corresponding to the classification node to the candidate classification condition with the minimum classification loss value.

[0014] In one possible implementation, for any one of the plurality of candidate classification conditions, the first device determines the classification loss value corresponding to the candidate classification condition, including:

[0015] Determine a first set of objects corresponding to the classification node, wherein the first set of objects includes at least two objects, and the plurality of objects include the first set of objects;

[0016] The first object set is classified according to the candidate classification conditions to obtain a first sub-object set and a second sub-object set;

[0017] Based on the gradient information of each object in the first sub-object set, the gradient information of each object in the second sub-object set, and the gradient information of each object in the first object set, the classification loss value corresponding to the candidate classification condition is determined.

[0018] In one possible implementation, the gradient information includes a first gradient and a second gradient; determining the classification loss value corresponding to the candidate classification condition based on the gradient information of each object in the first sub-object set, the gradient information of each object in the second sub-object set, and the gradient information of each object in the first object set includes:

[0019] The classification loss value corresponding to the candidate classification condition is determined according to the following formula:

[0020]

[0021] Wherein, the L split For the classification loss value, the I L For the first sub-object set, the I R The second sub-object set, I is the first object set, and gi h is the first gradient of the i-th object. i γ is the second gradient of the i-th object, λ is the first preset parameter, and γ is the second preset parameter.

[0022] In one possible implementation, the first device updates the object classification conditions corresponding to each classification node in the classification model based on the gradient information of multiple first intervals corresponding to each first feature and the gradient information of multiple second intervals corresponding to each second feature, including:

[0023] The first device determines the update order of the plurality of classification nodes based on the position of the classification node in the classification model;

[0024] The first device updates the object classification conditions corresponding to each classification node in the classification model according to the update order, based on the gradient information of multiple first intervals corresponding to each first feature and the gradient information of multiple second intervals corresponding to each second feature.

[0025] In one possible implementation, the first device determines multiple candidate classification conditions based on multiple intervals corresponding to each first feature and multiple intervals corresponding to each second feature, including:

[0026] The first device determines the endpoint value and the feature corresponding to each interval;

[0027] The first device determines the multiple candidate classification conditions based on the endpoint values ​​and features corresponding to each interval.

[0028] In one possible implementation, the first device obtains gradient information of multiple first intervals corresponding to each first feature based on the model parameters, including:

[0029] The first device determines the gradient information of each object based on the model parameters and at least one first feature of the plurality of objects;

[0030] The first device determines multiple first intervals corresponding to each first feature;

[0031] The first device determines the gradient information of multiple first intervals corresponding to each first feature based on the gradient information of each object.

[0032] In one possible implementation, for any one of the at least one first feature; the first device determines gradient information of a plurality of first intervals corresponding to the first feature based on the gradient information of each object, including:

[0033] For any one of the plurality of first intervals, the first device determines the target object corresponding to the first interval among the at least one object based on the first feature of the plurality of objects, wherein the first feature of the target object is located within the first interval;

[0034] The sum of the gradient information of the target object is determined as the gradient information of the first interval.

[0035] In one possible implementation, the first device acquires gradient information of multiple second intervals corresponding to each second feature, including:

[0036] The first device sends gradient information for each object to the second device;

[0037] The first device receives gradient information of multiple second intervals corresponding to each second feature from the second device. The gradient information of multiple second intervals corresponding to each second feature is determined by the second device based on the gradient information of each object.

[0038] In one possible implementation, for any one of at least one first feature and at least one second feature to be processed, the first device determines the classification interval corresponding to the feature to be processed based on a converged classification model, including:

[0039] The first device determines the classification features corresponding to each classification node in the classification model, and the object classification conditions corresponding to the classification node are the conditions for classification according to the classification features;

[0040] The first device determines at least one target classification node among the plurality of classification nodes based on the classification features corresponding to each classification node, and the classification feature corresponding to the target classification node is the feature to be processed.

[0041] The first device determines the at least one classification interval based on the threshold in the object classification conditions corresponding to the target classification node.

[0042] In one possible implementation, after the first device determines at least one classification interval corresponding to each first feature and each second feature based on a converged classification model, it further includes:

[0043] Obtain data to be classified, wherein the data to be classified includes multiple features, and the multiple features include some or all of the at least one first feature and the at least one second feature;

[0044] The data to be classified is classified based on at least one classification interval corresponding to each first feature and each second feature.

[0045] Secondly, this application provides a federated learning data processing apparatus for use in a federated learning system. The federated learning system includes a first device and a second device. The first device includes at least one first feature of a plurality of objects, and the second device includes at least one second feature of the plurality of objects. The federated learning data processing apparatus includes a first acquisition module, a second acquisition module, an update module, and a determination module, wherein:

[0046] The first acquisition module is used to acquire the model parameters of the classification model corresponding to the i-th iteration processing. The classification model includes multiple classification nodes, and each classification node corresponds to an object classification condition.

[0047] The second acquisition module is used for the first device to acquire gradient information of multiple first intervals corresponding to each first feature and gradient information of multiple second intervals corresponding to each second feature based on the model parameters.

[0048] The update module is used to update the object classification conditions corresponding to each classification node in the classification model based on the gradient information of multiple first intervals corresponding to each first feature and the gradient information of multiple second intervals corresponding to each second feature.

[0049] The number of iterations is increased sequentially until the classification model converges. Then, the first device determines at least one classification interval corresponding to each first feature and each second feature based on the converged classification model.

[0050] In one possible implementation, the update module is specifically used for:

[0051] The first device determines multiple candidate classification conditions based on multiple first intervals corresponding to each first feature and multiple second intervals corresponding to each second feature;

[0052] The first device determines the classification loss value corresponding to each candidate classification condition;

[0053] The first device updates the object classification condition corresponding to the classification node to the candidate classification condition with the minimum classification loss value.

[0054] In one possible implementation, the update module is specifically used for:

[0055] Determine a first set of objects corresponding to the classification node, wherein the first set of objects includes at least two objects, and the plurality of objects include the first set of objects;

[0056] The first object set is classified according to the candidate classification conditions to obtain a first sub-object set and a second sub-object set;

[0057] Based on the gradient information of each object in the first sub-object set, the gradient information of each object in the second sub-object set, and the gradient information of each object in the first object set, the classification loss value corresponding to the candidate classification condition is determined.

[0058] In one possible implementation, the update module is specifically used for:

[0059] The classification loss value corresponding to the candidate classification condition is determined according to the following formula:

[0060]

[0061] Wherein, the L split For the classification loss value, the I L For the first sub-object set, the I R The second sub-object set, I is the first object set, and g i h is the first gradient of the i-th object. i γ is the second gradient of the i-th object, λ is the first preset parameter, and γ is the second preset parameter.

[0062] In one possible implementation, the update module is specifically used for:

[0063] The first device determines the update order of the plurality of classification nodes based on the position of the classification node in the classification model;

[0064] The first device updates the object classification conditions corresponding to each classification node in the classification model according to the update order, based on the gradient information of multiple first intervals corresponding to each first feature and the gradient information of multiple second intervals corresponding to each second feature.

[0065] In one possible implementation, the update module is specifically used for:

[0066] The first device determines the endpoint value and the feature corresponding to each interval;

[0067] The first device determines the multiple candidate classification conditions based on the endpoint values ​​and features corresponding to each interval.

[0068] In one possible implementation, the second acquisition module is specifically used for:

[0069] The first device determines the gradient information of each object based on the model parameters and at least one first feature of the plurality of objects;

[0070] The first device determines multiple first intervals corresponding to each first feature;

[0071] The first device determines the gradient information of multiple first intervals corresponding to each first feature based on the gradient information of each object.

[0072] In one possible implementation, the second acquisition module is specifically used for:

[0073] For any one of the plurality of first intervals, the first device determines the target object corresponding to the first interval among the at least one object based on the first feature of the plurality of objects, wherein the first feature of the target object is located within the first interval;

[0074] The sum of the gradient information of the target object is determined as the gradient information of the first interval.

[0075] In one possible implementation, the second acquisition module is specifically used for:

[0076] The first device sends gradient information for each object to the second device;

[0077] The first device receives gradient information of multiple second intervals corresponding to each second feature from the second device. The gradient information of multiple second intervals corresponding to each second feature is determined by the second device based on the gradient information of each object.

[0078] In one possible implementation, the determining module is specifically used for:

[0079] The first device determines the classification features corresponding to each classification node in the classification model, and the object classification conditions corresponding to the classification node are the conditions for classification according to the classification features;

[0080] The first device determines at least one target classification node among the plurality of classification nodes based on the classification features corresponding to each classification node, and the classification feature corresponding to the target classification node is the feature to be processed.

[0081] The first device determines the at least one classification interval based on the threshold in the object classification conditions corresponding to the target classification node.

[0082] In one possible implementation, the apparatus further includes a third acquisition module, the third acquisition module being used for:

[0083] Obtain data to be classified, wherein the data to be classified includes multiple features, and the multiple features include some or all of the at least one first feature and the at least one second feature;

[0084] The data to be classified is classified based on at least one classification interval corresponding to each first feature and each second feature.

[0085] Thirdly, embodiments of this application provide a federated learning data processing device, including a processor and a memory;

[0086] The memory stores computer-executed instructions;

[0087] The processor executes computer execution instructions stored in the memory, causing the processor to perform the federated learning data processing method as described in the first aspect.

[0088] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the federated learning data processing method described in the first aspect.

[0089] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the federated learning data processing method described in the first aspect.

[0090] This application provides a federated learning data processing method, apparatus, and device, applied to a federated learning system. The federated learning system includes a first device and a second device. The first device includes at least one first feature of multiple objects, and the second device includes at least one second feature of multiple objects. The first device obtains the model parameters of the classification model corresponding to the i-th iteration. The classification model includes multiple classification nodes, and each classification node corresponds to an object classification condition. The first device updates the object classification condition corresponding to each classification node in the classification model based on the gradient information of multiple first intervals corresponding to each first feature and the gradient information of multiple second intervals corresponding to each second feature. The iteration number is incremented sequentially until the classification model converges. The first device determines at least one classification interval corresponding to each first feature and each second feature based on the converged classification model. In the above method, the classification model updates the object classification conditions corresponding to each classification node in the classification model based on the gradient information of the first interval corresponding to multiple first features and the gradient information of the second interval corresponding to multiple second features. Since the object classification conditions are determined by the classification model based on the gradient information of the first interval of multiple first features and the second interval of multiple second features, the multiple first features and multiple second features can be accurately binned through the object classification conditions, thereby improving the accuracy of binning continuous features and improving the training effect of deep neural networks. Attached Figure Description

[0091] Figure 1 This application provides an illustration of an application scenario for a federated learning system.

[0092] Figure 2 A flowchart illustrating a federated learning data processing method provided in an embodiment of this application;

[0093] Figure 3 A schematic diagram of a classification model provided in an embodiment of this application;

[0094] Figure 4 A flowchart illustrating another federated learning data processing method provided in this application embodiment;

[0095] Figure 5 A schematic diagram illustrating a process for determining multiple candidate classification conditions provided in this application embodiment;

[0096] Figure 6 This application provides a schematic diagram of a process for determining a classification interval.

[0097] Figure 7 A schematic diagram illustrating a federated learning data processing method provided in this application embodiment;

[0098] Figure 8 A schematic diagram of the structure of a federated learning data processing device provided in an embodiment of this application;

[0099] Figure 9 A schematic diagram of another federated learning data processing apparatus provided in this application embodiment;

[0100] Figure 10 A schematic diagram of the hardware structure of the federated learning data processing device provided in this application. Detailed Implementation

[0101] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0102] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0103] In related technologies, when binning continuous statistical features, equal-frequency or equal-interval binning methods can be used based on human experience. For example, if a user's age is a continuous feature ranging from 1 to 80 years old, it can be divided into four discrete features based on human experience, with each discrete feature having the same interval length. That is, the continuous age feature can be divided into four intervals: 1-20 years old, 21-40 years old, 41-60 years old, and 61-80 years old. However, the equal-interval or equal-frequency binning method cannot accurately bin continuous statistical features. For example, the number of users in two equally spaced intervals may differ significantly, leading to low accuracy in feature data binning.

[0104] To address the low accuracy of feature data binning in related technologies, this application provides a federated learning data processing method applied to a federated learning system. The federated learning system includes a first device and a second device. The first device includes at least one first feature of multiple objects, and the second device includes at least one second feature of multiple objects. The first device acquires the model parameters of the classification model corresponding to the i-th iteration, and based on the model parameters, acquires the gradient information of multiple first intervals corresponding to each first feature and the gradient information of multiple second intervals corresponding to each second feature. Based on the multiple intervals corresponding to each first feature and each second feature, the first device determines multiple candidate classification conditions and determines the classification loss value corresponding to each candidate classification condition. The first device updates the object classification condition corresponding to the classification node to the candidate classification condition with the smallest classification loss value. In this method, since the object classification condition is determined by the classification model based on the gradient information of the first intervals of multiple first features and the second intervals of multiple second features, and the classification loss value of the object classification condition is minimized, the object classification condition can accurately bin multiple first features and multiple second features, thereby improving the accuracy of binning continuous features.

[0105] Below, in conjunction with Figure 1 This application describes the application scenarios of the federal learning system involved in this application.

[0106] Figure 1 This is a schematic diagram illustrating an application scenario of a federated learning system provided in an embodiment of this application. Please refer to [link / reference]. Figure 1 The system comprises a federated learning system and a server. The federated learning system includes a first device and a second device. The first device includes features A and B of user A, and features C and D of user B. The second device includes features E and F of user A, and features G and H of user B. The server, the first device, and the second device can participate in the federated learning process.

[0107] See Figure 1 In the federated learning process, the server distributes a global model to both the first and second devices. The first and second devices train their local models using local user feature data, uploading the trained models to the server. The server then aggregates these local models to obtain an updated global model. This process is repeated until the aggregated global model converges. In this way, both the first and second devices have their own training samples, allowing them to train their local models without leaving their local devices.

[0108] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0109] Figure 2 This is a flowchart illustrating a federated learning data processing method provided in an embodiment of this application. Please refer to... Figure 2 The method may include:

[0110] S201, The first device obtains the model parameters of the classification model corresponding to the i-th iteration.

[0111] The execution entity in this application embodiment can be a first device in a federated learning system, or a federated learning data processing device installed in the first device. The federated learning data processing device can be implemented by software or by a combination of software and hardware.

[0112] Federated Machine Learning, also known as Federated Learning, enables collaborative data use and modeling among various parties without requiring the data to leave the local machine, and is gradually becoming a common method in privacy-preserving computing.

[0113] In the process of federated learning, the privacy of participants' data can be protected through parameter exchange under an encrypted mechanism. The data itself is not transmitted, and participants do not need to expose the data they possess to other participants, nor can they infer the data of other participants. Therefore, federated learning can effectively protect user privacy and ensure data security, and can solve the problem of data silos.

[0114] The federated learning system includes a first device and a second device. The first device includes at least one first feature of multiple objects, and the second device includes at least one second feature of multiple objects. Optionally, the first device can be the party with labeled features in the federated learning process, and the second device can be the party without labeled features. For example, in a federated learning model training task where the goal is to predict whether a user will default on a loan based on user characteristics, the first device could be a bank-side client device, which can store multiple user features and a label feature indicating whether the user has defaulted on a loan. The second device could be an e-commerce-side client device, which can store multiple user features, such as user purchasing habits and weekly spending levels, but does not include a label feature indicating whether the user has defaulted on a loan.

[0115] Optionally, the multiple objects included in the first and second devices can be users. For example, a bank's client device can store the features of multiple users, and an e-commerce client device can also store the features of multiple users. Optionally, in practical applications of federated learning, it is first necessary to perform sample alignment processing on the user features of the first and second devices to obtain aligned samples. For example, if the bank's client includes the features of user A, user B, and user C, and the e-commerce client includes the features of user A and user B, then the aligned samples will include the features of user A and user B. For example, the first device includes the features of user A and user B, and the second device includes the features of user A and user B.

[0116] Optionally, the first feature of an object in the first device and the second feature of an object in the second device may be the same or different. For example, the first feature of user A in a bank client device may include age, height, occupation, and income, while the second feature of user A in an e-commerce client device may include age and occupation. Thus, the common features between the bank client device and the e-commerce client device are user A's age and occupation; however, the e-commerce client device does not include user A's height and income. It is worth noting that the feature data used in the context of this application embodiment may be feature data authorized by the user or feature data permitted by laws and regulations.

[0117] The classification model can be a decision tree model. A decision tree model is a tree diagram consisting of decision points, strategy points (event points), and outcomes. It is generally used in sequential decision-making. Usually, the decision criterion is the maximum expected value of revenue or the minimum expected cost. The benefit values ​​of various options under different conditions are solved graphically, and then a decision is made by comparison.

[0118] Optionally, the classification model includes multiple classification nodes, each corresponding to an object classification condition. For example, the classification model can classify multiple objects using classification nodes. Each time an object is classified, the model can classify it according to the object classification condition. For instance, an object classification condition could be objects older than 20 years old. Using this condition, multiple objects can be classified into objects older than 20 years old and objects younger than or equal to 20 years old. Optionally, each time the classification model splits, a classification node corresponds to an object classification condition.

[0119] The model parameters of a classification model can be the numerical values ​​corresponding to the bottom-level classification nodes. For example, in a decision tree model, each leaf node at the bottom level of the decision tree corresponds to a numerical value, which is a model parameter of the classification model. For example, if a decision tree model ends after a split at the initial node, this decision tree model includes two leaf nodes, and the numerical value of each leaf node is a model parameter of the decision tree model. Optionally, determining the values ​​of the leaf nodes in the decision tree model is a technique disclosed in the prior art, and will not be elaborated further in this application.

[0120] Optionally, when the first device obtains classification models for multiple objects, it can acquire the model parameters of the classification models. The number of iterations is incremented sequentially until the classification model converges. For example, i can take values ​​of 1, 2, ..., until the classification model converges. Optionally, when i is 1, the starting node in the classification model is a leaf node, and all objects are contained within this starting node. The value corresponding to this node can be a pre-set default value.

[0121] Optionally, the convergence of the classification model can be determined according to the following feasible implementation: the classification model is considered to have converged when i is greater than a first preset threshold. For example, if the preset threshold is 3, the classification model is considered to have converged after 3 iterations.

[0122] Optionally, the convergence of the classification model can be determined based on its prediction results. For example, if the difference in accuracy between two or more adjacent iterations is less than a second preset threshold, the classification model is considered to have converged.

[0123] Below, in conjunction with Figure 3 This section provides a detailed explanation of the model parameters in the classification model.

[0124] Figure 3 This is a schematic diagram of a classification model provided in an embodiment of this application. Please refer to [link / reference]. Figure 3 This includes a classification model. The classification model includes classification nodes A, B, and C. Classification node A corresponds to the condition that the object is older than 20 years old; classification node B corresponds to the condition that the object is younger than 30 years old; and classification node C corresponds to the condition that the object weighs less than 30 kg.

[0125] See Figure 3 The node corresponding to category node A includes all objects. Category node A classifies all objects into those older than 20 and those younger than or equal to 20. Category node B classifies objects older than 20 into those older than 20 and younger than 30 and those older than or equal to 30. Category node C classifies objects younger than or equal to 20 into those younger than or equal to 20 and weighing less than 30 kg and those younger than or equal to 20 and weighing more than or equal to 30 kg.

[0126] See Figure 3 After classifying all objects using three classification nodes, leaf nodes A1, A2, A3, and A4 are obtained. The value corresponding to A1 is X1, the value corresponding to A2 is X2, the value corresponding to A3 is X3, and the value corresponding to A4 is X4. Therefore, the model parameters of this classification model are X1, X2, X3, and X4.

[0127] S202, the first device obtains the gradient information of multiple first intervals corresponding to each first feature and the gradient information of multiple second intervals corresponding to each second feature according to the model parameters.

[0128] The first feature is the feature corresponding to the user in the first device, and the second feature is the feature corresponding to the user in the second device. For example, if the features of user A in the first device are features A and features B, and the feature of user A in the second device is feature C, then the first feature of user A is features A and features B, and the second feature of user A is feature C.

[0129] The first interval can be the interval obtained by segmenting the first feature. For example, if the first feature is age, and the continuous feature interval of age is 1-80 years old, then segmenting the age will result in two first intervals: one first interval is 1-40 years old, and the other first interval is 41-80 years old.

[0130] The second interval can be the interval obtained by segmenting the second feature. For example, if the second feature is height, and the continuous feature interval of height is 100cm-200cm, then segmenting the height will yield two second intervals: one second interval is 100cm-150cm, and the other second interval is 151cm-200cm.

[0131] The gradient information includes a first gradient and a second gradient. The first gradient is the first-order gradient of the interval. The second gradient is obtained by calculating the gradient again based on the expression for the first-order gradient of the interval. Optionally, the gradient information of multiple first intervals corresponding to each first feature can be obtained based on the following feasible implementation method: The first device determines the gradient information of each object based on the model parameters and at least one first feature of multiple objects. For example, a classification model includes leaf nodes A1 and A2, where the value of leaf node A1 is X1 and the value of leaf node A2 is X2. If, based on at least one first feature of multiple objects, objects A, B, and C are classified in node A1 of the classification model, and objects D, E, and F are classified in node A2 of the classification model, then the first gradient of objects A, B, and C is the first-order gradient of X1. Based on the first-order gradient of X1, the gradient is calculated again to obtain the second gradient of objects A, B, and C. The first gradient of objects D, E, and F is the first-order gradient of X2. Based on the first-order gradient of X2, the gradient is calculated again to obtain the second gradient of objects D, E, and F.

[0132] The first device determines multiple first intervals corresponding to each first feature. Optionally, multiple first intervals corresponding to the first feature can be determined according to equal intervals, equal frequencies, and equal binning methods. For example, if the first feature is an age feature, and the age feature ranges from 1 to 80 years old, then the first feature can be divided into 4 first intervals: 1-20 years old, 21-40 years old, 41-60 years old, and 61-80 years old.

[0133] The first device determines the gradient information of multiple first intervals corresponding to each first feature based on the gradient information of each object. Optionally, for any one of the at least one first feature, the gradient information of multiple first intervals corresponding to the first feature can be determined according to the following feasible implementation: For any one of the multiple first intervals, the first device determines the target object corresponding to the first interval in at least one object based on the first features of the multiple objects. Wherein, the first feature of the target object is located within the first interval. For example, the first intervals corresponding to the age feature are: 1-40 years old and 41-80 years old. If user A's age feature is 23 years old, user B's age feature is 18 years old, user C's age feature is 35 years old, and user D's age feature is 66 years old, then the target objects corresponding to the first interval of 1-40 years old are user A, user B, and user C, and the target object corresponding to the first interval of 41-80 years old is user D.

[0134] The sum of the gradient information of the target objects is determined as the gradient information of the first interval. For example, the sum of the first gradients of the target objects is determined as the first gradient of the first interval, and the sum of the second gradients of the target objects is determined as the second gradient of the first interval. For example, if the target objects corresponding to the first interval are user A and user B, and the gradient information of user A is: first gradient A and second gradient A, and the gradient information of user B is: first gradient B and second gradient B, then the first gradient of the first interval is the sum of the first gradient A and the first gradient B, and the second gradient of the first interval is the sum of the second gradient A and the second gradient B.

[0135] Optionally, the first device can obtain gradient information for multiple second intervals corresponding to each second feature according to the following feasible implementation: the first device sends the gradient information of each object to the second device. For example, after obtaining the gradient information of each object based on the parameters of the classification model, the first device can send the gradient information of each object to the second device.

[0136] Optionally, before the first device sends the gradient information of each object to the second device, the first device can perform homomorphic encryption on the gradient information of each object, and the second device can obtain the homomorphically encrypted gradient information of the object from the first device. For example, the Paillier encryption algorithm can be used to encrypt the gradient information of each object. The Paillier encryption algorithm is an additive homomorphic encryption algorithm, and the result obtained by adding and decrypting after encryption is the same as the result obtained by directly adding the original data.

[0137] The first device receives gradient information for multiple second intervals corresponding to each second feature from the second device. The gradient information for each second feature corresponding to multiple second intervals is determined by the second device based on the gradient information of each object. For example, for the weight feature, if weight is a user's second feature, it is divided into two second intervals: 10kg-20kg and 21kg-30kg, using an equidistant binning method. If user A's weight is 23kg and user B's weight is 29kg, the second device can determine that the local second interval for users A and B is 21kg-30kg. Since the second device has already obtained the gradient information for users A and B from the first device, it can obtain the gradient information for the 21kg-30kg second interval corresponding to the weight feature based on the gradient information of users A and B. Optionally, since the gradient information of the object obtained by the second device is homomorphically encrypted, the gradient information for each second feature corresponding to multiple second intervals obtained by the first device from the second device is also homomorphically encrypted.

[0138] S203. The first device updates the object classification conditions corresponding to each classification node in the classification model based on the gradient information of multiple first intervals corresponding to each first feature and the gradient information of multiple second intervals corresponding to each second feature.

[0139] Optionally, the object classification conditions corresponding to the classification nodes in the classification model can be updated according to the following feasible implementation: The first device determines multiple candidate classification conditions based on multiple first intervals corresponding to each first feature and multiple second intervals corresponding to each second feature. The first device determines the classification loss value corresponding to each candidate classification condition and updates the object classification condition corresponding to the classification node to the candidate classification condition with the smallest classification loss value. For example, the first device determines the candidate classification conditions A and B based on multiple first intervals corresponding to each first feature and multiple second intervals corresponding to each second feature. If the classification loss value corresponding to classification condition A is less than the classification loss value corresponding to classification condition B, then the object classification condition corresponding to the classification node is updated to classification condition A.

[0140] Optionally, when updating the classification model, since the first device includes label data, the classification model is updated in the first device.

[0141] S204. When the classification model converges, the first device determines at least one classification interval corresponding to each first feature and each second feature based on the converged classification model.

[0142] Optionally, for any one of the at least one first feature and at least one second feature to be processed, the classification interval corresponding to the feature to be processed can be determined according to the following feasible implementation: The first device determines the classification features corresponding to each classification node in the classification model. The unique classification condition corresponding to each classification node is the condition for classification based on the classification feature. Based on the classification features corresponding to each classification node, the first device determines at least one target classification node among multiple classification nodes. The classification feature corresponding to the target classification node is the feature to be processed. The first device determines at least one classification interval based on the threshold in the object classification condition corresponding to the target classification node.

[0143] Optionally, in federated learning applications, since gradient information is homomorphically encrypted, and when the second device sends multiple second intervals of multiple second features to the first device, the second device also encodes and encrypts the second features and intervals. Thus, the first device does not know the specific encrypted features of the second device. However, due to homomorphic encryption, it can still determine the classification loss value corresponding to each classification condition. If the classification feature corresponding to the classification condition of the classification node in the final converged classification model is the second feature from the second device, the first device cannot obtain the classification interval corresponding to the second feature through the classification model; it can only obtain the classification interval corresponding to the first feature. However, the first device can obtain the encoded second feature and the encoded classification interval. The first device sends the encoded second feature and the encoded classification interval to the second device, and the second device parses the encoding to obtain the classification interval corresponding to the second feature from the second device. In this way, the classification intervals corresponding to multiple features can be accurately obtained while maintaining data confidentiality, improving both the security of the federated learning model and the accuracy of feature data classification.

[0144] The second device can send the encoded second feature correspondence to the first device.

[0145] This application provides a federated learning data processing method applied to a federated learning system. The federated learning system includes a first device and a second device. The first device includes at least one first feature of multiple objects, and the second device includes at least one second feature of multiple objects. The first device obtains the model parameters of the classification model corresponding to the i-th iteration. The classification model includes multiple classification nodes, each corresponding to an object classification condition. The first device obtains the gradient information of multiple first intervals corresponding to each first feature and the gradient information of multiple second intervals corresponding to each second feature based on the model parameters. The first device updates the object classification condition corresponding to each classification node in the classification model based on the gradient information of the multiple first intervals corresponding to the first feature and the multiple second intervals corresponding to each second feature. When the classification model converges, the first device determines at least one classification interval corresponding to each first feature and each second feature based on the converged classification model. Since the object classification condition is determined by the classification model based on the gradient information of the first intervals of multiple first features and the second intervals of multiple second features, and the classification loss value of the object classification condition is minimized, the object classification condition can accurately bin multiple first features and multiple second features, thereby improving the accuracy of binning continuous features and improving the training effect of deep neural networks.

[0146] exist Figure 2 Based on the embodiments shown, the following, in conjunction with Figure 4 The above-mentioned federated learning data processing methods are explained in detail.

[0147] Figure 4 This is a flowchart illustrating another federated learning data processing method provided in an embodiment of this application. Please refer to... Figure 4 The method process includes:

[0148] S401. The first device obtains the model parameters of the classification model corresponding to the i-th iteration. The classification model includes multiple classification nodes, and each classification node corresponds to an object classification condition.

[0149] It should be noted that the execution process of step S401 can refer to the execution process of step S201, and will not be described again in this embodiment of the application.

[0150] S402, the first device obtains gradient information of multiple first intervals corresponding to each first feature and gradient information of multiple second intervals corresponding to each second feature according to the model parameters.

[0151] It should be noted that the execution process of step S402 can refer to the execution process of step S202, and this embodiment of the application will not repeat it.

[0152] S403. The first device determines multiple candidate classification conditions based on multiple first intervals corresponding to each first feature and multiple second intervals corresponding to each second feature.

[0153] Optionally, multiple candidate classification conditions can be determined according to the following feasible implementation: the first device determines the endpoint values ​​corresponding to each interval and the feature corresponding to each interval. For example, if the first interval is an age feature, and the range of the first interval is 1 year to 20 years old, then the endpoint values ​​corresponding to the first interval are 1 year and 20 years old, and the feature corresponding to the first interval is age.

[0154] The first device determines multiple candidate classification conditions based on the endpoint values ​​and features corresponding to each interval. For example, if multiple users have age and height features, and the age features correspond to multiple intervals of 1-20 years and 20-40 years, and the height features correspond to multiple intervals of 100cm-150cm and 150cm-200cm, then the candidate classification conditions include: Age classification: whether greater than 1 year, whether greater than 20 years, and whether greater than 40 years; Height classification: whether greater than 100cm, whether greater than 150cm, and whether greater than 200cm.

[0155] Below, in conjunction with Figure 5 The process of determining multiple candidate classification criteria is explained.

[0156] Figure 5 This is a schematic diagram illustrating a process for determining multiple candidate classification conditions, provided as an embodiment of this application. Please refer to... Figure 5 This includes a set of feature intervals. The feature interval set includes intervals corresponding to age, height, and weight. The intervals corresponding to age are [1,20], [20,40], and [40,60]; the intervals corresponding to height are [90,120], [120,150], and [150,180]; and the intervals corresponding to weight are [30,50], [50,70], and [70,90].

[0157] See Figure 5 Based on the set of feature intervals, traverse the endpoints of all feature interval sets to obtain the set of feature endpoints. The feature endpoints include endpoints for age, height, and weight. The endpoints for age are: 1, 20, 40, 60; the endpoints for height are: 90, 120, 150, 180; and the endpoints for weight are: 30, 50, 70, 90.

[0158] See Figure 5Based on the set of feature endpoints, a set of candidate classification conditions is determined. This set includes 12 candidate conditions: age greater than 1 year, age greater than 20 years, age greater than 40 years, age greater than 60 years, height greater than 90cm, height greater than 120cm, height greater than 150cm, height greater than 180cm, weight greater than 30kg, weight greater than 50kg, weight greater than 70kg, and weight greater than 90kg.

[0159] S404. The first device determines the classification loss value corresponding to each candidate classification condition.

[0160] The classification loss is the difference between the loss function after the classification model classifies users according to the classification criteria and the loss function before classification. For example, if the loss function of the classification model before classifying multiple users based on the classification criterion of whether they are older than 20 years old is Y1, and the loss function after classifying multiple users based on the classification criterion of whether they are older than 20 years old is Y2, then the classification loss is Y1-Y2.

[0161] Optionally, for any one of the multiple candidate classification conditions, the classification loss value corresponding to the candidate classification condition can be determined according to the following feasible implementation method: determine the first object set corresponding to the classification node. The first object set includes at least two objects, and multiple objects may be included in the first object set. For example, the first object set corresponding to the starting node of the classification model includes all objects to be classified.

[0162] The first set of objects is classified according to the candidate classification criteria, resulting in a first sub-set of objects and a second sub-set of objects. For example, if the candidate classification criterion is whether the age is greater than 20, then the first sub-set of objects consists of objects younger than 20, and the second sub-set of objects consists of objects older than or equal to 20.

[0163] Based on the gradient information of each object in the first sub-object set, the gradient information of each object in the second sub-object set, and the gradient information of each object in the first object set, the classification loss value corresponding to the candidate classification condition is determined. Optionally, the gradient information includes the first gradient and the second gradient. The classification loss value corresponding to the candidate classification condition can be determined according to the following feasible implementation method: The classification loss value corresponding to the candidate classification condition is determined according to the following formula:

[0164]

[0165] Among them, L split For the classification loss value, I L For the first sub-object set, I R Let I be the second set of sub-objects, and g be the first set of objects.i h is the first gradient of the i-th object. i Let be the second gradient of the i-th object, λ be the first preset parameter, and γ be the second preset parameter. In i∈I L At that time, g i h is the first gradient of the i-th object in the first sub-object set. i The second gradient of the i-th object in the first sub-object set; where i∈I R At that time, g i h is the first gradient of the i-th object in the second sub-object set. i The second gradient of the i-th object in the second sub-object set; when i∈I, g i h represents the first gradient of the i-th object in the first set of objects. i Let be the second gradient of the i-th object in the first set of objects.

[0166] Since the first device can acquire gradient information for each object, it can obtain the classification loss value corresponding to each candidate classification condition according to Formula 1. For example, if the candidate classification condition is whether the age is greater than 20, the first device determines the sum of the first and second gradients of all users under 20 years old, the sum of the first and second gradients of all users over 20 years old, and the sum of the first and second gradients of all users before classifying based on whether the age is greater than 20. Then, it obtains the classification loss value for the candidate classification condition of whether the age is greater than 20 according to Formula 1.

[0167] S405. The first device updates the object classification condition corresponding to the classification node to the candidate classification condition with the minimum classification loss value.

[0168] Optionally, when the classification model performs the next classification, it updates the object classification conditions of the classification nodes to the candidate classification conditions with the smallest classification loss value. For example, if the candidate classification conditions are classification condition A and classification condition B, and the classification loss value of classification condition A is less than that of classification condition B, then the classification model will classify multiple objects according to classification condition A in the next classification.

[0169] Optionally, the object classification conditions corresponding to each classification node can be updated according to the following feasible implementation: the first device determines the update order of multiple classification nodes based on the position of the classification node in the classification model. For example, please refer to... Figure 3 The update order of multiple classification nodes is: classification node A, classification node B, and classification node C. Classification node B and classification node C are located at the same decision tree layer, so classification node B and classification node C can be updated simultaneously.

[0170] The first device updates the object classification conditions corresponding to each classification node in the classification model according to the update order, based on the gradient information of multiple first intervals corresponding to each first feature and the gradient information of multiple second intervals corresponding to each second feature. For example, if the update order of multiple classification nodes is: classification node A, classification node B, and classification node C, then the first device first updates the object classification conditions corresponding to classification node A, then updates the object classification conditions corresponding to classification node B, and finally updates the object classification conditions corresponding to classification node C.

[0171] S406. The first device determines the classification features corresponding to each classification node in the classification model.

[0172] The classification criteria for an object corresponding to a classification node are the criteria for classification based on classification features. For example, if the classification criterion for an object is whether its age is greater than 20, then the classification feature is age; if the classification criterion for an object is whether its height is greater than 100cm, then the classification feature is height.

[0173] Optionally, when the classification model converges, the first device can obtain the object classification conditions corresponding to each classification node of the classification model, and then determine the classification features corresponding to each classification node based on each object classification condition.

[0174] S407. The first device determines at least one target classification node among multiple classification nodes based on the classification features corresponding to each classification node.

[0175] Optionally, taking any one of at least one first feature and at least one second feature as an example, the classification feature corresponding to the target classification node is the feature to be processed. For example, if the first device determines the classification interval corresponding to the age feature of the object, then the classification feature corresponding to the target classification node is the age feature.

[0176] Optionally, in practical applications, the classification model may use the same classification features or different classification features for each split, and the target classification node is the node that is classified according to the feature to be processed.

[0177] S408. The first device determines at least one classification interval based on the threshold in the object classification conditions corresponding to the target classification node.

[0178] Optionally, the first device determines at least one classification interval based on the threshold in the object classification condition corresponding to the target classification node. For example, if the object classification condition is: whether the age is greater than 20 years old, then the classification interval is: age less than 20 years old, age greater than or equal to 20 years old.

[0179] Below, in conjunction with Figure 6 The process of determining the classification intervals is explained.

[0180] Figure 6 This is a schematic diagram illustrating a process for determining a classification interval, as provided in an embodiment of this application. Please refer to... Figure 6 This includes a convergent classification model. The classification model includes classification nodes A, B, C, and D. Classification node A corresponds to the condition that the object is older than 20 years old; classification node B corresponds to the condition that the object is younger than 30 years old; classification node C corresponds to the condition that the object's weight is less than 30 kg; and classification node D corresponds to the condition that the object's height is less than 180 cm. A1, A2, A3, A4, and A5 are the leaf nodes of the classification model.

[0181] See Figure 6 In the classification model, the classification feature corresponding to classification node A is age, the classification feature corresponding to classification node B is age, the classification feature corresponding to classification node C is weight, and the classification feature corresponding to classification node D is height. Therefore, the target classification nodes for the age feature are classification nodes A and B, the target classification node for the weight feature is classification node C, and the target classification node for the height feature is classification node D.

[0182] See Figure 6 The age classification ranges are: age less than or equal to 20 years old, age greater than 20 years old and less than 30 years old, and age greater than or equal to 30 years old; the weight classification ranges are: weight less than 30 kg and weight greater than or equal to 30 kg; the height classification ranges are: height less than 180 cm and height greater than or equal to 180 cm.

[0183] S409. Obtain the data to be classified, which includes multiple features, including at least one first feature and at least one or all of the second features.

[0184] Optionally, the data to be classified can be labeled objects to be classified. For example, if the first and second features corresponding to multiple objects are: age, height, weight, occupation, and income, then the features included in the data to be classified can be: age and height, or the features included in the data to be classified can be: age, height, weight, occupation, and income.

[0185] S410. Classify the data to be classified based on at least one classification interval corresponding to each first feature and each second feature.

[0186] Optionally, the data to be classified can be classified based on at least one classification interval. For example, if the data to be classified is age 23, height 175cm, and weight 70kg, the first device can classify the data based on the classification intervals of age, height, and weight.

[0187] Optionally, after the first device obtains a converged classification model, the combined features of the users in the leaf nodes can be obtained based on the classification model. For example, see [link to relevant documentation]. Figure 6 If, after classifying multiple users, user A is located in leaf node A2, then the combined features corresponding to user A are: age greater than or equal to 30 years old and height greater than or equal to 180cm. If user A is located in leaf node A5, then the combined features corresponding to user A are: age less than or equal to 20 years old and weight greater than or equal to 30kg.

[0188] This application provides a federated learning data processing method. A first device acquires the model parameters of the classification model corresponding to the i-th iteration. Based on the model parameters, the first device acquires gradient information for multiple first intervals corresponding to each first feature and gradient information for multiple second intervals corresponding to each second feature. Based on the multiple first intervals and multiple second intervals corresponding to each first feature, the first device determines multiple candidate classification conditions and determines the classification loss value corresponding to each candidate classification condition. The first device updates the object classification conditions corresponding to the classification nodes to the candidate classification condition with the minimum classification loss value. It also determines the classification features corresponding to each classification node in the classification model and, based on the classification features, determines at least one target classification node among the multiple classification nodes. Based on the threshold in the object classification conditions corresponding to the target classification node, the first device determines at least one classification interval and acquires the data to be classified. Based on the at least one classification interval corresponding to each first feature and each second feature, the data to be classified is classified. In the above method, when the classification model converges, the first device determines at least one classification interval corresponding to each first feature and each second feature based on the converged classification model. Since the object classification condition is determined by the classification model based on the gradient information of the first interval of multiple first features and the second interval of multiple second features, and the classification loss value of the object classification condition is the smallest, by traversing the classification interval corresponding to the target classification node of the classification feature in the classification model, multiple first features and multiple second features can be accurately classified, thereby improving the accuracy of continuous feature classification and improving the training effect of deep neural networks.

[0189] Based on any of the above embodiments, the following, in conjunction with Figure 7 The process of the above-mentioned federated learning data processing method is explained in detail.

[0190] Figure 7 This is a schematic diagram illustrating a federated learning data processing method provided in an embodiment of this application. Please refer to... Figure 7 This includes the classification model with i=1. Since i=1, the classification model has not yet started iterating, so other decision trees cannot be obtained; the classification model is an initial node. The set of feature intervals is determined. This set includes intervals corresponding to age, height, and weight. The intervals corresponding to age are [1,20], [20,40], and [40,60]; the intervals corresponding to height are [90,120], [120,150], and [150,180]; and the intervals corresponding to weight are [30,50], [50,70], and [70,90].

[0191] See Figure 7 Based on the model parameters i=1, the gradient information for each interval is determined, and the classification model is updated according to the gradient information for each interval. The classification model is iterated N times according to the above steps until it converges, resulting in a converged classification model. The converged classification model includes classification nodes A, B, and C, and also leaf nodes A1, A2, A3, and A4.

[0192] See Figure 7 The classification condition for node A is whether the age is greater than 20 years old, the classification condition for node B is whether the age is less than 40 years old, and the classification condition for node C is whether the weight is less than 30 kg. Determine the classification feature for each node. Specifically, the classification feature for node A is age, the classification feature for node B is age, and the classification feature for node C is weight.

[0193] See Figure 7 The target classification nodes for age features are classification node A and classification node B, and the target classification node for weight features is classification node C. Based on the thresholds of classification nodes A, B, and C, the classification intervals for age features and weight features are obtained. Specifically, the classification intervals for age features are: less than or equal to 20 years old, greater than 20 years old and less than 40 years old, and greater than or equal to 40 years old; the classification intervals for weight features are: less than 30 kg and greater than or equal to 30 kg. In this way, the classification model can be iteratively updated using the gradient information of each interval. Since the classification loss value of the object classification condition determined by the gradient information is the smallest, the classification model can accurately classify multiple objects based on features, thereby improving the accuracy of continuous feature classification.

[0194] Figure 8This is a schematic diagram of a federated learning data processing apparatus provided in an embodiment of this application. Please refer to... Figure 8 The federated learning data processing device 10 includes a first acquisition module 11, a second acquisition module 12, an update module 13, and a determination module 14, wherein:

[0195] The first acquisition module 11 is used to acquire the model parameters of the classification model corresponding to the i-th iteration processing. The classification model includes multiple classification nodes, and each classification node corresponds to an object classification condition.

[0196] The second acquisition module 12 is used for the first device to acquire gradient information of multiple first intervals corresponding to each first feature and gradient information of multiple second intervals corresponding to each second feature according to the model parameters.

[0197] The update module 13 is used to update the object classification conditions corresponding to each classification node in the classification model based on the gradient information of multiple first intervals corresponding to each first feature and the gradient information of multiple second intervals corresponding to each second feature.

[0198] The determining module 14 is used to sequentially increase the number of iterations until the classification model converges, and then the first device determines at least one classification interval corresponding to each first feature and each second feature based on the converged classification model.

[0199] In one possible implementation, the update module 13 is specifically used for:

[0200] The first device determines multiple candidate classification conditions based on multiple first intervals corresponding to each first feature and multiple second intervals corresponding to each second feature;

[0201] The first device determines the classification loss value corresponding to each candidate classification condition;

[0202] The first device updates the object classification condition corresponding to the classification node to the candidate classification condition with the minimum classification loss value.

[0203] In one possible implementation, the update module 13 is specifically used for:

[0204] Determine a first set of objects corresponding to the classification node, wherein the first set of objects includes at least two objects, and the plurality of objects include the first set of objects;

[0205] The first object set is classified according to the candidate classification conditions to obtain a first sub-object set and a second sub-object set;

[0206] Based on the gradient information of each object in the first sub-object set, the gradient information of each object in the second sub-object set, and the gradient information of each object in the first object set, the classification loss value corresponding to the candidate classification condition is determined.

[0207] In one possible implementation, the update module 13 is specifically used for:

[0208] The classification loss value corresponding to the candidate classification condition is determined according to the following formula:

[0209]

[0210] Wherein, the L split For the classification loss value, the I L For the first sub-object set, the I R The second sub-object set, I is the first object set, and g i h is the first gradient of the i-th object. i γ is the second gradient of the i-th object, λ is the first preset parameter, and γ is the second preset parameter.

[0211] In one possible implementation, the update module 13 is specifically used for:

[0212] The first device determines the update order of the plurality of classification nodes based on the position of the classification node in the classification model;

[0213] The first device updates the object classification conditions corresponding to each classification node in the classification model according to the update order, based on the gradient information of multiple first intervals corresponding to each first feature and the gradient information of multiple second intervals corresponding to each second feature.

[0214] In one possible implementation, the update module 13 is specifically used for:

[0215] The first device determines the endpoint value and the feature corresponding to each interval;

[0216] The first device determines the multiple candidate classification conditions based on the endpoint values ​​and features corresponding to each interval.

[0217] In one possible implementation, the second acquisition module 12 is specifically used for:

[0218] The first device determines the gradient information of each object based on the model parameters and at least one first feature of the plurality of objects;

[0219] The first device determines multiple first intervals corresponding to each first feature;

[0220] The first device determines the gradient information of multiple first intervals corresponding to each first feature based on the gradient information of each object.

[0221] In one possible implementation, the second acquisition module 12 is specifically used for:

[0222] For any one of the plurality of first intervals, the first device determines the target object corresponding to the first interval among the at least one object based on the first feature of the plurality of objects, wherein the first feature of the target object is located within the first interval;

[0223] The sum of the gradient information of the target object is determined as the gradient information of the first interval.

[0224] In one possible implementation, the second acquisition module 12 is specifically used for:

[0225] The first device sends gradient information for each object to the second device;

[0226] The first device receives gradient information of multiple second intervals corresponding to each second feature from the second device. The gradient information of multiple second intervals corresponding to each second feature is determined by the second device based on the gradient information of each object.

[0227] In one possible implementation, the determining module 14 is specifically used for:

[0228] The first device determines the classification features corresponding to each classification node in the classification model, and the object classification conditions corresponding to the classification node are the conditions for classification according to the classification features;

[0229] The first device determines at least one target classification node among the plurality of classification nodes based on the classification features corresponding to each classification node, and the classification feature corresponding to the target classification node is the feature to be processed.

[0230] The first device determines the at least one classification interval based on the threshold in the object classification conditions corresponding to the target classification node.

[0231] The federated learning data processing apparatus provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be repeated here.

[0232] The federated learning data processing device shown in this application embodiment can be a chip, hardware module, processor, etc. Of course, the federated learning data processing device can be in other forms, and this application embodiment does not specifically limit it.

[0233] Figure 9 This is a schematic diagram of another federated learning data processing apparatus provided in an embodiment of this application. Figure 8 Based on the illustrated embodiments, please refer to Figure 9 The federated learning data processing device 10 further includes a third acquisition module 15, which is used for:

[0234] Obtain data to be classified, wherein the data to be classified includes multiple features, and the multiple features include some or all of the at least one first feature and the at least one second feature;

[0235] The data to be classified is classified based on at least one classification interval corresponding to each first feature and each second feature.

[0236] The federated learning data processing apparatus provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be repeated here.

[0237] The federated learning data processing device shown in this application embodiment can be a chip, hardware module, processor, etc. Of course, the federated data processing device can be in other forms, and this application embodiment does not specifically limit it.

[0238] Figure 10 A schematic diagram of the hardware structure of the federated learning data processing device provided for this application. Please refer to [link / reference]. Figure 10 The federated learning data processing device 20 may include a processor 21 and a memory 22, wherein the processor 21 and the memory 22 can communicate; for example, the processor 21 and the memory 22 communicate via a communication bus 23, the memory 22 is used to store program instructions, and the processor 21 is used to call the program instructions in the memory to execute the federated learning data processing method shown in any of the above method embodiments.

[0239] Optionally, the federated learning data processing device 20 may also include a communication interface, which may include a transmitter and / or a receiver.

[0240] Optionally, the aforementioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this application can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0241] This application provides a readable storage medium storing a computer program; the computer program is used to implement the federated learning data processing method as described in any of the above embodiments.

[0242] This application provides a computer program product, which includes instructions that, when executed, cause a computer to perform the above-described federated learning data processing method.

[0243] All or part of the steps in the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a readable memory. When the program is executed, it performs the steps of the above method embodiments; and the aforementioned memory (storage medium) includes: read-only memory (ROM), RAM, flash memory, hard disk, solid-state drive, magnetic tape, floppy disk, optical disk, and any combination thereof.

[0244] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, special-purpose computer, embedded processor, or other programmable terminal device to produce a machine, such that the instructions, which execute via the processing unit of the computer or other programmable terminal device, generate instructions for implementing the flowchart. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0245] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable terminal device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0246] These computer program instructions can also be loaded onto a computer or other programmable terminal device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable device for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0247] Obviously, those skilled in the art can make various modifications and variations to the embodiments of this application without departing from the spirit and scope of this application. Therefore, if these modifications and variations to the embodiments of this application fall within the scope of the claims of this application and their equivalents, this application also intends to include these modifications and variations.

[0248] In this application, the term "comprising" and its variations can refer to non-limiting inclusion; the term "or" and its variations can refer to "and / or". The terms "first", "second", etc., in this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. In this application, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.

Claims

1. A federated learning data processing method, characterized in that, Applied to a federated learning system, the federated learning system including a first device and a second device, the first device including at least one first feature of a plurality of objects, and the second device including at least one second feature of the plurality of objects, the method includes: The first device obtains the model parameters of the classification model corresponding to the i-th iteration processing. The classification model includes multiple classification nodes, and each classification node corresponds to an object classification condition. The first device obtains gradient information of multiple first intervals corresponding to each first feature and gradient information of multiple second intervals corresponding to each second feature based on the model parameters; wherein, the multiple first intervals and the gradient information of the multiple first intervals are obtained by the first device performing continuous feature bucketing processing on each first feature based on the gradient information of each first feature; the multiple second intervals and the gradient information of the multiple second intervals are obtained by the second device performing continuous feature bucketing processing on each second feature based on the gradient information of each second feature; The first device updates the object classification conditions corresponding to each classification node in the classification model based on the gradient information of multiple first intervals corresponding to each first feature and the gradient information of multiple second intervals corresponding to each second feature. The number of iterations is increased sequentially until the classification model converges. Then, the first device determines at least one classification interval corresponding to each first feature and each second feature based on the converged classification model. For any one of the plurality of classification nodes, based on the gradient information of the multiple intervals corresponding to each first feature and the gradient information of the multiple intervals corresponding to each second feature, the object classification condition corresponding to the classification node in the classification model is updated, including: The first device determines multiple candidate classification conditions based on multiple first intervals corresponding to each first feature and multiple second intervals corresponding to each second feature; The first device determines the classification loss value corresponding to each candidate classification condition; The first device updates the object classification condition corresponding to the classification node to the candidate classification condition with the minimum classification loss value.

2. The method according to claim 1, characterized in that, For any one of the plurality of candidate classification conditions; the first device determines the classification loss value corresponding to the candidate classification condition, including: Determine a first set of objects corresponding to the classification node, wherein the first set of objects includes at least two objects, and the plurality of objects include the first set of objects; The first object set is classified according to the candidate classification conditions to obtain a first sub-object set and a second sub-object set; Based on the gradient information of each object in the first sub-object set, the gradient information of each object in the second sub-object set, and the gradient information of each object in the first object set, the classification loss value corresponding to the candidate classification condition is determined.

3. The method according to claim 2, characterized in that, The gradient information includes a first gradient and a second gradient; based on the gradient information of each object in the first sub-object set, the gradient information of each object in the second sub-object set, and the gradient information of each object in the first object set, the classification loss value corresponding to the candidate classification condition is determined, including: The classification loss value corresponding to the candidate classification condition is determined according to the following formula: Wherein, the L split For the classification loss value, the I L For the first sub-object set, the I R The second sub-object set, I is the first object set, and g i h is the first gradient of the i-th object. i γ is the second gradient of the i-th object, λ is the first preset parameter, and γ is the second preset parameter.

4. The method according to any one of claims 1-3, characterized in that, The first device updates the object classification conditions corresponding to each classification node in the classification model based on the gradient information of multiple first intervals corresponding to each first feature and the gradient information of multiple second intervals corresponding to each second feature, including: The first device determines the update order of the plurality of classification nodes based on the position of the classification node in the classification model; The first device updates the object classification conditions corresponding to each classification node in the classification model according to the update order, based on the gradient information of multiple first intervals corresponding to each first feature and the gradient information of multiple second intervals corresponding to each second feature.

5. The method according to any one of claims 2-3, characterized in that, The first device determines multiple candidate classification conditions based on multiple intervals corresponding to each first feature and multiple intervals corresponding to each second feature, including: The first device determines the endpoint value and the feature corresponding to each interval; The first device determines the multiple candidate classification conditions based on the endpoint values ​​and features corresponding to each interval.

6. The method according to any one of claims 1-3, characterized in that, The first device obtains gradient information for multiple first intervals corresponding to each first feature based on the model parameters, including: The first device determines the gradient information of each object based on the model parameters and at least one first feature of the plurality of objects; The first device determines multiple first intervals corresponding to each first feature; The first device determines the gradient information of multiple first intervals corresponding to each first feature based on the gradient information of each object.

7. The method according to claim 6, characterized in that, For any one of the at least one first feature; The first device determines gradient information for multiple first intervals corresponding to the first feature based on the gradient information of each object, including: For any one of the plurality of first intervals, the first device determines the target object corresponding to the first interval among the at least one object based on the first feature of the plurality of objects, wherein the first feature of the target object is located within the first interval; The sum of the gradient information of the target object is determined as the gradient information of the first interval.

8. The method according to any one of claims 1-3, characterized in that, The first device acquires gradient information of multiple second intervals corresponding to each second feature, including: The first device sends gradient information for each object to the second device; The first device receives gradient information of multiple second intervals corresponding to each second feature from the second device. The gradient information of multiple second intervals corresponding to each second feature is determined by the second device based on the gradient information of each object.

9. The method according to any one of claims 1-3, characterized in that, For any one of at least one first feature and at least one second feature, the feature to be processed; The first device determines the classification interval corresponding to the feature to be processed based on a converged classification model, including: The first device determines the classification features corresponding to each classification node in the classification model, and the object classification conditions corresponding to the classification node are the conditions for classification according to the classification features; The first device determines at least one target classification node among the plurality of classification nodes based on the classification features corresponding to each classification node, and the classification feature corresponding to the target classification node is the feature to be processed. The first device determines the at least one classification interval based on the threshold in the object classification conditions corresponding to the target classification node.

10. The method according to any one of claims 1-3, characterized in that, After the first device determines at least one classification interval corresponding to each first feature and each second feature based on a converged classification model, it further includes: Obtain data to be classified, wherein the data to be classified includes multiple features, and the multiple features include some or all of the at least one first feature and the at least one second feature; The data to be classified is classified based on at least one classification interval corresponding to each first feature and each second feature.

11. A federated learning data processing device, characterized in that, The method is applied to a federated learning system, which includes a first device and a second device. The first device includes at least one first feature of a plurality of objects, and the second device includes at least one second feature of the plurality of objects. The federated learning data processing device includes a first acquisition module, a second acquisition module, an update module, and a determination module, wherein: The first acquisition module is used to acquire the model parameters of the classification model corresponding to the i-th iteration processing. The classification model includes multiple classification nodes, and each classification node corresponds to an object classification condition. The second acquisition module is used for the first device to acquire gradient information of multiple first intervals corresponding to each first feature and gradient information of multiple second intervals corresponding to each second feature according to the model parameters; wherein, the multiple first intervals and the gradient information of the multiple first intervals are obtained by the first device performing continuous feature bucketing processing on each first feature based on the gradient information of each first feature; the multiple second intervals and the gradient information of the multiple second intervals are obtained by the second device performing continuous feature bucketing processing on each second feature based on the gradient information of each second feature; The update module is used to update the object classification conditions corresponding to each classification node in the classification model based on the gradient information of multiple first intervals corresponding to each first feature and the gradient information of multiple second intervals corresponding to each second feature. The determining module is used to sequentially increase the number of iterations until the classification model converges, and the first device determines at least one classification interval corresponding to each first feature and each second feature based on the converged classification model. For any one of the plurality of classification nodes, the update module is specifically used by the first device to determine a plurality of candidate classification conditions based on a plurality of first intervals corresponding to each first feature and a plurality of second intervals corresponding to each second feature; The first device determines the classification loss value corresponding to each candidate classification condition; The first device updates the object classification condition corresponding to the classification node to the candidate classification condition with the minimum classification loss value.

12. A federated learning data processing device, characterized in that, The federated learning data processing device includes: a memory, a processor, and a federated learning data processing program stored in the memory and executable on the processor, wherein when the federated learning data processing program is executed by the processor, it implements the steps of the federated learning data processing method as described in any one of claims 1 to 10.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a federated learning data processing program, which, when executed by a processor, implements the steps of the federated learning data processing method as described in any one of claims 1 to 10.

14. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the federated learning data processing method as described in any one of claims 1 to 10.

Citation Information

Patent Citations

  • Federated learning classification tree construction method, model construction method and terminal equipment

    CN111783139A