A data processing method and related equipment based on federated learning model
By customizing algorithm design and parameter configuration, the problems of low accuracy and insufficient flexibility in parameter tuning during federated learning model training are solved, thereby improving the flexibility and accuracy of the model algorithm, simplifying the training process, and lowering the threshold.
Patent Information
- Application Number
- CN202411220602.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-02
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-09-02
AI Technical Summary
Existing federated learning models suffer from low accuracy during training, insufficient flexibility in training parameter tuning, fixed basic algorithms, and limited parameter adjustability, which restricts model training.
By designing custom algorithms and flexibly combining operator components, candidate algorithms are generated, target algorithms and training samples are selected, algorithm parameters are initialized, and parameters are displayed and configured on the front-end page. Model configuration files are generated to achieve model training tasks, and training parameters from various sources are integrated to form a global model.
It improves the accuracy and precision of the model algorithm, simplifies the training task parameter page, lowers the entry barrier for model trainers, promotes model tuning, and improves training efficiency.
Smart Images

Figure CN118760466B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of electronic digital data processing, and in particular to a data processing method based on a federated learning model and related equipment. Background Art
[0002] The accuracy of the existing models in the process of processing digital data is not high. For example, when the model is trained by federated learning, most of the algorithms used are built-in algorithms, with fewer basic algorithms and relatively fixed ones, which limits the accuracy of the algorithm. There are also fewer adjustable parameters in the model training process, which are relatively fixed, resulting in more restrictions in the training process of the federated learning model and a lack of flexibility in the process of adjusting the parameters of model training. Summary of the invention
[0003] The present disclosure proposes a data processing method and related equipment based on a federated learning model, so as to solve technical problems such as low accuracy of processing results of the federated learning model and lack of flexibility in the process of training parameter adjustment and optimization, etc.
[0004] In a first aspect, the present disclosure provides a data processing method based on a federated learning model, comprising:
[0005] In response to receiving a data processing request from a first initiator, sending the data processing request to a first participant indicated by the data processing request;
[0006] Receive first intermediate data from the first initiator and second intermediate data from the first participant, wherein the first intermediate data is obtained based on first input data and a first local model provided by the first initiator, and the second intermediate data is obtained based on second input data and a second local model provided by the first participant; the first input data includes at least one of a target area, weather data, the number of users, and a power usage rule; the second input data includes at least one of a target area, weather data, the number of users, and a power usage rule;
[0007] Based on a global model, the first intermediate data and the second intermediate data are merged to obtain global result data;
[0008] Returning the global result data to the first initiator to obtain a target result regarding the data processing request;
[0009] The first local model and the second local model are obtained based on the global model, including:
[0010] Receiving a model training task and a corresponding model configuration file from a second initiator; wherein the model training task and the model configuration file are generated at the second initiator by a target algorithm and participant information determined by the second initiator, including:
[0011] At the second initiator, a target algorithm is selected from candidate algorithms, and a first training sample of the second initiator participating in the training, a second participant, and a second training sample provided by the second participant are determined; wherein the candidate algorithm is generated based on a combination of operator components;
[0012] Generate a model training task based on the target algorithm, the participant information of the second participant, and the second training sample;
[0013] Initializing algorithm parameters for the model training task;
[0014] Displaying the algorithm parameters and parameter types of the algorithm parameters on the front-end page;
[0015] Configuring the algorithm parameters to obtain corresponding configuration parameters, and generating corresponding model configuration files based on the configuration parameters;
[0016] Sending the model training task and the model configuration file to the second participant, so as to perform model training at the second participant based on the second training sample provided by the second participant, and obtain second model training parameters of the second participant;
[0017] Receiving a first model training parameter from the second initiator and a second model training parameter from the second participant; the first model training parameter is obtained by performing model training based on the first training sample at the second initiator;
[0018] Fusing the first model training parameters and the second model training parameters to obtain global model parameters of the global model;
[0019] The global model parameters are sent to the second initiator and the second participant to update the model parameters of the second initiator and the second participant to obtain the first local model and the second local model.
[0020] In a second aspect of the present disclosure, a data processing device based on a federated learning model is provided, comprising:
[0021] a request module, configured to, in response to receiving a data processing request from a first initiator, send the data processing request to a first participant indicated by the data processing request;
[0022] a receiving module, configured to receive first intermediate data from the first initiator and second intermediate data from the first participant, wherein the first intermediate data is obtained based on first input data and a first local model provided by the first initiator, and the second intermediate data is obtained based on second input data and a second local model provided by the first participant;
[0023] A fusion module, used for fusing the first intermediate data and the second intermediate data based on a global model to obtain global result data;
[0024] A response module, used for returning the global result data to the first initiator to obtain a target result of the data processing request;
[0025] The first local model and the second local model are obtained based on the global model, including:
[0026] Receiving a model training task and a corresponding model configuration file from a second initiator; wherein the model training task and the model configuration file are generated at the second initiator by a target algorithm and participant information determined by the second initiator, including:
[0027] At the second initiator, a target algorithm is selected from candidate algorithms, and a first training sample of the second initiator participating in the training, a second participant, and a second training sample provided by the second participant are determined; wherein the candidate algorithm is generated based on a combination of operator components;
[0028] Generate a model training task based on the target algorithm, the participant information of the second participant, and the second training sample;
[0029] Initializing algorithm parameters for the model training task;
[0030] Displaying the algorithm parameters and parameter types of the algorithm parameters on the front-end page;
[0031] Configuring the algorithm parameters to obtain corresponding configuration parameters, and generating corresponding model configuration files based on the configuration parameters;
[0032] Sending the model training task and the model configuration file to the second participant, so as to perform model training at the second participant based on the training sample provided by the second participant, and obtain second model training parameters of the second participant;
[0033] Receiving a first model training parameter from the second initiator and a second model training parameter from the second participant; the first model training parameter is obtained by performing model training based on the first training sample at the second initiator;
[0034] Fusing the first model training parameters and the second model training parameters to obtain global model parameters of the global model;
[0035] The global model parameters are sent to the second initiator and the second participant to update the model parameters of the second initiator and the second participant to obtain the first local model and the second local model.
[0036] In a third aspect of the present disclosure, an electronic device is provided, comprising one or more processors, a memory; and one or more programs, wherein the one or more programs are stored in the memory and executed by the one or more processors, and the programs include instructions for executing the method described in the first aspect.
[0037] According to a fourth aspect of the present disclosure, a non-volatile computer-readable storage medium containing a computer program is provided. When the computer program is executed by one or more processors, the processors execute the method described in the first aspect.
[0038] In a fifth aspect of the present disclosure, a computer program product is provided, comprising computer program instructions, which, when executed on a computer, enable the computer to execute the method described in the first aspect.
[0039] From the above, it can be seen that the data processing method and related equipment based on the federated learning model provided by the present disclosure can flexibly customize the algorithm design according to the application scenario to improve the accuracy and precision of the model algorithm. In addition, the algorithm parameters that can be adjusted during the model training process are set to simplify the parameter page of the training task parameters, increase the page readability, lower the entry threshold for model training personnel, and promote model tuning to achieve the model training expectations as soon as possible. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions in the present disclosure or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0041] Figure 1 A schematic diagram of a data processing architecture based on a federated learning model according to an embodiment of the present disclosure.
[0042] Figure 2 The figure is a schematic diagram of the hardware structure of an exemplary electronic device according to an embodiment of the present disclosure.
[0043] Figure 3The present invention is a flowchart of a data processing method based on a federated learning model according to an embodiment of the present invention.
[0044] Figure 4 The figure is a schematic diagram of the principle of the custom algorithm of the embodiment of the present disclosure.
[0045] Figure 5 A schematic diagram of data processing of a model according to an embodiment of the present disclosure.
[0046] Figure 6 Schematic diagram of the algorithm parameter initialization sub-process according to an embodiment of the present disclosure.
[0047] Figure 7 Schematic diagram of a data processing system based on a federated learning model according to an embodiment of the present disclosure.
[0048] Figure 8 It is a schematic diagram of a data processing device based on a federated learning model according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0049] In order to make the objectives, technical solutions and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.
[0050] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present disclosure should be understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in the embodiments of the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0051] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0052] Figure 1 A schematic diagram of a data processing architecture based on a federated learning model according to an embodiment of the present disclosure is shown. Figure 1, the data processing architecture 100 based on the federated learning model may include a server 110, a terminal 120, and a network 130 providing a communication link. The server 110 and the terminal 120 may be connected via a wired or wireless network 130. The server 110 may be an independent physical server, or a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, security services, and CDN.
[0053] The terminal 120 may be implemented in hardware or software. For example, when the terminal 120 is implemented in hardware, it may be various electronic devices having a display screen and supporting page display, including but not limited to smart phones, tablet computers, e-book readers, laptop portable computers, and desktop computers, etc. When the terminal 120 device is implemented in software, it may be installed in the electronic devices listed above; it may be implemented as multiple software or software modules (such as software or software modules used to provide distributed services), or it may be implemented as a single software or software module, which is not specifically limited here.
[0054] It should be noted that the data processing method based on the federated learning model provided in the embodiment of the present application can be executed by the terminal 120 or by the server 110. It should be understood that Figure 1 The number of terminals, networks and servers in the embodiment is only for illustration and is not intended to limit the number of terminals, networks and servers. Any number of terminals, networks and servers may be provided as required.
[0055] Figure 2 FIG. 2 shows a schematic diagram of the hardware structure of an exemplary electronic device 200 provided in an embodiment of the present disclosure. Figure 2 As shown, the electronic device 200 may include: a processor 202, a memory 204, a network module 206, a peripheral interface 208 and a bus 210. The processor 202, the memory 204, the network module 206 and the peripheral interface 208 are connected to each other in communication within the electronic device 200 through the bus 210.
[0056] Processor 202 may be a central processing unit (CPU), a data processor based on a federated learning model, a neural network processor (NPU), a microcontroller (MCU), a programmable logic device, a digital signal processor (DSP), an application specific integrated circuit (ASIC), or one or more integrated circuits. Processor 202 may be used to perform functions related to the technology described in this disclosure. In some embodiments, processor 202 may also include multiple processors integrated into a single logical component. For example, Figure 2 As shown, processor 202 may include a plurality of processors 202a, 202b, and 202c.
[0057] The memory 204 may be configured to store data (eg, instructions, computer code, etc.). Figure 2 As shown, the data stored in the memory 204 may include program instructions (for example, program instructions for implementing the data processing method based on the federated learning model of the embodiment of the present disclosure) and data to be processed (for example, the memory may store configuration files of other modules, etc.). The processor 202 may also access the program instructions and data stored in the memory 204, and execute the program instructions to operate on the data to be processed. The memory 204 may include a volatile storage device or a non-volatile storage device. In some embodiments, the memory 204 may include a random access memory (RAM), a read-only memory (ROM), an optical disk, a magnetic disk, a hard disk, a solid-state drive (SSD), a flash memory, a memory stick, etc.
[0058] The network module 206 can be configured to provide the electronic device 200 with communication with other external devices via a network. The network can be any wired or wireless network capable of transmitting and receiving data. For example, the network can be a wired network, a local wireless network (e.g., Bluetooth, WiFi, near field communication (NFC), etc.), a cellular network, the Internet, or a combination thereof. It is understood that the type of network is not limited to the above specific examples. In some embodiments, the network module 206 can include any number of network interface controllers (NICs), radio frequency modules, transceivers, modems, routers, gateways, adapters, cellular network chips, etc., in any combination.
[0059] The peripheral interface 208 can be configured to connect the electronic device 200 to one or more peripheral devices to achieve information input and output. For example, the peripheral devices can include input devices such as a keyboard, a mouse, a touch pad, a touch screen, a microphone, and various sensors, and output devices such as a display, a speaker, a vibrator, and an indicator light.
[0060] The bus 210 may be configured to transmit information between various components of the electronic device 200 (e.g., the processor 202, the memory 204, the network module 206, and the peripheral interface 208), such as an internal bus (e.g., a processor-memory bus), an external bus (USB port, PCI-E bus), etc.
[0061] It should be noted that, although the architecture of the electronic device 200 only shows the processor 202, the memory 204, the network module 206, the peripheral interface 208 and the bus 210, in the specific implementation process, the architecture of the electronic device 200 may also include other components necessary for normal execution. In addition, it can be understood by those skilled in the art that the architecture of the electronic device 200 may also only include the components necessary for implementing the embodiments of the present disclosure, and does not necessarily include all the components shown in the figure.
[0062] Privacy computing provides a feasible technical solution to fully explore the value of data and promote data circulation under the premise of security and compliance. Privacy computing technology realizes the "available but invisible" data fusion, improves the level of data security and privacy protection, protects the privacy rights and interests of users, and realizes the effective sharing and application of data. Federated learning is a technical classification of privacy computing. It can complete collaborative training by circulating and processing the intermediate encrypted data without the data leaving the local area, so as to achieve "knowledge sharing without data sharing" and achieve the effect of jointly training the model. Federated learning model training is based on the basic machine learning algorithm, and a new federated learning algorithm is formed after DSL combination. Each participant conducts joint training locally on the basis of the basic model, without leaking sample data. Only encrypted gradient parameters are exchanged in the middle. After the model parameters are updated and distributed, it is iteratively trained until the model converges, and each party saves their own model.
[0063] The accuracy of the models in the existing digital data processing process is not high. For example, when the model is trained using federated learning, the privacy computing federated learning platform mostly uses built-in algorithms in the model training process. The basic algorithms are relatively few and relatively fixed, which limits the accuracy of the algorithm. There are also fewer adjustable parameters in the model training process, which are relatively rigid, resulting in more restrictions in the training process of the federated learning model, and the process of model training parameter tuning lacks flexibility. Therefore, how to improve the flexibility of parameter tuning in the data processing of the federated learning model has become a technical problem that needs to be solved urgently.
[0064] In view of this, the embodiments of the present disclosure provide a data processing method and related equipment based on a federated learning model. The algorithm design can be flexibly customized according to the application scenario to improve the accuracy and precision of the model algorithm. In addition, the algorithm parameters that can be adjusted during the model training process are set to simplify the parameter page of the training task parameters, increase the page readability, lower the entry threshold for model training personnel, and promote model tuning to achieve the model training expectations as soon as possible.
[0065] See also Figure 3 , Figure 3 A schematic flow chart of a data processing method based on a federated learning model according to an embodiment of the present disclosure is shown. The data processing method based on a federated learning model according to an embodiment of the present disclosure can be deployed on a server side. Figure 3 In the data processing method 300 based on the federated learning model, the data processing method 300 may further include the following steps.
[0066] In step S310, in response to receiving a data processing request from a first initiator, the data processing request is sent to a first participant indicated by the data processing request.
[0067] Among them, the first initiator may refer to the party that initially makes the data processing request, such as an entity that needs to perform a certain data processing task (such as model prediction, etc.). The data processing request may refer to a request sent by the initiator to other participants, requiring the other party to perform a specific data processing task. The first participant may refer to the other party participating in the data processing task in the federated learning framework, which can be any one of the multiple participants. When the first initiator needs to perform a data processing task, it will send a data processing request to the system. In response to receiving this request, the system will forward the request to the designated first participant. This process ensures that data processing tasks can be effectively allocated to participants, while avoiding direct data sharing and protecting the data privacy of all parties.
[0068] In step S320, first intermediate data from the first initiator and second intermediate data from the first participant are received, wherein the first intermediate data is obtained based on first input data and a first local model provided by the first initiator, and the second intermediate data is obtained based on second input data and a second local model provided by the first participant.
[0069] Among them, the first input data and the second input data may refer to the input data for data processing provided by the first initiator and the first participant. For example, the data processing request may be to predict the power consumption of the target area specified in the future period of time. Both the first input data and the second input data may include at least one of the target area, the target time period, weather data, the number of users and the power usage rules. The target area may refer to the geographical area for which the power consumption is to be predicted, such as a city or community. Weather data may refer to weather information related to the target area, such as temperature, humidity, wind speed, etc. The number of users may be the total number of users participating in power consumption in the target area. Power usage rules may include rules such as electricity price policies, power usage restrictions or incentives. The target time period may refer to the time period for which power consumption needs to be predicted, which may be a day, a week, or a month in the future. For example, the predicted power consumption of area X in the future time period T can be predicted, and weather data (such as the average temperature, humidity, wind speed and other meteorological conditions of area X in the future time period T), the number of users (such as the total number of household and commercial users in area X), and power usage rules (such as the power price policy, power saving measures, etc. of area X) may be collected. Then, the corresponding prediction data can be obtained based on these input data and the federated learning model. The prediction of the federated learning model can be participated by multiple parties. Both the initiator and the participants can provide sample data to participate in the prediction. When the model predicts, each party can provide prediction samples, and the prediction is made through the local local model. The parties exchange intermediate calculation parameters, and finally the initiator obtains the prediction result.
[0070] In some embodiments, the first local model and the second local model are obtained based on the global model, including:
[0071] In step S321, a model training task and a corresponding model configuration file are received from a second initiator; wherein the model training task and the model configuration file are generated at the second initiator based on a target algorithm and participant information determined by the second initiator.
[0072] Among them, the second initiator may refer to a party that participates in federated learning and initiates a specific training task, for example, an entity that has data and hopes to use the data of other participants to improve the model. The second participant may refer to another entity that collaborates with the second initiator in the federated learning framework, which usually also has relevant data and is willing to participate in joint training. The second initiator selects a target algorithm (such as a deep neural network) from the candidate algorithms and determines the first training sample for training. At the same time, the second initiator can also determine the second participant participating in the training and the second training sample provided by it. This process ensures the joint use of data from multiple parties to jointly train a more powerful credit risk assessment model while protecting the data privacy of all parties.
[0073] It should be understood that the first initiator, the second initiator, the first participant, and the second participant are merely entities with different roles in different data processing stages, and are not intended to limit them. For example, the first initiator and the second initiator may be the same or different; similarly, the first participant and the second participant may be the same or different; further, the first initiator may also be the second participant, and the second initiator may also be the first participant, without any limitation herein.
[0074] In some embodiments, receiving a model training task and a corresponding model configuration file from a second initiator; wherein the model training task and the model configuration file are generated at the second initiator by a target algorithm and participant information determined by the second initiator, comprises:
[0075] In step S3211, at the second initiator, a target algorithm is selected from candidate algorithms, and a first training sample of the second initiator participating in the training, a second participant, and a second training sample provided by the second participant are determined; wherein the candidate algorithm is generated based on a combination of operator components.
[0076] Among them, the first training sample and the second training sample may refer to the training data provided by the second initiator and the second participant for participating in the model training. For example, it may include historical regions based on historical time, historical weather data, historical number of users and historical electricity consumption rules, and the corresponding historical electricity consumption. Operator components may be the basic units that constitute the algorithm, and may include different functions such as data processing, feature extraction, model training, and prediction. Each operator component defines specific functions and can usually be run and tested independently. Specifically, a series of operator components can be defined, which are the basis for algorithm construction. Each component can be regarded as a function or module that receives input and produces output. For example, in a machine learning scenario, operator components may include data preprocessing, feature engineering, model training, model evaluation, etc. Designing candidate algorithms using different combinations of operator components can be done by manual design or automatic search. For example, different feature combinations, model types, hyperparameter settings, etc. can be considered. Users can select the target algorithm from the existing candidate algorithms as needed.
[0077] In some embodiments, the candidate algorithm is generated based on a combination of operator components, including:
[0078] Displaying at least one operator component on the operator interface of the second initiator;
[0079] Setting corresponding operator attributes and operator parameters for the selected operator component;
[0080] Performing a combination operation on the selected operator components to generate a combination of the operator components having a contextual relationship;
[0081] generating the initial algorithm based on the operator attributes, the operator parameters and the operator component combination;
[0082] Verify the integrity of the initial algorithm and the rationality of the data flow;
[0083] In response to the initial algorithm passing the verification, the initial algorithm is determined as the candidate algorithm.
[0084] Among them, the initial algorithm can be evaluated and determined as a candidate algorithm after passing the evaluation. This usually involves the process of training and verification, and the use of appropriate indicators to measure the performance of the algorithm. The evaluation indicators can be selected according to the specific application scenario, such as accuracy, recall rate, F1 score, etc. in classification tasks. Specifically, the operator interface allows users to drag operator components to the workspace. These operator components may include data reading, data cleaning, feature extraction, model training, etc. For the selected operator component, its properties and parameters can be configured. Properties refer to the basic configuration of the operator, while parameters refer to the adjustable options of the operator. These operator components can be connected to form an operator component combination, and the output of the operator component is used as the input of the next operator component to obtain the initial algorithm, so that the operator components can be executed in a predetermined order. After the initial algorithm is generated, it can be checked whether the algorithm meets all necessary conditions, such as: all necessary operators are correctly configured and connected, the data flow is reasonable, that is, the output type of each component is compatible with the input type of the next component, and the logic of the algorithm is correct. Once the initial algorithm passes the verification, it is determined as a candidate algorithm.
[0085] In some embodiments, setting corresponding operator attributes for the selected operator component includes:
[0086] Set the operator name of the operator component;
[0087] Determine whether the operator component of the current node is a preset operator type;
[0088] In response to the operator component of the current node being the preset operator type, setting output data of the operator component of the current node to obtain operator properties of the operator component;
[0089] In response to the operator component of the current node not being the preset operator type, the input data and output data, as well as the input model and the output model of the previous operator component are set for the previous node to obtain the operator properties of the operator component.
[0090] Among them, the preset operator type may refer to a Reader operator (or a read-only operator), which is used to read data. Specifically, a corresponding identifier, such as a name or ID, may be set for each operator component for easy identification and management. Next, it may be determined whether the current operator component belongs to the preset operator type. If it is a Reader operator, its output data may be set directly; if it is not a Reader operator, it may be traced back to the previous operator component and its input data and output data, input model, and output model may be set. In this way, an algorithm flow consisting of operator components may be gradually constructed, and it may be ensured that the properties of each operator component are correctly set, thereby forming a complete algorithm workflow.
[0091] In some embodiments, setting corresponding operator parameters for the selected operator component includes:
[0092] Set the operator parameters to the corresponding parameter default values;
[0093] Set the parameter type of the operator parameter to the default type;
[0094] Set whether the operator parameters are adjustable;
[0095] Set whether the operator parameters are associated with sample features.
[0096] Specifically, see Figure 4 , Figure 4 A schematic diagram showing the principles of a custom algorithm according to an embodiment of the present disclosure is shown. Figure 4 In the custom algorithm, the basic operator components are used as the basis. The algorithm DSL (domain-specific programming language) is constructed by dragging and dropping the canvas. Operators and their contextual relationships are defined on the canvas, and the processing and flow of data and models between operators are intuitively seen. According to the data and model flow requirements of the algorithm business scenario, according to the operator type, select the appropriate operator and drag the operator into the canvas. Then connect the operator and define the operator contextual relationship, that is, the upper and lower nodes of the operator. Then define the basic information of the operator, such as the name of the operator in the algorithm, input data, output data, input model, output model, etc. After selecting the operator, you can define the operator parameters. The basic operator provides a wealth of parameters. Check the parameters and types required in this algorithm and set the default values. This parameter will appear in the training task configuration file. At the same time, check the parameters that can be configured and modified on the model training page to meet the needs of model tuning; at the same time, define the basic information of the algorithm: algorithm type, name and other basic information. Algorithm verification, verify the basic verification such as algorithm integrity and data flow rationality. Save the algorithm, specifically including saving the basic information of the algorithm and algorithm parameter information.
[0097] In step S3212, a model training task is generated based on the target algorithm, the participant information of the second participant and the second training sample.
[0098] Among them, the participant information may refer to relevant information about the objects participating in the model training, including but not limited to the identification, location, available resources, etc. of the participants. Each participant has its own data set or training samples. Based on the above information, the specific parameters of the model training task can be defined, such as the number of training rounds, batch size, learning rate, etc. For the model training task, the above information can be integrated into a task configuration file, which contains all the necessary information for the training task. It may also be necessary to define some specific rules, such as how to handle abnormal situations during training and how to evaluate model performance. Tasks can be reasonably allocated to different participants based on the information and resources of the participants.
[0099] In step S3213, the algorithm parameters are initialized for the model training task.
[0100] Among them, the initialization of algorithm parameters determines the starting point of model training. Good parameter initialization can help the model converge to the optimal solution faster and improve the performance of the final model.
[0101] In some embodiments, initializing algorithm parameters for the model training task includes:
[0102] Obtaining algorithm parameters of the target algorithm in the model training task;
[0103] The algorithm parameters are traversed, and the algorithm parameters are initialized based on the configuration type of the algorithm parameters.
[0104] Among them, the algorithm parameter list of the target algorithm can be obtained, and the algorithm parameter list can include algorithm parameters such as weight matrix, bias vector, etc. Specifically, these parameters can be obtained through the interface API provided by the programming framework. Each algorithm parameter in the algorithm parameter list is traversed and initialized based on the configuration type of each algorithm parameter.
[0105] In some embodiments, initializing the algorithm parameters based on the configuration type of the algorithm parameters includes:
[0106] If the configuration type of the algorithm parameter includes a common type, adding a common type algorithm parameter, and initializing the common type algorithm parameter to a first default value;
[0107] If the configuration type of the algorithm parameter includes a guest type, adding a guest type algorithm parameter, and initializing the guest type algorithm parameter to a second default value;
[0108] If the configuration type of the algorithm parameter includes a host type, a common type algorithm parameter is added, and the host type algorithm parameter is initialized to a third default value;
[0109] Wherein, when the guest type algorithm parameter and / or the host type algorithm parameter is a preset operator type parameter, the guest type algorithm parameter and / or the host type algorithm is set according to the matching sample.
[0110] Matching samples may refer to matching different corresponding samples to each operator in a multi-sample algorithm. Figure 5 , Figure 5 A schematic diagram showing data processing of a model according to an embodiment of the present disclosure is shown. Figure 5 In the process, the model training task creation is initialized, the model training task parameters are adjusted, the task configuration file is generated, and the model training task is submitted. Specifically, initializing the model training task parameters may include: after the federated learning model training invitation is ready, creating federated learning, selecting the algorithm to be used in federated learning, and the sample data set provided by each participant. When creating a training task in federated learning, based on the determined information of each participant, the sample information of each participant, and the selected algorithm, this information and other initial default values of the algorithm parameters are automatically written into the training parameter list of the current model training task during the initialization process, thereby simplifying the operation process, reducing the workload of model training operators, and reducing the possibility of errors in the configuration of training parameters by model training operators, such as Figure 6 As shown, Figure 6A schematic diagram of the sub-process of initializing algorithm parameters according to an embodiment of the present disclosure is shown. Common type may refer to algorithm parameters that are common to all participants (whether guest or host). These parameters are shared among all participants and are applicable to all participants. Guest type may refer to algorithm parameters that are only applicable to the guest. The guest is usually the party that initiates joint training and owns the final model. Host type may refer to algorithm parameters that are only applicable to the host. The host provides some data and computing resources but does not own the final model. Specifically, if the configuration type of the algorithm parameter includes common type, common type algorithm parameters can be added and initialized to default values. If the configuration type of the algorithm parameter includes guest type, guest type algorithm parameters can be added and initialized to default values. If the configuration type of the algorithm parameter includes host type, host type algorithm parameters can be added and initialized to default values. If the guest type and / or host type algorithm parameters belong to preset operator type parameters (such as Reader operator parameters or read-only operator parameters), these algorithm parameters can be set according to matching samples. If the guest type and / or host type algorithm parameters do not belong to the preset operator type parameters, they can be set to the corresponding default values. After the algorithm parameters are initialized, the initialization parameter list that has completed the initialization setting can be saved.
[0111] In step S3214, the algorithm parameters and the parameter types of the algorithm parameters are displayed on the front-end page.
[0112] Among them, the front-end page can obtain information about algorithm parameters from the back-end, such as the parameter name, type, default value, etc., and has been displayed. In this way, users can easily view and modify parameters through the front-end page.
[0113] In some embodiments, the algorithm parameters and parameter types of the algorithm parameters are displayed on the front-end page, including:
[0114] Display the algorithm parameters and corresponding default values on the front-end page;
[0115] Determine whether the algorithm parameters are writable;
[0116] If the algorithm parameters are not writable, the algorithm parameters are displayed as read-only on the front-end page;
[0117] If the algorithm parameter is writable, determining whether the algorithm parameter is a drop-down type;
[0118] If the algorithm parameter is a drop-down type, initialize the corresponding drop-down list;
[0119] If the algorithm parameter is not of a pull-down type, a verification method is set based on the algorithm parameter.
[0120] Among them, when displaying algorithm parameters and their default values on the front-end page, you can decide how to display and process these parameters according to the writability and type of the algorithm parameters. For example, use tables, lists, or other UI elements on the front-end page to display these parameters and their default values. Determine whether the user is allowed to edit the parameter based on the writability information. If the parameter is not writable, it is displayed as a read-only type on the front-end page, and the user cannot edit the value of these parameters. If the parameter is a drop-down type, you need to get the options of the drop-down list from the back-end. You can create a drop-down menu on the front-end page and fill in these options. If the parameter is not a drop-down type, you need to set a validation method for the parameter. These validation methods are used to ensure that the values entered by the user meet the expected format and range. In this way, a friendly and powerful interface can be provided to users, allowing them to easily configure algorithm parameters and ensure that the values of these parameters meet expectations.
[0121] In step S3215, the algorithm parameters are configured to obtain corresponding configuration parameters, and corresponding model configuration files are generated based on the configuration parameters.
[0122] Among them, a link to download the configuration file is provided or the content of the configuration file is directly displayed. The values of the algorithm parameters entered by the user can be obtained from the front end to ensure that all required parameters are filled in and all parameters have passed the corresponding verification. The configuration file is dynamically generated according to the collected parameters, which can be in JSON, YAML or XML format. The generated configuration file can be saved to the server or local file system. Specifically, a button can be added to the front-end page to trigger the generation of the configuration file and display status information. Add JavaScript code to handle the button click event, collect parameters and send them to the back end. On the back end, a view function can be written to receive the data sent from the front end, generate the configuration file, and return the download link for the user to download.
[0123] In some embodiments, configuring the algorithm parameters to obtain corresponding configuration parameters, and generating corresponding model configuration files based on the configuration parameters, includes:
[0124] Configuring the algorithm parameters based on user input operations to obtain corresponding configuration parameters;
[0125] The model configuration file is generated based on the data exchange format and the configuration parameters.
[0126] Among them, the front-end page displays the training parameters that need to be displayed according to the algorithm definition, and displays them according to the types of participants, and displays the Chinese and English names of the parameters. Since the algorithm definition process has already screened the adjustable parameters for training, the node type, ID, sample name, namespace, and label information of each party are initialized during the training task initialization process, which greatly reduces the complexity of the model parameter adjustment page. The page is highly readable, the adjustable parameters are clearly classified, the value range is clear, and the model parameter adjustment is very friendly, thereby realizing the model training task parameter adjustment. Specifically, after the algorithm parameter configuration is completed and saved, the back-end generates a training task configuration file through Json technology based on information such as the type of the parameter, and it can be previewed and displayed on the front-end page.
[0127] In step S322, the model training task and the model configuration file are sent to the second participant, so that model training is performed at the second participant based on the second training sample provided by the second participant to obtain second model training parameters of the second participant.
[0128] Specifically, submitting a model training task may include: submitting the model training task to a federated learning node according to a configuration file, and starting a modeling process of federated learning model training.
[0129] In step S323, the first model training parameters from the second initiator and the second model training parameters from the second participant are received; the first model training parameters are obtained by performing model training at the second initiator based on the first training samples.
[0130] The first model training parameters can be obtained by the second initiator after model training based on its local first training sample, and the second model training parameters can be obtained by the second participant after model training based on its local second training sample. These parameters can be aggregated and then aggregated to generate global model parameters. This enables all parties to collaboratively train the model without sharing the original data, thereby protecting data privacy, and by integrating the data advantages of multiple parties, improving the accuracy and generalization ability of the model.
[0131] In step S324, the first model training parameters and the second model training parameters are fused to obtain global model parameters of the global model.
[0132] Specifically, the training results of the participants can be aggregated to obtain the final trained global model and complete the model training task. In the process of federated learning, the model training task is first distributed to each participant (i.e., federated learning node) based on the pre-defined model configuration file. Each participant starts to perform model training based on the received task configuration and its own local data set, and generates its own training results. Next, under the premise of ensuring data privacy and security, the training results of all participants are aggregated, and these intermediate results are continuously integrated in an iterative manner to finally obtain a trained global model, thereby completing the entire federated learning model training task.
[0133] See also Figure 7 , Figure 7 FIG. 1 is a schematic diagram of a data processing system based on a federated learning model according to an embodiment of the present disclosure. Figure 7 As shown in the figure, the technical architecture of the model training system follows the platform infrastructure and adopts a layered technical architecture design pattern. The front-end components use the Vue+Element UI application framework. The back-end services as a whole follow the Springboot microservice architecture development model, apply SpringCloud components, and use microservice development. Services use rest to call service interfaces. The registration center and configuration center use nacos middleware, and the web server uses nginx proxy. The data storage uses mysql database to store structured data, and the software is deployed through docker+k8s containers. The technical routes of each node are consistent and independently deployed, and the nodes interact with each other through http interfaces.
[0134] In step S325, the global model parameters are sent to the second initiator and the second participant to update the model parameters of the second initiator and the second participant to obtain the first local model and the second local model.
[0135] Among them, the actions of selecting algorithms, configuring parameters, submitting training and prediction according to the embodiments of the present disclosure can be completed by the second initiator. After submitting the training, each party uses the training samples provided by each party to train the model locally, and the parties exchange intermediate calculation parameters. After the training is completed, each party saves its own local model.
[0136] In step S330, the first intermediate data and the second intermediate data are fused based on a global model to obtain global result data.
[0137] Among them, the parties performing data processing (such as the first initiator and the second participant) can use their own local data to train models without sharing the original data, and can also fuse the prediction results of their own local models (rather than the original data) to obtain the final prediction results. For example, the predicted electricity consumption of the target area in the target time period. The fusion algorithm can comprehensively consider all prediction results, including the weights, confidence and other factors of each participant, to obtain a more accurate prediction of the electricity consumption of the target area in the target time period. Through federated learning, each participant can contribute their own prediction capabilities while protecting data privacy, which not only enhances the robustness and generalization ability of the prediction model, but also ensures the security and compliance of the data.
[0138] In step S340, the global result data is returned to the first initiator to obtain the target result of the data processing request.
[0139] The aggregated and processed global result data is returned to the first initiator so that the first initiator can obtain the target result of its data processing request. This process not only ensures the security and privacy protection of the data, but also improves the accuracy and generalization ability of the model through multi-party collaboration, so that the first initiator can obtain higher quality target results.
[0140] It can be seen that the method according to the embodiment of the present disclosure is to propose a technology suitable for the federated learning modeling process on a data privacy computing platform based on federated learning technology to enable different data holders to jointly conduct model training and prediction under the premise of ensuring that the data does not leave the local area. The technology initially presets a rich set of data processing, machine learning and federated learning basic operator components. Algorithm designers can freely combine operator components according to the scenario to form a custom algorithm DSL to build an algorithm suitable for application modeling in this business scenario; and define the default values of operator parameters in the current algorithm on the algorithm design page, configure some parameters displayed on the model training parameter adjustment page and parameters that can be used for allocation and tuning, which greatly reduces the complexity of parameter allocation for model training tasks, makes the page concise and readable, greatly reduces the difficulty of model training, lowers the entry threshold for model trainers, and improves the efficiency of model training.
[0141] It should be noted that the method of the embodiment of the present disclosure can be performed by a single device, such as a computer or a server. The method of the present embodiment can also be applied in a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present disclosure, and the multiple devices will interact with each other to complete the described method.
[0142] It should be noted that the above describes some embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0143] Based on the same technical concept, corresponding to any of the above-mentioned embodiments and methods, the present disclosure also provides a data processing device based on a federated learning model, see Figure 8 , the data processing device based on the federated learning model includes:
[0144] a request module, configured to, in response to receiving a data processing request from a first initiator, send the data processing request to a first participant indicated by the data processing request;
[0145] a receiving module, configured to receive first intermediate data from the first initiator and second intermediate data from the first participant, wherein the first intermediate data is obtained based on first input data and a first local model provided by the first initiator, and the second intermediate data is obtained based on second input data and a second local model provided by the first participant;
[0146] A fusion module, used for fusing the first intermediate data and the second intermediate data based on a global model to obtain global result data;
[0147] A response module, used for returning the global result data to the first initiator to obtain a target result of the data processing request;
[0148] The first local model and the second local model are obtained based on the global model, including:
[0149] Receiving a model training task and a corresponding model configuration file from a second initiator; wherein the model training task and the model configuration file are generated at the second initiator by a target algorithm and participant information determined by the second initiator, including:
[0150] At the second initiator, a target algorithm is selected from candidate algorithms, and a first training sample of the second initiator participating in the training, a second participant, and a second training sample provided by the second participant are determined; wherein the candidate algorithm is generated based on a combination of operator components;
[0151] Generate a model training task based on the target algorithm, the participant information of the second participant, and the second training sample;
[0152] Initializing algorithm parameters for the model training task;
[0153] Displaying the algorithm parameters and parameter types of the algorithm parameters on the front-end page;
[0154] Configuring the algorithm parameters to obtain corresponding configuration parameters, and generating corresponding model configuration files based on the configuration parameters;
[0155] Sending the model training task and the model configuration file to the second participant, so as to perform model training at the second participant based on the second training sample provided by the second participant, and obtain second model training parameters of the second participant;
[0156] Receiving a first model training parameter from the second initiator and a second model training parameter from the second participant; the first model training parameter is obtained by performing model training based on the first training sample at the second initiator;
[0157] Fusing the first model training parameters and the second model training parameters to obtain global model parameters of the global model;
[0158] The global model parameters are sent to the second initiator and the second participant to update the model parameters of the second initiator and the second participant to obtain the first local model and the second local model.
[0159] In some embodiments, the present disclosure also provides a data processing device based on a federated learning model, which can be deployed at a second initiator, including:
[0160] An algorithm selection module, used to select a target algorithm from candidate algorithms, and determine the first training sample of the second initiator participating in the training, the second participant, and the second training sample provided by the second participant; wherein the candidate algorithm is generated based on the combination of operator components;
[0161] A task generation module, used to generate a model training task based on the target algorithm, the participant information of the second participant and the second training sample;
[0162] An initialization module, used to initialize algorithm parameters for the model training task;
[0163] A display module, used to display the algorithm parameters and parameter types of the algorithm parameters on the front-end page;
[0164] The configuration module is used to configure the algorithm parameters to obtain corresponding configuration parameters, and generate corresponding model configuration files based on the configuration parameters.
[0165] In some embodiments, the data processing device at the second initiator may further include:
[0166] A model training module is used to perform model training based on the second training sample provided by the second participant to obtain the second model training parameters of the second participant.
[0167] In some embodiments, the data processing device at the second initiator may further include:
[0168] A parameter receiving module, used for receiving global model parameters;
[0169] A parameter updating module is used to update the model parameters of the second initiator based on the global model parameters to obtain the first local model.
[0170] For the convenience of description, the above device is described by dividing it into various modules according to its functions. Of course, when implementing the present disclosure, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0171] The device of the above embodiment is used to implement the corresponding data processing method based on the federated learning model in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0172] Based on the same technical concept, corresponding to any of the above-mentioned embodiment methods, the present disclosure also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the data processing method based on the federated learning model as described in any of the above embodiments.
[0173] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0174] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the data processing method based on the federated learning model as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0175] It should be understood by those skilled in the art that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present disclosure (including the claims) is limited to these examples; based on the concept of the present disclosure, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of different aspects of the embodiments of the present disclosure as described above, which are not provided in detail for the sake of simplicity.
[0176] In addition, to simplify the description and discussion, and in order not to obscure the embodiments of the present disclosure, known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided figures. In addition, devices may be shown in the form of block diagrams to avoid obscuring the embodiments of the present disclosure, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform on which the embodiments of the present disclosure are to be implemented (i.e., these details should be fully within the scope of understanding of those skilled in the art). Where specific details (e.g., circuits) are set forth to describe exemplary embodiments of the present disclosure, it is apparent to those skilled in the art that the embodiments of the present disclosure may be implemented without these specific details or with variations in these specific details. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0177] Although the present disclosure has been described in conjunction with specific embodiments of the present disclosure, many alternatives, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the discussed embodiments.
[0178] The embodiments of the present disclosure are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present disclosure should be included in the scope of protection of the present disclosure.
Claims
1. A data processing method based on a federated learning model, comprising: In response to receiving a data processing request from a first initiator, sending the data processing request to a first participant indicated by the data processing request; Receiving first intermediate data from the first initiator and second intermediate data from the first participant, wherein the first intermediate data is obtained based on first input data and a first local model provided by the first initiator, and the second intermediate data is obtained based on second input data and a second local model provided by the first participant; Based on a global model, the first intermediate data and the second intermediate data are merged to obtain global result data; Returning the global result data to the first initiator to obtain a target result regarding the data processing request; The first local model and the second local model are obtained based on the global model, including: Receiving a model training task and a corresponding model configuration file from a second initiator; wherein the model training task and the model configuration file are generated at the second initiator by a target algorithm and participant information determined by the second initiator, including: At the second initiator, a target algorithm is selected from the candidate algorithms, and a first training sample of the second initiator participating in the training, a second participant, and a second training sample provided by the second participant are determined; wherein the candidate algorithm is generated based on a combination of operator components, and the operator component is a module that defines a specific function; Generate a model training task based on the target algorithm, the participant information of the second participant, and the second training sample; Initializing the algorithm parameters for the model training task, including: obtaining the algorithm parameters of the target algorithm in the model training task; traversing the algorithm parameters, and initializing the algorithm parameters based on the configuration type of the algorithm parameters, including: if the configuration type of the algorithm parameters includes a common type, adding a common type algorithm parameter, and initializing the common type algorithm parameter to a first default value; if the configuration type of the algorithm parameters includes a guest type, adding a guest type algorithm parameter, and initializing the guest type algorithm parameter to a second default value; if the configuration type of the algorithm parameters includes a host type, adding a host type algorithm parameter, and initializing the host type algorithm parameter to a third default value; wherein, when the guest type algorithm parameter or the host type algorithm parameter is a preset operator type parameter, the guest type algorithm parameter or the host type algorithm is set according to the corresponding matching sample; Displaying the algorithm parameters and parameter types of the algorithm parameters on the front-end page; Configuring the algorithm parameters to obtain corresponding configuration parameters, and generating corresponding model configuration files based on the configuration parameters; Sending the model training task and the model configuration file to the second participant, so as to perform model training at the second participant based on the second training sample provided by the second participant, and obtain second model training parameters of the second participant; Receiving a first model training parameter from the second initiator and a second model training parameter from the second participant; the first model training parameter is obtained by performing model training based on the first training sample at the second initiator; Fusing the first model training parameters and the second model training parameters to obtain global model parameters of the global model; Sending the global model parameters to the second initiator and the second participant to update the model parameters of the second initiator and the second participant to obtain the first local model and the second local model; The candidate algorithms are generated based on the combination of operator components, including: Displaying at least one operator component on the operator interface of the second initiator; Setting corresponding operator attributes and operator parameters for the selected operator component includes: Set the operator name of the operator component; Determine whether the operator component of the current node is a preset operator type; In response to the operator component of the current node being the preset operator type, setting output data of the operator component of the current node to obtain operator properties of the operator component; In response to the operator component of the current node not being the preset operator type, setting input data and output data, as well as an input model and an output model of a previous operator component for a previous node to obtain operator properties of the operator component; as well as, Set the operator parameters to the corresponding parameter default values; Set the parameter type of the operator parameter to the default type; Set whether the operator parameters are adjustable; Set whether the operator parameters are associated with sample features; Performing a combination operation on the selected operator components to generate a combination of the operator components having a contextual relationship; generating an initial algorithm based on the operator attributes, the operator parameters and the operator component combination; Verify the integrity of the initial algorithm and the rationality of the data flow; In response to the initial algorithm passing the verification, the initial algorithm is determined as the candidate algorithm.
2. The method according to claim 1, wherein: The algorithm parameters and parameter types of the algorithm parameters are displayed on the front-end page, including: Display the algorithm parameters and corresponding default values on the front-end page; Determine whether the algorithm parameters are writable; If the algorithm parameters are not writable, the algorithm parameters are displayed as read-only on the front-end page; If the algorithm parameter is writable, determining whether the algorithm parameter is a drop-down type; If the algorithm parameter is a drop-down type, initialize the corresponding drop-down list; If the algorithm parameter is not of a pull-down type, a verification method is set based on the algorithm parameter.
3. The method according to claim 1, wherein: Configuring the algorithm parameters to obtain corresponding configuration parameters, and generating corresponding model configuration files based on the configuration parameters, including: Configuring the algorithm parameters based on user input operations to obtain corresponding configuration parameters; The model configuration file is generated based on the data exchange format and the configuration parameters.
4. A data processing device based on a federated learning model, comprising: a request module, configured to, in response to receiving a data processing request from a first initiator, send the data processing request to a first participant indicated by the data processing request; a receiving module, configured to receive first intermediate data from the first initiator and second intermediate data from the first participant, wherein the first intermediate data is obtained based on first input data and a first local model provided by the first initiator, and the second intermediate data is obtained based on second input data and a second local model provided by the first participant; A fusion module, used for fusing the first intermediate data and the second intermediate data based on a global model to obtain global result data; A response module, used for returning the global result data to the first initiator to obtain a target result of the data processing request; The first local model and the second local model are obtained based on the global model, including: Receiving a model training task and a corresponding model configuration file from a second initiator; wherein the model training task and the model configuration file are generated at the second initiator by a target algorithm and participant information determined by the second initiator, including: At the second initiator, a target algorithm is selected from the candidate algorithms, and a first training sample of the second initiator participating in the training, a second participant, and a second training sample provided by the second participant are determined; wherein the candidate algorithm is generated based on a combination of operator components, and the operator component is a module that defines a specific function; Generate a model training task based on the target algorithm, the participant information of the second participant, and the second training sample; Initializing the algorithm parameters for the model training task, including: obtaining the algorithm parameters of the target algorithm in the model training task; traversing the algorithm parameters, and initializing the algorithm parameters based on the configuration type of the algorithm parameters, including: if the configuration type of the algorithm parameters includes a common type, adding a common type algorithm parameter, and initializing the common type algorithm parameter to a first default value; if the configuration type of the algorithm parameters includes a guest type, adding a guest type algorithm parameter, and initializing the guest type algorithm parameter to a second default value; if the configuration type of the algorithm parameters includes a host type, adding a host type algorithm parameter, and initializing the host type algorithm parameter to a third default value; wherein, when the guest type algorithm parameter or the host type algorithm parameter is a preset operator type parameter, the guest type algorithm parameter or the host type algorithm is set according to the corresponding matching sample; Displaying the algorithm parameters and parameter types of the algorithm parameters on the front-end page; Configuring the algorithm parameters to obtain corresponding configuration parameters, and generating corresponding model configuration files based on the configuration parameters; Sending the model training task and the model configuration file to the second participant, so as to perform model training at the second participant based on the second training sample provided by the second participant, and obtain second model training parameters of the second participant; Receiving a first model training parameter from the second initiator and a second model training parameter from the second participant; the first model training parameter is obtained by performing model training based on the first training sample at the second initiator; Fusing the first model training parameters and the second model training parameters to obtain global model parameters of the global model; Sending the global model parameters to the second initiator and the second participant to update the model parameters of the second initiator and the second participant to obtain the first local model and the second local model; The candidate algorithms are generated based on the combination of operator components, including: Displaying at least one operator component on the operator interface of the second initiator; Setting corresponding operator attributes and operator parameters for the selected operator component includes: Set the operator name of the operator component; Determine whether the operator component of the current node is a preset operator type; In response to the operator component of the current node being the preset operator type, setting output data of the operator component of the current node to obtain operator properties of the operator component; In response to the operator component of the current node not being the preset operator type, setting input data and output data, as well as an input model and an output model of a previous operator component for a previous node to obtain operator properties of the operator component; as well as, Set the operator parameters to the corresponding parameter default values; Set the parameter type of the operator parameter to the default type; Set whether the operator parameters are adjustable; Set whether the operator parameters are associated with sample features; Performing a combination operation on the selected operator components to generate a combination of the operator components having a contextual relationship; generating an initial algorithm based on the operator attributes, the operator parameters and the operator component combination; Verify the integrity of the initial algorithm and the rationality of the data flow; In response to the initial algorithm passing the verification, the initial algorithm is determined as the candidate algorithm.
5. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 3 when executing the program. 6 . A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the method according to claim 1 .
