A federated learning method, apparatus, device, storage medium, and computer program

By constructing and selecting high-quality decision tree models for fusion in federated learning, the problem of high communication overhead in existing technologies is solved, achieving the effect of reducing communication consumption while protecting data privacy.

CN114282691BActive Publication Date: 2026-05-26TENCENT TECHNOLOGY (SHENZHEN) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2021-10-27
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing federated learning methods fail to effectively reduce communication costs while protecting data privacy, resulting in excessive communication overhead.

Method used

By identifying target features from the data features of the training dataset, constructing candidate decision tree models, and selecting high-quality decision tree models for fusion, the number of model transfers between computing devices is reduced, and model fusion is performed directly on the local machine.

Benefits of technology

While protecting data privacy, it reduces communication overhead, improves the convenience and efficiency of model building, and avoids the communication burden caused by multiple transmissions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114282691B_ABST
    Figure CN114282691B_ABST
Patent Text Reader

Abstract

This application discloses a federated learning method, apparatus, device, storage medium, and computer program, relating to the field of computer technology. The method includes: determining at least one target feature from data features corresponding to a training dataset; using the at least one target feature as the basis for model construction to obtain n candidate decision tree models; determining a target decision tree model from the n candidate decision tree models based on the prediction results of the n candidate decision tree models on training data in the training dataset; sending the target decision tree model to a second computing device, whereby the second computing device fuses at least two decision tree models including the target decision tree model to obtain a federated learning model. Through this method, the first computing device sends a decision tree model to the second computing device in a single transaction while protecting data privacy, making the process of constructing a federated learning model more convenient. This application can be applied to various scenarios such as cloud technology, artificial intelligence, and intelligent transportation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a federated learning method, apparatus, device, storage medium, and computer program. Background Technology

[0002] With the development of computer technology, federated learning has gradually become a popular topic. Federated learning completes the training of machine learning and deep learning models through multi-party collaboration. While protecting user privacy and data security, it solves the problem of data silos. Federated learning includes horizontal federated learning, vertical federated learning, and federated transfer learning.

[0003] In related technologies, for horizontal federated learning, participants typically send encrypted model parameters to a federated server. The federated server adjusts the model parameters and sends them back to the participants. The participants then adjust the model parameters based on their local data and send them back to the federated server. The federated server and participants iterate through the above adjustment process until the model parameters reach the standard, at which point the adjustment process stops, resulting in a federated training model. The federated training model fulfills the requirements for protecting data security and privacy.

[0004] However, in the above process, the process of iteratively adjusting the model parameters between the federated server and the participants requires a lot of communication overhead, making it impossible to efficiently build a federated learning model with the participants while ensuring security, and failing to reduce communication overhead while protecting data privacy. Summary of the Invention

[0005] This application provides a federated learning method, apparatus, device, storage medium, and computer program that can reduce communication consumption while protecting data privacy. The technical solution is as follows.

[0006] On the one hand, a federated learning method is provided, the method comprising:

[0007] Determine at least one target feature from the data features corresponding to the training dataset, wherein the target feature corresponds to at least two decision paths in the decision tree model;

[0008] Based on the at least one target feature, n candidate decision tree models are obtained, where the value of n corresponds to the number of target features.

[0009] Based on the prediction results of the n candidate decision tree models on the training data in the training dataset, at least one candidate decision tree model is determined from the n candidate decision tree models as the target decision tree model;

[0010] The target decision tree model is sent to a second computing device, which receives the target decision tree model sent by the first computing device and fuses at least two decision tree models including the target decision tree model to obtain a federated learning model.

[0011] On the other hand, another federated learning approach is provided, which includes:

[0012] The system receives a target decision tree model sent by a first computing device, wherein the first computing device is used to determine at least one target feature from the data features corresponding to the training dataset, and the target feature corresponds to at least two decision paths in the decision tree model; based on the at least one target feature as the basis for model construction, n candidate decision tree models are obtained, where the value of n corresponds to the number of target features; based on the prediction results of the n candidate decision tree models on the training data in the training dataset, at least one candidate decision tree model is determined from the n candidate decision tree models as the target decision tree model;

[0013] At least two decision tree models, including the target decision tree model, are fused to obtain a federated learning model;

[0014] Based on the federated learning model, at least one set of analytical data from the local end is analyzed to obtain data analysis results; or, the federated learning model is sent to the first computing device, and the first computing device is used to analyze at least one set of analytical data from the local end based on the federated learning model to obtain data analysis results.

[0015] On the other hand, a federated learning system is provided, the system comprising a first computing device and a second computing device;

[0016] The first computing device is configured to: determine at least one target feature from the data features corresponding to the training dataset, wherein the target feature corresponds to at least two decision paths in a decision tree model; use the at least one target feature as the basis for model construction to obtain n candidate decision tree models, wherein the value of n corresponds to the number of target features; based on the prediction results of the n candidate decision tree models corresponding to the training dataset, determine at least one candidate decision tree model from the n candidate decision tree models as the target decision tree model; and send the target decision tree model to the second computing device.

[0017] The second computing device is configured to receive the target decision tree model sent by the first computing device; and to fuse at least two decision tree models including the target decision tree model to obtain a federated learning model.

[0018] On the other hand, a federated learning apparatus is provided, the apparatus comprising:

[0019] A feature determination module is used to determine at least one target feature from the data features corresponding to the training dataset, wherein the target feature corresponds to at least two decision paths in the decision tree model;

[0020] The model acquisition module is used to obtain n candidate decision tree models based on the at least one target feature, where the value of n corresponds to the number of target features.

[0021] The model determination module is used to determine at least one candidate decision tree model as the target decision tree model from the prediction results of the n candidate decision tree models on the training data in the training dataset.

[0022] The model sending module is used to send the target decision tree model to a second computing device. The second computing device is used to receive the target decision tree model sent by the first computing device and fuse at least two decision tree models including the target decision tree model to obtain a federated learning model.

[0023] On the other hand, a federated learning apparatus is provided, the apparatus comprising:

[0024] A receiving module is configured to receive a target decision tree model sent by a first computing device. The first computing device is configured to determine at least one target feature from the data features corresponding to the training dataset, wherein the target feature corresponds to at least two decision paths in the decision tree model; based on the at least one target feature as the basis for model construction, n candidate decision tree models are obtained, wherein the value of n corresponds to the number of target features; based on the prediction results of the n candidate decision tree models on the training data in the training dataset, at least one candidate decision tree model is determined from the n candidate decision tree models as the target decision tree model.

[0025] The fusion module is used to fuse at least two decision tree models, including the target decision tree model, to obtain a federated learning model;

[0026] The sending module is used to perform data analysis on at least one set of analysis data on the local end based on the federated learning model to obtain data analysis results; or, to send the federated learning model to the first computing device, wherein the first computing device is used to perform data analysis on at least one set of analysis data on the local end based on the federated learning model to obtain data analysis results.

[0027] On the other hand, a computer device is provided, the computer device including a processor and a memory, the memory storing at least one instruction, at least one program, code set or instruction set, the at least one instruction, the at least one program, the code set or instruction set being loaded and executed by the processor to implement any of the federated learning methods described in the embodiments of this application above.

[0028] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction, at least one program, code set, or instruction set is stored therein, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the federated learning method as described in any of the embodiments of this application above.

[0029] On the other hand, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform any of the federated learning methods described in the above embodiments.

[0030] The beneficial effects of the technical solutions provided in this application include at least the following:

[0031] At least one target feature is determined from the data features corresponding to the training dataset on the local end. Based on the target feature and the decision path corresponding to the target feature, n candidate decision tree models are constructed. In order to improve the efficiency of the candidate decision tree models in model prediction, based on the prediction results of the n candidate decision tree models on the training data in the training dataset, at least one target decision tree model is selected from the n candidate decision tree models and sent to the second computing device. The second computing device fuses at least two decision tree models to obtain a federated learning model. The first computing device obtains the target decision tree model based on its own training data, so there is no risk of privacy leakage. At the same time, the process of sending the target decision tree model from the first computing device to the second computing device is done once, without having to transmit the target decision tree model between the first computing device and the second computing device multiple times, avoiding excessive communication overhead, and making the process of building the federated learning model more convenient. Attached Figure Description

[0032] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0033] Figure 1 This is a schematic diagram of a decision tree model provided in an exemplary embodiment of this application;

[0034] Figure 2 This is a schematic diagram of a decision tree model provided in another exemplary embodiment of this application;

[0035] Figure 3 This is a flowchart of a federated learning method provided in an exemplary embodiment of this application;

[0036] Figure 4 This is a flowchart of a federated learning method provided in another exemplary embodiment of this application;

[0037] Figure 5 This is a schematic diagram of a decision tree model provided in another exemplary embodiment of this application;

[0038] Figure 6 This is a flowchart of a federated learning method provided in another exemplary embodiment of this application;

[0039] Figure 7 This is a flowchart of a federated learning method provided in another exemplary embodiment of this application;

[0040] Figure 8 This is a flowchart of a federated learning system provided in an exemplary embodiment of this application;

[0041] Figure 9 This is a flowchart of a federated learning method provided in another exemplary embodiment of this application;

[0042] Figure 10 This is a schematic diagram of the federated learning method provided in an exemplary embodiment of this application;

[0043] Figure 11 This is a schematic diagram of the federated learning method provided in another exemplary embodiment of this application;

[0044] Figure 12 This is a schematic diagram of the federated learning method provided in another exemplary embodiment of this application;

[0045] Figure 13 This is a structural block diagram of a federated learning device provided in an exemplary embodiment of this application;

[0046] Figure 14 This is a structural block diagram of a federated learning device provided in another exemplary embodiment of this application;

[0047] Figure 15 This is a structural block diagram of a federated learning device provided in another exemplary embodiment of this application;

[0048] Figure 16 This is a structural block diagram of a server provided in an exemplary embodiment of this application. Detailed Implementation

[0049] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0050] First, a brief introduction to the terms used in the embodiments of this application will be given.

[0051] Artificial Intelligence (AI) is the theory, methods, technology, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce a new kind of intelligent machine that can react in a way similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to possess the functions of perception, reasoning, and decision-making.

[0052] Differential Privacy: A key concept related to differential privacy is adjacent datasets. Suppose we are given two datasets x and x''. ′ If two datasets differ by exactly one data point, then they can be called adjacent datasets. If for a random algorithm... If the algorithm is applied to two adjacent datasets to obtain two outputs, for example, training two machine learning models separately, and it is difficult to distinguish which dataset the outputs came from, then this random algorithm... This is considered to satisfy the differential privacy requirement. The differential privacy ε is defined as follows:

[0053]

[0054] Here, 'o' represents the output, and 'ε' represents the privacy loss metric. The formula means that for any adjacent datasets, the probability of obtaining a specific output parameter during training is roughly the same. Therefore, observers can hardly detect subtle changes in the dataset by observing the output parameters, and thus cannot deduce specific training data from the output parameters. This is how data privacy is protected.

[0055] Federated Learning: Also known as joint learning, federated learning enables data to be "usable but not visible" while protecting user privacy and data security. In other words, it completes the training task of machine learning models through multi-party collaboration. In addition, it can also provide inference services for machine learning models.

[0056] Unlike traditional centralized machine learning, federated learning involves two or more participants collaborating to train one or more machine learning models. Classified based on data distribution characteristics, federated learning can be divided into horizontal federated learning, vertical federated learning, and federated transfer learning. Horizontal federated learning, also known as sample-based federated learning, is suitable for situations where sample sets share the same feature space but differ in their individual sample spaces. Vertical federated learning, also known as feature-based federated learning, is suitable for situations where sample sets share the same sample space but differ in their individual feature spaces. Federated transfer learning is suitable for situations where sample sets differ not only in their sample spaces but also in their feature spaces.

[0057] With the research and advancement of artificial intelligence (AI) technology, AI is being studied and applied in various fields, such as smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, autonomous driving, drones, robots, smart healthcare, smart customer service, vehicle networking, and intelligent mobility. It is believed that with the development of technology, AI will be applied in more fields and will play an increasingly important role.

[0058] In related technologies, for horizontal federated learning, participants typically send encrypted model parameters to a federated server. The federated server adjusts the model parameters and sends them back to the participants. The participants then further adjust the model parameters based on their local data and send them back to the federated server. This adjustment process is iterated between the federated server and the participants until the model parameters reach a standard, at which point the adjustment process stops, resulting in a federated training model. This federated training model aims to protect data security and privacy. However, this process consumes significant communication overhead due to the iterative adjustment of model parameters between the federated server and participants. It fails to efficiently build a federated learning model with participants while ensuring security, and it cannot simultaneously protect data privacy and reduce communication overhead.

[0059] The decision tree model constructed in the embodiments of this application is described below. The federated learning method provided in the embodiments of this application belongs to the horizontal federated learning method. The application scenario of horizontal federated learning is that the sample data of each computing device in the federated learning have the same feature space and different sample spaces. The core idea of ​​horizontal federated learning is to have each first computing device train a model on its own using its own training data, and then the second computing device fuses the models trained by multiple first computing devices. For illustration, please refer to [reference needed]. Figure 1 and Figure 2 The decision tree model includes target features (target feature 111, target feature 211 and target feature 212), decision directions corresponding to target features (0 and 1 between target features and between target features and leaf nodes in the figure), and leaf nodes (nodes that cannot be further divided).

[0060] Indicatively, with D as the number of selected target features, after determining the target features and the corresponding decision paths, n decision tree models can be constructed by assigning values ​​to the leaf nodes. The relationship between n and D is shown below.

[0061]

[0062] Indicative, such as Figure 1 As shown, when D=1, it represents the selection of a target feature 111. Target feature 111 has two corresponding leaf nodes (leaf node 112 and leaf node 113). The leaf nodes are assigned values ​​using a binary classification standard. For example, assigning values ​​"0" and "1" to the leaf nodes means that both leaf nodes 112 and 113 are provided with two possible values—0 or 1, resulting in... Figure 1 The four corresponding decision tree models are shown in the figure.

[0063] Similarly, such as Figure 2 As shown, when D=2, it means two target features are selected. The associated node with the relationship to target feature 211 is target feature 212. Target feature 212 generates four leaf nodes corresponding to different decision directions, namely leaf node 213, leaf node 214, leaf node 215, and leaf node 216. The leaf nodes are assigned values ​​according to a binary classification standard. For example, the leaf nodes are assigned values ​​of "0" and "1", that is, leaf nodes 213, 214, 215, and 216 are each provided with two assignment cases—0 or 1, resulting in... Figure 2 The sixteen corresponding decision tree models are shown in the figure.

[0064] Based on the above introduction of terms and application scenarios, the federated learning method provided in this application is described. This method can be applied to terminals or servers, or it can be implemented by both terminals and servers. The terminals can be mobile terminals such as mobile phones, tablets, and portable laptops, or desktop computers. The servers can be independent physical servers, server clusters or distributed systems composed of multiple physical servers, or cloud servers that provide basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0065] Taking the application of this method to the first computing device as an example, such as Figure 3 As shown, the method includes the following steps.

[0066] Step 310: Determine at least one target feature from the data features corresponding to the training dataset.

[0067] The first computing device stores a training dataset, including at least one training data. Schematic, when the first computing device is a terminal, the training data includes at least one training data stored in the terminal. For example, the terminal has a financial management application installed, which stores age training data, gender training data, etc., wherein the gender training data is used to instruct the user to fill in age-related data; the gender training data is used to instruct the user to fill in gender-related data.

[0068] For any given training data, there exist corresponding data features. For example, the training data might be a text segment containing the phrase "A is a watermelon with a clear texture and a curled stem." The first step is to determine the corresponding data features, such as texture and stem.

[0069] In an optional embodiment, obtaining the target features from the data features corresponding to the training dataset includes at least the following methods.

[0070] 1. Randomly select at least one data feature from the data features corresponding to the training dataset as the target feature.

[0071] This illustrates how target features are obtained from data features through random selection, meaning that target features are determined from data features with equal probability. For example, given text content A above, after obtaining data features including "texture" and "root," one data feature can be randomly selected as the target feature, such as selecting the data feature "texture" as the target feature; or, two data features can be randomly selected as target features, such as using the data features "texture" and "root" as target features.

[0072] 2. Based on the exponential mechanism, select at least one data feature from the data features corresponding to the training dataset as the target feature.

[0073] In an optional embodiment, after selecting a target feature from the data features, the target feature can either be put back into the data features, allowing the selected target feature to continue participating in matching; or the target feature can be left unselected, allowing the selection of target features to continue from the unselected data features. The above are merely illustrative examples, and the embodiments of this application do not limit the scope of the application.

[0074] In this model, the target feature corresponds to at least two decision paths. The decision path is used to indicate the feature situation corresponding to the target feature, that is, the target feature has at least two classification situations, such as "positive situation" and "negative situation".

[0075] Optionally, different target features may correspond to the same decision-making direction, such as using "yes" and "no" to represent the two decision-making directions of different target features; or they may correspond to different decision-making directions. For example, for the above text content A, the data feature "texture" and the data feature "root" correspond to different decision-making directions. The decision-making directions corresponding to the data feature "texture" include "clear" and "fuzzy", representing that the data feature "texture" corresponds to two feature cases, namely "clear texture" and "fuzzy texture"; the decision-making directions corresponding to the data feature "root" include "curled", "slightly curled", and "stiff", representing that the data feature "root" corresponds to three feature cases, namely "curled root", "slightly curled root", and "stiff root".

[0076] Step 320: Using at least one target feature as the basis for model construction, n candidate decision tree models are obtained.

[0077] The value of n corresponds to the number of target features.

[0078] Decision tree model is a type of prediction model used to indicate the mapping relationship between different target features. In decision tree model, target features exist in the form of nodes.

[0079] In an optional embodiment, a one-dimensional decision tree model can be constructed using a target feature. The target feature is used as the root node, and all nodes related to the target feature are leaf nodes. In this case, a one-dimensional decision tree model is constructed using the target feature. For example, if the target feature is "whether the texture is clear," corresponding leaf nodes "yes" and "no" are generated based on this target feature, thus a one-dimensional decision tree model is constructed independently from this target feature.

[0080] The foundation of model building is the root node, internal nodes, and decision paths corresponding to the target features mentioned above. By using the target features and the decision paths corresponding to the target features, we can start from the root node, gradually determine the internal nodes in the decision tree model, and finally generate the corresponding leaf nodes, thus realizing the process of building a decision tree model.

[0081] Step 330: Based on the prediction results of the n candidate decision tree models on the training data, determine at least one candidate decision tree model from the n candidate decision tree models as the target decision tree model.

[0082] Candidate decision trees can be used to predict the training data in the training dataset, thus determining their prediction performance. Illustratively, after obtaining candidate decision trees based on the target features, one or more candidate decision tree models with better prediction performance are selected as the target decision tree model. The prediction performance is reflected by the prediction results of the n candidate decision tree models corresponding to the training dataset.

[0083] Step 340: Send the target decision tree model to the second computing device.

[0084] The second computing device is used to receive the target decision tree model sent by the first computing device and to fuse at least two decision tree models, including the target decision tree model, to obtain a federated learning model.

[0085] In an optional embodiment, the first computing device sends the parameters corresponding to the target decision tree model to the second computing device. Illustratively, considering the characteristic that a decision tree model can be constructed based on its parameters, after obtaining the target decision tree model, the first computing device sends the parameters corresponding to the target decision tree model to the second computing device. The second computing device can then construct the target decision tree model based on these parameters.

[0086] In summary, the first computing device determines at least one target feature from the data features corresponding to its local training dataset. Based on the target feature and the decision path corresponding to the target feature, it constructs n candidate decision tree models. To improve the efficiency of the candidate decision tree models in model prediction, based on the prediction results of the n candidate decision tree models on the training data in the training dataset, it selects at least one target decision tree model and sends it to the second computing device. The second computing device then fuses at least two decision tree models to obtain a federated learning model. The first computing device obtains the target decision tree model based on its local training data, eliminating the risk of privacy leakage. Furthermore, the transmission of the target decision tree model from the first computing device to the second computing device is done only once, avoiding multiple transmissions between the first and second computing devices and minimizing communication overhead. This makes the process of constructing the federated learning model more convenient.

[0087] In an optional embodiment, leaf nodes are generated based on the target features and the corresponding decision paths, thus obtaining a candidate decision tree model. When the candidate decision tree model is binary, the assignment of values ​​to the leaf nodes corresponding to each target feature has two possibilities. (Illustrative example follows.) Figure 4 As shown above, Figure 3 Step 320 in the illustrated embodiment can also be implemented as steps 410 to 430.

[0088] Step 410: Based on the target features and decision direction, generate at least two leaf nodes.

[0089] Optionally, the first target feature in the target features can be used as the root node of the decision tree model.

[0090] The first target feature is any one of the target features.

[0091] The root node is the starting point of the decision tree model. For a given decision tree model, there exists a unique root node corresponding to that model. Illustratively, the root node is located at the very top of the decision tree model, and the model is constructed based on the root node.

[0092] Optionally, after obtaining at least two target features, arbitrarily select one target feature from the at least two target features as the first target feature, and use the first target feature as the root node of the decision tree model, that is, construct the decision tree model with the first target feature as the starting point.

[0093] In an optional embodiment, after determining the root node of the decision tree model, obtaining the leaf nodes includes at least one of the following cases.

[0094] 1. Based on the decision-making process, corresponding leaf nodes that are related to the root node are generated.

[0095] Each target feature has its corresponding decision path. Illustratively, we select a target feature as the root node. The decision path corresponding to this target feature includes two cases: "yes" and "no". When the decision path corresponding to this target feature is "yes", it corresponds to one leaf node; when the decision path corresponding to this target feature is "no", it corresponds to another leaf node. Thus, a one-dimensional decision tree model can be constructed based on a single target feature.

[0096] 2. Based on the decision path corresponding to the root node, determine the associated nodes that are related to the root node; based on the decision path corresponding to the associated nodes, generate the leaf nodes that are related to the associated nodes.

[0097] The associated node is used to indicate the second target feature, which is any feature other than the first target feature among the target features.

[0098] To illustrate, after randomly selecting a first target feature as the root node from the target features, the associated nodes with a relationship to the root node are determined according to the decision path corresponding to the first target feature. For example, when the relationship between target features is divided into "yes" and "no" (or "1" and "0"), for the root node, if there is a target feature with a relationship to the root node, that target feature is taken as the second target feature, and this target feature is different from the first target feature. That is, when selecting the second target feature, the first target feature is first excluded from the target features.

[0099] Optionally, when constructing a decision tree model, the relationships between target features can be divided using either the "yes" or "no" method described above, or multiple criteria for judging relationships can be used, such as "excellent," "good," "average," and "poor." The above are merely illustrative examples, and the embodiments of this application do not limit this.

[0100] In an optional embodiment, after determining the first target feature and the corresponding decision path, a second target feature related to the first target feature is determined based on the first target feature and the decision path. Optionally, to encompass as many cases as possible, when decision paths differ, the same second target feature is used as an associated node related to the first target feature. Then, based on the second target feature and the corresponding decision path, a third target feature related to the second target feature is determined (or, using the second target feature as the new first target feature, the process of determining the third target feature based on the second target feature is considered as the process of determining the new second target feature based on the new first target feature), and the above process is repeated until no more target features can be determined based on the decision path, generating a leaf node related to the last target feature.

[0101] Indicative, such as Figure 5 As shown, a decision tree model is constructed by selecting two target features. First, the root node is determined to be the watermelon color (510), which is the first target feature. The decision paths corresponding to this first target feature are green (511) and yellow (512). The second target feature associated with this first target feature is the tapping sound (520). That is, when the decision paths of the first target feature are green (511) and yellow (512), the corresponding associated node is the tapping sound (520). For the second target feature, the tapping sound (520), when the watermelon color (510) is green (511) and the decision path corresponding to the tapping sound (520) is loud (521), a leaf node is generated as sweet (531); when the watermelon color (510) is green (511) and the decision path corresponding to the tapping sound (520) is silent (522), a leaf node is generated as not sweet (532). Similarly, when the watermelon color 510 is yellow 512, and the decision path corresponding to the tapping sound 520 is loud 521, a leaf node is generated as not sweet 532; when the watermelon color 510 is yellow 512, and the decision path corresponding to the tapping sound 520 is silent 522, a leaf node is generated as not sweet 532. Optionally, the conclusion obtained from the decision tree includes: when the watermelon color is green and the tapping sound is loud, the watermelon is sweet.

[0102] Step 420: Assign values ​​to at least two leaf nodes based on the number of classifications in the decision tree model, thereby obtaining at least two leaf nodes labeled with leaf node values.

[0103] In an optional embodiment, the decision tree model is a binary classification model. Based on the binary classification criteria of the binary classification model, the leaf nodes are assigned values ​​to obtain at least two leaf nodes labeled with leaf node values.

[0104] The binary classification criterion is used to indicate that there are two possible values ​​for each leaf node.

[0105] Optionally, in order to encompass as many decision tree model scenarios as possible, leaf nodes are assigned values ​​using a binary classification standard. For example, leaf nodes are assigned values ​​of "0" and "1", meaning that each leaf node is provided with two possible values. After the leaf nodes are assigned values, the assigned leaf nodes are obtained. The assigned leaf nodes are the leaf nodes that have corresponding leaf node values, and the resulting decision tree model is related to the assigned leaf nodes.

[0106] Step 430: Based on the target features, decision path, and at least two leaf nodes labeled with leaf node values, construct n candidate decision tree models.

[0107] Indicatively, D represents the number of selected target features (or the depth of the decision tree model), where D is a positive integer. After determining the target features and their corresponding decision paths, based on the assigned leaf nodes (i.e., leaf nodes labeled with leaf node values), the number of decision tree models that can be constructed is n. The relationship between n and D is shown below.

[0108]

[0109] Indicative, such as Figure 1 As shown, when D=1, it represents the selection of a target feature 111. Target feature 111 has two corresponding leaf nodes (leaf node 112 and leaf node 113). The leaf nodes are assigned values ​​using a binary classification standard. For example, assigning values ​​"0" and "1" to the leaf nodes means that both leaf nodes 112 and 113 are provided with two possible values—0 or 1, resulting in... Figure 1 The four corresponding decision tree model scenarios are as follows:

[0110]

[0111] The leaf node values ​​are assigned as follows: leaf node 112 is assigned 0 and leaf node 113 is assigned 0; leaf node 112 is assigned 0 and leaf node 113 is assigned 1; leaf node 112 is assigned 1 and leaf node 113 is assigned 0; leaf node 112 is assigned 1 and leaf node 113 is assigned 1. Thus, four decision tree models are obtained based on the different leaf node values.

[0112] Similarly, such as Figure 2As shown, when D=2, it means two target features are selected. The associated node with the relationship to target feature 211 is target feature 212. Target feature 212 generates four leaf nodes corresponding to different decision directions, namely leaf node 213, leaf node 214, leaf node 215, and leaf node 216. The leaf nodes are assigned values ​​according to a binary classification standard. For example, the leaf nodes are assigned values ​​of "0" and "1", that is, leaf nodes 213, 214, 215, and 216 are each provided with two assignment cases—0 or 1, resulting in... Figure 2 The sixteen corresponding decision tree model scenarios are as follows:

[0113]

[0114] The leaf node values ​​are assigned as follows: leaf node 213 is assigned 0, leaf node 214 is assigned 0, leaf node 215 is assigned 0, leaf node 216 is assigned 0; leaf node 213 is assigned 0, leaf node 214 is assigned 0, leaf node 215 is assigned 0, leaf node 216 is assigned 1, etc. Thus, sixteen decision tree models are obtained based on the different leaf node values.

[0115] This embodiment introduces a method for constructing a decision tree model. By selecting the target features and their corresponding decision paths, leaf nodes are generated, and values ​​are assigned to these leaf nodes. This allows for a more comprehensive consideration of the structure of the resulting decision tree model, yielding a larger number of candidate decision tree models. Through this method, a more comprehensive understanding and more intuitive presentation of the target features and their relationships within the training data of the first computing device can be achieved, facilitating the fusion operation of the decision tree model by the second computing device.

[0116] In an optional embodiment, after obtaining candidate decision tree models, a target decision tree model is determined from the candidate decision tree models based on an exponential mechanism. (Illustrative example, such as...) Figure 6 As shown above, Figure 2 Step 230 in the illustrated embodiment can also be implemented as steps 610 to 630.

[0117] Step 610: Input the training data from the training dataset into the candidate decision tree model to determine the predicted label corresponding to the training data.

[0118] Illustratively, the training dataset is a collection of training data, including multiple training data points. The decision tree model is constructed using selected target features, which are the data features corresponding to the training data in the training dataset. Optionally, the training data input into the candidate decision tree model includes both training data that provides the target features and training data in the training dataset that does not provide the target features.

[0119] It should be noted that the training data may exist in a distributed form in the first computing device. That is, storing the training data in the training dataset is an illustrative example and is not limited in this respect in the embodiments of this application.

[0120] Optionally, after obtaining the candidate decision tree model, arbitrarily select a training data point from the training dataset and input it into the candidate decision tree model. Based on the data features corresponding to the training data, determine the leaf node corresponding to the training data. For example, the training data is a watermelon, which has multiple data features, including its color and the sound when tapped. When the watermelon is yellow and the sound when tapped is loud, the leaf node corresponding to the training data is "not sweet," and "not sweet" is used as the predicted label for the training data "watermelon." The predicted label is the leaf node value corresponding to the leaf node.

[0121] Step 620: Match the predicted label with the reference label of the training data to obtain the prediction result.

[0122] The reference label is used to indicate the reference classification of the training data.

[0123] Optionally, each training data point in the training dataset is labeled with a reference label. For example, if a training data point is a watermelon, the reference label corresponding to the training data point is "sweet watermelon," which indicates that the data features corresponding to the training data point can indicate that the "watermelon" is a "sweet watermelon."

[0124] After inputting training data into multiple candidate decision tree models, multiple predicted labels can be obtained. The predicted label is the prediction result of the input candidate decision tree model for that training data, and the reference label is the true result of the training data known beforehand. Optionally, matching the predicted label with the reference label can yield the prediction result of that training data in the multiple candidate decision tree models.

[0125] Step 630: Based on the prediction results of the n candidate decision tree models for the training data, at least one candidate decision tree model is selected as the target decision tree model from the n candidate decision tree models.

[0126] After inputting training data into n candidate decision tree models, the prediction performance of the n candidate decision tree models can be judged based on the prediction results. Optionally, based on the prediction performance, the best candidate decision tree model can be selected as the target decision tree model from the n candidate decision tree models, or multiple candidate decision tree models with good performance can be selected as the target decision tree model.

[0127] In an optional embodiment, based on the prediction results of the n candidate decision tree models for the training data, the matching scores corresponding to the n candidate decision tree models are determined; based on the matching scores corresponding to the n candidate decision tree models, at least one candidate decision tree model is determined as the target decision tree model.

[0128] To illustrate, an exponential mechanism is used to match predicted labels with true labels to construct the score function corresponding to the candidate decision tree model. The formula for the model score function is shown below.

[0129]

[0130] Among them, H i is the functional representation of the score function corresponding to the i-th decision tree model; m indicates the m-th training data, where m is a positive integer; n indicates the number of training data in the training dataset that participate in the prediction, where n is a positive integer; Used to indicate the prediction label for the i-th decision tree model and the m-th data; y m It is the reference label corresponding to the m-th training data. Where, when At that time, The value of is 1; when At that time, The value of is 0.

[0131] Optionally, the prediction results include successful prediction results and failed prediction results. A successful prediction result indicates that the predicted label of the training data after passing through a decision tree model is the same as the reference label of the training data; a failed prediction result indicates that the predicted label of the training data after passing through a decision tree model is different from the reference label of the training data.

[0132] To illustrate this, let's take the example of inputting training data m into candidate decision tree model i. After inputting training data m into candidate decision tree model i, the predicted label of training data m in candidate decision tree model i can be determined based on the leaf nodes of the candidate decision tree model corresponding to training data m. (The leaf node value corresponding to the leaf node) will predict the label. Reference label y corresponding to training data m mMatching is performed to obtain the prediction results of training data m and candidate decision tree models i. The prediction results are used to measure the degree of difference between the predicted label and the reference label. Based on inputting the training data into n candidate decision tree models, the prediction results of the training data in the n candidate decision tree models can be obtained. The prediction results can be determined using the model score function mentioned above, that is, the matching score is used to measure the prediction effect between the predicted label and the reference label.

[0133] In an optional embodiment, depending on the prediction result, the corresponding match may include at least one of the following cases.

[0134] 1. In response to a successful prediction result, the candidate decision tree model corresponding to the successful prediction result is evaluated with additional points to obtain a matching score.

[0135] To illustrate, when a prediction result is successful—that is, when the predicted label of the training data after passing through a candidate decision tree model is the same as the reference label of the training data—then the candidate decision tree model is given a score. For example, taking the input of training data into the m-th candidate decision tree model as an example, let's assume that the scores of the n candidate decision tree models before predicting the training data are 0. When a piece of training data passes through the m-th candidate decision tree model, if the predicted label of the training data obtained through the m-th candidate decision tree is the same as the reference label of the training data, then the m-th candidate decision tree model is given a score of 1. Similarly, if the training dataset contains 100 training data points, and all the training data passes through the m-th candidate decision tree model, if the predicted labels of the 100 training data points obtained through the m-th candidate decision tree are the same as the reference labels of the 100 training data points, then the m-th candidate decision tree model is given a score of 100, meaning that the m-th candidate decision tree model successfully predicted all the training data.

[0136] 2. In response to a prediction failure, the candidate decision tree models corresponding to the prediction failure are retained and evaluated to obtain a matching score.

[0137] To illustrate, when a prediction fails—that is, when the predicted label of the training data after passing through a candidate decision tree model differs from the reference label of the training data—then that candidate decision tree model is retained for evaluation, meaning its score remains unchanged. For example, suppose the score of n candidate decision tree models before predicting the training data is 0. If, after the training data passes through the m-th candidate decision tree model, the predicted label of the training data differs from the reference label, then the score of the m-th candidate decision tree model remains unchanged at 0.

[0138] The above are merely illustrative examples, and the embodiments of this application are not intended to limit the scope of the application.

[0139] In an optional embodiment, the selection probability corresponding to each of the n candidate decision tree models is determined based on the matching score; the candidate decision tree model whose selection probability meets the preset probability condition is taken as the target decision tree model.

[0140] The selection probability indicates the probability that a candidate decision tree model will be selected as the target decision tree model.

[0141] To illustrate, using the exponential differential privacy mechanism, based on the matching score, the selection probability corresponding to each of the n candidate decision tree models is determined, that is, the probability corresponding to the n decision tree models is obtained. The expression for the model probability corresponding to the decision tree model is shown below.

[0142]

[0143] Where, β i ε is a function representing the model probability corresponding to the i-th decision tree model; ε is the privacy overhead consumed when selecting a model, which is a pre-set positive number; S is the number of target decision tree models selected from candidate decision tree models, and S is a positive integer; G is used to indicate the number of repetitions of the process of building candidate decision tree models and determining the decision tree model from the candidate decision tree models. G can be 1, that is, only once, or a positive integer greater than 1, that is, repeated multiple times; H i H is the functional representation of the score function corresponding to the i-th decision tree model; j is the functional representation of the score function corresponding to the j-th decision tree model; J is used to indicate the index set of candidate decision tree models; j is used to indicate the j-th candidate decision tree model.

[0144] Based on the determination of the model probability corresponding to the candidate decision tree model, the model probability is compared with the preset probability conditions, and then the candidate decision tree model that meets the preset probability conditions is taken as the decision tree model.

[0145] In illustrative terms, the preset probability condition is to select the X candidate decision tree models with the highest model probabilities, where X is a positive integer. This means the preset probability condition includes both model probability conditions and decision tree model conditions. The model probability condition can be determined based on the ranking of model probabilities. The decision tree model condition specifies that the number of selected candidate decision tree models is X. For example, after obtaining the candidate decision tree models, the model probabilities are sorted in descending order. The candidate decision tree models corresponding to the top X model probabilities in the descending order are selected and used as the decision tree models. Alternatively, the preset probability condition is to select candidate decision trees with model probabilities exceeding 0.5. In other words, the preset probability condition includes model probability conditions. For example, after obtaining the model probabilities, candidate decision tree models with probabilities exceeding 0.5 are selected and used as the decision tree models.

[0146] In this embodiment, an exponential mechanism is used to obtain the target decision tree model from candidate decision tree models. Specifically, training data from the training dataset is input into the constructed candidate decision tree models to determine the predicted label corresponding to the training data in each candidate decision tree model. The predicted label is then matched with the reference label corresponding to the training data, and the resulting prediction is used as a condition for determining the target decision tree model. This method allows for the selection of the target decision tree model with superior prediction performance from the candidate decision tree models, which is beneficial for improving the fusion effect of the federated learning model.

[0147] In an optional embodiment, the federated learning method is applied to a second computing device, illustratively, as shown below. Figure 7 As shown, the method includes the following steps.

[0148] Step 710: Receive the target decision tree model sent by the first computing device.

[0149] The first computing device is used to determine at least one target feature from the data features corresponding to the training dataset. The target feature corresponds to at least two decision paths in the decision tree model. Based on the at least one target feature, n candidate decision tree models are obtained, where the value of n corresponds to the number of target features. The prediction results of the n candidate decision tree models on the training data in the training dataset are used to determine at least one candidate decision tree model as the target decision tree model.

[0150] Step 720: Fuse at least two decision tree models, including the target decision tree model, to obtain a federated learning model.

[0151] Optionally, if the target decision tree models have identical characteristics, such as identical target features, decision paths, and leaf node values, then a deduplication operation is performed on the two selected target decision tree models when they are identical. For example, one of the two selected target decision tree models is deleted, leaving only the other.

[0152] Optionally, the second computing device may include at least one of the following implementation methods, depending on the application scenario.

[0153] 1. The second computing device is implemented as a federated server.

[0154] In this context, the federated server is a server or terminal used in federated learning scenarios. Optionally, when the second computing device is implemented as a server, the first computing device can be implemented as a server, a terminal, or a running server within a terminal; when the second computing device is implemented as a terminal, the first computing device can be implemented as a terminal, a running server on a terminal, etc.

[0155] Schematic illustration: When the second computing device is implemented as a federated server and the first computing device is implemented as multiple terminals connected to the federated server, the second computing device receives multiple decision tree models sent by the first computing device, and fuses the multiple decision tree models sent by different terminals to obtain a federated learning model. For example: at least two first computing devices are application servers corresponding to different video applications, and the second computing device is a federated server for performing federated learning. Each application server stores training data corresponding to different user identifiers. For example, the training data includes historical interaction data corresponding to the user identifier, such as historical viewing information, historical like information, or historical collection information, etc. This historical interaction data is data obtained after user authorization. Each application server uses the method provided in the embodiments of this application to construct multiple candidate decision tree models on its own end through target features in its local training database. The aforementioned historical interaction data is input into the multiple candidate decision tree models, and the multiple candidate decision tree models predict the aforementioned historical interaction data to obtain prediction results. The prediction results include user interest points predicted from the input historical interaction data. Based on the prediction results of different candidate decision tree models on historical interaction data, a target decision tree model is selected from the candidate decision tree models. The target decision tree model is the decision tree model that can reflect the user's interests to a large extent. Then, the target decision tree model is sent to the federated server, which merges the decision tree models of multiple application servers to obtain the federated learning model. The federated learning model is sent to each application server. This federated learning model is used to recommend content to users, such as recommending items that match the user's interests based on the user's corresponding data features.

[0156] 2. The second computing device is implemented as a federated computing device.

[0157] In this context, "federated computing devices" refers to a state in which different computing devices operate in parallel.

[0158] Schematic illustration: The first and second computing devices are two parallel computing devices. Each device constructs multiple candidate decision tree models using its own training data. Based on an exponential mechanism, the first device selects a target decision tree model from the candidate models to be sent to the second device, and the second device selects its own decision tree model from the candidate models to be sent to the first device. Subsequently, the first device sends the multiple target decision tree models constructed and selected based on its own training data to the second device, and the second device also sends its own decision tree models constructed and selected based on its own training data to the first device. This represents a decision tree model exchange process between the two devices, allowing them to access each other's decision tree models. The first device then merges its own target decision tree models with the multiple local decision tree models received from the second device; similarly, the second device merges its own local decision tree models with the multiple target decision tree models received from the first device. Through their respective integration processes, the first and second computing devices can effectively extract data value while protecting user privacy.

[0159] For example, a first computing device and a second computing device correspond to the application servers of two different electronics companies. The training data stored in each application server represents data corresponding to network fault troubleshooting methods. Using the method provided in this application embodiment, each application server constructs multiple candidate decision tree models based on target features in its local training database. The data corresponding to the aforementioned network fault troubleshooting methods is input into these candidate decision tree models, which then predict the network fault troubleshooting methods based on the input data. Based on the prediction results of different candidate decision tree models, a decision tree model is selected from the candidate models. This decision tree model is chosen to reflect the network fault troubleshooting methods to a large extent. The decision tree model is then sent to the other application server. Each application server merges its own decision tree model with the other's decision tree model to obtain a federated learning model. This facilitates providing troubleshooting methods or early warnings for newly emerging faults in the electronics companies, improving the accuracy of equipment fault detection. The above is merely an illustrative example and is not intended to limit the scope of this application embodiment.

[0160] In an optional embodiment, a target decision tree model that is consistent with the features of the local decision tree model is determined to obtain a decision tree model group; based on the classification probabilities corresponding to the decision tree models in the decision tree model group, an average classification value is obtained; based on the matching result of the average classification value and the preset classification threshold, a federated learning model is obtained.

[0161] To illustrate, let's take an example of one first computing device corresponding to one second computing device. When the second computing device receives the target decision tree model sent by the first computing device, it compares its own decision tree model with each of the multiple target decision tree models sent by the first computing device. Optionally, when the features constituting the decision tree models are the same, the second computing device groups its own decision tree model with the target decision tree model. To illustrate, based on the position of the feature in any decision tree model within the group, the leaf node corresponding to that feature is determined. Using the target feature and any corresponding leaf node as the analysis object, the probability of the target feature reaching that leaf node is determined. For example, if the feature is "whether the texture is clear," and the leaf node associated with it is "bad melon," then the probability of going from the feature "whether the texture is clear" to the leaf node "bad melon" is 0.5. This probability is the classification probability corresponding to that decision tree model.

[0162] Optionally, the above classification result calculation is performed on other decision tree models in the decision tree model group that have the same features and corresponding leaf nodes to obtain the probability from the feature to the corresponding leaf node in other decision tree models in the decision tree model group. The average probability of the classification result corresponding to the classification result in different candidate training models is calculated to obtain the average probability of the classification result corresponding to the feature. Illustratively, a preset probability threshold is set in advance, or the preset probability threshold is determined based on the number of leaf node types. When the average probability of the classification result corresponding to the target feature exceeds the preset probability threshold, the leaf node corresponding to the classification result exceeding the preset probability threshold is taken as the classification result corresponding to the target feature in the federated learning model.

[0163] For example, the preset probability threshold is determined based on the number of leaf node types. There are two leaf node types: "good" and "bad". The preset probability threshold is 0.5. When the average probability of the selected feature and the classification results with the same correlation with that feature exceeds 0.5, the leaf node corresponding to the classification result exceeding 0.5 is used as the leaf node corresponding to the target feature in the federated learning model. For example, if the leaf node corresponding to the classification result exceeding 0.5 is "good", then the leaf node "good" is used as the leaf node corresponding to the target feature and the leaf node with the same correlation with that target feature in the federated learning model, thus constructing the federated learning model.

[0164] Step 730: Based on the federated learning model, perform data analysis on at least one piece of analysis data on the local side to obtain a data analysis result.

[0165] Optionally, when the second computing device is implemented as a federated computing device, the second computing device performs data analysis on the local analysis data based on the fused federated learning model to obtain a data analysis result. Similarly, the first computing device can use the target decision tree model constructed and selected on the local side and the local decision tree model sent by the second computing device to fuse into a federated learning model, and can also use this federated learning model to perform data analysis on the analysis data stored in the first computing device to obtain a data analysis result.

[0166] Step 740: Send the federated learning model to the first computing device.

[0167] Among them, the first computing device is used to perform data analysis on at least one piece of analysis data on the local side based on the federated learning model to obtain a data analysis result.

[0168] In an optional embodiment, the federated learning model is fused by the second computing device based on multiple decision tree models sent by at least one first computing device. For example, the federated learning model fuses decision tree models constructed by multiple first computing devices, or the federated learning model fuses a decision tree model constructed by one first computing device and a decision tree model constructed by the second computing device. Therefore, the target features of multi-party training data are fused in the federated learning model. Schematically, after obtaining the federated learning model, the second computing device sends the federated learning model to the first computing device, so that the first computing device can, on the basis of having local data, use the target features in other computing devices (including both the first computing device and the second computing device) included in the federated learning to perform data analysis on the local analysis data to obtain a data analysis result, and more deeply挖掘 the data value.

[0169] In the embodiments of the present application, the process of the second computing device sending the federated learning model to the first computing device after obtaining the federated learning model is introduced. By sending the obtained more comprehensive and accurate federated learning model to the first computing device, each first computing device can perform deeper挖掘 on the data owned by the local side under the condition of protecting the data privacy of each first computing device, and provides a new solution for cross-department, cross-organization, and cross-industry data cooperation while avoiding direct data transmission.

[0170] In an optional embodiment, taking a federated learning system including a first computing device and a second computing device and taking the interaction process between the two computing devices as an example, the federated learning method provided by the embodiments of the present application is described. As Figure 8As shown, a flowchart of a federated learning method provided by another exemplary embodiment of this application is illustrated, which is implemented as follows: steps 810 to 860.

[0171] Step 810: The first computing device determines at least one target feature from the data features corresponding to the training dataset.

[0172] Optionally, the target features can be determined from the data features corresponding to the training dataset by using a random selection method or an exponential mechanism-based method.

[0173] Each training data point has a corresponding data label. Matching the data features with the data labels yields the matching results. The matching results can be represented by a fractional function, which is constructed using an exponential mechanism. The expression for the fractional function is shown below.

[0174]

[0175]

[0176] Where m represents the m-th training data, and m is a positive integer; M represents the total number of training data, and M is a positive integer; I represents the set of data features; n represents the n-th data feature in the m-th training data; X m,n y represents the one-hot encoded value of the nth data feature corresponding to the mth training data; m Indicates data labels; Indicates when X m,n =y m The output is 1 if the condition is met, otherwise the output is 0. Indicates when 1-X m,n =y m The output is 0 if the condition is met, and 1 otherwise, i.e., X. m,n =y m Or 1-X m,n =y m If at least one of these conditions is true, the above fractional functions can be used.

[0177] Next, based on the exponential mechanism, the prediction results are normalized to determine the probability that each training data point is selected as the target feature. The illustrative expression for the target probability is shown below.

[0178]

[0179] Where, θ n ε1 represents the probability of a data feature being selected, and is a pre-defined total privacy overhead for data feature selection. ε1 / L is a pre-defined positive number. ε1 / L indicates the privacy overhead incurred each time a data feature is selected when selecting L data features. Q represents the probability of a data feature being selected.n The prediction result of the nth data feature indicates the matching status between the nth data feature in the mth training data and the corresponding data label in the mth training data; I represents the set of data features; j represents the jth data feature, which is included in the data feature set I; Q j Used to indicate the prediction result of the j-th data feature.

[0180] The target feature corresponds to at least two decision paths in the decision tree model.

[0181] Step 820: The first computing device uses at least one target feature as the basis for model construction to obtain n candidate decision tree models.

[0182] The value of n corresponds to the number of target features.

[0183] Step 830: The first computing device determines at least one candidate decision tree model as the target decision tree model from the n candidate decision tree models based on the prediction results of the training data in the training dataset by the n candidate decision tree models.

[0184] Decision tree models are a type of predictive model used to indicate the mapping relationships between different target features. In a decision tree model, target features exist in the form of nodes. Taking a decision tree model as an example, it includes a root node, leaf nodes, and internal nodes. The foundation for node construction lies in the aforementioned root node, internal nodes, and the relationships between target features. By understanding the target features and their corresponding relationships, we can start from the root node, gradually determine the internal nodes in the decision tree model, and ultimately generate the leaf nodes, thus completing the process of constructing the decision tree model.

[0185] Step 840: The first computing device sends the target decision tree model to the second computing device.

[0186] Step 850: The second computing device receives the target decision tree model sent by the first computing device.

[0187] Step 860: The second computing device fuses at least two decision tree models, including the target decision tree model, to obtain a federated learning model.

[0188] Optionally, if the target decision tree models have identical characteristics, such as identical target features, decision paths, and leaf node values, then a deduplication operation is performed on the two selected target decision tree models when they are identical. For example, one of the two selected target decision tree models is deleted, leaving only the other.

[0189] Optionally, when multiple first computing devices and one second computing device are connected, after the second computing device performs a deduplication operation on the target decision tree model, the remaining at least two target decision tree models are fused to obtain a federated decision tree model; when one first computing device and one second computing device are connected, after the second computing device performs a deduplication operation on the target decision tree model sent from the other end and the local decision tree model constructed and selected at the local end, the remaining at least two decision tree models (target decision tree model or local decision tree model), including the target decision tree model, are fused to obtain a federated decision tree model.

[0190] In summary, the first computing device determines at least one target feature from the data features corresponding to its local training dataset. Based on the target feature and the decision path corresponding to the target feature, it constructs n candidate decision tree models. Based on the prediction results of the n candidate decision tree models on the training data in the training dataset, it selects at least one target decision tree model from the n candidate decision tree models and sends the target decision tree model to the second computing device. The second computing device then fuses at least two decision tree models to obtain a federated learning model. The first computing device obtains the target decision tree model based on its local training data, so there is no risk of privacy leakage. At the same time, the process of sending the target decision tree model from the first computing device to the second computing device is only performed once, without requiring the target decision tree model to be transmitted multiple times between the first and second computing devices, avoiding excessive communication overhead and making the process of constructing the federated learning model more convenient.

[0191] In an optional embodiment, the above-described federated learning model is applied to horizontal federated learning, such as... Figure 9 As shown, in the technical solution proposed in this application embodiment, each first computing device in the horizontal federated learning performs random feature selection and decision tree model construction locally, and then sends the decision tree model selected based on the exponential mechanism to the second computing device. The second computing device integrates and fuses the received decision tree models, and then sends the obtained federated learning model to each first computing device. (Illustrative example, as shown...) Figure 9 As shown, in the proposed horizontal federated ensemble learning method, the training process of the federated learning model is implemented as follows: steps 910 to 950.

[0192] Step 910: The first computing device randomly selects target features from the data features.

[0193] Each first computing device uses its locally available training data to randomly select features, for example, to randomly select all features with equal probability.

[0194] Step 920: The first computing device constructs a decision tree model locally based on the target features.

[0195] After completing the local feature selection, each first computing device constructs a decision tree model of depth D based on the target features.

[0196] Alternatively, for a feature set (D features), since each feature has two possible values, 0 and 1, a binary classification model can be constructed as follows: Consider the i-th decision tree model and the m-th data point, along with the leaf node values ​​corresponding to that training data. Fractional functions can predict results We obtain the following: Using the exponential differential privacy mechanism, we select S decision tree models from T decision tree models. We then repeat the process of randomly selecting D features and constructing decision tree models G times, resulting in a total of (G*S) decision tree models of depth D.

[0197] In an optional embodiment, steps 910 to 920 described above can be implemented as follows: Figure 10 First, N-dimensional features 1010 are obtained based on the training data. Then, D target features 1020 are randomly selected from the N-dimensional features. Next, T binary classification decision tree models 1030 are obtained based on the D target features. Then, based on the exponential mechanism, decision tree models are selected 1040, and S decision tree models 1050 are selected from T decision tree models. Optionally, after obtaining S decision tree models, the process of selecting D target features 1020 to selecting S decision tree models 1050 is repeated G times, that is, G sets of models are generated, resulting in G*S models.

[0198] Step 930: The first computing device sends the local model parameters to the second computing device.

[0199] After completing local model training, each first computing device sends its locally acquired model to the second computing device in plaintext. Each first computing device can generate G*S models, and each model contains the model parameters corresponding to the decision tree model, including: target features, decision path, and corresponding leaf node values.

[0200] Step 940: The federated server integrates and merges the received local models.

[0201] After receiving local models or model parameters from at least one first computing device, the second computing device integrates and fuses the received local models to obtain a federated learning model. The second computing device can perform federated voting on the received local models from the first computing devices. This voting method is generally used for classification models. For example, for a binary classification model (positive class, negative class), the classification result of the federated voting model is determined by the average of the classification results of the local models from the first computing devices. For a given piece of data to be classified, if the average of the classification results from the local models of the first computing devices is greater than 0.5, the classification result of the federated voting model is "positive". Conversely, if the average of the classification results from the local models of the first computing devices is less than 0.5, the classification result of the federated voting model is "negative". When the two are equal, a simple random selection method can be used. Because there are multiple first computing devices and an exponential difference privacy mechanism is used, duplicate models may be selected. Before fusion, duplicate models are deduplicated, meaning only one of the duplicate models is retained.

[0202] Step 950: The second computing device sends the federated learning model to each of the first computing devices.

[0203] Optionally, the federated learning model is obtained by the second computing device through the fusion of multiple decision tree models sent by the first computing devices. Schematic, after obtaining the federated learning model, the second computing device sends it to the first computing device, enabling the first computing device, based on its own data, to utilize the target features in other computing devices (including both the first and second computing devices) included in the federated learning to perform data analysis on its own data, obtain data analysis results, and further explore the value of the data.

[0204] This application proposes a federated ensemble learning method for decision trees based on an exponential mechanism, and a parallel-updating horizontal federated learning method. Illustratively, the processes of steps 911 to 950 above can be implemented as follows: Figure 11 ,like Figure 11 As shown, the model training system includes a second computing device 1120 and a first computing device 1111. Each first computing device 1111 stores multiple training data, each training data corresponding to a data label and multiple data features.

[0205] First computing device 1111The first computing device 1111 randomly selects target features from the data features; then, based on the selected target features, the first computing device 1111 constructs a decision tree model by enumeration, and uses an exponential mechanism to select a decision tree model that can better reflect the training data from the candidate decision trees, thus realizing the decision tree model selection process based on the exponential mechanism; finally, the first computing device 1111 sends the decision tree model to the second computing device 1120 to realize the model upload process.

[0206] Second computing device 1120 After receiving the decision tree model sent by the first computing device 1111, the second computing device 1120 fuses the decision tree model.

[0207] This application proposes a federated ensemble learning method based on an exponential mechanism and decision trees, and a parallel-updating horizontal federated learning method. Illustratively, the processes of steps 910 to 950 above can be implemented as follows: Figure 12 ,like Figure 12 As shown, the model training system includes a second computing device 1220 and k first computing devices 1210, where k is an integer greater than 1. Each first computing device 1210 stores multiple training data, each training data corresponding to a data label and multiple data features.

[0208] First computing device 1210 The first computing device 1210 randomly selects target features from the data features; then, based on the selected target features, the first computing device 1210 constructs a decision tree model by enumeration, and uses an exponential mechanism to select a decision tree model that can better reflect the training data from the candidate decision trees, thus realizing the decision tree model selection process based on the exponential mechanism; finally, the first computing device 1210 sends the decision tree model to the second computing device 1220, thus realizing the model sending process.

[0209] Second computing device 1220 After receiving the decision tree model sent by the first computing device 1210, the second computing device 1220 fuses the decision tree model.

[0210] It should be noted that during the training of the federated learning model, each first computing device sends the decision tree model to the second computing device. In an optional embodiment, the process of different first computing devices sending the decision tree model to the second computing device can be implemented in various forms, such as parallel sending or sequential sending. The same first computing device may also send the decision tree model to the second computing device in parallel or sequentially. This application embodiment does not limit this.

[0211] In summary, the first computing device determines at least one target feature from the data features corresponding to its local training dataset. Based on the target feature and the corresponding decision path, it constructs n candidate decision tree models. Then, based on the prediction results of the n candidate decision tree models on the training data in the training dataset, it selects at least one target decision tree model from the n candidate decision tree models. This target decision tree model is then sent to the second computing device, where it fuses at least two decision tree models to obtain the federated learning model. This method ensures that the first computing device obtains the target decision tree model based on its local training data without the risk of privacy leakage. Furthermore, it eliminates the need for multiple transmissions of the target decision tree model between the first and second computing devices, avoiding excessive communication overhead and making the process of constructing the federated learning model more convenient.

[0212] Figure 13 This is a structural block diagram of a federated learning device provided in an exemplary embodiment of this application, such as... Figure 13 As shown, the device includes the following parts:

[0213] The feature determination module 1310 is used to determine at least one target feature from the data features corresponding to the training dataset, wherein the target feature corresponds to at least two decision paths in the decision tree model;

[0214] The model acquisition module 1320 is used to obtain n candidate decision tree models based on the at least one target feature as the basis for model construction, where the value of n corresponds to the number of target features.

[0215] The model determination module 1330 is used to determine at least one candidate decision tree model as the target decision tree model from the n candidate decision tree models based on the prediction results of the n candidate decision tree models on the training data in the training dataset.

[0216] The model sending module 1340 is used to send the target decision tree model to a second computing device. The second computing device is used to receive the target decision tree model sent by the first computing device and fuse at least two decision tree models including the target decision tree model to obtain a federated learning model.

[0217] like Figure 14 As shown, in an optional embodiment, the model acquisition module 1320 includes:

[0218] The generation unit 1321 is used to generate at least two leaf nodes based on the target features and the decision direction.

[0219] The assignment unit 1322 is used to assign values ​​to the at least two leaf nodes based on the number of classifications in the decision tree model, so as to obtain at least two leaf nodes labeled with leaf node values.

[0220] The construction unit 1323 is used to construct the n candidate decision tree models based on the target features, the decision path, and at least two leaf nodes labeled with leaf node values.

[0221] In an optional embodiment, the decision tree model is a binary classification model;

[0222] The assignment unit 1322 is used to assign values ​​to the leaf nodes based on the binary classification criteria of the binary classification model, so as to obtain at least two leaf nodes labeled with leaf node values. The binary classification criteria are used to indicate that there are two assignment cases for each leaf node.

[0223] In an optional embodiment, the generation unit 1321 is configured to use a first target feature among the target features as the root node of the decision tree model, wherein the first target feature is any one of the target features; based on the decision path, generate a leaf node that is associated with the root node; or, based on the decision path corresponding to the root node, determine an associated node that is associated with the root node, wherein the associated node is used to indicate a second target feature, wherein the second target feature is any one of the target features other than the first target feature; and based on the decision path corresponding to the associated node, generate a leaf node that is associated with the associated node.

[0224] In an optional embodiment, the model determination module 1330 includes:

[0225] Input unit 1331 is used to input training data from the training dataset into the candidate decision tree model to determine the predicted label corresponding to the training data;

[0226] The matching unit 1332 is used to match the predicted label with the reference label of the training data to obtain a prediction result, wherein the reference label is used to indicate the reference classification of the training data;

[0227] The determining unit 1333 is used to determine at least one candidate decision tree model as the target decision tree model from the n candidate decision tree models based on the prediction results of the n candidate decision tree models corresponding to the training data.

[0228] In an optional embodiment, the determining unit 1333 is used to determine the matching score corresponding to each of the n candidate decision tree models based on the prediction results of the n candidate decision tree models for the training data respectively; and to determine at least one candidate decision tree model as the target decision tree model based on the matching score corresponding to each of the n candidate decision tree models respectively.

[0229] In an optional embodiment, the determining unit 1333 is further configured to determine the selection probability corresponding to each of the n candidate decision tree models based on the matching score, wherein the selection probability is used to indicate the probability that the candidate decision tree model is selected as the target decision tree model; and to select the candidate decision tree model whose selection probability meets the preset probability condition as the target decision tree model.

[0230] In an optional embodiment, the prediction result includes a successful prediction result or a failed prediction result;

[0231] The determining unit 1333 is further configured to, in response to the prediction result being the prediction success result, perform a scoring evaluation on the candidate decision tree model corresponding to the prediction success result to obtain the matching score; or, in response to the prediction result being the prediction failure result, perform a retention evaluation on the candidate decision tree model corresponding to the prediction failure result to obtain the matching score.

[0232] In an optional embodiment, the feature determination module 1310 is configured to randomly select at least one data feature from the data features corresponding to the training dataset as the target feature; or, based on an exponential mechanism, select at least one data feature from the data features corresponding to the training dataset as the target feature.

[0233] Figure 15 This is a structural block diagram of a federated learning device provided in another exemplary embodiment of this application, such as... Figure 15 As shown, the device includes the following parts:

[0234] The receiving module 1510 is configured to receive a target decision tree model sent by a first computing device. The first computing device is configured to determine at least one target feature from the data features corresponding to the training dataset, wherein the target feature corresponds to at least two decision paths in the decision tree model; based on the at least one target feature as the basis for model construction, n candidate decision tree models are obtained, wherein the value of n corresponds to the number of target features; based on the prediction results of the n candidate decision tree models on the training data in the training dataset, at least one candidate decision tree model is determined from the n candidate decision tree models as the target decision tree model.

[0235] The fusion module 1520 is used to fuse at least two decision tree models, including the target decision tree model, to obtain a federated learning model;

[0236] The sending module 1530 is used to perform data analysis on at least one set of analysis data on the local end based on the federated learning model to obtain data analysis results; or, to send the federated learning model to the first computing device, wherein the first computing device is used to perform data analysis on at least one set of analysis data on the local end based on the federated learning model to obtain data analysis results.

[0237] In an optional embodiment, the fusion module 1520 is used to obtain a local decision tree model based on the data features corresponding to the local training dataset; and to fuse the local decision tree model with the target decision tree model to obtain the federated learning model.

[0238] In an optional embodiment, the fusion module 1520 is further configured to determine a target decision tree model that is consistent with the features of the local decision tree model, thereby obtaining a decision tree model group; based on the classification probabilities corresponding to the decision tree models in the decision tree model group, an average classification value is obtained; and based on the matching result of the average classification value and a preset classification threshold, the federated learning model is obtained.

[0239] It should be noted that the federated learning device provided in the above embodiments is only an example of the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the federated learning device and the federated learning method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.

[0240] Figure 16 This illustration shows a schematic diagram of a server provided in an exemplary embodiment of this application. The server 1600 includes a Central Processing Unit (CPU) 1601, a system memory 1604 including Random Access Memory (RAM) 1602 and Read Only Memory (ROM) 1603, and a system bus 1605 connecting the system memory 1604 and the CPU 1601. The server 1600 also includes a mass storage device 1606 for storing an operating system 1613, application programs 1614, and other program modules 1615.

[0241] Mass storage device 1606 is connected to central processing unit 1601 via a mass storage controller (not shown) connected to system bus 1605. Mass storage device 1606 and its associated computer-readable media provide non-volatile storage for server 1600. That is, mass storage device 1606 may include computer-readable media (not shown) such as hard disk or compact disc read-only memory (CD-ROM) drives.

[0242] Without loss of generality, computer-readable media can include computer storage media and communication media. Computer storage media includes volatile and non-volatile, removable and non-removable media implemented using any method or technology for storing information such as computer-readable instructions, data structures, program modules, or other data. Computer storage media include RAM, ROM, erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other solid-state storage technologies, CD-ROM, digital versatile disc (DVD) or other optical storage, magnetic tape cassettes, magnetic tape, disk storage, or other magnetic storage devices. Of course, those skilled in the art will recognize that computer storage media are not limited to the above-mentioned types. The system memory 1604 and mass storage device 1606 described above can be collectively referred to as memory.

[0243] According to various embodiments of this application, server 1600 can also be connected to a remote computer on a network, such as the Internet. That is, server 1600 can be connected to network 1612 via network interface unit 1611 connected to system bus 1605, or it can use network interface unit 1611 to connect to other types of networks or remote computer systems (not shown).

[0244] The aforementioned memory also includes one or more programs, which are stored in the memory and configured to be executed by the CPU.

[0245] Embodiments of this application also provide a computer device including a processor and a memory, wherein the memory stores at least one instruction, at least one program, code set, or instruction set, and the at least one instruction, at least one program, code set, or instruction set is loaded and executed by the processor to implement the federated learning method provided in the above-described method embodiments.

[0246] Embodiments of this application also provide a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, at least one program, code set, or instruction set is loaded and executed by a processor to implement the federated learning method provided in the above-described method embodiments.

[0247] Embodiments of this application also provide a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform any of the federated learning methods described in the above embodiments.

[0248] Optionally, the computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), solid-state drives (SSDs), or optical discs, etc. The random access memory may include resistive random access memory (ReRAM) and dynamic random access memory (DRAM). The sequence numbers of the embodiments in this application are merely descriptive and do not represent the superiority or inferiority of the embodiments.

[0249] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0250] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A federated learning method, characterized in that, Applied to a first computing device, the method includes: Determine at least one target feature from the data features corresponding to the training dataset, wherein the target feature corresponds to at least two decision paths in the decision tree model; Based on the at least one target feature, n candidate decision tree models are obtained, where the value of n corresponds to the number of target features. Based on the prediction results of the n candidate decision tree models on the training data in the training dataset, at least one candidate decision tree model is determined from the n candidate decision tree models as the target decision tree model; The target decision tree model is sent to a second computing device; wherein, the second computing device is used to receive the target decision tree model sent by the first computing device, obtain a local decision tree model based on the data features corresponding to the local training dataset, and fuse the local decision tree model with the target decision tree model to obtain a federated learning model.

2. The method according to claim 1, characterized in that, The process of constructing n candidate decision tree models based on the at least one target feature includes: Based on the target features and the decision-making process, at least two leaf nodes are generated accordingly. The at least two leaf nodes are assigned values ​​based on the number of classifications in the decision tree model, resulting in at least two leaf nodes labeled with leaf node values. Based on the target features, the decision path, and at least two leaf nodes labeled with leaf node values, the n candidate decision tree models are constructed.

3. The method according to claim 2, characterized in that, The decision tree model is a binary classification model; The number of classifications based on the decision tree model is used to assign values ​​to the at least two leaf nodes, resulting in at least two leaf nodes labeled with leaf node values, including: Based on the binary classification model, the leaf nodes are assigned values ​​to obtain at least two leaf nodes labeled with leaf node values. The binary classification standard is used to indicate that there are two possible value assignments for each leaf node.

4. The method according to claim 2, characterized in that, Based on the target features and the decision-making process, at least two leaf nodes are generated, including: The first target feature among the target features is used as the root node of the decision tree model, and the first target feature is any one of the target features; Based on the decision path, leaf nodes that are associated with the root node are generated accordingly; or, based on the decision path corresponding to the root node, associated nodes that are associated with the root node are determined, the associated nodes are used to indicate a second target feature, the second target feature being any feature other than the first target feature among the target features; based on the decision path corresponding to the associated nodes, leaf nodes that are associated with the associated nodes are generated.

5. The method according to claim 2, characterized in that, The step of determining at least one candidate decision tree model as the target decision tree model from the n candidate decision tree models based on the prediction results of the training data in the training dataset includes: The training data in the training dataset is input into the candidate decision tree model to determine the predicted label corresponding to the training data; The predicted label is matched with the reference label of the training data to obtain the prediction result, wherein the reference label is used to indicate the reference classification of the training data; Based on the prediction results of the n candidate decision tree models for the training data, at least one candidate decision tree model is selected from the n candidate decision tree models as the target decision tree model.

6. The method according to claim 5, characterized in that, The step of determining at least one candidate decision tree model as the target decision tree model from the n candidate decision tree models based on the prediction results corresponding to the training data of the n candidate decision tree models includes: Based on the prediction results of the n candidate decision tree models for the training data, the matching scores corresponding to the n candidate decision tree models are determined. Based on the matching scores corresponding to the n candidate decision tree models, at least one candidate decision tree model is determined as the target decision tree model.

7. The method according to claim 6, characterized in that, The step of determining at least one candidate decision tree model as the target decision tree model based on the matching scores corresponding to each of the n candidate decision tree models includes: Based on the matching score, the selection probability corresponding to each of the n candidate decision tree models is determined. The selection probability is used to indicate the probability that the candidate decision tree model is selected as the target decision tree model. The candidate decision tree model whose selected probability meets the preset probability condition is taken as the target decision tree model.

8. The method according to claim 6, characterized in that, The prediction results include successful predictions or unsuccessful predictions. The step of determining the matching score corresponding to each of the n candidate decision tree models based on the prediction results of the n candidate decision tree models for the training data includes: In response to the prediction result being a successful prediction, the candidate decision tree model corresponding to the successful prediction result is evaluated with added scores to obtain the matching score; or, In response to the prediction result being a prediction failure, the candidate decision tree model corresponding to the prediction failure is retained and evaluated to obtain the matching score.

9. The method according to any one of claims 1 to 8, characterized in that, Determining at least one target feature from the data features corresponding to the training dataset includes: Randomly select at least one data feature from the data features corresponding to the training dataset as the target feature; or, Based on the exponential mechanism, at least one data feature is selected as the target feature from the data features corresponding to the training dataset.

10. A federated learning method, characterized in that, When applied to a second computing device, the method includes: The system receives a target decision tree model sent by a first computing device, wherein the first computing device is used to determine at least one target feature from the data features corresponding to the training dataset, and the target feature corresponds to at least two decision paths in the decision tree model; based on the at least one target feature as the basis for model construction, n candidate decision tree models are obtained, where the value of n corresponds to the number of target features; based on the prediction results of the n candidate decision tree models on the training data in the training dataset, at least one candidate decision tree model is determined from the n candidate decision tree models as the target decision tree model; Based on the data features corresponding to the local training dataset, a local decision tree model is obtained; the local decision tree model is fused with the target decision tree model to obtain a federated learning model. Based on the federated learning model, at least one set of analytical data from the local end is analyzed to obtain data analysis results; or, the federated learning model is sent to the first computing device, and the first computing device is used to analyze at least one set of analytical data from the local end based on the federated learning model to obtain data analysis results.

11. The method according to claim 10, characterized in that, The process of fusing the local decision tree model with the target decision tree model to obtain a federated learning model includes: Determine the target decision tree model that is consistent with the characteristics of the local decision tree model to obtain a decision tree model group; Based on the classification probabilities corresponding to the decision tree models in the decision tree model group, the average classification value is obtained; The federated learning model is obtained based on the matching result between the average classification value and the preset classification threshold.

12. A federated learning system, characterized in that, The federated learning system includes a first computing device and a second computing device; The first computing device is configured to determine at least one target feature from the data features corresponding to the training dataset, wherein the target feature corresponds to at least two decision paths in the decision tree model; Based on the at least one target feature, n candidate decision tree models are obtained, where the value of n corresponds to the number of target features. Based on the prediction results of the n candidate decision tree models on the training data in the training dataset, at least one candidate decision tree model is determined from the n candidate decision tree models as the target decision tree model; the target decision tree model is sent to the second computing device; The second computing device is used to receive the target decision tree model sent by the first computing device; Based on the data features corresponding to the local training dataset, a local decision tree model is obtained. The local decision tree model is then fused with the target decision tree model to obtain a federated learning model.

13. A federated learning device, characterized in that, The device includes: A feature determination module is used to determine at least one target feature from the data features corresponding to the training dataset, wherein the target feature corresponds to at least two decision paths in the decision tree model; The model acquisition module is used to obtain n candidate decision tree models based on the at least one target feature, where the value of n corresponds to the number of target features. The model determination module is used to determine at least one candidate decision tree model as the target decision tree model from the n candidate decision tree models based on the prediction results of the n candidate decision tree models on the training data in the training dataset; The model sending module is used to send the target decision tree model to the second computing device; wherein, the second computing device is used to receive the target decision tree model sent by the first computing device, obtain the local decision tree model based on the data features corresponding to the local training dataset, and fuse the local decision tree model with the target decision tree model to obtain a federated learning model.

14. A federated learning device, characterized in that, The device includes: A receiving module is configured to receive a target decision tree model sent by a first computing device. The first computing device is configured to determine at least one target feature from the data features corresponding to the training dataset, wherein the target feature corresponds to at least two decision paths in the decision tree model; based on the at least one target feature as the basis for model construction, n candidate decision tree models are obtained, wherein the value of n corresponds to the number of target features; based on the prediction results of the n candidate decision tree models on the training data in the training dataset, at least one candidate decision tree model is determined from the n candidate decision tree models as the target decision tree model. The fusion module is used to obtain a local decision tree model based on the data features corresponding to the local training dataset; and to fuse the local decision tree model with the target decision tree model to obtain a federated learning model. The sending module is used to perform data analysis on at least one set of analysis data on the local end based on the federated learning model to obtain data analysis results; or, to send the federated learning model to the first computing device, wherein the first computing device is used to perform data analysis on at least one set of analysis data on the local end based on the federated learning model to obtain data analysis results.

15. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing at least one program, which is loaded and executed by the processor to implement the federated learning method as described in any one of claims 1 to 11.

16. A computer-readable storage medium, characterized in that, The storage medium stores at least one program segment, which is loaded and executed by a processor to implement the federated learning method as described in any one of claims 1 to 11.

17. A computer program product, characterized in that, It includes computer instructions that, when executed by a processor, implement the federated learning method as described in any one of claims 1 to 11.