A task scheduling system, a task scheduling method, a storage medium and an electronic device
By combining a blockchain platform with a Kubernetes cluster, the task scheduling system uses digital signatures to verify task description information, solving the problem of easily tampered task scheduling information in multi-party secure computation, achieving security and stability in task execution, and improving resource utilization and task processing efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG ANT SECRET TECH CO LTD
- Filing Date
- 2025-03-27
- Publication Date
- 2026-05-05
AI Technical Summary
During multi-party secure computation, task scheduling information is easily tampered with, leading to inaccurate computation and scheduling results and affecting the security and reliability of the task participants.
The task scheduling system combines a blockchain platform with a Kubernetes cluster. Each task participant corresponds to a Kubernetes cluster. The task scheduling information is published through the blockchain platform, and digital signatures are used to verify the integrity and reliability of the task description information, ensuring the accuracy of the task execution conditions.
Ensuring the immutability and reliability of task scheduling information improves the security and stability of task execution, fully leveraging the resource management and container orchestration advantages of Kubernetes to achieve efficient and stable task processing.
Smart Images

Figure CN120315826B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to one or more embodiments in the field of computer technology, and more particularly to a task scheduling system, task scheduling method, storage medium and electronic device. Background Technology
[0002] With the rapid development of cloud computing and big data technologies, data privacy protection has become an increasingly important issue. Secure multi-party computation, as an emerging computing paradigm, can enable collaborative computation among multiple participants without disclosing the original data, and is therefore widely used in fields such as machine learning, risk control, medical analysis, and data statistics.
[0003] However, in the process of performing multi-party secure computation, a fixed task issuer usually schedules tasks for multiple task participants. In this case, each task participant cannot be sure whether the task scheduling information it receives is reliable. Once the task scheduling information is tampered with during transmission, or the task issuer malfunctions, it will affect the overall computation and scheduling results of the multi-party secure computation task, and may even cause serious losses to the task participants. Summary of the Invention
[0004] This specification provides a task scheduling system, task scheduling method, storage medium, and electronic device to partially solve the problems existing in the prior art.
[0005] This specification provides a task scheduling system, which includes: a blockchain platform, a task publisher, and multiple task participants. Each task participant corresponds to a Kubernetes cluster, and each Kubernetes cluster is connected to the blockchain platform.
[0006] The task publisher is used to: publish task scheduling information in the blockchain platform, wherein the task scheduling information includes task description information for the target task and a digital signature generated by the task publisher for the task description information;
[0007] Each task participant is configured to: obtain the task scheduling information from the blockchain platform through the control node in the Kubernetes cluster corresponding to the task participant; verify the task scheduling information based on the digital signature and the task description information; and, if the task scheduling information passes verification, determine whether the task participant meets the task execution conditions of the target task indicated by the task description information; if so, execute the target task according to the task description information through the computing node in the Kubernetes cluster corresponding to the task participant.
[0008] This specification provides a task scheduling method, which is applied to task participants and includes:
[0009] The task scheduling information is obtained from the blockchain platform through the control node in the Kubernetes cluster corresponding to the task participant, and verified based on the digital signature and task description information contained in the task scheduling information; wherein, the task scheduling information contains task description information for the target task and a digital signature generated by the task publisher for the task description information; each task participant corresponds to a Kubernetes cluster, and each Kubernetes cluster is connected to the blockchain platform.
[0010] If the task scheduling information is verified, determine whether the task participant meets the task execution conditions of the target task indicated by the task description information;
[0011] If so, the target task is executed through the compute nodes in the Kubernetes cluster corresponding to the task participant, based on the task description information.
[0012] This specification provides a task scheduling method, which is applied to a task publisher and includes:
[0013] Task scheduling information for a target task is published on the blockchain platform, enabling each task participant to obtain the task scheduling information from the blockchain platform based on the control node in the Kubernetes cluster corresponding to that participant. The task scheduling information is verified based on the digital signature and task description information contained therein. If the task scheduling information passes verification, it is determined whether the task participant meets the task execution conditions of the target task indicated by the task description information. If so, the target task is executed according to the task description information through each computing node in the Kubernetes cluster corresponding to the participant.
[0014] The task scheduling information includes task description information for the target task and a digital signature generated by the task publisher for the task description information; each task participant corresponds to a Kubernetes cluster, and each Kubernetes cluster is connected to the blockchain platform.
[0015] This specification provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the task scheduling method described above.
[0016] This specification provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described task scheduling method.
[0017] A computer program product includes a computer program / instructions that, when executed by a processor, implement the task scheduling method described above.
[0018] The above-described at least one technical solution adopted in the embodiments of this specification can achieve the following beneficial effects:
[0019] In this embodiment, the task scheduling system includes: a blockchain platform, a task publisher, and multiple task participants. Each task participant corresponds to a Kubernetes cluster, and each Kubernetes cluster is connected to the blockchain platform. The task publisher is used to: publish task scheduling information on the blockchain platform. Each task participant is used to: obtain task scheduling information from the blockchain platform through the control node in the task participant; verify the task scheduling information based on digital signatures and task description information; if the task scheduling information is verified, determine whether the task participant meets the task execution conditions of the target task indicated by the task description information; if so, execute the target task according to the task description information through each computing node in the task participant.
[0020] As illustrated in the above embodiments, each task participant's corresponding Kubernetes cluster is connected to the blockchain. Since task scheduling information is published to the blockchain platform, the blockchain technology ensures that the task scheduling data stored thereon cannot be tampered with, thus guaranteeing data accuracy. In this scenario, if the task publisher is without fault, signature verification will succeed; otherwise, verification will fail, preventing misjudgments due to data anomalies. Furthermore, when processing tasks through a Kubernetes cluster, Kubernetes' advantages in task scheduling, resource management, and container orchestration can be fully utilized. Kubernetes can automatically and intelligently allocate and schedule resources based on the task's resource requirements and the cluster's current state, ensuring efficient and stable task operation. Kubernetes also supports rolling updates, automatic recovery, and failover, further improving the reliability and stability of task processing. By leveraging the blockchain platform for secure and reliable task allocation, it ensures efficient task completion. Attached Figure Description
[0021] Figure 1 This is a schematic diagram of a task scheduling system architecture provided in this specification;
[0022] Figure 2This is a schematic diagram of the interaction process of a task scheduling system provided in this specification;
[0023] Figure 3 This diagram illustrates one of the different ways in which task participants connect to the blockchain platform, as provided in this specification.
[0024] Figure 4 This is a schematic diagram illustrating one method of connecting the internal nodes of a task participant to the blockchain platform, as provided in this specification.
[0025] Figure 5 This is a flowchart illustrating one task execution method provided in this specification;
[0026] Figure 6 This is a flowchart illustrating one task execution method provided in this specification;
[0027] Figure 7 This is a schematic structural diagram of a device provided in this specification;
[0028] Figure 8 This is a schematic diagram of a task scheduling device provided in this specification;
[0029] Figure 9 This is a schematic diagram of a task scheduling device provided in this specification. Detailed Implementation
[0030] To make the objectives, technical solutions, and advantages of this specification clearer, the technical solutions of this specification will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of them. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this specification.
[0031] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this manual are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.
[0032] Due to the unique nature of multi-party computation, tasks typically require collaborative computation among multiple participants, necessitating a solution to the task scheduling problem. Kubernetes, with its support for automated container deployment, large-scale scalability, and containerized application management, offers numerous advantages in task scheduling.
[0033] For example, Kubernetes can automatically schedule tasks to the most suitable nodes based on application needs, ensuring that Pods can run on nodes with sufficient resources that meet their scheduling requirements. This dynamic allocation mechanism makes full use of cluster resources and avoids resource waste and idleness.
[0034] Kubernetes has the ability to automatically scale up and down based on load. This means that when the application load increases, Kubernetes can automatically schedule more Pods to meet the demand; and when the load decreases, it can release unnecessary resources. This autoscaling mechanism ensures that the application can always respond to user requests while optimizing resource utilization.
[0035] Kubernetes supports a variety of scheduling strategies, and these flexible strategies enable Kubernetes to adapt to the needs of different business scenarios.
[0036] Kubernetes ensures that Pods automatically migrate to other available nodes when a node fails or resources are insufficient, greatly reducing the need for manual intervention and improving the robustness of the cluster and the high availability of applications.
[0037] Kubernetes boasts excellent scalability. Users can write custom schedulers or extend existing schedulers to meet specific needs. This scalability allows Kubernetes to adapt to scheduling requirements in different scenarios, providing greater flexibility and control. For example, users can implement specific scheduling logic based on business needs, such as considering factors like data locality and interference between loads to optimize scheduling results.
[0038] In cross-domain scenarios, due to network isolation and trust issues between organizations, Kubernetes-based scheduling often faces problems such as cross-domain identity security, cross-domain consistency, and cross-domain immutability. Blockchain, as a block-chain storage method, combines distributed storage, peer-to-peer transmission, consensus mechanisms, and cryptography, possessing characteristics such as decentralization, immutability, transparency, security, and programmability. It can effectively solve these problems.
[0039] Based on this, this specification provides a task scheduling system where each task participant corresponds to a Kubernetes cluster, and all task participants jointly construct this task scheduling system. By connecting each Kubernetes cluster to a blockchain platform for task scheduling among themselves, the data security issues of cross-domain task scheduling can be effectively solved, providing a reliable guarantee for the secure execution of distributed computing tasks.
[0040] The technical solutions provided in the various embodiments of this specification are described in detail below with reference to the accompanying drawings.
[0041] Figure 1 This is a schematic diagram of a task scheduling system architecture provided in this specification. The task scheduling system includes:
[0042] The system consists of a blockchain platform, a task publisher, and multiple task participants. Each task participant corresponds to a Kubernetes cluster, and each Kubernetes cluster is connected to the blockchain platform.
[0043] The task publisher can be any task participant that publishes task scheduling information on the blockchain platform. Of course, it can also be any other node in the blockchain that sends task scheduling information besides the task participant.
[0044] Based on the above task scheduling system architecture, this specification also provides a schematic diagram of the interaction process of the task scheduling system, such as... Figure 2 As shown, the interaction process of this task scheduling system may include the following steps:
[0045] S200: The task publisher publishes task scheduling information on the blockchain platform, wherein the task scheduling information includes task description information for the target task and a digital signature generated by the task publisher for the task description information.
[0046] In practical applications, the aforementioned target tasks can include multi-party secure computing tasks in different business scenarios such as machine learning, risk control, medical analysis, and data statistics. The task description information of the target task may include one or more of the following: the organization identification information (such as ID, name, number, etc.) of the task issuer, the organization identification information of at least one task participant required to execute the target task, the task identifier of the target task, the container type, device type, computing resources required to execute the target task, and data information required to execute the target task.
[0047] After obtaining the task description information, the task publisher can generate a corresponding digital signature based on that information. In practice, the task publisher can calculate the hash value corresponding to the task description information using a specified calculation method, and then encrypt the hash value using a local private key, thus using the encrypted hash value as the digital signature for the task description information.
[0048] The task publisher can then publish the task scheduling information, which includes the task description and its corresponding digital signature, to the blockchain.
[0049] S202: Each task participant obtains the task scheduling information from the blockchain platform through the control node in the Kubernetes cluster corresponding to that task participant.
[0050] Once the task publisher releases task scheduling information on the blockchain platform, each task participant can obtain the task scheduling information from the blockchain platform through the control node in the Kubernetes cluster corresponding to the task participant.
[0051] In practical applications, there are multiple opportunities for task participants to obtain task scheduling information from the blockchain platform. Each task participant can monitor the block status in the blockchain platform. When the task publisher releases task scheduling information, the blockchain platform will generate a new block, at which point each task participant will pull the task scheduling information from the blockchain platform.
[0052] In addition, after publishing task scheduling information on the blockchain platform, the task publisher can invoke a designated smart contract, thereby triggering an event defined by the smart contract. Once the event is triggered, the smart contract will execute the operation associated with the event and broadcast the event information to the blockchain network. Each task participant can subscribe to and receive event notifications occurring on the blockchain network. When an event is triggered, the task participants who have subscribed to the event will receive the event notification and can execute the corresponding callback function to obtain the task scheduling information.
[0053] Of course, after publishing the task scheduling information, the task publisher can send a notification to each task participant. After receiving the notification, the task participant can obtain the task scheduling information from the blockchain platform.
[0054] In practical applications, task description information is usually stored in the ETCD storage system. However, Kubernetes clusters can only recognize the application programming interface (API) of the ETCD storage system. Therefore, the data format corresponding to the access request sent by the Kubernetes cluster when accessing data is a data format that matches the API of the ETCD storage system (i.e., key-balance format). However, access requests in this data format cannot access the blockchain platform.
[0055] Therefore, the task scheduling system in this specification can also be equipped with an interface adapter (Blockchain-Etcd-API-Adaptor). During the process of obtaining task scheduling information, task participants can send access requests for the task scheduling information to the interface adapter through the control node.
[0056] An interface adapter can convert the data format corresponding to an access request into a data format for calling smart contracts on a blockchain platform, thereby obtaining a blockchain transaction that calls the target smart contract. The blockchain platform can then call the target smart contract based on this blockchain transaction, causing the target smart contract to query the task scheduling information from the blockchain platform and provide it to the task participants. Thus, the task participants can obtain the task scheduling information from the blockchain platform.
[0057] S204: Verify the task scheduling information based on the digital signature and the task description information.
[0058] For each task participant, after obtaining the task scheduling information from the blockchain platform, the participant can verify the task scheduling information based on the digital signature and task description information contained therein, thereby ensuring the security of the information.
[0059] Specifically, task participants can decrypt the digital signature using a pre-obtained public key to obtain the hash value of the task description information, which serves as the first hash value. Simultaneously, they calculate the hash value corresponding to the task description information using the same method, which becomes the second hash value. Then, they compare the first and second hash values. If they match, the task description information is considered reliable and has not been tampered with, and the task scheduling information is verified. If they do not match, the task scheduling information fails verification, and the task participant will not execute subsequent tasks based on this scheduling information.
[0060] In this arrangement, the task issuer and task participants can agree on a matching public-private key pair, which can be stored locally by each participant and the issuer. When a participant obtains the task scheduling information, they can directly decrypt the digital signature using their local private key. This not only ensures the data has not been tampered with but also authenticates the task sender's identity.
[0061] Of course, the aforementioned public key can be generated by the task publisher based on its local private key and carried in the task scheduling information. When the task participants obtain the task scheduling information, they can obtain the public key that matches the task publisher's local private key.
[0062] It's important to note that because each participant in the task has a user identity on the blockchain, only legitimate users can write data to the blockchain. Therefore, the above process relies on the inherent characteristics of the blockchain itself. During this process, each participant, upon receiving the task information, can sign the task itself. Once all participants have signed, it signifies that the task has been approved by all participants, and then it can be automatically executed via Kubernetes.
[0063] In practical applications, blockchain platforms can be categorized into three types: public blockchains, private blockchains, and consortium blockchains. Furthermore, there are combinations of these types, such as private blockchains + consortium blockchains, and consortium blockchains + public blockchains. Public blockchains offer the highest degree of decentralization. Participants in a public blockchain (represented by nodes on the blockchain) can read data records, participate in transactions, and compete for the right to record new blocks. Moreover, participants can freely join and leave the network and perform related operations. Private blockchains, on the other hand, have write permissions controlled by a specific organization or institution, and data read permissions are governed by organizational regulations. Simply put, a private blockchain can be a weakly centralized system with a limited number of participating nodes. This type of blockchain is more suitable for internal use within specific organizations. Consortium blockchains fall between public and private blockchains, achieving "partial decentralization." Each node in a consortium blockchain typically has a corresponding entity or organization; participants join the network through authorization and form a shared interest alliance to jointly maintain the blockchain's operation.
[0064] Public blockchains, private blockchains, and consortium blockchains can all provide smart contract functionality. A smart contract on a blockchain is a contract that can be triggered and executed by transactions on the blockchain system. Smart contracts can be defined in the form of code.
[0065] Taking Ethereum as an example, it allows users to create and invoke complex logic within the Ethereum network. At the core of Ethereum as a programmable blockchain is the Ethereum Virtual Machine (EVM), which can run on every Ethereum node. The EVM is a Turing-complete virtual machine, meaning it can implement various complex logics. Users publish and invoke smart contracts on Ethereum, which run on the EVM. The EVM shields the differences in hardware configuration and software environment across nodes, ensuring that the process and results of executing smart contracts are identical across all nodes. In fact, the virtual machine directly runs virtual machine code (virtual machine bytecode, hereinafter referred to as "bytecode"). Smart contracts deployed on the blockchain can be in bytecode form.
[0066] After a contract is created, a contract account corresponding to that smart contract is generated on the blockchain, with a specific address. The contract code and account storage are stored in this contract account. The behavior of the smart contract is controlled by the contract code, while the smart contract's account storage preserves the contract's state. In other words, a smart contract enables the creation of a virtual account on the blockchain that contains both contract code and account storage.
[0067] Taking Solidity as an example, contracts written in it are very similar to classes in object-oriented programming languages. A contract can declare various members, including state variables, functions, modifiers, events, etc. State variables are values stored in the smart contract's account store and are used to save the contract's state.
[0068] Smart contracts can be executed independently on each node of the blockchain network in a prescribed manner. All execution records and data are stored on the blockchain. Therefore, when such a transaction is completed, the blockchain stores an immutable and unlost transaction certificate.
[0069] A contract account is used to store the state related to a smart contract. Once a smart contract is deployed on the blockchain, a corresponding contract account is created. This contract account typically has several states, defined by state variables within the smart contract and updated with new values during the smart contract's creation and execution. A smart contract generally refers to a contract defined in code within a blockchain environment that can automatically execute its terms. Once an event triggers a clause in the contract (meeting the execution conditions), the code can execute automatically.
[0070] In this specification, when the blockchain platform is a private chain or a consortium chain, the nodes may only include task issuers and task participants who have established a trusted relationship in advance. In this case, as long as the task participant obtains task scheduling information from the blockchain platform, and it is determined that the data has not been tampered with, the identity of its task issuer can be assumed to be trustworthy.
[0071] If the blockchain provided by the blockchain platform is a public blockchain, in order to further authenticate the identity of the task sender, each task participant can maintain a list of trusted institutions locally, which records the corresponding institutional identification information of each trusted institution. If the task scheduling information is verified, the task participant can determine whether the task issuer is a trusted institution based on the institutional identification information contained in the task description information and the list of trusted institutions stored locally on the task participant's local machine.
[0072] S206: If the task scheduling information is verified, determine whether the task participant meets the task execution conditions of the target task indicated by the task description information;
[0073] S208: If so, the target task is executed through the compute nodes in the Kubernetes cluster corresponding to the task participant, based on the task description information.
[0074] For each task participant, once the task scheduling information is verified, the task participant can determine whether it meets the task execution conditions of the target task indicated by the task description information.
[0075] In practical applications, there can be multiple situations in which the task execution conditions are met. For example, when the task description information carries the organization identification information of the task participant required to execute the target task, if the organization identification information matches the organization identification information of the task participant itself, it means that the task issuer needs to schedule the task participant to execute the target task, and therefore it can be determined that the task participant meets the task execution conditions.
[0076] If the task description information does not contain the organization identification information of the task participants required to execute the target task, then if the container type, device type, computing resources and other information of the task participant itself match the information contained in the task description information, then it can be determined that the task participant meets the task execution conditions.
[0077] After confirming that it meets the above-mentioned task execution conditions, the task participant can further execute the target task based on the task description information and local task data.
[0078] Furthermore, for each task participant, after executing the target task according to the task description information, the task participant can obtain the execution result of the target task. Then, the task participant can generate task scheduling information for at least one other task participant based on the task execution result, and publish the task scheduling information for at least one other task participant to the blockchain platform.
[0079] At this point, the task participant that publishes the task scheduling information will become the task publisher, while other task participants will continue to execute subsequent tasks upon receiving the task scheduling information for themselves.
[0080] Furthermore, in this specification, for each task participant, the corresponding Kubernetes cluster may include a control node and multiple compute nodes. For each task participant, when the task scheduling information is verified and the participant needs to execute the target task, the control node can obtain the node information corresponding to each compute node, and determine the target compute node from among the compute nodes based on the node information and task description information, and then send the task description information to the target compute node. For each target compute node, the compute node can execute the corresponding task according to the received task description information.
[0081] The node information mentioned above includes computing resource information corresponding to the compute node, and / or container type information corresponding to the containers deployed in the compute node. The control node can obtain node information and send task description information to the target compute node through internal communication within the Kubernetes cluster.
[0082] In this manual, each task participant can access the blockchain platform through the control node. For ease of understanding, this manual provides a schematic diagram illustrating different access methods between task participants and the blockchain platform, such as... Figure 3 As shown.
[0083] Among them, the components of the control node (Kubernetes Master) in the Kubernetes cluster corresponding to the task participants include the API server, scheduler and controller. Data interaction between the task participants and the blockchain platform can be realized through Blockchain-Etcd-API-Adaptor.
[0084] The control node can use an API server to receive external commands and upload corresponding data to the blockchain platform. During the data upload process, the API server can access the blockchain via an interface adapter to upload the data. Similarly, when the control node retrieves data from the blockchain, the API server can access the blockchain platform via the interface adapter to obtain the data.
[0085] The controller is used to divide the target task into multiple subtasks and determine the subtask description information corresponding to each subtask.
[0086] The scheduler is used to determine the target node for executing different subtasks from each computing node based on the subtask description information and node information, and sends the corresponding subtask description information to each target node.
[0087] In practical applications, the control node and each computing node among the task participants can also be connected to the blockchain platform. For ease of understanding, this manual provides a schematic diagram illustrating the connection method between the internal nodes of the task participants and the blockchain platform, as shown below. Figure 4 As shown.
[0088] The computing nodes and control nodes are interconnected, and both the control nodes and computing nodes can access the blockchain.
[0089] Under this architecture, the control node can determine multiple target computing nodes from among the computing nodes based on node information and task description information. Then, based on the node information corresponding to the target computing nodes, it can determine the subtask description information for each target computing node in the task description information, and then publish the subtask scheduling information containing the subtask description information to the blockchain platform.
[0090] Each target computing node can obtain subtask scheduling information from the blockchain platform and verify the subtask scheduling information based on the digital signature and subtask description information contained therein (see above for details on the verification method). If the subtask scheduling information passes verification, it is determined whether the target computing node meets the task execution conditions indicated by the subtask description information. If so, the subtask corresponding to the subtask description information is executed through the target computing node; otherwise, the computing node abandons the execution of the subtask corresponding to the subtask description information.
[0091] The above is an explanation of the entire task scheduling system. For ease of understanding, the following will explain a task execution method provided in this manual, applied to the aforementioned task scheduling system, from the perspective of the task participants. Figure 5 As shown.
[0092] Figure 5 This is a flowchart illustrating a task execution method provided in this specification, including the following steps:
[0093] S500: The task scheduling information is obtained from the blockchain platform through the control node in the Kubernetes cluster corresponding to the task participant, and the task scheduling information is verified based on the digital signature and task description information contained in the task scheduling information; wherein, the task scheduling information contains task description information for the target task and a digital signature generated by the task publisher for the task description information; each task participant corresponds to a Kubernetes cluster, and each Kubernetes cluster is connected to the blockchain platform.
[0094] S502: If the task scheduling information is verified, determine whether the task participant meets the task execution conditions of the target task indicated by the task description information;
[0095] S504: If so, the target task is executed through the compute nodes in the Kubernetes cluster corresponding to the task participant, based on the task description information.
[0096] In addition, this specification also provides a flowchart of a task execution method from the perspective of the task participants, such as... Figure 6 As shown.
[0097] Figure 6 This is a flowchart illustrating a task execution method provided in this specification, including the following steps:
[0098] S600: Publish task scheduling information for the target task in the blockchain platform, so that each task participant can obtain the task scheduling information from the blockchain platform according to the control node in the Kubernetes cluster corresponding to the task participant. Verify the task scheduling information based on the digital signature and task description information contained in the task scheduling information. If the task scheduling information passes verification, determine whether the task participant meets the task execution conditions of the target task indicated by the task description information. If so, execute the target task according to the task description information through each computing node in the Kubernetes cluster corresponding to the task participant.
[0099] The task scheduling information includes task description information for the target task and a digital signature generated by the task publisher for the task description information; each task participant corresponds to a Kubernetes cluster, and each Kubernetes cluster is connected to the blockchain platform.
[0100] As can be seen from the above methods, this solution can ensure data security through the blockchain's own encryption and consensus mechanisms during the execution of the target task. For example, each node in a Kubernetes cluster can register its identity in the blockchain to ensure the legitimacy of its identity.
[0101] During the execution of target tasks through a Kubernetes cluster, K8s supports both jobs and services (Deployments). By abstracting the integration of K8s and blockchain, it eliminates the need to reimplement the different functions of services and tasks based on blockchain, and makes full use of the management and troubleshooting tools provided by K8s, such as the kubectl command.
[0102] Kubernetes (K8s) is based on a declarative API, which makes it easy to solve problems such as task retries during task scheduling. K8s supports high availability capabilities such as automatic rescheduling for services (Deployments). Even if a process crashes, the service will be automatically restarted without worrying about service unavailability.
[0103] Furthermore, by combining a blockchain platform with a Kubernetes cluster, transparency in task allocation and execution can be achieved. All task scheduling information, execution status, and results are recorded on the blockchain for all participants to view and verify. This not only enhances the fairness and credibility of task allocation but also facilitates collaboration and communication among task participants.
[0104] Figure 7 This is a schematic structural diagram of a device provided in this manual. Please refer to it. Figure 7 At the hardware level, the device includes a processor 702, an internal bus 704, a network interface 706, memory 708, and non-volatile memory 710, and may also include other hardware required for its functions. One or more embodiments of this specification can be implemented in software, for example, the processor 702 reads the corresponding computer program from the non-volatile memory 710 into memory 708 and then runs it. Of course, in addition to software implementation, one or more embodiments of this specification do not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0105] Please refer to Figure 8 or Figure 9 A task execution device can be applied to, for example Figure 7 The device shown is used to implement the technical solution described in this specification.
[0106] Figure 8 This is a schematic diagram of a task scheduling device provided in this specification. The task execution device may include:
[0107] The acquisition module 800 is used to obtain task scheduling information from the blockchain platform through the control node in the Kubernetes cluster corresponding to the task participant, and to verify the task scheduling information based on the digital signature and task description information contained in the task scheduling information; wherein, the task scheduling information includes task description information for the target task and a digital signature generated by the task publisher for the task description information; each task participant corresponds to a Kubernetes cluster, and each Kubernetes cluster is connected to the blockchain platform;
[0108] The judgment module 802 is used to determine whether the task participant meets the task execution conditions of the target task indicated by the task description information when the task scheduling information is verified.
[0109] The execution module 804 is used to execute the target task according to the task description information through the computing node in the Kubernetes cluster corresponding to the task participant if the task is true.
[0110] Optionally, the blockchain provided by the blockchain platform includes one of the following: a private blockchain, a consortium blockchain, and a public blockchain; the task description information includes the organization identification information corresponding to the task issuer;
[0111] The judgment module 802 is specifically used to, if the blockchain provided by the blockchain platform is a public chain, and the task scheduling information is verified, determine whether the task issuer is a trusted institution based on the institution identification information and the list of trusted institutions stored locally on the task participant's premises; wherein, the list of trusted institutions records the institution identification information corresponding to each trusted institution; if the task issuer is determined to be a trusted institution, then based on the task description information, determine whether the task participant meets the task execution conditions of the target task indicated by the task description information.
[0112] Optionally, the acquisition module 800 is specifically configured to: send an access request for the task scheduling information to the interface adapter through the control node; convert the data format corresponding to the access request into a data format for calling the smart contract in the blockchain platform through the interface adapter, thereby obtaining a blockchain transaction for calling the target smart contract; and call the target smart contract through the blockchain transaction to query the task scheduling information from the blockchain platform based on the target smart contract.
[0113] Optionally, the execution module 804 is further configured to determine the execution result of the target task; generate task scheduling information for at least one other task participant based on the execution result, and publish the task scheduling information for at least one other task participant to the blockchain platform.
[0114] Figure 9 This is a schematic diagram of a task scheduling device provided in this specification. The task execution device may include:
[0115] The publishing module 900 is used to publish task scheduling information for a target task on the blockchain platform. This allows each task participant to obtain the task scheduling information from the blockchain platform based on the control node in their corresponding Kubernetes cluster. The module verifies the task scheduling information based on the digital signature and task description information contained within it. If the task scheduling information passes verification, the module determines whether the task participant meets the task execution conditions of the target task indicated by the task description information. If so, the target task is executed through the computing nodes in the Kubernetes cluster corresponding to the task participant, according to the task description information. The task scheduling information includes a task description for the target task and a digital signature generated by the task publisher for the task description information. Each task participant corresponds to a Kubernetes cluster, and each Kubernetes cluster interfaces with the blockchain platform.
[0116] Based on the same concept as the methods described above, this specification also provides an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein the processor performs the steps of the method as described in any of the above embodiments by executing the executable instructions.
[0117] Based on the same concept as the methods described above, this specification also provides a computer-readable storage medium having computer instructions stored thereon that, when executed by a processor, implement the steps of the methods as described in any of the above embodiments.
[0118] Based on the same concept as the methods described above, this specification also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the methods as described in any of the above embodiments.
Claims
1. A task scheduling system, comprising: a blockchain platform, a task publisher, and multiple task participants, each task participant corresponding to a Kubernetes cluster, and each Kubernetes cluster interfacing with the blockchain platform; wherein, The task publisher includes any task participant that publishes task scheduling information on the blockchain platform. The task publisher is used to: publish task scheduling information in the blockchain platform, wherein the task scheduling information includes task description information for the target task and a digital signature generated by the task publisher for the task description information; Each task participant is configured to: obtain the task scheduling information from the blockchain platform through the control node in the Kubernetes cluster corresponding to the task participant; verify the task scheduling information based on the digital signature and the task description information; and, if the task scheduling information passes verification, determine whether the task participant meets the task execution conditions of the target task indicated by the task description information; if so, execute the target task according to the task description information through the computing node in the Kubernetes cluster corresponding to the task participant; and, execute the target task according to the task description information to obtain the execution result of the target task, generate task scheduling information for at least one other task participant based on the execution result, and publish the task scheduling information for at least one other task participant to the blockchain platform.
2. The task scheduling system as described in claim 1, The blockchain types of the blockchain platform include: One of the following: private blockchain, consortium blockchain, and public blockchain; The task description information includes the organization identification information corresponding to the task issuer; If the blockchain provided by the blockchain platform is a public blockchain, the control node in the Kubernetes cluster corresponding to each task participant is specifically used for: If the task scheduling information is verified, the task issuer is determined to be a trusted organization based on the organization identification information and the list of trusted organizations stored locally on the task participant's local machine; wherein, the list of trusted organizations records the organization identification information corresponding to each trusted organization. If the task issuer is determined to be a trusted organization, then based on the task description information, it is determined whether the task participant meets the task execution conditions of the target task indicated by the task description information.
3. The task scheduling system as described in claim 1, The task scheduling system also includes: Interface adapter; Each task participant is configured to: send an access request for the task scheduling information to the interface adapter through the control node; wherein the data format corresponding to the access request is a data format that matches the application programming interface (API) of the ETCD storage system; The interface adapter is used to convert the data format corresponding to the access request into the data format for calling the smart contract in the blockchain platform, so as to obtain the blockchain transaction that calls the target smart contract; The blockchain platform is used to invoke the target smart contract according to the blockchain transaction, so that the target smart contract can query the task scheduling information from the blockchain platform and provide it to the task participants.
4. The task scheduling system as described in claim 1, For each task participant's corresponding Kubernetes cluster, if the Kubernetes cluster contains a control node and multiple compute nodes, then: The control node acquires node information corresponding to the plurality of computing nodes, and determines the target computing node from the plurality of computing nodes based on the node information and the task description information. The task description information is sent to the target computing node; wherein... The node information includes computing resource information corresponding to the computing node, and / or container type information corresponding to the containers deployed in the computing node; The target computing node executes the task based on the received task description information.
5. The task scheduling system as described in claim 4, The control node is specifically used for: determining at least two target computing nodes from the plurality of computing nodes based on the node information and the task description information; determining subtask description information for each target computing node from the task description information based on the node information corresponding to the target computing nodes; and publishing subtask scheduling information containing the subtask description information to the blockchain platform. Each target computing node is specifically used to: obtain the subtask scheduling information from the blockchain platform, and verify the subtask scheduling information based on the digital signature and subtask description information contained in the subtask scheduling information; If the subtask scheduling information is verified, determine whether the target computing node meets the task execution conditions indicated by the subtask description information; If so, the subtask corresponding to the subtask description information is executed through the target computing node.
6. A task scheduling method, the method being applied to task participants, comprising: The task scheduling information is obtained from the blockchain platform through the control node in the Kubernetes cluster corresponding to the task participant, and verified based on the digital signature and task description information contained in the task scheduling information; wherein, the task scheduling information contains task description information for the target task and a digital signature generated by the task publisher for the task description information; each task participant corresponds to a Kubernetes cluster, and each Kubernetes cluster is connected to the blockchain platform. If the task scheduling information is verified, determine whether the task participant meets the task execution conditions of the target task indicated by the task description information; If so, the target task is executed through the compute nodes in the Kubernetes cluster corresponding to the task participant, based on the task description information. The task publisher includes any task participant that publishes task scheduling information on the blockchain platform. The method further includes: executing the target task according to the task description information, obtaining the execution result of the target task, generating task scheduling information for at least one other task participant based on the execution result, and publishing the task scheduling information for at least one other task participant to the blockchain platform.
7. The task scheduling method as described in claim 6, wherein the blockchain provided by the blockchain platform includes: One of a private blockchain, a consortium blockchain, and a public blockchain; the task description information includes the organization identification information corresponding to the task issuer; Determining whether the task participants meet the task execution conditions of the target task indicated by the task description information specifically includes: If the blockchain provided by the blockchain platform is a public blockchain, and the task scheduling information is verified, the task issuer is determined to be a trusted institution based on the institution identification information and the list of trusted institutions stored locally on the task participant's local machine; wherein, the list of trusted institutions records the institution identification information corresponding to each trusted institution. If the task issuer is determined to be a trusted organization, then based on the task description information, it is determined whether the task participant meets the task execution conditions of the target task indicated by the task description information.
8. The task scheduling method as described in claim 6, wherein task scheduling information is obtained from the blockchain platform through the control node among the task participants, specifically including: The control node sends an access request for the task scheduling information to the interface adapter. The data format corresponding to the access request is converted into the data format for calling the smart contract in the blockchain platform through the interface adapter, thereby obtaining the blockchain transaction that calls the target smart contract; The target smart contract is invoked through the blockchain transaction to query the task scheduling information from the blockchain platform based on the target smart contract.
9. A task scheduling method, the method being applied to a task publisher, comprising: Task scheduling information for a target task is published on the blockchain platform, enabling each task participant to obtain the task scheduling information from the blockchain platform based on the control node in the Kubernetes cluster corresponding to that participant. The task scheduling information is verified based on the digital signature and task description information contained therein. If the task scheduling information passes verification, it is determined whether the task participant meets the task execution conditions of the target task indicated by the task description information. If so, the target task is executed according to the task description information through each computing node in the Kubernetes cluster corresponding to the participant. The task scheduling information includes task description information for the target task and a digital signature generated by the task publisher based on the task description information. Each task participant corresponds to a Kubernetes cluster, and each Kubernetes cluster is connected to the blockchain platform. The task publisher includes any task participant that publishes task scheduling information on the blockchain platform. The task participant executes the target task according to the task description information, obtains the execution result of the target task, generates task scheduling information for at least one other task participant based on the execution result, and publishes the task scheduling information for at least one other task participant to the blockchain platform.
10. An electronic device, comprising: processor; A memory for storing processor-executable instructions; wherein the processor implements the steps of the method as described in any one of claims 6-9 by executing the executable instructions.
11. A computer-readable storage medium having stored thereon computer instructions that, when executed by a processor, implement the steps of the method as claimed in any one of claims 6-9.
12. A computer program product comprising a computer program / instructions that, when executed by a processor, implement the steps of the method as claimed in any one of claims 6-9.
Citation Information
Patent Citations
Cluster task scheduling method and device and storage medium
CN112003903A
Block chain system and information updating method and device
CN115017167A