Timing task creation method and device, medium and equipment

By building the target identification code in the timing task scheduling system and matching it with the historical identification code, the sharing of timing task instances is realized, and the high pressure problem of the task scheduler when dealing with a large number of the same timing tasks is solved, and the system efficiency is improved.

CN119473535APending Publication Date: 2025-02-18SHENZHEN TCL NEW-TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411490881.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-23
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

When the existing timing task scheduling system handles a large number of the same timing tasks, the task scheduler needs to frequently trigger scheduling instructions, resulting in high scheduling pressure and low efficiency.

Method used

By receiving a timed task creation request, key information in the instructions to be executed is extracted, the target identification code is constructed, and the historical identification code is matched in the task scheduler. If there is a matching history identification code, the target timing task is associated with the instance identification of the historical task instance to avoid repeated creation of the task instance.

Benefits of technology

It reduces multiple task instance callbacks when performing batch timing tasks, reduces scheduling pressure and improves system efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119473535A_ABST
    Figure CN119473535A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a timed task creation method and device, a medium and equipment, and the method comprises the steps: receiving a timed task creation request which carries a to-be-executed instruction; creating a target timed task according to the to-be-executed instruction; key information in the instruction to be executed is extracted, and a target identification code used for identifying a target timed task is constructed according to the key information; matching the target identification code with a historical identification code pre-stored in a task scheduler, wherein the historical identification code pre-creates a corresponding historical task instance; and if the historical identification code matched and consistent with the target identification code exists in the task scheduler, performing association mapping on the target timed task and an instance identifier of a historical task instance in the task scheduler. By utilizing the timed task creation method provided by the embodiment of the invention, a task scheduler does not need to retrieve task instances for multiple times when executing batch timed tasks, so that the scheduling pressure of the task scheduler is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to the field of scheduled task creation technology, and in particular to a scheduled task creation method, device, medium and equipment. Background Art

[0002] Most of the existing scheduled task scheduling systems separate task scheduling from task execution, that is, the server (task scheduler) is responsible for scheduling scheduled tasks, while the client (centralized management system) is responsible for executing scheduled tasks.

[0003] When a large number of users under the same centralized management system create the same scheduled task, such as "turn on the air conditioner at 8 o'clock in the morning", the traditional design will create a corresponding task instance for each scheduled task in the task scheduler. When the task scheduler detects the set trigger time of the scheduled task, the task scheduler will trigger a scheduling instruction for each scheduled task and notify the centralized management system to execute the scheduled task. Assuming there are 10,000 identical scheduled tasks, the task scheduler needs to trigger 10,000 scheduling instructions. This means that as the number of scheduled tasks increases, the scheduling pressure of the task scheduler will face major challenges. Summary of the invention

[0004] The embodiments of the present application provide a method, device, medium and equipment for creating a scheduled task. The method for creating a scheduled task provided by the embodiments of the present application is used to avoid the same task instance from being created repeatedly in large quantities, so that the task scheduler does not need to call the task instance multiple times when executing batch scheduled tasks, thereby reducing the pressure on the task scheduler.

[0005] The present application provides a method for creating a scheduled task, including:

[0006] Receive a scheduled task creation request, wherein the scheduled task creation request carries a to-be-executed instruction;

[0007] Create a target scheduled task according to the instructions to be executed;

[0008] Extracting key information from the instruction to be executed, and constructing a target identification code for identifying the target scheduled task according to the key information;

[0009] Matching the target identification code with a historical identification code pre-stored in the task scheduler, wherein the historical identification code has a corresponding historical task instance pre-created;

[0010] If there is a historical identification code in the task scheduler that matches the target identification code, the target scheduled task is associated and mapped with the instance identifier of the historical task instance in the task scheduler.

[0011] In the scheduled task creation method described in the embodiment of the present application, the key information includes one or more of the receiving object category of the instruction to be executed, the execution time of the instruction to be executed, and the execution frequency of the instruction to be executed;

[0012] The step of extracting key information from the instruction to be executed and constructing a target identification code for identifying the target scheduled task according to the key information includes:

[0013] The key information is hashed using a hash algorithm to obtain a hash value, and the hash value is used as a target identification code for the target scheduled task.

[0014] In the scheduled task creation method described in the embodiment of the present application, before receiving the scheduled task creation request, the method further includes:

[0015] In response to the scheduled task creation operation, an information entry interface is provided for the user to enter the to-be-executed instructions corresponding to the target scheduled task;

[0016] In response to a confirmation operation on the instruction to be executed, a scheduled task creation request is generated according to the instruction to be executed.

[0017] In the scheduled task creation method described in the embodiment of the present application, after matching the target identification code with the historical identification code pre-stored in the database, the method further includes:

[0018] If there is no historical identification code matching the target identification code in the task scheduler, creating a new task instance for the target scheduled task through the task scheduler;

[0019] The target scheduled task is associated and mapped with the instance identifier of the newly added task instance of the task scheduler.

[0020] In the scheduled task creation method described in the embodiment of the present application, after receiving the scheduled task creation request, the method further includes:

[0021] According to the scheduled task creation request, obtaining address information of a receiving object of the to-be-executed instruction;

[0022] The address information is associated and mapped with the target scheduled task.

[0023] In the scheduled task creation method described in the embodiment of the present application, after associating and mapping the target scheduled task with the historical task instance in the task scheduler, the method further includes:

[0024] When detecting the scheduled task execution instruction issued by the task scheduler, obtaining the instance identifier carried by the scheduled task execution instruction;

[0025] Determine the total number of target scheduled tasks corresponding to the instance identifier according to the instance identifier;

[0026] comparing the total number to a batch maximum threshold;

[0027] If the total number is less than or equal to the batch processing maximum threshold, the target scheduled tasks are executed in batches at the current processing node.

[0028] In the scheduled task creation method described in the embodiment of the present application, after comparing the total number with the batch processing maximum threshold, the method further includes:

[0029] If the total number is greater than the batch processing maximum threshold, the target scheduled tasks are processed in batches to obtain several batches of target scheduled tasks;

[0030] The batches of target scheduled tasks are distributed to a plurality of different sub-processing nodes for parallel execution.

[0031] Accordingly, another aspect of the embodiment of the present application further provides a scheduled task creation device, the scheduled task creation device comprising:

[0032] A request receiving module, used to receive a scheduled task creation request, wherein the scheduled task creation request carries a to-be-executed instruction;

[0033] A task creation module, used to create a target scheduled task according to the to-be-executed instruction;

[0034] A data construction module, used to extract key information from the instruction to be executed, and construct a target identification code for identifying the target timed task according to the key information;

[0035] A data matching module, used for matching the target identification code with a historical identification code pre-stored in the task scheduler, wherein the historical identification code has a corresponding historical task instance pre-created;

[0036] The first associating module is used to associate and map the target scheduled task with the instance identifier of the historical task instance in the task scheduler if there is a historical identification code in the task scheduler that matches the target identification code.

[0037] Correspondingly, another aspect of the embodiment of the present application further provides a storage medium, wherein the storage medium stores a plurality of instructions, wherein the instructions are suitable for loading by a processor to execute the scheduled task creation method as described above.

[0038] Correspondingly, on the other hand, an embodiment of the present application further provides an electronic device, including a processor and a memory, wherein the memory stores a plurality of instructions, and the processor loads the instructions to execute the scheduled task creation method as described above.

[0039] The embodiment of the present application provides a method, device, medium and equipment for creating a scheduled task. The method receives a scheduled task creation request, the scheduled task creation request carries a to-be-executed instruction; creates a target scheduled task according to the to-be-executed instruction; extracts key information from the to-be-executed instruction, and constructs a target identification code for identifying the target scheduled task according to the key information; matches the target identification code with a historical identification code pre-stored in a task scheduler, wherein the historical identification code pre-creates a corresponding historical task instance; if there is a historical identification code in the task scheduler that matches the target identification code, the target scheduled task is associated with the instance identifier of the historical task instance in the task scheduler. Mapping. Using the scheduled task creation method provided by the embodiment of the present application, by constructing the target identification code of the target scheduled task, and judging whether there is a historical task instance corresponding to the target identification code in the task scheduler, if there is, there is no need to recreate the task instance, and only needs to associate and map the target scheduled task with the instance identifier of the historical task instance in the task scheduler, so that the same task instance can be shared by multiple identical scheduled tasks, so that the task scheduler does not need to call the task instance multiple times when executing batch scheduled tasks, thereby reducing the scheduling pressure of the task scheduler. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application, and those skilled in the art can obtain other drawings based on these drawings without creative work.

[0041] Figure 1 A flowchart of a method for creating a scheduled task provided in an embodiment of the present application.

[0042] Figure 2 Another flowchart of the method for creating a scheduled task provided in an embodiment of the present application.

[0043] Figure 3 Another flowchart of the method for creating a scheduled task provided in an embodiment of the present application.

[0044] Figure 4 A schematic diagram of the structure of a scheduled task creation device provided in an embodiment of the present application.

[0045] Figure 5Another structural diagram of the scheduled task creation device provided in an embodiment of the present application.

[0046] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0047] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0048] An embodiment of the present application provides a method for creating a scheduled task. The method constructs a target identification code for a target scheduled task and determines whether there is a historical task instance corresponding to the target identification code in the task scheduler. If so, there is no need to recreate the task instance. Instead, the target scheduled task needs to be associated with the instance identifier of the historical task instance in the task scheduler and mapped, so that the same task instance can be shared by multiple identical scheduled tasks. This eliminates the need for the task scheduler to call up the task instance multiple times when executing batch scheduled tasks, thereby reducing the scheduling pressure on the task scheduler.

[0049] The term "and / or" in this application can be a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this application generally indicates that the associated objects before and after are in an "or" relationship.

[0050] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described here can be implemented in an order other than that illustrated or described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or modules is not necessarily limited to the steps or modules clearly listed, but may include other steps or modules that are not clearly listed or inherent to these processes, methods, products or devices. The naming or numbering of steps in this application does not mean that the steps in the method flow must be executed in the time / logical sequence indicated by the naming or numbering. The process steps that have been named or numbered can change the execution order according to the technical purpose to be achieved, as long as the same or similar technical effects can be achieved. The division of modules in this application is a logical division. There may be other division methods when it is implemented in actual applications. For example, multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection between modules can be electrical or other similar forms, which are not limited in this application. In addition, the modules or submodules described as separate components may or may not be physically separated, may or may not be physical modules, or may be distributed in multiple circuit modules, and some or all of the modules may be selected according to actual needs to achieve the purpose of the present application.

[0051] The scheduled task creation method involved in the embodiment of the present application is mainly applied to electronic devices, which may be smart phones, tablet computers, laptop computers, desktop computers, smart home appliances and servers, etc., which are not limited here. Optionally, the server may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or an IoT cloud (Internet of Things cloud) that provides the ability to store, process and manage data generated by IoT devices, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and basic cloud computing services such as big data and artificial intelligence platforms, which are not limited here.

[0052] For ease of understanding, the specific process in the embodiments of the present application is described below. Figure 1 , Figure 1A flowchart of an embodiment of a method for creating a scheduled task provided in an embodiment of the present application.

[0053] exist Figure 1 In the illustrated embodiment, the method may include the following steps:

[0054] S101, receiving a scheduled task creation request, wherein the scheduled task creation request carries instructions to be executed.

[0055] In this embodiment, the scheduled task creation request may carry a to-be-executed instruction. The to-be-executed instruction may be a set of all actions required to be executed by the receiving object (e.g., a device or system) of the to-be-executed instruction. In some embodiments, the to-be-executed instruction may be "turn on the air conditioner at 8 o'clock every morning."

[0056] In an application scenario, 1,000 students in the same school can bind their mobile phones to the same centralized management system, and the centralized management system will uniformly process the scheduled task creation requests of the 1,000 students.

[0057] S102: Create a target scheduled task according to the instruction to be executed.

[0058] In some embodiments, a scheduled task tool (such as cron, systemd, Quartz, etc.) can be used, and a target scheduled task can be created based on the instruction to be executed. For example, if the instruction to be executed is "turn on the air conditioner at 8 o'clock every morning", the action information "turn on", the time information "8 o'clock every morning" and other information "air conditioner" in the instruction to be executed are first extracted. Create a target scheduled task based on the action information, time information and other information through a scheduled task tool (such as cron, systemd-timer, Quartz, etc.), and then configure the created target scheduled task to the task scheduler. For cron, it has its own cron daemon, and for systemd, tasks may be added to one or more timers unit files. Quartz may add tasks to its internal task queue.

[0059] It should be explained that the task scheduler (such as cron daemon, systemd's timers service, QuartzScheduler) will periodically check its internal task list to determine whether there are scheduled tasks that meet the triggering conditions. When the task scheduler detects that the triggering conditions of the scheduled task are met, the task scheduler will send the scheduled task to the centralized management system, which will execute the scheduled task.

[0060] S103, extracting key information from the instruction to be executed, and constructing a target identification code for identifying the target scheduled task according to the key information.

[0061] In this embodiment, the key information of the instruction to be executed may be one or more of the category of the receiving object of the instruction to be executed, the execution time of the instruction to be executed, and the execution frequency of the instruction to be executed.

[0062] In some embodiments, the key information of the instruction to be executed may be the category of the receiving object of the instruction to be executed: "air conditioner", "refrigerator"; the execution time of the instruction to be executed: "eight o'clock in the morning"; the execution frequency of the instruction to be executed: "every day" and other information.

[0063] In some embodiments, the key information can be hashed through a hash algorithm to obtain a hash value, and the hash value is used as a target identification code to identify the target timed task. Since the hash value is usually unique, even a small data change will result in a huge difference in the hash value. Therefore, the hash value can be used as a unique identifier to distinguish different timed tasks.

[0064] S104, matching the target identification code with a historical identification code pre-stored in the task scheduler, wherein the historical identification code has a corresponding historical task instance pre-created.

[0065] It needs to be explained that in a distributed task scheduling system, when the task scheduler detects that the trigger condition of a scheduled task is met, it will load the task instance (job instance) corresponding to the scheduled task, and generate a scheduled task execution request carrying the instance identifier of the task instance and send it to the centralized management system. The centralized management system will execute the scheduled task corresponding to the instance identifier based on the instance identifier.

[0066] In this embodiment, by checking whether there is a historical identification code that matches the target identification code in the task scheduler, it is determined whether there is a pre-created task instance corresponding to the target scheduled task in the task scheduler. If it is determined that there is, there is no need to repeatedly create a new task instance, and the existing historical task instance can be directly reused. This avoids the task scheduler from performing multiple call operations on the task instance when it is subsequently detected that multiple identical scheduled tasks meet the trigger conditions, thereby increasing the pressure on the task scheduler.

[0067] S105: If there is a historical identification code in the task scheduler that matches the target identification code, the target scheduled task is associated and mapped with the instance identifier of the historical task instance in the task scheduler.

[0068] In this embodiment, when it is determined that there is a historical identification code in the database that matches the target identification code, there is no need to recreate the task instance. It is only necessary to associate and map the target scheduled task with the instance identifier of the historical task instance in the task scheduler to achieve the same task instance being shared by multiple identical scheduled tasks. This allows the task scheduler to avoid having to call up the task instance multiple times when executing batch scheduled tasks, thereby reducing the scheduling pressure on the task scheduler.

[0069] In some embodiments, before receiving the scheduled task creation request, the method further includes:

[0070] In response to the scheduled task creation operation, an information entry interface is provided for the user to enter the to-be-executed instructions corresponding to the target scheduled task;

[0071] In response to a confirmation operation on the instruction to be executed, a scheduled task creation request is generated according to the instruction to be executed.

[0072] In this embodiment, the user can initiate a scheduled task creation operation to the centralized management system through a mobile terminal (such as a mobile phone) to obtain an information entry interface. The user can configure the instructions to be executed in the information entry interface. After configuring the instructions to be executed, the user can click the confirmation submission button included in the information entry interface to initiate a confirmation operation to generate a scheduled task creation request and send it to the centralized management system.

[0073] In some embodiments, after matching the target identification code with the historical identification codes pre-stored in the database, the method further comprises:

[0074] If there is no historical identification code matching the target identification code in the task scheduler, creating a new task instance for the target scheduled task through the task scheduler;

[0075] The target scheduled task is associated and mapped with the instance identifier of the newly added task instance of the task scheduler.

[0076] In this embodiment, if Figure 2 As shown, if it is detected that there is no historical identification code matching the target identification code in the database, it means that no task instance of the same scheduled task has been created in the task scheduler. Then, according to the normal process, a new task instance is created for the target scheduled task through the task scheduler, and the target scheduled task is associated with the instance identifier of the new task instance of the task scheduler and mapped.

[0077] In some embodiments, after receiving the scheduled task creation request, the method further includes:

[0078] According to the scheduled task creation request, obtaining address information of a receiving object of the to-be-executed instruction;

[0079] The address information is associated and mapped with the target scheduled task.

[0080] In this embodiment, by associating and mapping the address information of the receiving object (such as the IP address) with the target scheduled task, the subsequent centralized management system can directionally control different receiving objects (such as air conditioners) to perform corresponding operations (such as turning on the cooling mode) when executing batch target scheduled tasks.

[0081] In some embodiments, after associating and mapping the target scheduled task with the historical task instance in the task scheduler, the method further includes:

[0082] When detecting the scheduled task execution instruction issued by the task scheduler, obtaining the instance identifier carried by the scheduled task execution instruction;

[0083] Determine the total number of target scheduled tasks corresponding to the instance identifier according to the instance identifier;

[0084] comparing the total number to a batch maximum threshold;

[0085] If the total number is less than or equal to the batch processing maximum threshold, the target scheduled tasks are executed in batches at the current processing node.

[0086] In this embodiment, if Figure 3 As shown, when the task scheduler detects that the scheduled task meets the trigger condition, it loads the task instance corresponding to the scheduled task and generates a scheduled task execution request, which is received by the centralized management system. The centralized management system identifies the instance identifier carried by the scheduled task execution request, queries whether there is a target scheduled task associated with the instance identifier, and determines the total number of target scheduled tasks corresponding to the instance identifier. The total number is compared with the maximum batch processing threshold set by the current processing node of the centralized management system. If the total number is less than or equal to the maximum batch processing threshold, the target scheduled tasks are executed in batches at the current processing node to realize batch processing of multiple identical scheduled tasks. In this process, the task scheduler only triggers the task instance retrieval operation once, which greatly reduces the retrieval pressure of the task scheduler.

[0087] In some embodiments, after comparing the total number with a batch maximum threshold, the method further comprises:

[0088] If the total number is greater than the batch processing maximum threshold, the target scheduled tasks are processed in batches to obtain several batches of target scheduled tasks;

[0089] The batches of target scheduled tasks are distributed to a plurality of different sub-processing nodes for parallel execution.

[0090] In this embodiment, if Figure 3 As shown, if the total number of scheduled tasks that need to be batch processed is greater than the maximum batch processing threshold of the current processing node, the target scheduled tasks can be processed in batches to obtain several batches of target scheduled tasks, and then the several batches of target scheduled tasks can be distributed to multiple different sub-processing nodes for parallel execution, thereby dispersing the processing pressure of a single processing node and realizing batch processing of multiple identical scheduled tasks.

[0091] In some embodiments, several batches of target scheduled tasks can be distributed to RabbitMQ, and the execution of scheduled tasks can be performed by RABBIT MQ agent, so as to realize dynamic distribution and multi-node consumption of scheduled tasks. RabbitMQ is an open source message broker and queue server that allows applications to communicate and transmit data in a flexible way.

[0092] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.

[0093] In specific implementation, the present application is not limited by the execution order of the various steps described. If no conflict occurs, some steps can be performed in other orders or simultaneously.

[0094] As can be seen from the above, the method for creating a scheduled task provided by the embodiment of the present application receives a scheduled task creation request, the scheduled task creation request carries a to-be-executed instruction; extracts key information from the to-be-executed instruction, and constructs a target identification code for identifying the target scheduled task according to the key information; matches the target identification code with a historical identification code pre-stored in the task scheduler, wherein the historical identification code pre-creates a corresponding historical task instance; if there is a historical identification code in the task scheduler that matches the target identification code, the target scheduled task is associated with the instance identifier of the historical task instance in the task scheduler. Mapping. Using the method for creating a scheduled task provided by the embodiment of the present application, by constructing the target identification code of the target scheduled task, and judging whether there is a historical task instance corresponding to the target identification code in the task scheduler, if there is, there is no need to recreate the task instance, and only needs to associate and map the target scheduled task with the instance identifier of the historical task instance in the task scheduler, so that the same task instance can be shared by multiple identical scheduled tasks, so that the task scheduler does not need to call the task instance multiple times when executing batch scheduled tasks, thereby reducing the scheduling pressure of the task scheduler.

[0095] The embodiment of the present application also provides a scheduled task creation device, which can be integrated into an electronic device.

[0096] See also Figure 4 , Figure 4 A schematic diagram of the structure of a scheduled task creation device provided in an embodiment of the present application. The scheduled task creation device 30 may include:

[0097] A request receiving module 31 is used to receive a scheduled task creation request, wherein the scheduled task creation request carries a to-be-executed instruction;

[0098] A task creation module 32, used to create a target scheduled task according to the to-be-executed instruction;

[0099] A data construction module 33 is used to extract key information from the instruction to be executed, and construct a target identification code for identifying the target timed task according to the key information;

[0100] A data matching module 34, used to match the target identification code with a historical identification code pre-stored in the task scheduler, wherein the historical identification code has a corresponding historical task instance pre-created;

[0101] The first associating module 35 is used to associate and map the target scheduled task with the instance identifier of the historical task instance in the task scheduler if there is a historical identification code matching the target identification code in the task scheduler.

[0102] In some embodiments, the key information includes one or more of the receiving object category of the instruction to be executed, the execution time of the instruction to be executed, and the execution frequency of the instruction to be executed; the data construction module 33 is used to perform hash calculation on the key information through a hash algorithm to obtain a hash value, and use the hash value as the target identification code of the target scheduled task.

[0103] In some embodiments, the device also includes a response module for providing an information entry interface in response to a scheduled task creation operation for a user to enter instructions to be executed corresponding to the target scheduled task; in response to a confirmation operation on the instructions to be executed, generating a scheduled task creation request based on the instructions to be executed.

[0104] In some embodiments, the device also includes a new module for creating a new task instance for the target scheduled task through the task scheduler if there is no historical identification code matching the target identification code in the task scheduler; and associating and mapping the target scheduled task with the instance identifier of the new task instance of the task scheduler.

[0105] In some embodiments, the device further includes a second associating module, which is used to obtain address information of a receiving object of the to-be-executed instruction according to the scheduled task creation request; and associate and map the address information with the target scheduled task.

[0106] In some embodiments, the device also includes a first execution module, which is used to obtain the instance identifier carried by the scheduled task execution instruction issued by the task scheduler when the scheduled task execution instruction is detected; determine the total number of target scheduled tasks corresponding to the instance identifier based on the instance identifier; compare the total number with the batch processing maximum threshold; if the total number is less than or equal to the batch processing maximum threshold, batch execute the target scheduled tasks at the current processing node.

[0107] In some embodiments, the device also includes a second execution module, which is used to batch process the target scheduled tasks to obtain several batches of target scheduled tasks if the total number is greater than the batch processing maximum threshold; and distribute the several batches of target scheduled tasks to multiple different sub-processing nodes for parallel execution.

[0108] In specific implementation, the above modules can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same entity or several entities.

[0109] As can be seen from the above, the scheduled task creation device 30 provided by the embodiment of the present application, wherein the request receiving module 31 is used to receive a scheduled task creation request, and the scheduled task creation request carries a to-be-executed instruction; the task creation module 32 is used to create a target scheduled task according to the to-be-executed instruction; the data construction module 33 is used to extract key information in the to-be-executed instruction, and construct a target identification code for identifying the target scheduled task according to the key information; the data matching module 34 is used to match the target identification code with a historical identification code pre-stored in the task scheduler, wherein the historical identification code is pre-created with a corresponding historical task instance; the first association module 35 is used to associate and map the target scheduled task with the instance identifier of the historical task instance in the task scheduler if there is a historical identification code in the task scheduler that matches the target identification code.

[0110] See also Figure 5 , Figure 5Another structural diagram of a scheduled task creation device provided in an embodiment of the present application, the scheduled task creation device 30 includes a memory 120, one or more processors 180, and one or more applications, wherein the one or more applications are stored in the memory 120 and configured to be executed by the processor 180; the processor 180 may include a request receiving module 31, a task creation module 32, a data construction module 33, a data matching module 34, and a first association module 35. For example, the structure and connection relationship of the above components may be as follows:

[0111] The memory 120 can be used to store applications and data. The applications stored in the memory 120 include executable codes. The applications can be composed of various functional modules. The processor 180 executes various functional applications and data processing by running the applications stored in the memory 120. In addition, the memory 120 may include a high-speed random access memory and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 120 may also include a memory controller to provide the processor 180 with access to the memory 120.

[0112] The processor 180 is the control center of the device, and uses various interfaces and lines to connect various parts of the entire terminal, and executes various functions of the device and processes data by running or executing applications stored in the memory 120, and calling data stored in the memory 120, so as to monitor the device as a whole. Optionally, the processor 180 may include one or more processing cores; preferably, the processor 180 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs.

[0113] Specifically in this embodiment, the processor 180 will load the executable code corresponding to the process of one or more applications into the memory 120 according to the following instructions, and the processor 180 will run the application stored in the memory 120 to implement various functions:

[0114] Request receiving instruction, used to receive a scheduled task creation request, wherein the scheduled task creation request carries instructions to be executed;

[0115] A task creation instruction, used to create a target scheduled task according to the instruction to be executed;

[0116] A data construction instruction, used to extract key information from the instruction to be executed, and to construct a target identification code for identifying the target timed task according to the key information;

[0117] A data matching instruction, for matching the target identification code with a historical identification code pre-stored in the task scheduler, wherein the historical identification code has a corresponding historical task instance pre-created;

[0118] The first association instruction is used to associate and map the target scheduled task with the instance identifier of the historical task instance in the task scheduler if there is a historical identification code in the task scheduler that matches the target identification code.

[0119] In some embodiments, the key information includes one or more of the category of the receiving object of the instruction to be executed, the execution time of the instruction to be executed, and the execution frequency of the instruction to be executed; the creation instruction is used to perform hash calculation on the key information through a hash algorithm to obtain a hash value, and use the hash value as the target identification code of the target scheduled task.

[0120] In some embodiments, the program also includes response instructions for responding to a scheduled task creation operation, providing an information entry interface for a user to enter instructions to be executed corresponding to the target scheduled task; in response to a confirmation operation for the instructions to be executed, generating a scheduled task creation request based on the instructions to be executed.

[0121] In some embodiments, the program also includes new instructions for creating a new task instance for the target scheduled task through the task scheduler if there is no historical identification code matching the target identification code in the task scheduler; and associating and mapping the target scheduled task with the instance identifier of the new task instance of the task scheduler.

[0122] In some embodiments, the program further includes a second association instruction for obtaining address information of a receiving object of the to-be-executed instruction according to the scheduled task creation request; and associating and mapping the address information with the target scheduled task.

[0123] In some embodiments, the program also includes a first execution instruction, which is used to obtain the instance identifier carried by the scheduled task execution instruction issued by the task scheduler when the scheduled task execution instruction is detected; determine the total number of target scheduled tasks corresponding to the instance identifier based on the instance identifier; compare the total number with the batch processing maximum threshold; if the total number is less than or equal to the batch processing maximum threshold, batch execute the target scheduled tasks at the current processing node.

[0124] In some embodiments, the program also includes a second execution instruction, which is used to batch process the target scheduled tasks to obtain several batches of target scheduled tasks if the total number is greater than the batch processing maximum threshold; and distribute the several batches of target scheduled tasks to multiple different sub-processing nodes for parallel execution.

[0125] The present application also provides an electronic device. Figure 6 , Figure 6 The electronic device 1200 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application, and the electronic device can be used to implement the method for creating a scheduled task provided in the above embodiment. The electronic device 1200 can be a smart phone or a tablet computer.

[0126] like Figure 6 As shown, the electronic device 1200 may include an RF (Radio Frequency) circuit 110, a memory 120 including one or more (only one is shown in the figure) computer-readable storage media, an input unit 130, a display unit 140, a sensor 150, an audio circuit 160, a transmission module 170, a processor 180 including one or more (only one is shown in the figure) processing cores, and a power supply 190. Those skilled in the art will understand that Figure 6 The structure of the electronic device 1200 shown in the figure does not constitute a limitation on the electronic device 1200, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0127] The RF circuit 110 is used to receive and send electromagnetic waves, realize the mutual conversion between electromagnetic waves and electrical signals, and thus communicate with a communication network or other devices. The RF circuit 110 may include various existing circuit elements for performing these functions, such as an antenna, a radio frequency transceiver, a digital signal processor, an encryption / decryption chip, a user identity module (SIM) card, a memory, etc. The RF circuit 110 can communicate with various networks such as the Internet, an intranet, a wireless network, or communicate with other devices through a wireless network.

[0128] The memory 120 can be used to store software programs and modules, such as the program instructions / modules corresponding to the method for creating a scheduled task in the above-mentioned embodiment. The processor 180 executes various functional applications and data processing by running the software programs and modules stored in the memory 120. The vibration reminder mode can be automatically selected according to the current scene of the electronic device to create a scheduled task, which can not only ensure that scenes such as meetings are not disturbed, but also ensure that users can perceive incoming calls, thereby improving the intelligence of the electronic device. The memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 120 may further include a memory remotely arranged relative to the processor 180, and these remote memories may be connected to the electronic device 1200 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0129] The input unit 130 can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. Specifically, the input unit 130 may include a touch-sensitive surface 131 and other input devices 132. The touch-sensitive surface 131, also known as a touch display screen or a touch pad, can collect the user's touch operations on or near it (such as the user's operation on or near the touch-sensitive surface 131 using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a pre-set program. Optionally, the touch-sensitive surface 131 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into touch point coordinates, and then sends it to the processor 180, and can receive and execute commands sent by the processor 180. In addition, the touch-sensitive surface 131 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch-sensitive surface 131, the input unit 130 may further include other input devices 132. Specifically, the other input devices 132 may include, but are not limited to, one or more of a physical keyboard, a function key (such as a volume control key, a switch key, etc.), a trackball, a mouse, a joystick, and the like.

[0130] The display unit 140 can be used to display information input by the user or information provided to the user and various graphical user interfaces of the electronic device 1200, which can be composed of graphics, text, icons, videos and any combination thereof. The display unit 140 may include a display panel 141. Optionally, the display panel 141 may be configured in the form of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), etc. Further, the touch-sensitive surface 131 may cover the display panel 141. When the touch-sensitive surface 131 detects a touch operation on or near it, it is transmitted to the processor 180 to determine the type of touch event. Subsequently, the processor 180 provides corresponding visual output on the display panel 141 according to the type of touch event. Although in Figure 6 In the embodiment, the touch-sensitive surface 131 and the display panel 141 are implemented as two independent components to realize the input and output functions. However, in some embodiments, the touch-sensitive surface 131 and the display panel 141 can be integrated to realize the input and output functions.

[0131] The electronic device 1200 may also include at least one sensor 150, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 141 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 141 and / or the backlight when the electronic device 1200 is moved to the ear. As a type of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that can also be configured in the electronic device 1200, they will not be repeated here.

[0132] The audio circuit 160, the speaker 161, and the microphone 162 can provide an audio interface between the user and the electronic device 1200. The audio circuit 160 can transmit the received audio data to the speaker 161 after converting the received audio data into an electrical signal, which is converted into a sound signal for output by the speaker 161; on the other hand, the microphone 162 converts the collected sound signal into an electrical signal, which is received by the audio circuit 160 and converted into audio data, and then the audio data is processed by the output processor 180, and then sent to another terminal through the RF circuit 110, or the audio data is output to the memory 120 for further processing. The audio circuit 160 may also include an earplug jack to provide communication between an external headset and the electronic device 1200.

[0133] The electronic device 1200 can help users send and receive emails, browse web pages, and access streaming media through the transmission module 170 (such as a Wi-Fi module), which provides users with wireless broadband Internet access. Figure 6 The transmission module 170 is shown, but it is understandable that it is not an essential component of the electronic device 1200 and can be omitted as needed without changing the essence of the invention.

[0134] The processor 180 is the control center of the electronic device 1200. It uses various interfaces and lines to connect various parts of the entire mobile phone. By running or executing software programs and / or modules stored in the memory 120, and calling data stored in the memory 120, it executes various functions of the electronic device 1200 and processes data, thereby monitoring the mobile phone as a whole. Optionally, the processor 180 may include one or more processing cores; in some embodiments, the processor 180 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 180.

[0135] The electronic device 1200 also includes a power supply 190 for supplying power to various components. In some embodiments, the power supply can be logically connected to the processor 180 through a power management system, so that the power management system can realize functions such as managing discharge and power consumption. The power supply 190 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.

[0136] Although not shown, the electronic device 1200 may also include a camera (such as a front camera, a rear camera), a Bluetooth module, etc., which will not be described in detail here. Specifically in this embodiment, the display unit 140 of the electronic device 1200 is a touch screen display, and the electronic device 1200 also includes a memory 120, and one or more programs, wherein one or more programs are stored in the memory 120, and are configured to be executed by one or more processors 180. One or more programs include instructions for performing the following operations:

[0137] Request receiving instruction, used to receive a scheduled task creation request, wherein the scheduled task creation request carries instructions to be executed;

[0138] A task creation instruction, used to create a target scheduled task according to the instruction to be executed;

[0139] A data construction instruction, used to extract key information from the instruction to be executed, and to construct a target identification code for identifying the target timed task according to the key information;

[0140] A data matching instruction, for matching the target identification code with a historical identification code pre-stored in the task scheduler, wherein the historical identification code has a corresponding historical task instance pre-created;

[0141] The first association instruction is used to associate and map the target scheduled task with the instance identifier of the historical task instance in the task scheduler if there is a historical identification code in the task scheduler that matches the target identification code.

[0142] In some embodiments, the key information includes one or more of the category of the receiving object of the instruction to be executed, the execution time of the instruction to be executed, and the execution frequency of the instruction to be executed; the creation instruction is used to perform hash calculation on the key information through a hash algorithm to obtain a hash value, and use the hash value as the target identification code of the target scheduled task.

[0143] In some embodiments, the program also includes response instructions for responding to a scheduled task creation operation, providing an information entry interface for a user to enter instructions to be executed corresponding to the target scheduled task; in response to a confirmation operation for the instructions to be executed, generating a scheduled task creation request based on the instructions to be executed.

[0144] In some embodiments, the program also includes new instructions for creating a new task instance for the target scheduled task through the task scheduler if there is no historical identification code matching the target identification code in the task scheduler; and associating and mapping the target scheduled task with the instance identifier of the new task instance of the task scheduler.

[0145] In some embodiments, the program further includes a second association instruction for obtaining address information of a receiving object of the to-be-executed instruction according to the scheduled task creation request; and associating and mapping the address information with the target scheduled task.

[0146] In some embodiments, the program also includes a first execution instruction, which is used to obtain the instance identifier carried by the scheduled task execution instruction issued by the task scheduler when the scheduled task execution instruction is detected; determine the total number of target scheduled tasks corresponding to the instance identifier based on the instance identifier; compare the total number with the batch processing maximum threshold; if the total number is less than or equal to the batch processing maximum threshold, batch execute the target scheduled tasks at the current processing node.

[0147] In some embodiments, the program also includes a second execution instruction, which is used to batch process the target scheduled tasks to obtain several batches of target scheduled tasks if the total number is greater than the batch processing maximum threshold; and distribute the several batches of target scheduled tasks to multiple different sub-processing nodes for parallel execution.

[0148] The embodiment of the present application also provides an electronic device, which may be a smart phone, a computer or other device.

[0149] As can be seen from the above, the embodiment of the present application provides an electronic device 1200, and the electronic device 1200 performs the following steps:

[0150] Receive a scheduled task creation request, wherein the scheduled task creation request carries a to-be-executed instruction;

[0151] Create a target scheduled task according to the instructions to be executed;

[0152] Extracting key information from the instruction to be executed, and constructing a target identification code for identifying the target scheduled task according to the key information;

[0153] Matching the target identification code with a historical identification code pre-stored in the task scheduler, wherein the historical identification code has a corresponding historical task instance pre-created;

[0154] If there is a historical identification code in the task scheduler that matches the target identification code, the target scheduled task is associated and mapped with the instance identifier of the historical task instance in the task scheduler.

[0155] An embodiment of the present application further provides a storage medium, in which a computer program is stored. When the computer program runs on a computer, the computer executes the scheduled task creation method described in any of the above embodiments.

[0156] It should be noted that, for the method for creating a scheduled task described in the present application, ordinary testers in the field can understand that all or part of the process of implementing the method for creating a scheduled task described in the embodiment of the present application can be completed by controlling the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, such as a memory of an electronic device, and executed by at least one processor in the electronic device, and the execution process may include the process of the embodiment of the method for creating a scheduled task. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), etc.

[0157] For the timed task creation device of the embodiment of the present application, each functional module can be integrated into a processing chip, or each module can exist physically separately, or two or more modules can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium, such as a read-only memory, a disk or an optical disk.

[0158] The above is a detailed introduction to the scheduled task creation method, device, medium and equipment provided in the embodiments of the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core ideas of the present application; at the same time, for those skilled in the art, according to the ideas of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for creating a scheduled task, characterized in that: include: Receive a scheduled task creation request, wherein the scheduled task creation request carries a to-be-executed instruction; Create a target scheduled task according to the instructions to be executed; Extracting key information from the instruction to be executed, and constructing a target identification code for identifying the target scheduled task according to the key information; Matching the target identification code with a historical identification code pre-stored in the task scheduler, wherein the historical identification code has a corresponding historical task instance pre-created; If there is a historical identification code in the task scheduler that matches the target identification code, the target scheduled task is associated and mapped with the instance identifier of the historical task instance in the task scheduler.

2. The method for creating a scheduled task according to claim 1, characterized in that: The key information includes one or more of the category of the recipient of the instruction to be executed, the execution time of the instruction to be executed, and the execution frequency of the instruction to be executed; The step of constructing a target identification code for identifying the target timed task according to the key information includes: The key information is hashed using a hash algorithm to obtain a hash value, and the hash value is used as a target identification code for the target scheduled task.

3. The method for creating a scheduled task according to claim 1, wherein: Before receiving the scheduled task creation request, the method further includes: In response to the scheduled task creation operation, an information entry interface is provided for the user to enter the to-be-executed instructions corresponding to the target scheduled task; In response to a confirmation operation on the instruction to be executed, a scheduled task creation request is generated according to the instruction to be executed.

4. The method for creating a scheduled task according to claim 1, wherein: After matching the target identification code with the historical identification codes pre-stored in the database, the method further includes: If there is no historical identification code matching the target identification code in the task scheduler, creating a new task instance for the target scheduled task through the task scheduler; The target scheduled task is associated and mapped with the instance identifier of the newly added task instance of the task scheduler.

5. The method for creating a scheduled task according to claim 1, wherein: After receiving the scheduled task creation request, the method further includes: According to the scheduled task creation request, obtaining address information of a receiving object of the to-be-executed instruction; The address information is associated and mapped with the target scheduled task.

6. The method for creating a scheduled task according to claim 1, wherein: After associating and mapping the target scheduled task with the historical task instance in the task scheduler, the method further includes: When detecting the scheduled task execution instruction issued by the task scheduler, obtaining the instance identifier carried by the scheduled task execution instruction; Determine the total number of target scheduled tasks corresponding to the instance identifier according to the instance identifier; comparing the total number to a batch maximum threshold; If the total number is less than or equal to the batch processing maximum threshold, the target scheduled tasks are executed in batches at the current processing node.

7. The method for creating a scheduled task as claimed in claim 6, characterized in that: After comparing the total number with a batch maximum threshold, the method further comprises: If the total number is greater than the batch processing maximum threshold, the target scheduled tasks are processed in batches to obtain several batches of target scheduled tasks; The batches of target scheduled tasks are distributed to a plurality of different sub-processing nodes for parallel execution.

8. A scheduled task creation device, characterized in that: The scheduled task creation device comprises: A request receiving module, used to receive a scheduled task creation request, wherein the scheduled task creation request carries a to-be-executed instruction; A task creation module, used to create a target scheduled task according to the to-be-executed instruction; A data construction module, used to extract key information from the instruction to be executed, and construct a target identification code for identifying the target timed task according to the key information; A data matching module, used for matching the target identification code with a historical identification code pre-stored in the task scheduler, wherein the historical identification code has a corresponding historical task instance pre-created; The first association module is used to associate and map the target scheduled task with the instance identifier of the historical task instance in the task scheduler if there is a historical identification code in the task scheduler that matches the target identification code.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the scheduled task creation method according to any one of claims 1 to 7.

10. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores a plurality of instructions, and the processor loads the instructions to execute the scheduled task creation method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Video detection method, device and equipment for edge algorithm all-in-one machine and medium

    CN120388313A