Scheduling method, device, storage medium and terminal device based on terminal device

By configuring the highest priority for the drawing tasks of the terminal device and adopting an absolutely fair scheduling algorithm, the device's lag problem caused by task preemption is solved and the user experience is improved.

CN112799805BActive Publication Date: 2024-09-06HUIZHOU TCL MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110084232.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-21
Publication Date
2024-09-06
Estimated Expiration
2041-01-21

Smart Images

  • Figure CN112799805B
    Figure CN112799805B
Patent Text Reader

Abstract

The present application discloses a scheduling method, device, storage medium and terminal device based on terminal devices, the method comprising obtaining a drawing task in a scheduled task; configuring the obtained drawing task as the highest priority, and scheduling each scheduled task according to the priority corresponding to each scheduled task. The present application configures the drawing task in the scheduled task with the highest priority, so that the terminal device can schedule the drawing task first to ensure the execution time of the drawing task, which can avoid the problem of terminal device display freeze caused by delay in drawing task scheduling due to too many scheduled tasks in the background of the terminal device, thereby improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of terminal equipment, and in particular to a scheduling method, device, storage medium and terminal equipment based on terminal equipment. Background Art

[0002] With the continuous development of computer technology, more and more software is installed on electronic devices such as mobile phones, tablet computers, and desktop computers, and the competition for resources (such as CPU, memory, IO, etc.) on electronic devices is becoming more and more fierce. As a result, when software is running on electronic devices, the electronic devices often freeze or run slowly due to the preemption of various tasks, which brings inconvenience to users.

[0003] Therefore the prior art still needs to be improved and enhanced. Summary of the invention

[0004] The technical problem to be solved by the present application is to provide a scheduling method, device, storage medium and terminal device based on terminal equipment in view of the deficiencies in the prior art.

[0005] In order to solve the above technical problems, the first aspect of the embodiment of the present application provides a scheduling method based on a terminal device, the method comprising:

[0006] Get the drawing task in the scheduled task;

[0007] The obtained drawing task is configured as the highest priority, and each scheduling task is scheduled according to its corresponding priority.

[0008] In the terminal device-based scheduling method, the drawing task includes a drawing task process and a task process that communicates with the drawing task process.

[0009] In the terminal device-based scheduling method, the step of configuring the acquired drawing task as the highest priority specifically includes:

[0010] The acquired drawing tasks are stored in a pre-configured drawing task queue, wherein the drawing task queue is configured with the highest priority and an absolutely fair scheduling algorithm is configured for the drawing task queue.

[0011] In the terminal device-based scheduling method, the priorities corresponding to the drawing tasks in the drawing task queue are the same.

[0012] The terminal device-based scheduling method, wherein the terminal device is pre-set with a drawing task memory; after configuring the acquired drawing task as the highest priority and scheduling each scheduling task according to the priority corresponding to each scheduling task, the method further includes:

[0013] When it is detected that a drawing task applies for memory, the drawing task memory is allocated to the drawing task.

[0014] In the terminal device-based scheduling method, when it is detected that a drawing task applies for memory, allocating the drawing task memory to the drawing task specifically includes:

[0015] When it is detected that the drawing task requests memory, it is detected whether the kernel of the terminal device is in the kernel lock state;

[0016] If it is detected that the kernel of the terminal device is in a kernel lock state, the drawing task is transferred to the head of the waiting queue, and the drawing task memory is preferentially allocated to the drawing task when the kernel of the terminal device wakes up.

[0017] In the terminal device-based scheduling method, the terminal device is pre-configured with a number of dedicated IO sending channels, and each of the several dedicated IO sending channels is used to send an IO request for a drawing task.

[0018] A second aspect of an embodiment of the present application provides a scheduling device, the scheduling device comprising:

[0019] Get the drawing task in the scheduled task;

[0020] The obtained drawing task is configured as the highest priority, and each scheduling task is scheduled according to its corresponding priority.

[0021] A third aspect of an embodiment of the present application provides a computer-readable storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps in any of the terminal device-based scheduling methods described above.

[0022] A fourth aspect of the embodiments of the present application provides a terminal device, comprising: a processor, a memory, and a communication bus; the memory stores a computer-readable program that can be executed by the processor;

[0023] The communication bus realizes the connection and communication between the processor and the memory;

[0024] When the processor executes the computer-readable program, the processor implements the steps in any of the terminal device-based scheduling methods described above.

[0025] Beneficial effects: Compared with the prior art, the present application provides a scheduling method, device, storage medium and terminal device based on terminal devices, the method comprising obtaining a drawing task in a scheduling task; configuring the obtained drawing task as the highest priority, and scheduling each scheduling task according to the priority corresponding to each scheduling task. By configuring the drawing task in the scheduling task with the highest priority, the present application enables the terminal device to schedule the drawing task first to ensure the execution time of the drawing task, which can avoid the problem of terminal device display freeze caused by delays in drawing task scheduling due to too many scheduling tasks in the background of the terminal device, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without inventive work.

[0027] Figure 1 A flowchart of a terminal device-based scheduling method provided in this application.

[0028] Figure 2 Structural principle diagram of the scheduling device provided for this application

[0029] Figure 3 This is a schematic diagram of the structure of the terminal device provided in this application. DETAILED DESCRIPTION

[0030] The present application provides a scheduling method, device, storage medium and terminal device based on terminal equipment. In order to make the purpose, technical solution and effect of the present application clearer and more specific, the present application is further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0031] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.

[0032] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art to which this application belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with those in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as here.

[0033] In a specific implementation, the terminal device described in the embodiments of the present application includes, but is not limited to, other portable devices such as mobile phones with touch-sensitive surfaces (e.g., touch display screens and / or touch pads), laptop computers, or tablet computers. It should also be understood that in some embodiments, the device is not a portable communication device, but a desktop computer with a touch-sensitive surface (e.g., touch display screens and / or touch pads).

[0034] In the following discussion, a terminal device including a display and a touch-sensitive surface is described. However, it should be understood that the terminal device may also include one or more other physical user interface devices such as a physical keyboard, a mouse and / or a joystick.

[0035] The terminal device supports various applications, such as one or more of the following: drawing applications, presentation applications, word processing applications, video conferencing applications, disk burning applications, spreadsheet applications, game applications, telephone applications, video conferencing applications, email applications, instant messaging applications, exercise support applications, photo management applications, data camera applications, digital video camera applications, web browsing applications, digital music player applications and / or digital video playback applications, etc.

[0036] Various applications that can be executed on the terminal device can use at least one common physical user interface device such as a touch-sensitive surface. The first or multiple functions of the touch-sensitive surface and the corresponding information displayed on the terminal can be adjusted and / or changed between applications and / or within the corresponding application. In this way, the common physical framework of the terminal (e.g., the touch-sensitive surface) can support various applications with user interfaces that are intuitive and transparent to the user.

[0037] It should be understood that the sequence numbers and sizes of the steps in this embodiment do not mean the order of execution. The execution order of each process is determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.

[0038] The inventor has found through research that with the continuous development of computer technology, more and more software is installed on electronic devices such as mobile phones, tablet computers, and desktop computers, and the competition for resources (such as CPU, memory, IO, etc.) on electronic devices is becoming more and more fierce. Therefore, when software is running on electronic devices, the electronic devices often freeze or run slowly due to the preemption of various tasks, which brings inconvenience to users.

[0039] In order to solve the above problem, in an embodiment of the present application, a drawing task in a scheduled task is obtained; the obtained drawing task is configured as the highest priority, and each scheduled task is scheduled according to the priority corresponding to each scheduled task. By configuring the drawing task in the scheduled task with the highest priority, the present application enables the terminal device to schedule the drawing task first to ensure the execution time of the drawing task, which can avoid the problem of terminal device display freeze caused by delay in drawing task scheduling due to too many scheduled tasks in the background of the terminal device, thereby improving the user experience.

[0040] The application content is further explained below through the description of embodiments in conjunction with the accompanying drawings.

[0041] This embodiment provides a scheduling method based on terminal equipment, such as Figure 1 As shown, the method includes:

[0042] S10: Obtain drawing tasks in the scheduled tasks.

[0043] Specifically, the drawing task is a task process for executing drawing content-related tasks, and the interface is presented by executing the drawing task, wherein the drawing task may include a drawing task process and a task process communicating with the drawing task process. The drawing task may be a task thread generated by a terminal device in response to a user perception operation, for example, a task thread for drawing an image on an interface, etc. The terminal device is configured with a display interface, for example, an electronic device such as a smart phone, a tablet computer, and a desktop computer. In addition, the scheduling task is a task process in the background, and the generation time of each task process in the background may be the same or different. In other words, all task processes in the background of the terminal device are scheduling tasks, and the generation time of some task processes in all task processes in the background is the same, and the generation time of some task processes is different. Of course, in actual applications, the generation time of each task process in all task processes in the background may be different from each other, or all the same, etc.

[0044] In one implementation of this embodiment, a drawing task may carry a drawing identifier. When obtaining a drawing task in a scheduled task, it may be detected whether each scheduled task carries a drawing identifier to obtain the drawing task in the scheduled task, wherein the drawing identifier may be marked at the Android framework layer. The marking process may specifically be: the drawing process used to perform user-perceived operations is discriminated at the Android framework layer, and the identified drawing process is marked so that the drawing process carries a drawing identifier, wherein the drawing process marked with the drawing identifier is a drawing task. In addition, after marking the identified drawing process, the marked drawing process may be maintained in the kernel's task_struct to facilitate rapid determination of the drawing task in the scheduled task.

[0045] In one implementation of this embodiment, since the drawing task may communicate with other threads during execution, the drawing task can be implemented by cooperating with the drawing thread through other processes. Therefore, when the marked drawing task is maintained in the task_struct of the kernel, it is also possible to monitor in real time whether each drawing task in the task_struct performs cross-process communication; when the drawing task performs cross-process communication, the drawing identifier of the drawing task is passed to the other process, and the other process is maintained in the task_struct, and the other process is marked as a drawing task (that is, the other process is marked so that the other process carries the drawing identifier), so that the service process that communicates with the drawing process is also regarded as a drawing task, which can improve the response speed of the user-perceived operation, thereby reducing the delay and jamming perceived by the user.

[0046] S20: Configure the acquired drawing task as the highest priority, and schedule each scheduling task according to its corresponding priority.

[0047] Specifically, the priority is used to reflect the degree to which the scheduling task is prioritized. The higher the priority, the higher the degree to which the scheduling task is prioritized. Conversely, the lower the priority, the lower the degree to which the scheduling task is prioritized. For example, scheduling task A and scheduling task B, the priority of scheduling task A is higher than the priority of scheduling task B, then scheduling task A is scheduled before scheduling task B. Based on this, the drawing task is configured as the highest priority, so that the drawing task will be scheduled first, thereby avoiding the delay of the drawing task caused by the time consumed by the scheduling of other tasks, and then avoiding the problem of display interface jamming caused by the drawing task. In one implementation of this embodiment, the obtained drawing task can be several drawing tasks, and each drawing task in the several drawing tasks has the same corresponding priority, and is configured as the highest priority. For example, several drawing tasks include drawing task A, drawing task B and drawing task C, then the priority of drawing task A, the priority of drawing task B and the priority of drawing task C are the same, all of which are the highest priority.

[0048] In an implementation of this embodiment, configuring the acquired drawing task as the highest priority specifically includes:

[0049] The acquired drawing tasks are stored in a pre-configured drawing task queue.

[0050] Specifically, the drawing task queue is pre-established and used to store drawing tasks; in other words, only drawing tasks are stored in the drawing task queue, each drawing task is stored in the drawing task queue, and each task in the drawing task queue is a drawing task. The drawing task queue is configured with the highest priority, and each drawing task stored in the drawing task queue is configured with the highest priority, so that each drawing task can be configured with the highest priority and the priorities corresponding to each drawing task can be the same. When scheduling task processes, the kernel of the terminal device will give priority to detecting whether there are drawing tasks stored in the drawing task queue. If there are drawing tasks stored in the drawing task queue, the kernel will give priority to scheduling the drawing tasks in the drawing task queue; if there are no drawing tasks stored in the drawing task queue, the kernel will schedule the scheduled tasks in the background in a normal manner. In other words, the drawing task will be scheduled before the non-drawing task, so that the terminal device can execute the drawing task first, thereby improving the response time of the drawing task, thereby improving the response time of the user-perceived operation, and reducing the freeze and delay felt by the user.

[0051] The drawing task queue is configured with an absolute fair scheduling algorithm to schedule the drawing tasks in the drawing task queue through the absolute fair scheduling algorithm. It is understandable that when the kernel schedules the drawing tasks in the drawing task queue, the absolute fair scheduling algorithm will be used to select the drawing tasks from the drawing task queue to achieve the scheduling of multiple drawing tasks. In this way, by using the absolute fair scheduling algorithm to prioritize the selection of drawing tasks in the drawing task queue, the number of foreground drawing tasks that are active at the same time can be relatively fixed, thereby reducing the scheduling time of the drawing tasks corresponding to the user-perceived operation, thereby reducing the delay of the user-perceived operation. For example, the drawing task queue includes drawing tasks a, drawing tasks b, and drawing tasks c, then the terminal device will determine the scheduling order of drawing tasks a, drawing tasks b, and drawing tasks c based on the absolute fair scheduling algorithm, and schedule drawing tasks a, drawing tasks b, and drawing tasks c according to the scheduling order, and after the scheduling of drawing tasks a, drawing tasks b, and drawing tasks c is completed, the non-drawing tasks in all scheduled tasks will be scheduled.

[0052] In one implementation of this embodiment, in order to improve the response speed of the drawing task, memory space can be reserved for the drawing task in advance. When the drawing task needs to schedule memory, the reserved memory space can be directly allocated to the drawing task. Thus, the terminal device can pre-set the drawing task memory, and the drawing task memory is used to allocate to the drawing task. Accordingly, after configuring the acquired drawing task with the highest priority and scheduling each scheduled task according to the priority corresponding to each scheduled task, the method further includes:

[0053] When it is detected that a drawing task applies for memory, the drawing task memory is allocated to the drawing task.

[0054] Specifically, when the kernel of the terminal device runs a drawing task, it will detect in real time whether the drawing task applies for memory. When the drawing task applies for memory, the free memory in the drawing task memory is directly allocated to the drawing task. In this way, when the kernel allocates memory for the drawing task, it can skip the memory path query process and avoid the time spent on querying the memory path, thereby improving the allocation speed of the memory required for the drawing task, thereby further reducing the user-perceived operation delay and improving the user's experience. In an implementation of this embodiment, the drawing task memory can be configured with a drawing task identifier. When the kernel needs to configure a task for the drawing task, the drawing task memory marked with the drawing task identifier is called, so that the kernel can quickly determine the drawing task memory and improve the drawing task memory allocation speed.

[0055] In an implementation of this embodiment, when it is detected that a drawing task applies for memory, allocating the drawing task memory to the drawing task specifically includes:

[0056] When it is detected that the drawing task requests memory, it is detected whether the kernel of the terminal device is in the kernel lock state;

[0057] If it is detected that the kernel of the terminal device is in a kernel lock state, the drawing task is transferred to the head of the waiting queue, and the drawing task memory is preferentially allocated to the drawing task when the kernel of the terminal device wakes up;

[0058] If it is not in the lock waiting state, the drawing task memory is allocated to the drawing task.

[0059] Specifically, the lock waiting state refers to the kernel of the terminal device having a lock waiting state, and when the kernel has a lock waiting state, the kernel of the terminal device does not perform memory allocation. In addition, each task process that needs to apply for memory needs to queue up and wait for the kernel to wake up (i.e., release the lock waiting state). After the kernel wakes up, the kernel will allocate memory to each task process in sequence according to the queue order. In this embodiment, when the drawing task requires memory allocation and the kernel sends a lock waiting state, the drawing task will be passed to the head of the waiting queue, so that when the lock waiting state is awakened, the drawing task memory will be preferentially allocated to the drawing task, reducing the drawing task waiting time, thereby ensuring the drawing task memory allocation speed. In a specific implementation of this embodiment, when the kernel has a lock waiting state, the kernel (mutex / rwsem / futex) interface can be notified to the holder of the kernel lock through the android virtual machine ART, and the drawing task is added to the head of the waiting queue. When the kernel lock wakes up, the drawing task with the drawing thread identifier in the waiting queue will be awakened first, thereby ensuring that the drawing task has priority in obtaining resources.

[0060] In an implementation of this embodiment, the terminal device is pre-configured with several dedicated IO delivery channels, each of which is used to deliver the IO request of the drawing task. It can be understood that the terminal device pre-configures several dedicated IO delivery channels dedicated to the drawing task, and each dedicated IO delivery channel is only used for the IO delivery of the drawing task, so that the IO delivery of the drawing task can be prevented from being blocked due to the full IO delivery channel queue. For example, the terminal device includes IO delivery channel 1, IO delivery channel 2, IO delivery channel 3 and IO delivery channel 4, and IO delivery channel 1 is used as the dedicated IO delivery channel corresponding to the drawing task. When the IO request of the drawing task is received, the IO request of the drawing task is delivered through IO delivery channel 1. In addition, a drawing flag can be configured for the IO request corresponding to the drawing task, so that the IO request corresponding to the drawing task carries the drawing flag, so that the IO request corresponding to the drawing task can be quickly determined, and the IO request can be delivered through several dedicated IO delivery channels, thereby improving the response speed of the drawing task.

[0061] In one implementation of this embodiment, when sending IO requests through several dedicated IO sending channels, the number of tasks in the request queue corresponding to each dedicated IO sending channel can be detected to select the dedicated IO sending channel with the least number of tasks to send the drawing task. In addition, while detecting the number of tasks in the request queue corresponding to each dedicated IO sending channel, the number of tasks in the request queue corresponding to other IO sending channels configured by the terminal device can also be detected. When there is a target sending channel in which the number of tasks in the request queue is less than the number of tasks in the request queue corresponding to the dedicated IO sending channel, the IO request of the drawing task can be sent through the target sending channel. Of course, in actual applications, when the number of tasks in the request queue corresponding to each dedicated IO sending channel reaches a preset threshold, the IO request of the drawing task can be inserted at the front of the queue of the request queue corresponding to other IO sending channels to improve the response speed of the IO request of the drawing task.

[0062] For example, the terminal device includes IO delivery channel 1, IO delivery channel 2, IO delivery channel 3 and IO delivery channel 4, and IO delivery channel 1 is used as the dedicated IO delivery channel corresponding to the drawing task. The request queue a corresponding to IO delivery channel 1 includes 2 IO requests, the request queue b corresponding to IO delivery channel 2 includes 1 IO request, the request queue c corresponding to IO delivery channel 3 includes 4 IO requests, and the request queue c corresponding to IO delivery channel 4 includes 4 IO requests. Then, the IO request of the drawing task can be added to the request queue b corresponding to IO delivery channel 2, so that the IO request of the drawing task can be delivered through the IO delivery channel 2. For another example, the request queue b corresponding to IO delivery channel 2 includes 3 IO requests, and the number of IO requests included in other request queues remains unchanged. Then, the IO request of the drawing task can be delivered through the dedicated IO delivery channel, or the IO request of the drawing task can be inserted into the head of a target request queue among request queue b, request queue c or request queue d, so that the IO request of the drawing task can be delivered through the IO delivery channel corresponding to the target request queue.

[0063] In order to further illustrate the scheduling method based on the terminal device provided in this embodiment, this embodiment tests the scheduling method based on the terminal device provided in this embodiment. The specific test items and test results are shown in Table 1.

[0064] Table 1 Test items and test results

[0065]

[0066] It can be seen from Table 1 that the system can reach a drawing frame rate of 60fps only when the average drawing time of each frame of the terminal device is less than 16.6ms, and the use will be smoother. It can be seen that in scenarios 1 and 3, the system drawing of the terminal device exceeds 16.6ms and is already in a low frame rate mode of 30fps. After the terminal device applies the scheduling method based on the terminal device provided in this embodiment, the system drawing frame rate reaches 60fps, and the average frame drawing time is shortened by 20%.

[0067] In summary, this embodiment provides a scheduling method based on a terminal device, the method comprising obtaining a drawing task in a scheduled task; configuring the obtained drawing task as the highest priority, and scheduling each scheduled task according to the priority corresponding to each scheduled task. This application configures the drawing task in the scheduled task with the highest priority, so that the terminal device can prioritize the scheduling of the drawing task to ensure the execution time of the drawing task, which can avoid the problem of terminal device display freeze caused by delays in the scheduling of the drawing task due to too many scheduled tasks in the background of the terminal device, thereby improving the user experience.

[0068] Based on the above scheduling method based on terminal equipment, this embodiment provides a scheduling device, such as Figure 2 As shown, the scheduling device includes:

[0069] An acquisition module 100 is used to acquire a drawing task in a scheduled task;

[0070] The scheduling module 200 is used to configure the acquired drawing tasks as the highest priority and schedule each scheduling task according to the priority corresponding to each scheduling task.

[0071] In one embodiment, the drawing task includes a drawing task process and a task process communicating with the drawing task process.

[0072] In one embodiment, the scheduling module is specifically used to:

[0073] The acquired drawing tasks are stored in a pre-configured drawing task queue, wherein the drawing task queue is configured with the highest priority and an absolutely fair scheduling algorithm is configured for the drawing task queue.

[0074] In one embodiment, the priorities corresponding to the drawing tasks in the drawing task queue are the same.

[0075] In one embodiment, the terminal device is pre-set with a drawing task memory; the scheduling device further comprises an allocation module, and the allocation module is used to allocate the drawing task memory to the drawing task when it is detected that the drawing task applies for memory.

[0076] In one embodiment, the allocation module is specifically used to:

[0077] When it is detected that a drawing task applies for memory, it is detected whether the kernel of the terminal device is in a kernel lock state; if it is detected that the kernel of the terminal device is in a kernel lock state, the drawing task is passed to the head of the waiting queue, and the drawing task memory is preferentially allocated to the drawing task when the kernel of the terminal device wakes up.

[0078] In one embodiment, the terminal device is pre-configured with a plurality of dedicated IO sending channels, and each of the plurality of dedicated IO sending channels is used to send an IO request for a drawing task.

[0079] Based on the above-mentioned scheduling method based on terminal devices, this embodiment provides a computer-readable storage medium, which stores one or more programs. The one or more programs can be executed by one or more processors to implement the steps in the scheduling method based on terminal devices as described in the above-mentioned embodiment.

[0080] Based on the above scheduling method based on terminal device, the present application also provides a terminal device, such as Figure 3 As shown, it includes at least one processor (processor) 20; display screen 21; and memory (memory) 22, and may also include a communications interface (Communications Interface) 23 and a bus 24. Among them, the processor 20, the display screen 21, the memory 22 and the communication interface 23 can communicate with each other through the bus 24. The display screen 21 is configured to display a preset user guide interface in the initial setting mode. The communication interface 23 can transmit information. The processor 20 can call the logic instructions in the memory 22 to execute the method in the above embodiment.

[0081] In addition, the logic instructions in the memory 22 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.

[0082] The memory 22 is a computer-readable storage medium that can be configured to store software programs, computer executable programs, such as program instructions or modules corresponding to the methods in the embodiments of the present disclosure. The processor 20 executes functional applications and data processing by running the software programs, instructions or modules stored in the memory 22, that is, implementing the methods in the above embodiments.

[0083] The memory 22 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory 22 may include a high-speed random access memory and may also include a non-volatile memory. For example, a variety of media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, may also be a transient storage medium.

[0084] In addition, the specific process of loading and executing the plurality of instructions in the storage medium and the processor in the mobile terminal has been described in detail in the method above, and will not be described here one by one.

[0085] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A scheduling method based on terminal equipment, It is characterized in that The method comprises: Get the drawing task in the scheduled task; Configure the obtained drawing task as the highest priority, and schedule each scheduling task according to its corresponding priority; The step of configuring the acquired drawing task as the highest priority specifically includes: The acquired drawing tasks are stored in a pre-configured drawing task queue, wherein the drawing task queue is configured with the highest priority, only drawing tasks are stored in the drawing task queue, each drawing task is stored in the drawing task queue, the drawing tasks are scheduled before non-drawing tasks, and the drawing task queue is configured with an absolutely fair scheduling algorithm; The drawing task carries a drawing identifier. When obtaining the drawing task in the scheduled task, it is detected whether each scheduled task carries the drawing identifier to obtain the drawing task in the scheduled task. The drawing identifier is marked in the Android framework layer. The marking process specifically includes: Identify the drawing process used to perform user-perceived operations at the Android framework layer; Marking the identified drawing process so that the drawing process carries a drawing identifier, wherein the drawing process marked with the drawing identifier is a drawing task; Maintain the marked drawing process in the kernel's task_struct; Monitor in real time whether each drawing task in the task_struct performs cross-process communication; When the drawing task performs cross-process communication, the drawing identifier of the drawing task is transferred to the other process, the other process is maintained in the task_struct, and the other process is marked as a drawing task.

2. The terminal device-based scheduling method according to claim 1, It is characterized in that The drawing task includes a drawing task process and a task process communicating with the drawing task process.

3. The terminal device-based scheduling method according to claim 1, It is characterized in that The priorities corresponding to the drawing tasks in the drawing task queue are the same.

4. The terminal device-based scheduling method according to claim 1, It is characterized in that The terminal device is pre-set with a drawing task memory; after configuring the acquired drawing task as the highest priority and scheduling each scheduling task according to the priority corresponding to each scheduling task, the method further includes: When it is detected that a drawing task applies for memory, the drawing task memory is allocated to the drawing task.

5. The terminal device-based scheduling method according to claim 4, It is characterized in that When it is detected that the drawing task applies for memory, allocating the drawing task memory to the drawing task specifically includes: When it is detected that the drawing task requests memory, it is detected whether the kernel of the terminal device is in the kernel lock state; If it is detected that the kernel of the terminal device is in a kernel lock state, the drawing task is transferred to the head of the waiting queue, and the drawing task memory is preferentially allocated to the drawing task when the kernel of the terminal device wakes up.

6. The terminal device-based scheduling method according to claim 1, It is characterized in that The terminal device is pre-configured with a plurality of dedicated IO sending channels, and each of the plurality of dedicated IO sending channels is used to send an IO request for a drawing task.

7. A scheduling device, It is characterized in that The scheduling device comprises: Get the drawing task in the scheduled task; Configure the obtained drawing task as the highest priority, and schedule each scheduling task according to its corresponding priority; The step of configuring the acquired drawing task as the highest priority specifically includes: The acquired drawing tasks are stored in a pre-configured drawing task queue, wherein the drawing task queue is configured with the highest priority, only drawing tasks are stored in the drawing task queue, each drawing task is stored in the drawing task queue, the drawing tasks are scheduled before non-drawing tasks, and the drawing task queue is configured with an absolutely fair scheduling algorithm; The drawing task carries a drawing identifier. When obtaining the drawing task in the scheduled task, it is detected whether each scheduled task carries the drawing identifier to obtain the drawing task in the scheduled task. The drawing identifier is marked in the Android framework layer. The marking process specifically includes: Identify the drawing process used to perform user-perceived operations at the Android framework layer; Marking the identified drawing process so that the drawing process carries a drawing identifier, wherein the drawing process marked with the drawing identifier is a drawing task; Maintain the marked drawing process in the kernel's task_struct; Monitor in real time whether each drawing task in the task_struct performs cross-process communication; When the drawing task performs cross-process communication, the drawing identifier of the drawing task is transferred to the other process, the other process is maintained in the task_struct, and the other process is marked as a drawing task.

8. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps in the terminal device-based scheduling method as described in any one of claims 1-6.

9. A terminal device, It is characterized in that include: Processor, memory and communication bus; The memory stores a computer-readable program executable by the processor; The communication bus realizes the connection and communication between the processor and the memory; When the processor executes the computer-readable program, the steps in the terminal device-based scheduling method as described in any one of claims 1 to 6 are implemented.