WO2021000758A1 - 机器人资源任务周期管控方法及装置 - Google Patents

机器人资源任务周期管控方法及装置 Download PDF

Info

Publication number
WO2021000758A1
WO2021000758A1 PCT/CN2020/097592 CN2020097592W WO2021000758A1 WO 2021000758 A1 WO2021000758 A1 WO 2021000758A1 CN 2020097592 W CN2020097592 W CN 2020097592W WO 2021000758 A1 WO2021000758 A1 WO 2021000758A1
Authority
WO
WIPO (PCT)
Prior art keywords
task
executed
robot
resource
managing
Prior art date
Application number
PCT/CN2020/097592
Other languages
English (en)
French (fr)
Inventor
林智泓
陈文极
林震宇
林晨
徐立宇
陈艺辉
陶峥
Original Assignee
中国建设银行股份有限公司
建信金融科技有限责任公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 中国建设银行股份有限公司, 建信金融科技有限责任公司 filed Critical 中国建设银行股份有限公司
Publication of WO2021000758A1 publication Critical patent/WO2021000758A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration

Definitions

  • the invention relates to the field of artificial intelligence, in particular to robot process automation technology, and in particular to a method and device for managing and controlling robot resource task cycles.
  • RPA Robot Process Automation
  • RPA Robot Process Automation
  • the life cycle of a task needs to go through the following processes: initialization (INITIALIZATION), waiting to run (WAITING), running (PROCESSING), success/failure (SUCCESS/FAILURE), suspension (INTERRUPT). If only one task owner can perform the task, the life cycle of the task becomes simple, as shown in Figure 1.
  • the task owner may send a task termination signal at any time. In this case, the life cycle of the task becomes extremely complex and unstable.
  • the present invention can establish a controllable method for managing and controlling the task cycle of robot resources, which can provide a safe and accurate method for managing and controlling the life cycle of robot resource tasks to ensure the life of robot resource tasks.
  • the integrity of the cycle process can establish a controllable method for managing and controlling the task cycle of robot resources, which can provide a safe and accurate method for managing and controlling the life cycle of robot resource tasks to ensure the life of robot resource tasks. The integrity of the cycle process.
  • the present invention provides the following technical solutions:
  • the present invention provides a method for managing and controlling robot resource task cycles, including:
  • the task to be executed is in the task thread pool, the task to be executed is processed as a result of checking whether there are idle robot resources.
  • the method before placing the task to be executed in the real-time queue of the storage system REDIS, the method further includes:
  • the task to be executed corresponding to the preset time point is transferred to the real-time queue.
  • the processing of the task to be executed as a result of checking whether there is an idle robot resource includes: processing the task to be executed with the result of using a Lua script to check whether there is an idle robot resource.
  • the result of using a Lua script to check whether there are free robot resources to process the task to be executed includes:
  • the task to be executed is placed in the delay queue SortedSet of the REDIS.
  • the method for managing and controlling the robot resource task cycle further includes:
  • the method for managing and controlling the robot resource task cycle further includes: using the periodic task of QUARTZ to periodically refresh the queue in which the task to be executed is located.
  • the method for managing and controlling the robot resource task cycle further includes:
  • the increasing the number of idle robot resources includes: increasing the number by using the INCRBYkeyincremet command of the counter RedisConter.
  • the method for managing and controlling the robot resource task cycle further includes:
  • the present invention provides a robot resource task cycle management and control device, which includes:
  • the task to be executed acquiring unit is used to acquire the task to be executed and place the task to be executed in the real-time queue of the storage system REDIS;
  • the robot resource checking unit is used to process the task to be executed as a result of checking whether there are idle robot resources.
  • the robot resource task cycle management and control device further includes:
  • the task to be executed setting unit is used to place the task to be executed in the timing queue of the open source job scheduling framework QUARTZ;
  • the task to be executed transfer unit is used to transfer the task to be executed corresponding to the preset time point to the real-time queue.
  • the robot resource checking unit includes: a robot resource checking module, which is used to process the task to be executed by using the result of a Lua script to check whether there is an idle robot resource.
  • the robot resource checking module is specifically configured to place the task to be executed in the delay queue SortedSet of the REDIS.
  • the robot resource task cycle management and control device further includes:
  • the SortedSet judging unit is used to judge whether the tasks to be executed in the SortedSet have stayed for a preset waiting time
  • the Lua script transfer unit is used to transfer the task to be executed to the real-time queue by using the Lua script.
  • the robot resource task cycle management and control device further includes:
  • the to-be-executed task refresh unit is used to periodically refresh the queue where the to-be-executed task is located by using the periodic tasks of QUARTZ.
  • the robot resource task cycle management and control device further includes:
  • the robot resource increase unit is used to increase the number of idle robot resources.
  • the robot resource increasing unit is specifically configured to increase the number by using the INCRBYkeyincremet command of the counter RedisConter.
  • the robot resource task cycle management and control device further includes:
  • the robot resource reduction unit uses the DECRBYkeydecrement command of RedisConter to reduce the number of idle robot resources.
  • the present invention provides an electronic device including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and the processor implements the steps of the method for controlling the task cycle of robot resources when the program is executed.
  • the present invention provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method for managing and controlling a robot resource task cycle are realized.
  • the present invention provides a method and device for controlling the cycle of robot resource tasks. It checks whether there are idle robot resources through a Lua script, and puts the tasks to be executed into a real-time queue according to the check results.
  • the present invention also proposes the use of The counter RedisConter with atomic operations is used to increase or decrease the number of idle robot resources.
  • the present invention uses QUARTZ and REDIS to manage the task life cycle method, so that tasks can be accurately controlled and ensure the integrity and clarity of the task life cycle process It is feasible and feasible, and through the use of REDIS to control the task cycle of robot resources, to prevent the repeated occupation and repeated release of resources, so that the robot resources can be used safely.
  • the present invention provides a complete cancellation strategy that can cancel a task to be executed, and defines in detail the implementation method, time, and cancellation content of the cancellation operation, both how to request cancellation of the task and when the task (When) Check whether cancellation has been requested, and what operations should be performed when responding to the cancellation request, so as to avoid the problem that the shared data results will be in an inconsistent state when the task is canceled.
  • Figure 1 is a schematic diagram of the life cycle of tasks in the background of the present invention.
  • FIG. 2 is a first schematic flowchart of a method for managing and controlling a robot resource task cycle in an embodiment of the present invention
  • FIG. 3 is a schematic diagram of the overall idea flow of an embodiment of the present invention.
  • FIG. 4 is a second schematic flowchart of a method for managing and controlling a robot resource task cycle in an embodiment of the present invention
  • FIG. 5 is a third schematic flowchart of a method for managing and controlling robot resource task cycles in an embodiment of the present invention.
  • FIG. 6 is a fourth flowchart of a method for managing and controlling a robot resource task cycle in an embodiment of the present invention.
  • FIG. 7 is a fifth schematic flowchart of a method for managing and controlling a robot resource task cycle in an embodiment of the present invention.
  • FIG. 8 is a sixth flowchart of a method for managing and controlling a robot resource task cycle in an embodiment of the present invention.
  • FIG. 9 is a schematic flow chart of a method for managing and controlling robot resource task cycles in a specific application example of the present invention.
  • FIG. 10 is a schematic structural diagram of a robot resource task cycle management and control device in an embodiment of the present invention.
  • FIG. 11 is a schematic structural diagram of an electronic device in an embodiment of the present invention.
  • Java thread contains a complete set of interrupt strategies.
  • This interrupt strategy provides a cooperative mechanism that enables one thread to terminate the current work of another thread.
  • the correct understanding of the interrupt operation is: it does not actually interrupt a running thread, but only issues an interrupt request, and then the thread interrupts itself at the next appropriate moment. These moments are also called cancellation points.
  • the embodiment of the present invention provides a specific implementation manner of a method for managing and controlling a robot resource task cycle. Referring to Figures 2 and 3, the method specifically includes the following content:
  • Step 100 Obtain the task to be executed, and place the task to be executed in the real-time queue of the storage system REDIS.
  • the belt execution task in step 100 is a task to be executed by the robot, and the task is initiated by the customer and executed by the robot.
  • REDIS in step 100 is a key-value storage system, which supports many types of stored values, including string (string), list (linked list), set (collection), zset (sorted set-ordered set) and hash (Hash type). These data types all support push/pop, add/remove, intersection, union and difference, and richer operations, and these operations are all atomic. On this basis, REDIS supports a variety of different ways of sorting. Like memcached, in order to ensure efficiency, data is cached in memory. REDIS will periodically write updated data to disk or write modification operations to additional record files, and on this basis, it realizes master-slave (master-slave) synchronization. In addition, REDIS is a high-performance key-value database that provides clients such as Java, C/C++, C#, PHP, JavaScript, Perl, Object-C, Python, Ruby, Erlang, etc.
  • Step 200 When the task to be executed is in the task thread pool, the task to be executed is processed as a result of checking whether there are idle robot resources.
  • the present invention provides a method for controlling the cycle of robot resource tasks. It checks whether there are idle robot resources through a Lua script, and puts the tasks to be executed in a real-time queue according to the check results.
  • the present invention also proposes the use of The operating counter RedisConter is used to increase or decrease the number of idle robot resources.
  • the present invention uses QUARTZ and REDIS to manage the task life cycle method, so that tasks can be accurately controlled, and ensure the integrity, clarity and integrity of the task life cycle process. Feasibility, and through the use of REDIS to control the task cycle of robot resources, eliminate the repeated occupation and repeated release of resources, so that the robot resources can be used safely.
  • the present invention provides a complete cancellation strategy that can cancel the task to be executed, and specifies the implementation method, time, and cancellation content of the cancellation operation in detail, both how to request cancellation of the task and when the task (When) Check whether cancellation has been requested, and what operations should be performed when responding to the cancellation request, so as to avoid the problem that the shared data results will be in an inconsistent state when the task is canceled.
  • the method for managing and controlling a robot resource task cycle further includes:
  • Step 80 Transfer the task to be executed corresponding to the preset time point to the real-time queue.
  • step 80 When step 80 is implemented, it is specifically as follows: QUARTZ automatically starts the task at the specified time (the time specified by the user), and puts the task into the LIST (real-time queue) of REDIS. At this time, the status of the task is waiting to be executed (WAITING).
  • Step 90 Place the task to be executed in the timing queue of the open source job scheduling framework QUARTZ.
  • QUARTZ is an open source job scheduling framework written by java.
  • the core of QUARTZ is the scheduler.
  • the scheduler is responsible for managing the QUARTZ application runtime environment.
  • QUARTZ adopts a multi-threaded architecture.
  • the framework initializes a set of worker threads, which are used by the scheduler to perform scheduled tasks.
  • step 90 is implemented in the following manner: calculate the real execution time of the task, and put the task in QUARTZ, which is a timed task of QUARTZ, and the state of the task is INITIALIZATION at this time. It can be understood that there is no priority in the execution order of step 80 and step 90.
  • processing the task to be executed as a result of checking whether there are idle robot resources in step 200 includes: using a Lua script to check whether there are idle robot resources and processing the task to be executed.
  • atomic operation refers to the operation that will not be interrupted by the thread scheduling mechanism; once this operation starts, it runs to the end without any switch (switch to another thread) .
  • Step 200 further includes: if there are no free robot resources, placing the task to be executed in the delay queue SortedSet of REDIS.
  • step 200 a Lua script is used to check whether there are free robot resources. If so, that is, the task obtains the resource successfully, then the task is processed normally, and the status of the task is PROCESSING. Otherwise, if not, that is, the task fails to obtain resources, then put the task into the SortedSet of REDIS.
  • this SortedSet of REDIS is called a delay queue.
  • the method for managing and controlling the robot resource task cycle further includes:
  • Step 300 Determine whether the task to be executed in the SortedSet has stayed for a preset waiting time; if so, use the Lua script to transfer the task to be executed to the real-time queue.
  • step 300 if the judgment result is that the task to be executed in the SortedSet does not stay for the preset waiting time, the task with execution continues to wait in the SortedSet delay queue.
  • the method for managing and controlling the robot resource task cycle further includes:
  • Step 400 Use the periodic task of QUARTZ to periodically refresh the queue where the task to be executed is located.
  • step 300 a QUARTZ periodic task needs to be set to periodically refresh the queue (state) of the task to be executed.
  • step 400 specifically: set a trigger condition (time), and at this point in time, trigger The corresponding thread performs the task.
  • the method for managing and controlling the robot resource task cycle further includes:
  • Step 500 After the processing of the task to be executed is completed, increase the number of idle robot resources.
  • step 500 includes: after the processing of the task to be executed is completed, using the INCRBYkeyincremet command of the counter RedisConter to increase the number.
  • the method for managing and controlling the robot resource task cycle further includes:
  • Step 600 After the tasks to be executed are allocated to the idle robot resources, use the DECRBYkeydecrement command of RedisConter to reduce the number of idle robot resources.
  • the preprocessing counter (Counter) is an atomic self-increment operation of Redis, and whenever a certain operation occurs, an INCR command is sent to Redis. Use RedisConter to manage resources and increase resources through INCRBYkeyincremet. Then the value of key will be initialized to 0 first, and then the INCRBY command will be executed. Therefore, INCRBY can also be used directly for resource preprocessing. Similarly, reduce resources through DECRBYkeydecrement.
  • the present invention uses specific codes as an example to provide a specific application example of the method for managing and controlling robot resource task cycles.
  • the specific application example specifically includes the following content, see FIG. 9.
  • the state of the task to be executed at this time is the initial state (INITIALIZATION).
  • the status of the task to be executed at this time is WAITING.
  • this thread of JAVA is called the real-time queue consumption thread.
  • the real-time queue consumer thread will send the task to the task execution pool for processing.
  • the task execution pool is managed by JAVA.
  • the Lua script Use the Lua script to check whether there are free robot resources. If so, that is, the task obtains the resource successfully, then the task is processed normally, and the status of the task is PROCESSING. Otherwise, if not, that is, the task fails to obtain resources, then put the task into the SortedSet of REDIS.
  • the SCORE of the tasks in the delay queue is the time put into the collection + the expected waiting time.
  • the task execution pool will allocate a thread specifically to handle a task to be executed to improve the processing efficiency of the task.
  • REDIS does not provide such a command, which makes the client block until the SCORE is less than the current time, the client can obtain a task for processing.
  • 2 REDIS also does not provide such a command to perform the following two operations in an atomic operation: pop the first task in the SortedSet and return it to the client; insert the popped element of the SortedSet into the List as the head element of the List.
  • REDIS 2.6.0 Starting from REDIS 2.6.0, through the built-in Lua interpreter, you can use the EVAL command to evaluate Lua scripts.
  • REDIS uses a single Lua interpreter to run all scripts, and REDIS also guarantees that scripts will be executed atomically: when a script is running, no other scripts or Redis commands will be executed.
  • the specific implementation is as follows: DelayedSetToLiveQueue.lua
  • step S5 is for all tasks to be executed to complete the complete life cycle. There are three situations that will cause the task to be executed incorrectly:
  • the INCRBYkeyincremet command of the counter RedisConter is used to increase the number of idle robot resources.
  • the value of key will be initialized to 0 first, and then the INCRBY command will be executed. Therefore, INCRBY can also be used directly for resource preprocessing.
  • the DECRBYkeydecrement command of RedisConter is used to reduce the number of idle robot resources.
  • the commands that occupy resources RedisCounter are atomic.
  • the system only allows resources to be occupied if the robot resources are sufficient. If the resources are insufficient, the client may still occupy resources, which may result in the collapse of the entire system.
  • the present invention provides a method for controlling the cycle of robot resource tasks. It checks whether there are idle robot resources through a Lua script, and puts the tasks to be executed in a real-time queue according to the check results.
  • the present invention also proposes the use of The operating counter RedisConter is used to increase or decrease the number of idle robot resources.
  • the present invention uses QUARTZ and REDIS to manage the task life cycle method, so that tasks can be accurately controlled, and ensure the integrity, clarity and integrity of the task life cycle process. Feasibility, and through the use of REDIS to control the task cycle of robot resources, eliminate the repeated occupation and repeated release of resources, so that the robot resources can be used safely.
  • the present invention provides a complete cancellation strategy that can cancel the task to be executed, and specifies the implementation method, time, and cancellation content of the cancellation operation in detail, both how to request cancellation of the task and when the task (When) Check whether cancellation has been requested, and what operations should be performed when responding to the cancellation request, so as to avoid sharing data when the task is cancelled.
  • an embodiment of the present application also provides a robot resource task cycle management and control device, which can be used to implement the method described in the foregoing embodiment, as described in the following embodiment. Since the problem-solving principle of the robot resource task cycle management and control device is similar to that of the robot resource task cycle management and control method, the implementation of the robot resource task cycle management and control device can refer to the implementation of the robot resource task cycle management and control method, and the repetition will not be repeated.
  • the term "unit” or "module” can be a combination of software and/or hardware that implements predetermined functions.
  • the embodiment of the present invention provides a specific implementation of a robot resource task period management and control device capable of implementing a method for managing and controlling a robot resource task period.
  • the robot resource task period management and control device specifically includes the following content:
  • the task to be executed acquisition unit 10 is used to acquire the task to be executed and place the task to be executed in the real-time queue of the storage system REDIS;
  • the robot resource checking unit 20 is used to process the task to be executed as a result of checking whether there are idle robot resources.
  • the robot resource task cycle management and control device further includes:
  • the task to be executed setting unit is used to place the task to be executed in the timing queue of the open source job scheduling framework QUARTZ;
  • the task to be executed transfer unit is used to transfer the task to be executed corresponding to the preset time point to the real-time queue.
  • the robot resource checking unit includes: a robot resource checking module, which is used to process the task to be executed by using the result of a Lua script to check whether there is an idle robot resource.
  • the robot resource checking module is specifically configured to place the task to be executed in the delay queue SortedSet of the REDIS.
  • the robot resource task cycle management and control device further includes:
  • the SortedSet judging unit is used to judge whether the tasks to be executed in the SortedSet have stayed for a preset waiting time
  • the Lua script transfer unit is used to transfer the task to be executed to the real-time queue by using the Lua script.
  • the robot resource task cycle management and control device further includes:
  • the to-be-executed task refresh unit is used to periodically refresh the queue where the to-be-executed task is located by using the periodic tasks of QUARTZ.
  • the robot resource task cycle management and control device further includes:
  • the robot resource increase unit is used to increase the number of idle robot resources.
  • the robot resource increasing unit is specifically configured to increase the number by using the INCRBYkeyincremet command of the counter RedisConter.
  • the robot resource task cycle management and control device further includes:
  • the robot resource reduction unit uses the DECRBYkeydecrement command of RedisConter to reduce the number of idle robot resources.
  • the present invention provides a robot resource task cycle management and control device that checks whether there are idle robot resources through a Lua script, and puts the tasks to be executed into a real-time queue according to the check results.
  • the present invention also proposes the use of The operating counter RedisConter is used to increase or decrease the number of idle robot resources.
  • the present invention uses QUARTZ and REDIS to manage the task life cycle method, so that tasks can be accurately controlled, and ensure the integrity, clarity and integrity of the task life cycle process. Feasibility, and through the use of REDIS to control the task cycle of robot resources, eliminate the repeated occupation and repeated release of resources, so that the robot resources can be used safely.
  • the present invention provides a complete cancellation strategy that can cancel the task to be executed, and specifies the implementation method, time, and cancellation content of the cancellation operation in detail, both how to request cancellation of the task and when the task (When) Check whether cancellation has been requested, and what operations should be performed when responding to the cancellation request, so as to avoid the problem that the shared data results will be in an inconsistent state when the task is canceled.
  • the embodiment of the present application also provides an electronic device.
  • the electronic device may be a desktop computer, a tablet computer, a mobile terminal, etc.
  • the embodiment is not limited thereto.
  • the electronic device can refer to the implementation of the method in the above-mentioned embodiment and the device described in the above-mentioned embodiment, the content of which is incorporated herein, and the repetition is not repeated here.
  • FIG. 11 is a schematic block diagram of the system configuration of an electronic device 600 according to an embodiment of the present invention.
  • the electronic device 600 may include a central processing unit 100 and a memory 140; the memory 140 is coupled to the central processing unit 100. It is worth noting that this figure is exemplary; other types of structures can also be used to supplement or replace this structure to achieve telecommunication functions or other functions.
  • the function of capturing structured webpage data may be integrated into the central processing unit 100.
  • the central processing unit 100 may be configured to perform the following control:
  • the result of the Lua script checking whether there are idle robot resources is used to process the to-be-executed task.
  • the task to be executed corresponding to the preset time point is transferred to the real-time queue.
  • the processing of the task to be executed as a result of using the Lua script to check whether there are idle robot resources includes:
  • the task to be executed is placed in the delay queue SortedSet of the REDIS.
  • the INCRBYkeyincremet command of the counter RedisConter is used to increase the number of idle robot resources.
  • the robot resource task cycle management and control device can be configured separately from the central processing unit 100.
  • the robot resource task cycle management and control device can be configured as a chip connected to the central processing unit 100, which is controlled by the central processing unit. The control function of robot resource task cycle.
  • 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 include all the components shown in FIG. 11; in addition, the electronic device 600 may also include components not shown in FIG. 11, and reference may be made to the prior art.
  • the central processing unit 100 is sometimes called a controller or operating control, and may include a microprocessor or other processor devices and/or logic devices.
  • the central processing unit 100 receives inputs and controls various components of the electronic equipment 600. Operation of components.
  • 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 can be stored, and the program for executing the related information can also be stored.
  • the central processing unit 100 can execute the program stored in the memory 140 to implement information storage or processing.
  • the input unit 120 provides input to the central processing unit 100.
  • the input unit 120 is, for example, a button or a touch input device.
  • the power supply 170 is used to provide power to the electronic device 600.
  • the display 160 is used for displaying display objects such as images and characters.
  • the display may be, for example, an LCD display, but it is not limited thereto.
  • the memory 140 may be a solid-state memory, for example, read only memory (ROM), random access memory (RAM), 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, and an example of this memory is sometimes called EPROM or the like.
  • 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 to execute the operation flow of the electronic device 600 through the central processing unit 100.
  • the memory 140 may further include a data storage unit 143 for storing data, such as contacts, digital data, pictures, sounds, and/or any other data used by electronic devices.
  • the driver storage unit 144 of the memory 140 may include various drivers for the communication function of the electronic device and/or for executing other functions of the electronic device (such as a messaging application, an address book application, etc.).
  • the communication module 110 is a transmitter/receiver 110 that transmits and receives signals via the antenna 111.
  • the communication module (transmitter/receiver) 110 is coupled to the central processing unit 100 to provide input signals and receive output signals, which can be the same as that of a conventional mobile communication terminal.
  • 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 local area network module.
  • the communication module (transmitter/receiver) 110 is also coupled to the speaker 131 and the microphone 132 via the audio processor 130 to provide audio output via the speaker 131 and receive audio input from the microphone 132, thereby realizing general telecommunication functions.
  • the audio processor 130 may include any suitable buffers, decoders, amplifiers, etc.
  • the audio processor 130 is also coupled to the central processing unit 100, so that the microphone 132 can be used to record on the unit, and the speaker 131 can be used to play the sound stored on the unit.
  • the embodiment of the present application also provides a computer-readable storage medium capable of realizing all the steps in the method for managing and controlling a robot resource task cycle in the above-mentioned embodiment.
  • a computer program is stored on the computer-readable storage medium, and the computer program is executed by a processor.
  • the result of the Lua script checking whether there are idle robot resources is used to process the to-be-executed task.
  • the task to be executed corresponding to the preset time point is transferred to the real-time queue.
  • the processing of the task to be executed as a result of using the Lua script to check whether there are idle robot resources includes:
  • the task to be executed is placed in the delay queue SortedSet of the REDIS.
  • the INCRBYkeyincremet command of the counter RedisConter is used to increase the number of idle robot resources.
  • each module can be implemented in the same one or more software and/or hardware, or a module that implements the same function can be implemented by a combination of multiple sub-modules or sub-units.
  • the device embodiments described above are merely illustrative, for example, the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components can be combined or integrated To another system, or some features can be ignored, or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • controllers in addition to implementing the controller in a purely computer-readable program code manner, it is entirely possible to program the method steps to make the controller use logic gates, switches, application specific integrated circuits, programmable logic controllers and embedded The same function can be realized in the form of a microcontroller, etc. Therefore, such a controller can be regarded as a hardware component, and the devices included in the controller for realizing various functions can also be regarded as a structure within the hardware component. Or even, the device for realizing various functions can be regarded as both a software module for realizing the method and a structure within a hardware component.
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
  • the instructions provide steps for implementing functions specified in a flow or multiple flows in the flowchart and/or a block or multiple blocks in the block diagram.
  • the computing device includes one or more processors (CPU), input/output interfaces, network interfaces, and memory.
  • processors CPU
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • the memory may include non-permanent memory in computer readable media, random access memory (RAM) and/or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). Memory is an example of computer readable media.
  • RAM random access memory
  • ROM read-only memory
  • flash RAM flash memory
  • Computer-readable media include permanent and non-permanent, removable and non-removable media, and information storage can be realized by any method or technology.
  • the information can be computer-readable instructions, data structures, program modules, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical storage, Magnetic cassettes, magnetic tape storage or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices. According to the definition in this article, computer-readable media does not include transitory media, such as modulated data signals and carrier waves.
  • the embodiments of this specification can be provided as methods, systems or computer program products. Therefore, the embodiments of this specification may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of this specification may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
  • a computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types.
  • the embodiments of this specification can also be practiced in distributed computing environments. In these distributed computing environments, tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Manipulator (AREA)
  • Stored Programmes (AREA)
  • Numerical Control (AREA)

Abstract

本发明提供了一种机器人资源任务周期管控方法及装置,该方法包括:获取待执行任务,并将所述待执行任务置于存储系统REDIS的实时队列中;当所述待执行任务位于任务线程池时,利用Lua脚本检查是否有空闲的机器人资源的结果对所述待执行任务进行处理。本发明提供了一种使用QUARTZ及REDIS管理任务生命周期的方法,使得任务可以准确的被控制,并且确保任务生命周期流程的完整性、清晰性及可行性。

Description

机器人资源任务周期管控方法及装置 技术领域
本发明涉及人工智能领域,尤其是机器人流程自动化技术,具体涉及一种机器人资源任务周期管控方法及装置。
背景技术
RPA(Robotic Process Automation,机器人流程自动化)即自动化软件工具,它可以通过用户界面使用和理解企业已有的应用,将基于规则的常规操作自动化,替代人在计算机前执行具有规律与重复性高的办公流程。任务的生命周期均需要经历以下几个过程:初始化(INITIALIZATION)、等待运行(WAITING)、运行中(PROCESSING)、成功/失败(SUCCESS/FAILURE)、中止(INTERRUPT)。如果只有一个任务拥有者可以执行任务,那任务的生命周期就会变得简单,如图1所示。针对机器人资源(RPA)任务拥有者不唯一的情况下,(例如系统用户、线程池及定时脚本等),任务拥有者随时有可能发出任务中止的信号。此种情况下任务的生命周期就会变得异常复杂而不稳定。
发明内容
针对现有技术中的问题,本发明能够建立一种可控的机器人资源任务周期管控方法,该方法可以提供一套机器人资源任务生命周期的安全的、准确的管控方法,以确保机器人资源任务生命周期流程的完整性。
为解决上述技术问题,本发明提供以下技术方案:
第一方面,本发明提供一种机器人资源任务周期管控方法,包括:
获取待执行任务,并将所述待执行任务置于存储系统REDIS的实时队列中;
当所述待执行任务位于任务线程池时,检查是否有空闲的机器人资源的结果对所述待执行任务进行处理。
一实施例中,在将待执行任务置于存储系统REDIS的实时队列中之前,还包括:
将待执行任务置于开源作业调度框架QUARTZ的定时队列中;
将预设时间点对应的待执行任务转移到实时队列中。
一实施例中,所述检查是否有空闲的机器人资源的结果对所述待执行任务进行处理,包括:利用Lua脚本检查是否有空闲的机器人资源的结果对所述待执行任务进行处理。
一实施例中,所述利用Lua脚本检查是否有空闲的机器人资源的结果对所述待执行任务进行处理,包括:
如果没有空闲的机器人资源,将所述待执行任务置于所述REDIS的延时队列SortedSet中。
一实施例中,机器人资源任务周期管控方法还包括:
判断SortedSet中的待执行任务是否停留了预设等待时长;
如果是,利用Lua脚本将待执行任务转移到实时队列中。
一实施例中,机器人资源任务周期管控方法还包括:利用QUARTZ的周期任务周期性的刷新待执行任务所处的队列。
一实施例中,机器人资源任务周期管控方法还包括:
当待执行任务处理完成后,增加空闲的机器人资源的数目。
一实施例中,所述增加空闲的机器人资源的数目,包括:利用计数器RedisConter的INCRBYkeyincremet命令增加所述数目。
一实施例中,机器人资源任务周期管控方法还包括:
当待执行任务分配至空闲的机器人资源后,利用RedisConter的DECRBYkeydecrement命令减少空闲的机器人资源的数目。
第二方面,本发明提供一种机器人资源任务周期管控装置,该装置包括:
待执行任务获取单元,用于获取待执行任务,并将待执行任务置于存储系统REDIS的实时队列中;
机器人资源检查单元,用于检查是否有空闲的机器人资源的结果对待执行任务进行处理。
一实施例中,机器人资源任务周期管控装置还包括:
待执行任务设置单元,用于将待执行任务置于开源作业调度框架QUARTZ的定时队列中;
待执行任务转移单元,用于将预设时间点对应的待执行任务转移到实时队列中。
一实施例中,所述机器人资源检查单元包括:机器人资源检查模块,用于利用Lua脚本检查是否有空闲的机器人资源的结果对所述待执行任务进行处理。
一实施例中,所述机器人资源检查模块具体用于将所述待执行任务置于所述REDIS的延时队列SortedSet中。
一实施例中,机器人资源任务周期管控装置还包括:
SortedSet判断单元,用于判断SortedSet中的待执行任务是否停留了预设等待时长;
Lua脚本转移单元,用于利用Lua脚本将待执行任务转移到实时队列中。
一实施例中,机器人资源任务周期管控装置还包括:
待执行任务刷新单元,用于利用QUARTZ的周期任务周期性的刷新待执行任务所处的队列。
一实施例中,机器人资源任务周期管控装置还包括:
机器人资源增加单元,用于增加空闲的机器人资源的数目。
一实施例中,所述机器人资源增加单元具体用于利用计数器RedisConter的INCRBYkeyincremet命令增加所述数目。
一实施例中,机器人资源任务周期管控装置还包括:
机器人资源减少单元,利用RedisConter的DECRBYkeydecrement命令减少空闲的机器人资源的数目。
第三方面,本发明提供一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器执行程序时实现机器人资源任务周期管控方法的步骤。
第四方面,本发明提供一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现机器人资源任务周期管控方法的步骤。
从上述描述可知,本发明提供机器人资源任务周期管控方法及装置,通过Lua脚本检查是否有空闲的机器人资源,并根据检查结果将待执行任务放入实时队列中,另外,本发明还提出了利用具有原子操作的计数器RedisConter来增减或者减少空闲的机器人资源的数目,本发明使用QUARTZ及REDIS管理任务生命周期的方法,使得任务可以准确的被控制,并且确保任务生命周期流程的完整性、清晰性及可行性,并且通过使用REDIS管控机器人资源的任务周期,杜绝资源的重复占用、重复释放等问题,使得机器人资源可以安全的被使用。综上,本发明提供了一种可以取消待执行任务所必须拥有的完备的取消策略,详细定义了取消操作的实现方式、时间以及取消内容,既如何(How)请求取消该任务,任务何时(When)检查是否已经请求了取消,以及在响应取消请求时应该执行哪些(What)操作,从而避免了取消任务时会使共享的数据结果处于不一致的状态的问题。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本发明的背景技术中任务的生命周期示意图;
图2为本发明的实施例中的机器人资源任务周期管控方法的流程示意图一;
图3为本发明的实施例整体思路流程示意图;
图4为本发明的实施例中的机器人资源任务周期管控方法的流程示意图二;
图5为本发明的实施例中的机器人资源任务周期管控方法的流程示意图三;
图6为本发明的实施例中的机器人资源任务周期管控方法的流程示意图四;
图7为本发明的实施例中的机器人资源任务周期管控方法的流程示意图五;
图8为本发明的实施例中的机器人资源任务周期管控方法的流程示意图六;
图9为本发明的具体应用实例中机器人资源任务周期管控方法的流程示意图;
图10为本发明的实施例中的机器人资源任务周期管控装置的结构示意图;
图11为本发明的实施例中的电子设备的结构示意图。
具体实施方式
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整的描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
Java的线程包含了一套完备的中断策略。这套中断策略提供了一种协作机制,能够使一个线程终止另一个线程的当前工作。对中断操作的正确理解是:它并不会真正地中断一个正在运行的线程,而只是发出中断请求,然后由线程在下一个合适的时刻中断自己,这些时刻也被称为取消点。基于此,本发明的实施例提供一种机器人资源任务周期管控方法的具体实施方式,参见图2及图3,该方法具体包括如下内容:
步骤100:获取待执行任务,并将待执行任务置于存储系统REDIS的实时队列中。
可以理解的是,步骤100中的带执行任务是机器人待执行任务,该任务由客户发起,由机器人执行。
步骤100中的REDIS是一个key-value存储系统,它支持存储的value类型很多,包括string(字符串)、list(链表)、set(集合)、zset(sorted set--有序集合)和hash(哈希类型)。这些数据类型都支持push/pop、add/remove及取交集并集和差集及更丰富的操作,而且这些操作都是原子性的。在此基础上,REDIS支持各种不同方式的排序。与memcached一样,为了保证效率,数据都是缓存在内存中。REDIS会周期性的把更新的数据写入磁盘或者把修改操作写入追加的记录文件,并且在此基础上实现了master-slave(主从)同步。另外,REDIS是一个高性能的key-value数据库,它提供了Java,C/C++,C#,PHP,JavaScript,Perl,Object-C,Python,Ruby,Erlang等客户端。
步骤200:当待执行任务位于任务线程池时,检查是否有空闲的机器人资源的结果对待执行任务进行处理。
可以理解的是,当有优先级较高的任务出现时,会中断某个之前的任务,此时需要在数据库中新建一张任务调度表(任何时候只要收到任务中止的请求,就往任务调度表里面插入一条数据)。需要说明的是,此时并不会真正中断一个正在运行的任务,而只是发出中断请求,然后由任务在下一个合适的时刻中断自己,这些时刻也被称为取消点。表1展示了任务生命周期过程中的取消点,以及每个取消点对应的动作。
表1任务取消点表
取消点(When) 动作(What)
Quartz定时任务 直接结束任务
实时队列消费线程 直接结束任务
任务执行池 直接结束任务
Quartz周期任务 释放资源,结束任务
从上述描述可知,本发明提供机器人资源任务周期管控方法,通过Lua脚本检查是否有空闲的机器人资源,并根据检查结果将待执行任务放入实时队列中,另外,本发明还提出了利用具有原子操作的计数器RedisConter来增减或者减少空闲的机器人资源的数目,本发明使用QUARTZ及REDIS管理任务生命周期的方法,使得任务可以准确的被控制,并且确保任务生命周期流程的完整性、清晰性及可行性,并且通过使用REDIS管控机器人资源的任务周期,杜绝资源的重复占用、重复释放等问题,使得机器人资源可以安全的被使用。综上,本发明提供了一种可以取消待执行任务所必须拥有的完备的取消策略,详细定了取消操作的实现方式、时间以及取消内容,既如何(How)请求取消该任务,任务何时(When)检查是否已经请求了取消,以及在响应取消请求时应该执行 哪些(What)操作,从而避免了取消任务时会使共享的数据结果处于不一致的状态的问题。
一实施例中,参见图4,在步骤100之前,机器人资源任务周期管控方法还包括:
步骤80:将预设时间点对应的待执行任务转移到实时队列中。
步骤80在实施时,具体为:由QUARTZ在指定的时间(由用户指定该时间)自动启动该任务,并把该任务放入REDIS的LIST(实时队列)中,此时任务的状态为等待执行(WAITING)。
步骤90:将待执行任务置于开源作业调度框架QUARTZ的定时队列中。
步骤90中QUARTZ是由java编写的开源作业调度框架。QUARTZ的核心是调度器。调度器负责管理QUARTZ应用运行时环境。为确保可伸缩性,QUARTZ采用了基于多线程的架构。启动时,框架初始化一套worker线程,这套线程被调度器用来执行预定的作业。
步骤90在具体实施时,通过以下方式来实现:计算出任务的真正执行时间,把该任务放入QUARTZ中,该任务为QUARTZ的一个定时任务,此时任务的状态为初始(INITIALIZATION)。可以理解的是,步骤80与步骤90的执行顺序没有先后之分。
一实施例中,步骤200中检查是否有空闲的机器人资源的结果对待执行任务进行处理,包括:利用Lua脚本检查是否有空闲的机器人资源的结果对所述待执行任务进行处理。
具体地,通过REDIS内置的Lua解释器,可以使用EVAL命令对Lua脚本进行求值。Redis使用单个Lua解释器去运行所有脚本,并且Redis保证脚本会以原子性(atomic)的方式执行:当某个脚本正在运行的时候,不会有其他脚本或Redis命令被执行。上述原子性是指原子操作(atomic operation),是指不会被线程调度机制打断的操作;这种操作一旦开始,就一直运行到结束,中间不会有任何切换(切换到另一个线程)。
步骤200进一步包括:如果没有空闲的机器人资源,将待执行任务置于REDIS的延时队列SortedSet中。
在步骤200中,利用Lua脚本检查是否有空闲的机器人资源,如果有,即任务获取资源成功,那么正常处理任务,此时任务的状态为处理中(PROCESSING)。反之如果没有,即任务获取资源失败,那么把任务放入到REDIS的SortedSet中。这里把REDIS的这个SortedSet称为延时队列。
一实施例中,参见图5,机器人资源任务周期管控方法还包括:
步骤300:判断SortedSet中的待执行任务是否停留了预设等待时长;如果是,利用Lua脚本将待执行任务转移到实时队列中。
可以理解的是,在步骤300中,如果判断结果为SortedSet中的待执行任务没有停留预设等待时长,则该带执行任务在SortedSet延时队列中继续等待。
一实施例中,参见图6,机器人资源任务周期管控方法还包括:
步骤400:利用QUARTZ的周期任务周期性的刷新待执行任务所处的队列。
如果实现步骤300则需要设置一QUARTZ的周期任务周期性的刷新待执行任务所处的队列(状态),步骤400在实施时,具体为:设置一触发条件(时间),到了该时间点,触发相应的线程执行任务。
一实施例中,参见图7,机器人资源任务周期管控方法还包括:
步骤500:当待执行任务处理完成后,增加空闲的机器人资源的数目。
进一步地,步骤500包括:当待执行任务处理完成后,利用计数器RedisConter的INCRBYkeyincremet命令增加所述数目。
一实施例中,参见图8,机器人资源任务周期管控方法还包括:
步骤600:当待执行任务分配至空闲的机器人资源后,利用RedisConter的DECRBYkeydecrement命令减少空闲的机器人资源的数目。
在步骤500及步骤600中,预处理计数器(Counter)是Redis的原子性自增操作,每当某个操作发生时,向Redis发送一个INCR命令。使用RedisConter来进行资源的管理,通过INCRBYkeyincremet来增加资源。那么key的值会先被初始化为0,然后再执行INCRBY命令。所以也可以直接使用INCRBY来进行资源的预处理。同样的,通过DECRBYkeydecrement来减少资源。
为进一步地说明本方案,本发明以具体代码为例,提供机器人资源任务周期管控方法的具体应用实例,该具体应用实例具体包括如下内容,参见图9。
S0:将待执行任务置于QUARTZ的定时队列中。
可以理解的是,此时待执行任务的状态为初始状态(INITIALIZATION)。
S1:在预设时间点时,将对应的待执行任务转移到实时队列中。
可以理解的是,此时待执行任务的状态为等待执行(WAITING)。启动JAVA的一个线程来消费实时队列的任务。这里把JAVA的这个线程称为实时队列消费线程。实时队列消费线程会把任务发送到任务执行池进行处理。任务执行池由JAVA进行管理。
S2:利用Lua脚本检查是否有空闲的机器人资源的结果对待执行任务进行处理。
具体地:利用Lua脚本检查是否有空闲的机器人资源,如果有,即任务获取资源成功,那么正常处理任务,此时任务的状态为处理中(PROCESSING)。反之如果没有,即任务获取资源失败,那么把任务放入到REDIS的SortedSet中。该延时队列的任务的SCORE是放入集合的时间+预期等待时间。另外,任务执行池会分配一个线程专门来处理一个待执行任务,以提高任务的处理效率。
S3:利用Lua脚本将待执行任务转移到实时队列中。
具体地:判断SortedSet中的待执行任务是否停留了预设等待时长;如果是,利用Lua脚本将待执行任务转移到实时队列中。
把任务从延时队列线程(SortedSet)中转移到实时队列(List)中有两个问题需要处理:
①对于SortedSet,REDIS中没有提供这样一个命令,该命令使得客户端阻塞,直到SCORE小于当前时间,客户端可以获取到一个任务进行处理。
②REDIS同样没有提供这样一个命令,使得在一个原子操作执行以下两个作:将SortedSet中的第一个任务弹出,并返回给客户端;将SortedSet弹出的元素插入到List,作为List的头元素。
从REDIS 2.6.0版本开始,通过内置的Lua解释器,可以使用EVAL命令对Lua脚本进行求值。REDIS使用单个Lua解释器去运行所有脚本,并且REDIS同时保证脚本会以原子性(atomic)的方式执行:当某个脚本正在运行的时候,不会有其他脚本或Redis命令被执行。具体实施方式如下所示:DelayedSetToLiveQueue.lua
localdelayed_task=redis.call('zrange','DELAYED_TASK',0,0,'WITHSCORES')
localunix_time=tonumber(KEYS[1])
localtask_id=delayed_task[1]
localdelayed_time=tonumber(delayed_task[2])
if(task_id==nil)or(delayed_time==nil)then
returnnil
else
if(unix_time>delayed_time)then
localrem_count=redis.call('zrem','DELAYED_TASK',task_id)
returntask_id
else
returnnil
end
end
S4:利用QUARTZ的周期任务周期性的刷新待执行任务所处的队列。
可以理解的是,步骤S5为了所有待执行任务能够走完完整的生命周期。有以下三种情况会导致任务没有正确的被运行:
①所有的worker(机器人资源)线程都处于忙碌状态(可能在执行更高优先级的任务)。
②Quartz的调度器挂掉了(可能是系统宕机了)。
③这个任务的开始执行时间是过去的某一个时间点。(可能是创建时候配置出错)。
在上面3种情况时,设置MisfireInstructions,使得系统恢复后,任务仍然可以有机会被运行。结合Quartz提供的Unschedule的功能,只要满足一下3种情况中的一种,该任务就应该被结束:
a任务已经执行成功或者失败。
b任务已经到达自动回收时间。
c任务已经被外界中止。
S5:利用计数器RedisConter的INCRBYkeyincremet命令增加空闲的机器人资源的数目。
具体地:当待执行任务处理完成后,利用计数器RedisConter的INCRBYkeyincremet命令增加空闲的机器人资源的数目。key的值会先被初始化为0,然后再执行INCRBY命令。所以也可以直接使用INCRBY来进行资源的预处理。
S6:利用RedisConter的DECRBYkeydecrement命令减少空闲的机器人资源的数目。
具体地:当待执行任务分配至空闲的机器人资源后,利用RedisConter的DECRBYkeydecrement命令减少空闲的机器人资源的数目。
在S6至S7中,占用资源RedisCounter自带的命令都是原子性的,对于占用资源,为了安全的使用资源,系统只有在机器人资源充足的情况下,才允许占用资源。如果在资源不足的情况下,客户端仍然有可能占用到资源,可能会带来整个系统崩塌的后果。
对于像“先检查后执行”(check-then-actoperations)这种复合操作,使用Lua脚本来构造该复合操作:当资源不足的时候,直接返回-1;当资源充足的时候,减少一个资源的数量,并返回当前资源的数量(大于0)。具体实施方式如下所示:
DelayedSetToLiveQueue.lua
1.localstorage_value=redis.call('get',KEYS[1])
2.if(storage_value==false)or(storage_value=="0")then
3.return-1
4.else
5.localremain_storage_value=redis.call('decr',KEYS[1])
6.returnremain_storage_value
7.end
释放资源的过程直接通过INCRBYkey1来实现。
从上述描述可知,本发明提供机器人资源任务周期管控方法,通过Lua脚本检查是否有空闲的机器人资源,并根据检查结果将待执行任务放入实时队列中,另外,本发明还提出了利用具有原子操作的计数器RedisConter来增减或者减少空闲的机器人资源的数目,本发明使用QUARTZ及REDIS管理任务生命周期的方法,使得任务可以准确的被控制,并且确保任务生命周期流程的完整性、清晰性及可行性,并且通过使用REDIS管控机器人资源的任务周期,杜绝资源的重复占用、重复释放等问题,使得机器人资源可以安全的被使用。综上,本发明提供了一种可以取消待执行任务所必须拥有的完备的取消策略,详细定了取消操作的实现方式、时间以及取消内容,既如何(How)请求取消该任务,任务何时(When)检查是否已经请求了取消,以及在响应取消请求时应该执行哪些(What)操作,从而避免了取消任务时会使共享的数据。
基于同一发明构思,本申请实施例还提供了机器人资源任务周期管控装置,可以用于实现上述实施例所描述的方法,如下面的实施例所述。由于机器人资源任务周期管控装置解决问题的原理与机器人资源任务周期管控方法相似,因此机器人资源任务周期管控装置的实施可以参见机器人资源任务周期管控方法实施,重复之处不再赘述。以下所使用的,术语“单元”或者“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的系统较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。
本发明的实施例提供一种能够实现机器人资源任务周期管控方法的机器人资源任务周期管控装置的具体实施方式,参见图10,机器人资源任务周期管控装置具体包括如下内容:
待执行任务获取单元10,用于获取待执行任务,并将待执行任务置于存储系统REDIS的实时队列中;
机器人资源检查单元20,用于检查是否有空闲的机器人资源的结果对待执行任务进行处理。
一实施例中,机器人资源任务周期管控装置还包括:
待执行任务设置单元,用于将待执行任务置于开源作业调度框架QUARTZ的定时队列中;
待执行任务转移单元,用于将预设时间点对应的待执行任务转移到实时队列中。
一实施例中,所述机器人资源检查单元包括:机器人资源检查模块,用于利用Lua脚本检查是否有空闲的机器人资源的结果对所述待执行任务进行处理。
一实施例中,所述机器人资源检查模块具体用于将所述待执行任务置于所述REDIS的延时队列SortedSet中。
一实施例中,机器人资源任务周期管控装置还包括:
SortedSet判断单元,用于判断SortedSet中的待执行任务是否停留了预设等待时长;
Lua脚本转移单元,用于利用Lua脚本将待执行任务转移到实时队列中。
一实施例中,机器人资源任务周期管控装置还包括:
待执行任务刷新单元,用于利用QUARTZ的周期任务周期性的刷新待执行任务所处的队列。
一实施例中,机器人资源任务周期管控装置还包括:
机器人资源增加单元,用于增加空闲的机器人资源的数目。
一实施例中,所述机器人资源增加单元具体用于利用计数器RedisConter的INCRBYkeyincremet命令增加所述数目。
一实施例中,机器人资源任务周期管控装置还包括:
机器人资源减少单元,利用RedisConter的DECRBYkeydecrement命令减少空闲的机器人资源的数目。
从上述描述可知,本发明提供机器人资源任务周期管控装置,通过Lua脚本检查是否有空闲的机器人资源,并根据检查结果将待执行任务放入实时队列中,另外,本发明还提出了利用具有原子操作的计数器RedisConter来增减或者减少空闲的机器人资源的数目,本发明使用QUARTZ及REDIS管理任务生命周期的方法,使得任务可以准确的被控制,并且确保任务生命周期流程的完整性、清晰性及可行性,并且通过使用REDIS管控机器人资源的任务周期,杜绝资源的重复占用、重复释放等问题,使得机器人资源可以安全的被使用。综上,本发明提供了一种可以取消待执行任务所必须拥有的完备的取 消策略,详细定了取消操作的实现方式、时间以及取消内容,既如何(How)请求取消该任务,任务何时(When)检查是否已经请求了取消,以及在响应取消请求时应该执行哪些(What)操作,从而避免了取消任务时会使共享的数据结果处于不一致的状态的问题。
本申请的实施例还提供一种电子设备,该电子设备可以是台式计算机、平板电脑及移动终端等,本实施例不限于此。在本实施例中,该电子设备可以参照上述实施例的方法的实施及上述实施例所述的装置,其内容被合并于此,重复之处不再赘述。
图11为本发明实施例的电子设备600的系统构成的示意框图。如图11所示,该电子设备600可以包括中央处理器100和存储器140;存储器140耦合到中央处理器100。值得注意的是,该图是示例性的;还可以使用其他类型的结构,来补充或代替该结构,以实现电信功能或其他功能。
一实施例中,网页结构化数据的抓取功能可以被集成到中央处理器100中。其中,中央处理器100可以被配置为进行如下控制:
获取待执行任务,并将所述待执行任务置于存储系统REDIS的实时队列中;
当所述待执行任务位于任务线程池时,利用Lua脚本检查是否有空闲的机器人资源的结果对所述待执行任务进行处理。
在将所述待执行任务置于存储系统REDIS的实时队列中之前,还包括:
将所述待执行任务置于开源作业调度框架QUARTZ的定时队列中;
将预设时间点对应的待执行任务转移到所述实时队列中。
所述利用Lua脚本检查是否有空闲的机器人资源的结果对所述待执行任务进行处理,包括:
如果没有空闲的机器人资源,将所述待执行任务置于所述REDIS的延时队列SortedSet中。
判断SortedSet中的待执行任务是否停留了预设等待时长;
如果是,利用所述Lua脚本将所述待执行任务转移到所述实时队列中。
当所述待执行任务处理完成后,利用计数器RedisConter的INCRBYkeyincremet命令增加空闲的机器人资源的数目。
在另一个实施方式中,机器人资源任务周期管控装置可以与中央处理器100分开配置,例如可以将机器人资源任务周期管控装置配置为与中央处理器100连接的芯片,通过中央处理器的控制来实现机器人资源任务周期的管控功能。
如图11所示,该电子设备600还可以包括:通信模块110、输入单元120、音频处理单元130、显示器160、电源170。值得注意的是,电子设备600也并不是必须要包括图11中所示的所有部件;此外,电子设备600还可以包括图11中没有示出的部件,可以参考现有技术。
如图11所示,中央处理器100有时也称为控制器或操作控件,可以包括微处理器或其他处理器装置和/或逻辑装置,该中央处理器100接收输入并控制电子设备600的各个部件的操作。
其中,存储器140,例如可以是缓存器、闪存、硬驱、可移动介质、易失性存储器、非易失性存储器或其它合适装置中的一种或更多种。可储存上述与失败有关的信息,此外还可存储执行有关信息的程序。并且中央处理器100可执行该存储器140存储的该程序,以实现信息存储或处理等。
输入单元120向中央处理器100提供输入。该输入单元120例如为按键或触摸输入装置。电源170用于向电子设备600提供电力。显示器160用于进行图像和文字等显示对象的显示。该显示器例如可为LCD显示器,但并不限于此。
该存储器140可以是固态存储器,例如,只读存储器(ROM)、随机存取存储器(RAM)、SIM卡等。还可以是这样的存储器,其即使在断电时也保存信息,可被选择性地擦除且设有更多数据,该存储器的示例有时被称为EPROM等。存储器140还可以是某种其它类型的装置。存储器140包括缓冲存储器141(有时被称为缓冲器)。存储器140可以包括应用/功能存储部142,该应用/功能存储部142用于存储应用程序和功能程序或用于通过中央处理器100执行电子设备600的操作的流程。
存储器140还可以包括数据存储部143,该数据存储部143用于存储数据,例如联系人、数字数据、图片、声音和/或任何其他由电子设备使用的数据。存储器140的驱动程序存储部144可以包括电子设备的用于通信功能和/或用于执行电子设备的其他功能(如消息传送应用、通讯录应用等)的各种驱动程序。
通信模块110即为经由天线111发送和接收信号的发送机/接收机110。通信模块(发送机/接收机)110耦合到中央处理器100,以提供输入信号和接收输出信号,这可以和常规移动通信终端的情况相同。
基于不同的通信技术,在同一电子设备中,可以设置有多个通信模块110,如蜂窝网络模块、蓝牙模块和/或无线局域网模块等。通信模块(发送机/接收机)110还经由音频处理器130耦合到扬声器131和麦克风132,以经由扬声器131提供音频输出,并接 收来自麦克风132的音频输入,从而实现通常的电信功能。音频处理器130可以包括任何合适的缓冲器、解码器、放大器等。另外,音频处理器130还耦合到中央处理器100,从而使得可以通过麦克风132能够在本机上录音,且使得可以通过扬声器131来播放本机上存储的声音。
本申请的实施例还提供能够实现上述实施例中的机器人资源任务周期管控方法中全部步骤的一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,该计算机程序被处理器执行时实现上述实施例中的机器人资源任务周期管控方法的全部步骤,例如,处理器执行计算机程序时实现下述步骤:
获取待执行任务,并将所述待执行任务置于存储系统REDIS的实时队列中;
当所述待执行任务位于任务线程池时,利用Lua脚本检查是否有空闲的机器人资源的结果对所述待执行任务进行处理。
在将所述待执行任务置于存储系统REDIS的实时队列中之前,还包括:
将所述待执行任务置于开源作业调度框架QUARTZ的定时队列中;
将预设时间点对应的待执行任务转移到所述实时队列中。
所述利用Lua脚本检查是否有空闲的机器人资源的结果对所述待执行任务进行处理,包括:
如果没有空闲的机器人资源,将所述待执行任务置于所述REDIS的延时队列SortedSet中。
判断SortedSet中的待执行任务是否停留了预设等待时长;
如果是,利用所述Lua脚本将所述待执行任务转移到所述实时队列中。
当所述待执行任务处理完成后,利用计数器RedisConter的INCRBYkeyincremet命令增加空闲的机器人资源的数目。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于硬件+程序类实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
上述对本说明书特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺 序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。
虽然本申请提供了如实施例或流程图所述的方法操作步骤,但基于常规或者无创造性的劳动可以包括更多或者更少的操作步骤。实施例中列举的步骤顺序仅仅为众多步骤执行顺序中的一种方式,不代表唯一的执行顺序。在实际中的装置或客户端产品执行时,可以按照实施例或者附图所示的方法顺序执行或者并行执行(例如并行处理器或者多线程处理的环境)。
虽然本说明书实施例提供了如实施例或流程图所述的方法操作步骤,但基于常规或者无创造性的手段可以包括更多或者更少的操作步骤。实施例中列举的步骤顺序仅仅为众多步骤执行顺序中的一种方式,不代表唯一的执行顺序。在实际中的装置或终端产品执行时,可以按照实施例或者附图所示的方法顺序执行或者并行执行(例如并行处理器或者多线程处理的环境,甚至为分布式数据处理环境)。术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、产品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、产品或者设备所固有的要素。在没有更多限制的情况下,并不排除在包括所述要素的过程、方法、产品或者设备中还存在另外的相同或等同要素。
为了描述的方便,描述以上装置时以功能分为各种模块分别描述。当然,在实施本说明书实施例时可以把各模块的功能在同一个或多个软件和/或硬件中实现,也可以将实现同一功能的模块由多个子模块或子单元的组合实现等。以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
本领域技术人员也知道,除了以纯计算机可读程序代码方式实现控制器以外,完全可以通过将方法步骤进行逻辑编程来使得控制器以逻辑门、开关、专用集成电路、可编程逻辑控制器和嵌入微控制器等的形式来实现相同功能。因此这种控制器可以被认为是一种硬件部件,而对其内部包括的用于实现各种功能的装置也可以视为硬件部件内的结构。或者甚至,可以将用于实现各种功能的装置视为既可以是实现方法的软件模块又可以是硬件部件内的结构。
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
本领域技术人员应明白,本说明书的实施例可提供为方法、系统或计算机程序产品。因此,本说明书实施例可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本说明书实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本说明书实施例可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本说明书实施例,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本说明书实施例的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不必须针对的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任一个或多个实施例或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。
以上所述仅为本说明书实施例的实施例而已,并不用于限制本说明书实施例。对于本领域技术人员来说,本说明书实施例可以有各种更改和变化。凡在本说明书实施例的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本说明书实施例的权利要求范围之内。

Claims (20)

  1. 一种机器人资源任务周期管控方法,其特征在于,包括:
    获取待执行任务,并将所述待执行任务置于存储系统REDIS的实时队列中;
    当所述待执行任务位于任务线程池时,检查是否有空闲的机器人资源的结果对所述待执行任务进行处理。
  2. 如权利要求1所述的机器人资源任务周期管控方法,其特征在于,在将所述待执行任务置于存储系统REDIS的实时队列中之前,还包括:
    将所述待执行任务置于开源作业调度框架QUARTZ的定时队列中;
    将预设时间点对应的待执行任务转移到所述实时队列中。
  3. 如权利要求1所述的机器人资源任务周期管控方法,其特征在于,所述检查是否有空闲的机器人资源的结果对所述待执行任务进行处理,包括:利用Lua脚本检查是否有空闲的机器人资源的结果对所述待执行任务进行处理。
  4. 如权利要求3所述的机器人资源任务周期管控方法,其特征在于,所述利用Lua脚本检查是否有空闲的机器人资源的结果对所述待执行任务进行处理,包括:
    如果没有空闲的机器人资源,将所述待执行任务置于所述REDIS的延时队列SortedSet中。
  5. 如权利要求4所述的机器人资源任务周期管控方法,其特征在于,还包括:
    判断SortedSet中的待执行任务是否停留了预设等待时长;
    如果是,利用所述Lua脚本将所述待执行任务转移到所述实时队列中。
  6. 如权利要求2所述的机器人资源任务周期管控方法,其特征在于,还包括:利用所述QUARTZ的周期任务周期性的刷新待执行任务所处的队列。
  7. 如权利要求1所述的机器人资源任务周期管控方法,其特征在于,还包括:
    当所述待执行任务处理完成后,增加空闲的机器人资源的数目。
  8. 如权利要求7所述的机器人资源任务周期管控方法,其特征在于,所述增加空闲的机器人资源的数目,包括:利用计数器RedisConter的INCRBYkeyincremet命令增加所述数目。
  9. 如权利要求8所述的机器人资源任务周期管控方法,其特征在于,还包括:
    当所述待执行任务分配至空闲的机器人资源后,利用所述RedisConter的DECRBYkeydecrement命令减少空闲的机器人资源的数目。
  10. 一种机器人资源任务周期管控装置,其特征在于,包括:
    待执行任务获取单元,用于获取待执行任务,并将所述待执行任务置于存储系统REDIS的实时队列中;
    机器人资源检查单元,用于检查是否有空闲的机器人资源的结果对所述待执行任务进行处理。
  11. 如权利要求10所述的机器人资源任务周期管控装置,其特征在于,还包括:
    待执行任务设置单元,用于将所述待执行任务置于开源作业调度框架QUARTZ的定时队列中;
    待执行任务转移单元,用于将预设时间点对应的待执行任务转移到所述实时队列中。
  12. 如权利要求10所述的机器人资源任务周期管控装置,其特征在于,所述机器人资源检查单元包括:机器人资源检查模块,用于利用Lua脚本检查是否有空闲的机器人资源的结果对所述待执行任务进行处理。
  13. 如权利要求12所述的机器人资源任务周期管控装置,其特征在于,所述机器人资源检查模块具体用于将所述待执行任务置于所述REDIS的延时队列SortedSet中。
  14. 如权利要求13所述的机器人资源任务周期管控装置,其特征在于,还包括:
    SortedSet判断单元,用于判断SortedSet中的待执行任务是否停留了预设等待时长;
    Lua脚本转移单元,用于利用所述Lua脚本将所述待执行任务转移到所述实时队列中。
  15. 如权利要求11所述的机器人资源任务周期管控装置,其特征在于,还包括:
    待执行任务刷新单元,用于利用所述QUARTZ的周期任务周期性的刷新待执行任务所处的队列。
  16. 如权利要求10所述的机器人资源任务周期管控装置,其特征在于,还包括:
    机器人资源增加单元,用于增加空闲的机器人资源的数目。
  17. 如权利要求16所述的机器人资源任务周期管控装置,其特征在于,所述机器人资源增加单元具体用于利用计数器RedisConter的INCRBYkeyincremet命令增加所述数目。
  18. 如权利要求17所述的机器人资源任务周期管控装置,其特征在于,还包括:
    机器人资源减少单元,利用所述RedisConter的DECRBYkeydecrement命令减少空闲的机器人资源的数目。
  19. 一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述程序时实现权利要求1至9任一项所述机器人资源任务周期管控方法的步骤。
  20. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该计算机程序被处理器执行时实现权利要求1至9任一项所述机器人资源任务周期管控方法的步骤。
PCT/CN2020/097592 2019-07-04 2020-06-23 机器人资源任务周期管控方法及装置 WO2021000758A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910598875.9 2019-07-04
CN201910598875.9A CN110427253A (zh) 2019-07-04 2019-07-04 机器人资源任务周期管控方法及装置

Publications (1)

Publication Number Publication Date
WO2021000758A1 true WO2021000758A1 (zh) 2021-01-07

Family

ID=68408938

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/097592 WO2021000758A1 (zh) 2019-07-04 2020-06-23 机器人资源任务周期管控方法及装置

Country Status (3)

Country Link
CN (1) CN110427253A (zh)
TW (1) TW202102952A (zh)
WO (1) WO2021000758A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112667385A (zh) * 2021-01-15 2021-04-16 北京金和网络股份有限公司 一种云服务系统及其任务执行方法和装置及服务器

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110427253A (zh) * 2019-07-04 2019-11-08 中国建设银行股份有限公司 机器人资源任务周期管控方法及装置
CN111045804B (zh) * 2019-11-26 2024-03-19 泰康保险集团股份有限公司 一种任务分配方法、装置、介质及电子设备
CN111098311B (zh) * 2019-12-27 2023-08-22 上海智殷自动化科技有限公司 一种提高机器人工作节拍的方法
CN111459163B (zh) * 2020-04-07 2023-04-28 三一汽车制造有限公司 无人压路机机群协同工作的控制方法和控制系统
CN111597018B (zh) * 2020-04-21 2021-04-13 清华大学 一种机器人作业调度方法及装置
CN113050574B (zh) * 2021-03-26 2022-09-09 北京云迹科技股份有限公司 机器人调度方法和装置
CN113139081B (zh) * 2021-04-27 2023-10-27 中山亿联智能科技有限公司 高效率低延迟上报读取用户在线播放信息的方法

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104754052A (zh) * 2015-04-01 2015-07-01 贵州电网公司信息通信分公司 一种基于Websocket实现消息推送的方法
CN108762900A (zh) * 2018-05-21 2018-11-06 平安科技(深圳)有限公司 高频任务调度方法、系统、计算机设备和存储介质
CN108829504A (zh) * 2018-06-28 2018-11-16 泰康保险集团股份有限公司 一种任务调度方法、装置、介质和电子设备
CN108958948A (zh) * 2018-06-19 2018-12-07 北京云枢网络科技有限公司 一种定时器事件处理方法、数据库及定时器
US20180365235A1 (en) * 2014-12-31 2018-12-20 International Business Machines Corporation Scalable distributed data store
CN110427253A (zh) * 2019-07-04 2019-11-08 中国建设银行股份有限公司 机器人资源任务周期管控方法及装置

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013117225A1 (en) * 2012-02-09 2013-08-15 Telefonaktiebolaget L M Ericsson (Publ) Distributed mechanism for minimizing resource consumption
CN102902589B (zh) * 2012-08-31 2016-06-29 浪潮电子信息产业股份有限公司 一种集群mic作业的管理及调度方法
CN104935658B (zh) * 2015-06-17 2018-05-08 交通银行股份有限公司 一种银行任务分配方法及装置
CN105718315A (zh) * 2016-02-17 2016-06-29 中国农业银行股份有限公司 一种任务处理方法及服务器
CN107168779A (zh) * 2017-03-31 2017-09-15 咪咕互动娱乐有限公司 一种任务管理方法及系统
WO2019036932A1 (zh) * 2017-08-23 2019-02-28 深圳蓝胖子机器人有限公司 机器人调度方法、服务器、电子设备及可读存储介质
CN109656690A (zh) * 2017-10-11 2019-04-19 阿里巴巴集团控股有限公司 调度系统、方法和存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180365235A1 (en) * 2014-12-31 2018-12-20 International Business Machines Corporation Scalable distributed data store
CN104754052A (zh) * 2015-04-01 2015-07-01 贵州电网公司信息通信分公司 一种基于Websocket实现消息推送的方法
CN108762900A (zh) * 2018-05-21 2018-11-06 平安科技(深圳)有限公司 高频任务调度方法、系统、计算机设备和存储介质
CN108958948A (zh) * 2018-06-19 2018-12-07 北京云枢网络科技有限公司 一种定时器事件处理方法、数据库及定时器
CN108829504A (zh) * 2018-06-28 2018-11-16 泰康保险集团股份有限公司 一种任务调度方法、装置、介质和电子设备
CN110427253A (zh) * 2019-07-04 2019-11-08 中国建设银行股份有限公司 机器人资源任务周期管控方法及装置

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112667385A (zh) * 2021-01-15 2021-04-16 北京金和网络股份有限公司 一种云服务系统及其任务执行方法和装置及服务器

Also Published As

Publication number Publication date
CN110427253A (zh) 2019-11-08
TW202102952A (zh) 2021-01-16

Similar Documents

Publication Publication Date Title
WO2021000758A1 (zh) 机器人资源任务周期管控方法及装置
US9501319B2 (en) Method and apparatus for scheduling blocking tasks
US10606653B2 (en) Efficient priority-aware thread scheduling
JP6223569B2 (ja) ビジネスフローをスケジュールするためのコンピュータ装置、方法及び装置
US20110202924A1 (en) Asynchronous Task Execution
US9098359B2 (en) Durable execution of long running applications
CN110795254A (zh) 一种基于php处理高并发io的方法
WO2019047441A1 (zh) 一种通信优化方法及系统
US9104500B1 (en) Lock-free job scheduler for multi-processor systems
CN105630588A (zh) 一种分布式作业调度方法和系统
CN110716793B (zh) 一种分布式事务的执行方法、装置、设备及存储介质
CN107479981B (zh) 一种基于异步调用实现同步调用的处理方法及装置
CN111026768A (zh) 一种可实现数据快速装载的数据同步方法和装置
CN108073414B (zh) 一种基于Jedis的将多线程并发请求合并批量提交并分发结果的实现方法
JP2024503168A (ja) パラレルロボットのマルチスレッドコントローラ
CN112231073A (zh) 一种分布式任务调度方法及其装置
CN103761106A (zh) 流程的控制方法及流程引擎
US20230393782A1 (en) Io request pipeline processing device, method and system, and storage medium
CN115658278A (zh) 一种支持高并发协议交互的微任务调度机
CN101976206A (zh) 一种中断处理方法和装置
CN116932194A (zh) 线程执行方法、装置、电子设备及计算机可读存储介质
CN114416322A (zh) 基于双链表的任务调度方法、装置、电子设备及存储介质
CN114237858A (zh) 一种基于多集群网络的任务调度方法及系统
JP2019194847A (ja) 分散したソフトウェアコンポーネント間の通信におけるエラー処理のための方法および装置
CN115509767B (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: 20835111

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20835111

Country of ref document: EP

Kind code of ref document: A1