Batch scheduling method and system for alliance chain
Through the batch scheduling method and system of the alliance chain, the problem of the lack of automatic scheduling mechanism in batch transactions is solved, and the automatic scheduling and sequential control of multiple jobs is realized, which improves the real-time and efficiency of the system.
Patent Information
- Application Number
- CN202210538542.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-18
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2042-05-18
AI Technical Summary
The existing alliance chain lacks an automatic scheduling mechanism when processing batch transactions, resulting in frequent online transaction requests and response performance losses, and it is impossible to ensure that the execution order between jobs is executed according to business characteristics.
Provide a batch scheduling method and system of alliance chains. By obtaining batch job task data, analyzing tasks and dependencies, generating job instances and execution instructions, uploading them to the blockchain, monitoring execution progress and adjusting execution instructions for subsequent job instances , realize automatic scheduling and sequential control of jobs.
It realizes unified scheduling of multiple jobs, without the need for developers to develop by themselves, and the framework automatically connects the dependencies between the application system and the blockchain. Only then can the alliance obtain the job execution status in real time, improving the real-time and efficiency of the system.
Smart Images

Figure CN114816714B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the application field of blockchain, which can be applied to the financial field and other fields, and in particular refers to a batch scheduling method and system of a consortium chain. Background Art
[0002] In the actual application of blockchain, in addition to traditional online transactions, there are also real-time batches, that is, processing multiple transactions in one request. Characteristics of batch processing tasks: the transaction volume involved is large, and the time consumed is longer than a single online transaction, so the real-time requirements are also lower. The current alliance chain mainly processes online transactions, and there is no batch processing technology, and there is no automatic scheduling mechanism when there is a sequence of execution between multiple jobs.
[0003] Currently, there are many cases where batch transactions are converted to online transaction processing. The problem brought about by this is that the request and response of each online transaction is an indispensable stage for completing the transaction, but it has nothing to do with the core functional processing. Frequent interactions are additional performance losses. In addition, there is currently no automatic scheduling framework for blockchain jobs to ensure that the execution order between jobs is executed according to business characteristics. Summary of the invention
[0004] The purpose of this application is to provide a batch scheduling method and system for alliance chains, so as to realize the scheduling of batch jobs on alliance chains. Different jobs can be in parallel or serial relationship, and can be set to be scheduled or manually executed; the execution of jobs is automatically called by the framework, without the need for developers to develop by themselves. The execution order of jobs is intuitively displayed in a visual way through the console.
[0005] To achieve the above-mentioned purpose, the batch scheduling method of the alliance chain provided by the present application specifically includes: obtaining batch job task data, and obtaining multiple processing tasks and the dependency relationship between each processing task according to the batch job task data analysis; generating a job instance through the processing task, generating an execution instruction according to the dependency relationship and the job instance, and uploading the execution instruction to the blockchain; obtaining the execution progress of the executor executing the processing according to the execution instruction on the blockchain, and uploading the execution instructions corresponding to the subsequent job instance to the blockchain according to the execution progress and the dependency relationship; obtaining multiple execution progresses on the blockchain according to the dependency relationship, and obtaining the processing result of the batch job task data according to the multiple execution progresses.
[0006] In the above-mentioned batch scheduling method of the alliance chain, optionally, obtaining multiple processing tasks and the dependency relationship between each processing task according to the batch job task data analysis also includes: obtaining a corresponding job group and job schedule according to the batch job task data analysis; obtaining job unit information by defining the execution entities corresponding to the multiple processing tasks according to the job group, and defining the dependency relationship between each job unit information through the job schedule; generating scheduling definition information according to the job schedule and the job unit information, and uploading the scheduling definition information to the blockchain.
[0007] In the above-mentioned batch scheduling method of the alliance chain, optionally, generating a job instance through the processing task includes: obtaining the scheduling definition information on the blockchain; comparing the start time corresponding to each job unit information in the scheduling definition information with the current time to obtain a comparison result; and generating a corresponding job instance based on the comparison result and the job unit information.
[0008] In the above-mentioned batch scheduling method of the alliance chain, optionally, generating execution instructions according to the dependency relationship and the job instance includes: obtaining the startup order of the job instance according to the dependency relationship; and generating corresponding execution instructions according to the startup order and the execution subject in the job instance.
[0009] In the above-mentioned batch scheduling method of the alliance chain, optionally, obtaining the execution progress of the executor executing the processing according to the execution instruction on the blockchain includes: multiple executors monitor the execution instructions on the blockchain, and compare the execution subject in the execution instruction with the identification information of the current executor; execute the corresponding job processing according to the comparison result and the execution instruction, and upload the processing progress to the blockchain.
[0010] In the above-mentioned batch scheduling method of the alliance chain, optionally, uploading the processing progress to the blockchain also includes: saving the processing progress to a local preset record table.
[0011] In the batch scheduling method of the above-mentioned alliance chain, optionally, obtaining the execution progress of the executor executing the execution instruction on the blockchain also includes: when the execution progress uploaded by the executor is not obtained on the blockchain within a preset period, generating a timeout mark; and marking the subsequent job instances of the job instance corresponding to the execution instruction as parent job timeout according to the timeout mark and the dependency relationship.
[0012] In the above-mentioned batch scheduling method of the alliance chain, optionally, uploading the execution instructions corresponding to the subsequent job instances to the blockchain according to the execution progress and the dependency relationship includes: querying the dependency relationship according to the job instance corresponding to the execution progress to obtain the processing order of the current processing task among multiple processing tasks; calling the adjacent subsequent job instances according to the processing order and the dependency relationship to generate execution instructions, and uploading them to the blockchain.
[0013] The present application also provides a batch scheduling system for an alliance chain, the system comprising a batch scheduling node, an executor and a blockchain network; the batch scheduling node is used to obtain batch job task data, and obtain multiple processing tasks and the dependency relationship between each processing task according to the batch job task data; generate a job instance through the processing task, generate an execution instruction according to the dependency relationship and the job instance, and upload the execution instruction to the blockchain network; and obtain the execution progress on the blockchain network, and upload the execution instructions corresponding to the subsequent job instances to the blockchain network according to the execution progress and the dependency relationship; obtain multiple execution progresses on the blockchain according to the dependency relationship, and obtain the processing results of the batch job task data according to the multiple execution progresses; the executor is used to monitor the blockchain network to obtain the execution instruction, execute the corresponding job processing according to the execution instruction, and upload the processing progress to the blockchain network.
[0014] The present application also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above method when executing the computer program.
[0015] The present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for executing the above method.
[0016] The present application also provides a computer program product, comprising a computer program / instruction, which implements the steps of the above method when executed by a processor.
[0017] The beneficial technical effect of this application is that: multiple jobs can be uniformly scheduled without the need for self-development of applications. The framework opens up the job dependency relationship between the application system and the blockchain, and implements it in a loosely coupled form; the job progress is chained, and when multiple alliance parties are involved, the alliance parties can obtain the latest job execution status in real time, and the alliance parties can initiate the execution of their own jobs based on whether the jobs within the alliance members are completed; a console is provided to view the task execution status. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings described herein are used to provide a further understanding of the present application, constitute a part of the present application, and do not constitute a limitation of the present application. In the drawings:
[0019] Figure 1 A schematic diagram of a process flow of a batch scheduling method for a consortium chain provided in an embodiment of the present application;
[0020] Figure 2 A schematic diagram of the structure of a batch scheduling node in a consortium chain provided in an embodiment of the present application;
[0021] Figure 3 A logical diagram of a batch scheduling node and an executor provided in an embodiment of the present application;
[0022] Figure 4 A schematic diagram of a definition process of scheduling definition information provided in an embodiment of the present application;
[0023] Figure 5 A schematic diagram of a generation process of a job instance provided in an embodiment of the present application;
[0024] Figure 6 A schematic diagram of a scheduling process for a job instance provided in an embodiment of the present application;
[0025] Figure 7 A schematic diagram of state adjustment of a job instance provided in an embodiment of the present application;
[0026] Figure 8 A schematic diagram of the execution progress upload process provided in an embodiment of the present application;
[0027] Fig. 9 A schematic diagram of a timeout flag flow chart provided in an embodiment of the present application;
[0028] Fig. 10A A schematic diagram of a sequential scheduling process provided by an embodiment of the present application;
[0029] Fig. 10B A control logic diagram of execution instructions and progress information provided by an embodiment of the present application;
[0030] Fig.11 A schematic diagram of the structure of a batch scheduling system for a consortium chain provided in one embodiment of the present application;
[0031] Fig.12 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0032] The following will describe the implementation methods of the present application in detail in conjunction with the accompanying drawings and embodiments, so that the implementation process of how the present application applies technical means to solve technical problems and achieve technical effects can be fully understood and implemented accordingly. It should be noted that as long as there is no conflict, the various embodiments in the present application and the various features in the embodiments can be combined with each other, and the technical solutions formed are all within the protection scope of the present application.
[0033] In addition, the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be performed in an order different from that shown here.
[0034] Please refer to Figure 1 As shown, the batch scheduling method of the alliance chain provided in this application specifically includes:
[0035] S101 acquires batch job task data, and obtains multiple processing tasks and dependency relationships between the processing tasks according to the batch job task data;
[0036] S102 generates a job instance through the processing task, generates an execution instruction according to the dependency relationship and the job instance, and uploads the execution instruction to the blockchain;
[0037] S103 obtains the execution progress of the executor according to the execution instruction on the blockchain, and uploads the execution instruction corresponding to the subsequent job instance to the blockchain according to the execution progress and the dependency relationship;
[0038] S104 obtains multiple execution progresses on the blockchain according to the dependency relationship, and obtains processing results of the batch job task data according to the multiple execution progresses.
[0039] In actual work, the above process is mainly carried out by the batch scheduling nodes selected in the alliance chain. For details, please refer to Figure 2 As shown in the figure, in the alliance chain network, each alliance party deploys a blockchain batch scheduling node, which is responsible for handling the batch job scheduling of the organization. A single organization can have one or more scheduling nodes, which are generated by election as master nodes and the rest as slave nodes. When the master node is working, the slave nodes will stop working; if the master node is offline, a new election will be conducted. The master scheduling node stores the scheduling information on the chain. If the master node is offline, the re-elected master node obtains the task information from the chain and takes over. The execution process logic of the batch scheduling node can be referred to Figure 3 As shown, each process step will be described in detail in subsequent embodiments.
[0040] Please refer to Figure 4As shown, in one embodiment of the present application, the step S101 of obtaining multiple processing tasks and the dependency relationship between the processing tasks according to the batch job task data parsing further includes:
[0041] S401 parses the batch job task data to obtain a corresponding job group and job schedule;
[0042] S402 obtains operation unit information according to the execution entities corresponding to the multiple processing tasks defined by the operation group, and defines the dependency relationship between the operation unit information through the operation schedule;
[0043] S403 generates scheduling definition information according to the job schedule and the job unit information, and uploads the scheduling definition information to the blockchain.
[0044] Specifically, in this embodiment, the main execution Figure 3 In the job definition and definition of scheduling flow volume part, in actual work, the job definition can be divided into two parts: defining the job group and defining the job information. Among them, defining the job group includes the job group ID and the job group description information. Defining the job information includes defining the job information of each job, including the job name, the job group ID to which it belongs, the start time, the executor (application or blockchain), the execution frequency (daily or weekly or monthly, or specifying a few days of the week or month, etc.), the execution time interval (minutes), the number of executions per day, the execution mode (1 automatic; 2 manual; 3 dependent), the timeout time, etc.
[0045] The job name is named according to the agreed rules: organization + application system ID + custom job name and other information.
[0046] The execution modes are divided into: 1 Automatic; 2 Manual; 3 Dependency; 4 Daily Cut (Generate Instance), which are described as follows:
[0047] Automatic: Generally, it is a scheduled job and is executed at a certain time. The time is determined by the batch scheduling node server.
[0048] Manual: A job that is manually initiated by the user and is not automatically scheduled by the system.
[0049] Dependency: The execution of this job depends on the successful execution of the previous job. If the previous job fails, this job and its subsequent jobs will not be executed.
[0050] Define the scheduling process: The job scheduling process is also called "job scheduling". Scheduling determines the order of jobs, and several jobs constitute a job group. The job dependencies within a job group meet the conditions of the DAG graph. The DAG graph is a directed acyclic graph. The conditions of DAG are: 1. Each vertex appears and only appears once. 2. If there is a path from vertex A to vertex B, then vertex A appears before vertex B in the sequence. Therefore, the dependency between jobs in job scheduling needs to meet the conditions of a directed acyclic graph, and there cannot be cyclic dependencies.
[0051] Please refer to Figure 5 As shown, in one embodiment of the present application, the above step S102 may generate a job instance by processing the task, which may include:
[0052] S501 obtains the scheduling definition information on the blockchain;
[0053] S502 compares the start time corresponding to each operation unit information in the scheduling definition information with the current time to obtain a comparison result;
[0054] S503 generates a corresponding job instance according to the comparison result and the job unit information.
[0055] Based on the above embodiment, generating execution instructions according to the dependency relationship and the job instance in step S102 includes: obtaining the startup order of the job instance according to the dependency relationship; and generating corresponding execution instructions according to the startup order and the execution subject in the job instance.
[0056] In actual work, this process can be based on the defined job scheduling process, and the scheduling node generates cases that need to be executed on the same day. At this time, all cases are in the waiting state. For details, please refer to Figure 6 As shown in the figure, taking the actual job as an example, the jobs in the job group meet the conditions of the DAG graph. Jobs S1 and S2 can be executed in parallel. After these two jobs are completed, jobs B2, B2, and B3 can be executed in parallel. After these three jobs are completed, jobs C and D are executed sequentially. Figure 7 As shown, the implementation process is as follows:
[0057] 1. When a job instance is generated, all cases are in the waiting state.
[0058] 2. The job is in the RUNNING state. If the command fails to be initiated, it will be resent. If it still fails after the timeout period, TIMEOUT will be set.
[0059] 3. If the current job is executed successfully (status is COMPLETE), the execution of the subsequent jobs will be automatically called. If an error occurs during execution, the status becomes ERROR. If the current job is the closing job of the current job group, all jobs in the job group are completed.
[0060] 4. The job can initiate an interrupt command through the console, the job status changes to interrupt (CANCEL), and all subsequent jobs are interrupted (CANCEL).
[0061] Please refer to Figure 8 As shown, in one embodiment of the present application, obtaining the execution progress of the executor according to the execution instruction on the blockchain in the above step S104 includes:
[0062] S801 Multiple executors monitor the execution instructions on the blockchain and compare the execution subject in the execution instruction with the identification information of the current executor;
[0063] S802 executes corresponding job processing according to the comparison result and the execution instruction, and uploads the processing progress to the blockchain.
[0064] Wherein, uploading the processing progress to the blockchain may also include: saving the processing progress to a local preset record table. In actual work, the executor can be deployed together with the application. The execution agent is the recipient of the job scheduling instructions initiated by the scheduling node in the batch system, and is the recipient of the batch job. After receiving the instruction from the scheduling node, the executor interprets the instruction; according to the job instance information, instruction type, etc. in the instruction, the processor instance object is created and the corresponding instruction is executed. The instructions commonly processed by the executor include: job progress reporting, job start, job stop, etc.
[0065] Please refer to Fig. 9 As shown, in one embodiment of the present application, obtaining the execution progress of the executor according to the execution instruction on the blockchain also includes:
[0066] S901: when the execution progress uploaded by the executor is not obtained on the blockchain within a preset period, a timeout mark is generated;
[0067] S902: Mark all subsequent job instances of the job instance corresponding to the execution instruction as setting the parent job to time out according to the timeout identifier and the dependency relationship.
[0068] In this way, to prevent the progress information from being lost due to the lack of response from the blockchain network, the job executor itself saves the execution progress to the preset record table locally, thus providing a subsequent query channel.
[0069] Please refer to Fig. 10AAs shown, in one embodiment of the present application, uploading the execution instructions corresponding to the subsequent job instances to the blockchain according to the execution progress and the dependency relationship includes:
[0070] S1001 queries the dependency relationship according to the job instance corresponding to the execution progress to obtain the processing order of the current processing task among multiple processing tasks;
[0071] S1002 retrieves adjacent subsequent job instances according to the processing order and the dependency relationship to generate execution instructions, and uploads them to the blockchain.
[0072] Its control logic can be found in Fig. 10B As shown, in actual work, the control module can write execution instructions in the blockchain node, and the executor listens to the execution instructions; the job executor writes the job execution progress information in the blockchain node, and the control module listens to the job execution progress information.
[0073] Please refer to Figure 3 As shown in the figure, in actual work, the above process is mainly completed by batch scheduling nodes and executors, which includes the following steps:
[0074] 1. Define the operation group: operation group ID, operation group description information.
[0075] 2. Define job information: Define the job information of each job, including job name, job group ID, start time, executor (application or blockchain), execution frequency (daily, weekly, monthly, or a specified day of the week or month, etc.), execution time interval (minutes), number of executions per day, execution mode (1 automatic; 2 manual; 3 dependent), timeout, etc.
[0076] 3. Define the scheduling process: The job scheduling process is also called "job scheduling". Scheduling determines the order of jobs. Several jobs form a job group. The job dependencies within the job group meet the conditions of the DAG graph.
[0077] 4. Generate job instances: According to the defined job scheduling process, the scheduling node generates cases that need to be executed on that day. At this time, all cases are in the waiting state.
[0078] 5. Job scheduling: According to the job scheduling information, scan the opening jobs of the job group to be executed. If the execution time arrives, initiate the execution instruction.
[0079] 6. Progress collection: During the job execution process, the job execution node will upload the execution progress and success or failure status to the chain. The scheduling module monitors the job execution results of the blockchain node. The scheduling module determines whether the subsequent jobs that the job depends on can be initiated based on the success or failure of the current job. If the current job is executed successfully, the subsequent job will be initiated; if the job is abnormal, the job will be restarted; if the job execution reports an error, the subsequent jobs will be suspended.
[0080] 7. Console output: The console is a visual web interface that displays the DAG dependency graph of the job group and the job execution progress of the job group based on the job execution status on the chain.
[0081] The executor is generally deployed together with the application. The execution agent is the recipient of the job scheduling instructions initiated by the scheduling node in the batch system, and is the recipient of the batch job. After receiving the instructions from the scheduling node, the executor interprets the instructions; according to the job instance information, instruction type, etc. in the instructions, it creates a processor instance object and executes the corresponding instructions.
[0082] The present application also provides a batch scheduling system for an alliance chain, the system comprising a batch scheduling node, an executor and a blockchain network; the batch scheduling node is used to obtain batch job task data, and obtain multiple processing tasks and the dependency relationship between each processing task according to the batch job task data; generate a job instance through the processing task, generate an execution instruction according to the dependency relationship and the job instance, and upload the execution instruction to the blockchain network; and obtain the execution progress on the blockchain network, and upload the execution instructions corresponding to the subsequent job instances to the blockchain network according to the execution progress and the dependency relationship; obtain multiple execution progresses on the blockchain according to the dependency relationship, and obtain the processing results of the batch job task data according to the multiple execution progresses; the executor is used to monitor the blockchain network to obtain the execution instruction, execute the corresponding job processing according to the execution instruction, and upload the processing progress to the blockchain network.
[0083] In order to more clearly understand the above embodiments provided by the present application, the following Fig.11 As shown, the overall implementation process of the above embodiment is illustrated by way of example:
[0084] 1. First, define the job group through the job group definition contract by defining the scheduling process module, define the basic information of a single job through the job definition contract, and define the dependency of the job through the job scheduling contract.
[0085] 2. The job instance generation module obtains the scheduling definition information from the chain and generates the job instance of the day according to the job scheduling information. In addition to the job definition information, the job instance information also includes the job instance ID of the instance.
[0086] 3. The job scheduling module scans the jobs that can be started at the current time point, and initiates the execution instruction if the start conditions are met.
[0087] 4. Send corresponding instructions to the corresponding executor for execution based on the information of the current job.
[0088] 5. After the batch job executor monitors the execution instruction, it will be handed over to the corresponding executor, i.e., processor (batch program) for processing;
[0089] 6. When the executor executes a job, it will upload the job progress information to the chain; if the progress has not been reported within the set timeout period, the scheduling module will set the job to timeout, and the subsequent jobs will also set the parent job to timeout. The information uploaded to the chain includes: the execution status of the job in the middle, such as how many operations have been executed; the final execution result of the job (success or failure). At the same time, in order to prevent the progress information from being lost due to the lack of response of the blockchain network, the job executor itself will save the execution progress to the "batch job program control table" on the local machine.
[0090] 7. The progress collection module monitors the job execution information on the chain and decides whether the current and subsequent jobs should continue to execute.
[0091] Among them, the console module outputs the execution status of the job, which can be queried from the perspective of year, month, day, etc., the job definition can be viewed through the console, and the execution task can be manually initiated through the console. The framework queries the job scheduling definition information saved on the chain through the console, and displays the dependencies of the jobs in a graphical interface. The framework also provides the function of manually initiating job execution through the console: by clicking the "Execute Now" operation button in the job scheduling definition query result to execute the job. The framework also provides the function of interrupting the job being executed through the console: by querying the task execution status, finding the corresponding job, and clicking the "Interrupt" button to interrupt the job. The framework can also generate corresponding report tasks for the execution status of the job, and perform statistics from different dimensions.
[0092] Taking the actual work, the application system needs to complete the reconciliation operation with the blockchain as an example. The application system generates a transaction detail file at the end of the day (generate detail job 1). After the file is generated, it uploads the file to the blockchain (upload job 2). The blockchain network receives the file (receive file job 3), verifies the received file (verify job 4), and starts to check the data after the verification passes. According to the predetermined contract, the reconciliation operation is performed (reconciliation job 5), and the reconciliation result generates a file (generate result file job 6), and finally sends the result back to the application system (send job 7). In this case, these jobs constitute an independent job group. Developers define the job group, the job definition information of each job, and the job scheduling (the 7 jobs here are serial relationships) through batch scheduling nodes. The subsequent scheduling framework schedules jobs according to the definition information. In some embodiments, commercial banks need to report the credit information of their customers to the credit reporting center. After receiving the file, the credit reporting center loads the file and updates the customer credit information. The job scheduling process can be placed in the blockchain alliance chain network. Each commercial bank can upload files to the credit reporting center in parallel, and the file generation process and upload process can be chained. After the file is successfully uploaded, the batch job scheduling framework automatically notifies the commercial bank to download and load the file.
[0093] In this way, the above architecture provided by this application allows application systems and blockchain developers to easily and quickly schedule jobs. The batch scheduling node is responsible for the job scheduling work and the manager of the job execution process control. It is the brain of the batch framework and the core of job scheduling. The main functions are: generating jobs to be executed daily; arranging the execution plan of the job; triggering the job operation (supporting both timing (automatic) and dependency); monitoring the progress of job execution, updating the execution results of the job according to the execution status of the job feedback; providing a console to display the execution status of the job with a visual interface. The batch scheduling node supports high availability. That is, there are multiple batch scheduling nodes in the batch system, but only one batch scheduling node is responsible for the control work. Once the scheduling node fails, other scheduling nodes will immediately take over the control work of the batch system. Since the data is stored in the blockchain, the newly taken over node can obtain the latest information from the blockchain. Based on this, the batch scheduling system of the alliance chain provided by this application can uniformly schedule multiple jobs without the need for self-development of applications. The framework connects the job dependencies between the application system and the blockchain in a loosely coupled form. The job progress is uploaded to the chain. When multiple alliance parties are involved, the alliance parties can obtain the latest job execution status in real time. The alliance parties can initiate the execution of their own jobs based on whether the jobs within the alliance members are completed. A console is provided to view the task execution status.
[0094] The present application also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above method when executing the computer program.
[0095] The present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for executing the above method.
[0096] The present application also provides a computer program product, comprising a computer program / instruction, which implements the steps of the above method when executed by a processor.
[0097] like Fig.12 As shown, the electronic device 600 may further include: a communication module 110, an input unit 120, an audio processing unit 130, a display 160, and a power supply 170. It is worth noting that the electronic device 600 does not necessarily have to include Fig.12 In addition, the electronic device 600 may also include Fig.12 For components not shown, reference may be made to the prior art.
[0098] like Fig.12 As shown, the central processor 100 is sometimes also referred to as a controller or an operation control, and may include a microprocessor or other processor devices and / or logic devices. The central processor 100 receives inputs and controls the operations of various components of the electronic device 600.
[0099] The memory 140 may be, for example, one or more of a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory or other suitable devices. The above-mentioned information related to the failure may be stored, and a program for executing the relevant information may also be stored. The CPU 100 may execute the program stored in the memory 140 to implement information storage or processing.
[0100] The input unit 120 provides input to the CPU 100. The input unit 120 is, for example, a key or a touch input device. The power supply 170 is used to provide power to the electronic device 600. The display 160 is used to display display objects such as images and text. The display may be, for example, an LCD display, but is not limited thereto.
[0101] The memory 140 may be a solid-state memory, such as a read-only memory (ROM), a random access memory (RAM), a SIM card, etc. It may also be a memory that saves information even when the power is off, can be selectively erased, and is provided with more data, examples of which are sometimes referred to as EPROMs, etc. The memory 140 may also be some other type of device. The memory 140 includes a buffer memory 141 (sometimes referred to as a buffer). The memory 140 may include an application / function storage unit 142, which is used to store application programs and function programs or processes for executing the operation of the electronic device 600 through the central processor 100.
[0102] The memory 140 may also include a data storage unit 143 for storing data, such as contacts, digital data, pictures, sounds, and / or any other data used by the electronic device. The driver storage unit 144 of the memory 140 may include various drivers for communication functions of the electronic device and / or for executing other functions of the electronic device (such as messaging applications, address book applications, etc.).
[0103] The communication module 110 is a transmitter / receiver 110 that transmits and receives signals via an antenna 111. The communication module (transmitter / receiver) 110 is coupled to the central processor 100 to provide input signals and receive output signals, which may be the same as the case of a conventional mobile communication terminal.
[0104] Based on different communication technologies, multiple communication modules 110 may be provided in the same electronic device, such as a cellular network module, a Bluetooth module and / or a wireless LAN module. The communication module (transmitter / receiver) 110 is also coupled to a speaker 131 and a microphone 132 via an audio processor 130 to provide an audio output via the speaker 131 and receive an audio input from the microphone 132, thereby realizing a common telecommunication function. The audio processor 130 may include any suitable buffer, decoder, amplifier, etc. In addition, the audio processor 130 is also coupled to the central processor 100, so that the sound can be recorded on the local machine through the microphone 132, and the sound stored on the local machine can be played through the speaker 131.
[0105] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0106] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0107] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0108] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0109] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present application. It should be understood that the above description is only a specific embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application.
Claims
1. A batch scheduling method for a consortium chain, characterized in that: The method comprises: Acquire batch job task data, and parse the batch job task data to obtain multiple processing tasks and dependencies between the processing tasks; Generate a job instance through the processing task, generate an execution instruction according to the dependency relationship and the job instance, and upload the execution instruction to the blockchain; Obtaining the execution progress of the executor according to the execution instruction on the blockchain, and uploading the execution instruction corresponding to the subsequent job instance to the blockchain according to the execution progress and the dependency relationship; Obtain multiple execution progresses on the blockchain according to the dependency relationship, and obtain processing results of the batch job task data according to the multiple execution progresses; Obtaining multiple processing tasks and dependency relationships between each processing task according to the batch job task data analysis further includes: obtaining a corresponding job group and job schedule according to the batch job task data analysis; obtaining job unit information by defining the execution entities corresponding to the multiple processing tasks according to the job group, and defining the dependency relationship between each job unit information through the job schedule; generating scheduling definition information according to the job schedule and the job unit information, and uploading the scheduling definition information to the blockchain; Generating a job instance through the processing task includes: obtaining the scheduling definition information on the blockchain; comparing the start time corresponding to each job unit information in the scheduling definition information with the current time to obtain a comparison result; and generating a corresponding job instance according to the comparison result and the job unit information.
2. The batch scheduling method of the alliance chain according to claim 1 is characterized in that: Generating an execution instruction according to the dependency relationship and the job instance includes: Obtaining a startup order of the job instances according to the dependency relationship; Generate corresponding execution instructions according to the startup sequence and the execution subject in the job instance.
3. The batch scheduling method of the alliance chain according to claim 2 is characterized in that: Obtaining the execution progress of the executor according to the execution instruction on the blockchain includes: The plurality of executors monitor the execution instructions on the blockchain and compare the execution subject in the execution instructions with the identification information of the current executor; The corresponding job processing is performed according to the comparison result and the execution instruction, and the processing progress is uploaded to the blockchain.
4. The batch scheduling method of the alliance chain according to claim 2 is characterized in that: Uploading the processing progress to the blockchain also includes: The processing progress is saved in a local preset record table.
5. The batch scheduling method of the alliance chain according to claim 2 is characterized in that: Obtaining the execution progress of the executor according to the execution instruction on the blockchain also includes: When the execution progress uploaded by the executor is not obtained on the blockchain within a preset period, a timeout mark is generated; According to the timeout identifier and the dependency relationship, subsequent job instances of the job instance corresponding to the execution instruction are all marked as setting the parent job timeout.
6. The batch scheduling method of the alliance chain according to claim 1 is characterized in that: Uploading the execution instructions corresponding to the subsequent job instances to the blockchain according to the execution progress and the dependency relationship includes: According to the job instance corresponding to the execution progress, query the dependency relationship to obtain the processing order of the current processing task among the multiple processing tasks; According to the processing order and the dependency relationship, adjacent subsequent job instances are retrieved to generate execution instructions, and uploaded to the blockchain.
7. A batch scheduling system for alliance chain, characterized in that: The system includes a batch scheduling node, an executor and a blockchain network; The batch scheduling node is used to obtain batch job task data, and obtain multiple processing tasks and dependency relationships between the processing tasks according to the batch job task data; generate a job instance through the processing task, generate an execution instruction according to the dependency relationship and the job instance, and upload the execution instruction to the blockchain network; and obtain the execution progress on the blockchain network, and upload the execution instructions corresponding to the subsequent job instance to the blockchain network according to the execution progress and the dependency relationship; obtain multiple execution progresses on the blockchain according to the dependency relationship, and obtain the processing result of the batch job task data according to the multiple execution progresses; The executor is used to monitor the blockchain network to obtain the execution instruction, execute the corresponding job processing according to the execution instruction, and upload the processing progress to the blockchain network; Wherein, obtaining multiple processing tasks and the dependency relationship between each processing task according to the batch job task data analysis further includes: obtaining a corresponding job group and a job schedule according to the batch job task data analysis; obtaining job unit information by defining the execution subjects corresponding to the multiple processing tasks according to the job group, and defining the dependency relationship between each job unit information through the job schedule; generating scheduling definition information according to the job schedule and the job unit information, and uploading the scheduling definition information to the blockchain; Generating a job instance through the processing task includes: obtaining the scheduling definition information on the blockchain; comparing the start time corresponding to each job unit information in the scheduling definition information with the current time to obtain a comparison result; and generating a corresponding job instance according to the comparison result and the job unit information.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program for causing a computer to execute the method according to any one of claims 1 to 6.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Platform task scheduling method, device, equipment and storage medium
CN110532084A
Automated execution of batch job workflows
US20190370058A1
