A method and system for decoupling computing engine from platform
By introducing functional modules and normative interfaces into the computing engine, the decoupling of the computing engine and the platform is achieved, solving the problem of difficulty in interconnection between the computing engine and the platform, and improving the versatility and efficiency of interaction.
Patent Information
- Application Number
- CN202210119038.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-08
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2042-02-08
AI Technical Summary
In the field of privacy computing, the coupling between the computing engine and the platform makes interconnection difficult. The computing engine cannot implement a universal interaction method and needs to implement different interaction methods according to different customers.
By setting up functional modules between the driver node of the computing engine and the platform, integrating business codes related to platform functions, and using the driver-master-worker structure to achieve decoupling when the computing engine actively triggers interactions, the functional modules process interaction information to achieve decoupling. Coupling, providing standardized interfaces and middleware modules to support the integration of different manufacturers.
It implements a universal integration method between computing engines and platforms, reduces the adaptation requirements of computing engines, improves the flexibility and efficiency of interconnection, and supports functions such as event interaction between multiple nodes, temporary data storage, result reporting, and alarm notifications.
Smart Images

Figure CN114444136B
Abstract
Description
Technical Field
[0001] The present application relates to the field of privacy computing, and more specifically, to a method and system for decoupling a computing engine from a platform. Background Art
[0002] In the field of privacy computing, the computing engines of various products are implemented separately, and the computing engines and platforms are coupled with each other. It is difficult for computing engines and platforms from different manufacturers to integrate with each other (for example, the computing engine of company A is difficult to be integrated and called by the platform of company B), and it is difficult to achieve interoperability. At the functional level, the computing engine can use the master-worker structure to realize the registration and discovery of computing resources (workers, slave nodes), health checks, fault removal, fault recovery, system health, system alarms, etc. within the computing engine. At the same time, it can also realize the load balancing scheduling of federated learning or multi-party secure computing tasks, and the routing distribution of node interaction events according to task ids, etc., to achieve decoupling at the functional level.
[0003] When calling the computing engine to perform computing tasks, an extended driver-master-worker structure can be used. The driver layer is actually a client, similar to providing an SDK-level development kit. Platform developers can easily call the driver's functions according to the developer documentation of the development kit, thereby calling the functions of the entire computing engine. In this way, interoperability can be achieved when different platforms call the computing engine through a unified SDK calling method.
[0004] In privacy computing, there is another type of interaction, which is triggered by the computing engine, such as: 1. During the task, there are cross-node event interactions between multiple nodes. Often, multiple nodes are in their own local area network and cannot be directly connected, so they need to be transferred through the platform; 2. Temporary information needs to be stored on the platform during the task; 3. At the end of the task, after each party stores the result in the storage, the file_id of the result in the storage needs to be reported to the platform; 4. After the task is completed, the status of the entire task needs to be reported to the platform; 5. When various problems occur in computing resources, the master needs to report alarms to the platform, etc. This part of the interaction method is not defined by the computing engine, but by the platforms of different manufacturers according to their own specifications. Therefore, in the current interconnection implementation, the computing engine can only implement different interaction methods according to different customers, and cannot be universal. Summary of the invention
[0005] The purpose of the embodiments of the present application is to provide a method and system for decoupling a computing engine from a platform, so as to solve the problem that in the current interconnection implementation mode, the computing engine can only implement different interaction methods according to different customers and cannot be universal.
[0006] A method for decoupling a computing engine from a platform provided in an embodiment of the present application is applied to multiple platform parties participating in the interaction. For each platform party, a functional module is provided between a driver node of the computing engine and the platform. The functional module integrates business codes related to platform functions. The computing engine also includes a master node and a worker node.
[0007] A method for decoupling a computing engine from a platform, specifically comprising:
[0008] When the computing engine actively triggers an event interaction, the master node or worker node that triggers the interaction reports the interaction information;
[0009] The functional module processes the corresponding interactive behavior according to the business code corresponding to the interactive information, thereby realizing the decoupling of the computing engine and the platform.
[0010] In the above technical solution, the driver-master-worker structure is used to design the computing engine. When the computing engine triggers an interaction (such as event interaction between multiple nodes, temporary data storage, result reporting, status reporting, alarm notification, etc.), the corresponding node (worker or master) that triggers the interaction will report the interaction information, so that the functional module can process the corresponding interaction behavior according to the business code corresponding to the interaction information, thereby realizing the decoupling of the computing engine actively triggering the interaction. After decoupling, when the computing engine is integrated, the platform manufacturer will perform the adaptation, and the computing engine does not need to be adapted. Therefore, in the use scenario of interconnection and interoperability of the method of the embodiment of the present application, the computing engine can be integrated through a general integration method.
[0011] In some optional implementations, the function module is also used to set the callback of the driver node;
[0012] Before the function module processes the corresponding interaction behavior according to the business code corresponding to the interaction information, it also includes:
[0013] The master node or worker node that triggers the interaction reports the interaction information to the driver node;
[0014] The driver node receives the interaction information;
[0015] The driver node calls the callback of the corresponding interaction of the functional module according to the interaction information.
[0016] In the above technical solution, the computing engine is designed using the driver-master-worker structure, and a series of methods or functions are provided in the driver node to set the callbacks of each interaction that the computing engine needs to actively trigger. When different manufacturers' platforms integrate our computing engine, it is necessary to set the callback methods or functions of each interaction. When the computing engine triggers an interaction (such as event interaction between multiple nodes, temporary data storage, result reporting, status reporting, alarm notification, etc.), the corresponding node that triggers the interaction (worker or master) will inform the driver node of the content of the interaction, and the driver will call the callback method or function set in advance to handle the corresponding interaction. The specific processing logic of the callback method or function is implemented by the functional module of the platform, thereby realizing the decoupling between the computing engine and the platform when the computing engine actively triggers the interaction.
[0017] In some optional implementations, the driver node is used to instruct the platform to set the callback of the driver node by developing a functional module.
[0018] In the above technical solution, in order to realize the process that the driver calls the callback method or function set in advance to process the corresponding interaction, the driver node is used to instruct the platform to set the callback of the driver node by developing a functional module.
[0019] In some optional implementations, the callback of the driver node can be a callback method or function; the callback of the driver node can also be a network communication interface address, such as the address of an http url. By standardizing the callback network communication interface address and the format of sending and receiving data, the decoupling of the computing engine and the platform can also be achieved.
[0020] In some optional implementations, the driver node provides a series of normative interfaces, which inform the platform of the methods and specifications for setting callbacks in the form of public documents.
[0021] In the above technical solution, a series of normative interfaces are provided in the driver node for each manufacturer platform to set the callback method or function that actively triggers the interaction. The normative interface provided by the driver node informs each manufacturer platform how to set the callback method or function, as well as the specifications of the callback method or function in the form of public documents.
[0022] In some optional implementations, before the computing engine actively triggers the event interaction, it also:
[0023] For each platform, develop functional modules corresponding to the platform business code based on the driver node;
[0024] When the function module is initialized, the callback setting method and specification provided by the driver node are called to set the callback of the driver node.
[0025] In the above technical solution, different manufacturers develop their own function modules to complete the function logic according to the normative documents provided by the driver node. The function module contains two functions: 1. The platform can call the function of the computing engine through the function module (the platform actively initiates the interaction). 2. The function module sets the callback method and function in the driver node. When the computing engine actively interacts, the driver calls the callback method and function set by the function module to respond to the interaction (the computing engine actively initiates the interaction).
[0026] In some optional implementations, the functional module also integrates the computing engine's functions of obtaining registration algorithms, initiating tasks, and event communication.
[0027] In some optional embodiments, the method comprises:
[0028] The master node is used to register and discover computing resources, perform health detection, troubleshooting, fault recovery, system health and system alarm functions, and to perform load balancing scheduling of federated learning or multi-party secure computing tasks, interaction events between nodes, or routing distribution based on distribution events, to achieve functional decoupling.
[0029] In the above technical solution, the decoupling of computing engine functions, such as registration of computing resources, health check, fault removal, task scheduling, etc., can be achieved through the master-worker structure.
[0030] In some optional embodiments, the method comprises:
[0031] When calling the computing engine to perform computing tasks, the driver's functions are called according to the developer documentation of the development package, thereby calling the functions of the entire computing engine. The driver defines a standardized interface and calls it to different platforms to achieve decoupling.
[0032] In the above technical solution, the platform calls the decoupling of the computing engine, such as the platform initiating tasks and forwarding task events. This decoupling can be achieved through the driver-master-worker structure, where the driver defines a standardized interface and calls it from different platform manufacturers.
[0033] In some optional implementations, before the function module processes the corresponding interaction behavior according to the business code corresponding to the interaction information, the function module further includes:
[0034] When the computing engine actively triggers an event interaction, the master node or worker node that triggers the interaction reports the interaction information;
[0035] The middleware receives the interaction information;
[0036] The functional module obtains the interaction information from the middleware to execute the subsequent logic of the interaction through the functional module, thereby realizing the decoupling of the computing engine and the platform.
[0037] In the above technical solution, middleware modules such as message queues (MQ) are added during deployment. In scenarios with a higher security level, such as manufacturers of banks or government systems, the manufacturer's self-developed message middleware can be used. When the computing engine triggers active interaction, the interaction information can be stored in the middleware, and the data format stored in the middleware can be used as a public document. When implementing functional modules, different manufacturers can obtain corresponding interaction information from the middleware, and after parsing, the functional modules can be used to implement subsequent functional logic. This method does not use the driver's callback mechanism for the functional module, and can also achieve the decoupling between the computing engine and the platform when the computing engine actively triggers the interaction. Among them, different manufacturers develop their own functional modules to complete the functional logic based on the normative documents provided by the driver node and the normative documents of the data format of the dependent middleware. The functional module contains two functions: 1. The platform can call the function of the computing engine through the functional module (the platform actively initiates the interaction). 2. When the computing engine actively interacts, the functional module obtains the data stored in the middleware, parses the data format, and then processes the corresponding interaction event (the computing engine actively initiates the interaction).
[0038] An embodiment of the present application provides a system for decoupling a computing engine from a platform, including:
[0039] The master node and worker node are used to report the interaction information when the computing engine actively triggers an event interaction.
[0040] The functional module integrates the business codes related to the platform functions. The functional module is used to process the corresponding interactive behaviors according to the business codes corresponding to the interactive information, thereby realizing the decoupling of the computing engine and the platform.
[0041] In the above technical solution, the driver-master-worker structure is used to design the computing engine. When the computing engine triggers an interaction (such as event interaction between multiple nodes, temporary data storage, result reporting, status reporting, alarm notification, etc.), the corresponding node (worker or master) that triggers the interaction will report the interaction information, so that the functional module can process the corresponding interaction behavior according to the business code corresponding to the interaction information, thereby realizing the decoupling of the computing engine actively triggering the interaction. After decoupling, when the computing engine is integrated, the platform manufacturer will perform the adaptation, and the computing engine does not need to be adapted. Therefore, in the use scenario of interconnection and interoperability of the method of the embodiment of the present application, the computing engine can be integrated through a general integration method.
[0042] In some optional embodiments, it also includes:
[0043] The driver node is used to receive the interaction information reported by the master node or the worker node, and call the callback of the corresponding interaction of the functional module according to the interaction information.
[0044] In the above technical solution, the computing engine is designed using the driver-master-worker structure, and a series of methods or functions are provided in the driver node to set the callbacks of each interaction that the computing engine needs to actively trigger. When different manufacturers' platforms integrate our computing engine, it is necessary to set the callback methods or functions of each interaction. When the computing engine triggers an interaction (such as event interaction between multiple nodes, temporary data storage, result reporting, status reporting, alarm notification, etc.), the corresponding node that triggers the interaction (worker or master) will inform the driver node of the content of the interaction, and the driver will call the callback method or function set in advance to handle the corresponding interaction. The specific processing logic of the callback method or function is implemented by the functional module of the platform, thereby realizing the decoupling between the computing engine and the platform when the computing engine actively triggers the interaction.
[0045] In some optional implementations, the method further includes: a middleware for storing interaction information;
[0046] The master node and worker node are also used to inform the middleware of the interaction information when the computing engine actively triggers an event interaction.
[0047] Function modules are also used to obtain interaction information from middleware.
[0048] In the above technical solution, middleware modules such as message queues (MQ) are added during deployment. In scenarios with a higher security level, such as manufacturers of banks or government systems, the manufacturer's self-developed message middleware can be used. When the computing engine triggers active interaction, the interaction information can be stored in the middleware, and the data format stored in the middleware can be used as a public document. When implementing functional modules, different manufacturers can obtain corresponding interaction information from the middleware, and after parsing, the functional modules can be used to implement subsequent functional logic. This method does not use the driver's callback mechanism for the functional module, and can also achieve the decoupling between the computing engine and the platform when the computing engine actively triggers the interaction. Among them, different manufacturers develop their own functional modules to complete the functional logic based on the normative documents provided by the driver node and the normative documents of the data format of the dependent middleware. The functional module contains two functions: 1. The platform can call the function of the computing engine through the functional module (the platform actively initiates the interaction). 2. When the computing engine actively interacts, the functional module obtains the data stored in the middleware, parses the data format, and then processes the corresponding interaction event (the computing engine actively initiates the interaction). BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0050] Figure 1 A flowchart of a method for decoupling a computing engine from a platform provided in an embodiment of the present application;
[0051] Figure 2 A schematic diagram of the structure of a system for decoupling a computing engine and a platform provided in an embodiment of the present application;
[0052] Figure 3 A schematic diagram of the working process of a system in which a computing engine and a platform are decoupled in an embodiment of the present application;
[0053] Figure 4 A schematic diagram of the structure of a system in which a computing engine and a platform are decoupled according to another embodiment of the present application. DETAILED DESCRIPTION
[0054] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0055] An embodiment of the present application provides a method for decoupling a computing engine from a platform. The method is applied to multiple platform parties participating in the interaction. For each platform party, a functional module is set between the driver node of the computing engine and the platform. The functional module integrates business codes related to the platform functions. The computing engine also includes a master node and a worker node.
[0056] Please refer to Figure 1 , Figure 1 The following is a flowchart of a method for decoupling a computing engine from a platform, specifically including:
[0057] Step 100: When the computing engine actively triggers an event interaction, the master node or worker node that triggers the interaction reports the interaction information;
[0058] Step 200: The functional module processes the corresponding interaction behavior according to the business code corresponding to the interaction information, thereby realizing the decoupling of the computing engine and the platform.
[0059] In the embodiment of the present application, the driver-master-worker structure is used to design the computing engine. When the computing engine triggers an interaction (such as event interaction between multiple nodes, temporary data storage, result reporting, status reporting, alarm notification, etc.), the corresponding node (worker or master) that triggers the interaction will report the interaction information, so that the functional module can process the corresponding interaction behavior according to the business code corresponding to the interaction information, thereby realizing the decoupling of the computing engine actively triggering the interaction. After decoupling, when the computing engine is integrated, the platform manufacturer will perform the adaptation, and the computing engine does not need to be adapted. Therefore, in the use scenario of interconnection and interoperability, the computing engine can be integrated through a general integration method.
[0060] In some optional implementations, the function module is further used to set a callback of the driver node; before the function module processes the corresponding interaction behavior according to the business code corresponding to the interaction information, it also includes steps 101 to 103:
[0061] Step 101: The master node or worker node that triggers the interaction reports the interaction information to the driver node;
[0062] Step 102: The driver node receives the interaction information;
[0063] Step 103: The driver node calls the callback of the functional module corresponding to the interaction according to the interaction information.
[0064] In the embodiment of the present application, the computing engine is designed using the driver-master-worker structure, and a series of methods or functions are provided in the driver node to set the callbacks of each interaction that the computing engine needs to actively trigger. When different manufacturers' platforms integrate our computing engine, it is necessary to set the callback methods or functions of each interaction. When the computing engine triggers an interaction (such as event interaction between multiple nodes, temporary data storage, result reporting, status reporting, alarm notification, etc.), the corresponding node (worker or master) that triggers the interaction will inform the driver node of the content of the interaction, and the driver will call the callback method or function that is set in advance to process the corresponding interaction, and the specific processing logic of the callback method or function is implemented by the functional module of the platform, thereby realizing the decoupling between the computing engine and the platform when the computing engine actively triggers the interaction.
[0065] In some optional implementations, the driver node is used to instruct the platform to set the callback of the driver node by developing a functional module.
[0066] In the embodiment of the present application, in order to realize the process of driver calling the pre-set callback method or function for processing the corresponding interaction, the driver node is used to instruct the platform to set the callback of the driver node by developing a functional module.
[0067] In some optional implementations, the callback of the driver node can be a callback method or function; the callback of the driver node can also be a network communication interface address, such as the address of an http url. By standardizing the callback network communication interface address and the format of sending and receiving data, the decoupling of the computing engine and the platform can also be achieved.
[0068] In some optional implementations, the driver node provides a series of normative interfaces, which inform the platform of the methods and specifications for setting callbacks in the form of public documents.
[0069] In the embodiment of the present application, a series of normative interfaces are provided in the driver node for each manufacturer platform to set the callback method or function that actively triggers the interaction. The normative interface provided by the driver node informs each manufacturer platform how to set the callback method or function and the specification of the callback method or function in the form of public documents.
[0070] In some optional implementations, before the computing engine actively triggers the event interaction, it also:
[0071] For each platform, develop functional modules corresponding to the platform business code based on the driver node;
[0072] When the function module is initialized, the callback setting method and specification provided by the driver node are called to set the callback of the driver node.
[0073] In the embodiment of the present application, different manufacturers develop their own function modules to complete the function logic according to the normative documents provided by the driver node. The function module contains two functions: 1. The platform can call the function of the computing engine through the function module (the platform actively initiates the interaction). 2. The function module sets the callback method and function in the driver node. When the computing engine actively interacts, the driver calls the callback method and function set by the function module to respond to the interaction (the computing engine actively initiates the interaction).
[0074] In some optional implementations, the functional module also integrates the computing engine's functions of obtaining registration algorithms, initiating tasks, and event communication.
[0075] In some optional embodiments, the method comprises:
[0076] The master node is used to register and discover computing resources, perform health detection, troubleshooting, fault recovery, system health and system alarm functions, and to perform load balancing scheduling of federated learning or multi-party secure computing tasks, interaction events between nodes, or routing distribution based on distribution events, to achieve functional decoupling.
[0077] In the embodiment of the present application, the decoupling of computing engine functions, such as registration of computing resources, health check, fault removal, task scheduling, etc., can be achieved through a master-worker structure.
[0078] In some optional embodiments, the method comprises:
[0079] When calling the computing engine to perform computing tasks, the driver's functions are called according to the developer documentation of the development package, thereby calling the functions of the entire computing engine. The driver defines a standardized interface and calls it to different platforms to achieve decoupling.
[0080] In the embodiment of the present application, the platform calls the decoupling of the computing engine, such as the platform initiating tasks, forwarding task events, etc. This decoupling can be achieved through the driver-master-worker structure, where the driver defines a standardized interface and calls it to different platform manufacturers.
[0081] In some optional implementations, before the function module processes the corresponding interaction behavior according to the service code corresponding to the interaction information, the function module further includes steps 111 to 113:
[0082] Step 111: When the computing engine actively triggers an event interaction, the master node or worker node that triggers the interaction reports the interaction information;
[0083] Step 112: The middleware receives the interaction information;
[0084] Step 113: The functional module obtains the interaction information from the middleware so as to execute the subsequent logic of the interaction through the functional module, thereby realizing the decoupling of the computing engine and the platform.
[0085] In the embodiment of the present application, a middleware module, such as a message queue (MQ), is added during deployment. In scenarios with a higher security level, such as manufacturers of banks or government systems, the manufacturer's self-developed message middleware can be used. When the computing engine triggers active interaction, the interaction information can be stored in the middleware, and the data format stored in the middleware can be used as a public document. When implementing the functional module, different manufacturers can obtain the corresponding interaction information from the middleware, and after parsing, the functional module can be used to implement subsequent functional logic. This method does not use the driver's callback mechanism for the functional module, and can also achieve the decoupling between the computing engine and the platform when the computing engine actively triggers the interaction. Among them, different manufacturers develop their own functional modules to complete the functional logic based on the normative documents provided by the driver node and the normative documents of the data format of the dependent middleware. The functional module contains 2 parts of functions: 1. The platform can call the function of the computing engine through the functional module (the platform actively initiates the interaction). 2. When the computing engine actively interacts, the functional module obtains the data stored in the middleware, parses the data format, and then processes the corresponding interaction event (the computing engine actively initiates the interaction).
[0086] Please refer to Figure 2 , Figure 2 A schematic diagram of a system for decoupling a computing engine from a platform provided in an embodiment of the present application includes:
[0087] The master node and worker node are used to report the interaction information when the computing engine actively triggers an event interaction.
[0088] The functional module integrates the business codes related to the platform functions. The functional module is used to process the corresponding interactive behaviors according to the business codes corresponding to the interactive information, thereby realizing the decoupling of the computing engine and the platform.
[0089] In the embodiment of the present application, the driver-master-worker structure is used to design the computing engine. When the computing engine triggers an interaction (such as event interaction between multiple nodes, temporary data storage, result reporting, status reporting, alarm notification, etc.), the corresponding node (worker or master) that triggers the interaction will report the interaction information, so that the functional module can process the corresponding interaction behavior according to the business code corresponding to the interaction information, thereby realizing the decoupling of the computing engine actively triggering the interaction. After decoupling, when the computing engine is integrated, the platform manufacturer will perform the adaptation, and the computing engine does not need to be adapted. Therefore, in the use scenario of interconnection and interoperability, the computing engine can be integrated through a general integration method.
[0090] In some optional implementations, it also includes: a driver node, which is used to receive the interaction information reported by the master node or the worker node, and call the callback of the corresponding interaction of the functional module according to the interaction information.
[0091] In the embodiment of the present application, the computing engine is designed using the driver-master-worker structure, and a series of methods or functions are provided in the driver node to set the callbacks of each interaction that the computing engine needs to actively trigger. When different manufacturers' platforms integrate our computing engine, it is necessary to set the callback methods or functions of each interaction. When the computing engine triggers an interaction (such as event interaction between multiple nodes, temporary data storage, result reporting, status reporting, alarm notification, etc.), the corresponding node (worker or master) that triggers the interaction will inform the driver node of the content of the interaction, and the driver will call the callback method or function that is set in advance to process the corresponding interaction, and the specific processing logic of the callback method or function is implemented by the functional module of the platform, thereby realizing the decoupling between the computing engine and the platform when the computing engine actively triggers the interaction.
[0092] Please refer to Figure 3 , Figure 3 The following is a schematic diagram of the workflow of a system in which a computing engine and a platform are decoupled in an embodiment of the present application, specifically including:
[0093] Before the computing engine actively triggers event interaction, a series of normative interfaces are provided by the driver node, which inform the platform party of the method and specification of setting callbacks in the form of public documents. For each platform party, a function module corresponding to the platform business code is developed based on the driver node, and when the function module is initialized, the method and specification of setting callbacks provided by the driver node are called to set the callback of the driver node.
[0094] When the computing engine actively triggers an event interaction, the master node or worker node that triggers the interaction reports the interaction information to the driver node; the driver node receives the interaction information; and the driver node calls the callback of the corresponding interaction of the functional module according to the interaction information.
[0095] Afterwards, the functional module processes the corresponding interaction behavior according to the business code corresponding to the interaction information, thereby decoupling the computing engine from the platform.
[0096] Finally, the original link of the interaction structure and the interaction results of the functional modules are returned to the driver node, and the driver node returns to the master node or worker node that triggered the interaction.
[0097] In some optional implementations, please refer to Figure 4 , Figure 4 A structural diagram of a system in which a computing engine and a platform are decoupled according to another embodiment of the present application, the system also includes: a middleware for storing interaction information; a master node and a worker node, which are also used to inform the middleware of the interaction information when the computing engine actively triggers an event interaction, and the master node or worker node that triggers the interaction; and a functional module for obtaining interaction information from the middleware.
[0098] In the embodiment of the present application, a middleware module, such as a message queue (MQ), is added during deployment. In scenarios with a higher security level, such as manufacturers of banks or government systems, the manufacturer's self-developed message middleware can be used. When the computing engine triggers active interaction, the interaction information can be stored in the middleware, and the data format stored in the middleware can be used as a public document. When implementing the functional module, different manufacturers can obtain the corresponding interaction information from the middleware, and after parsing, the functional module can be used to implement subsequent functional logic. This method does not use the driver's callback mechanism for the functional module, and can also achieve the decoupling between the computing engine and the platform when the computing engine actively triggers the interaction. Among them, different manufacturers develop their own functional modules to complete the functional logic based on the normative documents provided by the driver node and the normative documents of the data format of the dependent middleware. The functional module contains 2 parts of functions: 1. The platform can call the function of the computing engine through the functional module (the platform actively initiates the interaction). 2. When the computing engine actively interacts, the functional module obtains the data stored in the middleware, parses the data format, and then processes the corresponding interaction event (the computing engine actively initiates the interaction).
[0099] Similarly, after the functional module obtains the data saved in the middleware, it performs interactive actions and obtains an interactive result. Due to the particularity of the middleware module, it is divided into two cases:
[0100] The first case is when the interaction does not need to return results. In this case, the interaction results are first returned to the driver node according to the functional module, and then the driver node returns the interaction results to the master node and worker node that triggered the interaction.
[0101] The second situation is when the interaction needs to return results. The functional module needs to transmit the results back to the middleware according to the specifications of the middleware data format. The computing engine obtains the results from the middleware and then parses the data.
[0102] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0103] In addition, the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0104] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0105] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.
[0106] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for decoupling a computing engine from a platform, characterized in that: The method is applied to multiple platform parties participating in the interaction. When the computing engine actively triggers an event interaction during the privacy computing process, the corresponding method is executed. For each platform party, a functional module is set between the driver node of the computing engine and the platform. The functional module integrates business codes related to the platform function. The computing engine also includes a master node and a worker node. The method comprises: When the computing engine actively triggers an event interaction, the master node or the worker node that triggers the interaction reports the interaction information, wherein the event interaction includes: event interaction between multiple nodes, temporary data storage, result reporting, status reporting, and alarm notification; The functional module processes the corresponding interaction behavior according to the business code corresponding to the interaction information, thus realizing the decoupling of the computing engine and the platform. The function module is also used to set the callback of the driver node; Before the function module processes the corresponding interaction behavior according to the business code corresponding to the interaction information, the function module further includes: The master node or the worker node that triggers the interaction reports the interaction information to the driver node; The driver node receives the interaction information; The driver node calls the callback corresponding to the interaction of the functional module according to the interaction information; The master node is used to perform registration discovery, health detection, fault removal, fault recovery, system health and system alarm functions of computing resources, as well as load balancing scheduling of tasks such as federated learning or multi-party secure computing, interactive events between nodes, or routing distribution based on distribution events, to achieve decoupling at the functional level; The method further includes: providing a middleware between the computing engine and the platform, When the computing engine triggers active interaction, the interaction information is stored in the middleware, and the data format stored in the middleware is used as a public document; The functional module obtains the corresponding interaction information from the middleware, parses the data format, and processes the corresponding interaction events; After the functional module obtains the data stored in the middleware, it performs interactive actions and obtains an interactive result, including: When the interaction does not need to return results, the interaction results are first returned to the driver node according to the functional module, and then the driver node returns the interaction results to the master node and worker node that triggered the interaction; When the interaction needs to return results, the functional module transmits the results back to the middleware according to the specifications of the middleware data format. The calculation engine obtains the results from the middleware and then parses the data.
2. The method according to claim 1, characterized in that The driver node is used to instruct the platform to set the callback of the driver node by developing the functional module.
3. The method according to claim 2, characterized in that The driver node provides a series of normative interfaces, which inform the platform of the methods and specifications for setting callbacks in the form of public documents.
4. The method according to claim 3, characterized in that Before the calculation engine actively triggers event interaction, it also: For each platform, develop functional modules corresponding to the platform business code based on the driver node; When the functional module is initialized, the method and specification for setting the callback provided by the driver node are called to set the callback of the driver node.
5. The method according to claim 1, characterized in that The functional module also integrates the computing engine's registration algorithm acquisition, task initiation and event communication functions.
6. The method according to claim 1, characterized in that include: When calling the computing engine to perform computing tasks, the driver's functions are called according to the developer documentation of the development package, thereby calling the functions of the entire computing engine. The driver defines a standardized interface and calls it to different platforms to achieve decoupling.
7. The method according to claim 1, characterized in that Before the function module processes the corresponding interaction behavior according to the business code corresponding to the interaction information, the function module further includes: When the computing engine actively triggers an event interaction, the master node or worker node that triggers the interaction reports the interaction information; The middleware receives the interaction information; The functional module obtains the interaction information from the middleware, so as to execute the subsequent logic of the interaction through the functional module, thereby realizing the decoupling of the computing engine and the platform.
8. A system in which a computing engine is decoupled from a platform, characterized in that: include: The master node and the worker node are used to report the interaction information when the computing engine actively triggers the event interaction, wherein the event interaction includes: event interaction between multiple nodes, temporary data storage, result reporting, status reporting, and alarm notification; A function module, which integrates business codes related to platform functions. The function module is used to process corresponding interaction behaviors according to business codes corresponding to interaction information, thereby realizing decoupling of the computing engine and the platform; The driver node is used to receive the interaction information reported by the master node or the worker node, and call the callback of the corresponding interaction of the functional module according to the interaction information; The master node is used to perform registration discovery, health detection, fault removal, fault recovery, system health and system alarm functions of computing resources, as well as load balancing scheduling of tasks such as federated learning or multi-party secure computing, interactive events between nodes, or routing distribution based on distribution events, to achieve decoupling at the functional level; The system further includes: a middleware is arranged between the computing engine and the platform, When the computing engine triggers active interaction, the interaction information is stored in the middleware, and the data format stored in the middleware is used as a public document; The functional module obtains the corresponding interaction information from the middleware, parses the data format, and processes the corresponding interaction events; After the functional module obtains the data stored in the middleware, it performs interactive actions and obtains an interactive result, including: When the interaction does not need to return results, the interaction results are first returned to the driver node according to the functional module, and then the driver node returns the interaction results to the master node and worker node that triggered the interaction; When the interaction needs to return results, the functional module transmits the results back to the middleware according to the specifications of the middleware data format. The calculation engine obtains the results from the middleware and then parses the data.
9. The system according to claim 8, characterized in that Also includes: Middleware, used for storing the interaction information; The master node and the worker node are also used to notify the middleware of the interaction information when the computing engine actively triggers an event interaction, and the master node or the worker node that triggers the interaction; The functional module is also used to obtain the interaction information from the middleware.
Citation Information
Patent Citations
Business supporting system and method based on business events developing platform
CN101232626A
Cross-service system process monitoring device and method, corresponding equipment and storage medium
CN112200505A
