Privacy task scheduling method and device based on Kubernetes cluster interconnection scheduling framework
Patent Information
- Application Number
- CN202311079940.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-24
- Publication Date
- 2026-08-28
- Estimated Expiration
- 2043-08-24
AI Technical Summary
[0030]This specification provides an embodiment of a privacy-preserving task scheduling method based on a Kubernetes cluster interconnection scheduling framework. Multiple plugins corresponding to various communication protocols are pre-integrated into a first scheduling system. Then, when the first scheduling system sends a target request to a second scheduling system, the target plugin corresponding to the target protocol commonly supported by both scheduling systems is used to construct the request parameters for the target request. This enables the second scheduling system to identify the target request, thereby achieving fast and accurate cross-scheduling system privacy-preserving task scheduling.
Smart Images

Figure CN117119078B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to one or more embodiments in the field of computer technology, and in particular to a privacy task scheduling method and apparatus based on a Kubernetes cluster interconnection and interoperability scheduling framework. Background Technology
[0002] Privacy-preserving computation tasks (hereinafter referred to as privacy tasks) are typically completed collaboratively by multiple parties; however, these parties may correspond to scheduling systems based on different scheduling frameworks. For example, some scheduling systems may be based on an interoperable scheduling framework for Kubernetes clusters. To address this scenario, a privacy task scheduling method based on an interoperable scheduling framework for Kubernetes clusters is needed. Summary of the Invention
[0003] This specification describes one or more embodiments of a privacy task scheduling method based on a Kubernetes cluster interconnection scheduling framework, which can quickly and accurately achieve privacy task scheduling across scheduling systems.
[0004] According to a first aspect, a privacy-preserving task scheduling method based on a Kubernetes cluster interconnection and interoperability scheduling framework is provided, involving first and second scheduling systems corresponding to the first and second parties, respectively; the first scheduling system performs scheduling processing based on the Kubernetes cluster interconnection and interoperability scheduling framework and includes a Job module and a first communication module, wherein the first communication module integrates multiple plugins corresponding to multiple communication protocols; the second scheduling system includes a second communication module; the method includes:
[0005] The Job module acquires Job resources and selects a target protocol for them; the Job resources include target privacy tasks;
[0006] The first communication module uses the target plugin corresponding to the target protocol among the plurality of plugins to call the job creation interface of the target protocol to notify the second communication module to create a target job, including the target privacy task;
[0007] The Job module starts the Job resource in response to the successful creation of the target job in the second scheduling system.
[0008] When the first communication module detects that the Job resource has been started, it calls the job start interface of the target protocol to notify the second communication module to start the target job.
[0009] In response to the successful startup of the target job in the second scheduling system, the Job module creates a Task resource to describe the target privacy task.
[0010] When the first communication module detects that the Task resource has been created, it calls the task startup interface of the target protocol to notify the second communication module to start the target privacy task.
[0011] According to the second aspect, a privacy-preserving task scheduling method based on a Kubernetes cluster interconnection and interoperability scheduling framework is provided, involving first and second scheduling systems corresponding to the first and second parties, respectively; the second scheduling system performs scheduling processing based on the Kubernetes cluster interconnection and interoperability scheduling framework and includes a second communication module, which integrates multiple plugins corresponding to multiple communication protocols; the first scheduling system includes a first communication module; the method is executed through the second communication module, including:
[0012] Receive a first call to the job creation interface for the target protocol from the first communication module;
[0013] In response to the first call, a Job resource is created using the target plugin corresponding to the target protocol among the plurality of plugins, and a first notification of successful job creation is returned to the first communication module; the Job resource includes a target privacy task.
[0014] In response to receiving a second call to the job launch interface for the target protocol from the first communication module, the Job resource is launched, and a second notification of successful job launch is returned to the first communication module;
[0015] In response to receiving a third call from the first communication module to the launch task interface for the target protocol, a Task resource for describing the target privacy task is created.
[0016] According to a third aspect, a privacy-preserving task scheduling device based on a Kubernetes cluster interconnection and interoperability scheduling framework is provided, which is configured in a first scheduling system, the first scheduling system performing scheduling processing based on the Kubernetes cluster interconnection and interoperability scheduling framework; the device includes:
[0017] An acquisition unit is used to acquire Job resources and select a target protocol for them; the Job resources include target privacy tasks;
[0018] The calling unit is used to call the job creation interface of the target protocol using the target plugin among multiple plugins that corresponds to the target protocol, so as to notify the second scheduling system to create a target job, including the target privacy task;
[0019] A startup unit is configured to start the Job resource in response to the successful creation of the target job in the second scheduling system.
[0020] The calling unit is also used to listen for the start of the Job resource and call the start job interface of the target protocol to notify the second scheduling system to start the target job;
[0021] A creation unit is used to create a Task resource describing the target privacy task in response to the successful startup of the target job in the second scheduling system.
[0022] The calling unit is also used to listen for the creation of the Task resource and call the startup task interface of the target protocol to notify the second scheduling system to start the target privacy task.
[0023] According to the fourth aspect, a privacy-preserving task scheduling device based on a Kubernetes cluster interconnection and interoperability scheduling framework is provided, which is set in a second scheduling system, the second scheduling system performing scheduling processing based on the Kubernetes cluster interconnection and interoperability scheduling framework; the device includes:
[0024] The receiving unit is used to receive a first call to the job creation interface for the target protocol from the first scheduling system;
[0025] A creation unit is configured to, in response to the first call, create a Job resource using a target plugin from among multiple plugins corresponding to the target protocol, and return a first notification to the first scheduling system that the job creation was successful; the Job resource includes a target privacy task;
[0026] The startup unit is configured to, in response to receiving a second call to the startup job interface for the target protocol from the first scheduling system, start the Job resource and return a second notification of successful startup to the first scheduling system;
[0027] The creation unit is further configured to, in response to receiving a third call from the first scheduling system to the launch task interface for the target protocol, create a Task resource for describing the target privacy task.
[0028] According to a fifth aspect, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed in a computer, causes the computer to perform the method of the first or second aspect.
[0029] According to a sixth aspect, a computing device is provided, including a memory and a processor, wherein the memory stores executable code, and the processor, when executing the executable code, implements the method of the first aspect or the second aspect.
[0030] This specification provides an embodiment of a privacy-preserving task scheduling method based on a Kubernetes cluster interconnection scheduling framework. Multiple plugins corresponding to various communication protocols are pre-integrated into a first scheduling system. Then, when the first scheduling system sends a target request to a second scheduling system, the target plugin corresponding to the target protocol commonly supported by both scheduling systems is used to construct the request parameters for the target request. This enables the second scheduling system to identify the target request, thereby achieving fast and accurate cross-scheduling system privacy-preserving task scheduling. Attached Figure Description
[0031] To more clearly illustrate the technical solutions of the embodiments in this specification, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0032] Figure 1 This is a schematic diagram illustrating an implementation scenario of one embodiment disclosed in this specification;
[0033] Figure 2 A schematic diagram illustrating a privacy-preserving task scheduling method based on a Kubernetes cluster interconnection scheduling framework according to one embodiment is shown.
[0034] Figure 3 A schematic diagram of a privacy-preserving task scheduling method based on a Kubernetes cluster interconnection scheduling framework, according to another embodiment, is shown.
[0035] Figure 4 A schematic diagram of a privacy task scheduling device based on a Kubernetes cluster interconnection scheduling framework according to one embodiment is shown.
[0036] Figure 5 A schematic diagram of a privacy task scheduling device based on a Kubernetes cluster interconnection scheduling framework according to another embodiment is shown. Detailed Implementation
[0037] The solution provided in this specification will now be described with reference to the accompanying drawings.
[0038] Privacy tasks typically involve multiple participants collaborating on computations without leaving their respective data domains to obtain the final results. For example, a privacy task could be a multi-party collaborative modeling task, where each participant holds a portion of the training data, and ultimately each participant receives a secret-shared slice of the model parameters.
[0039] However, as mentioned above, the scheduling systems of some participants in a privacy task may be based on the Kubernetes cluster interconnection scheduling framework. Therefore, this specification provides a privacy task scheduling method based on the Kubernetes cluster interconnection scheduling framework. Multiple plugins corresponding to multiple communication protocols are pre-integrated into a first scheduling system. Then, when the first scheduling system sends a target request to a second scheduling system, the target plugin corresponding to the target protocol commonly supported by both scheduling systems is used to construct the request parameters of the target request. This allows the second scheduling system to identify the target request, thereby enabling fast and accurate cross-scheduling system privacy task scheduling. The scheduling method is described in detail below.
[0040] Figure 1 This is a schematic diagram illustrating an implementation scenario of one of the embodiments disclosed in this specification. Figure 1 In this diagram, initiator A corresponds to the first scheduling system, and participant B corresponds to the second scheduling system. The first scheduling system performs scheduling processing based on the Kubernetes cluster interconnection scheduling framework, and it may include a Job module and a first communication module, which integrates multiple plugins corresponding to various communication protocols. Furthermore, the first scheduling system may also include a Task module, etc. The second scheduling system may include a second communication module, and its scheduling framework may differ from that of the first scheduling system.
[0041] Figure 1 In this process, the Job module can receive Job resources submitted by users and select a target protocol jointly supported by initiator A and participant B. After selecting the target protocol, the first communication module can use the target plugin corresponding to that protocol to send job creation requests, job start requests, and task start requests to the second communication module to initiate a target privacy task in the second scheduling system. This target privacy task corresponds to a Task resource created locally by the first scheduling system. This completes the cross-scheduling system privacy task scheduling method.
[0042] It should be understood that Figure 1 This is merely an illustrative example. In practical applications, within a Kubernetes cluster, namespace A can be created for initiator A, and namespace B can be created for participant B. Namespace A can record several communication protocols supported by initiator A, and namespace B can record several communication protocols supported by participant B, etc. This specification does not limit this.
[0043] Finally, the number of participants is not limited to two; it can be three or more.
[0044] Figure 2 This diagram illustrates a privacy-preserving task scheduling method based on a Kubernetes cluster interconnection scheduling framework according to one embodiment. The method involves first and second scheduling systems corresponding to a first party (also called the initiator) and a second party (also called the participant), respectively. The first scheduling system performs scheduling processing based on the Kubernetes cluster interconnection scheduling framework and includes a Job module and a first communication module. The first communication module integrates multiple plugins corresponding to multiple communication protocols. Furthermore, the first communication system also includes a Task module. The second scheduling system includes a second communication module.
[0045] like Figure 2 As shown, the method may include the following steps:
[0046] In step S202, the Job module obtains the Job resources and selects a target protocol for them.
[0047] Here, the Job module can be, for example, Figure 1 The initiator A corresponds to the Job module in the first scheduling system.
[0048] In one embodiment, the aforementioned Job resource can be created by the task submitter (e.g., a user) using the command-line tool (kubectl) of the Kubernetes cluster.
[0049] In another embodiment, the aforementioned Job resource can be created by the task submitter (e.g., an application) by calling the Kubernetes cluster's Application Programming Interface (API).
[0050] In a more specific embodiment, the task submitter creates the aforementioned Job resource by creating a CR instance of a Custom Resource Definition (CRD). This CRD can be used to extend the resources of the Kubernetes cluster.
[0051] In one embodiment, the Job resource described above may include several privacy tasks and their descriptions, wherein each privacy task is identified by a TaskID. Furthermore, the Job resource may also include fields such as protocol labels, job stage, and first resource phase. The value of the job stage may include any of the following: create, start, and stop. The value of the first resource phase may include any of the following: pending, running, succeeded, and failed.
[0052] In the embodiments described in this specification, the Job module can request in advance from the Kubernetes cluster's control plane (APIServer) to monitor changes to Job resources (including Job resource creation, modification, and deletion) and changes to Task resources (described later) (including Task resource creation, modification, and deletion).
[0053] In one specific implementation, monitoring changes to Job or Task resources can be achieved using Kubernetes' list-watch mechanism.
[0054] Specifically, the Job module detects the creation of Job resources in the Kubernetes cluster, i.e., it acquires the Job resources. The Job module then reads the supported communication protocols from the metadata labels of the first namespace (corresponding to the first party) and the supported communication protocols from the metadata labels of the second namespace (corresponding to the second party). From the communication protocols supported by both the first and second parties, the module selects a communication protocol commonly supported by both parties as the target protocol.
[0055] In one example, the target protocol could be the Beijing FinTech Industry Alliance (BFIA) protocol.
[0056] After selecting the target protocol, the Job module can set the value of the protocol tag in the Job resource to the target protocol.
[0057] Of course, in practical applications, before the Job module selects a target protocol for the Job resource, the Job resource can be preprocessed. This preprocessing can include at least one of the following: validating the legality of the Job resource, filling in default fields, and generating the TaskID of the privacy task, etc.
[0058] Furthermore, after the Job module selects a target protocol for the Job resource, the value of the job phase in the Job resource can be set to the creation phase. This completes the creation of the Job resource in the Kubernetes cluster of the first scheduling system.
[0059] In step S204, the first communication module uses the target plugin corresponding to the target protocol among multiple plugins to call the target protocol's job creation interface to notify the second communication module to create a target job, which includes a target privacy task.
[0060] The first communication module can use a list-watch mechanism to monitor changes to Job resources (including Job resource creation, modification, and deletion) and Task resources (including Task resource creation, modification, and deletion) in the Kubernetes cluster.
[0061] Specifically, the first communication module detects that the Job resource has changed from the job phase to the creation phase. Based on the protocol tag value (i.e., the target protocol), it selects a target plugin from among multiple integrated plugins and uses this target plugin to parse the various fields in the Job resource to construct the request parameters for the target protocol's job creation interface. Then, the target plugin uses the constructed request parameters to call the job creation interface, sending a job creation request (or job creation notification) to the second communication module. The second communication module responds to this job creation request and creates the target job in the second scheduling system. The target job here includes several privacy tasks stored in the aforementioned Job resource, and each privacy task is identified by a TaskID.
[0062] To clarify, if the target job is successfully created in the second scheduling system, the second communication module can return a notification of successful job creation to the first communication module. This allows the first communication module to update the Job resource, for example, by recording the successful job creation information in the second scheduling system. Conversely, if the target job fails to be created in the second scheduling system, the second communication module can return a notification of job creation failure to the first communication module. This allows the first communication module to update the Job resource, for example, by recording the failed job creation information in the second scheduling system.
[0063] It should be understood that the Job resource records information about whether the job creation was successful or failed. If the Job resource is changed, the Job module can listen for the change.
[0064] In step S206, the Job module responds to the successful creation of the target job in the second scheduling system by starting the Job resources.
[0065] Specifically, when the Job module detects a change in the Job resource, specifically a change that records information indicating successful job creation in the second scheduling system, the Job module can update the job phase value of the Job resource to the start phase, thereby starting the Job resource. Alternatively, when the Job module detects a change in the Job resource, specifically a change that records information indicating job creation failure in the second scheduling system, the Job module can update the job phase value of the Job resource to the stop phase, thereby stopping the Job resource.
[0066] It should be understood that when the Job resource is updated from the job phase to the start phase or the stop phase, the Job resource has changed, and the first communication module can detect this change.
[0067] In step S208, the first communication module detects that the Job resource has been started and calls the target protocol's job start interface to notify the second communication module to start the target job.
[0068] In addition, if the first communication module detects that the Job resource has been stopped, it can call the target protocol's stop job interface to notify the second communication module to stop the target job.
[0069] It should be noted that in the embodiments of this specification, each call to the interface of the target protocol (including the job creation interface, job start interface, task start interface, running status query interface, and job stop interface, etc.) can utilize the corresponding target plugin to parse the Job resources and / or Task resources.
[0070] Specifically, when calling the aforementioned job startup interface, the target plugin can be used to parse the Job resource to construct the request parameters for the job startup interface. In one example, these request parameters include at least the JobID of the Job resource. Then, based on these request parameters, the job startup interface can be called to send a job startup request (or job startup notification) to the second communication module. In response to the job startup request, the second communication module starts the target job in the second scheduling system.
[0071] Subsequently, if the target job successfully starts in the second scheduling system, the second communication module can return a notification of successful job startup to the first communication module. The first communication module then updates the Job resource, for example, by recording the successful job startup information in the Job resource. Conversely, if the target job fails to start in the second scheduling system, the second communication module can return a notification of job startup failure to the first communication module. The first communication module then updates the Job resource, for example, by recording the failed job startup information in the Job resource.
[0072] After the Job resource records information about a successful or failed job startup, and then changes occur to the Job resource, the Job module can detect these changes.
[0073] In step S210, the Job module, in response to the successful startup of the target job in the second scheduling system, creates a Task resource to describe the target privacy task.
[0074] Specifically, when the Job module detects a change in the Job resource, specifically a change that records information about a job successfully starting in the second scheduling system, the Job module creates a Task resource in the Kubernetes cluster to describe the target privacy task included in the Job resource. Furthermore, this Task resource can include the participant task running status (partyTaskStatus, or simply task running status) and the second resource status (phase).
[0075] Alternatively, if the Job module detects a change in the Job resource, specifically a record in the Job resource indicating a failed job startup in the second scheduling system, the Job module can update the job phase value of the Job resource to the stop phase, thereby stopping the Job resource.
[0076] It should be understood that when the Job module updates the Job resource's job phase to the stopped phase, the Job resource has changed, and the first communication module can detect this change. Specifically, when the first communication module detects that the Job resource has been stopped, it can call the target protocol's stop job interface to notify the second communication module to stop the target job.
[0077] It should also be understood that after the Job module creates the Task resource, if the Task resource changes, the first communication module can detect the change.
[0078] In step S212, the first communication module detects that the Task resource has been created and calls the target protocol's task startup interface to notify the second communication module to start the target privacy task.
[0079] Specifically, when calling the aforementioned task startup interface, the target plugin can be used to parse the Task resource to construct the request parameters for the task startup interface. In one example, these request parameters include at least the TaskID of the target privacy task. Then, based on these request parameters, the task startup interface can be called to send a task startup request (or task startup notification) to the second communication module. In response to the task startup request, the second communication module starts the target privacy task in the second scheduling system.
[0080] Subsequently, if the aforementioned target privacy task successfully starts in the second scheduling system, the second communication module can return a notification of successful task startup to the first communication module. The first communication module then updates the Task resources, for example, by recording the information that the task started successfully in the second scheduling system within the Task resources. Conversely, if the aforementioned target privacy task fails to start in the second scheduling system, the second communication module can return a notification of task startup failure to the first communication module. The first communication module then updates the Task resources, for example, by recording the information that the job failed to start in the second scheduling system within the Task resources.
[0081] After the Task resource records information indicating whether the task started successfully or failed, any changes to the Task resource can be detected by the first communication module and the Task module. Here, the Task module pre-registers with the Kubernetes cluster control plane to monitor changes to the Task resource.
[0082] Specifically, in response to the successful initiation of the target privacy task in the second scheduling system, the first communication module periodically calls the target protocol's query runtime status interface to query the runtime status of the target privacy task. Then, based on the runtime status of the target privacy task, the first communication module sets the value in the Task resource corresponding to the second party's task runtime status. For example, if the target privacy task's runtime status in the second scheduling system is a failure, the Task module updates the value in the Task resource corresponding to the second party's task runtime status to failure; the Task module aggregates the task runtime statuses of all participating parties and updates the second resource status (phase) in the Task resource to failure. Similarly, if the target privacy task's runtime status in the second scheduling system is a success, the Task module updates the value in the Task resource corresponding to the second party's task runtime status to success; the Task module aggregates the task runtime statuses of all participating parties and updates the second resource status (phase) in the Task resource to success.
[0083] Of course, in practical applications, after the target privacy task is successfully started by the second scheduling system, the second communication module can also periodically send the running status of the target privacy task to the first communication module. This specification does not limit this.
[0084] It should be understood that after the second resource status in the Task resource is set to a failure or success status, the Task resource has changed, and the Job module can listen for this change.
[0085] In one embodiment, the Job module detects that the status of the second resource in the Task resource has changed to a failure status and will stop the Job resource. The first communication module, upon detecting that the Job resource has been stopped, calls the target protocol's stop job interface to notify the second communication module to stop the target job.
[0086] In addition, the first communication module can also call the stop task interface of the target protocol to notify the second communication module to stop the target privacy task.
[0087] In summary, the privacy task scheduling method based on the Kubernetes cluster interconnection scheduling framework provided in this specification allows the initiator's scheduling system (i.e., the first scheduling system) to pre-integrate multiple plugins corresponding to multiple communication protocols when performing scheduling processing based on the Kubernetes cluster interconnection scheduling framework. Then, when the first scheduling system sends a target request to the participant's scheduling system (i.e., the second scheduling system), it uses the target plugin corresponding to the target protocol commonly supported by both scheduling systems among the multiple communication protocols to construct the request parameters for the target request. This enables the second scheduling system to identify the target request, thereby achieving fast and accurate cross-scheduling system privacy task scheduling.
[0088] It should be understood that the above describes the scheduling method for privacy tasks when the initiator's scheduling system is based on the Kubernetes cluster interconnection scheduling framework. The following describes the scheduling method for privacy tasks when the participant's scheduling system is based on the Kubernetes cluster interconnection scheduling framework.
[0089] Figure 3 This diagram illustrates a privacy-preserving task scheduling method based on a Kubernetes cluster interconnection scheduling framework according to another embodiment. The method involves first and second scheduling systems corresponding to a first party (also called the initiator) and a second party (also called the participant), respectively. The second scheduling system performs scheduling processing based on the Kubernetes cluster interconnection scheduling framework and includes a second communication module. This second communication module integrates multiple plugins corresponding to multiple communication protocols. Furthermore, the second communication system also includes a Job module and a Task module. The first scheduling system includes the first communication module.
[0090] like Figure 3 As shown, the method may include the following steps:
[0091] In step S302, the second communication module receives a first call to the job creation interface for the target protocol from the first communication module.
[0092] The target protocol mentioned above can be a communication protocol that is jointly supported by the first communication module from several communication protocols supported by the first and second parties respectively.
[0093] In one embodiment, the first communication module may first create a target job in a first scheduling system, the target job including a target privacy task. Then, the first communication module may invoke the job creation interface of the selected target protocol. It should be understood that the aforementioned first invocation may include a first parameter (i.e., the request parameter of the job creation interface).
[0094] In step S304, the second communication module responds to the first call by creating a Job resource using the target plugin corresponding to the target protocol among multiple plugins, and returns a first notification to the first communication module that the job creation was successful.
[0095] Specifically, the second communication module uses the aforementioned target plugin to parse the first parameter to determine the field values of each field in the Job resource. Here, the fields included in the Job resource can be found above, including at least the target privacy task. Then, based on the determined field values, the Job resource can be created in the Kubernetes cluster.
[0096] To clarify, if the target plugin successfully parses the first parameter and successfully creates the Job resource, the second communication module can return a notification of successful job creation (i.e., the first notification) to the first communication module. Conversely, if the target plugin fails to parse the first parameter or fails to create the Job resource, the second communication module can return a notification of job creation failure to the first communication module, thereby causing the first scheduling system to stop task scheduling.
[0097] In step S306, the second communication module responds to receiving a second call to the job startup interface for the target protocol from the first communication module, starts the Job resource, and returns a second notification to the first communication module that the job startup was successful.
[0098] It should be understood that the second call here can be sent by the first communication module in response to the aforementioned first notification.
[0099] In the embodiments described in this specification, the second communication module can parse each interface call (including the aforementioned first and second calls, etc.) received from the first communication module using a target plugin. Specifically, for the aforementioned second call, after parsing it using the target plugin, a JobID can be obtained, thereby allowing the second communication module to locate and start the Job resource based on the JobID.
[0100] In one embodiment, starting a Job resource may include updating the value of the Job resource's job phase to the startup phase.
[0101] If the second communication module successfully starts the Job resource, it can return a notification of successful job startup (i.e., the second notification) to the first communication module. Conversely, if the second communication module fails to start the Job resource, it can return a notification of job startup failure to the first communication module, thereby causing the first scheduling system to stop task scheduling.
[0102] In step S308, the second communication module responds to receiving a third call from the first communication module to the launch task interface for the target protocol and creates a Task resource to describe the target privacy task.
[0103] It should be understood that the third call here can be sent by the first communication module in response to the aforementioned second notification. Specifically, after the second communication module parses the aforementioned third call using the target plugin, it can obtain the JobID of the target job and the Name and TaskID of the target privacy task. The second communication module updates the TaskID in the target privacy task under the corresponding Job resource. After the Job module detects the change in the Job resource, it creates the Task resource corresponding to the target privacy task with the aforementioned TaskID. The various fields included in this Task resource can be found above and will not be repeated here.
[0104] Specifically, after the second communication module successfully creates the Task resource, it can return a notification of successful task startup (hereinafter referred to as the third notification) to the first communication module. Conversely, if the second communication module fails to create the Task resource, it can return a notification of task startup failure to the first communication module, thereby causing the first scheduling system to stop task scheduling.
[0105] It should be understood that after the second communication module successfully creates the Task resource, it can also receive a call to the query running status interface for the target protocol from the first communication module, and in response to the call, the second communication module can return the running status of the target privacy task to the first communication module.
[0106] Alternatively, after the second communication module successfully creates the Task resource, the second communication module can periodically send the running status of the target privacy task to the first communication module.
[0107] Of course, in practical applications, the second communication module can also receive a fourth call to the stop job interface for the target protocol from the first communication module. In response to this fourth call, the second communication module stops the Job resource, that is, it updates the value of the job stage in the Job resource to the stop stage.
[0108] If the second communication module successfully updates the Job resources, it sends a notification to the first communication module indicating that the job has been successfully stopped. Updating the Job resources here refers to updating the job stage value in the Job resources to the stop stage. Otherwise, if the second communication module fails to update the Job resources, it sends a notification to the first communication module indicating that the job stop has failed.
[0109] In addition, the second communication module can also call the target protocol's push job status interface to notify the first communication module to query the target job's job status. Based on the received job status, the value of the first resource status in the Job resources is set.
[0110] Finally, the second communication module can also receive a fifth call to the stop task interface for the target protocol from the first communication module. In response to this fifth call, the second communication module stops the Task resource.
[0111] Specifically, if the second communication module successfully stops the Task resource, it returns a notification of successful task stopping to the first communication module. Otherwise, if the second communication module fails to stop the Task resource, it returns a notification of task stopping failure to the first communication module.
[0112] In summary, the privacy task scheduling method based on the Kubernetes cluster interconnection scheduling framework provided in this specification allows for the pre-integration of multiple plugins corresponding to multiple communication protocols in the scheduling system corresponding to the participating party (i.e., the second scheduling system) when performing scheduling processing based on the Kubernetes cluster interconnection scheduling framework. Subsequently, when the second scheduling system receives a target request from the scheduling system corresponding to the initiating party (i.e., the first scheduling system), it utilizes the target plugin corresponding to the target protocol commonly supported by both scheduling systems among the multiple communication protocols to parse and identify the request parameters of the target request. This enables fast and accurate cross-scheduling system privacy task scheduling.
[0113] In summary, this solution has the following advantages:
[0114] 1) The communication module can integrate multiple plugins corresponding to different communication protocols. Through these plugins, privacy tasks can be scheduled quickly and easily between scheduling systems based on different scheduling frameworks.
[0115] 2) The scheduling system based on the Kubernetes cluster scheduling framework communicates with external scheduling systems through job or task APIs, shielding the complex internal details of job and task processing.
[0116] 3) The Job and Task modules are used to process Job and Task resources in the Kubernetes cluster, and can work together with the communication module to schedule privacy tasks across scheduling systems.
[0117] Corresponding to the above-described privacy task scheduling method based on the Kubernetes cluster interconnection scheduling framework, one embodiment of this specification also provides a privacy task scheduling device based on the Kubernetes cluster interconnection scheduling framework, which is set in a first scheduling system. This first scheduling system performs scheduling processing based on the Kubernetes cluster interconnection scheduling framework. Figure 4 As shown, the device may include:
[0118] The acquisition unit 402 is used to acquire Job resources and select a target protocol for them, the Job resources including target privacy tasks.
[0119] Calling unit 404 is used to call the target protocol's job creation interface using the target plugin among multiple plugins that corresponds to the target protocol, in order to notify the second scheduling system to create a target job, including a target privacy task.
[0120] The startup unit 406 is used to start the Job resources in response to the successful creation of the target job in the second scheduling system.
[0121] Calling unit 404 is also used to listen for the start of Job resources and call the target protocol's start job interface to notify the second scheduling system to start the target job.
[0122] Create unit 408 to create Task resources describing the target privacy task in response to the successful startup of the target job in the second scheduling system.
[0123] Call unit 404 is also used to listen for the creation of Task resources and call the target protocol's start task interface to notify the second scheduling system to start the target privacy task.
[0124] In one embodiment, the scheduling framework of the second scheduling system differs from that of the first scheduling system.
[0125] In one embodiment, the acquisition unit 402 is specifically used for:
[0126] From the metadata tags of the first and second namespaces corresponding to the first and second parties in the Kubernetes cluster, read the communication protocols supported by the first and second parties respectively.
[0127] From the communication protocols supported by the first and second parties respectively, a communication protocol jointly supported by the first and second parties is selected as the target protocol.
[0128] In one embodiment, the device further includes:
[0129] Stop unit 410 is used to stop Job resources in response to the failure of the target job to be created in the second scheduling system;
[0130] Calling unit 404 is also used to listen for the Job resource being stopped and call the target protocol's stop job interface to notify the second scheduling system to stop the target job.
[0131] In one embodiment, the stopping unit 410 is further configured to stop the Job resource in response to the failure of the target job to start in the second scheduling system;
[0132] Calling unit 404 is also used to listen for the Job resource being stopped and call the target protocol's stop job interface to notify the second scheduling system to stop the target job.
[0133] In one embodiment, the Task resource includes task running status; the device also includes a first setting unit 412.
[0134] Calling unit 404 is also used to call the target protocol's query running status interface in response to the successful startup of the target privacy task in the second scheduling system, so as to query the running status of the target privacy task;
[0135] The first setting unit 412 is used to set the value in the Task resource corresponding to the running status of the second party according to the running status of the target privacy task.
[0136] In one embodiment, the first scheduling system further includes a Task module; the Job resource further includes a first resource state, and the Task resource further includes a second resource state; the device further includes: a second setting unit 414;
[0137] The second setting unit 414 is used to listen for the change of the second resource status to a failure status, set the first resource status to a failure status, and stop the Job resource; wherein, the second resource status is determined by the Task module by aggregating the task running status of each participant;
[0138] Calling unit 404 is also used to listen for the Job resource being stopped and call the target protocol's stop job interface to notify the second scheduling system to stop the target job.
[0139] In one embodiment, the calling unit 404 is further configured to call the stop task interface of the target protocol to notify the second scheduling system to stop the target privacy task.
[0140] The functions of each functional unit of the apparatus in the above embodiments of this specification can be implemented through the steps of the above method embodiments. Therefore, the specific working process of the apparatus provided in one embodiment of this specification will not be repeated here.
[0141] This specification provides an embodiment of a privacy task scheduling device based on a Kubernetes cluster interconnection and interoperability scheduling framework, which can quickly and accurately achieve privacy task scheduling across scheduling systems.
[0142] Corresponding to the above-described privacy task scheduling method based on the Kubernetes cluster interconnection scheduling framework, one embodiment of this specification also provides a privacy task scheduling device based on the Kubernetes cluster interconnection scheduling framework, which is set in a second scheduling system. This second scheduling system performs scheduling processing based on the Kubernetes cluster interconnection scheduling framework. Figure 5 As shown, the device may include:
[0143] The receiving unit 502 is used to receive a first call to the job creation interface for the target protocol from the first scheduling system.
[0144] Creation unit 504 is used to respond to the first call, create a Job resource using a target plugin corresponding to the target protocol among multiple plugins, and return a first notification of successful job creation to the first scheduling system. The Job resource includes a target privacy task.
[0145] The startup unit 506 is configured to, in response to receiving a second call to the startup job interface for the target protocol from the first scheduling system, start the Job resource and return a second notification of successful startup to the first scheduling system.
[0146] Creation unit 504 is also configured to, in response to receiving a third call to the launch task interface for the target protocol from the first scheduling system, create a Task resource for describing the target privacy task.
[0147] In one embodiment, the device further includes:
[0148] Stop unit 508 is used to stop Job resources in response to receiving a fourth call to the stop job interface for the target protocol from the first scheduling system.
[0149] In one embodiment, the device further includes:
[0150] The sending unit 510 is used to periodically send the running status of the target privacy task to the first scheduling system.
[0151] In one embodiment, the first call is sent by a first scheduling system after the target job is created; the Job resource also includes a first resource status; the apparatus further includes:
[0152] Calling unit 512 is used to call the target protocol's push job status interface to notify the first scheduling system to query the job status of the target job;
[0153] Setting unit 514 is used to set the value of the first resource status according to the received job status.
[0154] The functions of each functional unit of the apparatus in the above embodiments of this specification can be implemented through the steps of the above method embodiments. Therefore, the specific working process of the apparatus provided in one embodiment of this specification will not be repeated here.
[0155] This specification provides an embodiment of a privacy task scheduling device based on a Kubernetes cluster interconnection and interoperability scheduling framework, which can quickly and accurately achieve privacy task scheduling across scheduling systems.
[0156] According to another embodiment, a computer-readable storage medium is also provided, on which a computer program is stored, which, when executed in a computer, causes the computer to perform a combination Figure 2 or Figure 3 The method described.
[0157] According to another embodiment, a computing device is also provided, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, it implements a combination... Figure 2 or Figure 3 The method described.
[0158] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the medium or device embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0159] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0160] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of this specification. It should be understood that the above description is only a specific embodiment of this specification and is not intended to limit the scope of protection of this specification. Any modifications, equivalent substitutions, improvements, etc., made on the basis of the technical solution of this specification should be included within the scope of protection of this specification.
Claims
1. A privacy-preserving task scheduling method based on a Kubernetes cluster interconnection and interoperability scheduling framework, involving first and second scheduling systems corresponding to the first and second parties respectively; the first scheduling system performs scheduling processing based on the Kubernetes cluster interconnection and interoperability scheduling framework, and includes a Job module and a first communication module, wherein the first communication module integrates multiple plugins corresponding to multiple communication protocols; The second scheduling system includes a second communication module; the method includes: The Job module acquires Job resources and selects a target protocol for them; the Job resources include target privacy tasks; The first communication module uses the target plugin corresponding to the target protocol among the plurality of plugins to call the job creation interface of the target protocol to notify the second communication module to create a target job, including the target privacy task; The Job module starts the Job resource in response to the successful creation of the target job in the second scheduling system. When the first communication module detects that the Job resource has been started, it calls the job start interface of the target protocol to notify the second communication module to start the target job. In response to the successful startup of the target job in the second scheduling system, the Job module creates a Task resource to describe the target privacy task. When the first communication module detects that the Task resource has been created, it calls the task startup interface of the target protocol to notify the second communication module to start the target privacy task.
2. The method according to claim 1, wherein, The scheduling framework of the second scheduling system is different from that of the first scheduling system.
3. The method according to claim 1, wherein, The selection of a target protocol includes: From the tags of the metadata of the first and second namespaces corresponding to the first and second parties in the Kubernetes cluster, read the several communication protocols supported by the first and second parties respectively. From the several communication protocols supported by the first and second parties respectively, a communication protocol jointly supported by the first and second parties is selected as the target protocol.
4. The method according to claim 1, further comprising: The Job module stops the Job resources in response to the failure of the target job to be created in the second scheduling system. When the first communication module detects that the Job resource has been stopped, it calls the stop job interface of the target protocol to notify the second communication module to stop the target job.
5. The method according to claim 1, further comprising: The Job module stops the Job resources in response to the failure of the target job to start in the second scheduling system. When the first communication module detects that the Job resource has been stopped, it calls the stop job interface of the target protocol to notify the second communication module to stop the target job.
6. The method according to claim 1, wherein, The Task resources include the task running status; the method further includes: In response to the successful startup of the target privacy task in the second scheduling system, the first communication module calls the query running status interface of the target protocol to query the running status of the target privacy task; The first communication module sets the value in the Task resource corresponding to the running status of the second party based on the running status of the target privacy task.
7. The method according to claim 6, wherein, The first scheduling system further includes a Task module; the Job resource further includes a first resource state, and the Task resource further includes a second resource state; the method further includes: The Job module detects that the second resource status has changed to a failure status, sets the first resource status to a failure status, and stops the Job resource; wherein, the second resource status is determined by the Task module by aggregating the task running status of each participant; When the first communication module detects that the Job resource has been stopped, it calls the stop job interface of the target protocol to notify the second communication module to stop the target job.
8. The method according to claim 1, further comprising: The first communication module calls the stop task interface of the target protocol to notify the second communication module to stop the target privacy task.
9. A privacy task scheduling method based on a Kubernetes cluster interconnection and interoperability scheduling framework, involving first and second scheduling systems corresponding to the first and second parties respectively; the second scheduling system performs scheduling processing based on the Kubernetes cluster interconnection and interoperability scheduling framework and includes a second communication module, wherein the second communication module integrates multiple plugins corresponding to multiple communication protocols; The first scheduling system includes a first communication module; The method is executed through the second communication module and includes: Receive a first call to the job creation interface for the target protocol from the first communication module; In response to the first call, a Job resource is created using the target plugin corresponding to the target protocol among the plurality of plugins, and a first notification of successful job creation is returned to the first communication module; the Job resource includes a target privacy task. In response to receiving a second call to the job launch interface for the target protocol from the first communication module, the Job resource is launched, and a second notification of successful job launch is returned to the first communication module; In response to receiving a third call from the first communication module to the launch task interface for the target protocol, a Task resource for describing the target privacy task is created.
10. The method of claim 9, further comprising: In response to receiving a fourth call to the stop job interface for the target protocol from the first communication module, the Job resource is stopped.
11. The method of claim 9, further comprising: The running status of the target privacy task is periodically sent to the first communication module.
12. The method according to claim 9, wherein, The first call is sent by the first communication module after the target job is created; The Job resource also includes a first resource state; the method further includes: The push job status interface of the target protocol is invoked to notify the first communication module to query the job status of the target job; Set the value of the first resource status based on the received job status.
13. A privacy-preserving task scheduling device based on a Kubernetes cluster interconnection and interoperability scheduling framework, configured in a first scheduling system, the first scheduling system performing scheduling processing based on the Kubernetes cluster interconnection and interoperability scheduling framework; the device includes: The acquisition unit is used to acquire Job resources and select the target protocol for them; The Job resources include target privacy tasks; The calling unit is used to call the job creation interface of the target protocol using the target plugin among multiple plugins that corresponds to the target protocol, so as to notify the second scheduling system to create a target job, including the target privacy task; A startup unit is configured to start the Job resource in response to the successful creation of the target job in the second scheduling system. The calling unit is also used to listen for the start of the Job resource and call the start job interface of the target protocol to notify the second scheduling system to start the target job; A creation unit is used to create a Task resource describing the target privacy task in response to the successful startup of the target job in the second scheduling system. The calling unit is also used to listen for the creation of the Task resource and call the startup task interface of the target protocol to notify the second scheduling system to start the target privacy task.
14. A privacy task scheduling device based on a Kubernetes cluster interconnection and interoperability scheduling framework, configured in a second scheduling system, wherein the second scheduling system performs scheduling processing based on the Kubernetes cluster interconnection and interoperability scheduling framework; The device includes: The receiving unit is used to receive a first call to the job creation interface for the target protocol from the first scheduling system; A creation unit is configured to, in response to the first call, create a Job resource using a target plugin from among multiple plugins corresponding to the target protocol, and return a first notification to the first scheduling system that the job creation was successful; the Job resource includes a target privacy task; The startup unit is configured to, in response to receiving a second call to the startup job interface for the target protocol from the first scheduling system, start the Job resource and return a second notification of successful startup to the first scheduling system; The creation unit is further configured to, in response to receiving a third call from the first scheduling system to the launch task interface for the target protocol, create a Task resource for describing the target privacy task.
15. A computer-readable storage medium having a computer program stored thereon, wherein, When the computer program is executed in the computer, it causes the computer to perform the method according to any one of claims 1-12.
16. A computing device comprising a memory and a processor, wherein, The memory stores executable code, and when the processor executes the executable code, it implements the method of any one of claims 1-12.
Citation Information
Patent Citations
Cross-platform task scheduling method, computing task execution method and device
CN116055564A
Task scheduling implementation method and system and computer readable medium
CN116401026A