CN111813518A - Robot early warning method and device, computer equipment and storage medium - Google Patents

Robot early warning method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN111813518A
CN111813518A CN202010611702.9A CN202010611702A CN111813518A CN 111813518 A CN111813518 A CN 111813518A CN 202010611702 A CN202010611702 A CN 202010611702A CN 111813518 A CN111813518 A CN 111813518A
Authority
CN
China
Prior art keywords
task
time
execution
executable
early warning
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.)
Pending
Application number
CN202010611702.9A
Other languages
Chinese (zh)
Inventor
邹芳
刘鑫
王尊杰
赵永超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Life Insurance Company of China Ltd
Original Assignee
Ping An Life Insurance Company of China Ltd
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 Ping An Life Insurance Company of China Ltd filed Critical Ping An Life Insurance Company of China Ltd
Priority to CN202010611702.9A priority Critical patent/CN111813518A/en
Publication of CN111813518A publication Critical patent/CN111813518A/en
Pending legal-status Critical Current

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/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

Abstract

The embodiment of the application belongs to the technical field of cloud, is applied to the field of intelligent security and protection, and relates to a robot early warning method which comprises the steps of detecting the current task execution state and obtaining the running executable task; when the current time is not more than the latest finishing time, acquiring the execution preparation time of the executable task, and determining whether the execution time of the executable task is more than the execution preparation time; determining whether the expected ending time is greater than the latest ending time when the execution duration is not greater than the execution preparation duration; and when the expected ending time is greater than the latest ending time, sending early warning prompt information of the executable task, and when the processing information is task discarding, sending a current task discarding instruction to an execution machine of the executable task. The application also provides a robot early warning device, computer equipment and a storage medium. Further, the present application relates to blockchain techniques, and the executable tasks may be stored in blockchains. The method and the device realize automatic monitoring and early warning of task execution.

Description

Robot early warning method and device, computer equipment and storage medium
Technical Field
The application relates to the technical field of cloud, in particular to a robot early warning method and device, computer equipment and a storage medium.
Background
RPA (robot Process Automation) has been proposed since now, becoming a hot spot project. More and more enterprises are beginning to conduct large-scale trial and application of the RPA in various fields such as manufacturing industry, energy, bank finance and the like. With the development and improvement of RPA tools, the RPA is no longer an 'automatic assistant' existing in personal computers for over ten years, but is more a 'virtual labor force' or a 'virtual team' regarded as an enterprise or a team, and receives and replaces manual operation to independently complete certain work.
The execution of the RPA flow is distinct from other programs or processes, supporting messaging mechanisms and break mechanisms. In particular, the RPA platform based on the RPA mainstream software provider Blue Prism runs the process, and once the running resource is started, the process needs to be exited after the process execution is finished or a preset finishing condition is reached. There is no way to predict the length of time each task will occupy the operating resources or the length of time it will be executed, thus making it impossible to know if the actual final deadline will be exceeded for the execution of the task. The task itself lacks a necessary early warning mode, so that corresponding remediation and compensation cannot be performed when the process execution is abnormal or the final deadline is exceeded, and finally, the corresponding work cannot be completed within the specified time.
Disclosure of Invention
The embodiment of the application aims to provide a robot early warning method, a robot early warning device, computer equipment and a storage medium, so as to solve the technical problem that task abnormity early warning cannot be realized in the current robot task flow.
In order to solve the above technical problem, an embodiment of the present application provides a robot early warning method, which adopts the following technical scheme:
a robot early warning method comprises the following steps:
detecting the current task execution state, acquiring an executable task which is running, and determining whether the current time is greater than the latest finishing time of the executable task;
when the current time is not greater than the latest finishing time, acquiring the execution preparation time of the executable task, and determining whether the execution time of the executable task is greater than the execution preparation time;
when the execution duration is not longer than the execution preparation duration, obtaining an expected ending time of the executable task, and determining whether the expected ending time is greater than the latest ending time;
and when the expected ending time is greater than the latest ending time, sending early warning prompt information of the executable task, acquiring processing information of the executable task, determining whether the executable task is discarded or not according to the processing information, and when the processing information is task discarding, sending a current task discarding instruction to an execution machine of the executable task so that the execution machine discards the executable task.
Further, the step of detecting the current task execution state specifically includes:
acquiring a preset detection period;
and detecting the current task execution state according to the preset detection period.
Further, the step of acquiring the preset detection period specifically includes:
acquiring the average task processing duration of all machines in a task scheduling center based on the task scheduling center;
and excluding the maximum value and the minimum value in the average task processing time length, and taking the average value corresponding to the residual average task processing time length as a preset detection period.
Further, the step of obtaining the expected ending time of the executable task specifically includes:
acquiring the starting execution time of the executable task;
and calculating the expected ending time of the executable task according to the starting execution time and the execution preparation time.
Further, before the step of detecting the current task execution state, the method further includes:
when a new task is received, creating task parameters of the new task, wherein the task parameters comprise: earliest starting time, latest finishing time, execution preparation duration, execution alternative resources, initial priority and whether tasks are discarded after expiration.
Further, after the step of detecting the current task execution state, the method further includes:
determining whether an unexecuted task exists according to the task execution state, and determining whether the unexecuted task is an estimated overtime task when the unexecuted task is determined to exist;
and when the unexecuted task is determined to be the estimated overtime task, marking the unexecuted task and sending early warning prompt information of the unexecuted task.
Further, the step of determining whether the unexecuted task is a pre-estimated timeout task specifically includes:
determining whether the current time is greater than the latest ending time of the unexecuted task;
when the current time is not greater than the latest ending time, determining the estimated ending time of the unexecuted task according to the current time and the execution preparation time of the unexecuted task;
and when the estimated ending time is greater than the latest ending time, determining the unexecuted task as an estimated overtime task.
In order to solve the above technical problem, an embodiment of the present application further provides a robot early warning device, which adopts the following technical scheme:
the detection module is used for detecting the current task execution state, acquiring the running executable task and determining whether the current time is greater than the latest ending time of the executable task;
a first confirming module, configured to, when the current time is not greater than the latest end time, obtain an execution preparation duration of the executable task, and determine whether the execution duration of the executable task is greater than the execution preparation duration;
a second determining module, configured to obtain an expected end time of the executable task when the execution duration is not greater than the execution preparation duration, and determine whether the expected end time is greater than the latest end time; and
and the sending module is used for sending the early warning prompt information of the executable task when the expected ending time is greater than the latest ending time, acquiring the processing information of the executable task, determining whether to discard the executable task according to the processing information, and sending a current task discarding instruction to an execution machine of the executable task when the processing information is task discarding so that the execution machine discards the executable task.
In order to solve the above technical problem, an embodiment of the present application further provides a computer device, which includes a memory and a processor, where the memory stores computer readable instructions, and the processor implements the steps of the robot early warning method when executing the computer readable instructions.
In order to solve the above technical problem, an embodiment of the present invention further provides a computer-readable storage medium, where computer-readable instructions are stored on the computer-readable storage medium, and when the computer-readable instructions are executed by a processor, the steps of the robot early warning method are implemented.
Compared with the prior art, the robot early warning method, the robot early warning device, the computer equipment and the storage medium provided by the application have at least the following beneficial effects:
the method comprises the steps of detecting the execution state of a current task, obtaining an executable task running, determining whether the current time is greater than the latest ending time of the executable task, wherein the latest ending time is the latest time for ending the execution of the executable task, obtaining the execution preparation time of the executable task when the current time is not greater than the latest ending time, and determining whether the execution time of the executable task is greater than the execution preparation time, wherein the execution preparation time is the estimated execution time of the executable task, if the execution time of the executable task is greater than the execution preparation time, the execution preparation time is overtime of the executable task, if the execution time is not greater than the execution preparation time, obtaining the expected ending time of the executable task, and the expected ending time is the expected ending time of the executable task, determining whether the expected ending time is greater than the latest ending time, then sending early warning prompt information of the executable task when the expected ending time is greater than the latest ending time, acquiring processing information of the executable task, determining whether to discard the executable task according to the processing information, and sending a current task discarding instruction to an execution machine of the executable task when the processing information is task discarding so that the executable task is discarded by the executable machine, thereby realizing automatic monitoring and early warning on task execution, greatly reducing resource waste in an RPA flow, improving the execution efficiency and quality of the whole task, and reducing resource loss caused by abnormal task execution.
Drawings
In order to more clearly illustrate the solution of the present application, the drawings needed for describing the embodiments of the present application will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and that other drawings can be obtained by those skilled in the art without inventive effort.
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flow diagram of one embodiment of a robot warning method according to the present application;
fig. 3 is a schematic structural diagram of an embodiment of a robot warning device according to the present application;
FIG. 4 is a schematic block diagram of one embodiment of a computer device according to the present application.
Reference numerals: the robot early warning device 400, a detection module 401, a first confirmation module 402, a second confirmation module 403, and a transmission module 404.
Detailed Description
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "including" and "having," and any variations thereof, in the description and claims of this application and the description of the above figures are intended to cover non-exclusive inclusions. The terms "first," "second," and the like in the description and claims of this application or in the above-described drawings are used for distinguishing between different objects and not for describing a particular order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have various communication client applications installed thereon, such as a web browser application, a shopping application, a search application, an instant messaging tool, a mailbox client, social platform software, and the like.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving picture experts Group Audio Layer III, mpeg compression standard Audio Layer 3), MP4 players (Moving picture experts Group Audio Layer IV, mpeg compression standard Audio Layer 4), laptop portable computers, desktop computers, and the like.
The server 105 may be a server providing various services, such as a background server providing support for pages displayed on the terminal devices 101, 102, 103.
It should be noted that the robot early warning method provided in the embodiment of the present application is generally executed by a server/terminal device, and accordingly, the robot early warning apparatus is generally disposed in the server/terminal device.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to fig. 2, a flow diagram of one embodiment of a method of robot alerting in accordance with the present application is shown. The robot early warning method comprises the following steps:
step S201, detecting the current task execution state, acquiring an executable task that is running, and determining whether the current time is greater than the latest end time of the executable task.
In the present embodiment, the current task execution state is detected, which includes an executing state and a non-executing state. The task in the executing state is an executable task, and the task in the non-executing state is a non-executable task. And acquiring the running executable task according to the task execution state, and determining whether the current time is greater than the latest finishing time of the executable task. The latest ending time is the latest time of ending the execution of the executable task or the time of task failure, the time of task failure is the preset task duration effective time, and when the duration effective time is exceeded, the task fails. Comparing the current time with the latest finishing time of the executable task, determining that the running time of the executable task is overtime when the current time is greater than the latest finishing time, marking the executable task as an overtime task, sending overtime early warning information of the executable task, and continuing to execute the subsequent steps if the current time is not greater than the latest finishing time of the executable task.
It is emphasized that the executable tasks may also be stored in a node of a blockchain in order to further ensure privacy and security of the executable tasks.
The block chain referred by the application is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
Step S202, when the current time is not greater than the latest ending time, acquiring the execution preparation time length of the executable task, and determining whether the execution time length of the executable task is greater than the execution preparation time length.
In this embodiment, when it is detected that the current time is not greater than the latest end time, the execution preparation time length of the executable task is acquired. Wherein, the execution preparation time length is the estimated execution time length of the executable task; when the executable task is executed only by a single machine, the execution preparation time is the total time of the executable task possibly executed on the machine; when the executable task is a task executed by multiple machines cooperatively, the execution preparation time is the total execution time of all the machines. The execution preparation time length is obtained, whether the execution time length of the executable task is larger than the execution preparation time length is determined, wherein the execution preparation time length can be determined according to the initial priority of the current executable task, the execution preparation time length corresponding to the executable task with the higher initial priority is shorter, and the execution preparation time length corresponding to the executable task with the lower initial priority is longer. And when the execution duration is longer than the execution preparation duration, determining that the executable task has overtime operation time, marking the executable task as an overtime task, and sending overtime early warning information of the executable task.
Step S203, when the execution duration is not greater than the execution preparation duration, obtaining an expected end time of the executable task, and determining whether the expected end time is greater than the latest end time.
In this embodiment, when the execution duration of the executable task is not greater than the execution preparation duration, an expected end time of the executable task is obtained, where the expected end time is an expected end time of the executable task. Comparing the expected ending time of the executable task with the latest ending time of the executable task, when the expected ending time is not greater than the latest ending time, determining that the executable task does not have a timeout risk in the detection, marking the executable task as a safe execution task, and sending continuous execution task information so that the machine continues to execute the executable task when receiving the continuous execution task information.
Step S204, when the expected ending time is greater than the latest ending time, sending early warning prompt information of the executable task, acquiring processing information of the executable task, determining whether to discard the executable task according to the processing information, and when the processing information is task discarding, sending a current task discarding instruction to an execution machine of the executable task so that the execution machine discards the executable task.
In this embodiment, when the expected end time of the executable task is greater than the latest end time of the executable task, it is determined that the executable task has a risk of ending overtime, the executable task is marked as an overtime risk task, and overtime risk early warning information of the executable task is sent.
The processing information is set when the task is created, and the specific processing information of the task when the task is overdue comprises the contents of whether the task is temporarily stored due to overdue, whether the task is discarded due to overdue, whether the task is continuously processed due to overdue and the like. At task creation time, the processing information for the task may be determined. And if the processing information of the executable task is acquired as task discarding, sending a current task discarding instruction to an execution machine of the executable task so that the execution machine discards the executable task. If the processing information of the executable task is task temporary storage, sending a current task temporary storage instruction to a corresponding execution machine, temporarily storing the executable task when the execution machine receives the current task temporary storage instruction, and discarding when the executable task is due. And if the processing information of the executable task is acquired as the continuous processing, no instruction is sent to the corresponding execution machine, so that the execution machine continuously processes the executable task.
The method comprises the steps of detecting the current task execution state, obtaining an executable task running, determining whether the current time is greater than the latest finishing time of the executable task, then obtaining the execution preparation time of the executable task when the current time is not greater than the latest finishing time, determining whether the execution time of the executable task is greater than the execution preparation time, then obtaining the expected finishing time of the executable task when the execution time is not greater than the execution preparation time, determining whether the expected finishing time is greater than the latest finishing time, then sending the early warning prompt information of the executable task when the expected finishing time is greater than the latest finishing time, obtaining the processing information of the executable task, and determining whether to discard the executable task according to the processing information, when the processing information is task discarding, a current task discarding instruction is sent to an execution machine of the executable task, so that the executable task is discarded by the executable machine, automatic monitoring and early warning of task execution are realized, resource waste in an RPA process can be greatly reduced, the whole task execution efficiency and quality are improved, and resource loss caused by task execution abnormity is reduced.
In some embodiments of the present application, the detecting the current task execution state includes:
acquiring a preset detection period;
and detecting the current task execution state according to the preset detection period.
In this embodiment, the preset detection period is a preset period for detecting the task execution state of the machine, wherein the preset detection period is set by the task scheduling center. Different machines may have different preset detection periods, or the same preset detection period. Specifically, the preset detection period may be determined according to an average duration of task execution, for example, obtaining the execution durations of a preset number of tasks, excluding the tasks with the longest and shortest execution durations, and taking an average of the execution durations of the remaining tasks as the preset detection period; or acquiring the execution time of the task in the preset stage, performing weighted calculation on the execution time of different tasks according to different task types, calculating the mean value of the execution time of the tasks according to the execution time after weighted calculation, and taking the mean value as the preset detection period. When the preset detection period is obtained, the current task execution state can be periodically detected according to the preset detection period.
In the embodiment, the preset detection period is obtained, and the task execution state is detected according to the preset detection period, so that the task execution state is regularly detected, different processing on tasks in different states according to the task execution state is further realized, and the task execution efficiency is improved.
In some embodiments of the present application, the obtaining of the preset detection period includes:
acquiring the average task processing duration of all machines in a task scheduling center based on the task scheduling center;
and excluding the maximum value and the minimum value in the average task processing time length, and taking the average value corresponding to the residual average task processing time length as a preset detection period.
In this embodiment, an obtaining method of the preset detection period is further provided, and specifically, the average task processing time of all the machines in the task scheduling center may be obtained by the task scheduling center, where each machine may have different processing times when processing different tasks, and the average task processing time is the average task processing time of each machine. When the average task processing duration of each machine is obtained, the maximum value and the minimum value are eliminated, the average value corresponding to the remaining average task processing duration is used as a preset detection period, and the numerical value error obtained through calculation can be avoided being overlarge.
In the embodiment, the average task processing time is obtained, so that the preset detection period of the machine can be accurately obtained, the efficiency of periodic detection of the machine is improved, and the task early warning errors and resource waste caused when the machine is not detected for a long time and in a short time are avoided.
In some embodiments of the present application, the obtaining of the expected ending time of the executable task includes:
acquiring the starting execution time of the executable task;
and calculating the expected ending time of the executable task according to the starting execution time and the execution preparation time.
In this embodiment, the execution start time is an actual execution start time of the executable task, and when the executable task starts executing, the time for starting executing the executable task is recorded. And acquiring the starting execution time of the executable task, and summing the starting execution time and the execution preparation time of the executable task to calculate the expected ending time of the executable task.
In the embodiment, the accurate calculation of the expected ending time of the executable task is realized by acquiring the starting execution time of the executable task and according to the starting execution time and the execution preparation time, the problem of resource waste caused by the wrong calculation of the expected ending time of the executable task is avoided, and the resource utilization rate is improved.
In some embodiments of the present application, before the step of detecting the current task execution state, the method further includes:
when a new task is received, creating task parameters of the new task, wherein the task parameters comprise: earliest starting time, latest finishing time, execution preparation duration, execution alternative resources, initial priority and whether tasks are discarded after expiration.
In this embodiment, when a new task is received, task parameters of the new task are created. The task parameters include the earliest starting time, the latest ending time, the execution preparation time, the execution alternative resources, the initial priority and whether the task is discarded after the expiration. Wherein, the earliest starting time can be represented by T _ start, namely the earliest time for starting execution of the set task; the latest ending time can be represented by T _ end, namely the latest time for ending the execution of the set task or the time for failing the task; the execution preparation time can be represented by T _ last, namely the execution estimated time of the set task; the execution alternative resource is a machine resource capable of executing the task, and because the task may not be executed on all resources due to the difference of factors such as environment or account number, the process corresponding to the task needs to be given machine resources capable of supporting the execution of the task; the initial priority can be represented by P _ init, and the priority of task execution can be determined according to the initial priority under the condition that a plurality of tasks need to be executed in the same machine resource; and if the task is discarded after the expiration is set, if the task is overtime, the task is discarded for execution. Before the new task is executed, determining a target machine resource executed by the new task according to the execution alternative resource, and if the target machine resource needs to process a plurality of tasks at the same time, determining an execution sequence according to the initial priority of the new task. And when the machine receives the new task, executing the new task according to the initial priority.
In the embodiment, different task parameters are preset, so that the task state and the machine resource are accurately obtained, automatic monitoring and early warning of task execution according to the task parameters are further realized, and the overall task execution efficiency and quality are improved.
In some embodiments of the present application, after the step of detecting the current task execution state, the method further includes:
determining whether an unexecuted task exists according to the task execution state, and determining whether the unexecuted task is an estimated overtime task when the unexecuted task is determined to exist;
and when the unexecuted task is determined to be the estimated overtime task, marking the unexecuted task and sending early warning prompt information of the unexecuted task.
In this embodiment, it may be determined whether there are unexecuted tasks, i.e., tasks that are indicated as not currently being executed by the machine, based on the task execution status. When the task execution state is the non-execution state, it is determined that the non-execution task exists. The unexecuted task is estimated to further determine whether the unexecuted task is an estimated overtime task, and if the unexecuted task is the estimated overtime task, the unexecuted task is indicated to have a risk of overtime; and if the unexecuted task is not predicted to be the overtime task, the unexecuted task is represented to have no overtime risk. And when the unexecuted task is determined to be the estimated overtime task, marking the unexecuted task, and simultaneously sending the early warning prompt information of the unexecuted task to a preset receiving end corresponding to the early warning prompt information.
In the embodiment, the task execution state is acquired, and whether the unexecuted task exists or not is determined according to the unexecuted state, so that the processing of the unexecuted tasks except the executable task is realized, the accuracy of the whole task flow is further improved, and the waste of machine resources under the condition that the unexecuted task possibly overtime is avoided. The scheme provided by the embodiment of the application can be applied to the field of intelligent security and protection, so that the construction of a smart city is promoted.
In some embodiments of the present application, the determining whether the unexecuted task is a pre-estimated timeout task includes:
determining whether the current time is greater than the latest ending time of the unexecuted task;
when the current time is not greater than the latest ending time, determining the estimated ending time of the unexecuted task according to the current time and the execution preparation time of the unexecuted task;
and when the estimated ending time is greater than the latest ending time, determining the unexecuted task as an estimated overtime task.
In this embodiment, when it is determined that an unexecuted task exists, it is required to determine whether the unexecuted task is an estimated timeout task, where the estimated timeout task may be further divided into an unexecuted timeout task and an unexecuted timeout risk task according to different situations.
Specifically, the latest ending time of the unexecuted task is obtained, whether the current time is greater than the latest ending time or not is determined, when the current time is greater than the latest ending time, the unexecuted task is marked as an overtime unexecuted task in the estimated overtime tasks, and early warning information of the overtime unexecuted task is sent. And when the current time is not greater than the latest ending time, summing and calculating to obtain the estimated ending time of the unexecuted task according to the current time and the execution preparation duration of the unexecuted task. If the estimated ending time is greater than the latest ending time, marking the unexecuted task as an unexecuted overtime risk task, and sending early warning information of the unexecuted task; and if the estimated ending time is not greater than the latest ending time, the unexecuted task is not processed, namely the unexecuted task is not estimated as a timeout task.
In the embodiment, the accurate judgment of whether the unexecuted task is the estimated overtime task or not is realized by acquiring the latest ending time and the current time of the unexecuted task, so that different processing on different unexecuted tasks is realized.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware associated with computer readable instructions, which can be stored in a computer readable storage medium, and when executed, can include processes of the embodiments of the methods described above. The storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a Random Access Memory (RAM).
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
With further reference to fig. 3, as an implementation of the method shown in fig. 2, the present application provides an embodiment of a robot early warning apparatus, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus may be specifically applied to various electronic devices.
As shown in fig. 3, the robot early warning apparatus 400 according to the present embodiment includes: a detection module 401, a first acknowledgement module 402, a second acknowledgement module 403, and a sending module 404. Wherein:
a detection module 401, configured to detect a current task execution state, obtain an executable task that is running, and determine whether a current time is greater than a latest end time of the executable task;
wherein the detection module 401 includes:
the first acquisition unit is used for acquiring a preset detection period;
and the detection unit is used for detecting the current task execution state according to the preset detection period.
Wherein the first acquisition unit includes:
the second acquisition unit is used for acquiring the average task processing duration of all machines in the task scheduling center based on the task scheduling center;
and the first confirming unit is used for eliminating the maximum value and the minimum value in the average task processing time length and taking the average value corresponding to the residual average task processing time length as a preset detection period.
In the present embodiment, the current task execution state is detected, which includes an executing state and a non-executing state. The task in the executing state is an executable task, and the task in the non-executing state is a non-executable task. And acquiring the running executable task according to the task execution state, and determining whether the current time is greater than the latest finishing time of the executable task. The latest ending time is the latest time of ending the execution of the executable task or the time of task failure, the time of task failure is the preset task duration effective time, and when the duration effective time is exceeded, the task fails. Comparing the current time with the latest finishing time of the executable task, determining that the running time of the executable task is overtime when the current time is greater than the latest finishing time, marking the executable task as an overtime task, sending overtime early warning information of the executable task, and continuing to execute the subsequent steps if the current time is not greater than the latest finishing time of the executable task.
A first determining module 402, configured to, when the current time is not greater than the latest end time, obtain an execution preparation duration of the executable task, and determine whether the execution duration of the executable task is greater than the execution preparation duration;
in this embodiment, when it is detected that the current time is not greater than the latest end time, the execution preparation time length of the executable task is acquired. Wherein, the execution preparation time length is the estimated execution time length of the executable task; when the executable task is executed only by a single machine, the execution preparation time is the total time of the executable task possibly executed on the machine; when the executable task is a task executed by multiple machines cooperatively, the execution preparation time is the total execution time of all the machines. The execution preparation time length is obtained, whether the execution time length of the executable task is larger than the execution preparation time length is determined, wherein the execution preparation time length can be determined according to the initial priority of the current executable task, the execution preparation time length corresponding to the executable task with the higher initial priority is shorter, and the execution preparation time length corresponding to the executable task with the lower initial priority is longer. And when the execution duration is longer than the execution preparation duration, determining that the executable task has overtime operation time, marking the executable task as an overtime task, and sending overtime early warning information of the executable task.
It is emphasized that the executable tasks may also be stored in a node of a blockchain in order to further ensure privacy and security of the executable tasks.
The block chain referred by the application is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
A second determining module 403, configured to obtain an expected end time of the executable task when the execution duration is not greater than the execution preparation duration, and determine whether the expected end time is greater than the latest end time;
wherein the second confirmation module 403 comprises:
a third obtaining unit, configured to obtain a start execution time of the executable task;
and the calculating unit is used for calculating the expected ending time of the executable task according to the starting execution time and the execution preparation duration.
In this embodiment, when the execution duration of the executable task is not greater than the execution preparation duration, an expected end time of the executable task is obtained, where the expected end time is an expected end time of the executable task. Comparing the expected ending time of the executable task with the latest ending time of the executable task, when the expected ending time is not greater than the latest ending time, determining that the executable task does not have a timeout risk in the detection, marking the executable task as a safe execution task, and sending continuous execution task information so that the machine continues to execute the executable task when receiving the continuous execution task information.
A sending module 404, configured to send an early warning prompt message of the executable task when the expected end time is greater than the latest end time, obtain processing information of the executable task, determine whether to discard the executable task according to the processing information, and send a current task discarding instruction to an execution machine of the executable task when the processing information is task discarding, so that the execution machine discards the executable task.
In this embodiment, when the expected end time of the executable task is greater than the latest end time of the executable task, it is determined that the executable task has a risk of ending overtime, the executable task is marked as an overtime risk task, and overtime risk early warning information of the executable task is sent.
The processing information is set when the task is created, and the specific processing information of the task when the task is overdue comprises the contents of whether the task is temporarily stored due to overdue, whether the task is discarded due to overdue, whether the task is continuously processed due to overdue and the like. At task creation time, the processing information for the task may be determined. And if the processing information of the executable task is acquired as task discarding, sending a current task discarding instruction to an execution machine of the executable task so that the execution machine discards the executable task. If the processing information of the executable task is task temporary storage, sending a current task temporary storage instruction to a corresponding execution machine, temporarily storing the executable task when the execution machine receives the current task temporary storage instruction, and discarding when the executable task is due. And if the processing information of the executable task is acquired as the continuous processing, no instruction is sent to the corresponding execution machine, so that the execution machine continuously processes the executable task.
The creating module is used for creating task parameters of a new task when the new task is received, wherein the task parameters comprise: earliest starting time, latest finishing time, execution preparation duration, execution alternative resources, initial priority and whether tasks are discarded after expiration.
In this embodiment, when a new task is received, task parameters of the new task are created. The task parameters include the earliest starting time, the latest ending time, the execution preparation time, the execution alternative resources, the initial priority and whether the task is discarded after the expiration. Wherein, the earliest starting time can be represented by T _ start, namely the earliest time for starting execution of the set task; the latest ending time can be represented by T _ end, namely the latest time for ending the execution of the set task or the time for failing the task; the execution preparation time can be represented by T _ last, namely the execution estimated time of the set task; the execution alternative resource is a machine resource capable of executing the task, and because the task may not be executed on all resources due to the difference of factors such as environment or account number, the process corresponding to the task needs to be given machine resources capable of supporting the execution of the task; the initial priority can be represented by P _ init, and the priority of task execution can be determined according to the initial priority under the condition that a plurality of tasks need to be executed in the same machine resource; and if the task is discarded after the expiration is set, if the task is overtime, the task is discarded for execution. Before the new task is executed, determining a target machine resource executed by the new task according to the execution alternative resource, and if the target machine resource needs to process a plurality of tasks at the same time, determining an execution sequence according to the initial priority of the new task. And when the machine receives the new task, executing the new task according to the initial priority.
The third confirming module is used for determining whether an unexecuted task exists according to the task execution state, and determining whether the unexecuted task is a pre-estimated overtime task when the unexecuted task is determined to exist;
and the marking module is used for marking the unexecuted task and sending the early warning prompt information of the unexecuted task when the unexecuted task is determined to be the estimated overtime task.
Wherein the third confirmation module comprises:
a second confirming unit, configured to determine whether a current time is greater than a latest end time of the unexecuted task;
a third confirming unit, configured to determine, when the current time is not greater than the latest end time, an estimated end time of the unexecuted task according to the current time and the execution preparation duration of the unexecuted task;
and the fourth confirming unit is used for determining the unexecuted task as an estimated overtime task when the estimated ending time is greater than the latest ending time.
In this embodiment, it may be determined whether there are unexecuted tasks, i.e., tasks that are indicated as not currently being executed by the machine, based on the task execution status. When the task execution state is the non-execution state, it is determined that the non-execution task exists. The unexecuted task is estimated to further determine whether the unexecuted task is an estimated overtime task, and if the unexecuted task is the estimated overtime task, the unexecuted task is indicated to have a risk of overtime; and if the unexecuted task is not predicted to be the overtime task, the unexecuted task is represented to have no overtime risk. And when the unexecuted task is determined to be the estimated overtime task, marking the unexecuted task, and simultaneously sending the early warning prompt information of the unexecuted task to a preset receiving end corresponding to the early warning prompt information.
The robot early warning device provided by the application realizes automatic monitoring and early warning of task execution, can greatly reduce resource waste in an RPA flow, improves the whole task execution efficiency and quality, and reduces resource loss caused by abnormal task execution.
In order to solve the technical problem, an embodiment of the present application further provides a computer device. Referring to fig. 4, fig. 4 is a block diagram of a basic structure of a computer device according to the present embodiment.
The computer device 6 comprises a memory 61, a processor 62, a network interface 63 communicatively connected to each other via a system bus. It is noted that only a computer device 6 having components 61-63 is shown, but it is understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead. As will be understood by those skilled in the art, the computer device is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and the hardware includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable Gate Array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
The computer device can be a desktop computer, a notebook, a palm computer, a cloud server and other computing devices. The computer equipment can carry out man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch panel or voice control equipment and the like.
The memory 61 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 61 may be an internal storage unit of the computer device 6, such as a hard disk or a memory of the computer device 6. In other embodiments, the memory 61 may also be an external storage device of the computer device 6, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a flash Card (FlashCard), and the like, which are provided on the computer device 6. Of course, the memory 61 may also comprise both an internal storage unit of the computer device 6 and an external storage device thereof. In this embodiment, the memory 61 is generally used for storing an operating system installed in the computer device 6 and various types of application software, such as computer readable instructions of a robot warning method. Further, the memory 61 may also be used to temporarily store various types of data that have been output or are to be output.
The processor 62 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 62 is typically used to control the overall operation of the computer device 6. In this embodiment, the processor 62 is configured to execute computer readable instructions stored in the memory 61 or process data, such as computer readable instructions for executing the robot warning method.
The network interface 63 may comprise a wireless network interface or a wired network interface, and the network interface 63 is typically used for establishing a communication connection between the computer device 6 and other electronic devices.
The application provides computer equipment has realized automatic monitoring and early warning to the task execution, can greatly reduce the wasting of resources at the RPA flow, promotes whole task execution efficiency and quality, reduces because of the resource loss that the task execution is unusual brings.
The present application further provides another embodiment, which is to provide a computer-readable storage medium storing computer-readable instructions, which are executable by at least one processor to cause the at least one processor to perform the steps of the robot warning method as described above.
The computer-readable storage medium provided by the application realizes automatic monitoring and early warning of task execution, can greatly reduce resource waste in an RPA process, improves the whole task execution efficiency and quality, and reduces resource loss caused by task execution abnormity.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
It is to be understood that the above-described embodiments are merely illustrative of some, but not restrictive, of the broad invention, and that the appended drawings illustrate preferred embodiments of the invention and do not limit the scope of the invention. This application is capable of embodiments in many different forms and is provided for the purpose of enabling a thorough understanding of the disclosure of the application. Although the present application has been described in detail with reference to the foregoing embodiments, it will be apparent to one skilled in the art that the present application may be practiced without modification or with equivalents of some of the features described in the foregoing embodiments. All equivalent structures made by using the contents of the specification and the drawings of the present application are directly or indirectly applied to other related technical fields and are within the protection scope of the present application.

Claims (10)

1. A robot early warning method is characterized by comprising the following steps:
detecting the current task execution state, acquiring an executable task which is running, and determining whether the current time is greater than the latest finishing time of the executable task;
when the current time is not greater than the latest finishing time, acquiring the execution preparation time of the executable task, and determining whether the execution time of the executable task is greater than the execution preparation time;
when the execution duration is not longer than the execution preparation duration, obtaining an expected ending time of the executable task, and determining whether the expected ending time is greater than the latest ending time;
and when the expected ending time is greater than the latest ending time, sending early warning prompt information of the executable task, acquiring processing information of the executable task, determining whether the executable task is discarded or not according to the processing information, and when the processing information is task discarding, sending a current task discarding instruction to an execution machine of the executable task so that the execution machine discards the executable task.
2. The robot early warning method according to claim 1, wherein the step of detecting the current task execution state specifically comprises:
acquiring a preset detection period;
and detecting the current task execution state according to the preset detection period.
3. The robot early warning method according to claim 2, wherein the step of obtaining the preset detection period specifically comprises:
acquiring the average task processing duration of all machines in a task scheduling center based on the task scheduling center;
and excluding the maximum value and the minimum value in the average task processing time length, and taking the average value corresponding to the residual average task processing time length as a preset detection period.
4. The robot early warning method according to claim 1, wherein the step of obtaining the expected end time of the executable task specifically comprises:
acquiring the starting execution time of the executable task;
and calculating the expected ending time of the executable task according to the starting execution time and the execution preparation time.
5. The robot early warning method of claim 1, further comprising, before the step of detecting a current task execution state:
when a new task is received, creating task parameters of the new task, wherein the task parameters comprise: earliest starting time, latest finishing time, execution preparation duration, execution alternative resources, initial priority and whether tasks are discarded after expiration.
6. The robot early warning method according to any one of claims 1 to 4, further comprising, after the step of detecting the current task execution state:
determining whether an unexecuted task exists according to the task execution state, and determining whether the unexecuted task is an estimated overtime task when the unexecuted task is determined to exist;
and when the unexecuted task is determined to be the estimated overtime task, marking the unexecuted task and sending early warning prompt information of the unexecuted task.
7. The robot early warning method according to claim 6, wherein the step of determining whether the unexecuted task is a pre-estimated timeout task specifically comprises:
determining whether the current time is greater than the latest ending time of the unexecuted task;
when the current time is not greater than the latest ending time, determining the estimated ending time of the unexecuted task according to the current time and the execution preparation time of the unexecuted task;
and when the estimated ending time is greater than the latest ending time, determining the unexecuted task as an estimated overtime task.
8. A robot early warning device, comprising:
the detection module is used for detecting the current task execution state, acquiring the running executable task and determining whether the current time is greater than the latest ending time of the executable task;
a first confirming module, configured to, when the current time is not greater than the latest end time, obtain an execution preparation duration of the executable task, and determine whether the execution duration of the executable task is greater than the execution preparation duration;
a second determining module, configured to obtain an expected end time of the executable task when the execution duration is not greater than the execution preparation duration, and determine whether the expected end time is greater than the latest end time; and
and the sending module is used for sending the early warning prompt information of the executable task when the expected ending time is greater than the latest ending time, acquiring the processing information of the executable task, determining whether to discard the executable task according to the processing information, and sending a current task discarding instruction to an execution machine of the executable task when the processing information is task discarding so that the execution machine discards the executable task.
9. A computer device comprising a memory having computer readable instructions stored therein and a processor which when executed implements the steps of the robot warning method of any one of claims 1 to 7.
10. A computer readable storage medium having computer readable instructions stored thereon which, when executed by a processor, implement the steps of the robot warning method of any one of claims 1 to 7.
CN202010611702.9A 2020-06-29 2020-06-29 Robot early warning method and device, computer equipment and storage medium Pending CN111813518A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010611702.9A CN111813518A (en) 2020-06-29 2020-06-29 Robot early warning method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010611702.9A CN111813518A (en) 2020-06-29 2020-06-29 Robot early warning method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111813518A true CN111813518A (en) 2020-10-23

Family

ID=72856543

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010611702.9A Pending CN111813518A (en) 2020-06-29 2020-06-29 Robot early warning method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111813518A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113360270A (en) * 2021-06-30 2021-09-07 杭州数梦工场科技有限公司 Data cleaning task processing method and device
CN114241731A (en) * 2021-12-20 2022-03-25 江苏丰东热技术有限公司 Warning method and device for automatic conveying process of controlled atmosphere heat treatment furnace

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080168446A1 (en) * 2007-01-10 2008-07-10 Jinmei Shen Method and Apparatus for Handling Service Requests in a Data Processing System
CN107872396A (en) * 2016-09-26 2018-04-03 华为技术有限公司 Communication means, processing equipment, terminal device and server with overtime control
US20190332508A1 (en) * 2018-04-30 2019-10-31 Accenture Global Solutions Limited Robotic optimization for robotic process automation platforms
CN111010292A (en) * 2019-11-26 2020-04-14 苏宁云计算有限公司 Offline task delay warning system and method and computer system
CN111125097A (en) * 2019-11-29 2020-05-08 中盈优创资讯科技有限公司 Report scheduling method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080168446A1 (en) * 2007-01-10 2008-07-10 Jinmei Shen Method and Apparatus for Handling Service Requests in a Data Processing System
CN107872396A (en) * 2016-09-26 2018-04-03 华为技术有限公司 Communication means, processing equipment, terminal device and server with overtime control
US20190332508A1 (en) * 2018-04-30 2019-10-31 Accenture Global Solutions Limited Robotic optimization for robotic process automation platforms
CN111010292A (en) * 2019-11-26 2020-04-14 苏宁云计算有限公司 Offline task delay warning system and method and computer system
CN111125097A (en) * 2019-11-29 2020-05-08 中盈优创资讯科技有限公司 Report scheduling method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
寿涌毅著: "《项目调度的数学模型与启发式算法》", 31 December 2019 *
蒋建春等著: "《嵌入式系统原理及应用实例》", 31 August 2015 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113360270A (en) * 2021-06-30 2021-09-07 杭州数梦工场科技有限公司 Data cleaning task processing method and device
CN113360270B (en) * 2021-06-30 2024-02-27 杭州数梦工场科技有限公司 Data cleaning task processing method and device
CN114241731A (en) * 2021-12-20 2022-03-25 江苏丰东热技术有限公司 Warning method and device for automatic conveying process of controlled atmosphere heat treatment furnace

Similar Documents

Publication Publication Date Title
CN111813624B (en) Robot execution time length estimation method based on time length analysis and related equipment thereof
CN112052111B (en) Processing method, device and equipment for server abnormity early warning and storage medium
CN111813516A (en) Resource control method and device, computer equipment and storage medium
CN109325349A (en) A kind of method for managing security, terminal device and computer readable storage medium
CN111597388B (en) Sample collection method, device, equipment and medium based on distributed system
CN111800462A (en) Micro-service instance processing method and device, computer equipment and storage medium
CN110928950A (en) Block chain transaction information management method and device, computer equipment and storage medium
CN112631911A (en) Automatic testing method and device, computer equipment and storage medium
CN111813518A (en) Robot early warning method and device, computer equipment and storage medium
CN111813573A (en) Communication method of management platform and robot software and related equipment thereof
CN114564294A (en) Intelligent service arranging method and device, computer equipment and storage medium
CN104182683A (en) Method, device and system for monitoring online transactions
CN112631924A (en) Automatic testing method and device, computer equipment and storage medium
CN112631751A (en) Task scheduling method and device, computer equipment and storage medium
CN113254445A (en) Real-time data storage method and device, computer equipment and storage medium
CN113434254B (en) Client deployment method, client deployment apparatus, computer device, and storage medium
CN110912990A (en) Method and related equipment for updating consensus period
CN112860662A (en) Data blood relationship establishing method and device, computer equipment and storage medium
CN109284193A (en) A kind of distributed data processing method and server based on multithreading
CN111475388A (en) Data push test method and device, computer equipment and storage medium
CN111813418A (en) Distributed link tracking method, device, computer equipment and storage medium
CN115543565A (en) Task processing method and device, computer equipment and storage medium
CN114186976A (en) Workflow transfer method and device, computer equipment and storage medium
CN115328764A (en) Test code optimization method based on automatic test and related equipment thereof
CN115330396A (en) Payment state acquisition method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20201023

RJ01 Rejection of invention patent application after publication