CN111580964A - Application task priority allocation method, system and related equipment - Google Patents

Application task priority allocation method, system and related equipment Download PDF

Info

Publication number
CN111580964A
CN111580964A CN202010355554.9A CN202010355554A CN111580964A CN 111580964 A CN111580964 A CN 111580964A CN 202010355554 A CN202010355554 A CN 202010355554A CN 111580964 A CN111580964 A CN 111580964A
Authority
CN
China
Prior art keywords
task
priority
tasks
application
classification item
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
CN202010355554.9A
Other languages
Chinese (zh)
Inventor
张鹏程
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Tuya Information Technology Co Ltd
Original Assignee
Hangzhou Tuya Information 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 Hangzhou Tuya Information Technology Co Ltd filed Critical Hangzhou Tuya Information Technology Co Ltd
Priority to CN202010355554.9A priority Critical patent/CN111580964A/en
Publication of CN111580964A publication Critical patent/CN111580964A/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/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration

Abstract

The embodiment of the invention provides an application task priority allocation method, an application task priority allocation system and related equipment, which are used for improving development efficiency and application task management efficiency. The method provided by the embodiment of the invention comprises the following steps: setting at least two classification items, wherein each classification item comprises at least one application task, and the priority of the application tasks in each classification item is the same; receiving a new task creating request, wherein the new task creating request comprises target classification item information to which a new task belongs; and automatically configuring the priority of the new task according to the current priority order of the target classification item.

Description

Application task priority allocation method, system and related equipment
Technical Field
The present invention relates to the technical field of application task priority assignment, and in particular, to a method, a system, and a related device for assigning application task priorities.
Background
For smart home gateway applications running on an embedded operating system (FreeRTOS system), task priorities need to be defined by the developer at the time of task creation.
In the existing scheme, the user needs to consult all the existing task priority ranks to manually redefine the priority ranks of the new tasks, so that the workload of research and development personnel is increased. Moreover, the priority defined during development is inconvenient to maintain because the priority of each application task needs to be modified if the priorities of a plurality of application tasks need to be modified.
In view of the above, a task priority allocation method for an application needs to be provided.
Disclosure of Invention
The embodiment of the invention provides an application task priority allocation method, an application task priority allocation system and related equipment, which are used for improving development efficiency and application task management efficiency.
A first aspect of an embodiment of the present invention provides an application task priority allocation method, which may include:
setting at least two classification items, wherein each classification item comprises at least one application task, and the priority of the application tasks in each classification item is the same;
receiving a new task creating request, wherein the new task creating request comprises target classification item information to which a new task belongs;
and automatically configuring the priority of the new task according to the current priority order of the target classification item.
Optionally, as a possible implementation manner, the classification items in the embodiment of the present invention may include:
hardware related tasks: a key press task and an indicator light task;
communication message reception task: an IP address allocation task, a serial port receiving task, an mqtt message receiving task, an http message receiving task and a local area network message receiving task;
the timer task is as follows: a software timer task;
emergency service processing tasks: the emergency message processing task of a preset type;
non-emergency business processing tasks: various non-emergency message processing tasks, local automation processing tasks, equipment keep-alive processing tasks and data storage tasks;
managing detection tasks: a network connection state detection task and an abnormality detection processing task.
Optionally, as a possible implementation manner, in the embodiment of the present invention, the automatically configuring the priority of the new task according to the priority order of the target classification item currently includes:
acquiring the priority of all executing tasks in an SDK demo program of an original factory of the embedded equipment, and screening out a system task with the lowest priority in the executing tasks except an idle task of the system;
and taking the priority value of the system task with the lowest priority as the priority value of the application task with the highest priority, and sequentially determining the priority values of the application tasks in the classification items according to the priority sequence of the classification items, wherein the lower the priority value of the application task is, the lower the priority is.
Optionally, as a possible implementation manner, the method for assigning priority of application tasks in the embodiment of the present invention may further include:
outputting priority values of all application tasks;
and receiving a priority setting instruction, and adjusting the priority value of the appointed application task according to the priority setting instruction.
Optionally, as a possible implementation manner, the method for assigning priority of application tasks in the embodiment of the present invention may further include:
and setting the application tasks with high priority to be executed preferentially, and executing the application tasks with the same priority in turn according to a time slice rotation mode.
A second aspect of an embodiment of the present invention provides an application task priority assignment system, which may include:
the device comprises a setting unit, a judging unit and a judging unit, wherein the setting unit is used for setting at least two classification items, each classification item comprises at least one application task, and the priority of the application tasks in each classification item is the same;
the first receiving unit is used for receiving a new task creating request, and the new task creating request comprises target classification item information to which a new task belongs;
and the configuration unit is used for automatically configuring the priority of the new task according to the current priority order of the target classification item.
Optionally, the classification items in the embodiment of the present invention may include:
hardware related tasks: a key press task and an indicator light task;
communication message reception task: an IP address allocation task, a serial port receiving task, an mqtt message receiving task, an http message receiving task and a local area network message receiving task;
the timer task is as follows: a software timer task;
emergency service processing tasks: the emergency message processing task of a preset type;
non-emergency business processing tasks: various non-emergency message processing tasks, local automation processing tasks, equipment keep-alive processing tasks and data storage tasks;
managing detection tasks: a network connection state detection task and an abnormality detection processing task.
Optionally, as a possible implementation manner, the configuration unit in the embodiment of the present invention may include:
the acquisition module is used for acquiring the priorities of all execution tasks in an SDK demo program of an original factory of the embedded equipment and screening out a system task with the lowest priority from the execution tasks except the idle tasks of the system;
and the distribution module is used for taking the priority value of the system task with the lowest priority as the priority value of the application task with the highest priority, and sequentially determining the priority values of the application tasks in all the classification items according to the priority sequence of all the classification items, wherein the lower the priority value of the application task is, the lower the priority is.
Optionally, as a possible implementation manner, the assigning priority of the application task in the embodiment of the present invention may further include:
the output unit is used for outputting the priority values of all the application tasks;
and the second receiving unit is used for receiving the priority setting instruction and adjusting the priority value of the specified application task according to the priority setting instruction.
Optionally, as a possible implementation manner, the application task priority assignment system in the embodiment of the present invention may further include:
and the processing unit sets the application tasks with high priority to be executed preferentially, and the application tasks with the same priority are executed in turn according to a time slice rotation mode.
A third aspect of an embodiment of the present invention provides an embedded device, where the embedded device includes a processor, and the processor is configured to implement the steps in any one of the possible implementation manners of the first aspect and the first aspect when executing a computer program stored in a memory.
A fourth aspect of the embodiments of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps in any one of the possible implementations of the first aspect and the first aspect.
According to the technical scheme, the embodiment of the invention has the following advantages:
in the embodiment of the invention, the application task priority allocation system can set at least two classification items, each classification item comprises at least one application task, the priority of the application task in each classification item is the same, and the priority of the new task is automatically allocated according to the priority sequence of the target classification item to which the new task belongs in the new task creation request. Compared with the prior art, the method and the device have the advantages that the user does not need to consult all the existing task priority ranks, the priority rank of the new task does not need to be defined manually, the automatic configuration of the priority of the new task can be realized, and the development efficiency is improved. Meanwhile, the priorities of a plurality of applications can be managed in a centralized manner, the priority of each application does not need to be adjusted one by one, and the management efficiency is improved.
Drawings
FIG. 1 is a diagram illustrating an embodiment of an application task priority assignment method according to an embodiment of the present invention;
FIG. 2 is a diagram of an embodiment of an application task priority assignment method according to the present invention;
FIG. 3 is a diagram illustrating an embodiment of an application task priority assignment system, in accordance with an embodiment of the present invention;
fig. 4 is a schematic diagram of an embodiment of an embedded device in an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides an application task priority allocation method, an application task priority allocation system and related equipment, which are used for improving development efficiency and application task management efficiency.
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The embedded equipment is widely applied to intelligent home, and the user can manually redefine the priority ranking of the new task only by looking up the existing priority ranking of all tasks, so that the workload of research and development personnel is increased. In the embodiment of the invention, the classification and priority definition of the application tasks are carried out, the tasks of different classes are corresponding to different priorities, and a developer can select the corresponding task priority according to the class of the task. The task priority distribution of the real-time operating system can be simplified and rationalized, a developer has reference to the task priority distribution when creating a new task, and the reasonable priority can be selected without paying attention to the priority of other tasks, so that the multi-task program can stably and efficiently run in the FreeRTOS real-time operating system.
For convenience of understanding, a specific flow in the embodiment of the present invention is described below, and referring to fig. 1, an embodiment of a method for assigning task priorities in the embodiment of the present invention may include:
101. setting at least two classification items, wherein each classification item comprises at least one application task, and the priority of the application tasks in each classification item is the same;
in order to facilitate the distribution and management of the application task priorities, in the embodiment of the invention, the application tasks are classified in advance, at least two classification items are set, each classification item comprises at least one application task, and the application tasks in each classification item have the same priority.
Optionally, as a possible implementation manner, the classification items in the embodiment of the present invention may include the following:
hardware related tasks: a key press task and an indicator light task;
communication message reception task: an IP address allocation task, a serial port receiving task, an mqtt message receiving task, an http message receiving task and a local area network message receiving task;
the timer task is as follows: a software timer task;
emergency service processing tasks: the emergency message processing task of a preset type (can be specifically set according to requirements, and is not limited);
non-emergency business processing tasks: various non-emergency message processing tasks, local automation processing tasks, equipment keep-alive processing tasks and data storage tasks;
managing detection tasks: a network connection state detection task and an abnormality detection processing task.
After the classification items are set, the subsequent developers can find the classification items to which the new tasks to be created belong only by contrasting the classification items.
102. Receiving a new task creating request, wherein the new task creating request comprises target classification item information to which a new task belongs;
when a new task needs to be created, the system can receive a new task creation request, wherein the new task creation request comprises target classification item information to which the new task belongs. For example, the serial port receiving task belongs to the communication message receiving task.
103. And automatically configuring the priority of the new task according to the priority sequence of the current target classification item.
In the embodiment of the invention, the priorities of the application tasks belonging to the same classification item can be uniformly managed, and the priorities of the application tasks in each classification item are the same. The priority order of each classification item may be preset, and exemplary may be set as follows:
first-level priority: hardware related tasks;
secondary priority: a message receiving task, a timer task and an emergency service processing task;
three-level priority: non-emergency service processing tasks;
four levels of priority: and managing the detection type task.
After the target classification item of the new task is acquired, the priority of the new task can be automatically configured according to the priority sequence of the target classification item at present. Optionally, the application tasks with high priority may be set to be executed preferentially, and the application tasks with the same priority are executed in turn in a time slice rotation manner.
It can be understood that the specific classification item sequence can be dynamically adjusted according to requirements, and compared with the prior art, the priority of multiple applications can be simultaneously managed in a centralized manner, the priority of each application does not need to be adjusted one by one, and the management efficiency is improved.
In the embodiment of the invention, the application task priority allocation system can set at least two classification items, each classification item comprises at least one application task, the priority of the application task in each classification item is the same, and the priority of the new task is automatically allocated according to the priority sequence of the target classification item to which the new task belongs in the new task creation request. Compared with the prior art, the method and the device have the advantages that the user does not need to consult all the existing task priority ranks, the priority rank of the new task does not need to be defined manually, the automatic configuration of the priority of the new task can be realized, and the development efficiency is improved. Meanwhile, the priorities of a plurality of applications can be managed in a centralized manner, the priority of each application does not need to be adjusted one by one, and the management efficiency is improved.
On the basis of the embodiment shown in fig. 1, optionally, as a possible implementation manner, the process of automatically configuring the priority of the new task according to the priority order in which the target classification item is currently located may include the following steps:
acquiring the priority of all executing tasks in an SDK demo program of an original factory of the embedded equipment, and screening out a system task with the lowest priority in the executing tasks except an idle task of the system; and taking the priority value of the system task with the lowest priority as the priority value of the application task with the highest priority, and sequentially determining the priority values of the application tasks in the classification items according to the priority sequence of the classification items, wherein the lower the priority value of the application task is, the lower the priority is. For example, the SDK demo program of the factory of origin may be executed, the API interfaces (uxtasketnumberoftasks and uxtasketsystemstate) in the FreeRTOS are used to obtain the priorities of all executed tasks of the SDK demo of the factory of origin, and the priority value of the task with the lowest priority is screened out. It should be noted that the task with the lowest priority refers to a task with the lowest priority other than the task with the priority of 0. Wherein, the task with the priority 0 is the idle task of the system, and the lower the priority of the FreeRTOS system is, the smaller the value is.
On the basis of any of the above embodiments, in order to facilitate a user to adjust an application priority in a personalized manner, optionally, as a possible implementation manner, the application task priority assignment system in the embodiment of the present invention may output priority values of all application tasks, may receive a priority setting instruction, and adjust a priority value of a designated application task according to the priority setting instruction.
For ease of understanding, referring to fig. 2, the application task priority assignment method in the embodiment of the present invention will be described below with reference to a specific application embodiment.
Common application tasks may include: the system comprises a key task, an indicator light task, a software timer task, an IP address allocation task, a serial port receiving task, an mqtt message receiving task, an http message receiving task, a local area network message receiving task, various emergency message processing tasks, various non-emergency message processing tasks, a local automation processing task, an equipment keep-alive processing task, a network connection state detection task and an abnormality detection processing task.
In this embodiment, common application tasks may be classified as: hardware related tasks, communication message receiving tasks, timer tasks, emergency service processing tasks, non-emergency service processing tasks and management detection tasks. The specific application tasks belong to the following categories:
hardware related tasks: a key press task and an indicator light task;
communication message reception task: an IP address allocation task, a serial port receiving task, an mqtt message receiving task, an http message receiving task and a local area network message receiving task;
the timer task is as follows: a software timer task;
emergency service processing tasks: the emergency message processing task of a preset type;
non-emergency business processing tasks: various non-emergency message processing tasks, local automation processing tasks, equipment keep-alive processing tasks and data storage tasks;
managing detection tasks: a network connection state detection task and an abnormality detection processing task.
In this embodiment, the priority of the application task in each task category may be preset, and according to the application task priority assignment principle, the task priority may be divided into 4 levels from high to low, and the task in the well-assigned category is assigned to each priority category:
first-level priority: hardware related tasks;
secondary priority: a message receiving task, a timer task and an emergency service processing task;
three-level priority: non-emergency service processing tasks;
four levels of priority: and managing the detection type task.
The priority assignment results shown in fig. 2 are obtained according to the above-described classification. When a new task is created, firstly, the attribution of the new task is determined according to the application task classification, if the classification is not met, the task is split into the tasks meeting the classification to meet the application task priority distribution principle, and then the priority distribution is carried out according to the following steps.
The specific application task priority allocation implementation flow is as follows:
step one, executing an original plant SDK demo program, acquiring priorities of all executed tasks of the original plant SDK demo by utilizing API (application program interface) interfaces uxTaskGetNumberOfTasks and uxTaskGetSystemState in the FreeRTOS, and screening out the priority value of the task with the lowest priority (note: except the task with the priority of 0, the task with the priority of 0 is a system idle task, and the lower the priority of the FreeRTOS system is, the smaller the numerical value is).
And step two, taking the screened priority values as the highest priority values of the application tasks, namely, the priority levels of the first level, and sequentially decreasing the priority values of other levels.
And step three, filling corresponding priority levels in the tasks during creation according to the application task priority allocation method described above.
And step four, executing a user program, and printing and outputting the priorities of all tasks for the user to check.
And step five, in the program execution process, printing running time statistics of each task at intervals for a user to refer to whether the task needs to be adjusted (whether the task needs to be split and recombined) and the priority needs to be reclassified, and if so, re-executing from the step two after adjustment.
In the embodiment, the application task priority distribution in the embedded operating system (FreeRTOS) is simplified, the task priority distribution has reference when a developer creates a new task, and the reasonable priority can be selected without paying attention to the priority of other tasks, so that the multitask program can stably and efficiently run in the FreeRTOS real-time operating system.
Referring to fig. 3, an embodiment of the present invention further provides an application task priority assignment system, which may include:
a setting unit 301, configured to set at least two classification items, where each classification item includes at least one application task, and priorities of the application tasks in each classification item are the same;
a first receiving unit 302, configured to receive a new task creation request, where the new task creation request includes target classification item information to which a new task belongs;
the configuration unit 303 is configured to automatically configure the priority of the new task according to the priority order of the target classification item currently located.
Optionally, the classification items in the embodiment of the present invention may include:
hardware related tasks: a key press task and an indicator light task;
communication message reception task: an IP address allocation task, a serial port receiving task, an mqtt message receiving task, an http message receiving task and a local area network message receiving task;
the timer task is as follows: a software timer task;
emergency service processing tasks: the emergency message processing task of a preset type;
non-emergency business processing tasks: various non-emergency message processing tasks, local automation processing tasks, equipment keep-alive processing tasks and data storage tasks;
managing detection tasks: a network connection state detection task and an abnormality detection processing task.
Optionally, as a possible implementation manner, the configuration unit in the embodiment of the present invention may include:
the acquisition module is used for acquiring the priorities of all execution tasks in an SDK demo program of an original factory of the embedded equipment and screening out a system task with the lowest priority from the execution tasks except the idle tasks of the system;
and the distribution module is used for taking the priority value of the system task with the lowest priority as the priority value of the application task with the highest priority, and sequentially determining the priority values of the application tasks in all the classification items according to the priority sequence of all the classification items, wherein the lower the priority value of the application task is, the lower the priority is.
Optionally, as a possible implementation manner, the assigning priority of the application task in the embodiment of the present invention may further include:
the output unit is used for outputting the priority values of all the application tasks;
and the second receiving unit is used for receiving the priority setting instruction and adjusting the priority value of the specified application task according to the priority setting instruction.
Optionally, as a possible implementation manner, the application task priority assignment system in the embodiment of the present invention may further include:
and the processing unit sets the application tasks with high priority to be executed preferentially, and the application tasks with the same priority are executed in turn according to a time slice rotation mode.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The web graph editor in the embodiment of the present invention is described above from the perspective of the modular functional entity, please refer to fig. 4, and the embedded device in the embodiment of the present invention is described below from the perspective of hardware processing:
the embedded device 1 may include a memory 11, a processor 12, and an input output bus 13. The processor 11, when executing the computer program, implements the steps in the above-described embodiment of the application task priority assignment method shown in fig. 1, such as the steps 101 to 103 shown in fig. 1. Alternatively, the processor, when executing the computer program, implements the functions of each module or unit in the above-described device embodiments.
In some embodiments of the present invention, the processor is specifically configured to implement the following steps:
setting at least two classification items, wherein each classification item comprises at least one application task, and the priority of the application tasks in each classification item is the same;
receiving a new task creating request, wherein the new task creating request comprises target classification item information to which a new task belongs;
and automatically configuring the priority of the new task according to the priority sequence of the current target classification item.
Optionally, as a possible implementation manner, the processor may be further configured to implement the following steps:
acquiring the priority of all executing tasks in an SDK demo program of an original factory of the embedded equipment, and screening out a system task with the lowest priority in the executing tasks except an idle task of the system;
and taking the priority value of the system task with the lowest priority as the priority value of the application task with the highest priority, and sequentially determining the priority values of the application tasks in the classification items according to the priority sequence of the classification items, wherein the lower the priority value of the application task is, the lower the priority is.
Optionally, as a possible implementation manner, the processor may be further configured to implement the following steps:
outputting priority values of all application tasks;
and receiving a priority setting instruction, and adjusting the priority value of the specified application task according to the priority setting instruction.
Optionally, as a possible implementation manner, the processor may be further configured to implement the following steps:
and setting the application tasks with high priority to be executed preferentially, and executing the application tasks with the same priority in turn according to a time slice rotation mode.
The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, and the like. The memory 11 may in some embodiments be an internal storage unit of the embedded device 1, for example a hard disk of the embedded device 1. The memory 11 may also be an external storage device of the embedded device 1 in other embodiments, such as a plug-in hard disk provided on the embedded device 1, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and so on. Further, the memory 11 may also include both an internal storage unit and an external storage device of the embedded device 1. The memory 11 may be used not only to store application software installed in the embedded device 1 and various types of data, such as the code of the computer program 01, but also to temporarily store data that has been output or is to be output.
The processor 12 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor or other data Processing chip in some embodiments, and is used for executing program codes stored in the memory 11 or Processing data, such as executing the computer program 01.
The input/output bus 13 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc.
Further, the embedded device may further include a wired or wireless network interface 14, and the network interface 14 may optionally include a wired interface and/or a wireless interface (such as a WI-FI interface, a bluetooth interface, etc.), which are generally used for establishing a communication connection between the embedded device 1 and other electronic devices.
Optionally, the embedded device 1 may further include a user interface, the user interface may include a Display (Display), an input unit such as a Keyboard (Keyboard), and optionally, the user interface may further include a standard wired interface and a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the embedded device 1 and for displaying a visualized user interface.
Fig. 4 only shows the embedded device 1 with components 11-14 and the computer program 01, and it will be understood by those skilled in the art that the structure shown in fig. 4 does not constitute a limitation of the embedded device 1, and may comprise fewer or more components than shown, or a combination of certain components, or a different arrangement of components.
The present invention also provides a computer-readable storage medium having a computer program stored thereon, which when executed by a processor, performs the steps of:
setting at least two classification items, wherein each classification item comprises at least one application task, and the priority of the application tasks in each classification item is the same;
receiving a new task creating request, wherein the new task creating request comprises target classification item information to which a new task belongs;
and automatically configuring the priority of the new task according to the priority sequence of the current target classification item.
Optionally, as a possible implementation manner, the processor may be further configured to implement the following steps:
acquiring the priority of all executing tasks in an SDK demo program of an original factory of the embedded equipment, and screening out a system task with the lowest priority in the executing tasks except an idle task of the system;
and taking the priority value of the system task with the lowest priority as the priority value of the application task with the highest priority, and sequentially determining the priority values of the application tasks in the classification items according to the priority sequence of the classification items, wherein the lower the priority value of the application task is, the lower the priority is.
Optionally, as a possible implementation manner, the processor may be further configured to implement the following steps:
outputting priority values of all application tasks;
and receiving a priority setting instruction, and adjusting the priority value of the specified application task according to the priority setting instruction.
Optionally, as a possible implementation manner, the processor may be further configured to implement the following steps:
and setting the application tasks with high priority to be executed preferentially, and executing the application tasks with the same priority in turn according to a time slice rotation mode.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. An application task priority assignment method, comprising:
setting at least two classification items, wherein each classification item comprises at least one application task, and the priority of the application tasks in each classification item is the same;
receiving a new task creating request, wherein the new task creating request comprises target classification item information to which a new task belongs;
and automatically configuring the priority of the new task according to the current priority order of the target classification item.
2. The method of claim 1, wherein the at least two classification terms comprise:
hardware related tasks: a key press task and an indicator light task;
communication message reception task: an IP address allocation task, a serial port receiving task, an mqtt message receiving task, an http message receiving task and a local area network message receiving task;
the timer task is as follows: a software timer task;
emergency service processing tasks: the emergency message processing task of a preset type;
non-emergency business processing tasks: various non-emergency message processing tasks, local automation processing tasks, equipment keep-alive processing tasks and data storage tasks;
managing detection tasks: a network connection state detection task and an abnormality detection processing task.
3. The method according to claim 1 or 2, wherein automatically configuring the priority of the new task according to the priority order in which the target classification item is currently located comprises:
acquiring the priority of all executing tasks in an SDK demo program of an original factory of the embedded equipment, and screening out a system task with the lowest priority in the executing tasks except an idle task of the system;
and taking the priority value of the system task with the lowest priority as the priority value of the application task with the highest priority, and sequentially determining the priority values of the application tasks in the classification items according to the priority sequence of the classification items, wherein the lower the priority value of the application task is, the lower the priority is.
4. The method of claim 3, further comprising:
outputting priority values of all application tasks;
and receiving a priority setting instruction, and adjusting the priority value of the appointed application task according to the priority setting instruction.
5. The method of claim 3, further comprising:
and setting the application tasks with high priority to be executed preferentially, and executing the application tasks with the same priority in turn according to a time slice rotation mode.
6. An application task priority assignment system, comprising:
the device comprises a setting unit, a judging unit and a judging unit, wherein the setting unit is used for setting at least two classification items, each classification item comprises at least one application task, and the priority of the application tasks in each classification item is the same;
the first receiving unit is used for receiving a new task creating request, and the new task creating request comprises target classification item information to which a new task belongs;
and the configuration unit is used for automatically configuring the priority of the new task according to the current priority order of the target classification item.
7. The system of claim 6, wherein the configuration unit comprises:
the acquisition module is used for acquiring the priorities of all execution tasks in an SDK demo program of an original factory of the embedded equipment and screening out a system task with the lowest priority from the execution tasks except the idle tasks of the system;
and the distribution module is used for taking the priority value of the system task with the lowest priority as the priority value of the application task with the highest priority, and sequentially determining the priority values of the application tasks in all the classification items according to the priority sequence of all the classification items, wherein the lower the priority value of the application task is, the lower the priority is.
8. The system of claim 7, further comprising:
the output unit is used for outputting the priority values of all the application tasks;
and the second receiving unit is used for receiving the priority setting instruction and adjusting the priority value of the appointed application task according to the priority setting instruction.
9. An embedded device, characterized in that the embedded device comprises a processor for implementing the steps of the method according to any one of claims 1 to 5 when executing a computer program stored in a memory.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that: the computer program when executed by a processor implementing the steps of the method according to any one of claims 1 to 5.
CN202010355554.9A 2020-04-29 2020-04-29 Application task priority allocation method, system and related equipment Pending CN111580964A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010355554.9A CN111580964A (en) 2020-04-29 2020-04-29 Application task priority allocation method, system and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010355554.9A CN111580964A (en) 2020-04-29 2020-04-29 Application task priority allocation method, system and related equipment

Publications (1)

Publication Number Publication Date
CN111580964A true CN111580964A (en) 2020-08-25

Family

ID=72126367

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010355554.9A Pending CN111580964A (en) 2020-04-29 2020-04-29 Application task priority allocation method, system and related equipment

Country Status (1)

Country Link
CN (1) CN111580964A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112330163A (en) * 2020-11-09 2021-02-05 北京元心科技有限公司 Task allocation method, system, electronic device and computer readable storage medium

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103838628A (en) * 2012-11-21 2014-06-04 腾讯科技(深圳)有限公司 Window management method and system
CN104104620A (en) * 2013-04-15 2014-10-15 国际商业机器公司 Virtual enhanced transmission selection (VETS) for lossless ethernet
US20170337091A1 (en) * 2016-05-17 2017-11-23 International Business Machines Corporation Allocating compute offload resources
CN107784434A (en) * 2017-09-29 2018-03-09 平安科技(深圳)有限公司 A kind of distribution method, storage medium and the server of task of attending a banquet
CN107977268A (en) * 2017-10-13 2018-05-01 北京百度网讯科技有限公司 Method for scheduling task, device and the computer-readable recording medium of the isomerization hardware of artificial intelligence
CN108124003A (en) * 2017-12-11 2018-06-05 中盈优创资讯科技有限公司 Network management device connection processing method, apparatus and system
CN109885399A (en) * 2019-01-17 2019-06-14 平安普惠企业管理有限公司 Data processing method, electronic device, computer equipment and storage medium
CN110347602A (en) * 2019-07-11 2019-10-18 中国工商银行股份有限公司 Multitask script execution and device, electronic equipment and readable storage medium storing program for executing
CN110413404A (en) * 2019-06-18 2019-11-05 平安科技(深圳)有限公司 Resource allocation methods, device, equipment and storage medium priority-based
CN110673944A (en) * 2018-07-03 2020-01-10 杭州海康威视数字技术股份有限公司 Method and device for executing task
CN110738395A (en) * 2019-09-18 2020-01-31 平安银行股份有限公司 service data processing method and device

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103838628A (en) * 2012-11-21 2014-06-04 腾讯科技(深圳)有限公司 Window management method and system
CN104104620A (en) * 2013-04-15 2014-10-15 国际商业机器公司 Virtual enhanced transmission selection (VETS) for lossless ethernet
US20170337091A1 (en) * 2016-05-17 2017-11-23 International Business Machines Corporation Allocating compute offload resources
CN107784434A (en) * 2017-09-29 2018-03-09 平安科技(深圳)有限公司 A kind of distribution method, storage medium and the server of task of attending a banquet
CN107977268A (en) * 2017-10-13 2018-05-01 北京百度网讯科技有限公司 Method for scheduling task, device and the computer-readable recording medium of the isomerization hardware of artificial intelligence
CN108124003A (en) * 2017-12-11 2018-06-05 中盈优创资讯科技有限公司 Network management device connection processing method, apparatus and system
CN110673944A (en) * 2018-07-03 2020-01-10 杭州海康威视数字技术股份有限公司 Method and device for executing task
CN109885399A (en) * 2019-01-17 2019-06-14 平安普惠企业管理有限公司 Data processing method, electronic device, computer equipment and storage medium
CN110413404A (en) * 2019-06-18 2019-11-05 平安科技(深圳)有限公司 Resource allocation methods, device, equipment and storage medium priority-based
CN110347602A (en) * 2019-07-11 2019-10-18 中国工商银行股份有限公司 Multitask script execution and device, electronic equipment and readable storage medium storing program for executing
CN110738395A (en) * 2019-09-18 2020-01-31 平安银行股份有限公司 service data processing method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112330163A (en) * 2020-11-09 2021-02-05 北京元心科技有限公司 Task allocation method, system, electronic device and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN104360878B (en) A kind of method and device of application software deployment
CN105786600A (en) Task scheduling method and device
CN111464659A (en) Node scheduling method, node pre-selection processing method, device, equipment and medium
CN110716796A (en) Intelligent task scheduling method and device, storage medium and electronic equipment
CN109840142A (en) Thread control method, device, electronic equipment and storage medium based on cloud monitoring
CN110633135A (en) Asynchronous task allocation method and device, computer equipment and storage medium
CN109839910B (en) Control device, control method, and computer-readable storage medium
CN109840141A (en) Thread control method, device, electronic equipment and storage medium based on cloud monitoring
CN110912967A (en) Service node scheduling method, device, equipment and storage medium
CN111580964A (en) Application task priority allocation method, system and related equipment
CN117331678B (en) Heterogeneous computing power federation-oriented multi-cluster job resource specification computing method and system
CN114629960A (en) Resource scheduling method, device, system, device, medium, and program product
CN108965403B (en) Operation and maintenance monitoring connection establishing method and terminal equipment
CN106874129B (en) Method for determining process scheduling sequence of operating system and control method
CN111459510A (en) Cross-network operating system installation method and device, electronic equipment and medium
CN111988429A (en) Algorithm scheduling method and system
CN108733536A (en) Monitoring management system and method
CN109739868B (en) Data processing method and related equipment thereof
US20050138625A1 (en) Configuration management resource specification database design
CN111885159B (en) Data acquisition method and device, electronic equipment and storage medium
CN113626189B (en) Method, device and medium for constructing resource management model
CN114862223A (en) Robot scheduling method, device, equipment and storage medium
CN113918305A (en) Node scheduling method and device, electronic equipment and readable storage medium
CN113127289B (en) Resource management method, computer equipment and storage medium based on YARN cluster
CN109962941A (en) Communication means, device and server

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