WO2024130565A1 - 任务处理方法、装置及电子设备 - Google Patents
任务处理方法、装置及电子设备 Download PDFInfo
- Publication number
- WO2024130565A1 WO2024130565A1 PCT/CN2022/140507 CN2022140507W WO2024130565A1 WO 2024130565 A1 WO2024130565 A1 WO 2024130565A1 CN 2022140507 W CN2022140507 W CN 2022140507W WO 2024130565 A1 WO2024130565 A1 WO 2024130565A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- task
- executed
- computer device
- computing node
- parameters
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
Definitions
- the present application relates to the field of data processing technology, and in particular to a task processing method, device and electronic equipment.
- various asynchronous task processing frameworks can only meet the asynchronous task processing requirements on a single machine, such as an asynchronous task processing system that runs multiple computing nodes on a single machine by calling multiple threads.
- the present application provides a task processing method, device and electronic device, the main purpose of which is to improve the technical problem in the current prior art that a large number of asynchronous tasks are uniformly stacked on a single machine to run, which not only makes computing resources tight, but also affects the efficiency of asynchronous task processing.
- the present application provides a task processing method, comprising:
- a task execution instruction is sent to the target computing node, so that the target computing node executes the current task to be executed based on the business data corresponding to the task parameters in the preset storage location.
- the present application provides a task processing method, applied to a first computer device, the method comprising:
- the present application provides a task processing method, applied to a second computer device, the method comprising:
- the task processing state is an idle state, obtaining the task parameters of the current task to be executed;
- a task execution instruction is sent to the first computer device, where the task execution instruction is used to instruct the first computer device to execute the current task to be executed according to the task parameters.
- the present application provides a task processing device, comprising:
- a monitoring module is configured to monitor the task processing status of each computing node in the distributed system, wherein the computing nodes in the distributed system are different computer devices, and different computing nodes can read the business data in the preset storage location;
- a determination module is configured to determine a target computing node whose task processing state is an idle state
- An acquisition module is configured to acquire task parameters of a current task to be executed
- the sending module is configured to send a task execution instruction to the target computing node according to the task parameters, so that the target computing node executes the current task to be executed based on the business data corresponding to the task parameters in the preset storage location.
- the present application provides a task processing device, applied to a first computer device, the device comprising:
- a sending module configured to send the current task processing status of the first computer device to the second computer device
- a receiving module configured to receive a task execution instruction sent by the second computer device, wherein the task execution instruction is sent by the second computer device when determining that the task processing state is an idle state, and the task execution instruction carries a task parameter of a current task to be executed;
- the execution module is configured to execute the current task to be executed according to the task parameters.
- the present application provides a task processing device, applied to a second computer device, the device comprising:
- a receiving module is configured to request the first computer device to obtain a current task processing status of the first computer device
- an acquisition module configured to acquire task parameters of the current task to be executed if the task processing state is an idle state
- the sending module is configured to send a task execution instruction to the first computer device according to the task parameters, wherein the task execution instruction is used to instruct the first computer device to execute the current task to be executed according to the task parameters.
- the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the task processing method described in the first aspect, the second aspect, or the third aspect is implemented.
- the present application provides an electronic device, comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the task processing method described in the first aspect, the second aspect, or the third aspect when executing the computer program.
- the present application provides a task processing method, device and electronic device. Compared with the current prior art, the present application can effectively improve the degree of freedom of asynchronous task scheduling, and can mobilize computing nodes deployed on multiple machines to perform distributed processing of asynchronous tasks. Specifically, the task processing status of each computing node in the distributed system is first monitored.
- the computing nodes in the distributed system are different computer devices, and different computing nodes can read the business data in the preset storage location; then determine the target computing node whose task processing status is idle; then send a task execution instruction to the target computing node based on the task parameters of the current task to be executed, so that the target computing node executes the current task to be executed based on the business data corresponding to the task parameters in the preset storage location.
- FIG1 is a schematic diagram showing a flow chart of a task processing method provided in an embodiment of the present application.
- FIG2 is a schematic diagram showing a flow chart of another task processing method provided in an embodiment of the present application.
- FIG3 shows a schematic diagram of the structure of a distributed system architecture provided in an embodiment of the present application
- FIG4 is a schematic diagram showing an example of a front-end display effect provided by an embodiment of the present application.
- FIG5 is a schematic diagram showing an example architecture provided in an embodiment of the present application.
- FIG6 is a schematic diagram showing a flow chart of another task processing method provided in an embodiment of the present application.
- FIG. 7 is a schematic diagram showing a flow chart of another task processing method provided in an embodiment of the present application.
- FIG8 shows a schematic diagram of the structure of a task processing device provided in an embodiment of the present application.
- FIG9 shows a schematic diagram of the structure of another task processing device provided in an embodiment of the present application.
- FIG. 10 shows a schematic diagram of the structure of another task processing device provided in an embodiment of the present application.
- This embodiment provides a task processing method, as shown in Figure 1, the method includes:
- Step 101 Monitor the task processing status of each computing node in the distributed system.
- the computing nodes in the distributed system can be different computer devices (such as network computers, servers and other devices), and different computing nodes can read the business data in the preset storage location.
- This embodiment adopts the decentralized concept of distributed systems, distributing all computing nodes to various computer devices to facilitate development and maintenance.
- a unified scheduling platform (Monitor) as a manager to distribute asynchronous tasks.
- the scheduling platform can be a program with a front-end and a back-end, and it is unique in the distributed system. It can be deployed on any computer device in the same network segment. It is responsible for the deployment of tasks. Users submit tasks in the foreground, and the background records the task information submitted by users into the database to undertake monitoring and distribution of these tasks.
- the preset storage location can be a database, folder or data table, etc., which can be used to store business-related data, such as all sequencing data.
- the sequencing data generated by the sequencing instrument will also be transferred to the preset storage location for storage.
- the path of the preset storage location will be mounted on each computer device, so that different computing nodes can read the business data (data required to perform tasks) in the preset storage location.
- Step 102 Determine a target computing node whose task processing state is an idle state.
- computing node A there are five computing nodes in the distributed system, namely computing node A, computing node B, computing node C, computing node D, and computing node E.
- computing node A only the task processing status of computing node A is idle, while the other four computing nodes are in the task processing status, then computing node A can be determined as the target computing node.
- Step 103 Obtain task parameters of the current task to be executed.
- the task parameters may be the parameters referenced by the task execution (such as the task execution subject, the task execution action, the task execution purpose, etc.).
- the target computing node When the subsequent task is executed, the target computing node will execute according to the task parameters.
- Step 104 Send a task execution instruction to the target computing node according to the task parameters of the current task to be executed.
- the target computing node is enabled to execute the current task to be executed based on the business data corresponding to the task parameters in the preset storage location.
- computing node A whose task processing status is idle, parses the received task execution instruction to obtain the task information (including task parameters) that needs to be executed, and then reads the business data corresponding to the task parameters in the preset storage location according to the path of the preset storage location, and then executes the current task to be executed assigned to the computing node A.
- this embodiment can effectively improve the degree of freedom of asynchronous task scheduling, and can mobilize computing nodes deployed on multiple machines to perform distributed processing of asynchronous tasks. Specifically, first monitor the task processing status of each computing node in the distributed system.
- the computing nodes in the distributed system are different computer devices, and different computing nodes can read the business data in the preset storage location; then determine the target computing node whose task processing status is idle; then send a task execution instruction to the target computing node based on the task parameters of the current task to be executed, so that the target computing node executes the current task to be executed based on the business data corresponding to the task parameters in the preset storage location.
- a distributed system for realizing free scheduling of asynchronous tasks is provided, and a large number of asynchronous tasks can be distributedly processed by computing nodes deployed on multiple machines, which can effectively improve the problem of tight computing resources of a single machine and improve the efficiency of asynchronous task processing.
- this embodiment provides a specific method as shown in FIG. 2, which includes:
- Step 201 monitor the task processing status of each computing node in the distributed system at a preset time interval.
- the computing nodes in the distributed system are different computer devices, and different computing nodes can read the business data in the preset storage location.
- this embodiment can use the redis database (only for illustrative purposes, other persistent storage databases can also be used) and a timed polling script to implement the role of the message middleware in the asynchronous framework, so that the scheduling of asynchronous tasks is freed from the celery framework, so that developers can process the redis database and modify the script to achieve the purpose of adapting to various data analysis scenarios.
- this embodiment may provide a distributed system for realizing free scheduling of asynchronous tasks, wherein the distributed system is a system in which hardware or software systems are distributed on different computer devices and can communicate and coordinate with each other through message passing.
- the distributed system a group of independent computer devices presents a unified whole to the user.
- the system has a variety of general physical and logical resources, which can dynamically allocate tasks, and the dispersed physical and logical resources realize information exchange through a computer network.
- the distributed system may include: a data center (preset storage location), a task message middleware, a scheduling platform (Monitor), computing nodes, a scheduling layer front-end page, a scheduling layer backend, etc.
- the data center (preset storage location, such as NFS server) will store all business data (such as sequencing data.
- the sequencing data generated by the sequencing instrument will also be transferred to the data center for storage).
- the path for storing business data will be mounted to each computing node, so that even if the service is deployed on other computer devices, the business data stored in the data center can be read.
- the database can be a redis database. It should be noted that other persistent storage databases can also be selected according to actual needs, and this embodiment does not limit it.
- each task information created will be stored in the redis database.
- the redis database will also store the parameter configuration of each asynchronous task. Specifically, it may include the following:
- ConfigDB Redis database, which stores the parameter configuration of each task, including parameter options, parameter default values, the maximum number of workers for each task, etc.
- Pending queue database (first preset database, PendingQueueDB): redis database. Any created task information is first stored in this pending queue database waiting for processing.
- Running status database (second preset database, RunningBufferDB): Redis database, records the running tasks. If a task enters the running status database, it means that it is already in the running state.
- Scheduling platform (scheduler, Monitor): a role that manages the task queue. It can be implemented as a scheduled script. Its main function is to push the tasks to be executed in the queue in the first preset database to the idle computing nodes for execution.
- the real executor of the asynchronous task can be a package deployed on a computer device (such as a server), which can complete the task logic through the remote Secure Shell Protocol (SSH) command line call.
- the worker is equivalent to a software virtual device, that is, a package of a data analysis function deployed on a single computer device (a single computing node). It can be considered as a background program that responds to these ssh command lines and finally actually executes the asynchronous task.
- Scheduling layer front page For example, users can select sequencing data and corresponding parameters on the page and then click Submit Task, and the front desk will send the parameters to the back desk.
- the front desk will also display all currently queued/running task information, and provide relevant interfaces for operators to add, delete, modify, and query the task queue.
- Scheduling layer backend The backend for scheduling tasks can use Python's Django backend framework, which provides many interfaces to the front-end page to complete the modification of task information and the replacement of task queues. Specifically, it can perform various operations such as reading, writing, and modifying the redis database.
- the task processing method provided in this embodiment is specifically executed, wherein the executor of the method of this embodiment can be the scheduling platform, which can monitor the task processing status of each computing node in the distributed system at a preset time interval (the timing is to monitor once every 1 second), and then timely discover the target computing nodes whose task processing status is idle, and assign them the tasks to be executed queued in the first preset database.
- the executor of the method of this embodiment can be the scheduling platform, which can monitor the task processing status of each computing node in the distributed system at a preset time interval (the timing is to monitor once every 1 second), and then timely discover the target computing nodes whose task processing status is idle, and assign them the tasks to be executed queued in the first preset database.
- Step 202 Determine a target computing node whose task processing state is an idle state.
- Step 203 extracting the task parameters of the tasks to be executed that are ranked high from the first preset database according to the arrangement order of the tasks to be executed.
- the arrangement order of the tasks to be executed in the first preset database may be determined according to the creation time of the tasks to be executed and/or the corresponding set priorities. After extracting the task parameters of the tasks to be executed from the first preset database, the tasks to be executed and the task parameters of the tasks to be executed will be deleted from the first preset database to save storage space of the first preset database.
- the earlier the creation time of the task to be executed the higher its arrangement order in the first preset database (the higher its ranking), and the later the creation time of the task to be executed, the lower its arrangement order in the first preset database (the lower its ranking).
- the user can set the priority of the task to be executed according to actual needs. The higher the priority of the task to be executed, the higher its arrangement order in the first preset database (the higher its ranking), and the lower the priority of the task to be executed, the lower its arrangement order in the first preset database (the lower its ranking).
- Step 204 The extracted task parameters are combined to obtain command line information corresponding to the task to be executed.
- Step 205 Send command line information to the target computing node through the secure shell protocol.
- a software tool is installed on the target computing node, and the target computing node executes the current task to be executed in response to the command line information through the software tool.
- the target computing node responds to the ssh command line through a software tool and executes an asynchronous task in a background program, wherein the software tool may be a software virtual device with a data analysis function, namely, a worker.
- the task parameters of the top-ranked tasks to be executed in PendingQueueDB are extracted, the command line to be executed corresponding to the task is spliced out, and then sent to computing node A via SSH, so that computing node A executes the current task to be executed based on the business data corresponding to the task parameters in the preset storage location.
- step 205 may specifically include: obtaining a key according to the current time information and the identification of the local computer device (such as the MAC address, IP address, motherboard ID number, etc. of the terminal) (the current time information and the identification of the local computer device may be combined to calculate a hash value or an MD5 value, etc. to obtain the key); after encrypting the command line information with the key, sending it to the target computing node through the secure shell protocol, so that the target computing node can infer the key according to the time information of the received command line information and the identification of each computer device that has established trust with the target computing node, and use the key to decrypt the command line information.
- the target computing node after encrypting the command line information with the key, sending it to the target computing node through the secure shell protocol, so that the target computing node can infer the key according to the time information of the received command line information and the identification of each computer device that has established trust with the target computing node, and use the key to decrypt the command line information.
- the target computing node obtains the time within 3 seconds (such as 9:59:59, 9:59:58, 9:59:57) based on the time information of receiving the command line information (such as 10:00:00), and then combines the time information within 3 seconds with the identification of each computer device that has established trust with the target computing node to calculate a hash value or MD5 value, and then uses the hash value or MD5 value one by one to try to decrypt the encrypted command line information until the decryption is successful, thereby obtaining the decrypted command line information.
- 3 seconds such as 9:59:59, 9:59:58, 9:59:57
- the target computing node uses the hash value or MD5 value one by one to try to decrypt the encrypted command line information until the decryption is successful, thereby obtaining the decrypted command line information.
- the method of this embodiment may also include: creating a running record of the current task to be executed in a second preset database (RunningBufferDB), wherein the running records of each task created in the second preset database can be provided to the client for display, so that the user can view the progress of task processing in real time, thereby improving the user's experience.
- RuleBufferDB a second preset database
- the method of this embodiment may also include: responding to an update setting instruction of the distributed system, obtaining the number of computing nodes to be updated and set; and then determining the computing nodes to be started or shut down according to the number of computing nodes based on the computing performance information and real-time task processing status of each computing node in the distributed system.
- users can set the number of computing nodes in a distributed system, which can be set before or during the operation of the distributed system.
- computing nodes with better computing performance can be started first; and during the operation of the distributed system, based on the number of computing nodes set by the user, appropriate computing nodes can be started or shut down according to computing performance information and real-time task processing status, so as to achieve the optimal overall computing performance of the distributed system.
- the basecall task specifically converts the identified read result (reads) signal into a site (base). As shown in Figure 4, select the file and task parameters to be analyzed on the front-end page, and click the Add button (ADD) to create a task. At this time, the task record will appear in PendingQueueDB (the first preset database). Due to the limitation of the number of computing nodes, many submitted tasks will be queued according to the order of submission. It can be observed that the analysis task just submitted is at the 169th position in the queue. Then in the redis database of the stack structure, the position is the first.
- PendingQueueDB the first preset database
- the backend interface can be called through the front-end page to process the task queue, thereby improving the priority position of certain tasks. If the task is swapped from the end of the queue to the first place, when the task is in the queue, the task position and task parameters can still be changed by changing the redis database.
- the computing node is idle, the task in the stack structure will be extracted, and the parameters will be spliced into the corresponding SSH remote command line, which will be sent to the idle computing node for execution.
- a new task record will be created in RunningBuffer (the second preset database) to track progress.
- RunningBuffer the second preset database
- This embodiment transforms the single-machine task scheduling mode into a distributed system scheduling mode, which can fully utilize the computing nodes of multiple computing devices and effectively solve problems that are difficult to solve in a single-machine performance bottleneck scenario.
- a method as shown in FIG. 6 is provided, which can be applied to a first computer device (a single computing node), and the method includes:
- Step 301 A first computer device sends a current task processing status of the first computer device to a second computer device.
- the first computer device may be any computing node in a distributed system
- the second computer device is a computer device deployed with a scheduling platform.
- Step 302 The first computer device receives a task execution instruction sent by the second computer device.
- the task execution instruction is sent by the second computer device when it is determined that the task processing state is an idle state.
- the task execution instruction carries the task parameters of the current task to be executed.
- step 302 may specifically include: the first computer device receives command line information sent by the second computer device through a secure shell protocol, where the command line information is obtained by splicing according to task parameters;
- a first computer device receives command line information sent by a second computer device via a secure shell protocol, which may specifically include: the first computer device receives encrypted command line information sent by the second computer device via a secure shell protocol; then, based on time information of receiving the command line information and identifications of each computer device that has established trust with the first computer device, determines a key required to decrypt the command line information; and then uses the key to decrypt the command line information.
- step 205 The specific decryption process can be found in the corresponding description in step 205, which will not be repeated here.
- Step 303 The first computer device executes the current task to be executed according to the task parameters.
- step 303 may specifically include: executing the current task to be executed by executing command line information.
- step 303 may specifically include: executing the current task to be executed based on the business data corresponding to the task parameters in a preset storage location, wherein the preset storage location stores business data corresponding to different task parameters.
- This embodiment transforms the single-machine task scheduling mode into a distributed system scheduling mode, which can fully utilize the computing nodes of multiple computing devices and effectively solve problems that are difficult to solve in a single-machine performance bottleneck scenario.
- a method as shown in FIG. 7 is provided, which can be applied to a second computer device (which can be a computer device on which the scheduling platform is deployed), and the method includes:
- Step 401 The second computer device requests the first computer device to obtain the current task processing status of the first computer device.
- the first computer device may be any computing node in a distributed system
- the second computer device is a computer device deployed with a scheduling platform.
- Step 402 If the current task processing state of the first computer device is an idle state, the second computer device obtains the task parameters of the current task to be executed.
- obtaining the task parameters of the current task to be executed in step 402 may specifically include: extracting the task parameters of the top-ranked tasks to be executed from the first preset database according to the arrangement order of the tasks to be executed, wherein the arrangement order of the tasks to be executed in the first preset database is determined according to the creation time of the tasks to be executed and/or the corresponding set priority.
- the earlier the creation time of the task to be executed the higher its arrangement order in the first preset database (the higher its ranking), and the later the creation time of the task to be executed, the lower its arrangement order in the first preset database (the lower its ranking).
- the user can set the priority of the task to be executed according to actual needs. The higher the priority of the task to be executed, the higher its arrangement order in the first preset database (the higher its ranking), and the lower the priority of the task to be executed, the lower its arrangement order in the first preset database (the lower its ranking).
- Step 403 The second computer device sends a task execution instruction to the first computer device according to the task parameters.
- the task execution instruction is used to instruct the first computer device to execute the current task to be executed according to the task parameters.
- step 403 may specifically include: splicing the task parameters to obtain command line information to be executed corresponding to the task; and sending the command line information to the first computer device via a secure shell protocol.
- the sending of command line information to the first computer device through the secure shell protocol may specifically include: obtaining a key according to the current time information and the identification of the local computer device; after encrypting the command line information using the key, sending it to the first computer device through the secure shell protocol.
- the specific decryption process can be found in the corresponding descriptions in steps 205 and 302, which will not be repeated here.
- the method of this embodiment may also include: creating a running record of the current task to be executed in the second preset database; receiving a viewing instruction for the task running record; and determining a display result corresponding to the viewing instruction according to the running records of each task created in the second preset database, so that the user can view the progress of the task processing in real time, thereby improving the user's experience.
- This embodiment transforms the single-machine task scheduling mode into a distributed system scheduling mode, which can fully utilize the computing nodes of multiple computing devices and effectively solve problems that are difficult to solve in a single-machine performance bottleneck scenario.
- this embodiment provides a task processing device, as shown in FIG. 8 , which includes: a monitoring module 51 , a determining module 52 , an acquiring module 53 , and a sending module 54 .
- a monitoring module 51 is configured to monitor the task processing status of each computing node in the distributed system, where the computing nodes in the distributed system are different computer devices, and different computing nodes can read the business data in the preset storage location;
- a determination module 52 is configured to determine a target computing node whose task processing state is an idle state
- the acquisition module 53 is configured to acquire the task parameters of the current task to be executed
- the sending module 54 is configured to send a task execution instruction to the target computing node according to the task parameters, so that the target computing node executes the current task to be executed based on the business data corresponding to the task parameters in the preset storage location.
- the acquisition module 53 is specifically configured to extract the task parameters of the top-ranked tasks to be executed from the first preset database according to the arrangement order of the tasks to be executed, wherein the arrangement order between the tasks to be executed in the first preset database is determined according to the creation time of the tasks to be executed and/or the corresponding set priority.
- the determination module 52 is further configured to create a running record of the current task to be executed in a second preset database, wherein the running record of each task created in the second preset database can be provided to the client for display.
- the sending module 54 is specifically configured to splice the task parameters into command line information to be executed corresponding to the task; and send the command line information to the target computing node through the secure shell protocol.
- the sending module 54 is further configured to obtain a key based on the current time information and the identification of the local computer device; after encrypting the command line information using the key, it is sent to the target computing node through the secure shell protocol, so that the target computing node can infer the key based on the time information of receiving the command line information and the identification of each computer device that has established trust with the target computing node, and use the key to decrypt the command line information.
- the acquisition module 53 is further configured to obtain the number of computing nodes to be updated in response to an update setting instruction of the distributed system
- the determination module 52 is further configured to determine the computing nodes to be started or shut down according to the number of computing nodes based on the computing performance information and the real-time task processing status of each computing node in the distributed system.
- the monitoring module 51 is specifically configured to monitor the task processing status of each computing node in the distributed system at a preset time interval.
- this embodiment provides a task processing device, which is applied to a first computer device.
- the device includes: a sending module 61 , a receiving module 62 , and an executing module 63 .
- a sending module 61 configured to send the current task processing status of the first computer device to the second computer device;
- the receiving module 62 is configured to receive a task execution instruction sent by the second computer device, wherein the task execution instruction is sent by the second computer device when the task processing state is determined to be an idle state, and the task execution instruction carries a task parameter of the current task to be executed;
- the execution module 63 is configured to execute the current task to be executed according to the task parameters.
- the execution module 63 is specifically configured to execute the current task to be executed based on the business data corresponding to the task parameters in a preset storage location, and the preset storage location stores business data corresponding to different task parameters.
- the receiving module 62 is specifically configured to receive command line information sent by the second computer device through a secure shell protocol, wherein the command line information is obtained by splicing according to the task parameters;
- the execution module 63 is specifically configured to execute the current task to be executed by executing the command line information.
- the receiving module 62 is further configured to receive the encrypted command line information sent by the second computer device through the secure shell protocol; determine the key required to decrypt the command line information based on the time information of receiving the command line information and the identification of each computer device that has established trust with the first computer device; and use the key to decrypt and obtain the command line information.
- this embodiment provides a task processing device, which is applied to a second computer device.
- the device includes: a receiving module 71 , an acquiring module 72 , and a sending module 73 .
- the receiving module 71 is configured to request the first computer device to obtain the current task processing status of the first computer device;
- the acquisition module 72 is configured to acquire the task parameters of the current task to be executed if the task processing state is an idle state;
- the sending module 73 is configured to send a task execution instruction to the first computer device according to the task parameters, wherein the task execution instruction is used to instruct the first computer device to execute the current task to be executed according to the task parameters.
- the acquisition module 72 is specifically configured to extract the task parameters of the top-ranked tasks to be executed from the first preset database according to the arrangement order of the tasks to be executed, wherein the arrangement order between the tasks to be executed in the first preset database is determined according to the creation time of the tasks to be executed and/or the corresponding set priority.
- the acquisition module 72 is also configured to create an operation record of the current task to be executed in a second preset database; receive a viewing instruction for the task operation record; and determine a display result corresponding to the viewing instruction based on the operation records of each task created in the second preset database.
- the sending module 73 is specifically configured to splice the task parameters into command line information to be executed corresponding to the task; and send the command line information to the first computer device through the secure shell protocol.
- the sending module 73 is further configured to obtain a key according to current time information and an identification of a local computer device; after encrypting the command line information using the key, the key is sent to the first computer device via a secure shell protocol.
- this embodiment further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method shown in FIG. 1 and FIG. 2 is implemented.
- this embodiment further provides another computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method shown in FIG. 6 is implemented.
- this embodiment further provides another computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method shown in FIG. 7 is implemented.
- the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, USB flash drive, mobile hard disk, etc.), including a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods of various implementation scenarios of the present application.
- a non-volatile storage medium which can be a CD-ROM, USB flash drive, mobile hard disk, etc.
- a computer device which can be a personal computer, server, or network device, etc.
- the embodiment of the present application also provides an electronic device, which may specifically include a personal computer, a server, a network computer and other devices, and the device includes a storage medium and a processor; the storage medium is used to store a computer program; the processor is used to execute the computer program to implement the above-mentioned method as shown in Figures 1 and 2.
- the embodiment of the present application also provides another electronic device, which may specifically include a personal computer, a server, a network computer and other devices, and the device includes a storage medium and a processor; the storage medium is used to store a computer program; the processor is used to execute the computer program to implement the above method as shown in Figure 6.
- the embodiment of the present application also provides another electronic device, which may specifically include a personal computer, a server, a network computer and other devices, and the device includes a storage medium and a processor; the storage medium is used to store a computer program; the processor is used to execute the computer program to implement the above method as shown in Figure 7.
- the above-mentioned physical device may also include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, etc.
- the user interface may include a display, an input unit such as a keyboard, etc., and the optional user interface may also include a USB interface, a card reader interface, etc.
- the network interface may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface), etc.
- the storage medium may also include an operating system and a network communication module.
- the operating system is a program that manages the hardware and software resources of the above-mentioned physical device, and supports the operation of the information processing program and other software and/or programs.
- the network communication module is used to realize the communication between the components inside the storage medium, and the communication with other hardware and software in the information processing physical device.
- the present application can be implemented by means of software plus the necessary general hardware platform, or by hardware.
- the degree of freedom of asynchronous task scheduling can be effectively improved, and computing nodes deployed on multiple machines can be mobilized to perform distributed processing of asynchronous tasks.
- a distributed system for realizing free scheduling of asynchronous tasks is provided, and a large number of asynchronous tasks can be distributedly processed by computing nodes deployed on multiple machines, which can effectively improve the problem of tight computing resources on a single machine and improve the efficiency of asynchronous task processing.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
- Multi Processors (AREA)
Abstract
Description
Claims (19)
- 一种任务处理方法,其特征在于,包括:监测分布式系统中的每个计算节点的任务处理状态,所述分布式系统中的计算节点为不同的计算机设备,且不同的计算节点均能读取预设存储位置中的业务数据;确定所述任务处理状态为空闲状态的目标计算节点;获取当前待执行任务的任务参数;根据所述任务参数,向所述目标计算节点发送任务执行指令,以使得所述目标计算节点基于所述预设存储位置中与所述任务参数相应的业务数据,执行所述当前待执行任务。
- 根据权利要求1所述的方法,其特征在于,所述获取当前待执行任务的任务参数,包括:从第一预设数据库中,按照待执行任务之间的排列顺序,提取排名靠前的待执行任务的任务参数,其中,所述第一预设数据库中的各个待执行任务之间的排列顺序是按照待执行任务的创建时间和/或对应设置的优先级确定的。
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:在第二预设数据库中创建所述当前待执行任务的运行记录,其中,所述第二预设数据库中创建的各个任务的运行记录能够提供给客户端进行显示。
- 根据权利要求1所述的方法,其特征在于,所述根据所述任务参数,向所述目标计算节点发送任务执行指令,包括:将所述任务参数拼接出任务对应所要执行的命令行信息;通过安全外壳协议向所述目标计算节点发送所述命令行信息。
- 根据权利要求4所述的方法,其特征在于,所述通过安全外壳协议向所述目标计算节点发送所述命令行信息,包括:根据当前时间信息和本地计算机设备的标识,获取密钥;在利用所述密钥对所述命令行信息进行加密后,通过安全外壳协议发送给所述目标计算节点,以使得所述目标计算节点根据接收到所述命令行信息的时间信息和与所述目标计算节点建立信任的各个计算机设备的标识推算出所述密钥,并利用所述密钥解密得到所述命令行信息。
- 根据权利要求4所述的方法,其特征在于,所述目标计算节点上安装有软件工具,所述目标计算节点通过所述软件工具响应于所述命令行信息执行所述当前待执行任务。
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:响应于所述分布式系统的更新设置指令,获取更新设置的计算节点个数;根据所述分布式系统中各个计算节点的计算性能信息和实时的任务处理状态,按照所述计算节点个数确定启动或关闭的计算节点。
- 根据权利要求1所述的方法,其特征在于,所述监测分布式系统中的每个计算节点 的任务处理状态,包括:按照预设时间间隔,监测所述分布式系统中的每个计算节点的任务处理状态。
- 一种任务处理方法,其特征在于,应用于第一计算机设备,所述方法包括:向第二计算机设备发送所述第一计算机设备当前的任务处理状态;接收所述第二计算机设备发送的任务执行指令,所述任务执行指令中携带有当前待执行任务的任务参数;基于预设存储位置中与所述任务参数相应的业务数据,执行所述当前待执行任务,所述预设存储位置中保存有不同的任务参数分别对应的业务数据。
- 根据权利要求9所述的方法,其特征在于,所述接收所述第二计算机设备发送的任务执行指令,包括:接收所述第二计算机设备通过安全外壳协议发送的命令行信息,所述命令行信息是根据所述任务参数拼接得到的;所述根据所述任务参数,执行所述当前待执行任务,包括:通过执行所述命令行信息实现执行所述当前待执行任务。
- 一种任务处理方法,其特征在于,应用于第二计算机设备,所述方法包括:向第一计算机设备请求获取所述第一计算机设备当前的任务处理状态;若所述任务处理状态为空闲状态,则获取当前待执行任务的任务参数;根据所述任务参数,向所述第一计算机设备发送任务执行指令,所述任务执行指令用于指示所述第一计算机设备根据所述任务参数执行所述当前待执行任务。
- 根据权利要求11所述的方法,其特征在于,所述获取当前待执行任务的任务参数,包括:从第一预设数据库中,按照待执行任务之间的排列顺序,提取排名靠前的待执行任务的任务参数,其中,所述第一预设数据库中的各个待执行任务之间的排列顺序是按照待执行任务的创建时间和/或对应设置的优先级确定的。
- 根据权利要求11所述的方法,其特征在于,所述方法还包括:在第二预设数据库中创建所述当前待执行任务的运行记录;接收任务运行记录的查看指令;根据所述第二预设数据库中创建的各个任务的运行记录,确定与所述查看指令对应的显示结果。
- 根据权利要求11所述的方法,其特征在于,所述根据所述任务参数,向所述第一计算机设备发送任务执行指令,包括:将所述任务参数拼接出任务对应所要执行的命令行信息;通过安全外壳协议向所述第一计算机设备发送所述命令行信息。
- 一种任务处理装置,其特征在于,包括:监测模块,被配置为监测分布式系统中的每个计算节点的任务处理状态,所述分布式 系统中的计算节点为不同的计算机设备,且不同的计算节点均能读取预设存储位置中的业务数据;确定模块,被配置为确定所述任务处理状态为空闲状态的目标计算节点;获取模块,被配置为获取当前待执行任务的任务参数;发送模块,被配置为根据所述任务参数,向所述目标计算节点发送任务执行指令,以使得所述目标计算节点基于所述预设存储位置中与所述任务参数相应的业务数据,执行所述当前待执行任务。
- 一种任务处理装置,其特征在于,应用于第一计算机设备,所述装置包括:发送模块,被配置为向第二计算机设备发送所述第一计算机设备当前的任务处理状态;接收模块,被配置为接收所述第二计算机设备发送的任务执行指令,所述任务执行指令是所述第二计算机设备在确定所述任务处理状态为空闲状态时发送的,所述任务执行指令中携带有当前待执行任务的任务参数;执行模块,被配置为根据所述任务参数,执行所述当前待执行任务。
- 一种任务处理装置,其特征在于,应用于第二计算机设备,所述装置包括:接收模块,被配置为向第一计算机设备请求获取所述第一计算机设备当前的任务处理状态;获取模块,被配置为若所述任务处理状态为空闲状态,则获取当前待执行任务的任务参数;发送模块,被配置为根据所述任务参数,向所述第一计算机设备发送任务执行指令,所述任务执行指令用于指示所述第一计算机设备根据所述任务参数执行所述当前待执行任务。
- 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至14中任一项所述的方法。
- 一种电子设备,包括存储介质、处理器及存储在存储介质上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现权利要求1至14中任一项所述的方法。
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2022/140507 WO2024130565A1 (zh) | 2022-12-20 | 2022-12-20 | 任务处理方法、装置及电子设备 |
| CN202280101155.7A CN120077365A (zh) | 2022-12-20 | 2022-12-20 | 任务处理方法、装置及电子设备 |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2022/140507 WO2024130565A1 (zh) | 2022-12-20 | 2022-12-20 | 任务处理方法、装置及电子设备 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2024130565A1 true WO2024130565A1 (zh) | 2024-06-27 |
Family
ID=91587261
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2022/140507 Ceased WO2024130565A1 (zh) | 2022-12-20 | 2022-12-20 | 任务处理方法、装置及电子设备 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN120077365A (zh) |
| WO (1) | WO2024130565A1 (zh) |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108776604A (zh) * | 2018-05-23 | 2018-11-09 | 网易(杭州)网络有限公司 | 目标任务的执行方法及系统 |
| CN109800070A (zh) * | 2019-01-02 | 2019-05-24 | 深圳壹账通智能科技有限公司 | 任务处理方法和系统 |
| US20200073710A1 (en) * | 2018-08-30 | 2020-03-05 | Baidu Online Network Technology (Beijing) Co., Ltd. | Task scheduling method, apparatus, electronic device and storage medium |
| CN112596885A (zh) * | 2020-12-25 | 2021-04-02 | 网易(杭州)网络有限公司 | 任务调度方法、装置、设备及存储介质 |
| CN113553178A (zh) * | 2021-07-15 | 2021-10-26 | 北京字跳网络技术有限公司 | 任务处理方法、装置和电子设备 |
| CN113986534A (zh) * | 2021-10-15 | 2022-01-28 | 腾讯科技(深圳)有限公司 | 任务调度方法、装置、计算机设备和计算机可读存储介质 |
-
2022
- 2022-12-20 CN CN202280101155.7A patent/CN120077365A/zh active Pending
- 2022-12-20 WO PCT/CN2022/140507 patent/WO2024130565A1/zh not_active Ceased
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108776604A (zh) * | 2018-05-23 | 2018-11-09 | 网易(杭州)网络有限公司 | 目标任务的执行方法及系统 |
| US20200073710A1 (en) * | 2018-08-30 | 2020-03-05 | Baidu Online Network Technology (Beijing) Co., Ltd. | Task scheduling method, apparatus, electronic device and storage medium |
| CN109800070A (zh) * | 2019-01-02 | 2019-05-24 | 深圳壹账通智能科技有限公司 | 任务处理方法和系统 |
| CN112596885A (zh) * | 2020-12-25 | 2021-04-02 | 网易(杭州)网络有限公司 | 任务调度方法、装置、设备及存储介质 |
| CN113553178A (zh) * | 2021-07-15 | 2021-10-26 | 北京字跳网络技术有限公司 | 任务处理方法、装置和电子设备 |
| CN113986534A (zh) * | 2021-10-15 | 2022-01-28 | 腾讯科技(深圳)有限公司 | 任务调度方法、装置、计算机设备和计算机可读存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN120077365A (zh) | 2025-05-30 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US12314752B2 (en) | Execution of auxiliary functions in an on-demand network code execution system | |
| JP7197612B2 (ja) | オンデマンドネットワークコード実行システム上での補助機能の実行 | |
| US11243953B2 (en) | Mapreduce implementation in an on-demand network code execution system and stream data processing system | |
| US11119813B1 (en) | Mapreduce implementation using an on-demand network code execution system | |
| CN103092698B (zh) | 云计算应用自动部署系统及方法 | |
| CN103297395B (zh) | 一种互联网业务的实现方法、系统以及装置 | |
| CN106533713B (zh) | 一种应用部署方法及设备 | |
| KR20210019533A (ko) | 온-디맨드 네트워크 코드 실행 시스템에서의 운영 체제 커스터마이제이션 | |
| US9104488B2 (en) | Support server for redirecting task results to a wake-up server | |
| CN108681777A (zh) | 一种基于分布式系统的机器学习程序运行的方法和装置 | |
| CN109298937A (zh) | 文件解析方法及网络设备 | |
| KR20110083084A (ko) | 가상화를 이용한 서버 운영 장치 및 방법 | |
| CN112104679B (zh) | 处理超文本传输协议请求的方法、装置、设备和介质 | |
| CN115268949A (zh) | 一种镜像预热方法、装置、设备及存储介质 | |
| CN114296953A (zh) | 一种多云异构系统及任务处理方法 | |
| WO2019237587A1 (zh) | 脚本的执行方法、服务器管理系统及存储介质 | |
| CN116263768B (zh) | 基于云平台的信息推送方法及装置 | |
| CN118331686B (zh) | 基于多种虚拟化技术的云服务器密码机系统及实现方法 | |
| CN116112497B (zh) | 一种云主机集群的节点调度方法、装置、设备及介质 | |
| WO2018188607A1 (zh) | 流处理方法及装置 | |
| WO2024130565A1 (zh) | 任务处理方法、装置及电子设备 | |
| CN109783201A (zh) | 数据交换方法及其系统 | |
| WO2024251107A1 (zh) | 容器编排与数据访问方法、电子设备及存储介质 | |
| CN118550651A (zh) | 云应用启动方法 | |
| CN103761128A (zh) | 一种指令执行方法、装置及系统 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22968867 Country of ref document: EP Kind code of ref document: A1 |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 202280101155.7 Country of ref document: CN |
|
| WWP | Wipo information: published in national office |
Ref document number: 202280101155.7 Country of ref document: CN |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 22968867 Country of ref document: EP Kind code of ref document: A1 |