CN114968509A - Task execution method and device - Google Patents

Task execution method and device Download PDF

Info

Publication number
CN114968509A
CN114968509A CN202110500620.1A CN202110500620A CN114968509A CN 114968509 A CN114968509 A CN 114968509A CN 202110500620 A CN202110500620 A CN 202110500620A CN 114968509 A CN114968509 A CN 114968509A
Authority
CN
China
Prior art keywords
task
execution
pool
terminal equipment
executed
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
CN202110500620.1A
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.)
China Mobile Communications Group Co Ltd
China Mobile Internet Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Internet 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 China Mobile Communications Group Co Ltd, China Mobile Internet Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202110500620.1A priority Critical patent/CN114968509A/en
Publication of CN114968509A publication Critical patent/CN114968509A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/48Indexing scheme relating to G06F9/48
    • G06F2209/484Precedence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5011Pool
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5021Priority
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a task execution method and a device, and the method comprises the following steps: monitoring the use condition of system resources of the terminal equipment to adjust the execution efficiency level of a task pool of the terminal equipment; acquiring a target task from a service layer of terminal equipment; determining the execution priority of a target task according to a user personalized model of the terminal equipment and task information of the target task, and loading the target task into a task pool as a task to be executed, wherein the user personalized model is obtained by training based on the task information of a user historical task and the historical execution priority; and scheduling and executing the tasks to be executed in the task pool according to the execution efficiency level of the task pool and the execution priority of the tasks to be executed in the task pool. According to the application, the personalized factors of the user are considered, the user experience is good, the dynamic adjustment of the App running efficiency can be realized, and the balance between the system energy consumption of the terminal equipment and the App execution efficiency is realized.

Description

Task execution method and device
Technical Field
The present application relates to the field of internet technologies, and in particular, to a method and an apparatus for task execution.
Background
With the rapid development of the economy and mobile internet industries, smart phones have been widely popularized. The user can install a specific application program App on the smart phone according to the requirement of the user. Correspondingly, in order to maintain the normal operation of the function, the system overhead and the energy consumption required by the operation of the mobile phone are increased.
The technical means of the existing smart phone for managing the App running state mainly include the following steps:
firstly, a system-level visual task manager is provided, after being activated, currently started apps can be displayed, one App can be selected or switched to enter a foreground for operation, and other apps enter a background for operation. If a certain App runs in the background for a long time, when the system memory resource occupies a high level, the App is suspended by the system to release the memory resource.
And secondly, providing a system-level energy-saving mode, such as a low-power mode of the iOS, limiting the activity of the background App after the iOS is started, and the foreground App can acquire the mode of the current system through a system-provided interface and adjust the running state by adopting a strategy (non-mandatory) of the App according to whether the system is in the low-power mode.
And thirdly, the system provides a memory over-occupation warning mechanism for the App. When the memory resource occupied by the App per se is too high to exceed the system threshold, the system triggers an alarm, and the App reduces the memory occupation by limiting or terminating the task execution of the App per se through a business strategy after receiving the alarm.
The prior art has at least the following problems:
the App can only passively start the corresponding operation optimization strategy after receiving system notification or warning, and factors such as habits, hobbies and the like of a user using the App are not taken into consideration, so that the consumption reduction strategy is executed by one-time cutting, and the user experience is poor.
Disclosure of Invention
The embodiment of the application provides a task execution method and device, which take personalized factors of a user into consideration, enable the user to experience better, realize dynamic adjustment of App operation efficiency, and realize balance between system energy consumption of terminal equipment and App execution efficiency.
The embodiment of the application adopts the following technical scheme:
in a first aspect, a task execution method is provided, including:
monitoring the use condition of system resources of the terminal equipment to adjust the execution efficiency level of a task pool of the terminal equipment;
acquiring a target task from a service layer of terminal equipment;
determining the execution priority of the target task according to the user personalized model of the terminal equipment and the task information of the target task, and loading the target task into the task pool as a task to be executed, wherein the user personalized model is obtained based on task information training of a user historical task;
and scheduling and executing the tasks to be executed in the task pool according to the execution efficiency level of the task pool and the execution priority of the tasks to be executed in the task pool.
In a second aspect, a task execution device is provided, which includes:
the level adjusting module is used for monitoring the use condition of system resources of the terminal equipment so as to adjust the execution efficiency level of a task pool of the terminal equipment;
the task acquisition module is used for acquiring a target task from a service layer of the terminal equipment;
the task processing module is used for determining the execution priority of the target task according to the user personalized model of the terminal equipment and the task information of the target task, and loading the target task into the task pool as a task to be executed, wherein the user personalized model is obtained based on task information training of a user historical task;
and the task execution module is used for scheduling and executing the tasks to be executed in the task pool according to the execution efficiency grade of the task pool and the execution priority of the tasks to be executed in the task pool.
The embodiment of the application adopts at least one technical scheme which can achieve the following beneficial effects:
according to the task execution method provided by the embodiment of the application, the execution efficiency level of the task pool of the terminal device is adjusted by monitoring the system resource use condition of the terminal device, the target task from the service layer of the terminal device is obtained, the execution priority of the target task is adjusted according to the user personalized model of the terminal device and the task information of the target task, and the target task is loaded into the task pool as the task to be executed. And scheduling and executing the tasks to be executed in the task pool according to the execution efficiency grade of the task pool and the execution priority of the tasks to be executed in the task pool, so that the dynamic adjustment of the execution efficiency of the tasks to be executed in the task pool is realized, namely the dynamic adjustment of the App operation efficiency can be realized by the method and the device, and the system energy consumption of the terminal device is balanced with the App execution efficiency.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a flowchart illustrating a task execution method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a task performing device according to an embodiment of the present application;
FIG. 3 is a diagram illustrating an example of an application of a task execution method according to an embodiment of the present application;
FIG. 4 is a block diagram of a system environment rating module in a task execution device according to an embodiment of the present application;
FIG. 5 is a block diagram of a task rating module in a task execution device according to an embodiment of the present application;
FIG. 6 is a block diagram of a dynamic task pool module in a task execution device according to an embodiment of the present disclosure;
FIG. 7 is a block diagram of a console module of a task performing device according to an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, the technical solutions of the present application will be clearly and completely described below with reference to specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
Fig. 1 is a flowchart of a task execution method provided in an embodiment of the present application, and as shown in fig. 1, the method includes:
step 101, monitoring the system resource usage of the terminal device to adjust the execution efficiency level of the task pool of the terminal device.
In step 101, the terminal device may be a tablet computer, a smart phone, or the like.
The system resource usage includes: the utilization rate of a CPU, the memory occupancy rate, the power state, the power consumption rate (calculation), the remaining storage space (optional), system level interrupt events (such as conversation, screen locking and the like) and other indexes.
In order to ensure that the execution efficiency level of the task pool of the terminal device can be adjusted in real time according to the use condition of the system resources of the terminal device, the method for monitoring the use condition of the system resources of the terminal device to adjust the execution efficiency level of the task pool of the terminal device comprises the following steps:
monitoring the use condition of system resources of the terminal equipment to determine the execution environment evaluation level of the terminal equipment;
and adjusting the task pool of the terminal equipment to an execution efficiency level corresponding to the execution environment evaluation level of the terminal equipment.
For determining the evaluation level of the execution environment of the terminal device, for example, a scoring criterion of the evaluation level of the execution environment of the terminal device is specified (for example, a score of 10 is classified into a low energy consumption environment state, and a score of 100 is classified into a high energy consumption environment state). Under the index of a single monitoring state, the index is divided into 0-9 points, and the higher the score is, the higher the resource occupation is. And assigning scores to different value ranges under the index according to the service design requirement (for example, the score is 0 when the CPU occupancy rate is 0%, the score is 1 when the CPU occupancy rate is 10%, the score is 9 when the CPU occupancy rate is 90%, and the like), and obtaining the score g of the index according to the actual index condition. Meanwhile, according to the App service requirement, a weight θ can be set between each index, and the score S of each index is θ × g. The sum of the index scores is the environment rating score. And finally, comparing the score with the score standard of the evaluation grade of the execution environment to obtain the evaluation grade of the execution environment.
In particular, the execution environment rating level may include: idle, normal execution, high CPU occupancy, high memory occupancy, low power consumption, comprehensive high energy consumption.
In addition, in order to realize real-time adjustment of the execution efficiency level, the method for monitoring the system resource usage of the terminal device to adjust the execution efficiency level of the task pool of the terminal device includes:
monitoring the use condition of system resources of the terminal equipment;
and when the change rate of the target system resource of the terminal equipment is greater than a preset threshold value, adjusting the execution efficiency level of the task pool of the terminal equipment according to the changed system resource use condition.
In specific implementation, the system resource usage of the terminal device is monitored, and when the target system resource of the terminal device changes greatly, the execution efficiency level of the task pool of the terminal device can be adjusted according to the changed system resource usage so as not to affect the execution efficiency level of the final task pool.
And 102, acquiring a target task of a service layer from the terminal equipment.
And the target task is obtained by encapsulating the service layer according to the service function to be executed of the application program in the terminal equipment.
For the target task, it may be, for example, video decoding, video playing, and the like.
103, determining the execution priority of the target task according to the user personalized model of the terminal device and the task information of the target task, and loading the target task into the task pool as a task to be executed, wherein the user personalized model is obtained by training based on the task information of the historical task and the historical execution priority.
In step 103, the task information of the target task may include: type of task, frequency, timestamp, dependency (if any), etc.
In order to consider personalized factors of a user in the process of executing a task, before determining the execution priority of the target task according to a user personalized model of the terminal equipment and task information of the target task, the method further comprises the following steps:
and downloading a user personalized model corresponding to the user identification from a network server based on the user identification, wherein the network server stores the user personalized model trained on the task information of the user historical task.
Further, to complete the training of the user personalized model, the method further comprises:
acquiring historical task information of a user, wherein the historical task information comprises: task type data, task execution frequency data and task execution timestamp data;
generating a task sample and a task priority label corresponding to the task sample according to the historical task information;
and training the user personalized model based on the task sample and the task priority label corresponding to the task sample.
Based on the training of the user personalized model, in order to realize the prediction of the execution priority of the task to be executed, the method for adjusting the execution priority of the target task according to the user personalized model of the terminal device and the task information of the target task comprises the following steps:
acquiring task sample data corresponding to the task information of the task to be executed;
and predicting the task sample data based on the user personalized model to obtain the execution priority corresponding to the task sample data.
Wherein, the task sample data may be: task type data, task execution frequency data, task execution timestamp data, and the like.
In specific implementation, information such as task type data, task execution frequency data, task execution timestamp, dependency relationship (if existing), service scene sources and the like is counted to form user personalized information, the user personalized information is uploaded to a background server at regular time on the premise that the user allows the user, the background server (based on a deep learning model) analyzes and processes the data, and a personalized model, namely the user personalized model, is customized for the user. After the background server generates the user personalized model, the client is contacted regularly, and the local user personalized model is dynamically updated after the authorization of the user is allowed so as to support the smooth operation of the task rating judgment process.
In order to improve task execution efficiency and ensure smooth execution of tasks, taking the target task as a task to be executed into the task pool comprises the following steps:
and loading the target task to a task queue corresponding to the task type of the target task in the task pool.
In specific implementation, the tasks in the task pool can be realized through queues and multiple threads. Specifically, the default task pool comprises a main synchronous queue (which can directly multiplex a system main queue) and a main asynchronous queue, and the execution of concurrent tasks under different environmental levels by the increasing thread queue and the decreasing thread queue is dynamically controlled according to requirements.
And 104, scheduling and executing the tasks to be executed in the task pool according to the execution efficiency level of the task pool and the execution priority of the tasks to be executed in the task pool.
In step 104, in order to ensure that the tasks in the task pool are sequentially executed according to the priority from high to low within the schedulable range, the scheduling execution of the tasks to be executed in the task pool according to the execution efficiency level of the task pool and the execution priority of the tasks to be executed in the task pool includes:
determining the number of tasks allowed to be simultaneously scheduled in the task pool according to the execution efficiency level of the task pool;
and scheduling the tasks to be executed with high execution priority under the condition that the number of the tasks is not exceeded based on the execution priority of the tasks to be executed in the task pool.
According to the task execution method provided by the embodiment of the application, the execution efficiency level of the task pool of the terminal device is adjusted by monitoring the system resource use condition of the terminal device, the target task from the service layer of the terminal device is obtained, the execution priority of the target task is adjusted according to the user personalized model of the terminal device and the task information of the target task, and the target task is loaded into the task pool as the task to be executed. And scheduling and executing the tasks to be executed in the task pool according to the execution efficiency grade of the task pool and the execution priority of the tasks to be executed in the task pool, so that the dynamic adjustment of the execution efficiency of the tasks to be executed in the task pool is realized, namely the dynamic adjustment of the App operation efficiency can be realized by the method and the device, and the system energy consumption of the terminal device is balanced with the App execution efficiency.
In order to adjust the execution efficiency level of the task pool in real time according to the preference of the user, the method further comprises the following steps:
acquiring the corresponding user preference weight of the execution priority of the task to be executed in the user personalized model;
according to the user preference weight, performing user preference grading on the tasks to be executed in the task pool to determine the priority tasks to be executed;
and when the number of the tasks to be executed preferentially in the task pool exceeds a preset threshold value, adjusting the execution efficiency level of the task pool.
Fig. 2 is a schematic structural diagram of a task execution device according to an embodiment of the present application, and as shown in fig. 2, the task execution device includes:
a level adjustment module 201, configured to monitor a system resource usage of a terminal device to adjust an execution efficiency level of a task pool of the terminal device;
a task obtaining module 202, configured to obtain a target task from a service layer of a terminal device;
the task processing module 203 is configured to determine an execution priority of the target task according to a user personalized model of the terminal device and task information of the target task, and load the target task into the task pool as a task to be executed, where the user personalized model is obtained by training based on task information of a user history task;
and the task execution module 204 is configured to schedule and execute the tasks to be executed in the task pool according to the execution efficiency level of the task pool and the execution priority of the tasks to be executed in the task pool.
The task execution device provided in the embodiment of the present application may further execute the method for executing the task in fig. 1, and implement the functions of the task execution method in the embodiment shown in fig. 1, which are not described herein again in the embodiment of the present application.
The following describes a technical solution of the present application by taking a task execution device provided by the present application as a task manager, as shown in fig. 3:
the task manager is arranged in the App, system environment information, service layer task information and user personalized model information of the terminal equipment are associated in a protocol mode, and the task manager belongs to an intermediate layer of a service layer and a system layer on the architecture level.
When App starts, the task manager starts and initializes accordingly. The following work is mainly completed in the period: 1. completing the information loading of the user personalized model; 2. constructing and monitoring system layer information to acquire the real-time use state of system resources; 3. a dynamic task pool is initialized.
After the App is started, the task manager determines an execution environment evaluation grade according to the system resource use condition (indexes such as CPU utilization rate, memory occupancy rate and battery capacity), and adjusts the task pool of the terminal equipment to an execution efficiency grade corresponding to the execution environment evaluation grade of the terminal equipment;
at the same time, the task manager starts to receive the tasks generated by the business layer:
1. the service layer packages the task of the specific service into a task to be processed by realizing a task module protocol provided by the task manager;
2. the task to be processed reaches the task manager for registration, and the task manager performs rating adjustment on the task to be processed according to the user personalized model and the execution priority of the business layer mark;
3. the to-be-processed tasks which are subjected to the rating adjustment enter a dynamic task pool, and are loaded in a task queue corresponding to the task type to wait for being executed;
4. and when the task queue is idle or the task with higher preorder priority is completely executed, executing the task to be processed.
In the process of receiving task registration, the task manager counts information such as task types, frequency, timestamps, dependency relationships (if existing), service scene sources and the like to form user personalized information, the user personalized information is uploaded to a background server at regular time on the premise that the user allows the user to allow the user to perform analysis processing on the data by the background AI server, and a personalized model is customized for the user; after the completion, the server sends the latest user personalized model to the client regularly, dynamic update is carried out in the task manager, and a task rating standard strategy for subsequent tasks of the user is adjusted, so that the purpose of intelligent personalized execution is achieved.
When the service condition of system resources changes (such as the utilization rate of a CPU and a memory changes, the power consumption rate changes and the like), the task manager evaluates the evaluation level of the execution environment, and if the evaluation level of the execution environment changes, the execution efficiency level of the dynamic task pool is adjusted according to an environment change strategy (which can be preset and also supports the opening of a service layer for self-definition), so that the automatic adjustment of the operating efficiency of the App is realized, and the aim of balancing the system energy consumption and the execution efficiency of the App is fulfilled.
In particular implementations, the task manager may include a system environment rating module, a task rating module, a dynamic task pool module, and a console module.
As shown in fig. 4, the system environment rating module is mainly responsible for monitoring the resource occupation state of the system device and determining the execution environment evaluation level of the task manager according to the resource occupation state;
because system interfaces of App acquiring equipment states in different operating systems are different, the system environment rating module provides:
1. system environment module standard protocol: the App realizes real-time collection of the using states of the system resources by the module through realizing the protocol method under different operating systems;
2. grade scoring standard protocol: the method is realized by a service layer to define a rating standard;
the monitoring status indicators include: terminal CPU utilization, memory utilization, state of charge, charge consumption rate (calculation), remaining storage space (optional), system level interrupt events (such as call, lock screen, etc.), etc.;
the environment rating standard in the scheme is divided by adopting a score value. According to the design requirements of the App, system environment grade scoring standards are specified (for example, the score is 10, the environment is divided into a low energy consumption environment state, and the score is 100, the environment is divided into a high energy consumption environment state). Under the index of a single monitoring state, the index is divided into 0-9 points, and the higher the score is, the higher the resource occupation is. And assigning scores to different value ranges under the index according to the service design requirement (for example, the score is 0 when the CPU occupancy rate is 0%, the score is 1 when the CPU occupancy rate is 10%, the score is 9 when the CPU occupancy rate is 90%, and the like), and obtaining the index score g according to the actual index condition. Meanwhile, according to the App service requirement, a weight θ can be set among the indexes, and the score S of the index is θ × g. The sum of the index scores is the environment rating score. Finally, comparing the grade with the environmental grade standard to obtain the system environmental grade;
after the module finishes the system environment rating, the module executes a system environment strategy to set the dynamic task pool module (specifically, the detailed description is realized in the dynamic task pool module), the strategy provides a personalized setting interface, and an additional strategy can be added to a service layer according to the requirement.
As shown in fig. 5, the task rating module is mainly responsible for performing priority rating on tasks from a business layer, loading the tasks into a task pool to wait for execution, counting type information of the tasks, and analyzing operation habits of a user to generate a user personalized model through a background server supported by a deep learning model.
The task rating module contains three sub-modules: the system comprises a task registration module, a user use habit module and a task rating judgment module.
The task registration module is used for providing a task registration standard protocol, and the service layer customizes a task classification standard and a priority level standard by realizing the protocol. When a business layer generates tasks, the business layer marks the task type of the business layer through a classification label, the business layer arrives at a task registration module for registration, various types of information concerned by the business such as the task type, the business layer requirement priority level, the creation time, the dependency relationship (if existing) and the like are recorded, and a unique task id is distributed.
The user personalization module is mainly used for collecting user task execution information and loading a user personalization model. After the task is registered, the user personalized module collects task information according to the dimensions such as task type, frequency and the like to form a report file, and uploads the report file to a background server for user habit analysis and generation of a user personalized model under the condition that a user allows; after the background server generates the user personalized model, the background server contacts the client regularly, and dynamically updates the local user personalized model after the authorization of the user is allowed so as to support the operation of the task rating judgment module
The task rating judging module depends on the task registering module and the user personalization module. Firstly, the task rating judging module obtains the task priority level scores selected by the service layer for the tasks through the task registering module, wherein the scores are corresponding scores S of the priority levels (the service layer realizes the type standard protocol definition provided by the task registering module, for example, the service layer realizes the protocol definition priority levels through the registering module, if the level gradient scores are 1-5, the priority level scores are all 100, the priority level scores are 100-500); the task rating decision module then passes the userThe personalization module retrieves the corresponding preference weight mu of the task type in the user personalization model. The task priority rating score is P ═ μ × S. And the task rating module loads the tasks into the task pool module according to the scores and waits for execution. In particular, the value H ═ P/S max (wherein S max Scoring the highest priority level of the task type), scoring can set a user preference priority exemption value H according to the requirements of a service layer s (H s Determined by the service layer, to take a number greater than 1). If H is>H s If the priority is higher than the priority of the task, the priority is implemented by adopting a mode of increasing the P value or directly inserting the sequence.
As shown in FIG. 6, the dynamic task pool module is implemented mainly by queues and multithreading; the dynamic task pool module defaults to include a main synchronous queue (a system main queue can be directly multiplexed) and a main asynchronous queue, and dynamically controls the increase and decrease of sub thread queues to respond to concurrent task execution under different environmental levels according to needs;
and the dynamic task pool module schedules the tasks to be executed according to the rating strategy of the environment rating module. By default, the environmental rating scale mainly comprises: idle, normal execution, high CPU occupancy, high memory occupancy, low power consumption, comprehensive high energy consumption. Setting values corresponding to different maximum concurrency numbers, queue waiting time, priority levels and the like for each rating level, and setting and controlling task scheduling efficiency by setting attributes of queues and different threads in the dynamic task pool module; particularly, according to the requirement of an App service scene, a rating grade index can be increased so as to more finely control the execution of a task pool;
an intelligent synergy mechanism: in particular, when H is mentioned above>H s The number of the tasks to be executed in the task pool preferred by the user reaches a certain number C limit When the business layer sets a default value and the user personalized data dynamically updates the optimized weight coefficient, a synergy mechanism is triggered, namely the configuration parameters corresponding to the current environment rating level are temporarily switched to the configuration parameters with higher execution efficiency, and more system resources are provided to complete the accumulated user preference task. When the number is less than the threshold value C limit Rear increaseAnd ending the effect stage, and recovering the corresponding value of the evaluation level of the current execution environment by the configuration parameters.
As shown in fig. 7, the console module is a task manager integrated management module, collects the status control switches of the modules and the task status of the task pool, and can provide an inquiry interface for the service layer, thereby facilitating UI customization and development (optional) of the service layer.
In summary, according to the application, the task manager which associates the hardware performance state, the user use habit and the task execution efficiency in the App is built in the App, fine-granularity App performance overhead management is performed, the system consumption reduction strategy granularity is fine, the specific App can be subjected to customized processing, the user use habit factors are taken into consideration, and the purpose of balancing system energy consumption and App operation overhead and improving user experience is achieved.
Specifically, according to the method and the device, the hardware state of a terminal system is organically related to the task running condition in the App, and the resource overhead condition of system equipment is monitored dynamically to manage the App running condition, so that the App can sense the efficiency state of the system in real time, the task execution strategy of the App can be automatically and dynamically adjusted to achieve the purpose of efficiency balance, and meanwhile, an expansion reference dimension is provided for the design of the future complex business scene of the App.
The method comprises the steps that a plurality of service scenes in the App are abstracted into a task metadata mode through task registration and protocol implementation modes, and distributed service layer module tasks are dispatched in a centralized mode to achieve overall management of the App on all sub modules; and meanwhile, a registration and protocol mode is adopted, so that the modular development and integration practice in the software development process is facilitated, and the development efficiency is improved.
By adopting the current mature machine learning means, the operating habits of the users for using the App are analyzed, the task manager can dynamically schedule tasks according to the using habits of different users, the execution efficiency of the current function module used by the users is fully ensured, the resource overhead of the non-activated module is reduced, the user experience is improved, and the energy consumption balance of the system is considered.
And fourthly, the communication between the application and the system and the service layer is realized in a protocol mode, decoupling is carried out in a layered mode, an expanded port is provided, and the service expansion and the subsequent upgrading of the architecture are facilitated.
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.
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application. Referring to fig. 8, at a hardware level, the electronic device includes a processor, and optionally further includes an internal bus, a network interface, and a memory. The Memory may include a Memory, such as a Random-Access Memory (RAM), and may further include a non-volatile Memory, such as at least 1 disk Memory. Of course, the electronic device may also include hardware required for other services.
The processor, the network interface, and the memory may be connected to each other via an internal bus, which may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 8, but that does not indicate only one bus or one type of bus.
And the memory is used for storing programs. In particular, the program may include program code comprising computer operating instructions. The memory may include both memory and non-volatile storage and provides instructions and data to the processor.
The processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs the computer program, and the task-based execution device is formed on a logic level. The processor is used for executing the program stored in the memory and is specifically used for executing the following operations:
monitoring the use condition of system resources of the terminal equipment to adjust the execution efficiency level of a task pool of the terminal equipment;
acquiring a target task from a service layer of terminal equipment;
determining the execution priority of the target task according to the user personalized model of the terminal equipment and the task information of the target task, and loading the target task into the task pool as a task to be executed, wherein the user personalized model is obtained based on task information of historical tasks and historical execution priority training;
and scheduling and executing the tasks to be executed in the task pool according to the execution efficiency level of the task pool and the execution priority of the tasks to be executed in the task pool.
The method performed by the task execution device according to the embodiment shown in fig. 8 of the present application may be applied to or implemented by a processor. The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or by instructions in the form of software. The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor.
The electronic device may further execute the task execution method in fig. 1, and implement the function of the task execution device in the embodiment shown in fig. 1, which is not described herein again in this embodiment of the present application.
Of course, besides the software implementation, the electronic device of the present application does not exclude other implementations, such as a logic device or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may also be hardware or a logic device.
Embodiments of the present application further provide a computer-readable storage medium storing one or more programs, where the one or more programs include instructions, which, when executed by a portable electronic device including a plurality of application programs, enable the portable electronic device to perform the task execution method in the embodiment shown in fig. 1, and are specifically configured to perform the following operations:
monitoring the use condition of system resources of the terminal equipment to adjust the execution efficiency level of a task pool of the terminal equipment;
acquiring a target task from a service layer of terminal equipment;
determining the execution priority of the target task according to the user personalized model of the terminal equipment and the task information of the target task, and loading the target task into the task pool as a task to be executed, wherein the user personalized model is obtained based on task information of historical tasks and historical execution priority training;
and scheduling and executing the tasks to be executed in the task pool according to the execution efficiency level of the task pool and the execution priority of the tasks to be executed in the task pool.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art to which the present application pertains. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A method of task execution, comprising:
monitoring the use condition of system resources of the terminal equipment to adjust the execution efficiency level of a task pool of the terminal equipment;
acquiring a target task from a service layer of terminal equipment;
determining the execution priority of the target task according to the user personalized model of the terminal equipment and the task information of the target task, and loading the target task into the task pool as a task to be executed, wherein the user personalized model is obtained based on task information training of a user historical task;
and scheduling and executing the tasks to be executed in the task pool according to the execution efficiency level of the task pool and the execution priority of the tasks to be executed in the task pool.
2. The method of claim 1, wherein monitoring system resource usage of the terminal device to adjust the level of performance efficiency of the task pool of the terminal device comprises:
monitoring the use condition of system resources of the terminal equipment to determine the execution environment evaluation level of the terminal equipment;
and adjusting the task pool of the terminal equipment to an execution efficiency level corresponding to the execution environment evaluation level of the terminal equipment.
3. The method of claim 1, wherein monitoring system resource usage of the terminal device to adjust the level of performance efficiency of the task pool of the terminal device comprises:
monitoring the use condition of system resources of the terminal equipment;
and when the change rate of the target system resource of the terminal equipment is greater than a preset threshold value, adjusting the execution efficiency level of the task pool of the terminal equipment according to the changed system resource use condition.
4. The method of claim 1, further comprising:
acquiring historical task information of a user, wherein the historical task information comprises: task type data, task execution frequency data and task execution timestamp data;
generating a task sample and a task priority label corresponding to the task sample according to the historical task information;
and training the user personalized model based on the task sample and the task priority label corresponding to the task sample.
5. The method of claim 1, wherein determining the execution priority of the target task according to the user personalization model of the terminal device and the task information of the target task comprises:
acquiring task sample data corresponding to the task information of the task to be executed;
and predicting the task sample data based on the user personalized model to obtain the execution priority corresponding to the task sample data.
6. The method of claim 1, wherein prior to determining the execution priority of the target task based on the user personalization model of the terminal device and the task information of the target task, the method further comprises:
and downloading a user personalized model corresponding to the user identification from a network server based on the user identification, wherein the network server stores the user personalized model obtained by training task information based on a user historical task.
7. The method of claim 1, wherein scheduling the tasks to be executed in the task pool according to the execution efficiency level of the task pool and the execution priority of the tasks to be executed in the task pool comprises:
determining the number of tasks allowed to be simultaneously scheduled in the task pool according to the execution efficiency level of the task pool;
and scheduling the tasks to be executed with high execution priority under the condition that the number of the tasks is not exceeded based on the execution priority of the tasks to be executed in the task pool.
8. A task execution apparatus, comprising:
the level adjusting module is used for monitoring the use condition of system resources of the terminal equipment so as to adjust the execution efficiency level of a task pool of the terminal equipment;
the task acquisition module is used for acquiring a target task from a service layer of the terminal equipment;
the task processing module is used for determining the execution priority of the target task according to the user personalized model of the terminal equipment and the task information of the target task, and loading the target task into the task pool as a task to be executed, wherein the user personalized model is obtained based on task information training of a user historical task;
and the task execution module is used for scheduling and executing the tasks to be executed in the task pool according to the execution efficiency grade of the task pool and the execution priority of the tasks to be executed in the task pool.
9. An electronic device, comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
monitoring the use condition of system resources of the terminal equipment to adjust the execution efficiency level of a task pool of the terminal equipment;
acquiring a target task from a service layer of terminal equipment;
determining the execution priority of the target task according to the user personalized model of the terminal equipment and the task information of the target task, and loading the target task into the task pool as a task to be executed, wherein the user personalized model is obtained based on task information training of a user historical task;
and scheduling and executing the tasks to be executed in the task pool according to the execution efficiency level of the task pool and the execution priority of the tasks to be executed in the task pool.
10. A computer-readable storage medium storing one or more programs which, when executed by an electronic device including a plurality of application programs, cause the electronic device to perform a method of:
monitoring the use condition of system resources of the terminal equipment to adjust the execution efficiency level of a task pool of the terminal equipment;
acquiring a target task from a service layer of terminal equipment;
determining the execution priority of the target task according to a user personalized model of the terminal equipment and the task information of the target task, and loading the target task serving as a task to be executed into the task pool, wherein the user personalized model is obtained by training based on the task information of the user historical task;
and scheduling and executing the tasks to be executed in the task pool according to the execution efficiency level of the task pool and the execution priority of the tasks to be executed in the task pool.
CN202110500620.1A 2021-05-08 2021-05-08 Task execution method and device Pending CN114968509A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110500620.1A CN114968509A (en) 2021-05-08 2021-05-08 Task execution method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110500620.1A CN114968509A (en) 2021-05-08 2021-05-08 Task execution method and device

Publications (1)

Publication Number Publication Date
CN114968509A true CN114968509A (en) 2022-08-30

Family

ID=82973062

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110500620.1A Pending CN114968509A (en) 2021-05-08 2021-05-08 Task execution method and device

Country Status (1)

Country Link
CN (1) CN114968509A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116661977A (en) * 2023-07-26 2023-08-29 上海任意门科技有限公司 Task management method, device, computing equipment and storage medium
CN116700913A (en) * 2022-09-13 2023-09-05 荣耀终端有限公司 Scheduling method, equipment and storage medium of embedded file system
CN116737672A (en) * 2022-09-13 2023-09-12 荣耀终端有限公司 Scheduling method, equipment and storage medium of file system in embedded operating system
CN116700913B (en) * 2022-09-13 2024-05-31 荣耀终端有限公司 Scheduling method, equipment and storage medium of embedded file system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110162388A (en) * 2019-04-26 2019-08-23 深圳智链物联科技有限公司 A kind of method for scheduling task, system and terminal device
CN111400022A (en) * 2019-01-02 2020-07-10 中国移动通信有限公司研究院 Resource scheduling method and device and electronic equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111400022A (en) * 2019-01-02 2020-07-10 中国移动通信有限公司研究院 Resource scheduling method and device and electronic equipment
CN110162388A (en) * 2019-04-26 2019-08-23 深圳智链物联科技有限公司 A kind of method for scheduling task, system and terminal device

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116700913A (en) * 2022-09-13 2023-09-05 荣耀终端有限公司 Scheduling method, equipment and storage medium of embedded file system
CN116737672A (en) * 2022-09-13 2023-09-12 荣耀终端有限公司 Scheduling method, equipment and storage medium of file system in embedded operating system
CN116737672B (en) * 2022-09-13 2024-04-26 荣耀终端有限公司 Scheduling method, equipment and storage medium of file system in embedded operating system
CN116700913B (en) * 2022-09-13 2024-05-31 荣耀终端有限公司 Scheduling method, equipment and storage medium of embedded file system
CN116661977A (en) * 2023-07-26 2023-08-29 上海任意门科技有限公司 Task management method, device, computing equipment and storage medium
CN116661977B (en) * 2023-07-26 2023-10-24 上海任意门科技有限公司 Task management method, device, computing equipment and storage medium

Similar Documents

Publication Publication Date Title
CN107479951B (en) Process control method and device, storage medium and electronic equipment
US8510747B2 (en) Method and device for implementing load balance of data center resources
US20180052711A1 (en) Method and system for scheduling video analysis tasks
CN107506240B (en) Background application program control method and device, storage medium and electronic equipment
CN114968509A (en) Task execution method and device
CN112380020A (en) Computing power resource allocation method, device, equipment and storage medium
CN111240817B (en) Resource scheduling method, resource scheduling device and storage medium
CN102707995A (en) Service scheduling method and device based on cloud computing environments
CN102708006A (en) Processing optimization load adjustment
CN102981973A (en) Method of executing requests in memory system
CN116225679A (en) Computing power network scheduling method, computing power network scheduling device and storage medium
CN112925634A (en) Heterogeneous resource scheduling method and system
CN117076117A (en) Intelligent media meeting place scheduling method and system based on new communication architecture
CN117395251A (en) Resource scheduling method, device and computer readable storage medium
CN113886030A (en) Resource scheduling method, electronic device and storage medium
US11871263B2 (en) System and method for 5G mobile network management
CN113064677B (en) Application running method and device, storage medium and electronic device
US20230297154A1 (en) Power resource management
Karthikeyan et al. Energy‐aware and SLA‐guaranteed optimal virtual machine swap and migrate system in cloud‐Internet of Things
CN113904940A (en) Resource adjusting method and device, electronic equipment and computer readable storage medium
CN112579257A (en) Scheduling method and device of virtual central processing unit core and related equipment
CN114422565A (en) Network connection management method based on connection pool and related device
CN113992687B (en) Intelligent service cluster scheduling method and device, electronic equipment and storage medium
CN112751685A (en) Method, device and system for configuring user plane capacity of network slice
Meriam et al. Multiple QoS priority based scheduling in cloud computing

Legal Events

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

Application publication date: 20220830