A federated learning method and a federated learning system compatible with different computing frameworks
Patent Information
- Application Number
- CN202310105164.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-07
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2043-02-07
AI Technical Summary
传统的人工智能模型部署的过程面临着一定的问题:模型的训练都是基于所有的集中的数据进行的训练
[0048]若参与联邦学习的各计算节点未使用计算框架,即进行本地计算,此时参与方内提供计算节点的服务器直接运行计算代码,计算驱动单元无须启动。
Smart Images

Figure CN116204307B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of distributed machine learning technology, and in particular to a federated learning method and federated learning system compatible with different computing frameworks. Background Technology
[0002] In recent years, artificial intelligence (AI) technology has developed rapidly and has gradually permeated all aspects of social life. While bringing convenience to social life, this rapid development has also brought some problems. The traditional deployment of AI models faces certain challenges: model training is based on centralized data. In real-world applications, data is often scattered across various entities, including different enterprises and institutions, or different departments within the same entity. Whether due to restrictions between enterprises or privacy concerns of data owners, data often cannot be centrally trained on a global dataset, a problem known as the "data silo problem." Furthermore, besides inherent limitations in reality, centralized data training for AI models also suffers from the following drawbacks: centralized storage and transmission of data pose a high risk of data leakage; data is easily susceptible to malicious attacks, resulting in damage and infringement; and centralized data training faces challenges such as insufficient computing power, slow computation, long training cycles, and difficulty in adjustment when dealing with massive-scale training.
[0003] To address these issues, researchers have proposed the concept and theory of Federated Learning (FL). Federated Learning offers a novel solution to data sharing problems: data does not need to be uploaded to a data center; instead, model training can be performed locally. The local model trained on local data is then uploaded to the global central model, contributing to the improvement of the global model. This approach solves the problems of data silos and data privacy and security. For deploying, training, and experimenting with federated learning models, mature federated learning frameworks such as TensorFlow Federated, PySyft, and Federated AI Technology Enabler (FATE) are widely used in the deployment, training, and experimentation of federated learning models.
[0004] However, current federated learning frameworks cannot be specifically deployed based on the limitations of current computing resources. For one of the participating parties, there are often server clusters belonging to different departments, with each server in the cluster providing a computing node, and the computing frameworks of each server may differ. Clearly, completing distributed machine learning requires the joint participation of several parties.
[0005] Existing federated learning frameworks (such as FATE) that allow the use of distributed computing frameworks within participating parties require all participating parties to use a unified distributed computing framework. Because the current implementation is data-centric, it needs to unify the computational behavior of participating parties, thus requiring all participating parties to use a unified computing framework. However, redeploying a unified computing framework to each server in different participating party server clusters would be a significant undertaking. Summary of the Invention
[0006] Therefore, it is necessary to provide a federated learning method that is compatible with different computing frameworks to address the aforementioned technical problems.
[0007] This application is compatible with federated learning methods of different computing frameworks and is implemented between a central node and several participating parties. Each participating party includes several computing nodes, and each computing node includes a computing entity engine, computing resources called by the computing entity engine, and computing driver units called by the computing entity engine.
[0008] The computing resources are used to provide computing entity services according to the call request of the computing entity engine, and the computing driver unit is used to match the computing framework;
[0009] For one of the participants, if the computing nodes participating in the federated learning do not use a computing framework, the federated learning method includes:
[0010] The computing node receives the service request from the central node;
[0011] The computing entity engine receives the service request and invokes the corresponding computing entity service in the computing resources;
[0012] The computing entity service completes the service request;
[0013] For one of the participants, if the computing nodes participating in the federated learning use computing frameworks that are at least partially different, the federated learning method includes:
[0014] The computing node receives the service request from the central node;
[0015] The computing entity engine receives the service request and invokes the corresponding computing entity service in the computing resources;
[0016] The computing entity service calls the computing drive unit that matches different computing frameworks through the computing entity engine;
[0017] The computing entity engine creates a computing execution entity, which then completes the service request.
[0018] Optionally, the computing resources include multiple computing entity services in a queue, and the computing resources are used to provide computing entity services according to the call request of the computing entity engine, including: the computing resources are used to provide one of the computing entity services in the queue according to the call request of the computing entity engine.
[0019] Optionally, the computing entity engine includes a scheduling management module and a computing driver module.
[0020] The computing resources are invoked by the scheduling and management module;
[0021] The computing entity engine receives the service request and invokes the corresponding computing entity service in the computing resources, specifically including: the scheduling management module receives the service request and invokes the corresponding computing entity service in the computing resources;
[0022] The computing driver unit is invoked by the computing driver module;
[0023] The computing entity service calls the computing driver unit that matches different computing frameworks through the computing entity engine, specifically including: the computing entity service matching the computing driver unit of different computing frameworks through the computing driver module;
[0024] The computation entity engine creates the computation execution entity, specifically including: the computation driver module creates the computation execution entity.
[0025] Optionally, each participant includes a node management service, which receives the working status of each computing node and the computing framework type used by each computing node.
[0026] Optionally, each computing node includes a provided computing node service, which is used to interact with the node management service and to send the service request to the computed entity engine.
[0027] Optionally, the central node includes a task coordinator, which is used to communicate with the node management service of each participating party.
[0028] After completing the service request, the task content feedback is provided to the task coordinator in sequence through the computing node service and the node management service.
[0029] Optionally, the scheduling management module includes two types: a local scheduling module and a cloud scheduling module;
[0030] The node management service determines whether each computing node uses a computing framework, and whether the computing frameworks used by each computing node are at least partially different.
[0031] If the computing nodes participating in federated learning do not use the computing framework, the computing entity engine receives the service request and calls the corresponding computing entity service in the computing resources. Specifically, the local scheduling module receives the service request and calls the corresponding computing entity service in the computing resources.
[0032] If the computing frameworks used by the computing nodes participating in federated learning are at least partially different, the computing entity engine receives the service request and calls the corresponding computing entity service in the computing resources. Specifically, the cloud scheduling module receives the service request and calls the corresponding computing entity service in the computing resources.
[0033] Optionally, the computing execution entity is part of the computing resources.
[0034] Optionally, the computing framework includes at least one of the following: MapReduce framework, Spark framework, Flink framework, and Ray framework.
[0035] This application also provides a federated learning system compatible with different computing frameworks, including a central node and several participants. Each participant includes several computing nodes, and each computing node includes a computing entity engine, computing resources invoked by the computing entity engine, and computing driver units invoked by the computing entity engine.
[0036] The computing resources are used to provide computing entity services according to the call request of the computing entity engine, and the computing driver unit is used to match the computing framework;
[0037] The federated learning system is used to implement federated learning methods compatible with different computing frameworks;
[0038] For one of the participants, if the computing nodes participating in the federated learning do not use a computing framework, the federated learning method includes:
[0039] The computing node receives the service request from the central node;
[0040] The computing entity engine receives the service request and invokes the corresponding computing entity service in the computing resources;
[0041] The computing entity service completes the service request;
[0042] For one of the participants, if the computing nodes participating in the federated learning use computing frameworks that are at least partially different, the federated learning method includes:
[0043] The computing node receives the service request from the central node;
[0044] The computing entity engine receives the service request and invokes the corresponding computing entity service in the computing resources;
[0045] The computing entity service calls the computing drive unit that matches different computing frameworks through the computing entity engine;
[0046] The computing entity engine creates a computing execution entity, which then completes the service request.
[0047] This application's federated learning method, compatible with different computational frameworks, has at least the following effects:
[0048] If the computing nodes participating in federated learning do not use the computing framework and instead perform local computing, the servers providing the computing nodes within the participating parties will directly run the computing code, and the computing driver unit will not need to be started.
[0049] When different computing frameworks are used on different computing nodes, this application calls computing driver units that match different computing frameworks, thereby achieving compatibility between two federated learning working states: no computing framework used and different computing frameworks used.
[0050] The federated learning method provided in this application reduces the difficulty of deployment and getting started. Its impact on the framework size is limited to the computation-driven unit and the part that calls the computation-driven unit (computation-driven module). While meeting the compatibility requirements, it has a small impact on the resource consumption of existing computing frameworks. Attached Figure Description
[0051] Figure 1 This is a schematic diagram illustrating an application scenario of a federated learning method compatible with different computing frameworks in one embodiment of this application;
[0052] Figure 2 This is a schematic diagram illustrating an application scenario of a federated learning method compatible with different computing frameworks in one embodiment of this application;
[0053] Figure 3 This is a schematic diagram of the structure of a computer device provided in one embodiment of this application.
[0054] The annotations in the figure are explained as follows:
[0055] 110. Central Node; 210. Participants; 220. Node Management Service; 230. Computing Node; 240. Computing Node Service; 250. Computing Entity Engine; 251. Scheduling Management Module; 252. Computing Driver Module; 260. Computing Resources; 261. Computing Entity Service; 270. Computing Driver Unit; 280. Computing Execution Entity; 300. Different Computing Frameworks. Detailed Implementation
[0056] Current federated learning technologies rely on all participants using a unified distributed computing framework. However, incompatibility issues may exist between the distributed computing frameworks (or simply computing frameworks) of the servers within a participant's server cluster. For example, different computing nodes (provided by the servers within the participant) may use different computing frameworks, such as several from MapReduce, Spark, Flink, and Ray. During federated learning, these different frameworks prevent the computing nodes from performing federated learning tasks simultaneously. Furthermore, the scale of the participants in federated learning is often enormous, and deploying the same computing framework on different servers within each participant is extremely labor-intensive. Even if the same computing framework is installed on all servers within the participant, repeated operations are required if different computing frameworks are needed, limiting the widespread application of federated learning methods.
[0057] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0058] To solve the above technical problems, see [link to relevant documentation]. Figures 1-2 One embodiment of this application provides a federated learning method compatible with different computing frameworks. The federated learning method is implemented between a central node 110 and several participating parties 210. Each participating party 210 includes several computing nodes 230. Each computing node 230 includes a computing entity engine 250, computing resources 260 invoked by the computing entity engine 250, and computing driver units 270 invoked by the computing entity engine 250. The computing resources 260 are used to provide computing entity services 261 according to the invocation requests of the computing entity engine 250, and the computing driver units 270 are used to match computing frameworks.
[0059] The central node 110 can be understood as the organizer of federated learning, or more specifically, the server that organizes federated learning; its role is that of the task coordinator for federated learning. Several participants 210 refer to at least two participants in the federated learning process. Participants 210 form a server cluster, including different servers belonging to the same department or unit. Several computing nodes 230 are provided by different servers within each participant 210. Computing resources 260 refer to the computing power resources of the server where the computing nodes 230 reside, which are invoked by the computing entity engine 250. In the underlying working logic of the server, computing resources 260 include multiple computing entity services 261 divided into queues to complete corresponding services. Computing resources 260 include multiple queued computing entity services 261, and computing resources 260 are used to provide one of the computing entity services 261 in the queue according to the invocation request from the computing entity engine 250. The computing framework includes at least one of the following: MapReduce framework, Spark framework, Flink framework, and Ray framework.
[0060] For the computation-driven unit 270 to match the computation framework, it can be done in the following way. First, it is determined that the code used by the participants to perform computations when receiving federated learning tasks is written according to the distributed computation framework used.
[0061] Each distributed computing framework has its own computing interface. The task of the computing driver unit is to adapt the connection to the computing framework, including at least one of the following: setting the interface communication address of the distributed computing framework; setting the environment variables configured for the distributed computing framework. The computing driver unit's job is to ensure that code written using the corresponding distributed computing framework can connect to and use the framework's interface when calling the framework. After completing the above tasks, the computing driver unit enables the code calling the computing framework to successfully invoke the corresponding computing framework. Of course, exception handling functionality can also be added for call failures.
[0062] For one of the participants 210, if the computing nodes 230 participating in the federated learning do not use the computing framework, the federated learning method includes steps S11 to S13.
[0063] Step S11: Computing node 230 receives a service request from central node 110.
[0064] In step S12, the computing entity engine 250 receives a service request and invokes the corresponding computing entity service 261 from the computing resource 260. Step S12 is specifically completed by the scheduling management module 251 included in the computing entity engine 250.
[0065] Step S13: Calculate entity service 261 to complete the service request.
[0066] Specifically, steps S11 to S13 include the central node 110 organizing federated learning, issuing a service request, the computing node 230 receiving the service request, organizing the local model building, organizing the computation, and returning the model parameters to complete the service request.
[0067] For one of the participants 210, if each computing node 230 participating in the federated learning uses a computing framework and the computing frameworks used are at least partially different, the federated learning method includes steps S21 to S24.
[0068] Step S21: Computing node 230 receives a service request from central node 110.
[0069] In step S22, the computing entity engine 250 receives a service request and calls the corresponding computing entity service 261 in the computing resource 260.
[0070] In step S23, the computation entity service 261 calls the computation driver unit 270 that matches different computation frameworks 300 through the computation entity engine 250. Specifically, step S23 matches the computation driver unit 270 of different computation frameworks 300 through the computation driver module 252 included in the computation entity engine 250.
[0071] In step S24, the computation entity engine 250 creates a computation execution entity 280, which completes the service request. Specifically, step S24 involves creating the computation execution entity 280 through the computation driver module 252 included in the computation entity engine 250, and the computation execution entity 280 is part of the computation resource 260.
[0072] Furthermore, each participant 210 includes a node management service 220, which is used to receive the working status of each computing node 230 and the computing framework type used by each computing node 230.
[0073] The federated learning method compatible with different computing frameworks provided in this embodiment utilizes the computing driver unit to be compatible with different computing frameworks. Compared with other compatibility methods, it reduces the difficulty of deployment and learning. That is, different computing frameworks can be compatible with the federated learning method provided in this embodiment. The federated learning method provided in this embodiment only affects the size of the framework in terms of computing driver unit and computing driver module. While satisfying the compatibility function, it has little impact on the resource consumption of existing computing frameworks.
[0074] Furthermore, the federated learning method compatible with different computing frameworks provided in this embodiment can still achieve compatibility between different computing frameworks of various participants by using steps S21 to S24 when different participants use different distributed computing frameworks and the same participant uses the same computing framework (which is a case of cloud computing).
[0075] The computing entity engine provides a unified interface (node management service) to the upper layers for functions such as requesting, viewing, and managing computing resources, and is compatible with computing interfaces under different computing frameworks. At the lower layers, it uses scheduling management modules under different resource conditions and computing driver modules under different computing frameworks to be compatible with different computing frameworks and complete the actual resource scheduling and computing execution functions.
[0076] Each compute node 230 includes a compute node service 240, which is used to interact with the node management service 220 and to send service requests to the computed entity engine 250.
[0077] The central node 110 includes a task coordinator, which communicates with the node management service 220 of each participant 210 to ultimately obtain the computing entity service 261 that completes the service request within the computing resources 260. After completing the service request, the task content feedback is provided to the task coordinator sequentially through the computing node service 240 and the node management service 220.
[0078] In one embodiment, the scheduling management module 251 includes two types: a local scheduling module and a cloud scheduling module.
[0079] The node management service 220 determines whether each computing node 230 uses a computing framework and whether the computing frameworks used by each computing node 230 are at least partially different.
[0080] If the computing nodes 230 participating in federated learning do not use the computing framework, step S12 specifically includes: the local scheduling module receives the service request and calls the corresponding computing entity service 261 in the computing resource 260;
[0081] If the computing frameworks used by the computing nodes 230 participating in federated learning are at least partially different, step S22 specifically includes: the cloud scheduling module receiving a service request and calling the corresponding computing entity service 261 in the computing resource 260.
[0082] In one embodiment, a federated learning method compatible with different computing frameworks 300 is described in detail.
[0083] Figure 1This paper presents a schematic diagram of the overall structure of the federated learning task deployment using the federated learning framework provided in the embodiments of this application, and also shows the location and composition of the computing entity engine 250 in the computing node 230.
[0084] Each participant 210 needs to receive computing tasks from the central node 110, execute the calculations, and transmit the results back to the central node 110 for model aggregation calculations. Therefore, each participant 210 needs to have computing nodes to execute computing tasks and manage computing resources.
[0085] When deploying federated learning tasks, each participant 210 will start a node management service 220 to manage the metadata such as the task of this participant. Each computing node of participant 210 will start a corresponding node management service 220 to manage the node.
[0086] The node management service 220 interacts with the computing node service 240 of the computing node 230 to obtain information about the computing node 230 and to assign tasks. At the same time, each computing node service 240 interacts with the computing entity engine 250 to acquire and manage computing resources, and the computing entity engine 250 manages and schedules computing resources 260.
[0087] Figure 2 The interactive communication method between computing resource 260 and computing entity engine 250 is illustrated, as well as the way computing resource 260 is compatible with different computing frameworks 300 through computing driver unit 270. Computing resource 260 includes a queue of computing entities served by various computing entities 261.
[0088] When participant 210 receives a task requiring computation, the node management service 220 within participant 210, upon receiving the instruction, retrieves the communication address of computation entity service 261 (referring to one of the computation entity services 261) from the computation entity queue through the scheduling management module 251 in the computation entity engine 250 and returns it. The central node 110, acting as the task coordinator, uses this communication address to send a task execution instruction to the service at that address, along with the task's configuration information. For information on obtaining the communication address, please refer to [link to relevant documentation]. Figure 1 After receiving the instruction and task configuration, the computing entity service 261 retrieves the computing driver module 252 corresponding to different computing frameworks 300 from the computing entity engine 250. The computing driver module 252 returns the corresponding computing driver unit 270. Then, a computing execution entity 280 is created, and the retrieved computing driver unit 270 is used to perform computing operations on different computing frameworks 300. The computing execution entity 280 can be part of the computing resource 260.
[0089] See Figure 2Based on the availability of computing resources, there are two deployment scenarios: local single-machine deployment and multi-machine distributed deployment. The main difference between the two deployment methods lies in the different engine operating environments and the different computing entities.
[0090] Regarding the framework diagram shown in the figure, the main difference between the two deployment methods lies in whether or not the computing entity service 261 receives instructions, and through the computing driver module 252 and the computing driver unit 270 combined with different computing frameworks 300, a computing execution entity 280 is created to complete the computing process.
[0091] Local single-machine deployments typically do not use distributed computing frameworks. However, multi-machine distributed deployments require computing frameworks, and different computing frameworks may exist. This embodiment can handle both scenarios simultaneously: when no computing framework is used, the computing entity service 261 is directly referenced; when a computing framework is used and different computing frameworks exist, different computing driver units 270 are called according to the different computing frameworks 300 to create a computing execution entity 280 to complete the computation. This embodiment achieves compatibility with a single computing framework and different computing frameworks.
[0092] The steps to deploy a federated learning task using the computational entity engine 250 shown in the figure are as follows:
[0093] Step 101: See Figure 1 Based on the given configuration information, the federated learning framework is used to create a central node 110 service and various participants 210.
[0094] Step 102: Initialize the computing nodes according to the number and configuration of the computing nodes 230 of each participant 210 in the given configuration information. When creating a computing node 230, start the computing node service 240. When the computing node service is created, it initializes the scheduling management module 251 and the computing driver module 252 in the computing entity engine 250 for resource scheduling. In the case of local single-machine deployment, the scheduling management module 251 (computing scheduling engine) is a background running program. The scheduling management module 251 creates several available computing entities locally according to the configuration information to provide computing entity services 261, forming a computing entity queue. It can be a resident process, etc., and starts background services to maintain the status information and communication port information of the computing entities. In the case of multi-machine distributed deployment, a cloud computing environment needs to be pre-deployed, and the cloud engine is associated with the cloud computing environment during engine initialization. The cloud engine creates several computing entities in the cloud computing environment to provide computing entity services 261 and runs services for monitoring computing entities.
[0095] Step 103: After the computing entity engine starts, both the scheduling management module 251 and the computing driver module 252 provide a unified external call interface. After the computing node service 240 receives the function call from the node management service 220 of the participant, it can call the unified interface of the scheduling management module 251 to schedule the computing entity service 261 in the computing resource 260, without needing to design and implement different programs for local and multi-machine distributed deployments.
[0096] Step 104: After receiving the task execution instruction and task configuration, participant 210 returns the address of available computing entity service 261 to receive the task configuration, and obtains the computing driver unit 270 corresponding to different computing frameworks 300 through the computing driver module 252 in computing entity engine 250, thereby creating computing execution entity 280, executing computing tasks on the corresponding computing framework, and completing compatibility with different computing frameworks.
[0097] In one embodiment, the computing entity engine 250 is functionally divided into two modules: a scheduling management module 251 and a computing driver module 252. These correspond to the scheduling and monitoring functions of the computing entities within the computing entity engine, and the functionality of the computing driver to ensure compatibility with different computing frameworks.
[0098] The scheduling management module 251 includes two types: the local computing entity engine resource scheduling module (referred to as the local scheduling module) and the cloud computing entity engine resource scheduling module (referred to as the cloud scheduling module), which respectively correspond to the scheduling and management of computing resources under local single-machine computing resource conditions and under the conditions of multi-machine cloud computing environment deployment.
[0099] This embodiment uses the two different types of scheduling management modules 251 mentioned above, namely the local scheduling module and the cloud scheduling module, to be compatible with different computing resource conditions such as single-machine and multi-machine distributed computing, and provides resource scheduling management functions and methods through a unified external interface.
[0100] When the federated learning task is deployed on a local single machine, the scheduling management module 251 selects the local scheduling module to schedule and manage the computing resources 260. Under single-machine conditions, the computing resource 260 request returns a port communication address of a locally available computing entity service 261. The background service of the scheduling management module communicates with the computing entity service through the port communication address of each computing entity service 261 to query and manage the status of the computing entity service.
[0101] When the federated learning task is deployed in a multi-machine cloud computing environment, the scheduling management module 251 selects the cloud scheduling module for scheduling and management of computing resources. The node management service 220 receives a service request from the central node 110 and sends a resource request to the computing entity engine 250. The scheduling management module within the computing entity engine 250 selects the cloud scheduling module and returns the communication address of the computing entity service running in the cloud computing environment. The cloud scheduling module runs a background service in the cloud computing environment, allocating resources and viewing and managing resource status, thus realizing the scheduling, operation, and management of physical computing resources across multiple machines.
[0102] The computation-driven module 252 calls the corresponding computation-driven unit 270 for different computation frameworks, so that the federated learning method is compatible with different computation frameworks locally on the participants. Specifically, when deploying a federated learning task, the computation entity engine 250 uses the computation-driven unit 270, which is adapted to different computation frameworks 300, under a unified interface to be compatible with the different computation frameworks used by each computation node 230 within the participants.
[0103] To be compatible with different computing environments, i.e., different computing frameworks, when deploying federated learning tasks, depending on the different computing frameworks, the local scheduling module is selected in the case of a single machine, and the cloud scheduling module is selected in the case of multiple machines. The scheduling management module 251 of the computing entity engine 250 uses different types of scheduling modules (local scheduling module and cloud scheduling module) under different resource conditions to be compatible with the different computing resource conditions brought about by different computing frameworks.
[0104] When deploying federated learning tasks, different computing frameworks are deployed by various participants and local computing needs. The computing entity engine 250 uses the computing driver module 252 to call the corresponding computing driver unit 270 for different frameworks 300, and a unified computing interface is used to achieve compatibility with different computing frameworks 300.
[0105] The unified computing interface refers to the local scheduling module and cloud scheduling module included in the scheduling management module 251. For different computing resource conditions (local computing or cloud computing) and different computing frameworks, it exposes the same resource call and computing execution interface. The computing execution interface includes computing entity application interface, resource status query interface, computing entity deletion interface and computing execution interface.
[0106] In the deployment of federated learning tasks, local scheduling modules and cloud scheduling modules are selected according to different computing resource conditions. The computing node services 240 of each participant 210 initialize the computing entity engine 250 using predetermined parameters, and then use the unified interface exposed by the computing entity engine 250. In local computing scenarios, the scheduling management module 251 selects the local scheduling module to schedule and manage computing resources 260; in cloud computing scenarios, the scheduling management module 251 selects the cloud scheduling module, and through the computing driver module 252, calls the computing driver units 270 that match different computing frameworks 300 to create the computing execution entity 280, thus completing cloud computing.
[0107] The predetermined parameters are those required for the initialization of the computation entity engine 250, including the number of computation entity services 261 that the computation entity engine 250 needs to create and maintain, the working port, the range of available ports, the path to the communication authentication file, and the computation framework used for computation.
[0108] The computation entity engine 250 receives predetermined parameters for initialization. When the computation entity engine 250 receives the parameters for initialization, it will create several computation entity services 261 through the scheduling management module according to the predetermined parameters and maintain their status. It will start the background service to query and manage the working status of the computation entity services 261. The computation driver module 252 maintains the currently supported computation framework types and uses the corresponding computation driver unit 270 when performing computation.
[0109] Each participant 210 includes a node management service 220, and each participant 210 in federated learning includes several computing nodes 230. Each computing node 230 initiates a computing node service 240 to interact with the node management service 220, providing computing services such as running federated learning tasks to the node management service 220. When the computing node service 240 receives a task that requires computation, it requests and manages computing resources 260 through the scheduling management module 251 of the computing entity engine 250. During computation, the computing entity engine 250 uses the unified interface of the corresponding computing driver unit 270 through the computing driver module 252 to match different computing frameworks 300 to execute computation.
[0110] The embodiments of this application disclose a federated learning method compatible with different computing frameworks, which can perform resource scheduling and computation execution and is applied to the field of distributed machine learning.
[0111] Each embodiment can select the corresponding local scheduling module and cloud scheduling module within the corresponding computing entity engine according to different computing frameworks (computing resource conditions). When using the cloud calling module, the computing driver unit is used to match and use different computing frameworks.
[0112] Each embodiment unifies resource scheduling and management as well as computation execution under different computing frameworks, and can be compatible with different computing resources and computing frameworks.
[0113] In one embodiment, a computer device is provided, which corresponds to one of the computing nodes within the participating parties. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 3 As shown, the computer device includes a processor, memory, network interface, display screen, and input device connected via a system bus. The processor provides computing and control capabilities, specifically providing computing resources 260. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs, including the scheduling management module 251, computing driver module 252, and computing driver unit 270 provided in various embodiments. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium.
[0114] The network interface of this computer device is used to communicate with external terminals via a network connection, and this network interface is controlled by the node management service 220. When the computer program is executed by the processor, it cooperates with the entire federated learning system to complete service requests from the central node in the federated learning method.
[0115] The display screen of the computer device can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs or touchpads set on the casing of the computer device, or external keyboards, touchpads or mice, etc.
[0116] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0117] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered to be within the scope of this specification. When technical features of different embodiments are embodied in the same drawing, it can be regarded as the drawing also disclosing examples of combinations of the various embodiments involved.
[0118] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A federated learning method compatible with different computing frameworks, implemented between a central node and several participating parties, characterized in that... Each participant includes several computing nodes, and each computing node includes a computing entity engine, computing resources invoked by the computing entity engine, and computing driver units invoked by the computing entity engine. The computing resources are used to provide computing entity services according to the call request of the computing entity engine, and the computing driver unit is used to match the computing framework; For one of the participants, if the computing nodes participating in the federated learning do not use a computing framework, the federated learning method includes: The computing node receives the service request from the central node; The computing entity engine receives the service request and invokes the corresponding computing entity service in the computing resources; The computing entity service completes the service request; For one of the participants, if the computing nodes participating in the federated learning use computing frameworks that are at least partially different, the federated learning method includes: The computing node receives the service request from the central node; The computing entity engine receives the service request and invokes the corresponding computing entity service in the computing resources; The computing entity service calls the computing drive unit that matches different computing frameworks through the computing entity engine; The computing entity engine creates a computing execution entity, which is part of the computing resources, and the computing execution entity completes the service request.
2. The federated learning method compatible with different computing frameworks according to claim 1, characterized in that, The computing resources include multiple computing entity services in a queue. The computing resources are used to provide computing entity services according to the call request of the computing entity engine, including: the computing resources are used to provide one computing entity service in the queue according to the call request of the computing entity engine.
3. The federated learning method compatible with different computing frameworks according to claim 2, characterized in that, The computing entity engine includes a scheduling management module and a computing driver module. The computing resources are invoked by the scheduling and management module; The computing entity engine receives the service request and invokes the corresponding computing entity service in the computing resources, specifically including: the scheduling management module receives the service request and invokes the corresponding computing entity service in the computing resources; The computing driver unit is invoked by the computing driver module; The computing entity service calls the computing driver unit that matches different computing frameworks through the computing entity engine, specifically including: the computing entity service matching the computing driver unit of different computing frameworks through the computing driver module; The computation entity engine creates the computation execution entity, specifically including: the computation driver module creates the computation execution entity.
4. The federated learning method compatible with different computing frameworks according to claim 3, characterized in that, Each participant includes a node management service, which receives the working status of each computing node and the type of computing framework used by each computing node.
5. The federated learning method compatible with different computing frameworks according to claim 4, characterized in that, Each computing node includes a provided computing node service, which is used to interact with the node management service and to send the service request to the computing entity engine.
6. The federated learning method compatible with different computing frameworks according to claim 5, characterized in that, The central node includes a task coordinator, which is used to communicate with the node management service of each participating party. After completing the service request, the task content feedback is provided to the task coordinator in sequence through the computing node service and the node management service.
7. The federated learning method compatible with different computing frameworks according to claim 4, characterized in that, The scheduling management module includes two types: a local scheduling module and a cloud scheduling module; The node management service determines whether each computing node uses a computing framework, and whether the computing frameworks used by each computing node are at least partially different. If the computing nodes participating in federated learning do not use the computing framework, the computing entity engine receives the service request and calls the corresponding computing entity service in the computing resources. Specifically, the local scheduling module receives the service request and calls the corresponding computing entity service in the computing resources. If the computing frameworks used by the computing nodes participating in federated learning are at least partially different, the computing entity engine receives the service request and calls the corresponding computing entity service in the computing resources. Specifically, the cloud scheduling module receives the service request and calls the corresponding computing entity service in the computing resources.
8. The federated learning method compatible with different computing frameworks according to claim 1, characterized in that, The computing framework includes at least one of the following: MapReduce framework, Spark framework, Flink framework, and Ray framework.
9. A federated learning system compatible with different computing frameworks, comprising a central node and several participating parties, characterized in that: Each participant includes several computing nodes, and each computing node includes a computing entity engine, computing resources invoked by the computing entity engine, and computing driver units invoked by the computing entity engine. The computing resources are used to provide computing entity services according to the call request of the computing entity engine, and the computing driver unit is used to match the computing framework; The federated learning system is used to implement federated learning methods compatible with different computing frameworks; For one of the participants, if the computing nodes participating in the federated learning do not use a computing framework, the federated learning method includes: The computing node receives the service request from the central node; The computing entity engine receives the service request and invokes the corresponding computing entity service in the computing resources; The computing entity service completes the service request; For one of the participants, if the computing nodes participating in the federated learning use computing frameworks that are at least partially different, the federated learning method includes: The computing node receives the service request from the central node; The computing entity engine receives the service request and invokes the corresponding computing entity service in the computing resources; The computing entity service calls the computing drive unit that matches different computing frameworks through the computing entity engine; The computing entity engine creates a computing execution entity, which is part of the computing resources, and the computing execution entity completes the service request.
Citation Information
Patent Citations
Computing resource allocation method and device based on hybrid distribution architecture and storage medium
CN110704186A
Federal learning system and method applied to heterogeneous computing equipment
CN113112029A
Modeling task and data analysis method, device, electronic equipment and system
CN113407327A
Training method of intelligent resource arrangement model
CN114610475A
Distributed scheduling method and system based on federal decision tree model training and medium
CN114675964A