CN111625341A - Task scheduling management method and device - Google Patents

Task scheduling management method and device Download PDF

Info

Publication number
CN111625341A
CN111625341A CN202010500219.3A CN202010500219A CN111625341A CN 111625341 A CN111625341 A CN 111625341A CN 202010500219 A CN202010500219 A CN 202010500219A CN 111625341 A CN111625341 A CN 111625341A
Authority
CN
China
Prior art keywords
task
target
execution time
execution
priority
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010500219.3A
Other languages
Chinese (zh)
Inventor
梁波
施润丰
林扬威
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Seasun Entertainment Network Technology Co ltd
Original Assignee
Guangzhou Seasun Entertainment Network Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Seasun Entertainment Network Technology Co ltd filed Critical Guangzhou Seasun Entertainment Network Technology Co ltd
Priority to CN202010500219.3A priority Critical patent/CN111625341A/en
Publication of CN111625341A publication Critical patent/CN111625341A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the application provides a task scheduling management method and a task scheduling management device, wherein the task scheduling management method comprises the following steps: in response to monitoring of a target task to be processed, task content of a currently running task is obtained through a task address stored in a preset association container, wherein the task address of the currently running task is stored in the association container in advance; determining the execution parameter information of the current running task according to the task content; and setting the execution parameter information of the target task according to the execution parameter information and executing the target task. By implementing the scheme of the embodiment, the consumption of a large amount of running time can be reduced or even avoided, and a large amount of computing resources of the system are saved, so that the running efficiency of the system is greatly improved.

Description

Task scheduling management method and device
Technical Field
The present application relates to the field of computer technologies, and in particular, to a task scheduling management method. The application also relates to a task scheduling management device, a computing device and a computer readable storage medium.
Background
In the related art, generally, when a certain target task is processed, a task scheduling management system often needs to traverse other tasks currently running by the system, so that specific setting on running of the target task can be realized, and a large amount of running time and operation resources of the system need to be consumed in the process of traversing other tasks currently running by the system, which greatly reduces the running efficiency of the system.
Disclosure of Invention
In view of this, the present application provides a task scheduling management method. The embodiment of the application also relates to a task scheduling management device, a computing device and a computer readable storage medium, so as to solve the technical defects in the prior art.
According to a first aspect of an embodiment of the present application, a task scheduling management method is provided, including:
in response to monitoring of a target task to be processed, task content of a currently running task is obtained through a task address stored in a preset association container, wherein the task address of the currently running task is stored in the association container in advance;
determining the execution parameter information of the current running task according to the task content;
and setting the execution parameter information of the target task according to the execution parameter information and executing the target task.
In an embodiment of the application, there are a plurality of the currently running tasks, and the method further includes:
setting corresponding pointers for a plurality of current running tasks in advance, wherein each pointer points to a corresponding task address of the current running task;
storing pointers corresponding to a plurality of the currently running tasks in the associated container in a memory.
In an embodiment of the present application, the step of obtaining task content of a currently running task through a task address stored in a preset association container includes:
acquiring pointers corresponding to a plurality of current running tasks in the associated container;
acquiring a task address corresponding to each current running task according to each pointer;
and respectively acquiring the task content of each corresponding current running task according to the task address of each current running task.
In one embodiment of the present application, further comprising:
and recording output information when the current running task is executed through a log function.
In one embodiment of the present application, further comprising:
detecting whether the target task is executed and completed;
in response to the target task not being executed and completed, storing the target task not being executed and completed in a database;
and in response to the system restarting, obtaining the target tasks which are not executed and completed from the database and placing the target tasks in a priority processing queue.
In an embodiment of the present application, the task address carries task identification information for indicating task content; the step of obtaining the task content of the current running task through the task address stored in the preset associated container comprises the following steps:
acquiring the task address from the associated container, and analyzing the task address to acquire task identification information;
and determining the task content of the current running task according to the task identification information.
In one embodiment of the present application, the task identification information occupies a fixed length and is located at the head of the task address.
In one embodiment of the present application, the association container is a map type association container.
In an embodiment of the present application, the determining, according to the task content, execution parameter information of the currently running task includes:
analyzing the task content to obtain a first execution time of the current running task;
the step of setting the execution parameter information of the target task according to the execution parameter information and executing the target task includes:
acquiring a second execution time of the target task, and comparing the first execution time with the second execution time;
when the second execution time is earlier than the first execution time, determining the second execution time as the execution parameter information of the target task, and putting the second execution time into a priority queue;
and acquiring the second execution time from the priority queue to execute the target task preferentially.
In an embodiment of the present application, the determining, according to the task content, execution parameter information of the currently running task includes:
analyzing the task content to obtain a first priority of the current running task;
the step of setting the execution parameter information of the target task according to the execution parameter information and executing the target task includes:
acquiring a second priority of the target task, and comparing the first priority with the second priority;
when the second priority is higher than the first priority, determining the second priority as the execution parameter information of the target task, and putting the second priority into a priority queue;
and acquiring the second priority from the priority queue to execute the target task preferentially.
In an embodiment of the present application, the determining, according to the task content, execution parameter information of the currently running task includes:
analyzing the task content to obtain a first execution time period of the current running task;
the step of setting the execution parameter information of the target task according to the execution parameter information and executing the target task includes:
acquiring a second execution time interval of the target task, and comparing the first execution time interval with the second execution time interval;
when the second execution time interval is smaller than the first execution time interval, determining the second execution time interval as the execution parameter information of the target task, and putting the second execution time interval into a priority queue;
and acquiring the second execution time interval from the priority queue to execute the target task preferentially.
According to a second aspect of the embodiments of the present application, there is provided a task scheduling management apparatus, including:
the task content determining module is configured to determine the task content of the current running task through a task address stored in a preset associated container in response to the monitoring of the target task to be processed, wherein the task address of the current running task is stored in the associated container in advance;
the task parameter determining module is configured to determine execution parameter information of the current running task according to the task content;
and the target task execution module is configured to set execution parameter information of the target task according to the execution parameter information and execute the target task.
In one embodiment of the present application, there are a plurality of the currently running tasks; the apparatus further comprises a preprocessing module configured to:
setting corresponding pointers for a plurality of current running tasks in advance, wherein each pointer points to a corresponding task address of the current running task;
storing pointers corresponding to a plurality of the currently running tasks in the associated container in a memory.
In one embodiment of the present application, the association container is a map type association container.
In an embodiment of the application, the task content determination module is further configured to:
acquiring pointers corresponding to a plurality of current running tasks in the associated container;
acquiring a task address corresponding to each current running task according to each pointer;
and respectively acquiring the task content of each corresponding current running task according to the task address of each current running task.
In one embodiment of the present application, the system further comprises a recording module configured to: and recording output information when the current running task is executed through a log function.
In an embodiment of the application, the target task execution module is further configured to:
detecting whether the target task is executed and completed;
in response to the target task not being executed and completed, storing the target task not being executed and completed in a database;
and in response to the system restarting, obtaining the target tasks which are not executed and completed from the database and placing the target tasks in a priority processing queue.
In an embodiment of the present application, the task address carries task identification information for indicating task content; the task content determination module is further configured to:
acquiring the task address from the associated container, and analyzing the task address to acquire task identification information;
and determining the task content of the current running task according to the task identification information.
In one embodiment of the present application, the task identification information occupies a fixed length and is located at the head of the task address.
In one embodiment of the present application, the association container is a map type association container.
In an embodiment of the application, the task parameter determination module is further configured to:
analyzing the task content to obtain a first execution time of the current running task;
the target task execution module further configured to:
acquiring a second execution time of the target task, and comparing the first execution time with the second execution time;
when the second execution time is earlier than the first execution time, determining the second execution time as the execution parameter information of the target task, and putting the second execution time into a priority queue;
and acquiring the second execution time from the priority queue to execute the target task preferentially.
In an embodiment of the application, the task parameter determination module is further configured to:
analyzing the task content to obtain a first priority of the current running task;
the target task execution module further configured to:
acquiring a second priority of the target task, and comparing the first priority with the second priority;
when the second priority is higher than the first priority, determining the second priority as the execution parameter information of the target task, and putting the second priority into a priority queue;
and acquiring the second priority from the priority queue to execute the target task preferentially.
In an embodiment of the application, the task parameter determination module is further configured to:
analyzing the task content to obtain a first execution time period of the current running task;
the target task execution module further configured to:
acquiring a second execution time interval of the target task, and comparing the first execution time interval with the second execution time interval;
when the second execution time interval is smaller than the first execution time interval, determining the second execution time interval as the execution parameter information of the target task, and putting the second execution time interval into a priority queue;
and acquiring the second execution time interval from the priority queue to execute the target task preferentially.
According to a third aspect of embodiments herein, there is provided a computing device comprising:
a memory and a processor;
the memory is used for storing computer executable instructions, and the processor is used for executing the computer executable instructions to realize the steps of the task scheduling management method in any one of the above embodiments.
According to a fourth aspect of embodiments herein, there is provided a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of any one of the task scheduling management methods.
According to the task scheduling management method and device, in response to monitoring of a target task to be processed, task content of a currently running task is obtained through a task address stored in a preset association container, wherein the task address of the currently running task is stored in the association container in advance, execution parameter information of the currently running task is determined according to the task content, and finally the execution parameter information of the target task is set according to the execution parameter information and the target task is executed. In the embodiment, the task address of the current running task is mapped and prestored in the association container, the task content of the current running task is obtained through the task address based on the association container, the execution parameter information of the current running task is determined according to the task content, and the execution parameter information of the target task is set according to the execution parameter information to execute the target task.
Drawings
Fig. 1 is a flowchart of a task scheduling management method according to an embodiment of the present application;
fig. 2 is a flowchart of a task scheduling management method according to an embodiment of the present application;
fig. 3 is a flowchart of a task scheduling management method according to an embodiment of the present application;
FIG. 4 is a flowchart of a task scheduling management method according to an embodiment of the present application;
fig. 5 is a flowchart of a task scheduling management method according to an embodiment of the present application;
fig. 6 is a flowchart of a task scheduling management method according to an embodiment of the present application;
FIG. 7 is a flowchart illustrating a task scheduling management method according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a task scheduling management apparatus according to an embodiment of the present application;
fig. 9 is a block diagram of a computing device according to an embodiment of the present application.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. This application is capable of implementation in many different ways than those herein set forth and of similar import by those skilled in the art without departing from the spirit of this application and is therefore not limited to the specific implementations disclosed below.
The terminology used in the one or more embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of the present application. As used in one or more embodiments of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used in one or more embodiments of the present application refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It will be understood that, although the terms first, second, etc. may be used herein in one or more embodiments of the present application to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first aspect may be termed a second aspect, and, similarly, a second aspect may be termed a first aspect, without departing from the scope of one or more embodiments of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
In the present application, a task scheduling management method is provided, and the present application relates to a task scheduling management apparatus, a computing device, and a computer readable storage medium, which are described in detail in the following embodiments one by one.
Fig. 1 shows a flowchart of a task scheduling management method according to an embodiment of the present application, which includes steps S102 to S106.
Step S102: and in response to the monitored target task to be processed, acquiring the task content of the current running task through a task address stored in a preset associated container, wherein the task address of the current running task is stored in the associated container in advance.
Step S104: and determining the execution parameter information of the current running task according to the task content.
Step S106: and setting the execution parameter information of the target task according to the execution parameter information and executing the target task.
According to the task scheduling management method in the embodiment, the task address of the current running task is mapped and prestored in the association container, the task content of the current running task is obtained through the task address based on the association container, the execution parameter information of the current running task is determined according to the task content, and the execution parameter information of the target task is set according to the execution parameter information to execute the target task.
In one embodiment, in step S102, the target task may be a newly created target task, but is not limited thereto. The association container may be a map type association container. map is an associated container of stl (standard Template library) that provides one-to-one data processing capability, and due to this feature, it is possible to provide fast channels in programming while processing one-to-one data. The currently running task may be another task than the target task that has already been performed.
Optionally, in an embodiment of the present application, the task address may carry task identification information used to indicate task content. For example, the task identification information may occupy a fixed length and be located at the head of the task address. That is, the header of the task address may contain a fixed length, such as task identification information occupying N bits, where N may be an integer greater than or equal to 2.
Accordingly, fig. 2 illustrates a task scheduling management method according to an embodiment of the present application, in an embodiment of the present application, the step of obtaining task content of a currently running task through a task address stored in a preset association container in step S102 may include the following sub-steps:
step S201: and acquiring the task address from the associated container, and analyzing the task address to acquire task identification information.
For example, after acquiring a task address from the associated container, the task identification information is read from the head of the task address.
Step S202: and determining the task content of the current running task according to the task identification information.
The task identification information is used for indicating task content, and the task content of the current running task can be determined according to the task identification information. By way of example, task content may include, but is not limited to, task priority, task execution time, task state information, and the like. The task state information may include, but is not limited to, task ready information, task execution completion information, task execution failure information, or task failure information. By the implementation scheme, the task content can be simply, conveniently and quickly acquired, and the system operation efficiency is improved.
Optionally, fig. 3 illustrates a task scheduling management method according to an embodiment of the present application. In an embodiment of the application, the determining, according to the task content, the execution parameter information of the currently running task in step S104 may specifically be step S301.
Step S301: and analyzing the task content to obtain a first execution time of the current running task.
For example, the task execution time information may be obtained by parsing the task content, and then a first execution time of the currently running task is determined, for example, the task is executed at 30 days 24:00 in 12 years in 2019.
The step of setting the execution parameter information of the target task according to the execution parameter information and executing the target task in step S106 may specifically include the following steps S302 to S304.
Step S302: and acquiring a second execution time of the target task, and comparing the first execution time with the second execution time.
For example, a second execution time set for the target task, such as 30 days 22:00 in 2019 in 12 years, may be obtained, and then the two times may be compared.
Step S303: and when the second execution time is earlier than the first execution time, determining the second execution time as the execution parameter information of the target task, and putting the second execution time into a priority queue.
In this embodiment, the 30 th day 22:00 time in 12 years in 2019 is earlier than the 30 th day 24:00 time in 12 years in 2019, the 30 th day 22:00 time in 12 years in 2019 is determined as the execution parameter information of the target task, and the 30 th day 22:00 time in 12 years in 2019 is placed in the priority queue. If the second execution time is not earlier than the first execution time, the execution operation may not be responded to, but is not limited thereto and may be set as needed.
Step S304: and acquiring the second execution time from the priority queue to execute the target task preferentially.
For example, continuing with the above example, after placing the priority queue, the second execution time, such as 30 days in 12 years in 2019 and 22:00 days in 22 years in 30 years, may be obtained from the priority queue to execute the target task preferentially.
Optionally, fig. 4 illustrates a task scheduling management method according to an embodiment of the present application. In an embodiment of the application, the determining, according to the task content, the execution parameter information of the currently running task in step S104 may specifically be step S401.
Step S401: and analyzing the task content to obtain a first priority of the current running task.
For example, the task priority information may be obtained by analyzing the task content, and then the priority a of the currently running task may be determined.
The step of setting the execution parameter information of the target task according to the execution parameter information and executing the target task in step S106 may include the following steps S402 to S404:
step S402: and acquiring a second priority of the target task, and comparing the first priority with the second priority.
For example, a priority level B set for the target task may be acquired, and then the two priority levels a and B may be compared.
Step S403: and when the second priority is higher than the first priority, determining the second priority as the execution parameter information of the target task, and putting the second priority into a priority queue.
In this embodiment, if the priority B is higher than the priority a, the priority B is determined as the execution parameter information of the target task, and the priority B is placed in the priority queue. When the priority B is not higher than the priority a, the operation may not be performed in response, but is not limited thereto and may be set as needed.
Step S404: and acquiring the second priority from the priority queue to execute the target task preferentially. In this embodiment, after the priority queue is placed, the priority level B may be obtained from the priority queue to preferentially execute the target task.
Optionally, fig. 4 illustrates a task scheduling management method according to an embodiment of the present application. In an embodiment of the application, the determining, according to the task content, the execution parameter information of the currently running task in step S104 may specifically be step S501.
Step S501: and analyzing the task content to obtain a first execution time interval of the current running task.
The task execution time information can be obtained by analyzing the task content, and then the first execution time period of the currently running task is determined, such as the execution in the 19:00-24:00 time period of 12 years in 2019 and 30 days.
The step of setting the execution parameter information of the target task according to the execution parameter information and executing the target task in step S106 may include the following steps S502 to S504.
Step S502: and acquiring a second execution time interval of the target task, and comparing the first execution time interval with the second execution time interval.
For example, a second execution period set for the target task may be obtained, such as the 21:00-24:00 period of 30 days in 12 years in 2019, and then the two periods may be compared.
Step S503: and when the second execution time interval is smaller than the first execution time interval, determining the second execution time interval as the execution parameter information of the target task, and putting the second execution time interval into a priority queue.
In this embodiment, the time period of 30 days 21:00-24:00 in 2019 and 12 years is 3 hours, the time period of 30 days 19:00-24:00 in 2019 and 12 years is less than 5 hours, the time period of 30 days 21:00-24:00 in 2019 and 12 years is determined as the execution parameter information of the target task, and the time period of 30 days 21:00-24:00 in 2019 and 12 years is placed in the priority queue. When the second execution time period is not less than the first execution time period, the execution operation may not be responded to, or may be set as needed, which is not limited in this embodiment.
Step S504: and acquiring the second execution time interval from the priority queue to execute the target task preferentially. In this embodiment, after the priority queue is placed, the second execution time, for example, the time period 21:00-24:00 in 30 days 12 years in 2019, may be obtained from the priority queue to preferentially execute the target task.
Optionally, in an embodiment of the present application, there are usually a plurality of the currently running tasks. Therefore, when the scheme of the embodiment is implemented, corresponding associated containers need to be set for different tasks, and the complexity of the implementation is increased, which greatly reduces the operating efficiency of the system. Therefore, in this embodiment, the method may further include: and presetting corresponding pointers for a plurality of current running tasks, wherein each pointer points to a corresponding task address of the current running task. And storing pointers corresponding to a plurality of the current running tasks in the associated container in the memory. By way of example, the pointer may be a parent pointer.
Accordingly, referring to fig. 6, in an embodiment of the present application, the step of obtaining the task content of the currently running task through the task address stored in the preset association container in step S102 may specifically include the following steps S601 to S603:
step S601: and acquiring pointers corresponding to the plurality of current running tasks in the associated container.
For example, the currently running task includes task a, task B, task C, and task D, and the pointers a, B, C, and D respectively and correspondingly set for task a, task B, task C, and task D in advance are all stored in the associated container. The pointers a, B, C and D corresponding to the tasks a, B, C and D, respectively, can be obtained from the associated container.
Step S602: and acquiring a task address corresponding to each current running task according to each pointer.
Illustratively, the pointer a, the pointer B, the pointer C, and the pointer D respectively point to a task address 1, a task address 2, a task address 3, and a task address 4 of the task a, the task B, the task C, and the task D, respectively. The task addresses of task a, task B, task C and task D, respectively, can be determined by means of pointer a, pointer B, pointer C and pointer D.
Step S603: and respectively acquiring the task content of each corresponding current running task according to the task address of each current running task.
For example, the task contents of task a, task B, task C, and task D may be acquired based on task address 1, task address 2, task address 3, and task address 4, respectively. The specific manner of acquiring the task content may refer to the description in the foregoing embodiments, and is not described herein again.
In this embodiment, by implementing the above-described exemplary scheme, it may be avoided to set multiple association containers for multiple different tasks, and only one association container may be set to implement the scheme, so that the complexity of the implementation scheme is reduced, and the operating efficiency of the system is further improved.
Optionally, in an embodiment of the present application, the method may further include: and recording output information when the current running task is executed through a log function. For example, in a game scenario, a game character ID and corresponding virtual coin information may be recorded. Alternatively, the game character ID and the corresponding item information are recorded, but not limited thereto.
Optionally, fig. 7 illustrates a task scheduling management method according to an embodiment of the present application. In one embodiment of the present application, the method may further comprise the steps of:
step S701: and detecting whether the target task is executed and completed.
Illustratively, this step may be performed after step S106. Specifically, task state information of the target task may be obtained to determine whether the target task is completed.
Step S702: and responding to the target task not being executed and completed, and storing the target task not being executed and completed in a database.
Step S703: and in response to the system restarting, obtaining the target tasks which are not executed and completed from the database and placing the target tasks in a priority processing queue.
Illustratively, in a game scene, mapping a task address of a current running task of a pre-stored game in an association container, when a game target task to be processed is monitored, acquiring task content of the current running task through the task address based on the association container, determining execution parameter information of the current running task according to the task content, and setting the execution parameter information of the target task according to the execution parameter information to execute the target task. And storing the target task in a game database when the execution of the target task is not completed before the game server is closed. And after the game server is in service and restarted, putting the target task into a priority processing queue to preferentially execute the target task which is not executed and completed. By the method, the current process of traversing other tasks currently operated by the game system is not required to be executed, so that the consumption of a large amount of operation time is greatly reduced or even avoided, a large amount of operation resources of the game system are saved, and the operation efficiency of the game system is greatly improved.
Corresponding to the above method embodiment, the present application further provides an embodiment of a task scheduling management device, and fig. 8 illustrates a schematic structural diagram of a task scheduling management device provided in an embodiment of the present application. As shown in fig. 8, the task scheduling management apparatus 800 may include a task content determination module 801, a task parameter determination module 802, and a target task execution module 803; wherein:
the task content determining module 801 is configured to determine task content of a currently running task according to a task address stored in a preset associated container in response to monitoring of a target task to be processed, where the task address of the currently running task is stored in the associated container in advance.
A task parameter determining module 802 configured to determine execution parameter information of the currently running task according to the task content.
A target task execution module 803 configured to set execution parameter information of the target task according to the execution parameter information and execute the target task.
The task scheduling management device in this embodiment maps and pre-stores the task address of the currently running task in the association container, obtains the task content of the currently running task through the task address based on the association container, determines the execution parameter information of the currently running task according to the task content, and sets the execution parameter information of the target task according to the execution parameter information to execute the target task.
In one embodiment of the present application, there are a plurality of the currently running tasks. The apparatus further comprises a pre-processing module (not shown) configured to: setting corresponding pointers for a plurality of current running tasks in advance, wherein each pointer points to a corresponding task address of the current running task; storing pointers corresponding to a plurality of the currently running tasks in the associated container in a memory.
In one embodiment of the present application, the association container is a map type association container.
In an embodiment of the application, the task content determination module is further configured to: acquiring pointers corresponding to a plurality of current running tasks in the associated container; acquiring a task address corresponding to each current running task according to each pointer; and respectively acquiring the task content of each corresponding current running task according to the task address of each current running task.
In one embodiment of the present application, the apparatus may further include a recording module configured to: and recording output information when the current running task is executed through a log function.
In an embodiment of the present application, the target task execution module 803 is further configured to: detecting whether the target task is executed and completed; in response to the target task not being executed and completed, storing the target task not being executed and completed in a database; and in response to the system restarting, obtaining the target tasks which are not executed and completed from the database and placing the target tasks in a priority processing queue.
In an embodiment of the present application, the task address carries task identification information for indicating task content; the task content determination module 801 is further configured to: acquiring the task address from the associated container, and analyzing the task address to acquire task identification information; and determining the task content of the current running task according to the task identification information.
In one embodiment of the present application, the task identification information occupies a fixed length and is located at the head of the task address.
In one embodiment of the present application, the association container includes, but is not limited to, an association container that is a map type.
In an embodiment of the present application, the task parameter determining module 802 is further configured to: and analyzing the task content to obtain a first execution time of the current running task. The target task execution module 803 is further configured to: acquiring a second execution time of the target task, and comparing the first execution time with the second execution time; when the second execution time is earlier than the first execution time, determining the second execution time as the execution parameter information of the target task, and putting the second execution time into a priority queue; and acquiring the second execution time from the priority queue to execute the target task preferentially.
In an embodiment of the present application, the task parameter determining module 802 is further configured to: and analyzing the task content to obtain a first priority of the current running task. The target task execution module 803 is further configured to: acquiring a second priority of the target task, and comparing the first priority with the second priority; when the second priority is higher than the first priority, determining the second priority as the execution parameter information of the target task, and putting the second priority into a priority queue; and acquiring the second priority from the priority queue to execute the target task preferentially.
In an embodiment of the present application, the task parameter determining module 802 is further configured to: and analyzing the task content to obtain a first execution time interval of the current running task. The target task execution module 803 is further configured to: acquiring a second execution time interval of the target task, and comparing the first execution time interval with the second execution time interval; when the second execution time interval is smaller than the first execution time interval, determining the second execution time interval as the execution parameter information of the target task, and putting the second execution time interval into a priority queue; and acquiring the second execution time interval from the priority queue to execute the target task preferentially.
The above is an exemplary scheme of a task scheduling management apparatus according to this embodiment. It should be noted that the technical solution of the task scheduling management apparatus and the technical solution of the task scheduling management method belong to the same concept, and details of the technical solution of the task scheduling management apparatus, which are not described in detail, can be referred to the description of the technical solution of the task scheduling management method.
Fig. 9 illustrates a block diagram of a computing device 900 provided in accordance with an embodiment of the present application. Components of the computing device 900 include, but are not limited to, a memory 910 and a processor 920. The processor 920 is coupled to the memory 910 via a bus 930, and a database 950 is used to store data.
Computing device 900 also includes access device 940, access device 940 enabling computing device 900 to communicate via one or more networks 960. Examples of such networks include the Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the internet. Access device 940 may include one or more of any type of network interface (e.g., a Network Interface Card (NIC)) whether wired or wireless, such as an IEEE802.11 Wireless Local Area Network (WLAN) wireless interface, a worldwide interoperability for microwave access (Wi-MAX) interface, an ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a bluetooth interface, a Near Field Communication (NFC) interface, and so forth.
In one embodiment of the present application, the above-described components of computing device 900 and other components not shown in FIG. 9 may also be connected to each other, such as by a bus. It should be understood that the block diagram of the computing device architecture shown in FIG. 9 is for purposes of example only and is not limiting as to the scope of the present application. Those skilled in the art may add or replace other components as desired.
Computing device 900 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., tablet, personal digital assistant, laptop, notebook, netbook, etc.), a mobile phone (e.g., smartphone), a wearable computing device (e.g., smartwatch, smartglasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop computer or PC. Computing device 900 may also be a mobile or stationary server.
The processor 920 is configured to execute the following computer-executable instructions to implement the steps of the task scheduling management method in any of the above embodiments.
The above is an illustrative scheme of a computing device of the present embodiment. It should be noted that the technical solution of the computing device and the technical solution of the task scheduling management method belong to the same concept, and details that are not described in detail in the technical solution of the computing device can be referred to the description of the technical solution of the task scheduling management method.
An embodiment of the present application further provides a computer-readable storage medium, which stores computer instructions, and the computer instructions are executed by a processor to implement the steps of the task scheduling management method in any of the above embodiments.
The above is an illustrative scheme of a computer-readable storage medium of the present embodiment. It should be noted that the technical solution of the storage medium belongs to the same concept as the technical solution of the task scheduling management method, and details that are not described in detail in the technical solution of the storage medium can be referred to the description of the technical solution of the task scheduling management method.
The foregoing description of specific embodiments of the present application has been presented. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The computer instructions comprise computer program code which may be in the form of source code, object code, an executable file or some intermediate form, or the like. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, etc. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
It should be noted that, for the sake of simplicity, the above-mentioned method embodiments are described as a series of acts or combinations, but those skilled in the art should understand that the present application is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
The preferred embodiments of the present application disclosed above are intended only to aid in the explanation of the application. Alternative embodiments are not exhaustive and do not limit the invention to the precise embodiments described. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the application and its practical applications, to thereby enable others skilled in the art to best understand and utilize the application. The application is limited only by the claims and their full scope and equivalents.

Claims (23)

1. A task scheduling management method is characterized by comprising the following steps:
in response to monitoring of a target task to be processed, task content of a currently running task is obtained through a task address stored in a preset association container, wherein the task address of the currently running task is stored in the association container in advance;
determining the execution parameter information of the current running task according to the task content;
and setting the execution parameter information of the target task according to the execution parameter information and executing the target task.
2. The method of claim 1, wherein there are a plurality of the currently running tasks, the method further comprising:
setting corresponding pointers for a plurality of current running tasks in advance, wherein each pointer points to a corresponding task address of the current running task;
storing pointers corresponding to a plurality of the currently running tasks in the associated container in a memory.
3. The method according to claim 2, wherein the step of obtaining the task content of the currently running task through the task address stored in the preset association container comprises:
acquiring pointers corresponding to a plurality of current running tasks in the associated container;
acquiring a task address corresponding to each current running task according to each pointer;
and respectively acquiring the task content of each corresponding current running task according to the task address of each current running task.
4. The method of any of claims 1 to 3, further comprising:
and recording output information when the current running task is executed through a log function.
5. The method of any of claims 1 to 3, further comprising:
detecting whether the target task is executed and completed;
in response to the target task not being executed and completed, storing the target task not being executed and completed in a database;
and in response to the system restarting, obtaining the target tasks which are not executed and completed from the database and placing the target tasks in a priority processing queue.
6. The method of claim 1, wherein the task address carries task identification information indicating task content; the step of obtaining the task content of the current running task through the task address stored in the preset associated container comprises the following steps:
acquiring the task address from the associated container, and analyzing the task address to acquire task identification information;
and determining the task content of the current running task according to the task identification information.
7. A method according to claim 6, wherein said task identity information occupies a fixed length and is located at the head of said task address.
8. The method according to any one of claims 1 to 3, 6 and 7, wherein the associated container is a map type associated container.
9. The method according to any one of claims 1 to 3, wherein the determining of the execution parameter information of the currently running task according to the task content comprises:
analyzing the task content to obtain a first execution time of the current running task;
the step of setting the execution parameter information of the target task according to the execution parameter information and executing the target task includes:
acquiring a second execution time of the target task, and comparing the first execution time with the second execution time;
when the second execution time is earlier than the first execution time, determining the second execution time as the execution parameter information of the target task, and putting the second execution time into a priority queue;
and acquiring the second execution time from the priority queue to execute the target task preferentially.
10. The method according to any one of claims 1 to 3, wherein the determining of the execution parameter information of the currently running task according to the task content comprises:
analyzing the task content to obtain a first priority of the current running task;
the step of setting the execution parameter information of the target task according to the execution parameter information and executing the target task includes:
acquiring a second priority of the target task, and comparing the first priority with the second priority;
when the second priority is higher than the first priority, determining the second priority as the execution parameter information of the target task, and putting the second priority into a priority queue;
and acquiring the second priority from the priority queue to execute the target task preferentially.
11. The method according to any one of claims 1 to 3, wherein the determining of the execution parameter information of the currently running task according to the task content comprises:
analyzing the task content to obtain a first execution time period of the current running task;
the step of setting the execution parameter information of the target task according to the execution parameter information and executing the target task includes:
acquiring a second execution time interval of the target task, and comparing the first execution time interval with the second execution time interval;
when the second execution time interval is smaller than the first execution time interval, determining the second execution time interval as the execution parameter information of the target task, and putting the second execution time interval into a priority queue;
and acquiring the second execution time interval from the priority queue to execute the target task preferentially.
12. A task scheduling management apparatus, comprising:
the task content determining module is configured to determine the task content of the current running task through a task address stored in a preset associated container in response to the monitoring of the target task to be processed, wherein the task address of the current running task is stored in the associated container in advance;
the task parameter determining module is configured to determine execution parameter information of the current running task according to the task content;
and the target task execution module is configured to set execution parameter information of the target task according to the execution parameter information and execute the target task.
13. The apparatus of claim 12, wherein there are a plurality of said currently running tasks; the apparatus further comprises a preprocessing module configured to:
setting corresponding pointers for a plurality of current running tasks in advance, wherein each pointer points to a corresponding task address of the current running task;
storing pointers corresponding to a plurality of the currently running tasks in the associated container in a memory.
14. The apparatus of claim 13, wherein the association container is a map type association container.
15. The apparatus of claim 13, wherein the task content determination module is further configured to:
acquiring pointers corresponding to a plurality of current running tasks in the associated container;
acquiring a task address corresponding to each current running task according to each pointer;
and respectively acquiring the task content of each corresponding current running task according to the task address of each current running task.
16. The apparatus of any one of claims 12 to 15, further comprising a recording module configured to: and recording output information when the current running task is executed through a log function.
17. The apparatus of any of claims 12 to 15, wherein the target task execution module is further configured to:
detecting whether the target task is executed and completed;
in response to the target task not being executed and completed, storing the target task not being executed and completed in a database;
and in response to the system restarting, obtaining the target tasks which are not executed and completed from the database and placing the target tasks in a priority processing queue.
18. The apparatus of claim 12, wherein the task address carries task identification information indicating task content; the task content determination module is further configured to:
acquiring the task address from the associated container, and analyzing the task address to acquire task identification information;
and determining the task content of the current running task according to the task identification information.
19. The apparatus of any of claims 12 to 15, wherein the task parameter determination module is further configured to:
analyzing the task content to obtain a first execution time of the current running task;
the target task execution module further configured to:
acquiring a second execution time of the target task, and comparing the first execution time with the second execution time;
when the second execution time is earlier than the first execution time, determining the second execution time as the execution parameter information of the target task, and putting the second execution time into a priority queue;
and acquiring the second execution time from the priority queue to execute the target task preferentially.
20. The apparatus of any of claims 12 to 15, wherein the task parameter determination module is further configured to:
analyzing the task content to obtain a first priority of the current running task;
the target task execution module further configured to:
acquiring a second priority of the target task, and comparing the first priority with the second priority;
when the second priority is higher than the first priority, determining the second priority as the execution parameter information of the target task, and putting the second priority into a priority queue;
and acquiring the second priority from the priority queue to execute the target task preferentially.
21. The apparatus of any of claims 12 to 15, wherein the task parameter determination module is further configured to:
analyzing the task content to obtain a first execution time period of the current running task;
the target task execution module further configured to:
acquiring a second execution time interval of the target task, and comparing the first execution time interval with the second execution time interval;
when the second execution time interval is smaller than the first execution time interval, determining the second execution time interval as the execution parameter information of the target task, and putting the second execution time interval into a priority queue;
and acquiring the second execution time interval from the priority queue to execute the target task preferentially.
22. A computing device, comprising:
a memory and a processor;
the memory is configured to store computer-executable instructions, and the processor is configured to execute the computer-executable instructions to implement the steps of the task schedule management method according to any of claims 1 to 11.
23. A computer-readable storage medium storing computer instructions which, when executed by a processor, implement the steps of the task scheduling management method according to any one of claims 1 to 11.
CN202010500219.3A 2020-06-04 2020-06-04 Task scheduling management method and device Pending CN111625341A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010500219.3A CN111625341A (en) 2020-06-04 2020-06-04 Task scheduling management method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010500219.3A CN111625341A (en) 2020-06-04 2020-06-04 Task scheduling management method and device

Publications (1)

Publication Number Publication Date
CN111625341A true CN111625341A (en) 2020-09-04

Family

ID=72260201

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010500219.3A Pending CN111625341A (en) 2020-06-04 2020-06-04 Task scheduling management method and device

Country Status (1)

Country Link
CN (1) CN111625341A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112181641A (en) * 2020-09-14 2021-01-05 中国银联股份有限公司 Thread processing method, device, equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109871274A (en) * 2019-02-27 2019-06-11 西安微电子技术研究所 A kind of the multitask construction and processing method of embedded environment application
CN109871272A (en) * 2019-01-31 2019-06-11 深圳市战音科技有限公司 A kind of electronic system progress control method and device
CN110837410A (en) * 2019-10-30 2020-02-25 北京奇艺世纪科技有限公司 Task scheduling method and device, electronic equipment and computer readable storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109871272A (en) * 2019-01-31 2019-06-11 深圳市战音科技有限公司 A kind of electronic system progress control method and device
CN109871274A (en) * 2019-02-27 2019-06-11 西安微电子技术研究所 A kind of the multitask construction and processing method of embedded environment application
CN110837410A (en) * 2019-10-30 2020-02-25 北京奇艺世纪科技有限公司 Task scheduling method and device, electronic equipment and computer readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘利强: "《实时嵌入式系统软件设计方法》", 30 April 2011, 哈尔冰工业大学出版社, pages: 31 - 38 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112181641A (en) * 2020-09-14 2021-01-05 中国银联股份有限公司 Thread processing method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN111767047A (en) Micro-service component management method and device
CN111782470A (en) Distributed container log data processing method and device
CN110868763A (en) Method, device and system for establishing Bluetooth connection
CN110532081B (en) Timed task processing method and device
EP4318234A1 (en) Method and apparatus for starting secure container
CN115098426A (en) PCIE (peripheral component interface express) equipment management method, interface management module, PCIE system, equipment and medium
CN111111179A (en) Unity-based graphics resource loading method and device
CN113448690B (en) Monitoring method and device
CN111625341A (en) Task scheduling management method and device
CN113672488A (en) Log text processing method and device
CN110830759A (en) Intelligent application deployment method, device and system
CN110442439B (en) Task process processing method and device and computer equipment
CN110446118B (en) Video resource preprocessing method and device and video resource downloading method and device
CN114584482B (en) Method, device and network card for storing detection data based on memory
CN115525260A (en) Code generation method and device based on protobuf
CN114595245A (en) Data processing method and device
CN112953993B (en) Resource scheduling method, equipment, network system and storage medium
CN115374852A (en) Abnormal data detection method, device, equipment and storage medium
CN110555075A (en) Data processing method, data processing device, electronic equipment and computer readable storage medium
CN113467823A (en) Configuration information acquisition method, device, system and storage medium
CN111078632B (en) File data management method and device
CN110290517B (en) Digital media wireless wifi communication point reading system and method
US20200257664A1 (en) Node layout determining method and apparatus, computing device, and computer readable medium
CN111522616A (en) Page change method and device
CN111757115A (en) Video stream processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 510660 No. 309, Huangpu Avenue, Tianhe District, Guangzhou City, Guangdong Province 3-04-1

Applicant after: Guangzhou Xishanju Network Technology Co.,Ltd.

Address before: 510660 No. 309, Huangpu Avenue, Tianhe District, Guangzhou City, Guangdong Province 3-04-1

Applicant before: GUANGZHOU SEASUN ENTERTAINMENT NETWORK TECHNOLOGY Co.,Ltd.