WO2021114616A1 - 联邦学习模型训练方法及相关设备 - Google Patents
联邦学习模型训练方法及相关设备 Download PDFInfo
- Publication number
- WO2021114616A1 WO2021114616A1 PCT/CN2020/098884 CN2020098884W WO2021114616A1 WO 2021114616 A1 WO2021114616 A1 WO 2021114616A1 CN 2020098884 W CN2020098884 W CN 2020098884W WO 2021114616 A1 WO2021114616 A1 WO 2021114616A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- sample
- preset
- identification information
- distributed system
- target
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/602—Providing cryptographic facilities or services
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N20/00—Machine learning
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/084—Backpropagation, e.g. using gradient descent
Definitions
- This application relates to the field of artificial intelligence technology, in particular to a training method, device, computer equipment, and computer-readable storage medium for a federated learning model.
- the first aspect of the present application provides a federated learning model training method.
- the federated learning model training method is applied to a first distributed system.
- the federated learning model training method includes:
- Bin the first sample data according to the preset bin binning rule and the first identification information to obtain a plurality of first sample bins
- a second aspect of the present application provides a federated learning model training device, the federated learning model training device runs in a first distributed system, and the federated learning model training device includes:
- the obtaining module is used to obtain the preset binning rules and the preset encryption method from the second distributed system;
- An encryption module configured to encrypt the identification information of the first sample data of the first distributed system according to the preset encryption method to obtain the first identification information
- the binning module is configured to bin the first sample data according to the preset bin binning rule and the first identification information to obtain a plurality of first sample bins;
- the first adding module is configured to add the plurality of first sample boxes to the matching task queue
- a matching module configured to control multiple first computing units in the first distributed system to match multiple target first sample boxes from the matching task queue according to the first identification information
- the second adding module is used to add the multiple target first sample boxes to the training task queue
- the processing module is used to call the multiple first computing units and multiple second computing units in the second distributed system to jointly process the training tasks in the training task queue to obtain the first sample of each target The federated learning model corresponding to the box.
- a third aspect of the present application provides a computer device.
- a plurality of the computer devices form a first distributed system, wherein each computer device includes a processor for executing computer-readable instructions stored in a memory to Implement the following steps:
- Bin the first sample data according to the preset bin binning rule and the first identification information to obtain a plurality of first sample bins
- the first distributed system is a data requester
- the second distributed system is a data provider
- the data requester needs to work with the data provider for federated learning.
- a fourth aspect of the present application provides a computer-readable storage medium having computer-readable instructions stored on the computer-readable storage medium, and when the computer-readable instructions are executed by a processor, the following steps are implemented:
- Bin the first sample data according to the preset bin binning rule and the first identification information to obtain a plurality of first sample bins
- This application uses multiple computing units of a distributed system to perform asynchronous processing of matching tasks and training tasks to be processed, avoiding the pressure on computing resources of the tasks to be processed at a unit time point, while improving fault tolerance, and improving the efficiency of training federated learning models. .
- Fig. 1 is a flowchart of a federated learning model training method provided by an embodiment of the present application.
- Fig. 2 is a structural diagram of a federated learning model training device provided by an embodiment of the present application.
- Fig. 3 is a schematic diagram of a computer device provided by an embodiment of the present application.
- the federated learning model training method of the present application is applied to one or more computer devices.
- the computer device is a device that can automatically perform numerical calculation and/or information processing in accordance with pre-set or stored instructions. Its hardware includes, but is not limited to, a microprocessor and an application specific integrated circuit (ASIC) , Programmable Gate Array (Field-Programmable Gate Array, FPGA), Digital Processor (Digital Signal Processor, DSP), embedded equipment, etc.
- ASIC application specific integrated circuit
- FPGA Field-Programmable Gate Array
- DSP Digital Processor
- embedded equipment etc.
- This application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, multi-processor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, small computers, large computers, including Distributed computing environment for any of the above systems or equipment, etc.
- This application may be described in the general context of computer-executable instructions executed by a computer, such as a program module.
- program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types.
- This application can also be practiced in distributed computing environments. In these distributed computing environments, tasks are performed by remote processing devices connected through a communication network.
- program modules can be located in local and remote computer storage media including storage devices.
- the computer device may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server.
- the computer device can interact with the user through a keyboard, a mouse, a remote control, a touch panel, or a voice control device.
- FIG. 1 is a flowchart of a training method for a federated learning model provided in Embodiment 1 of the present application.
- the training method of the federated learning model is applied to a first distributed system, and the first distributed system is composed of a plurality of computer devices for training the federated learning model.
- the federated learning model training method specifically includes the following steps. According to different requirements, the order of the steps in the flowchart can be changed, and some of the steps can be omitted.
- the first distributed system may be a data requester
- the second distributed system may be a data provider.
- the data requester needs to cooperate with the data provider for federated learning, and does not need to obtain data from the data provider.
- the data requester is an insurance company
- the data provider is a financial company
- the insurance company needs to conduct federated learning with the financial company without obtaining the data of the financial company to obtain a scoring model for scoring customers' reliability.
- the second distributed system is composed of a plurality of computer devices.
- the first distributed system may use the preset binning rule to bin the sample data.
- the preset bin sorting rule includes: sorting the sample data into different sample bins according to the numerical range or the divisor result.
- the second distributed system also uses the preset bin binning rule to bin sample data, so that the same sample data in the two systems are sorted into corresponding sample bins.
- the preset encryption method may be a uniform encryption algorithm that cannot be traced back.
- the preset encryption method may be a hash encryption method, a symmetric encryption method, and an asymmetric encryption method.
- the preset encryption method may be used to encrypt identification information of sample data or communication data between the first distributed system and the second distributed system.
- the preset encryption method may prevent the first distributed system and the second distributed system from acquiring the plaintext data of each other.
- the first distributed system and the second distributed system use the same preset encryption method, when the identification information of the sample data in the first distributed system is the same as the sample data in the second distributed system When the identification information is the same, the two encrypted identification information are also the same.
- the first sample data may include basic information and some characteristic data of multiple users, and the first identification information may be an encrypted user's ID card number or mobile phone number.
- the first sample data in an insurance company includes 3 pieces of sample data, namely ⁇ User 1’s identification information, age, insurance feature data ⁇ , ⁇ User 2’s identification information, age, insurance feature data ⁇ , ⁇ User 3
- the identification information, age, insurance characteristic data ⁇ can be encrypted according to a hash algorithm (preset encryption method).
- the federated learning model training method before the first sample data is binned according to the preset bin binning rule and the first identification information, the federated learning model training method further includes:
- Preprocessing such as data cleaning, format conversion, feature engineering, etc. is performed on the first sample data.
- Preprocessing such as data obfuscation and data encoding can also be performed on the first sample data.
- the binning the first sample data according to the preset bin binning rule and the first identification information includes:
- Bin the first sample data according to the remainder corresponding to the first identification information to obtain a plurality of first sample bins
- the first sample box whose first sample quantity is greater than the preset quantity threshold is uniformly divided to obtain a plurality of sub-boxes.
- first identification information are respectively divided by 6 (preset divisor) to obtain the remainder of each first identification information.
- the binning the first sample data according to the preset bin binning rule and the first identification information includes:
- the first sample box whose first sample quantity is greater than the preset quantity threshold is uniformly divided to obtain a plurality of sub-boxes.
- the 5 preset value ranges correspond to 5 The first sample box.
- the last digit of each first identification information (such as decimal 0-9) is intercepted to obtain the intercepted value of each first identification information.
- the intercepted value 0 and 1 belong to the value range 0-1 (corresponding to the first sample box), and the intercepted value 2, 3 belongs to The value range is 2-3 (corresponding to the second first sample box), the intercepted values 4 and 5 belong to the value range 4-5 (corresponding to the third first sample box), and the intercepted values 6, 7 belong to the value
- the range is 6-7 (corresponding to the 4th first sample box), and the intercepted values 8 and 9 belong to the value range 8-9 (corresponding to the 5th first sample box).
- sample data that needs to be calculated is allocated reasonably by binning. It can be understood that the sample data is divided into multiple tasks in a balanced manner, which is then handed over to different computing units for processing. Reduce the amount of traversal calculation and access pressure.
- Each first sample box can be packaged as a matching task to be processed, and multiple matching tasks can be added to the matching task queue.
- the computing units in the idle state in the first distributed system may sequentially read and process the matching tasks in the matching task queue, so as to achieve the purpose of asynchronously processing the matching tasks and improve processing efficiency.
- a plurality of first computing units required to perform tasks can be obtained from the first distributed system.
- the plurality of first calculation units are configured. In order to ensure the consistency and ease of operation of the configuration, you can use docker to pull the image from the preset code warehouse.
- controlling the plurality of first computing units in the first distributed system to match a plurality of target first sample boxes from the matching task queue according to the first identification information includes :
- a first computing unit is controlled to read a matching task in the matching task queue, and obtain the first sample box in the matching task;
- the sample data except the multiple target sample data in the first sample box is deleted to obtain the target first sample box.
- the first sample box includes a plurality of sub-boxes
- the first calculation unit is controlled to match the first sample box that is consistent with the second identification information from the first sample box.
- the sample data corresponding to the identification information includes:
- the first calculation unit is controlled to match the sample data corresponding to the first identification information that is consistent with the second identification information from the multiple sub-boxes of the first sample box to obtain multiple target sample data. Dividing the first sample box into multiple sub-boxes can reduce the demand for high operating resources of the first computing unit in a short time. Avoid stalls or downtime, thereby improving computing efficiency.
- controlling the first computing unit to obtain the second identification information associated with the first sample box from the second distributed system includes:
- Control the first calculation unit to obtain the second sample box associated with the first sample box from the associated second calculation unit through the communication channel, and obtain the first sample box from the associated second sample box Second identification information of the second sample data.
- the plurality of first sample boxes are associated with the plurality of second sample boxes in the second distributed system one by one, and the two calculation units processing the two associated sample boxes are associated one by one.
- the first sample box A is associated with the second sample box B
- the first calculation unit a processes the first sample box A
- the second calculation unit b processes the second sample box B
- the first calculation unit a and the second calculation unit b Association are associated with the first sample box A and the second calculation unit b Association.
- a first computing unit in the first distributed system is associated with a second computing unit in the second distributed system one by one, and two sample boxes processed by the two computing units are also associated one by one.
- the second distributed system encrypts the identification information of the second sample data of the second distributed system according to the preset encryption method to obtain the second identification information.
- the second distributed system bins the second sample data according to the preset bin binning rule to obtain multiple second sample bins.
- controlling the plurality of first computing units in the first distributed system to match a plurality of target first sample boxes from the matching task queue according to the first identification information includes :
- the multiple first calculation units are used to process the matching tasks in the matching task queue in batches according to the first identification information.
- the first sample box of each target can be packaged as a training task to be processed, and each training task can be added to the training task queue.
- the computing units in the idle state in the first distributed system may sequentially read and process the training tasks in the training task queue, so as to achieve the purpose of asynchronously processing the training tasks and improve processing efficiency.
- adding the multiple target first sample boxes to a training task queue includes:
- the target first sample bins whose second sample quantity is less than the preset first sample quantity threshold are merged, and the merged first sample bin is merged. Adding the sample box to the training task queue;
- the preset second sample quantity threshold is greater than the preset first sample quantity threshold, and the second sample quantity of the combined target first sample bin is less than or equal to the preset second sample quantity Threshold, and greater than or equal to the preset first sample number threshold, and the second sample number of the split first sample bin is less than or equal to the preset second sample number threshold and greater than or equal to the The first sample number threshold is preset.
- the invoking the multiple first computing units and the multiple second computing units in the second distributed system to jointly process the training tasks in the training task queue includes:
- a first computing unit is controlled to read a training task in the training task queue, and the target first sample box in the training task is acquired, which is the first computing unit and the second distributed system Establishing a communication channel by a second computing unit associated with the first computing unit in;
- the federated learning model is a neural network model (artificial intelligence model), and the first computing unit is controlled to be associated with the second computing unit through the communication channel based on the target first
- the federated learning model of the same box joint training includes:
- Controlling the first calculation unit to take the target first sample box as input, and calculate the first intermediate output through the initialized first neural network sub-model;
- Control the first calculation unit to take the second intermediate output as input, calculate the final output through the first neural network sub-model, and optimize the output based on the final output and the label corresponding to the final output through the backpropagation algorithm. State the parameters of the first neural network sub-model;
- the first calculation unit is controlled to calculate the intermediate error through the backpropagation algorithm, and the intermediate error is transmitted to the associated second calculation unit through the communication channel, so that the associated second calculation unit is based on the intermediate
- the error and the second intermediate output optimize the parameters of the second neural network sub-model through a backpropagation algorithm
- the first computing unit and the associated second computing unit perform encrypted communication through the communication channel. Encrypt the data transmitted by the first computing unit and the associated second computing unit through the communication channel by using the preset encryption method.
- the federated learning model may be a tree model.
- the invoking the multiple first computing units and the multiple second computing units in the second distributed system to jointly process the training tasks in the training task queue includes:
- the multiple first computing units and the multiple second computing units of the second distributed system are used to jointly process all of the training task queues Training task
- the multiple first computing units and the multiple second computing units of the second distributed system are combined to process the training task queues in batches. Training tasks.
- the federated learning model training method of the first embodiment uses multiple computing units of a distributed system to perform asynchronous processing of matching tasks and training tasks to be processed, so as to avoid the pressure on computing resources of the tasks to be processed at a unit time point, and at the same time improve fault tolerance and improve Improve the efficiency of training federated learning model.
- the federated learning model training method further includes:
- the first computing units in the multiple idle states are dynamically allocated to the allocation task queue and the training task queue, so that the first computing units in the multiple idle states process the allocation tasks in the allocation task queue and /Or the training task in the training task queue.
- the dynamically allocating the multiple idle state first computing units to the allocating task queue and the training task queue includes:
- the plurality of first computing units in idle states are allocated to the allocated task queue and the training task queue in equal proportions.
- the federated learning model training method further includes:
- Heartbeat detection is performed on the plurality of first computing units, and the first computing unit that stops the heartbeat is detected; and a reminder message for the first computing unit that stops the heartbeat is sent to the user.
- Fig. 2 is a structural diagram of a training device for a federated learning model provided in the second embodiment of the present application.
- the federated learning model training device 20 is applied to a first distributed system, and the first distributed system is composed of multiple computer devices.
- the federated learning model training device 20 is used to train a federated learning model.
- the federated learning model training device 20 may include an acquisition module 201, an encryption module 202, a binning module 203, a first joining module 204, a matching module 205, a second joining module 206, and a processing module 207.
- the obtaining module 201 is configured to obtain preset binning rules and preset encryption methods from the second distributed system.
- the first distributed system may be a data requester
- the second distributed system may be a data provider.
- the data requester needs to cooperate with the data provider for federated learning, and does not need to obtain data from the data provider.
- the data requester is an insurance company
- the data provider is a financial company
- the insurance company needs to conduct federated learning with the financial company without obtaining the data of the financial company to obtain a scoring model for scoring customers' reliability.
- the first distributed system may use the preset binning rule to bin the sample data.
- the preset bin sorting rule includes: sorting the sample data into different sample bins according to the numerical range or the divisor result.
- the second distributed system also uses the preset bin binning rule to bin sample data, so that the same sample data in the two systems are sorted into corresponding sample bins.
- the preset encryption method may be a uniform encryption algorithm that cannot be traced back.
- the preset encryption method may be a hash encryption method, a symmetric encryption method, and an asymmetric encryption method.
- the preset encryption method may be used to encrypt identification information of sample data or communication data between the first distributed system and the second distributed system.
- the preset encryption method may prevent the first distributed system and the second distributed system from acquiring the plaintext data of each other.
- the first distributed system and the second distributed system use the same preset encryption method, when the identification information of the sample data in the first distributed system is the same as the sample data in the second distributed system When the identification information is the same, the two encrypted identification information are also the same.
- the encryption module 202 is configured to encrypt the identification information of the first sample data of the first distributed system according to the preset encryption method to obtain the first identification information.
- the first sample data may include basic information and some characteristic data of multiple users, and the first identification information may be an encrypted user's ID card number or mobile phone number.
- the first sample data in an insurance company includes 3 pieces of sample data, namely ⁇ User 1’s identification information, age, insurance feature data ⁇ , ⁇ User 2’s identification information, age, insurance feature data ⁇ , ⁇ User 3
- the identification information, age, insurance characteristic data ⁇ can be encrypted according to a hash algorithm (preset encryption method).
- the binning module 203 is configured to bin the first sample data according to the preset bin binning rule and the first identification information to obtain multiple first sample bins.
- the federated learning model training device further includes a pre-processing module, which is used to classify the first sample data according to the preset bin classification rules and the first identification information. Before binning, preprocessing such as data cleaning, format conversion, feature engineering, etc., is performed on the first sample data.
- Preprocessing such as data obfuscation and data encoding can also be performed on the first sample data.
- the binning the first sample data according to the preset bin binning rule and the first identification information includes:
- Bin the first sample data according to the remainder corresponding to the first identification information to obtain a plurality of first sample bins
- the first sample box whose first sample quantity is greater than the preset quantity threshold is uniformly divided to obtain a plurality of sub-boxes.
- first identification information are respectively divided by 6 (preset divisor) to obtain the remainder of each first identification information.
- the binning the first sample data according to the preset bin binning rule and the first identification information includes:
- the first sample box whose first sample quantity is greater than the preset quantity threshold is uniformly divided to obtain a plurality of sub-boxes.
- the 5 preset value ranges correspond to 5 The first sample box.
- the last digit of each first identification information (such as decimal 0-9) is intercepted to obtain the intercepted value of each first identification information.
- the intercepted value 0 and 1 belong to the value range 0-1 (corresponding to the first sample box), and the intercepted value 2, 3 belongs to The value range is 2-3 (corresponding to the second first sample box), the intercepted value 4 and 5 belong to the value range 4-5 (corresponding to the third first sample box), and the intercepted value 6, 7 belongs to the value
- the range is 6-7 (corresponding to the 4th first sample box), and the intercepted values 8 and 9 belong to the value range 8-9 (corresponding to the 5th first sample box).
- sample data that needs to be calculated is allocated reasonably by binning. It can be understood that the sample data is divided into multiple tasks in a balanced manner, which is then handed over to different computing units for processing. Reduce the amount of traversal calculation and access pressure.
- the first adding module 204 is configured to add the plurality of first sample boxes to the matching task queue.
- Each first sample box can be packaged as a matching task to be processed, and multiple matching tasks can be added to the matching task queue.
- the computing units in the idle state in the first distributed system may sequentially read and process the matching tasks in the matching task queue, so as to achieve the purpose of asynchronously processing the matching tasks and improve processing efficiency.
- the matching module 205 is configured to control multiple first computing units in the first distributed system to match multiple target first sample boxes from the matching task queue according to the first identification information.
- a plurality of first computing units required to perform tasks can be obtained from the first distributed system.
- the plurality of first calculation units are configured. In order to ensure the consistency and ease of operation of the configuration, you can use docker to pull the image from the preset code warehouse.
- controlling the plurality of first computing units in the first distributed system to match a plurality of target first sample boxes from the matching task queue according to the first identification information includes :
- a first computing unit is controlled to read a matching task in the matching task queue, and obtain the first sample box in the matching task;
- the sample data except the multiple target sample data in the first sample box is deleted to obtain the target first sample box.
- the first sample box includes a plurality of sub-boxes
- the first calculation unit is controlled to match the first sample box that is consistent with the second identification information from the first sample box.
- the sample data corresponding to the identification information includes:
- the first calculation unit is controlled to match the sample data corresponding to the first identification information that is consistent with the second identification information from the multiple sub-boxes of the first sample box to obtain multiple target sample data. Dividing the first sample box into multiple sub-boxes can reduce the demand for high operating resources of the first computing unit in a short time. Avoid stalls or downtime, thereby improving computing efficiency.
- controlling the first computing unit to obtain the second identification information associated with the first sample box from the second distributed system includes:
- Control the first calculation unit to obtain the second sample box associated with the first sample box from the associated second calculation unit through the communication channel, and obtain the first sample box from the associated second sample box Second identification information of the second sample data.
- the plurality of first sample boxes are associated with the plurality of second sample boxes in the second distributed system one by one, and the two calculation units processing the two associated sample boxes are associated one by one.
- the first sample box A is associated with the second sample box B
- the first calculation unit a processes the first sample box A
- the second calculation unit b processes the second sample box B
- the first calculation unit a and the second calculation unit b Association are associated with the first sample box A and the second calculation unit b Association.
- a first computing unit in the first distributed system is associated with a second computing unit in the second distributed system one by one, and two sample boxes processed by the two computing units are also associated one by one.
- the second distributed system encrypts the identification information of the second sample data of the second distributed system according to the preset encryption method to obtain the second identification information.
- the second distributed system bins the second sample data according to the preset bin binning rule to obtain multiple second sample bins.
- controlling the plurality of first computing units in the first distributed system to match a plurality of target first sample boxes from the matching task queue according to the first identification information includes :
- the multiple first calculation units are used to process the matching tasks in the matching task queue in batches according to the first identification information.
- the second adding module 206 is configured to add the multiple target first sample boxes to the training task queue.
- the first sample box of each target can be packaged as a training task to be processed, and each training task can be added to the training task queue.
- the computing units in the idle state in the first distributed system may sequentially read and process the training tasks in the training task queue, so as to achieve the purpose of asynchronously processing the training tasks and improve processing efficiency.
- adding the multiple target first sample boxes to a training task queue includes:
- the target first sample bins whose second sample quantity is less than the preset first sample quantity threshold are merged, and the merged first sample bin is merged. Adding the sample box to the training task queue;
- the preset second sample quantity threshold is greater than the preset first sample quantity threshold, and the second sample quantity of the combined target first sample bin is less than or equal to the preset second sample quantity Threshold, and greater than or equal to the preset first sample number threshold, and the second sample number of the split first sample bin is less than or equal to the preset second sample number threshold and greater than or equal to the The first sample number threshold is preset.
- the processing module 207 is configured to call the plurality of first computing units and the plurality of second computing units in the second distributed system to jointly process the training tasks in the training task queue to obtain each target first.
- the invoking the multiple first computing units and the multiple second computing units in the second distributed system to jointly process the training tasks in the training task queue includes:
- a first computing unit is controlled to read a training task in the training task queue, and the target first sample box in the training task is acquired, which is the first computing unit and the second distributed system Establishing a communication channel by a second computing unit associated with the first computing unit in;
- the federated learning model is a neural network model (artificial intelligence model), and the first computing unit is controlled to be associated with the second computing unit through the communication channel based on the target first
- the federated learning model of the same box joint training includes:
- Controlling the first calculation unit to take the target first sample box as input, and calculate the first intermediate output through the initialized first neural network sub-model;
- Control the first calculation unit to take the second intermediate output as input, calculate the final output through the first neural network sub-model, and optimize the output based on the final output and the label corresponding to the final output through the backpropagation algorithm. State the parameters of the first neural network sub-model;
- the first calculation unit is controlled to calculate the intermediate error through the backpropagation algorithm, and the intermediate error is transmitted to the associated second calculation unit through the communication channel, so that the associated second calculation unit is based on the intermediate
- the error and the second intermediate output optimize the parameters of the second neural network sub-model through a backpropagation algorithm
- the first computing unit and the associated second computing unit perform encrypted communication through the communication channel. Encrypt the data transmitted by the first computing unit and the associated second computing unit through the communication channel by using the preset encryption method.
- the federated learning model may be a tree model.
- the invoking the multiple first computing units and the multiple second computing units in the second distributed system to jointly process the training tasks in the training task queue includes:
- the multiple first computing units and the multiple second computing units of the second distributed system are used to jointly process all of the training task queues Training task
- the multiple first computing units and the multiple second computing units of the second distributed system are combined to process the training task queues in batches. Training tasks.
- the federated learning model training device 20 of the second embodiment uses a plurality of computing units of a distributed system to perform asynchronous processing on the matching tasks and training tasks to be processed, so as to avoid the pressure on computing resources of the tasks to be processed at a unit time point, and at the same time improve fault tolerance, Improve the efficiency of training federated learning models.
- the processing module is further configured to obtain a plurality of first computing units in idle states from the first distributed system; dynamically allocate the first computing units in the plurality of idle states to the The allocation task queue and the training task queue enable the first computing units in the multiple idle states to process the allocation tasks in the allocation task queue and/or the training tasks in the training task queue.
- the dynamically allocating the multiple idle state first computing units to the allocating task queue and the training task queue includes:
- the plurality of first computing units in idle states are allocated to the allocated task queue and the training task queue in equal proportions.
- the federated learning model training device 20 further includes a sending module, configured to perform heartbeat detection on the multiple first computing units, and detect the first computing unit that stops the heartbeat; The reminder message of the first computing unit of the heartbeat is given to the user.
- This embodiment provides a computer-readable storage medium having computer-readable instructions stored thereon.
- the computer-readable storage medium may be non-volatile or volatile.
- the steps in the embodiment of the training method for the federated learning model are implemented, for example, steps 101-107 shown in FIG. 1:
- each module in the above-mentioned device embodiment is realized, for example, the modules 201-207 in Fig. 2:
- the obtaining module 201 is used to obtain the preset binning rules and the preset encryption method from the second distributed system;
- the encryption module 202 is configured to encrypt the identification information of the first sample data of the first distributed system according to the preset encryption method to obtain the first identification information;
- the binning module 203 is configured to bin the first sample data according to the preset bin binning rules and the first identification information to obtain multiple first sample bins;
- the first adding module 204 is configured to add the plurality of first sample boxes to the matching task queue
- the matching module 205 is configured to control multiple first computing units in the first distributed system to match multiple target first sample boxes from the matching task queue according to the first identification information;
- the second adding module 206 is configured to add the multiple target first sample boxes to the training task queue
- the processing module 207 is configured to call the plurality of first computing units and the plurality of second computing units in the second distributed system to jointly process the training tasks in the training task queue to obtain each target first.
- FIG. 3 is a schematic diagram of the computer equipment provided in the fourth embodiment of the application.
- the computer device 30 includes a memory 301, a processor 302, and computer-readable instructions 303 stored in the memory 301 and running on the processor 302, such as a federated learning model training program.
- the processor 302 executes the computer-readable instruction 303, the steps in the embodiment of the training method for the federated learning model are implemented, for example, steps 101-107 shown in Fig. 1:
- each module in the above-mentioned device embodiment is realized, for example, the modules 201-207 in Fig. 2:
- the obtaining module 201 is used to obtain the preset binning rules and the preset encryption method from the second distributed system;
- the encryption module 202 is configured to encrypt the identification information of the first sample data of the first distributed system according to the preset encryption method to obtain the first identification information;
- the binning module 203 is configured to bin the first sample data according to the preset bin binning rules and the first identification information to obtain multiple first sample bins;
- the first adding module 204 is configured to add the plurality of first sample boxes to the matching task queue
- the matching module 205 is configured to control multiple first computing units in the first distributed system to match multiple target first sample boxes from the matching task queue according to the first identification information;
- the second adding module 206 is configured to add the multiple target first sample boxes to the training task queue
- the processing module 207 is configured to call the plurality of first computing units and the plurality of second computing units in the second distributed system to jointly process the training tasks in the training task queue to obtain each target first.
- the computer-readable instruction 303 may be divided into one or more modules, and the one or more modules are stored in the memory 301 and executed by the processor 302 to complete the method.
- the one or more modules may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer readable instruction 303 in the computer device 30.
- the computer readable instruction 303 can be divided into the acquisition module 201, the encryption module 202, the binning module 203, the first joining module 204, the matching module 205, the second joining module 206, and the processing module 207 in FIG. 2. Refer to the second embodiment for the specific functions of each module.
- the computer device 30 may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server.
- a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server.
- the schematic diagram 3 is only an example of the computer device 30, and does not constitute a limitation on the computer device 30. It may include more or less components than those shown in the figure, or combine certain components, or different components.
- the computer device 30 may also include input and output devices, network access devices, buses, and so on.
- the so-called processor 302 may be a central processing unit (Central Processing Unit, CPU), other general processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
- the general-purpose processor can be a microprocessor or the processor 302 can also be any conventional processor, etc.
- the processor 302 is the control center of the computer device 30, which uses various interfaces and lines to connect the entire computer device 30. Various parts.
- the memory 301 may be used to store the computer-readable instructions 303, and the processor 302 executes or executes the computer-readable instructions or modules stored in the memory 301 and calls the data stored in the memory 301 to implement Various functions of the computer device 30.
- the memory 301 may mainly include a storage program area and a storage data area, where the storage program area may store an operating system, an application program required by at least one function (such as a sound playback function, an image playback function, etc.); the storage data area may Data and the like created in accordance with the use of the computer device 30 are stored.
- the memory 301 may include a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a Secure Digital (SD) card, a flash memory card (Flash Card), at least one disk storage device, flash memory Devices, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), or other non-volatile/volatile storage devices.
- the integrated module of the computer device 30 may be stored in a computer-readable storage medium.
- the computer-readable storage medium may be non-volatile or volatile. Based on this understanding, this application implements all or part of the processes in the above-mentioned embodiments and methods, and can also be completed by instructing relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium.
- the computer-readable instruction when executed by the processor, it can implement the steps of the foregoing method embodiments.
- the computer-readable instructions may be in the form of source code, object code, executable file, or some intermediate forms, etc.
- the computer-readable storage medium may include: any entity or device capable of carrying the computer-readable instructions, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, read only memory (ROM), random access memory ( RAM).
- modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
- the functional modules in the various embodiments of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module.
- the above-mentioned integrated modules can be implemented in the form of hardware, or in the form of hardware plus software functional modules.
- the above-mentioned integrated modules implemented in the form of software functional modules may be stored in a computer-readable storage medium.
- the above-mentioned software function module is stored in a storage medium and includes several instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor execute the federated learning described in each embodiment of this application. Part of the model training method.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Mathematical Physics (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- General Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- Biophysics (AREA)
- Molecular Biology (AREA)
- Computational Linguistics (AREA)
- Biomedical Technology (AREA)
- Life Sciences & Earth Sciences (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Medical Informatics (AREA)
- Bioethics (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- Storage Device Security (AREA)
- Complex Calculations (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
一种联邦学习模型训练方法及相关设备,涉及人工智能。所述联邦学习模型训练方法包括:从第二分布式系统获取预设分箱规则、预设加密方法(101);根据预设加密方法对第一分布式系统的第一样本数据的标识信息进行加密,得到第一标识信息(102);根据预设分箱规则和第一标识信息对第一样本数据进行分箱,得到多个第一样本箱(103);将所述多个第一样本箱加入匹配任务队列(104);控制第一分布式系统中的多个第一计算单元根据第一标识信息从匹配任务队列中匹配出多个目标第一样本箱(105);将多个目标第一样本箱加入训练任务队列(106);调用多个第一计算单元和第二分布式系统中的多个第二计算单元联合处理训练任务队列中的训练任务,得到每个目标第一样本箱对应的联邦学习模型(107)。提升了训练联邦学习模型的效率。
Description
本申请要求于2020年05月14日提交中国专利局,申请号为202010409022.9申请名称为“联邦学习模型训练方法及相关设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及人工智能技术领域,具体涉及一种联邦学习模型训练方法、装置、计算机设备及计算机可读存储介质。
随着人工智能技术的发展,通过联合不同的参与者(participant,或者party,也称为数据拥有者(data owner)、或者客户(client))进行机器学习建模成为发展趋势,即联邦学习。
在联邦学习中,发明人意识到目前训练联邦学习模型的效率较低。如何提升训练联邦学习模型的效率,成为亟待解决的技术问题。
发明内容
鉴于以上内容,有必要提出一种联邦学习模型训练方法、装置、计算机设备及计算机可读存储介质,其可以提高训练联邦学习模型的效率。
本申请的第一方面提供一种联邦学习模型训练方法,所述联邦学习模型训练方法应用于第一分布式系统中,所述联邦学习模型训练方法包括:
从第二分布式系统获取预设分箱规则、预设加密方法;
根据所述预设加密方法对所述第一分布式系统的第一样本数据的标识信息进行加密,得到第一标识信息;
根据所述预设分箱规则和所述第一标识信息对所述第一样本数据进行分箱,得到多个第一样本箱;
将所述多个第一样本箱加入匹配任务队列;
控制所述第一分布式系统中的多个第一计算单元根据所述第一标识信息从所述匹配任务队列中匹配出多个目标第一样本箱;
将所述多个目标第一样本箱加入训练任务队列;
调用所述多个第一计算单元和所述第二分布式系统中的多个第二计算单元联合处理所述训练任务队列中的训练任务,得到每个目标第一样本箱对应的联邦学习模型。
本申请的第二方面提供一种联邦学习模型训练装置,所述联邦学习模型训练装置运行于第一分布式系统中,所述联邦学习模型训练装置包括:
获取模块,用于从第二分布式系统获取预设分箱规则、预设加密方法;
加密模块,用于根据所述预设加密方法对所述第一分布式系统的第一样本数据的标识信息进行加密,得到第一标识信息;
分箱模块,用于根据所述预设分箱规则和所述第一标识信息对所述第一样本数据进行分箱,得到多个第一样本箱;
第一加入模块,用于将所述多个第一样本箱加入匹配任务队列;
匹配模块,用于控制所述第一分布式系统中的多个第一计算单元根据所述第一标识信息从所述匹配任务队列中匹配出多个目标第一样本箱;
第二加入模块,用于将所述多个目标第一样本箱加入训练任务队列;
处理模块,用于调用所述多个第一计算单元和所述第二分布式系统中的多个第二计算单元联合处理所述训练任务队列中的训练任务,得到每个目标第一样本箱对应的联邦学习模型。
本申请的第三方面提供一种计算机设备,多个所述计算机设备组成第一分布式系统,其中,每个计算机设备包括处理器,所述处理器用于执行存储器中存储的计算机可读指令以实现以下步骤:
从第二分布式系统获取预设分箱规则、预设加密方法;
根据所述预设加密方法对所述第一分布式系统的第一样本数据的标识信息进行加密,得到第一标识信息;
根据所述预设分箱规则和所述第一标识信息对所述第一样本数据进行分箱,得到多个第一样本箱;
将所述多个第一样本箱加入匹配任务队列;
控制所述第一分布式系统中的多个第一计算单元根据所述第一标识信息从所述匹配任务队列中匹配出多个目标第一样本箱;
将所述多个目标第一样本箱加入训练任务队列;
调用所述多个第一计算单元和所述第二分布式系统中的多个第二计算单元联合处理所述训练任务队列中的训练任务,得到每个目标第一样本箱对应的联邦学习模型;
所述第一分布式系统是数据请求方,所述第二分布式系统是数据提供方,数据请求方需要联合数据提供方进行联邦学习。
本申请的第四方面提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机可读指令,所述计算机可读指令被处理器执行时实现以下步骤:
从第二分布式系统获取预设分箱规则、预设加密方法;
根据所述预设加密方法对第一分布式系统的第一样本数据的标识信息进行加密,得到第一标识信息;
根据所述预设分箱规则和所述第一标识信息对所述第一样本数据进行分箱,得到多个第一样本箱;
将所述多个第一样本箱加入匹配任务队列;
控制所述第一分布式系统中的多个第一计算单元根据所述第一标识信息从所述匹配任务队列中匹配出多个目标第一样本箱;
将所述多个目标第一样本箱加入训练任务队列;
调用所述多个第一计算单元和所述第二分布式系统中的多个第二计算单元联合处理所述训练任务队列中的训练任务,得到每个目标第一样本箱对应的联邦学习模型。
本申请通过分布式系统的多个计算单元对待处理匹配任务和训练任务进行异步处理,避免待处理任务在单位时间点对计算资源的需求压力,同时提高容错性,提升了训练联邦学习模型的效率。
图1是本申请实施例提供的联邦学习模型训练方法的流程图。
图2是本申请实施例提供的联邦学习模型训练装置的结构图。
图3是本申请实施例提供的计算机设备的示意图。
为了能够更清楚地理解本申请的上述目的、特征和优点,下面结合附图和具体实施例对本申请进行详细描述。需要说明的是,在不冲突的情况下,本申请的实施例及实施例中的特征可以相互组合。
在下面的描述中阐述了很多具体细节以便于充分理解本申请,所描述的实施例仅仅 是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中在本申请的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本申请。
优选地,本申请的联邦学习模型训练方法应用在一个或者多个计算机设备中。所述计算机设备是一种能够按照事先设定或存储的指令,自动进行数值计算和/或信息处理的设备,其硬件包括但不限于微处理器、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程门阵列(Field-Programmable Gate Array,FPGA)、数字处理器(Digital Signal Processor,DSP)、嵌入式设备等。
本申请可用于众多通用或专用的计算机系统环境或配置中。例如:个人计算机、服务器计算机、手持设备或便携式设备、平板型设备、多处理器系统、基于微处理器的系统、置顶盒、可编程的消费电子设备、网络PC、小型计算机、大型计算机、包括以上任何系统或设备的分布式计算环境等等。本申请可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本申请,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。
所述计算机设备可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。所述计算机设备可以与用户通过键盘、鼠标、遥控器、触摸板或声控设备等方式进行人机交互。
实施例一
图1是本申请实施例一提供的联邦学习模型训练方法的流程图。所述联邦学习模型训练方法应用于第一分布式系统中,所述第一分布式系统由多个计算机设备构成,用于训练联邦学习模型。
所述联邦学习模型训练方法具体包括以下步骤,根据不同的需求,该流程图中步骤的顺序可以改变,某些可以省略。
101,从第二分布式系统获取预设分箱规则、预设加密方法。
所述第一分布式系统可以是数据请求方,所述第二分布式系统可以是数据提供方,数据请求方需要联合数据提供方进行联邦学习,并不需要获取数据提供方的数据。例如,数据请求方为保险公司,数据提供方为金融公司;保险公司需要在不获取金融公司的数据的情况下,与金融公司进行联邦学习,以获得对客户进行可靠性评分的评分模型。
所述第二分布式系统由多个计算机设备构成。
所述第一分布式系统可以使用所述预设分箱规则对样本数据进行分箱。所述预设分箱规则包括:根据数值范围或除数取余结果将样本数据分入不同的样本箱。所述第二分布式系统也是用所述预设分箱规则对样本数据进行分箱,使两个系统中相同的样本数据被分入相对应的样本箱。
所述预设加密方法可以是不可回溯的均匀加密算法。所述预设加密方法可以是哈希加密方法、对称加密方法、非对称加密方法。所述预设加密方法可以用于对样本数据的识别信息或所述第一分布式系统与所述第二分布式系统之间的通信数据进行加密。所述预设加密方法可以使所述第一分布式系统和所述第二分布式系统不获取对方的明文数据。所述第一分布式系统和所述第二分布式系统使用相同的预设加密方法,当所述第一分布式相同中的样本数据的标识信息与所述第二分布式系统中的样本数据的标识信息相同时, 加密后的两个标识信息也相同。
102,根据所述预设加密方法对所述第一分布式系统的第一样本数据的标识信息进行加密,得到第一标识信息。
所述第一样本数据可以包括多个用户的基本信息和一些特征数据等,所述第一标识信息可以是加密后的用户的身份证号码或手机号。
例如,保险公司中的第一样本数据包括3条样本数据,分别为{用户1的标识信息,年龄,保险特征数据}、{用户2的标识信息,年龄,保险特征数据}、{用户3的标识信息,年龄,保险特征数据}。可以根据哈希算法(预设加密方法)对每个用户的识别信息进行加密。
103,根据所述预设分箱规则和所述第一标识信息对所述第一样本数据进行分箱,得到多个第一样本箱。
在一具体实施例中,在所述根据所述预设分箱规则和所述第一标识信息对所述第一样本数据进行分箱之前,所述联邦学习模型训练方法还包括:
对所述第一样本数据进行数据清洗、格式转换、特征工程等预处理。
还可以对所述第一样本数据进行数据混淆、数据编码等预处理。
在一具体实施例中,所述根据所述预设分箱规则和所述第一标识信息对所述第一样本数据进行分箱包括:
获取所述预设分箱规则中的预设除数;
对每个所述第一标识信息与所述预设除数进行相除并获取余数;
根据所述第一标识信息对应的余数对所述第一样本数据进行分箱,得到多个第一样本箱;
判断每个第一样本箱中的第一样本数量是否大于预设数量阈值;
对第一样本数量大于所述预设数量阈值的第一样本箱进行均匀分割,得到多个子箱。
例如,用30个第一标识信息分别除以6(预设除数),得到各个第一标识信息的余数。将第一标识信息的余数为1的第一样本数据分入第1个第一样本箱;将第一标识信息的余数为2的第一样本数据分入第2个第一样本箱;将第一标识信息的余数为3的第一样本数据分入第3个第一样本箱;将第一标识信息的余数为4的第一样本数据分入第4个第一样本箱;将第一标识信息的余数为5的第一样本数据分入第5个第一样本箱;将第一标识信息的余数为0的第一样本数据分入第6个第一样本箱。如果判断第2个第一样本箱中的第一样本数量大于预设数量阈值,将第2个第一样本箱均匀分割为2个子箱(或其它数量)。
或者,所述根据所述预设分箱规则和所述第一标识信息对所述第一样本数据进行分箱包括:
获取所述预设分箱规则中的多个预设取值范围,每个预设取值范围对应一个第一样本箱;
截取每个所述第一标识信息的预设位置的数值,得到每个所述第一标识信息的截取数值;
确定所述第一标识信息的截取数值所属的目标预设取值范围;
根据所述第一标识信息的截取数值所属的目标预设取值范围,将所述第一样本数据分入目标预设取值范围对应的第一样本箱;
判断每个第一样本箱中的第一样本数量是否大于预设数量阈值;
对第一样本数量大于所述预设数量阈值的第一样本箱进行均匀分割,得到多个子箱。
例如,获取预设分箱规则中的5个预设取值范围(如0-1,2-3,4-5,6-7,8-9),5个预设取值范围分别对应5个第一样本箱。截取各个第一标识信息的最后一位数值(如十进制0-9),得到每个第一标识信息的截取数值。确定每个第一标识信息的截取数值所属的目标预设取值范围,如截取数值0、1属于取值范围0-1(对应第1个第一样本箱), 截取数值2、3属于取值范围2-3(对应第2个第一样本箱),截取数值4、5属于取值范围4-5(对应第3个第一样本箱),截取数值6、7属于取值范围6-7(对应第4个第一样本箱),截取数值8、9属于取值范围8-9(对应第5个第一样本箱)。将第一标识信息的截取数值为0的第一样本数据分入第1个第一样本箱;将第一标识信息的截取数值为1的第一样本数据分入第1个第一样本箱;将第一标识信息的截取数值为2的第一样本数据分入第2个第一样本箱;以此类推。如果判断第3个第一样本箱中的第一样本数量大于预设数量阈值,将第3个第一样本箱均匀分割为2个子箱(或其它数量)。
通过分箱对需要计算的样本数据进行合理的分配。可以理解为把样本数据均衡分块成多个任务,交给不同的计算单元进行处理。缩小了遍历的计算量和访问压力。
104,将所述多个第一样本箱加入匹配任务队列。
可以将每个第一样本箱打包为待处理的匹配任务,将多个匹配任务加入匹配任务队列。所述第一分布式系统中的处于空闲状态的计算单元可以依次读取并处理所述匹配任务队列中的匹配任务,以达到异步处理匹配任务的目的,提升处理效率。
105,控制所述第一分布式系统中的多个第一计算单元根据所述第一标识信息从所述匹配任务队列中匹配出多个目标第一样本箱。
可以从所述第一分布式系统获取执行任务需要的多个第一计算单元。对所述多个第一计算单元进行配置。为保证配置的一致性和易操作性,可以使用docker向预设代码仓库拉取镜像。
在一具体实施例中,所述控制所述第一分布式系统中的多个第一计算单元根据所述第一标识信息从所述匹配任务队列中匹配出多个目标第一样本箱包括:
每次控制一个第一计算单元读取所述匹配任务队列中的一个匹配任务,获取所述匹配任务中的第一样本箱;
控制所述第一计算单元从所述第二分布式系统中获取与所述第一样本箱关联的第二标识信息;
控制所述第一计算单元从所述第一样本箱中匹配出与所述第二标识信息一致的第一标识信息对应的样本数据,得到多个目标样本数据;
通过所述第一计算单元,删除所述第一样本箱中除所述多个目标样本数据外的样本数据,得到目标第一样本箱。
在另一实施例中,所述第一样本箱包括多个子箱,所述控制所述第一计算单元从所述第一样本箱中匹配出与所述第二标识信息一致的第一标识信息对应的样本数据包括:
控制所述第一计算单元从所述第一样本箱的多个子箱中匹配出与所述第二标识信息一致的第一标识信息对应的样本数据,得到多个目标样本数据。将第一样本箱分为多个子箱,可以减少所述第一计算单元在短时间内对高运行资源的需求。避免卡顿或宕机,从而提升计算效率。
在另一实施例中,所述控制所述第一计算单元从所述第二分布式系统中获取与所述第一样本箱关联的第二标识信息包括:
为所述第一计算单元及所述第二分布式系统中的与所述第一计算单元关联的第二计算单元建立通信通道;
控制所述第一计算单元通过所述通信通道从所述关联的第二计算单元中获取与所述第一样本箱关联的第二样本箱,从所述关联的第二样本箱中获取第二样本数据的第二标识信息。
所述多个第一样本箱与所述第二分布式系统中的多个第二样本箱一一关联,处理两个关联样本箱的两个计算单元一一关联。例如第一样本箱A与第二样本箱B关联,第一计算单元a处理第一样本箱A,第二计算单元b处理第二样本箱B,第一计算单元a与第二计算单元b关联。
所述第一分布式系统中的一个第一计算单元与所述第二分布式系统中的一个第二 计算单元一一关联,两个计算单元分别处理的两个样本箱也一一关联。
所述第二分布式系统根据所述预设加密方法对所述第二分布式系统的第二样本数据的标识信息进行加密,得到所述第二标识信息。所述第二分布式系统根据所述预设分箱规则对所述第二样本数据进行分箱,得到多个第二样本箱。
在一具体实施例中,所述控制所述第一分布式系统中的多个第一计算单元根据所述第一标识信息从所述匹配任务队列中匹配出多个目标第一样本箱包括:
获取所述多个第一计算单元的第一数量和所述匹配任务队列中的匹配任务的第二数量;
判断所述第一数量是否小于所述第二数量;
当所述第一数量大于或等于所述第二数量时,用所述多个第一计算单元根据所述第一标识信息处理所述匹配任务队列中的全部匹配任务;
当所述第一数量小于所述第二数量时,用所述多个第一计算单元根据所述第一标识信息分批处理所述匹配任务队列中的匹配任务。
106,将所述多个目标第一样本箱加入训练任务队列。
可以将各个目标第一样本箱打包为待处理的训练任务,将各个训练任务加入训练任务队列。所述第一分布式系统中的处于空闲状态的计算单元可以依次读取并处理所述训练任务队列中的训练任务,以达到异步处理训练任务的目的,提升处理效率。
在一具体实施例中,所述将所述多个目标第一样本箱加入训练任务队列包括:
获取每个目标第一样本箱中的第二样本数量;
当所述第二样本数量小于预设第一样本数量阈值时,合并第二样本数量小于所述预设第一样本数量阈值的目标第一样本箱,将所述合并后的第一样本箱加入所述训练任务队列;
当所述第二样本数量大于所述预设第二样本数量阈值时,拆分第二样本数量大于所述预设第二样本数量阈值的目标第一样本箱,将所述拆分后的第一样本箱加入所述训练任务队列;
其中,所述预设第二样本数量阈值大于所述预设第一样本数量阈值,所述合并后的目标第一样本箱的第二样本数量小于或等于所述预设第二样本数量阈值,且大于或等于所述预设第一样本数量阈值,所述拆分后的第一样本箱的第二样本数量小于或等于预设第二样本数量阈值,且大于或等于所述预设第一样本数量阈值。
107,调用所述多个第一计算单元和所述第二分布式系统中的多个第二计算单元联合处理所述训练任务队列中的训练任务,得到每个目标第一样本箱对应的联邦学习模型。
在一具体实施例中,所述调用所述多个第一计算单元和所述第二分布式系统中的多个第二计算单元联合处理所述训练任务队列中的训练任务包括:
每次控制一个第一计算单元读取所述训练任务队列中的一个训练任务,获取所述训练任务中的目标第一样本箱,为所述第一计算单元及所述第二分布式系统中的与所述第一计算单元关联的第二计算单元建立通信通道;
控制所述第一计算单元通过所述通信通道与所述关联的第二计算单元基于所述目标第一样本箱联合训练联邦学习模型,得到所述目标第一样本箱对应的联邦学习模型。
在一具体实施例中,所述联邦学习模型为神经网络模型(人工智能模型),所述控制所述第一计算单元通过所述通信通道与所述关联的第二计算单元基于所述目标第一样本箱联合训练联邦学习模型包括:
控制所述第一计算单元以所述目标第一样本箱为输入,通过初始化的第一神经网络子模型计算第一中间输出;
控制所述第一计算单元通过所述通信通道将加密后的第一中间输出传输给所述关联的第二计算单元,使所述关联的第二计算单元以所述第一中间输出为输入,通过初始化的第二神经网络子模型计算第二中间输出,将所述第二中间输出通过所述通信通道传 输给所述第一计算单元;
控制所述第一计算单元以所述第二中间输出为输入,通过所述第一神经网络子模型计算最终输出,根据所述最终输出和所述最终输出对应的标签通过反向传播算法优化所述第一神经网络子模型的参数;
控制所述第一计算单元通过反向传播算法计算中间误差,将所述中间误差通过所述通信通道传输给所述关联的第二计算单元,使所述关联的第二计算单元根据所述中间误差和所述第二中间输出通过反向传播算法优化所述第二神经网络子模型的参数;
组合所述第一神经网络子模型和所述第二神经网络子模型,得到所述联邦学习模型。
在另一实施例中,所述第一计算单元与所述关联的第二计算单元通过所述通信通道进行加密通信。用所述预设加密方法加密所述第一计算单元与所述关联的第二计算单元通过所述通信通道传输的数据。
在另一实施例中,所述联邦学习模型可以是树模型。
在一具体实施例中,所述调用所述多个第一计算单元和所述第二分布式系统中的多个第二计算单元联合处理所述训练任务队列中的训练任务包括:
获取所述多个第一计算单元的第三数量和所述训练任务队列中的训练任务的第四数量;
判断所述第三数量是否小于所述第四数量;
当所述第三数量大于或等于所述第四数量时,用所述多个第一计算单元和所述第二分布式系统的多个第二计算单元联合处理所述训练任务队列中的全部训练任务;
当所述第三数量小于所述第四数量时,用所述多个第一计算单元和所述第二分布式系统的多个第二计算单元联合,分批处理所述训练任务队列中的训练任务。
实施例一的联邦学习模型训练方法通过分布式系统的多个计算单元对待处理匹配任务和训练任务进行异步处理,避免待处理任务在单位时间点对计算资源的需求压力,同时提高容错性,提升了训练联邦学习模型的效率。
在另一实施例中,所述联邦学习模型训练方法还包括:
从所述第一分布式系统获取多个空闲状态的第一计算单元;
将所述多个空闲状态的第一计算单元动态分配给所述分配任务队列和所述训练任务队列,使所述多个空闲状态的第一计算单元处理所述分配任务队列中的分配任务和/或所述训练任务队列中的训练任务。
所述将所述多个空闲状态的第一计算单元动态分配给所述分配任务队列和所述训练任务队列包括:
获取所述分配任务队列中的分配任务数量和所述训练任务队列中的训练任务数量;
按所述分配任务数量与所述训练任务数量的比例,将所述多个空闲状态的第一计算单元等比例分配给所述分配任务队列和所述训练任务队列。
根据任务队列和计算资源分配任务,从而有效利用计算资源。
在另一实施例中,所述联邦学习模型训练方法还包括:
对所述多个第一计算单元进行心跳检测,检测出停止心跳的第一计算单元;发送对所述停止心跳的第一计算单元的提醒信息给用户。
实施例二
图2是本申请实施例二提供的联邦学习模型训练装置的结构图。所述联邦学习模型训练装置20应用于第一分布式系统中,所述第一分布式系统由多个计算机设备构成。所述联邦学习模型训练装置20用于训练联邦学习模型。
如图2所示,所述联邦学习模型训练装置20可以包括获取模块201、加密模块202、分箱模块203、第一加入模块204、匹配模块205、第二加入模块206、处理模块207。
获取模块201,用于从第二分布式系统获取预设分箱规则、预设加密方法。
所述第一分布式系统可以是数据请求方,所述第二分布式系统可以是数据提供方,数据请求方需要联合数据提供方进行联邦学习,并不需要获取数据提供方的数据。例如,数据请求方为保险公司,数据提供方为金融公司;保险公司需要在不获取金融公司的数据的情况下,与金融公司进行联邦学习,以获得对客户进行可靠性评分的评分模型。
所述第一分布式系统可以使用所述预设分箱规则对样本数据进行分箱。所述预设分箱规则包括:根据数值范围或除数取余结果将样本数据分入不同的样本箱。所述第二分布式系统也是用所述预设分箱规则对样本数据进行分箱,使两个系统中相同的样本数据被分入相对应的样本箱。
所述预设加密方法可以是不可回溯的均匀加密算法。所述预设加密方法可以是哈希加密方法、对称加密方法、非对称加密方法。所述预设加密方法可以用于对样本数据的识别信息或所述第一分布式系统与所述第二分布式系统之间的通信数据进行加密。所述预设加密方法可以使所述第一分布式系统和所述第二分布式系统不获取对方的明文数据。所述第一分布式系统和所述第二分布式系统使用相同的预设加密方法,当所述第一分布式相同中的样本数据的标识信息与所述第二分布式系统中的样本数据的标识信息相同时,加密后的两个标识信息也相同。
加密模块202,用于根据所述预设加密方法对所述第一分布式系统的第一样本数据的标识信息进行加密,得到第一标识信息。
所述第一样本数据可以包括多个用户的基本信息和一些特征数据等,所述第一标识信息可以是加密后的用户的身份证号码或手机号。
例如,保险公司中的第一样本数据包括3条样本数据,分别为{用户1的标识信息,年龄,保险特征数据}、{用户2的标识信息,年龄,保险特征数据}、{用户3的标识信息,年龄,保险特征数据}。可以根据哈希算法(预设加密方法)对每个用户的识别信息进行加密。
分箱模块203,用于根据所述预设分箱规则和所述第一标识信息对所述第一样本数据进行分箱,得到多个第一样本箱。
在一具体实施例中,所述联邦学习模型训练装置还包括预处理模块,用于在所述根据所述预设分箱规则和所述第一标识信息对所述第一样本数据进行分箱之前,对所述第一样本数据进行数据清洗、格式转换、特征工程等预处理。
还可以对所述第一样本数据进行数据混淆、数据编码等预处理。
在一具体实施例中,所述根据所述预设分箱规则和所述第一标识信息对所述第一样本数据进行分箱包括:
获取所述预设分箱规则中的预设除数;
对每个所述第一标识信息与所述预设除数进行相除并获取余数;
根据所述第一标识信息对应的余数对所述第一样本数据进行分箱,得到多个第一样本箱;
判断每个第一样本箱中的第一样本数量是否大于预设数量阈值;
对第一样本数量大于所述预设数量阈值的第一样本箱进行均匀分割,得到多个子箱。
例如,用30个第一标识信息分别除以6(预设除数),得到各个第一标识信息的余数。将第一标识信息的余数为1的第一样本数据分入第1个第一样本箱;将第一标识信息的余数为2的第一样本数据分入第2个第一样本箱;将第一标识信息的余数为3的第一样本数据分入第3个第一样本箱;将第一标识信息的余数为4的第一样本数据分入第4个第一样本箱;将第一标识信息的余数为5的第一样本数据分入第5个第一样本箱;将第一标识信息的余数为0的第一样本数据分入第6个第一样本箱。如果判断第2个第一样本箱中的第一样本数量大于预设数量阈值,将第2个第一样本箱均匀分割为2个子箱(或其它数量)。
或者,所述根据所述预设分箱规则和所述第一标识信息对所述第一样本数据进行分 箱包括:
获取所述预设分箱规则中的多个预设取值范围,每个预设取值范围对应一个第一样本箱;
截取每个所述第一标识信息的预设位置的数值,得到每个所述第一标识信息的截取数值;
确定所述第一标识信息的截取数值所属的目标预设取值范围;
根据所述第一标识信息的截取数值所属的目标预设取值范围,将所述第一样本数据分入目标预设取值范围对应的第一样本箱;
判断每个第一样本箱中的第一样本数量是否大于预设数量阈值;
对第一样本数量大于所述预设数量阈值的第一样本箱进行均匀分割,得到多个子箱。
例如,获取预设分箱规则中的5个预设取值范围(如0-1,2-3,4-5,6-7,8-9),5个预设取值范围分别对应5个第一样本箱。截取各个第一标识信息的最后一位数值(如十进制0-9),得到每个第一标识信息的截取数值。确定每个第一标识信息的截取数值所属的目标预设取值范围,如截取数值0、1属于取值范围0-1(对应第1个第一样本箱),截取数值2、3属于取值范围2-3(对应第2个第一样本箱),截取数值4、5属于取值范围4-5(对应第3个第一样本箱),截取数值6、7属于取值范围6-7(对应第4个第一样本箱),截取数值8、9属于取值范围8-9(对应第5个第一样本箱)。将第一标识信息的截取数值为0的第一样本数据分入第1个第一样本箱;将第一标识信息的截取数值为1的第一样本数据分入第1个第一样本箱;将第一标识信息的截取数值为2的第一样本数据分入第2个第一样本箱;以此类推。如果判断第3个第一样本箱中的第一样本数量大于预设数量阈值,将第3个第一样本箱均匀分割为2个子箱(或其它数量)。
通过分箱对需要计算的样本数据进行合理的分配。可以理解为把样本数据均衡分块成多个任务,交给不同的计算单元进行处理。缩小了遍历的计算量和访问压力。
第一加入模块204,用于将所述多个第一样本箱加入匹配任务队列。
可以将每个第一样本箱打包为待处理的匹配任务,将多个匹配任务加入匹配任务队列。所述第一分布式系统中的处于空闲状态的计算单元可以依次读取并处理所述匹配任务队列中的匹配任务,以达到异步处理匹配任务的目的,提升处理效率。
匹配模块205,用于控制所述第一分布式系统中的多个第一计算单元根据所述第一标识信息从所述匹配任务队列中匹配出多个目标第一样本箱。
可以从所述第一分布式系统获取执行任务需要的多个第一计算单元。对所述多个第一计算单元进行配置。为保证配置的一致性和易操作性,可以使用docker向预设代码仓库拉取镜像。
在一具体实施例中,所述控制所述第一分布式系统中的多个第一计算单元根据所述第一标识信息从所述匹配任务队列中匹配出多个目标第一样本箱包括:
每次控制一个第一计算单元读取所述匹配任务队列中的一个匹配任务,获取所述匹配任务中的第一样本箱;
控制所述第一计算单元从所述第二分布式系统中获取与所述第一样本箱关联的第二标识信息;
控制所述第一计算单元从所述第一样本箱中匹配出与所述第二标识信息一致的第一标识信息对应的样本数据,得到多个目标样本数据;
通过所述第一计算单元,删除所述第一样本箱中除所述多个目标样本数据外的样本数据,得到目标第一样本箱。
在另一实施例中,所述第一样本箱包括多个子箱,所述控制所述第一计算单元从所述第一样本箱中匹配出与所述第二标识信息一致的第一标识信息对应的样本数据包括:
控制所述第一计算单元从所述第一样本箱的多个子箱中匹配出与所述第二标识信息一致的第一标识信息对应的样本数据,得到多个目标样本数据。将第一样本箱分为多 个子箱,可以减少所述第一计算单元在短时间内对高运行资源的需求。避免卡顿或宕机,从而提升计算效率。
在另一实施例中,所述控制所述第一计算单元从所述第二分布式系统中获取与所述第一样本箱关联的第二标识信息包括:
为所述第一计算单元及所述第二分布式系统中的与所述第一计算单元关联的第二计算单元建立通信通道;
控制所述第一计算单元通过所述通信通道从所述关联的第二计算单元中获取与所述第一样本箱关联的第二样本箱,从所述关联的第二样本箱中获取第二样本数据的第二标识信息。
所述多个第一样本箱与所述第二分布式系统中的多个第二样本箱一一关联,处理两个关联样本箱的两个计算单元一一关联。例如第一样本箱A与第二样本箱B关联,第一计算单元a处理第一样本箱A,第二计算单元b处理第二样本箱B,第一计算单元a与第二计算单元b关联。
所述第一分布式系统中的一个第一计算单元与所述第二分布式系统中的一个第二计算单元一一关联,两个计算单元分别处理的两个样本箱也一一关联。
所述第二分布式系统根据所述预设加密方法对所述第二分布式系统的第二样本数据的标识信息进行加密,得到所述第二标识信息。所述第二分布式系统根据所述预设分箱规则对所述第二样本数据进行分箱,得到多个第二样本箱。
在一具体实施例中,所述控制所述第一分布式系统中的多个第一计算单元根据所述第一标识信息从所述匹配任务队列中匹配出多个目标第一样本箱包括:
获取所述多个第一计算单元的第一数量和所述匹配任务队列中的匹配任务的第二数量;
判断所述第一数量是否小于所述第二数量;
当所述第一数量大于或等于所述第二数量时,用所述多个第一计算单元根据所述第一标识信息处理所述匹配任务队列中的全部匹配任务;
当所述第一数量小于所述第二数量时,用所述多个第一计算单元根据所述第一标识信息分批处理所述匹配任务队列中的匹配任务。
第二加入模块206,用于将所述多个目标第一样本箱加入训练任务队列。
可以将各个目标第一样本箱打包为待处理的训练任务,将各个训练任务加入训练任务队列。所述第一分布式系统中的处于空闲状态的计算单元可以依次读取并处理所述训练任务队列中的训练任务,以达到异步处理训练任务的目的,提升处理效率。
在一具体实施例中,所述将所述多个目标第一样本箱加入训练任务队列包括:
获取每个目标第一样本箱中的第二样本数量;
当所述第二样本数量小于预设第一样本数量阈值时,合并第二样本数量小于所述预设第一样本数量阈值的目标第一样本箱,将所述合并后的第一样本箱加入所述训练任务队列;
当所述第二样本数量大于所述预设第二样本数量阈值时,拆分第二样本数量大于所述预设第二样本数量阈值的目标第一样本箱,将所述拆分后的第一样本箱加入所述训练任务队列;
其中,所述预设第二样本数量阈值大于所述预设第一样本数量阈值,所述合并后的目标第一样本箱的第二样本数量小于或等于所述预设第二样本数量阈值,且大于或等于所述预设第一样本数量阈值,所述拆分后的第一样本箱的第二样本数量小于或等于预设第二样本数量阈值,且大于或等于所述预设第一样本数量阈值。
处理模块207,用于调用所述多个第一计算单元和所述第二分布式系统中的多个第二计算单元联合处理所述训练任务队列中的训练任务,得到每个目标第一样本箱对应的联邦学习模型。
在一具体实施例中,所述调用所述多个第一计算单元和所述第二分布式系统中的多个第二计算单元联合处理所述训练任务队列中的训练任务包括:
每次控制一个第一计算单元读取所述训练任务队列中的一个训练任务,获取所述训练任务中的目标第一样本箱,为所述第一计算单元及所述第二分布式系统中的与所述第一计算单元关联的第二计算单元建立通信通道;
控制所述第一计算单元通过所述通信通道与所述关联的第二计算单元基于所述目标第一样本箱联合训练联邦学习模型,得到所述目标第一样本箱对应的联邦学习模型。
在一具体实施例中,所述联邦学习模型为神经网络模型(人工智能模型),所述控制所述第一计算单元通过所述通信通道与所述关联的第二计算单元基于所述目标第一样本箱联合训练联邦学习模型包括:
控制所述第一计算单元以所述目标第一样本箱为输入,通过初始化的第一神经网络子模型计算第一中间输出;
控制所述第一计算单元通过所述通信通道将加密后的第一中间输出传输给所述关联的第二计算单元,使所述关联的第二计算单元以所述第一中间输出为输入,通过初始化的第二神经网络子模型计算第二中间输出,将所述第二中间输出通过所述通信通道传输给所述第一计算单元;
控制所述第一计算单元以所述第二中间输出为输入,通过所述第一神经网络子模型计算最终输出,根据所述最终输出和所述最终输出对应的标签通过反向传播算法优化所述第一神经网络子模型的参数;
控制所述第一计算单元通过反向传播算法计算中间误差,将所述中间误差通过所述通信通道传输给所述关联的第二计算单元,使所述关联的第二计算单元根据所述中间误差和所述第二中间输出通过反向传播算法优化所述第二神经网络子模型的参数;
组合所述第一神经网络子模型和所述第二神经网络子模型,得到所述联邦学习模型。
在另一实施例中,所述第一计算单元与所述关联的第二计算单元通过所述通信通道进行加密通信。用所述预设加密方法加密所述第一计算单元与所述关联的第二计算单元通过所述通信通道传输的数据。
在另一实施例中,所述联邦学习模型可以是树模型。
在一具体实施例中,所述调用所述多个第一计算单元和所述第二分布式系统中的多个第二计算单元联合处理所述训练任务队列中的训练任务包括:
获取所述多个第一计算单元的第三数量和所述训练任务队列中的训练任务的第四数量;
判断所述第三数量是否小于所述第四数量;
当所述第三数量大于或等于所述第四数量时,用所述多个第一计算单元和所述第二分布式系统的多个第二计算单元联合处理所述训练任务队列中的全部训练任务;
当所述第三数量小于所述第四数量时,用所述多个第一计算单元和所述第二分布式系统的多个第二计算单元联合,分批处理所述训练任务队列中的训练任务。
实施例二的联邦学习模型训练装置20通过分布式系统的多个计算单元对待处理匹配任务和训练任务进行异步处理,避免待处理任务在单位时间点对计算资源的需求压力,同时提高容错性,提升了训练联邦学习模型的效率。
在另一实施例中,所述处理模块还用于从所述第一分布式系统获取多个空闲状态的第一计算单元;将所述多个空闲状态的第一计算单元动态分配给所述分配任务队列和所述训练任务队列,使所述多个空闲状态的第一计算单元处理所述分配任务队列中的分配任务和/或所述训练任务队列中的训练任务。
所述将所述多个空闲状态的第一计算单元动态分配给所述分配任务队列和所述训练任务队列包括:
获取所述分配任务队列中的分配任务数量和所述训练任务队列中的训练任务数量;
按所述分配任务数量与所述训练任务数量的比例,将所述多个空闲状态的第一计算单元等比例分配给所述分配任务队列和所述训练任务队列。
根据任务队列和计算资源分配任务,从而有效利用计算资源。
在另一实施例中,所述联邦学习模型训练装置20还包括发送模块,用于对所述多个第一计算单元进行心跳检测,检测出停止心跳的第一计算单元;发送对所述停止心跳的第一计算单元的提醒信息给用户。
实施例三
本实施例提供一种计算机可读存储介质,该计算机可读存储介质上存储有计算机可读指令,所述计算机可读存储介质可以是非易失性,也可以是易失性。该计算机可读指令被处理器执行时实现上述联邦学习模型训练方法实施例中的步骤,例如图1所示的步骤101-107:
101,从第二分布式系统获取预设分箱规则、预设加密方法;
102,根据所述预设加密方法对第一分布式系统的第一样本数据的标识信息进行加密,得到第一标识信息;
103,根据所述预设分箱规则和所述第一标识信息对所述第一样本数据进行分箱,得到多个第一样本箱;
104,将所述多个第一样本箱加入匹配任务队列;
105,控制所述第一分布式系统中的多个第一计算单元根据所述第一标识信息从所述匹配任务队列中匹配出多个目标第一样本箱;
106,将所述多个目标第一样本箱加入训练任务队列;
107,调用所述多个第一计算单元和所述第二分布式系统中的多个第二计算单元联合处理所述训练任务队列中的训练任务,得到每个目标第一样本箱对应的联邦学习模型。
或者,该计算机可读指令被处理器执行时实现上述装置实施例中各模块的功能,例如图2中的模块201-207:
获取模块201,用于从第二分布式系统获取预设分箱规则、预设加密方法;
加密模块202,用于根据所述预设加密方法对第一分布式系统的第一样本数据的标识信息进行加密,得到第一标识信息;
分箱模块203,用于根据所述预设分箱规则和所述第一标识信息对所述第一样本数据进行分箱,得到多个第一样本箱;
第一加入模块204,用于将所述多个第一样本箱加入匹配任务队列;
匹配模块205,用于控制所述第一分布式系统中的多个第一计算单元根据所述第一标识信息从所述匹配任务队列中匹配出多个目标第一样本箱;
第二加入模块206,用于将所述多个目标第一样本箱加入训练任务队列;
处理模块207,用于调用所述多个第一计算单元和所述第二分布式系统中的多个第二计算单元联合处理所述训练任务队列中的训练任务,得到每个目标第一样本箱对应的联邦学习模型。
实施例四
图3为本申请实施例四提供的计算机设备的示意图。所述计算机设备30包括存储器301、处理器302以及存储在所述存储器301中并可在所述处理器302上运行的计算机可读指令303,例如联邦学习模型训练程序。所述处理器302执行所述计算机可读指令303时实现上述联邦学习模型训练方法实施例中的步骤,例如图1所示的步骤101-107:
101,从第二分布式系统获取预设分箱规则、预设加密方法;
102,根据所述预设加密方法对第一分布式系统的第一样本数据的标识信息进行加密,得到第一标识信息;
103,根据所述预设分箱规则和所述第一标识信息对所述第一样本数据进行分箱,得 到多个第一样本箱;
104,将所述多个第一样本箱加入匹配任务队列;
105,控制所述第一分布式系统中的多个第一计算单元根据所述第一标识信息从所述匹配任务队列中匹配出多个目标第一样本箱;
106,将所述多个目标第一样本箱加入训练任务队列;
107,调用所述多个第一计算单元和所述第二分布式系统中的多个第二计算单元联合处理所述训练任务队列中的训练任务,得到每个目标第一样本箱对应的联邦学习模型。
或者,该计算机可读指令被处理器执行时实现上述装置实施例中各模块的功能,例如图2中的模块201-207:
获取模块201,用于从第二分布式系统获取预设分箱规则、预设加密方法;
加密模块202,用于根据所述预设加密方法对第一分布式系统的第一样本数据的标识信息进行加密,得到第一标识信息;
分箱模块203,用于根据所述预设分箱规则和所述第一标识信息对所述第一样本数据进行分箱,得到多个第一样本箱;
第一加入模块204,用于将所述多个第一样本箱加入匹配任务队列;
匹配模块205,用于控制所述第一分布式系统中的多个第一计算单元根据所述第一标识信息从所述匹配任务队列中匹配出多个目标第一样本箱;
第二加入模块206,用于将所述多个目标第一样本箱加入训练任务队列;
处理模块207,用于调用所述多个第一计算单元和所述第二分布式系统中的多个第二计算单元联合处理所述训练任务队列中的训练任务,得到每个目标第一样本箱对应的联邦学习模型。
示例性的,所述计算机可读指令303可以被分割成一个或多个模块,所述一个或者多个模块被存储在所述存储器301中,并由所述处理器302执行,以完成本方法。所述一个或多个模块可以是能够完成特定功能的一系列计算机程序指令段,该指令段用于描述所述计算机可读指令303在所述计算机设备30中的执行过程。例如,所述计算机可读指令303可以被分割成图2中的获取模块201、加密模块202、分箱模块203、第一加入模块204、匹配模块205、第二加入模块206、处理模块207,各模块具体功能参见实施例二。
所述计算机设备30可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。本领域技术人员可以理解,所述示意图3仅仅是计算机设备30的示例,并不构成对计算机设备30的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述计算机设备30还可以包括输入输出设备、网络接入设备、总线等。
所称处理器302可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器302也可以是任何常规的处理器等,所述处理器302是所述计算机设备30的控制中心,利用各种接口和线路连接整个计算机设备30的各个部分。
所述存储器301可用于存储所述计算机可读指令303,所述处理器302通过运行或执行存储在所述存储器301内的计算机可读指令或模块,以及调用存储在存储器301内的数据,实现所述计算机设备30的各种功能。所述存储器301可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据计算机设备30的使用所创建的数据等。此外,存储器301可以包括硬盘、内存、插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)、至少一个 磁盘存储器件、闪存器件、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)或其他非易失性/易失性存储器件。
所述计算机设备30集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读存储介质中。所述计算机可读存储介质可以是非易失性,也可以是易失性。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一计算机可读存储介质中,该计算机可读指令在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机可读指令可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读存储介质可以包括:能够携带所述计算机可读指令的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、只读存储器(ROM)、随机存取存储器(RAM)。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。
上述以软件功能模块的形式实现的集成的模块,可以存储在一个计算机可读存储介质中。上述软件功能模块存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本申请各个实施例所述联邦学习模型训练方法的部分步骤。
对于本领域技术人员而言,显然本申请不限于上述示范性实施例的细节,而且在不背离本申请的精神或基本特征的情况下,能够以其他的具体形式实现本申请。因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本申请的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本申请内。不应将权利要求中的任何附关联图标记视为限制所涉及的权利要求。此外,显然“包括”一词不排除其他模块或步骤,单数不排除复数。系统权利要求中陈述的多个模块或装置也可以由一个模块或装置通过软件或者硬件来实现。第一,第二等词语用来表示名称,而并不表示任何特定的顺序。
最后应说明的是,以上实施例仅用以说明本申请的技术方案而非限制,尽管参照较佳实施例对本申请进行了详细说明,本领域的普通技术人员应当理解,可以对本申请的技术方案进行修改或等同替换,而不脱离本申请技术方案的精神和范围。
Claims (20)
- 一种联邦学习模型训练方法,所述联邦学习模型训练方法应用于第一分布式系统中,其中,所述联邦学习模型训练方法包括:从第二分布式系统获取预设分箱规则、预设加密方法;根据所述预设加密方法对所述第一分布式系统的第一样本数据的标识信息进行加密,得到第一标识信息;根据所述预设分箱规则和所述第一标识信息对所述第一样本数据进行分箱,得到多个第一样本箱;将所述多个第一样本箱加入匹配任务队列;控制所述第一分布式系统中的多个第一计算单元根据所述第一标识信息从所述匹配任务队列中匹配出多个目标第一样本箱;将所述多个目标第一样本箱加入训练任务队列;调用所述多个第一计算单元和所述第二分布式系统中的多个第二计算单元联合处理所述训练任务队列中的训练任务,得到每个目标第一样本箱对应的联邦学习模型。
- 如权利要求1所述的联邦学习模型训练方法,其中,所述根据所述预设分箱规则和所述第一标识信息对所述第一样本数据进行分箱包括:获取所述预设分箱规则中的预设除数;对每个所述第一标识信息与所述预设除数进行相除并获取余数;根据所述第一标识信息对应的余数对所述第一样本数据进行分箱,得到多个第一样本箱;判断每个第一样本箱中的第一样本数量是否大于预设数量阈值;对第一样本数量大于所述预设数量阈值的第一样本箱进行均匀分割,得到多个子箱。
- 如权利要求1所述的联邦学习模型训练方法,其中,所述控制所述第一分布式系统中的多个第一计算单元根据所述第一标识信息从所述匹配任务队列中匹配出多个目标第一样本箱包括:每次控制一个第一计算单元读取所述匹配任务队列中的一个匹配任务,获取所述匹配任务中的第一样本箱;控制所述第一计算单元从所述第二分布式系统中获取与所述第一样本箱关联的第二标识信息;控制所述第一计算单元从所述第一样本箱中匹配出与所述第二标识信息一致的第一标识信息对应的样本数据,得到多个目标样本数据;通过所述第一计算单元,删除所述第一样本箱中除所述多个目标样本数据外的样本数据,得到目标第一样本箱。
- 如权利要求3所述的联邦学习模型训练方法,其中,所述控制所述第一计算单元从所述第二分布式系统中获取与所述第一样本箱关联的第二标识信息包括:为所述第一计算单元及所述第二分布式系统中的与所述第一计算单元关联的第二计算单元建立通信通道;控制所述第一计算单元通过所述通信通道从所述关联的第二计算单元中获取与所述第一样本箱关联的第二样本箱,从所述关联的第二样本箱中获取第二样本数据的第二标识信息。
- 如权利要求1所述的联邦学习模型训练方法,其中,所述将所述多个目标第一样本箱加入训练任务队列包括:获取每个目标第一样本箱中的第二样本数量;当所述第二样本数量小于预设第一样本数量阈值时,合并第二样本数量小于所述预 设第一样本数量阈值的目标第一样本箱,将所述合并后的第一样本箱加入所述训练任务队列;当所述第二样本数量大于所述预设第二样本数量阈值时,拆分第二样本数量大于所述预设第二样本数量阈值的目标第一样本箱,将所述拆分后的第一样本箱加入所述训练任务队列;其中,所述预设第二样本数量阈值大于所述预设第一样本数量阈值,所述合并后的目标第一样本箱的第二样本数量小于或等于所述预设第二样本数量阈值,且大于或等于所述预设第一样本数量阈值,所述拆分后的第一样本箱的第二样本数量小于或等于预设第二样本数量阈值,且大于或等于所述预设第一样本数量阈值。
- 如权利要求1所述的联邦学习模型训练方法,其中,所述调用所述多个第一计算单元和所述第二分布式系统中的多个第二计算单元联合处理所述训练任务队列中的训练任务包括:每次控制一个第一计算单元读取所述训练任务队列中的一个训练任务,获取所述训练任务中的目标第一样本箱,为所述第一计算单元及所述第二分布式系统中的与所述第一计算单元关联的第二计算单元建立通信通道;控制所述第一计算单元通过所述通信通道与所述关联的第二计算单元基于所述目标第一样本箱联合训练联邦学习模型,得到所述目标第一样本箱对应的联邦学习模型。
- 如权利要求6所述的联邦学习模型训练方法,其中,所述第一计算单元与所述关联的第二计算单元通过所述通信通道进行加密通信。
- 一种联邦学习模型训练装置,所述联邦学习模型训练装置运行于第一分布式系统中,其中,所述联邦学习模型训练装置包括:获取模块,用于从第二分布式系统获取预设分箱规则、预设加密方法;加密模块,用于根据所述预设加密方法对所述第一分布式系统的第一样本数据的标识信息进行加密,得到第一标识信息;分箱模块,用于根据所述预设分箱规则和所述第一标识信息对所述第一样本数据进行分箱,得到多个第一样本箱;第一加入模块,用于将所述多个第一样本箱加入匹配任务队列;匹配模块,用于控制所述第一分布式系统中的多个第一计算单元根据所述第一标识信息从所述匹配任务队列中匹配出多个目标第一样本箱;第二加入模块,用于将所述多个目标第一样本箱加入训练任务队列;处理模块,用于调用所述多个第一计算单元和所述第二分布式系统中的多个第二计算单元联合处理所述训练任务队列中的训练任务,得到每个目标第一样本箱对应的联邦学习模型。
- 一种计算机设备,多个所述计算机设备组成第一分布式系统,其中,每个计算机设备包括处理器,所述处理器用于执行存储器中存储的计算机可读指令以实现以下步骤:从第二分布式系统获取预设分箱规则、预设加密方法;根据所述预设加密方法对所述第一分布式系统的第一样本数据的标识信息进行加密,得到第一标识信息;根据所述预设分箱规则和所述第一标识信息对所述第一样本数据进行分箱,得到多个第一样本箱;将所述多个第一样本箱加入匹配任务队列;控制所述第一分布式系统中的多个第一计算单元根据所述第一标识信息从所述匹配任务队列中匹配出多个目标第一样本箱;将所述多个目标第一样本箱加入训练任务队列;调用所述多个第一计算单元和所述第二分布式系统中的多个第二计算单元联合处理所述训练任务队列中的训练任务,得到每个目标第一样本箱对应的联邦学习模型;所述第一分布式系统是数据请求方,所述第二分布式系统是数据提供方,数据请求方需要联合数据提供方进行联邦学习。
- 如权利要求9所述的计算机设备,其中,所述处理器执行所述存储器中存储的计算机可读指令以实现所述根据所述预设分箱规则和所述第一标识信息对所述第一样本数据进行分箱时,包括:获取所述预设分箱规则中的预设除数;对每个所述第一标识信息与所述预设除数进行相除并获取余数;根据所述第一标识信息对应的余数对所述第一样本数据进行分箱,得到多个第一样本箱;判断每个第一样本箱中的第一样本数量是否大于预设数量阈值;对第一样本数量大于所述预设数量阈值的第一样本箱进行均匀分割,得到多个子箱。
- 如权利要求9所述的计算机设备,其中,所述处理器执行所述存储器中存储的计算机可读指令以实现所述控制所述第一分布式系统中的多个第一计算单元根据所述第一标识信息从所述匹配任务队列中匹配出多个目标第一样本箱时,包括:每次控制一个第一计算单元读取所述匹配任务队列中的一个匹配任务,获取所述匹配任务中的第一样本箱;控制所述第一计算单元从所述第二分布式系统中获取与所述第一样本箱关联的第二标识信息;控制所述第一计算单元从所述第一样本箱中匹配出与所述第二标识信息一致的第一标识信息对应的样本数据,得到多个目标样本数据;通过所述第一计算单元,删除所述第一样本箱中除所述多个目标样本数据外的样本数据,得到目标第一样本箱。
- 如权利要求11所述的计算机设备,其中,所述处理器执行所述存储器中存储的计算机可读指令以实现所述控制所述第一计算单元从所述第二分布式系统中获取与所述第一样本箱关联的第二标识信息时,包括:为所述第一计算单元及所述第二分布式系统中的与所述第一计算单元关联的第二计算单元建立通信通道;控制所述第一计算单元通过所述通信通道从所述关联的第二计算单元中获取与所述第一样本箱关联的第二样本箱,从所述关联的第二样本箱中获取第二样本数据的第二标识信息。
- 如权利要求9所述的计算机设备,其中,所述处理器执行所述存储器中存储的计算机可读指令以实现所述将所述多个目标第一样本箱加入训练任务队列时,包括:获取每个目标第一样本箱中的第二样本数量;当所述第二样本数量小于预设第一样本数量阈值时,合并第二样本数量小于所述预设第一样本数量阈值的目标第一样本箱,将所述合并后的第一样本箱加入所述训练任务队列;当所述第二样本数量大于所述预设第二样本数量阈值时,拆分第二样本数量大于所述预设第二样本数量阈值的目标第一样本箱,将所述拆分后的第一样本箱加入所述训练任务队列;其中,所述预设第二样本数量阈值大于所述预设第一样本数量阈值,所述合并后的目标第一样本箱的第二样本数量小于或等于所述预设第二样本数量阈值,且大于或等于所述预设第一样本数量阈值,所述拆分后的第一样本箱的第二样本数量小于或等于预设第二样本数量阈值,且大于或等于所述预设第一样本数量阈值。
- 如权利要求9所述的计算机设备,其中,所述处理器执行所述存储器中存储的计算机可读指令以实现所述调用所述多个第一计算单元和所述第二分布式系统中的多个第二计算单元联合处理所述训练任务队列中的训练任务时,包括:每次控制一个第一计算单元读取所述训练任务队列中的一个训练任务,获取所述训练任务中的目标第一样本箱,为所述第一计算单元及所述第二分布式系统中的与所述第一计算单元关联的第二计算单元建立通信通道;控制所述第一计算单元通过所述通信通道与所述关联的第二计算单元基于所述目标第一样本箱联合训练联邦学习模型,得到所述目标第一样本箱对应的联邦学习模型。
- 一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机可读指令,其中,所述计算机可读指令被处理器执行时实现以下步骤:从第二分布式系统获取预设分箱规则、预设加密方法;根据所述预设加密方法对第一分布式系统的第一样本数据的标识信息进行加密,得到第一标识信息;根据所述预设分箱规则和所述第一标识信息对所述第一样本数据进行分箱,得到多个第一样本箱;将所述多个第一样本箱加入匹配任务队列;控制所述第一分布式系统中的多个第一计算单元根据所述第一标识信息从所述匹配任务队列中匹配出多个目标第一样本箱;将所述多个目标第一样本箱加入训练任务队列;调用所述多个第一计算单元和所述第二分布式系统中的多个第二计算单元联合处理所述训练任务队列中的训练任务,得到每个目标第一样本箱对应的联邦学习模型。
- 如权利要求15所述的存储介质,其中,所述计算机可读指令被所述处理器执行以实现所述根据所述预设分箱规则和所述第一标识信息对所述第一样本数据进行分箱时,包括:获取所述预设分箱规则中的预设除数;对每个所述第一标识信息与所述预设除数进行相除并获取余数;根据所述第一标识信息对应的余数对所述第一样本数据进行分箱,得到多个第一样本箱;判断每个第一样本箱中的第一样本数量是否大于预设数量阈值;对第一样本数量大于所述预设数量阈值的第一样本箱进行均匀分割,得到多个子箱。
- 如权利要求15所述的存储介质,其中,所述计算机可读指令被所述处理器执行以实现所述控制所述第一分布式系统中的多个第一计算单元根据所述第一标识信息从所述匹配任务队列中匹配出多个目标第一样本箱时,包括:每次控制一个第一计算单元读取所述匹配任务队列中的一个匹配任务,获取所述匹配任务中的第一样本箱;控制所述第一计算单元从所述第二分布式系统中获取与所述第一样本箱关联的第二标识信息;控制所述第一计算单元从所述第一样本箱中匹配出与所述第二标识信息一致的第一标识信息对应的样本数据,得到多个目标样本数据;通过所述第一计算单元,删除所述第一样本箱中除所述多个目标样本数据外的样本数据,得到目标第一样本箱。
- 如权利要求17所述的存储介质,其中,所述计算机可读指令被所述处理器执行以实现所述控制所述第一计算单元从所述第二分布式系统中获取与所述第一样本箱关联的第二标识信息时,包括:为所述第一计算单元及所述第二分布式系统中的与所述第一计算单元关联的第二计算单元建立通信通道;控制所述第一计算单元通过所述通信通道从所述关联的第二计算单元中获取与所述第一样本箱关联的第二样本箱,从所述关联的第二样本箱中获取第二样本数据的第二标识信息。
- 如权利要求15所述的存储介质,其中,所述计算机可读指令被所述处理器执行以实现所述将所述多个目标第一样本箱加入训练任务队列时,包括:获取每个目标第一样本箱中的第二样本数量;当所述第二样本数量小于预设第一样本数量阈值时,合并第二样本数量小于所述预设第一样本数量阈值的目标第一样本箱,将所述合并后的第一样本箱加入所述训练任务队列;当所述第二样本数量大于所述预设第二样本数量阈值时,拆分第二样本数量大于所述预设第二样本数量阈值的目标第一样本箱,将所述拆分后的第一样本箱加入所述训练任务队列;其中,所述预设第二样本数量阈值大于所述预设第一样本数量阈值,所述合并后的目标第一样本箱的第二样本数量小于或等于所述预设第二样本数量阈值,且大于或等于所述预设第一样本数量阈值,所述拆分后的第一样本箱的第二样本数量小于或等于预设第二样本数量阈值,且大于或等于所述预设第一样本数量阈值。
- 如权利要求15所述的存储介质,其中,所述计算机可读指令被所述处理器执行以实现所述调用所述多个第一计算单元和所述第二分布式系统中的多个第二计算单元联合处理所述训练任务队列中的训练任务时,包括:每次控制一个第一计算单元读取所述训练任务队列中的一个训练任务,获取所述训练任务中的目标第一样本箱,为所述第一计算单元及所述第二分布式系统中的与所述第一计算单元关联的第二计算单元建立通信通道;控制所述第一计算单元通过所述通信通道与所述关联的第二计算单元基于所述目标第一样本箱联合训练联邦学习模型,得到所述目标第一样本箱对应的联邦学习模型。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010409022.9 | 2020-05-14 | ||
| CN202010409022.9A CN111695675B (zh) | 2020-05-14 | 2020-05-14 | 联邦学习模型训练方法及相关设备 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2021114616A1 true WO2021114616A1 (zh) | 2021-06-17 |
Family
ID=72477808
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2020/098884 Ceased WO2021114616A1 (zh) | 2020-05-14 | 2020-06-29 | 联邦学习模型训练方法及相关设备 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN111695675B (zh) |
| WO (1) | WO2021114616A1 (zh) |
Cited By (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113392974A (zh) * | 2021-07-07 | 2021-09-14 | 北京百度网讯科技有限公司 | 模型训练方法、装置、电子设备以及存储介质 |
| CN113568740A (zh) * | 2021-07-16 | 2021-10-29 | 开放智能机器(上海)有限公司 | 基于联邦学习的模型聚合方法、系统、设备及介质 |
| CN114328432A (zh) * | 2021-12-02 | 2022-04-12 | 京信数据科技有限公司 | 一种大数据联邦学习处理方法及系统 |
| CN114638376A (zh) * | 2022-03-25 | 2022-06-17 | 支付宝(杭州)信息技术有限公司 | 一种复合样本场景中的多方联合模型训练方法及装置 |
| CN114841371A (zh) * | 2022-04-28 | 2022-08-02 | 北京百度网讯科技有限公司 | 基于特征的分箱处理方法、装置、设备及介质 |
| CN116244650A (zh) * | 2023-05-12 | 2023-06-09 | 北京富算科技有限公司 | 特征分箱方法、装置、电子设备和计算机可读存储介质 |
| CN116757294A (zh) * | 2023-05-19 | 2023-09-15 | 重庆邮电大学 | 一种基于不可知论的公平联邦学习异步训练方法 |
Families Citing this family (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112162959B (zh) * | 2020-10-15 | 2023-10-10 | 深圳技术大学 | 一种医疗数据共享方法及装置 |
| CN112231768B (zh) * | 2020-10-27 | 2021-06-18 | 腾讯科技(深圳)有限公司 | 数据处理方法、装置、计算机设备及存储介质 |
| CN112464278B (zh) * | 2020-11-24 | 2023-07-21 | 平安科技(深圳)有限公司 | 基于非均匀分布数据的联邦建模方法及相关设备 |
| CN114629930A (zh) * | 2020-12-10 | 2022-06-14 | 华为技术有限公司 | 半异步联邦学习的方法和通信装置 |
| CN114626543B (zh) * | 2020-12-14 | 2025-07-25 | 深圳前海微众银行股份有限公司 | 特征分箱模型的联邦建模方法、设备,介质及程序产品 |
| CN112633367B (zh) * | 2020-12-21 | 2025-07-29 | 深圳前海微众银行股份有限公司 | 基于联邦学习的样本特征分箱方法、终端、设备和介质 |
| CN112711765B (zh) * | 2020-12-30 | 2024-06-14 | 深圳前海微众银行股份有限公司 | 样本特征的信息价值确定方法、终端、设备和存储介质 |
| CN112818207B (zh) * | 2021-02-26 | 2025-09-23 | 深圳前海微众银行股份有限公司 | 网络结构搜索方法、装置、设备、存储介质及程序产品 |
| CN117751688A (zh) * | 2021-11-01 | 2024-03-22 | Oppo广东移动通信有限公司 | 无线通信的方法和设备 |
| CN114595833B (zh) * | 2022-03-09 | 2025-04-08 | 北京百度网讯科技有限公司 | 模型处理方法、装置、电子设备以及存储介质 |
| CN117669777A (zh) * | 2022-08-29 | 2024-03-08 | 中国移动通信有限公司研究院 | 样本数据的对齐方法、装置、设备、系统及存储介质 |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20140142966A1 (en) * | 2008-06-13 | 2014-05-22 | Aionex, Inc. | Healthcare Communication and Workflow Management System and Method |
| CN110797124A (zh) * | 2019-10-30 | 2020-02-14 | 腾讯科技(深圳)有限公司 | 一种模型多端协同训练方法、医疗风险预测方法和装置 |
| CN110825476A (zh) * | 2019-10-31 | 2020-02-21 | 深圳前海微众银行股份有限公司 | 联邦学习工作流界面的显示方法、装置、终端及介质 |
| CN110990857A (zh) * | 2019-12-11 | 2020-04-10 | 支付宝(杭州)信息技术有限公司 | 保护隐私安全的多方联合进行特征评估的方法及装置 |
| CN110991552A (zh) * | 2019-12-12 | 2020-04-10 | 支付宝(杭州)信息技术有限公司 | 基于联邦学习的孤立森林模型构建和预测方法和装置 |
| CN111104731A (zh) * | 2019-11-19 | 2020-05-05 | 北京集奥聚合科技有限公司 | 一种用于联邦学习的图形化模型全生命周期建模方法 |
Family Cites Families (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110795228B (zh) * | 2018-08-03 | 2023-08-25 | 伊姆西Ip控股有限责任公司 | 用于训练深度学习模型的方法和制品、以及计算系统 |
| CN109325584B (zh) * | 2018-08-10 | 2021-06-25 | 深圳前海微众银行股份有限公司 | 基于神经网络的联邦建模方法、设备及可读存储介质 |
| US11494669B2 (en) * | 2018-10-30 | 2022-11-08 | Diveplane Corporation | Clustering, explainability, and automated decisions in computer-based reasoning systems |
| CN109492420B (zh) * | 2018-12-28 | 2021-07-20 | 深圳前海微众银行股份有限公司 | 基于联邦学习的模型参数训练方法、终端、系统及介质 |
| CN110162551B (zh) * | 2019-04-19 | 2020-08-14 | 阿里巴巴集团控股有限公司 | 数据处理方法、装置和电子设备 |
| CN110135467A (zh) * | 2019-04-23 | 2019-08-16 | 北京淇瑀信息科技有限公司 | 一种基于数据拼接的模型训练方法、装置、系统和记录介质 |
| CN110942154B (zh) * | 2019-11-22 | 2021-07-06 | 深圳前海微众银行股份有限公司 | 基于联邦学习的数据处理方法、装置、设备及存储介质 |
| CN111091200B (zh) * | 2019-12-20 | 2021-03-19 | 深圳前海微众银行股份有限公司 | 训练模型的更新方法、系统、智能设备、服务器及存储介质 |
| CN111131080B (zh) * | 2019-12-26 | 2021-09-07 | 电子科技大学 | 分布式深度学习流调度方法、系统、设备 |
-
2020
- 2020-05-14 CN CN202010409022.9A patent/CN111695675B/zh active Active
- 2020-06-29 WO PCT/CN2020/098884 patent/WO2021114616A1/zh not_active Ceased
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20140142966A1 (en) * | 2008-06-13 | 2014-05-22 | Aionex, Inc. | Healthcare Communication and Workflow Management System and Method |
| CN110797124A (zh) * | 2019-10-30 | 2020-02-14 | 腾讯科技(深圳)有限公司 | 一种模型多端协同训练方法、医疗风险预测方法和装置 |
| CN110825476A (zh) * | 2019-10-31 | 2020-02-21 | 深圳前海微众银行股份有限公司 | 联邦学习工作流界面的显示方法、装置、终端及介质 |
| CN111104731A (zh) * | 2019-11-19 | 2020-05-05 | 北京集奥聚合科技有限公司 | 一种用于联邦学习的图形化模型全生命周期建模方法 |
| CN110990857A (zh) * | 2019-12-11 | 2020-04-10 | 支付宝(杭州)信息技术有限公司 | 保护隐私安全的多方联合进行特征评估的方法及装置 |
| CN110991552A (zh) * | 2019-12-12 | 2020-04-10 | 支付宝(杭州)信息技术有限公司 | 基于联邦学习的孤立森林模型构建和预测方法和装置 |
Cited By (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113392974A (zh) * | 2021-07-07 | 2021-09-14 | 北京百度网讯科技有限公司 | 模型训练方法、装置、电子设备以及存储介质 |
| CN113392974B (zh) * | 2021-07-07 | 2024-04-09 | 北京百度网讯科技有限公司 | 模型训练方法、装置、电子设备以及存储介质 |
| CN113568740A (zh) * | 2021-07-16 | 2021-10-29 | 开放智能机器(上海)有限公司 | 基于联邦学习的模型聚合方法、系统、设备及介质 |
| CN114328432A (zh) * | 2021-12-02 | 2022-04-12 | 京信数据科技有限公司 | 一种大数据联邦学习处理方法及系统 |
| CN114638376A (zh) * | 2022-03-25 | 2022-06-17 | 支付宝(杭州)信息技术有限公司 | 一种复合样本场景中的多方联合模型训练方法及装置 |
| CN114638376B (zh) * | 2022-03-25 | 2024-06-04 | 支付宝(杭州)信息技术有限公司 | 一种复合样本场景中的多方联合模型训练方法及装置 |
| CN114841371A (zh) * | 2022-04-28 | 2022-08-02 | 北京百度网讯科技有限公司 | 基于特征的分箱处理方法、装置、设备及介质 |
| CN116244650A (zh) * | 2023-05-12 | 2023-06-09 | 北京富算科技有限公司 | 特征分箱方法、装置、电子设备和计算机可读存储介质 |
| CN116244650B (zh) * | 2023-05-12 | 2023-10-03 | 北京富算科技有限公司 | 特征分箱方法、装置、电子设备和计算机可读存储介质 |
| CN116757294A (zh) * | 2023-05-19 | 2023-09-15 | 重庆邮电大学 | 一种基于不可知论的公平联邦学习异步训练方法 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN111695675A (zh) | 2020-09-22 |
| CN111695675B (zh) | 2024-05-07 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2021114616A1 (zh) | 联邦学习模型训练方法及相关设备 | |
| CN112150280B (zh) | 提升匹配效率的联邦学习方法及设备、电子设备和介质 | |
| US11921682B2 (en) | Extracting data from a blockchain network | |
| WO2021114618A1 (zh) | 联邦学习方法、装置、计算机设备及可读存储介质 | |
| WO2021179720A1 (zh) | 基于联邦学习的用户数据分类方法、装置、设备及介质 | |
| CN110750658B (zh) | 一种媒体资源的推荐方法、服务器及计算机可读存储介质 | |
| CN110471949A (zh) | 数据血缘分析方法、装置、系统、服务器及存储介质 | |
| WO2020207445A1 (zh) | 一种基于区块链的事件订阅方法及装置 | |
| CN112199442A (zh) | 分布式批量下载文件方法、装置、计算机设备及存储介质 | |
| WO2020073503A1 (zh) | 合同签订方法、装置及计算机设备 | |
| CN111291084A (zh) | 样本id对齐方法、装置、设备及存储介质 | |
| CN117273176A (zh) | 基于stacking集成学习算法的联邦学习建模方法 | |
| WO2021073201A1 (zh) | 基于分布式分发的数据处理方法、装置及相关设备 | |
| CN116881898A (zh) | 权限变更方法、系统、装置及存储介质 | |
| CN118862118A (zh) | 一种数据加密方法、装置及电子设备 | |
| US12536185B2 (en) | Innovative disclosure document evaluation and compliance system and method | |
| CN111563250A (zh) | 权限管理方法、装置、计算机设备和存储介质 | |
| CN111679959A (zh) | 计算机性能数据确定方法、装置、计算机设备及存储介质 | |
| CN118796638A (zh) | 一种基于交易时序图的客户端性能优化方法及装置 | |
| HK40031275A (zh) | 联邦学习模型训练方法及相关设备 | |
| HK40031275B (zh) | 联邦学习模型训练方法及相关设备 | |
| CN110909085A (zh) | 数据处理方法、装置、设备及存储介质 | |
| CN115795097A (zh) | 基于xml逻辑规则的数据处理方法及装置 | |
| CN108241750B (zh) | 网络图中连接线的优化方法、装置、存储介质及终端 | |
| CN116226116A (zh) | 联合学习任务查看方法、装置、电子设备及存储介质 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20899983 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 20899983 Country of ref document: EP Kind code of ref document: A1 |