Timed task execution method, device, mobile apparatus, and storage medium

CN117806237BActive Publication Date: 2026-08-18HEFEI ZHIXINGZHE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211177175.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-26
Publication Date
2026-08-18
Estimated Expiration
2042-09-26

AI Technical Summary

Technical Problem

[0006]为了至少解决现有技术中定时任务和其他任务存在时间冲突、任务执行终端异常,影响用户的体验的问题

Benefits of technology

[0018]The beneficial effects of this invention are as follows: by using an operating terminal to create scheduled tasks, the reliability and stability of scheduled task operations are increased; and by judging the device status and task status, it is ensured that users can effectively issue automatic tasks even without paying attention to the device status, making the execution of scheduled tasks more flexible and adaptable, improving recoverability in the event of anomalies, and enhancing the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117806237B_ABST
    Figure CN117806237B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a timing task execution method, device, mobile device and storage medium. The method comprises: receiving a timing task, determining a start time and a forced end time of the timing task; when the start time of the timing task is reached, determining a time conflict task set based on the start time and the forced end time, wherein the time conflict task set comprises the timing task and tasks having overlapping execution time with the timing task; based on the current state of the execution terminal, performing task execution scheduling and sorting on each timing task in the time conflict task set, and executing each timing task after the scheduling and sorting. Embodiments of the present application make the execution of the timing task more flexible and adaptive, improve the recoverability in the case of abnormal occurrence, and improve the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of autonomous driving, and more particularly to a method, apparatus, mobile device, and storage medium for executing timed tasks. Background Technology

[0002] Scheduled tasks have been widely used in various industries. Users can freely set scheduled tasks in advance for some recurring tasks. For example, in a shopping mall environment, in order to keep the mall clean, automatic floor scrubbers can be set to automatically clean at night or in the early morning every day. When the time comes, the scheduled task will be executed automatically, which provides great convenience to users.

[0003] Scheduled tasks are typically created within the device in use and stored within the device itself. When the scheduled start time arrives, the task begins execution. Its characteristics include: tasks are usually simple and singular (e.g., the scheduled tasks of an automatic floor scrubber typically consist of cleaning tasks); the device has a storage function (automatic floor scrubbers can store scheduled tasks); and the device must remain powered on after a scheduled task is set.

[0004] In the process of realizing this invention, the inventors discovered at least the following problems in the related technology:

[0005] When setting up scheduled tasks, users typically assign tasks in advance, selecting the corresponding time and task based on their needs. Users usually don't consider whether the device's status affects the scheduled task execution (for example, if a user sets an automatic floor scrubber to clean a designated area at 5 PM at 10 AM, the user usually doesn't care (or even if they did, they wouldn't know accurately) whether the scrubber has enough energy to support the cleaning task at 5 PM; insufficient energy will cause task errors. Alternatively, multiple users may set up the same scheduled task for the automatic floor scrubber, leading to time conflicts). This can cause task conflicts or errors when setting up scheduled tasks, negatively impacting the user experience. Summary of the Invention

[0006] To at least address the problems in existing technologies where scheduled tasks conflict with other tasks, and where task execution terminals malfunction, negatively impacting user experience, the present invention provides a scheduled task execution method, applied to an execution terminal, comprising:

[0007] Receive a scheduled task and determine the start time and forced termination time of the scheduled task;

[0008] When the start time of the scheduled task is reached, a set of time-conflicting tasks is determined based on the start time and the forced termination time, wherein the set of time-conflicting tasks includes the scheduled task and tasks whose execution time overlaps with that of the scheduled task.

[0009] Based on the current state of the execution terminal, the timed tasks in the time conflict task set are sorted and executed.

[0010] In a second aspect, embodiments of the present invention provide a timed task execution device, comprising:

[0011] A scheduled task receiving module is used to receive scheduled tasks and determine the start time and forced termination time of the scheduled tasks.

[0012] A time conflict determination module is used to determine a set of time conflict tasks based on the start time and the forced termination time when the start time of the scheduled task is reached. The set of time conflict tasks includes the scheduled task and tasks whose execution time overlaps with that of the scheduled task.

[0013] The scheduling and execution module is used to sort the timed tasks in the time conflict task set based on the current state of the execution terminal, and then execute the sorted timed tasks.

[0014] Thirdly, an electronic device is provided, comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the steps of the timed task execution method of any embodiment of the present invention.

[0015] Fourthly, embodiments of the present invention provide a mobile device, including a main body and an electronic device according to any embodiment of the present invention mounted on the main body.

[0016] Fifthly, embodiments of the present invention provide a storage medium storing a computer program thereon, characterized in that, when the program is executed by a processor, it implements the steps of the timed task execution method of any embodiment of the present invention.

[0017] Sixthly, embodiments of the present invention also provide a computer program product, which, when run on a computer, causes the computer to execute the timed task execution method described in any one of the embodiments of the present invention.

[0018] The beneficial effects of this invention are as follows: by using an operating terminal to create scheduled tasks, the reliability and stability of scheduled task operations are increased; and by judging the device status and task status, it is ensured that users can effectively issue automatic tasks even without paying attention to the device status, making the execution of scheduled tasks more flexible and adaptable, improving recoverability in the event of anomalies, and enhancing the user experience. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a flowchart of a timed task execution method provided in an embodiment of the present invention;

[0021] Figure 2 This is a schematic diagram of the process for creating a scheduled task according to an embodiment of the present invention.

[0022] Figure 3 This is a schematic diagram of the startup process of a timed task in a timed task execution method provided by an embodiment of the present invention;

[0023] Figure 4 This is a schematic diagram of the timed task execution process of a timed task execution method provided in an embodiment of the present invention;

[0024] Figure 5 This is a schematic diagram of the structure of a timed task execution device according to an embodiment of the present invention;

[0025] Figure 6 This is a schematic diagram of an embodiment of an electronic device for executing timed tasks, provided by an embodiment of the present invention. Detailed Implementation

[0026] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0027] Those skilled in the art will recognize that embodiments of this application can be implemented as a system, apparatus, device, method, or computer program product. Therefore, this disclosure can be specifically implemented in the following forms: entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.

[0028] For ease of understanding, the technical terms used in this application are explained below:

[0029] The term "mobile device" as used in this application includes, but is not limited to, vehicles with L0-L5 autonomous driving technology levels as defined by the Society of Automotive Engineers International (SAE International) or the Chinese national standard "Classification of Driving Automation for Automobiles".

[0030] In some embodiments, the mobile device may be a vehicle or robot having various functions, such as:

[0031] (1) Passenger transport function, such as family cars, buses, etc.;

[0032] (2) Cargo carrying function, such as ordinary trucks, box trucks, trailers, enclosed trucks, tank trucks, flatbed trucks, container trucks, dump trucks, special structure trucks, etc.

[0033] (3) Tool functions, such as logistics delivery vehicles, automated guided vehicles (AGVs), patrol vehicles, cranes, hoists, excavators, bulldozers, loaders, road rollers, loaders, off-road engineering vehicles, armored engineering vehicles, sewage treatment vehicles, sanitation vehicles, vacuum trucks, floor scrubbers, water sprinkler trucks, sweeping robots, food delivery robots, shopping guide robots, lawnmowers, golf carts, etc.

[0034] (4) Entertainment functions, such as recreational vehicles, amusement park automatic driving devices, balance bikes, etc.;

[0035] (5) Special rescue functions, such as fire trucks, ambulances, power repair vehicles, and engineering emergency rescue vehicles.

[0036] like Figure 1 The diagram shows a flowchart of a timed task execution method according to an embodiment of the present invention, which includes the following steps:

[0037] S11: Receive the scheduled task and determine the start time and forced termination time of the scheduled task;

[0038] S12: When the start time of the scheduled task is reached, a set of time conflict tasks is determined based on the start time and the forced termination time, wherein the set of time conflict tasks includes the scheduled task and tasks whose execution time overlaps with that of the scheduled task.

[0039] S13: Based on the current state of the execution terminal, sort the timed tasks in the time conflict task set and execute the sorted timed tasks.

[0040] In this embodiment, the method can be applied to the execution terminals of various types of mobile devices, such as automatic floor scrubbers and delivery vehicles. Tasks can be issued to the execution terminals of automatic floor scrubbers and delivery vehicles using an operating terminal (e.g., a mobile phone or tablet) equipped with a control program. If the mobile device's execution terminal also has a screen, automatic tasks can be set by controlling the screen on the mobile device's execution terminal. However, as automatic tasks are executed, the mobile device will be traveling on the road, making it difficult to add new automatic tasks. Automatic tasks can be issued in real time via an operating terminal equipped with a control program.

[0041] For example, users can select a specific area on the terminal screen to control the automatic floor scrubber for cleaning. Users can also use the same method to set scheduled tasks for the automatic floor scrubber. Scheduled tasks are tasks set for the future, starting, proceeding, and terminating according to a specific time sequence. Compared to on-the-fly tasks, scheduled tasks are less time-sensitive. Examples include daily tasks (e.g., the daily cleaning of a shopping mall) or tasks with relatively low time requirements (e.g., delivery tasks where the automated voice system communicates with the user in advance, indicating "I'll be home this afternoon, I can deliver the package this afternoon," with the task execution time being "1 PM to 6 PM"). For more time-sensitive tasks, such as spilled drinks in a shopping mall, the automatic floor scrubber needs to be controlled immediately to clean them up.

[0042] For step S11, taking an automatic floor scrubber as an example, the user uses an operating terminal equipped with a control program at 9:00 AM to select a region and time to send a scheduled task to the automatic floor scrubber, for example, to clean the food area of ​​a shopping mall at 3:00 PM. After receiving the scheduled task, the automatic floor scrubber recognizes that the start time of the scheduled task is 3:00 PM.

[0043] As one implementation, the forced termination time is input by the user. If no user input is received for the forced termination time, the forced termination time is estimated based on the historical execution information of the timed task.

[0044] In this implementation, the mandatory end time is typically set by the user. For example, the user-issued task is to perform a cleaning operation on the shopping mall's food court from 3 PM to 5 PM. However, a mandatory end time of 5 PM does not mean the automatic floor scrubber will be in the food court from 3 PM to 5 PM. Assuming a cleaning operation on the food court only takes about one hour, if the user only sets the start time and not the mandatory end time, the historical cleaning time for a previous food court cleaning operation can be used as 1 hour and 10 minutes. Considering the potential impact of other tasks, the mandatory end time can be calculated automatically by the automatic floor scrubber, resulting in a mandatory end time of 5:10 PM.

[0045] Another user, using a terminal equipped with a control program, scheduled the cleaning of the children's play area to begin at 3:30 PM at 9:10 AM. The forced end time was determined to be 5:20 PM using the same method. At this point, a time conflict arose between the start time and the forced end time of the automatic task and other tasks. Considering user experience, service should still be provided even with this conflict. If there is no conflict, the terminal screen will display a message indicating successful task creation; if there is a conflict, the terminal screen will display a message indicating successful creation but a time conflict. The overall process for creating the aforementioned scheduled task is as follows: Figure 2 As shown, the start and end times of each scheduled task are determined.

[0046] For step S12, since users may issue new scheduled tasks at any time, if the execution scheduling order of each scheduled task is set in advance, it is very likely that it will be disrupted by newly issued scheduled tasks. Therefore, the set of time-conflicting tasks is only determined when the start time is reached, and tasks with overlapping execution times are counted into the set of time-conflicting tasks. For example, in the above scheduled tasks, the set of time-conflicting tasks is determined when 3 pm, and the set of time-conflicting tasks includes: a cleaning task of the shopping mall food area to be performed from 3 pm to 5 pm, and a cleaning task of the children's play area to be performed from 3:30 pm to 5:20 pm.

[0047] For step S13, when 3 PM arrives, the scheduled tasks in the time conflict task set are sorted and ordered according to the current status of the automatic floor scrubber. During the sorting, the tasks are ordered based on their start time to determine the order of execution. However, scheduled tasks may be interrupted by new tasks during execution; the scheduling for resuming tasks after interruption needs to be adjusted according to the status of the execution terminal.

[0048] As one implementation method, when the execution terminal is executing other tasks, the task execution scheduling order is adjusted based on the set task priority, and a timed task conflict prompt is sent to the operation terminal.

[0049] In this implementation, for example, at 3:30 PM, the automatic floor scrubber is performing its automatic cleaning task in the shopping mall's food area. At this time, the cleaning task for the children's play area is also activated at 3:30 PM. This can be determined based on a pre-set priority. For example, considering that the food area usually has many pedestrians and needs to be kept clean in real time, the food area cleaning task is set to a higher priority. The automatic cleaning task in the food area continues until it is completed, at which point the cleaning task for the children's play area begins. In terms of timing, the automatic cleaning task in the food area is completed between 3:00 PM and 4:10 PM. The cleaning of the children's play area is completed at 4:15 PM and finished at 5:15 PM, ensuring the stable and effective completion of cleaning tasks even in the event of timed task conflicts.

[0050] Considering children's greater need for a clean and hygienic environment, the cleaning task for the children's play area has a higher priority. Therefore, at 3:30 PM, the automatic cleaning task for the food area should be interrupted to perform the cleaning task for the children's play area. The vehicle should arrive at the children's play area at 3:35 PM, and the cleaning task for the children's play area should be completed between 3:35 PM and 4:35 PM. At this point, the automatic cleaning task for the food area should resume, and the vehicle should return to the food area at 4:40 PM. If the task is scheduled to end at 5:00 PM (the forced end time is 5:00 PM), the automatic cleaning task for the food area should be forcibly ended even if it is not yet complete. This ensures the stable execution of subsequent automatic tasks. If all automatic tasks are kept running indefinitely, the backlog of previous tasks may prevent subsequent automatic tasks from executing on time. Of course, interrupted automatic tasks are not necessarily permanently banned. The interrupted tasks can be communicated to the user, allowing them to decide whether to resume the automatic task for that area.

[0051] As one implementation method, when the execution terminal is idle, it executes each scheduled task sequentially according to the scheduling order;

[0052] When the execution terminal is in sleep mode, it receives a wake-up command periodically sent by the operation terminal. If the wake-up is successful, the timed task is executed. If the wake-up fails and the preset number of wake-up attempts is reached, the wake-up failure information is sent to the cloud and a prompt is displayed on the operation interface of the operation terminal.

[0053] When the execution terminal is unavailable, it sends an unavailability message to the cloud and displays a prompt on the operation interface of the operation terminal.

[0054] In this implementation, if the automatic floor scrubber is idle at 3 p.m. and the only time conflict task set contains the automatic cleaning task for the shopping mall's food area, then it can be executed directly.

[0055] If the automatic floor scrubber is in sleep mode, a wake-up command can be sent to it via an operating terminal equipped with the control program. If the wake-up is successful, a scheduled task will be executed. The operating terminal attempts to wake the scrubber every 5 minutes, up to a maximum of 3 times. If the wake-up fails, the terminal reports the scheduled task startup failure and the reason for the failure to the cloud, and also displays a corresponding prompt on the operating interface. This feedback to the cloud allows the developers of the automatic floor scrubber to collect relevant bug information for subsequent updates. When the operating terminal is unavailable, the terminal reports the scheduled task startup failure and the reason for the failure to the cloud, and also displays a corresponding prompt on the operating interface. The startup process for the above-mentioned scheduled task is as follows: Figure 3 As shown, the scheduled tasks are executed using the method described above.

[0056] Considering that the automated floor scrubbing vehicle received a new task while executing according to the above scheduling order, conflicting with the already determined task execution scheduling order, an execution exception occurred. As one implementation method, if an execution exception occurs during the execution of the current scheduled task, a determination is made, based on the type of execution exception and the mandatory termination time of the current scheduled task, whether to terminate the execution of the current scheduled task. The types of execution exceptions include: task execution scheduling conflict, execution terminal exception, and reaching the mandatory termination time.

[0057] Specifically, when the type of execution exception is a task execution scheduling conflict, determining whether to terminate the execution of the current scheduled task based on the type of execution exception and the forced termination time of the current scheduled task includes:

[0058] If a task scheduling conflict occurs during the execution of the current scheduled task, the execution of the temporary task is interrupted. If the temporary task is completed before the forced termination time is reached, the execution of the scheduled task is resumed.

[0059] When the type of execution exception is execution terminal exception, determining whether to terminate the execution of the current scheduled task based on the type of execution exception and the forced termination time of the current scheduled task includes:

[0060] When the current energy level of the execution terminal is abnormal, the task execution scheduling order is adjusted based on the location of the replenishment point and the forced termination time.

[0061] If the system of the execution terminal malfunctions and the task fails to be executed again within a preset number of attempts, the execution of the timed task will be forcibly terminated.

[0062] In this embodiment, when a new scheduled task is received during the execution of the previously scheduled task, such as a cleaning task for the clothing area from 4:10 PM to 6:00 PM, if the automatic floor scrubber reaches the start time of the newly received scheduled task at 4:00 PM according to the previously determined task execution schedule and a task execution scheduling conflict occurs, it is necessary to reorder the task execution according to the priority of each scheduled task. This is similar to the cleaning tasks for the children's play area and the food area mentioned above, and will not be described in detail here.

[0063] As mentioned earlier, scheduled tasks are less time-sensitive than on-demand tasks. For example, in a cleaning task, if a drink is spilled in an area, that area needs to be cleaned up more promptly, making the on-demand cleaning task for that area higher priority. In this case, the scheduled task is interrupted to execute the on-demand task. If the on-demand task completes before the mandatory termination time, the scheduled task resumes execution.

[0064] As one implementation, when the type of execution exception is an execution terminal exception, determining whether to terminate the execution of the current scheduled task based on the type of execution exception and the forced termination time of the current scheduled task includes:

[0065] When the current energy level of the execution terminal is abnormal, the task execution scheduling order is adjusted based on the location of the replenishment point and the forced termination time.

[0066] If the system of the execution terminal malfunctions and the task fails to be executed again within a preset number of attempts, the execution of the timed task will be forcibly terminated.

[0067] When the type of execution exception is reaching the forced termination time, the execution of the scheduled task is forcibly terminated when the forced termination time of the current scheduled task is reached during the execution of the current scheduled task.

[0068] In this embodiment, since the automatic floor scrubber performs the cleaning task, it requires a certain amount of energy such as water, electricity, and oil. For example, if the current energy level is abnormal (less than a preset threshold), it needs to go to a refueling station to replenish the energy. For the task execution scheduling and reordering of adding a refueling station, the current energy level can be used to determine how many automatic tasks can still be executed, the time to go to the refueling station, and the task execution scheduling and reordering can be readjusted according to the forced termination time set for the timed task.

[0069] If the automatic floor scrubber malfunctions (damaged wheels, brushes falling off, etc.), the scheduled task will be forcibly terminated for safety reasons.

[0070] After the scheduled task is completed, if it ends normally, report the quality of the scheduled task execution to the operating terminal and the cloud; if it ends abnormally, report the quality of the scheduled task execution and the reason for the abnormal termination to the operating terminal and the cloud.

[0071] As can be seen from this implementation method, using an operating terminal to create scheduled tasks increases the reliability and stability of scheduled task operations; and by judging the device status and task status, it ensures that users can effectively issue automatic tasks even when they do not need to pay attention to the device status, making the execution of scheduled tasks more flexible and adaptable, improving recoverability in the event of anomalies, and enhancing the user experience.

[0072] like Figure 5 The diagram shown is a schematic diagram of a timed task execution device provided in an embodiment of the present invention. The system can execute the timed task execution method described in any of the above embodiments and is configured in the terminal.

[0073] This embodiment provides a timed task execution device 10, which includes a timed task receiving module 11, a time conflict determination module 12, and a scheduling execution module 13.

[0074] The timed task receiving module 11 is used to receive timed tasks and determine the start time and forced termination time of the timed tasks; the time conflict determination module 12 is used to determine a set of time conflict tasks based on the start time and forced termination time when the start time of the timed task is reached, wherein the set of time conflict tasks includes the timed task and tasks whose execution time overlaps with the execution time of the timed task; the scheduling execution module 13 is used to sort the timed tasks in the set of time conflict tasks based on the current state of the execution terminal, and execute the sorted timed tasks.

[0075] Furthermore, the scheduling execution module is used for:

[0076] If an execution exception occurs during the execution of the current scheduled task, a determination is made as to whether to terminate the execution of the current scheduled task based on the type of execution exception and the forced termination time of the current scheduled task. The types of execution exception include: task execution scheduling conflict, execution terminal exception, and reaching the forced termination time.

[0077] Furthermore, the scheduling execution module is used for:

[0078] When the type of execution exception is task execution scheduling conflict, during the execution of each scheduled task after scheduling, if other scheduled tasks are received, and if a task execution scheduling conflict occurs when the start time of the other scheduled task is reached while the current scheduled task is being executed, the unfinished scheduled tasks in the time conflict task set and the other received scheduled tasks are sorted for task execution based on the set task priority.

[0079] Furthermore, the scheduling execution module is used for:

[0080] When the execution exception is classified as a task execution scheduling conflict, if a task execution scheduling conflict occurs during the execution of the current scheduled task, the execution of the temporary task is interrupted. If the temporary task is completed before the forced termination time is reached, the execution of the scheduled task is resumed.

[0081] Furthermore, the scheduling execution module is used for:

[0082] When the execution exception is classified as an execution terminal exception, and when the current energy level of the execution terminal is abnormal, the task execution scheduling order is adjusted based on the location of the replenishment point and the forced termination time.

[0083] If the system of the execution terminal malfunctions and the task fails to be executed again within a preset number of attempts, the execution of the timed task will be forcibly terminated.

[0084] Furthermore, the scheduling execution module is used for:

[0085] When the type of execution exception is reaching the forced termination time, the execution of the scheduled task is forcibly terminated when the forced termination time of the current scheduled task is reached during the execution of the current scheduled task.

[0086] Furthermore, the scheduling execution module is used for:

[0087] When the execution terminal is executing other tasks, the task execution scheduling order is adjusted based on the set task priority, and a timed task conflict prompt is sent to the operation terminal.

[0088] Furthermore, the scheduling execution module is used for:

[0089] When the execution terminal is idle, it executes the scheduled tasks sequentially according to the order of the schedule.

[0090] When the execution terminal is in sleep mode, it receives a wake-up command periodically sent by the operation terminal. If the wake-up is successful, the timed task is executed. If the wake-up fails and the preset number of wake-up attempts is reached, the wake-up failure information is sent to the cloud and a prompt is displayed on the operation interface of the operation terminal.

[0091] When the execution terminal is unavailable, it sends an unavailability message to the cloud and displays a prompt on the operation interface of the operation terminal.

[0092] This invention also provides a non-volatile computer storage medium storing computer-executable instructions that can execute the timed task execution method in any of the above method embodiments;

[0093] In one embodiment, the non-volatile computer storage medium of the present invention stores computer-executable instructions, which are configured as follows:

[0094] Receive a scheduled task and determine the start time and forced termination time of the scheduled task;

[0095] When the start time of the scheduled task is reached, a set of time-conflicting tasks is determined based on the start time and the forced termination time, wherein the set of time-conflicting tasks includes the scheduled task and tasks whose execution time overlaps with that of the scheduled task.

[0096] Based on the current state of the execution terminal, the timed tasks in the time conflict task set are sorted and executed.

[0097] As a non-volatile computer-readable storage medium, it can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules corresponding to the methods in the embodiments of the present invention. One or more program instructions are stored in the non-volatile computer-readable storage medium, and when executed by a processor, the timed task execution method in any of the above method embodiments is executed.

[0098] This invention also provides an electronic device, comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform a timed task execution method.

[0099] In some embodiments, the present invention also provides a mobile device, including a body and an electronic device according to any of the foregoing embodiments mounted on the body. The mobile device may be an unmanned vehicle, such as an unmanned sweeper, unmanned floor scrubber, unmanned logistics vehicle, unmanned passenger car, unmanned sanitation vehicle, unmanned minibus / bus, truck, mining truck, etc., or it may be a robot, etc.

[0100] In some embodiments, the present invention also provides a computer program product that, when the computer program product is run on a computer, causes the computer to execute the timed task execution method described in any one of the embodiments of the present invention.

[0101] Figure 6 This is a schematic diagram of the hardware structure of an electronic device for a timed task execution method according to another embodiment of this application, as shown below. Figure 6 As shown, the device includes:

[0102] One or more processors 610 and memory 620, Figure 6 Taking a processor 610 as an example, the device for the timed task execution method may also include an input device 630 and an output device 640.

[0103] The processor 610, memory 620, input device 630, and output device 640 can be connected via a bus or other means. Figure 6 Taking the example of a connection between China and Israel via a bus.

[0104] The memory 620, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules corresponding to the timed task execution method in the embodiments of this application. The processor 610 executes various functional applications and data processing of the server by running the non-volatile software programs, instructions, and modules stored in the memory 620, thereby implementing the timed task execution method in the above-described method embodiments.

[0105] The memory 620 may include a program storage area and a data storage area, wherein the program storage area may store the operating system and applications required for at least one function; the data storage area may store data, etc. Furthermore, the memory 620 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 620 may optionally include memory remotely located relative to the processor 610, and these remote memories can be connected to the mobile device via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0106] Input device 630 can receive input numerical or character information. Output device 640 may include display devices such as a display screen.

[0107] The one or more modules are stored in the memory 620, and when executed by the one or more processors 610, they execute the timed task execution method in any of the above method embodiments.

[0108] The above-described product can perform the methods provided in the embodiments of this application, and has the corresponding functional modules and beneficial effects for performing the methods. Technical details not described in detail in this embodiment can be found in the methods provided in the embodiments of this application.

[0109] Non-volatile computer-readable storage media may include a stored program area and a stored data area, wherein the stored program area may store an operating system and an application program required for at least one function; the stored data area may store data created based on the use of the device, etc. Furthermore, the non-volatile computer-readable storage medium may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, the non-volatile computer-readable storage medium may optionally include memory remotely located relative to the processor, and these remote memories may be connected to the device via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0110] This invention also provides an electronic device, comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the steps of the timed task execution method of any embodiment of this invention.

[0111] The electronic devices described in this application exist in various forms, including but not limited to:

[0112] (1) Mobile communication devices: These devices are characterized by their mobile communication capabilities and primarily aim to provide voice and data communication. These terminals include smartphones, multimedia phones, feature phones, and low-end phones.

[0113] (2) Ultra-mobile personal computer devices: These devices fall under the category of personal computers, possessing computing and processing capabilities, and generally also have mobile internet access features. These terminals include PDAs, MIDs, and UMPCs, such as tablet computers.

[0114] (3) Portable entertainment devices: These devices can display and play multimedia content. This category includes audio and video players, handheld game consoles, e-book readers, as well as smart toys and portable car navigation devices.

[0115] (4) Other mobile devices with data processing functions.

[0116] In this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, without necessarily requiring or implying any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising" or "including" include not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0117] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0118] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0119] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for executing a scheduled task, applied to an execution terminal, comprising: Receive a scheduled task and determine the start time and forced termination time of the scheduled task; When the start time of the scheduled task is reached, a set of time-conflicting tasks is determined based on the start time and the forced termination time, wherein the set of time-conflicting tasks includes the scheduled task and tasks whose execution time overlaps with that of the scheduled task. Based on the current state of the execution terminal, the timed tasks in the time conflict task set are sorted for execution. During the sorting process, the tasks are ordered according to their start time to determine the order of execution. When the execution terminal is executing other tasks, the task execution scheduling order is adjusted based on the set task priority, and a timed task conflict prompt is sent to the operation terminal. When the execution terminal is idle, it executes the scheduled tasks sequentially. When the execution terminal is in sleep mode, it receives a wake-up command periodically sent by the operation terminal. If the wake-up is successful, the timed task is executed. If the wake-up fails after a preset number of attempts, a wake-up failure message is sent to the cloud, and a prompt is displayed on the operation interface of the operation terminal. When the execution terminal becomes unavailable, an unavailability message is sent to the cloud, and a prompt is displayed on the operation interface of the terminal. Execute each scheduled task after it has been sorted.

2. The method according to claim 1, characterized in that, The execution of each scheduled task after scheduling includes: If an execution exception occurs during the execution of the current scheduled task, a determination is made as to whether to terminate the execution of the current scheduled task based on the type of execution exception and the forced termination time of the current scheduled task. The types of execution exception include: task execution scheduling conflict, execution terminal exception, and reaching the forced termination time.

3. The method according to claim 2, characterized in that, When the type of execution exception is a task execution scheduling conflict, determining whether to terminate the execution of the current scheduled task based on the type of execution exception and the forced termination time of the current scheduled task includes: During the execution of each scheduled task after scheduling, if other scheduled tasks are received, and if a task execution scheduling conflict occurs when the start time of the other scheduled task is reached while the current scheduled task is being executed, the unfinished scheduled tasks in the time conflict task set and the other received scheduled tasks are scheduled for execution based on the set task priority.

4. The method according to claim 2, characterized in that, When the type of execution exception is a task execution scheduling conflict, determining whether to terminate the execution of the current scheduled task based on the type of execution exception and the forced termination time of the current scheduled task includes: If a task scheduling conflict occurs during the execution of the current scheduled task, the execution of the temporary task is interrupted. If the temporary task is completed before the forced termination time is reached, the execution of the scheduled task is resumed.

5. The method according to claim 2, characterized in that, When the type of execution exception is execution terminal exception, determining whether to terminate the execution of the current scheduled task based on the type of execution exception and the forced termination time of the current scheduled task includes: When the current energy level of the execution terminal is abnormal, the task execution scheduling order is adjusted based on the location of the refueling point and the forced termination time. If the system of the execution terminal malfunctions and the task fails to be executed again within a preset number of attempts, the execution of the timed task will be forcibly terminated.

6. The method according to claim 2, characterized in that, When the type of the execution exception is reaching the forced termination time, determining whether to terminate the execution of the current scheduled task based on the type of the execution exception and the forced termination time of the current scheduled task includes: During the execution of the current scheduled task, when the forced termination time of the current scheduled task is reached, the execution of the scheduled task is forcibly terminated.

7. The method according to claim 1, characterized in that, The forced termination time is input by the user. If no user input is received for the forced termination time, the forced termination time is estimated based on the historical execution information of the scheduled task.

8. A timed task execution device, comprising: A scheduled task receiving module is used to receive scheduled tasks and determine the start time and forced termination time of the scheduled tasks. A time conflict determination module is used to determine a set of time conflict tasks based on the start time and the forced termination time when the start time of the scheduled task is reached. The set of time conflict tasks includes the scheduled task and tasks whose execution time overlaps with that of the scheduled task. The scheduling and execution module is used to sort and schedule the execution of each timed task in the time conflict task set based on the current state of the execution terminal. During scheduling and sorting, the tasks are ordered according to their start time to determine the order of execution. When the execution terminal is executing other tasks, the task execution scheduling order is adjusted based on the set task priority, and a timed task conflict prompt is sent to the operation terminal. When the execution terminal is idle, the timed tasks are executed sequentially according to the scheduling order. When the execution terminal is in sleep mode, it receives a wake-up command periodically sent by the operation terminal. If the wake-up is successful, the timed task is executed. If the wake-up fails after a preset number of attempts, a wake-up failure message is sent to the cloud, and a prompt is displayed on the operation interface of the operation terminal. When the execution terminal is unavailable, an unavailability message is sent to the cloud, and a prompt is displayed on the operation interface of the operation terminal. The timed tasks are then executed according to the scheduling order.

9. An electronic device, comprising: At least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the steps of the method according to any one of claims 1-7.

10. A mobile device comprising a body and an electronic device according to claim 9 mounted on the body.

11. A storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the steps of the method described in any one of claims 1-7.

Citation Information

Patent Citations

  • Intelligent home system and timed task conflict resolving method applied by same

    CN106597866A

  • Method and device for processing appointment conflicts, equipment and storage medium

    CN109780731A