Frame task scheduling method and device, equipment, medium and program product

By dividing and preloading frame tasks in the mobile device user interface and dynamically scheduling preloading tasks, the event response delay problem caused by overlong frames is solved, achieving faster response time and better user experience.

CN118550658APending Publication Date: 2024-08-27HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310225765.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-02-27
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

When the user interface graphics system of mobile devices processes ultra-long frames, it causes event response delays and freezes. Existing technologies are difficult to effectively solve this problem, especially under hardware performance limitations, which cannot increase the frame rate to improve responsiveness.

Method used

By dividing the frames of multiple control loading tasks, preloading tasks are generated, and these tasks are processed when specific events are detected. The idle time of the second type frame is used to perform preloading tasks in advance, and unnecessary frames are dynamically deleted for release. resources to implement overall scheduling of frame task processing.

Benefits of technology

Significantly improves the responsiveness to specific events, shortens event blocking time, and improves the response speed and user experience of the user interface.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118550658A
    Figure CN118550658A
Patent Text Reader

Abstract

The invention relates to a frame task scheduling method and device, equipment, a medium and a program product. In the embodiment of the invention, by taking a control loading task as a unit, a first type frame comprising a plurality of control loading tasks is segmented, and the frame processing time of the first type frame exceeds a preset processing time threshold; generating a plurality of preloading tasks corresponding to the plurality of control loading tasks, wherein the plurality of preloading tasks comprise a first preloading task and a second preloading task following the first preloading task; and, in response to detecting a particular event during execution of the first preload task, processing the particular event after completion of the first preload task and before start of execution of the second preload task. Therefore, overall scheduling of frame task processing is realized based on the decentralized processing for the specific type of frames, so that the responsiveness for a specific event is improved on the whole.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure generally relates to the field of computer technology, and more particularly to a frame task scheduling method, a frame task scheduling apparatus, a frame task scheduling device, a computing device, a computer-readable storage medium, and a computer program product. Background Art

[0002] With the development of mobile Internet, mobile devices represented by mobile phones and tablet computers are becoming increasingly inseparable from daily life, factory production, etc. Among them, the user interface (UI) and graphics system of mobile devices have become important factors that directly affect user experience.

[0003] In the architectural design of the graphics system of the user interface, the related processing for displaying the image frames includes main thread (also known as UI thread) processing, rendering thread processing, and synthesizer processing, etc. After each of the multiple image frames is processed accordingly, they are displayed on the mobile device, thereby providing the user with a display with image changes. Summary of the invention

[0004] According to some embodiments of the present disclosure, a frame task scheduling method, a frame task scheduling apparatus, a computing device, a computer-readable storage medium, and a computer program product are provided.

[0005] In the first aspect of the present disclosure, a frame task scheduling method is provided. The frame task scheduling method includes: dividing a first type of frame including multiple control loading tasks in units of control loading tasks, wherein the frame processing time of the first type of frame exceeds a predetermined processing time threshold; generating multiple preloading tasks corresponding to the multiple control loading tasks, wherein the multiple preloading tasks include a first preloading task and a second preloading task following the first preloading task; and, in response to detecting a specific event during the execution of the first preloading task, processing the specific event after completing the first preloading task and before starting to execute the second preloading task. Thus, based on the decentralized processing of specific types of frames, the overall scheduling of frame task processing is achieved, thereby improving the responsiveness to specific events as a whole.

[0006] In some embodiments, the frame task scheduling method further includes: executing at least a portion of the plurality of preload tasks in a frame processing cycle corresponding to a second type of frame before executing the first type of frame, wherein the frame processing time of the first type of frame is less than or equal to the predetermined processing time threshold. Thus, on the basis of decentralized processing for a specific type of frame, the control loading task of the first type of frame is pre-executed at the second type of frame before the first type of frame, and since the workload granularity of the specific type of frame that takes up a longer processing time is reduced, the blocking time for the event is shortened, and the event responsiveness is improved.

[0007] In some embodiments, the frame task scheduling method further includes: deleting a second type frame before the first type frame; and executing at least a portion of the plurality of preload tasks in a frame processing cycle corresponding to the deleted second type frame. Thus, by deleting the second type frame, more gaps are provided for the first type frame, further facilitating the pre-execution processing of the control loading task of the first type frame at the second type frame.

[0008] In some embodiments, the frame task scheduling method further includes: in response to detecting a predetermined operation, determining the first type frame and the third type frame, wherein the third type frame is the start of the second type frame before the first type frame; based on the first type frame and the third type frame, determining the response time of deleting the second type frame for the second type frame and the first type frame; and based on the response time, determining the frame deletion strategy for deleting the second type frame. Thus, by using the frame deletion technology based on dynamic load, the processing time of a specific type of frame is shortened, so that the blocking time of the event is shortened.

[0009] In some embodiments, segmenting a first type frame including multiple control loading tasks includes: for the first type frame, obtaining a control loading task set, wherein the control loading task set includes all of the multiple control loading tasks in the first type frame; detecting the remaining idle time after the main thread completes the control loading task; and determining to segment the control loading task set based on the remaining idle time being greater than or equal to the execution time of a subsequent control loading task. In some embodiments, executing at least a portion of the multiple preloading tasks includes: initiating a preloading task in the multiple preloading tasks based on the execution time of the second type frame and the length of the inter-frame gap remaining after the second type frame is deleted; executing the one preloading task; initiating the next preloading task in the multiple preloading tasks based on the execution time of the second type frame after completing the one preloading task and the length of the inter-frame gap, until all preloading tasks of the first type frame or the multiple preloading tasks are completed. Thus, the segmentation strategy of the first type frame can be dynamically determined based on the second type frame, and the pre-execution of the preloading task can be dynamically executed, thereby achieving a more accurate improvement in event responsiveness.

[0010] In some embodiments, determining the response time of deleting the second type frame for the second type frame and the first type frame includes: determining the worst response time for the second type frame for the number of consecutive frame deletions for consecutively deleting the second type frame; and determining the worst response time for the first type frame for the total number of frame deletions for deleting the second type frame, wherein the total number of frame deletions is based on the number of second type frames between the third type frame and the first type frame and the number of consecutive frame deletions. In some embodiments, determining the frame deletion strategy for deleting the second type frame includes: determining the time point of the frame deletion operation in the frame processing cycle from the third type frame to the previous second type frame of the first type frame based on the number of consecutive frame deletions with the minimum worst response time for the second type frame and the total number of frame deletions with the minimum worst response time for the first type frame, so that the time point of the frame deletion operation is evenly distributed in the frame processing cycle from the third type frame to the previous second type frame of the first type frame; and determining the second type frame to be deleted at the time point of the frame deletion operation based on the time point of the frame deletion operation. In some embodiments, determining the second type of frame to be deleted at the time point of the frame deletion operation further includes: deleting the second type of frame based on the execution time of the preload task being greater than the remaining time after executing the second type of frame in the frame processing cycle corresponding to the second type of frame; and not deleting the second type of frame based on the execution time of the preload task being less than or equal to the remaining time after executing the second type of frame in the frame processing cycle corresponding to the second type of frame. Thus, more split control loading tasks can be pre-executed by predicting specific types of frames and deciding which other types of frames to delete, thereby further improving event responsiveness.

[0011] In some embodiments, based on the frame processing cycle of the main thread, the frame processing time of the main thread of the second type of frame, the processing time of the rendering thread of the second type of frame, and the processing time of the synthesizer of the second type of frame, the worst response time for the second type of frame is determined for the number of consecutive frame deletions. In some embodiments, based on the frame processing cycle of the main thread, the frame processing time of the main thread of the first type of frame, the processing time of the rendering thread of the first type of frame, the processing time of the synthesizer of the first type of frame, and the processing time of the main thread of a control loading operation, the worst response time for the first type of frame is determined. Thus, the frame deletion strategy based on the dynamic load of the worst response time can be determined, thereby avoiding arbitrary deletion processing, and achieving uniformity of frame deletion processing, thereby further refining the overall arrangement of frame processing scheduling.

[0012] In some embodiments, the frame task scheduling method further includes: in response to determining that the second type frame does not need to be deleted, delaying the second type frame; in a frame processing cycle corresponding to the delayed second type frame, executing at least a portion of the multiple preload tasks; and after completing the at least a portion of the multiple preload tasks, executing the second type frame. In some embodiments, the frame task scheduling method further includes: after all preload tasks in the first type frame are completed, executing a display corresponding to the specific event. Thereby, the overall time of frame processing can be reduced as a whole and the possibility of blocking events can be avoided.

[0013] In a second aspect of the present disclosure, a frame task scheduling device is provided. The frame task scheduling device includes: a task segmentation module configured to segment a first type frame including multiple control loading tasks in units of control loading tasks, wherein the frame processing time of the first type frame exceeds a predetermined processing time threshold; a task generation module configured to generate one or more preloading tasks corresponding to the control loading tasks in the multiple control loading tasks; and a task execution module configured to process the specific event after completing the preloading task and before executing the next preloading task in response to detecting a specific event during the execution of a preloading task.

[0014] In a third aspect of the present disclosure, a computing device is provided, comprising: a processor; and a memory, wherein the memory stores instructions, and when the instructions are executed by the processor, the computing device executes the method provided according to the first aspect of the present disclosure.

[0015] In a fourth aspect of the present disclosure, a computer-readable storage medium is provided. The computer-readable storage medium stores instructions, and when the instructions are executed by a computing device, the computing device executes the method provided according to the first aspect of the present disclosure.

[0016] In a fifth aspect of the present disclosure, a computer program product is provided, which includes instructions, and when the instructions are executed by a computing device, the computing device executes the method provided according to the first aspect of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1A An example diagram of a frame task scheduling system according to an embodiment of the present disclosure is shown;

[0018] Figure 1B An example diagram of a frame task scheduling method according to an embodiment of the present disclosure is shown;

[0019] Figure 2AA flowchart of a frame task scheduling method according to an embodiment of the present disclosure is shown;

[0020] FIG. 2B to FIG. 2D An example schematic diagram of a frame task scheduling method according to an embodiment of the present disclosure is shown;

[0021] Figure 3A A flowchart of another frame task scheduling method according to an embodiment of the present disclosure is shown;

[0022] Figure 3B An example schematic diagram of a frame task scheduling method according to an embodiment of the present disclosure is shown;

[0023] Figure 4A A flowchart of another frame task scheduling method according to an embodiment of the present disclosure is shown;

[0024] Figure 4B An example schematic diagram of a frame task scheduling method according to an embodiment of the present disclosure is shown;

[0025] Figure 4C A flowchart showing a specific example of another frame task scheduling method according to an embodiment of the present disclosure is shown;

[0026] Figure 4D and Figure 4E An example schematic diagram of a frame task scheduling method according to an embodiment of the present disclosure is shown;

[0027] Figure 5 A flow chart of a frame task scheduling method for a frame task scheduling system according to an embodiment of the present disclosure is shown;

[0028] Fig. 6A The event response delay data diagram of the conventional solution for parallel processing of the main thread and the loading thread is shown;

[0029] Figure 6B A data graph showing the event response latency of a solution based on a pre-fetch mechanism is shown;

[0030] Figure 6C An event response delay data diagram of a frame task scheduling scheme according to an embodiment of the present disclosure is shown;

[0031] Figure 7 A schematic block diagram of a frame task scheduling device according to some embodiments of the present disclosure is shown; and

[0032] Figure 8 A schematic block diagram of an example device for implementing an example implementation of the present disclosure is shown. DETAILED DESCRIPTION

[0033] The preferred implementation of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although example embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.

[0034] As used herein, the term "including" and its variations mean open inclusion, i.e., "including but not limited to". Unless otherwise stated, the term "or" means "and / or". The term "based on" means "based at least in part on". The terms "embodiment" and "some embodiments" both mean "at least some embodiments". Other explicit and implicit definitions may also be included below.

[0035] In the architectural design of the graphics system of the user interface, the main thread performs frame processing tasks (also known as "frame-making tasks") for each image frame at a predetermined frame rate. In addition, when the user device receives other events, the main thread needs to process tasks corresponding to other events. However, if other events are received during the execution of the frame processing task of the ultra-long frame, the tasks corresponding to other events cannot be processed immediately due to the long execution period. Therefore, in this case, the problem of not being able to respond to other events in a timely manner will be caused. For example, in the process of fast screen scrolling on the display interface of the TV, if the user presses a button on the remote control, the user's key behavior often requires a long event to respond on the display interface, resulting in response delays or inappropriate freezes. Usually, the above problems can be solved to a certain extent by increasing the frame rate, but due to the slowdown in hardware development and hardware cost factors, the performance of some mobile devices can no longer meet the growing performance requirements of the UI, and the frame rate is difficult to improve, or even decreases instead of increasing. At the same time, the increase in frame rate cannot improve the responsiveness of the frame-making task to events when the main thread is exclusive, and cannot fundamentally solve the above problems.

[0036] In the conventional solution for the above-mentioned response delay or jamming, a loading thread is created in parallel with the main thread to share part of the task load of the main thread, and then the task processing result of the loading thread is synchronized to the main thread, and then the main thread performs load merging to output the final task processing result. However, the applicant noted that in the above-mentioned conventional solution, due to the introduction of the loading thread, this multi-threaded processing requires additional determination overhead and communication overhead, and if the processing of the loading thread is slower than that of the main thread, it will also lead to slowing down the efficiency of the main thread's frame-making task. Therefore, in the conventional solution, there is a problem that for specific types of frames such as ultra-long frames, the frame-making task blocks the event response, and the response delay or jamming during the frame processing process cannot be effectively avoided, resulting in poor tracking and reduced user experience. In addition, the inventor of the present disclosure noted that a prefetch mechanism is also provided in the graphics system, in which the inter-frame gap can be used to migrate the predicted workload to the previous frame time for completion. However, the inventors found that the pre-fetch mechanism causes the gaps between frames to be completely used up in order to process as many frame-making tasks as possible, resulting in the inability to respond to events in a timely manner during this gap. The problem of frame-making tasks blocking event responses still exists, and may even occupy the processing time of the frame-making tasks of the next frame.

[0037] To this end, the present disclosure provides a frame task scheduling scheme. In the frame task scheduling scheme of the present disclosure, a first type frame including a plurality of control loading tasks is segmented in units of control loading tasks, and a plurality of preloading tasks corresponding to the plurality of control loading tasks are generated. In the frame task scheduling scheme of the present disclosure, the frame processing time of the first type frame exceeds a predetermined processing time threshold, for example, an overlong frame whose frame processing time is greater than that of a normal frame, and the plurality of preloading tasks include a first preloading task and a second preloading task following the first preloading task. Thus, in response to a specific event such as a touch event being detected during the execution of the first preloading task, the specific event can be processed after the completion of the first preloading task and before the execution of the second preloading task begins, without waiting for all control loading tasks of the first type frame to be fully executed. In some embodiments of the present disclosure, on the basis of the distributed processing for a specific type of frame, the preloading task can be moved forward to the frame processing cycle of the second type frame before the first type frame to be executed, so as to utilize the remaining gap of the frame processing cycle of the second type frame. In some embodiments of the present disclosure, the second type of frame before the first type of frame can be deleted, and the preload task can be moved forward to the deleted second type of frame for execution, so as to make greater use of the frame processing cycle of the second type of frame. Thus, based on the distributed processing of a specific type of frame, the overall scheduling of frame task processing is achieved, thereby improving the responsiveness to a specific event as a whole.

[0038] Figure 1A An example diagram of a frame task scheduling system according to an embodiment of the present disclosure is shown. In an embodiment of the present disclosure, the frame task scheduling system and the frame task scheduling method can be implemented in a frame task scheduling device. In some embodiments, the frame task scheduling device can be a terminal device such as a mobile phone, a tablet, or a computer. Figure 1A As shown, the frame task scheduling system 100 includes a main thread unit 110, a rendering thread unit 120, and a synthesizer unit 130. In an embodiment of the present disclosure, the main thread unit 110 includes an event response module 111 and a frame task processing module 112. In an embodiment of the present disclosure, the frame task processing module 112 includes a frame prediction processing module 1121, a task segmentation module 1122, a frame deletion processing module 1123, a control loading module 1124, a frame animation processing module 1125, and a drawing processing module 1126. In an embodiment of the present disclosure, the rendering thread unit 120 includes a rendering module 121 and a synthetic signal processing module 122. In an embodiment of the present disclosure, the synthesizer module 130 includes a synthesis module 131 and a display sending module 132. In an embodiment of the present disclosure, the main thread unit 110 can, for example, perform event response, frame task processing, etc., and can implement frame prediction, frame task segmentation, frame deletion strategy determination, frame deletion operation execution, control loading scheduling, frame animation processing, measurement, layout, drawing, and other processing. In an embodiment of the present disclosure, the rendering thread unit 120 may perform rendering processing based on the processing result of the main thread 110, and may perform processing such as detection and registration of VSync (Vertical Synchronization) signals. In an embodiment of the present disclosure, the synthesizer module 130 may perform synthesis processing and display processing based on the processing result of the rendering thread unit 120, so as to present a display image to the user on the screen.

[0039] Figure 1B FIG. 1 shows an example diagram of a frame task scheduling method according to an embodiment of the present disclosure. Figure 1B As shown, at box 151, the frame task processing module 112 divides the first type of frames including multiple control loading tasks into units of control loading tasks, wherein the frame processing time of the first type of frames exceeds a predetermined processing time threshold. At box 153, multiple preloading tasks corresponding to the multiple control loading tasks are generated, wherein the multiple preloading tasks include a first preloading task and a second preloading task following the first preloading task. At box 155, in response to detecting a specific event during the execution of the first preloading task, the specific event is processed after the first preloading task is completed and before the execution of the second preloading task begins. Below, in combination with FIG. 2A to FIG. 6C , the specific description is based on Figure 1A The frame task scheduling system 100 and Figure 1BThe frame task scheduling method shown is a frame task scheduling scheme of the present disclosure.

[0040] Figure 2AA flowchart of a frame task scheduling method according to an embodiment of the present disclosure is shown. At box 201, in response to the frame prediction processing module 1121 predicting a first type of frame, the task segmentation module 1122 obtains a control loading task set for the first type of frame, wherein the control loading task set includes all of the multiple control loading tasks in the first type of frame. In an embodiment of the present disclosure, a first type of frame may refer to a frame whose frame processing time exceeds a predetermined processing time threshold. Usually, a display device displays each frame of an image at a predetermined frame rate, for example, when the frame rate is 60, the unit frame processing cycle is 16.67 milliseconds. If the predetermined processing time threshold adopts a unit frame processing cycle, each frame image processing time needs to be completed within 16.67 milliseconds, otherwise frame delay or omission processing will occur. When the display device needs to display more controls or the user quickly operates the input device, the frame processing time is extended. In some embodiments, these frames that need to be processed by the timeout frame may be first type frames (e.g., "super long frames"). In an embodiment of the present disclosure, a second type of frame may refer to a frame whose frame processing time is less than or equal to the predetermined processing time threshold. In the case of the aforementioned embodiment, the second type of frame is, for example, a frame whose frame processing time is less than the unit frame processing cycle and does not need to be processed by timeout (for example, a "normal frame"). It should be understood that in the embodiment of the present disclosure, the predetermined processing time threshold may be a time amount greater than the unit frame processing cycle, but is not limited thereto, as long as it can be used to distinguish the relative size of the frame processing time to distinguish the first type of frame from the second type of frame. In the embodiment of the present disclosure, the term "frame rate" refers to a measure used to measure the number of frames displayed by a display device, usually in units of frames per second, and is used to describe the display performance of animations, movies, games, etc. In some embodiments, the unit frame processing cycle is determined based on the frame rate. At box 203, the task segmentation module 1122 detects the remaining idle time after the main thread unit 110 completes the control loading task. At box 205, the task segmentation module 1122 determines whether the remaining idle time is greater than or equal to the execution time of a subsequent control loading task. In some embodiments, it is determined whether to cut the control loading task set based on determining that the remaining idle time is greater than or equal to the execution time of a subsequent control loading task. In some embodiments, based on determining that the remaining idle time is less than the execution time of a subsequent control loading task, the control loading task set is not segmented, and the method of this process ends. At box 207, the task segmentation module 1122 segments the first type frame including multiple control loading tasks in units of control loading tasks. At box 209, the task segmentation module 1122 generates multiple preloading tasks corresponding to the multiple control loading tasks, wherein the multiple preloading tasks include a first preloading task and a second preloading task following the first preloading task.At block 211 , the frame task processing module 112 executes at least a portion of the plurality of preload tasks in a frame processing cycle corresponding to a second type frame before executing the first type frame.

[0041] In an embodiment of the present disclosure, the control loading task may be, for example, a task for control loading (infl at ion), which may create an object for a component and bind related data when a new UI component enters the screen. In some embodiments, the control loading task for segmentation is cut in units of adapters, and each cut control loading task corresponds to each adapter. In some embodiments, the adapter is implemented using the ViewHo lder class, which is used to quickly set values ​​related to the view (View) displayed on the screen, wherein the view is the display basis of the UI interface of the display device, that is, a frame of image displayed by the display device is composed of one or more views, and ViewHo lder is a data structure defined for operating these views. At box 213, the control loading module 1124 processes the specific event in response to detecting a specific event during the execution of the first preloading task, after completing the first preloading task and before starting to execute the second preloading task following the first preloading task. In some embodiments, in the frame processing time corresponding to the first type of frame, if a specific event is detected during the execution of a preload task, the specific event can be processed immediately after the processing of the preload task is completed, thereby avoiding the situation where the specific event needs to be processed only after all tasks of the first type of frame are completed. At box 215, after all preload tasks in the first type of frame are completed, the display corresponding to the specific event is performed. In an embodiment of the present disclosure, the specific event may include a non-display event and a display event, wherein the non-display event indicates an event in which the result of the task execution corresponding to the event does not need to be displayed on the screen, and the response time of the responsiveness is the time from the time it enters the event queue to the time the event execution is completed; the display event indicates an event in which the result of the task execution corresponding to the event needs to be displayed on the screen, and the response time of the responsiveness is the time from the time it enters the event queue to the time the result of the execution is displayed on the screen. In some embodiments, responsiveness indicates the delay of the main thread receiving and processing a specific event, such as the response of the application to the key behavior when the user presses a remote control key during the scrolling of the screen display. In some embodiments, as an evaluation index of responsiveness, if the frame task is completed quickly and the frame rate is high, then the responsiveness is good, otherwise, the responsiveness is poor. In other embodiments, as an evaluation index of responsiveness, if the time from the arrival of a specific event to the completion of the specific event is short, then the responsiveness is good, otherwise, the responsiveness is poor.

[0042] FIG. 2B to FIG. 2D FIG. 1 shows an example schematic diagram of a frame task scheduling method according to an embodiment of the present disclosure. FIG. 2B to FIG. 2D , the time instants t1, t2, t3, t4, t5, t6, and t7 are shown in units of frame processing cycles based on the frame rate, and the second type frame 222 is processed in the frame processing cycle corresponding to each time instant. In the embodiment of the present disclosure, for example, Figure 2B As shown, at time t1, it is predicted that the first type frame 221 will appear at time t4 and the frame processing time exceeds the predetermined processing time threshold (for example, the unit frame processing cycle), and needs to be completed within the frame processing cycle corresponding to time t6, then the execution Figure 2A For example, Figure 2C As shown, the first type frame 221 is divided into a plurality of preloading tasks 221-1, 221-2, ..., 221-N in units of control loading tasks ViewHo lder, wherein each preloading task corresponds to a ViewHo lder. For example, in the frame processing time of the first type frame 221, if a specific event such as a user touch operation event is detected during the execution of the preloading task 221-1 (e.g., the first preloading task), then after the preloading task 221-1 is completed and before the next preloading task 221-2 (e.g., the second preloading task) is started, the task 223 corresponding to the specific event is processed. In some embodiments, for example, as Figure 2D As shown, at least a portion of the multiple preloading tasks 221-1, 221-2, ..., 221-N divided out can be executed in advance to the frame processing period corresponding to the second type frame before the frame processing time of the first type frame 221, for example, the preloading task 221-1 is executed in advance to the remaining gap after processing the second type frame 222-1 in the frame processing period (t1, t2) corresponding to the time t1 for processing the second type frame 222-1, and the preloading task 221-2 is executed in advance to the remaining gap after processing the second type frame 222-3 in the frame processing period (t3, t4) corresponding to the time t3 for processing the second type frame 222-3. In the frame processing time of the first type frame 221, if a specific event such as a user touch operation event is detected during the execution of the preloading task 221-3, the task 223 corresponding to the specific event is processed after the preloading task 221-3 is completed and before the next preloading task 221-4 is executed. According to the embodiments of the present disclosure, by reducing the workload granularity of the first type of frame, the blocking time of the event is shortened, so that the event can get a response opportunity between blocks, thereby improving the responsiveness of the event. By processing the workload after the granularity is reduced in advance, the overall frame processing time can be reduced and the possibility of blocking the event can be avoided.

[0043] Figure 3AA flowchart of another frame task scheduling method according to an embodiment of the present disclosure is shown. At box 301, the frame deletion processing module 1123 deletes the second type frame before the first type frame based on the frame deletion strategy. At box 303, the frame deletion processing module 1123 determines to execute at least a part of the multiple preloading tasks in the frame processing cycle corresponding to the deleted second type frame. At box 305, the control loading module 1124 initiates one of the multiple preloading tasks based on the execution time of the second type frame and the length of the inter-frame gap remaining after the second type frame is deleted. At box 307, the control loading module 1124 executes the one preloading task. At box 309, the control loading module 1124 initiates the next preloading task in the preloading task based on the execution time of the second type frame after completing the one preloading task and the length of the inter-frame gap, until all preloading tasks of the first type frame or the one or more preloading tasks are completed.

[0044] Figure 3B An example schematic diagram of a frame task scheduling method according to an embodiment of the present disclosure is shown. Figure 3B Shown based on Figure 2D For example, in Figure 2DIn the frame processing cycle (t2, t3) corresponding to time t2, since the second type frame 222-2 requires a longer frame processing time, the remaining gap is insufficient to process one preloading task of the first type frame 221. In the embodiment of the present disclosure, the second type frame 222-2 is deleted, and one or more preloading tasks of the first type frame are advanced to the frame processing cycle (t2, t3) corresponding to time t2 for execution. Thus, for example, the preloading task 221-1 is advanced to be executed in the remaining gap after processing the second type frame 222-1 in the frame processing cycle (t1, t2) corresponding to the time t1 for processing the second type frame 222-1, the preloading tasks 221-2 and 221-3 are advanced to be executed in the entire cycle of the frame processing cycle (t2, t3) corresponding to the time t2 for processing the second type frame 222-2, and the preloading task 221-4 is advanced to be executed in the remaining gap after processing the second type frame 222-3 in the frame processing cycle (t3, t4) corresponding to the time t3 for processing the second type frame 222-3. In the frame processing time of the first type frame 221, if a specific event such as a user touch operation event is detected during the execution of the preloading task 221-5, the task 223 corresponding to the specific event is processed after the preloading task 221-5 is completed and before the next preloading task 221-6 is executed. According to an embodiment of the present disclosure, when the task load of the second type frame is heavy and the frame task processing time is long, since the remaining gap of the frame processing period corresponding to the second type frame is small, there is insufficient space to accommodate the preloading task of the segmented first type frame. By appropriately deleting a portion of the second type frame and executing the preloading task in advance, the frame processing time of the first type frame can be reduced while improving the responsiveness of the event.

[0045] Figure 4A A flowchart of another frame task scheduling method according to an embodiment of the present disclosure is shown. Figure 4BAn example schematic diagram of a frame task scheduling method according to an embodiment of the present disclosure is shown. At box 401, in response to detecting a predetermined operation, the frame deletion processing module 1123 determines the first type frame and the third type frame, wherein the third type frame is the start of the second type frame before the first type frame. At box 403, the frame deletion processing module 1123 determines the response time of deleting the second type frame for the second type frame and the first type frame based on the first type frame and the third type frame. In an embodiment of the present disclosure, the worst response time for the second type frame is determined for the number of consecutive frame deletions for consecutively deleting the second type frame. In some embodiments, the worst response time for the second type frame is determined for the number of consecutive frame deletions based on the frame processing cycle of the main thread, the frame processing time of the main thread of the second type frame, the processing time of the rendering thread of the second type frame, and the processing time of the synthesizer of the second type frame. In an embodiment of the present disclosure, the worst response time for the first type frame is determined for the total number of frame deletions for deleting the second type frame, wherein the total number of frame deletions is based on the number of second type frames between the third type frame and the first type frame and the number of consecutive frame deletions. In some embodiments, the worst response time for the first type of frame is determined based on the frame processing cycle of the main thread, the frame processing time of the main thread of the first type of frame, the processing time of the rendering thread of the first type of frame, the processing time of the synthesizer of the first type of frame, and the processing time of the main thread of a control loading operation. In an embodiment of the present disclosure, for example, the worst response time for the second type of frame can be determined based on the following formulas (1) and (2).

[0046]

[0047] 1≤X≤N Formula (2) Wherein, X represents the number of consecutive frame deletions each time and is a positive integer, N represents the number of second type frames between the third type frame and the first type frame, R n (X) represents the worst response time for the second type of frame when the number of consecutive frame deletions is X, T represents the frame processing cycle of the main thread unit 110, C u represents the frame processing time of the main thread unit 110 of the second type frame, C r represents the processing time of the rendering thread unit 120 for the second type of frame, C g represents the processing time of the synthesizer unit 130 for the second type frame.

[0048] In an embodiment of the present disclosure, for example, the worst response time for the first type of frame may be determined based on the following formulas (3) and (4).

[0049]

[0050]

[0051] Wherein, X represents the number of consecutive frame deletions each time a frame is deleted and is a positive integer, N represents the number of second type frames between the third type frame and the first type frame, D represents the total number of deleted frames after deleting the second type frames, and R h (D) represents the worst response time for the first type of frame when the total number of deleted frames is D, T represents the frame processing cycle of the main thread unit 110, C u represents the frame processing time of the main thread unit 110 for the second type of frame, represents the frame processing time of the main thread unit 110 for the first type of frame, represents the processing time of the rendering thread unit 120 for the first type of frame, represents the processing time of the synthesizer unit 130 for the first type of frame, C v Indicates the processing time of the main thread unit 110 for one control loading operation.

[0052] At block 405, the frame deletion processing module 1123 determines a frame deletion strategy for deleting the second type of frame based on the response time. In some embodiments, based on the number of consecutive frame deletions with the minimum worst response time for the second type of frame and the total number of frame deletions with the minimum worst response time for the first type of frame, the time point of the frame deletion operation in the frame processing cycle from the third type of frame to the second type of frame preceding the first type of frame is determined, so that the time point of the frame deletion operation is evenly distributed in the frame processing cycle from the third type of frame to the second type of frame preceding the first type of frame. In some embodiments, based on the time point of the frame deletion operation, the second type of frame to be deleted at the time point of the frame deletion operation is determined. In an embodiment of the present disclosure, the worst response time represents the time from the generation of the frame task to the completion of the frame task processing, which may include, for example, the sum of the operation of the frame task itself and the processing time of other events that occupy the frame task computing resources during the period. At block 407, the second type of frame is deleted. In some embodiments, based on the execution time of the preload task being greater than the remaining time after the execution of the second type of frame in the frame processing cycle corresponding to the second type of frame, the second type of frame is deleted. At block 409, the second type frame is not deleted. In some embodiments, the second type frame is not deleted based on the execution duration of the preload task being less than or equal to the remaining duration after executing the second type frame in the frame processing cycle corresponding to the second type frame.

[0053] Figure 4C A flowchart of a specific example of another frame task scheduling method according to an embodiment of the present disclosure is shown. Figure 4C Relative to Figure 4AThe process shown in FIG. 1 further illustrates the steps for determining the frame deletion strategy. Figure 4C As shown, at box 451, the frame deletion processing module 1123 predicts the worst response time for the second type frame and the first type frame by deleting the second type frame under different frame deletion modes based on different numbers of continuous frame deletions based on the above formulas (1) to (4). At box 453, based on the predicted worst response times under different frame deletion modes, the optimal frame deletion mode is determined. In some embodiments, the frame deletion mode with the lowest worst response time is determined as the optimal frame deletion mode. In some embodiments, other factors may also be comprehensively considered on the basis of the worst response time to determine the optimal frame deletion mode. At box 455, based on the uniform distribution strategy, a frame deletion list is determined. In some embodiments, the time points of the frame deletion operation in the frame processing period from the third type frame to the second type frame preceding the first type frame are determined, so that the time points of the frame deletion operation are evenly distributed in the frame processing period from the third type frame to the second type frame preceding the first type frame, wherein the second type frames corresponding to the respective frame deletion operation time points constitute the frame deletion list. At block 457, it is determined whether the execution duration of the preload task is greater than the remaining duration after the second type of frame is executed in the frame processing cycle corresponding to the second type of frame. At block 459, based on determining that the execution duration of the preload task is greater than the remaining duration after the second type of frame is executed in the frame processing cycle corresponding to the second type of frame, the second type of frame is deleted based on the frame deletion list. Otherwise, the second type of frame is not deleted, and the method of this flow ends.

[0054] Figure 4D FIG. 2 shows an example schematic diagram of response time determination according to an embodiment of the present disclosure. Figure 4D In FIG. 1 , the time t1, t2, t3, t4, t5, t6, t7, and t8 are shown in units of frame processing cycles based on the frame rate, wherein the frame corresponding to the frame processing cycle (t1, t2) corresponding to the time t1 is shown. Figure 4AThe method shown determines the frame deletion strategy as follows: the frame corresponding to the frame processing cycle (t2, t3) corresponding to the time t2, the frame corresponding to the frame processing cycle (t3, t4) corresponding to the time t3, the frame corresponding to the frame processing cycle (t5, t6) corresponding to the time t5, and the frame corresponding to the frame processing cycle (t6, t7) corresponding to the time t6 are deleted, the frame corresponding to the frame processing cycle (t1, t2) corresponding to the time t1, the frame corresponding to the frame processing cycle (t4, t5) corresponding to the time t4, and the frame corresponding to the frame processing cycle (t7, t8) corresponding to the time t7 are retained, and at the time t8, the first type of frame is executed. Thus, for example, the frame deletion strategy can be determined in advance based on time statistical data, and the frame deletion strategy determination based on the dynamic load of the worst response time is performed, thereby avoiding arbitrary deletion processing, and achieving uniformity of frame deletion processing, thereby further refining the overall arrangement of frame processing scheduling. In some embodiments, in response to determining that the second type of frame does not need to be deleted, the second type of frame is delayed. In the frame processing cycle corresponding to the delayed second type of frame, at least a portion of the multiple preload tasks is executed. After completing the at least a portion of the plurality of preload tasks, the second type frame is executed. Thus, the execution of the second type frame can be postponed without deleting the second type frame, thereby further refining the overall arrangement of the frame processing scheduling.

[0055] Figure 4E FIG. 1 shows an example schematic diagram of a frame task scheduling method according to an embodiment of the present disclosure. Figure 4E In FIG. 1 , time instants t1, t2, t3, and t4 are shown, with frame processing cycles based on the frame rate as units. In the frame processing cycle corresponding to each time instant, the second type frame 222 is processed. Figure 4EIn an embodiment, the second type frame 222-2 in the frame processing cycle (t2, t3) corresponding to the time t2 is determined as the second type frame to be delayed or deleted. The search message 421 with the highest priority is released in the second type frame 222-1 of the previous frame of the second type frame 222-2, and the search message 421 is started at the time t2 near the start of the deletion frame, and whether there is a message about the second type frame 222-2 in the message queue. In some embodiments, if the second type frame 222-2 is delayed, the start time of the second type frame 222-2 is postponed to a farther time point in the frame processing cycle (t2, t3), and after the preloading task is completed during the postponed period, the start time of the second type frame 222-2 is modified to the current time, thereby realizing the postponement of the second type frame 222-2. In some embodiments, if the second type frame 222-2 is deleted, the message about the second type frame 222-2 is deleted, and the message 422 for registering the VSync signal is released, and is executed before the time point of the related frame-making task expected to be executed, thereby achieving the deletion of the second type frame 222-2. According to the embodiments of the present disclosure, the uniformity of the frame deletion process can be guaranteed through the deletion strategy to avoid the possible uneven display after the frame deletion process operation, thereby improving the responsiveness of the event while ensuring good display quality.

[0056] Figure 5 FIG. 1 shows a flow chart of a frame task scheduling method for a frame task scheduling system according to an embodiment of the present disclosure. In an embodiment of the present disclosure, Figure 5 As shown, at block 501, a frame deletion strategy is obtained, wherein the frame deletion strategy is based on, for example, Figure 4A The method is determined. At block 502, determine whether there is a suspend message, wherein the suspend message is used, for example, to suspend a foreground process and enter a background process to release system resources. At block 503, based on determining that there is a suspend message, determine whether the suspend message indicates a predetermined event. At block 504, based on the suspend message not indicating a predetermined event, determine whether a VSync signal has arrived. At block 505, in response to the VSync signal not arriving, based on Figure 2A The method described above performs frame task segmentation processing and then returns to block 502. At block 506, based on determining that the VSync signal has arrived, determine whether the VSync signal is registered. At block 507, based on determining that the VSync signal is registered, generate a frame task message. Otherwise, based on determining that the VSync signal is not registered, return to block 502. At block 508, determine whether to perform frame deletion processing. At block 509, based on determining that the frame deletion processing is performed, Figure 3AThe method described above performs deletion processing. At box 510, based on determining that the frame deletion processing is not performed, the frame making task is performed based on the frame making task message generated at box 507. At box 511, the VSync signal is registered to perform subsequent processing. On the other hand, at box 512, based on determining that there is no suspend message, enter the sleep state, wait and detect whether it is awakened. At box 513, in response to detecting that it is awakened, enter box 502. At box 514, in response to determining that the suspend message indicates a predetermined event, perform the processing task corresponding to the predetermined event.

[0057] Fig. 6A The event response delay data graph of a conventional solution for parallel processing of the main thread and the loading thread (referred to as "Solution A") tested under high system load and low system load conditions is shown. Figure 6B The event response delay data graph of the solution based on the pre-fetch mechanism (referred to as "Solution B") tested under high system load and low system load conditions is shown. Figure 6C The event response delay data diagram of the frame task scheduling scheme (hereinafter referred to as "Scheme C") according to the embodiment of the present disclosure is shown in the test under the conditions of high system load and low system load. FIG. 6A to FIG. 6C In the figure, the vertical axis represents the response time and the horizontal axis represents the processing time, both in milliseconds (ms). FIG. 6A to FIG. 6C It can be seen that the scheme C of the frame task scheduling scheme according to the embodiment of the present disclosure is compared with Fig. 6A Plan A and Figure 6B The jitter of the frame processing delay of solution B (the peak in the figure indicates that the frame processing delay is large) is eliminated, which can achieve more uniform and stable processing while improving event response performance. In addition, the following Table 1 shows the FIG. 6A to FIG. 6C The comparison results of the delay data of Scheme C with Scheme A and Scheme B. As shown in Table 1, when the system is under high load, Scheme C of the frame task scheduling scheme according to the embodiment of the present disclosure improves the event response performance by an average of 51.9% compared with Scheme A, and improves the event response performance by an average of 35.1% compared with Scheme B. On the other hand, when the system is under low load, Scheme C of the frame task scheduling scheme according to the embodiment of the present disclosure improves the event response performance by an average of 72.9% compared with Scheme A, and improves the event response performance by an average of 29.6% compared with Scheme B.

[0058] Table 1 Comparison results of Scheme C with Scheme A and Scheme B

[0059]

[0060]

[0061] According to the embodiments of the present disclosure, by performing frame task segmentation and pre-execution of control loading tasks, the workload granularity of specific types of frames that take up a long processing time is reduced, the blocking time for events is shortened, and event responsiveness is improved. By using dynamic load-based frame deletion technology, specific types of frames are predicted and it is decided which other types of frames to delete to pre-execute more segmented control loading tasks, thereby shortening the processing time of specific types of frames, shortening the blocking time for events, and further improving event responsiveness. As a result, overall scheduling of frame task processing is achieved, thereby improving overall responsiveness to specific events.

[0062] Figure 7 FIG. 4 is a schematic block diagram of a frame task scheduling device according to some embodiments of the present disclosure. Figure 7 As shown, the frame task scheduling device 700 includes: a task segmentation module 701, configured to segment a first type of frame including multiple control loading tasks in units of control loading tasks, wherein the frame processing time of the first type of frame exceeds a predetermined processing time threshold; a task generation module 702, configured to generate a plurality of preloading tasks corresponding to the multiple control loading tasks, wherein the multiple preloading tasks include a first preloading task and a second preloading task following the first preloading task; and a task execution module 703, the task execution module is configured to, in response to detecting a specific event during the execution of the first preloading task, process the specific event after completing the first preloading task and before starting to execute the second preloading task.

[0063] In some embodiments, the task execution module 703 is further configured to: execute at least a portion of the plurality of preload tasks in a frame processing cycle corresponding to a second type of frame before executing the first type of frame, wherein the frame processing time of the first type of frame is less than or equal to the predetermined processing time threshold. Thus, by performing frame task segmentation and pre-execution of control loading tasks, the workload granularity of a specific type of frame that takes a long processing time is reduced, the blocking time for events is shortened, and event responsiveness is improved.

[0064] In some embodiments, the frame task scheduling device 700 further includes a frame deletion processing module. The frame deletion processing module is configured to: delete the second type frame before the first type frame; and execute at least a part of the multiple pre-loading tasks in the frame processing cycle corresponding to the deleted second type frame. Thus, by deleting the second type frame, more gaps are provided for the first type frame, which further facilitates the pre-execution processing of the control loading task of the first type frame.

[0065] In some embodiments, the frame deletion processing module is configured to: in response to detecting a predetermined operation, determine the first type frame and the third type frame, wherein the third type frame is the start of the second type frame before the first type frame; based on the first type frame and the third type frame, determine the response time of deleting the second type frame to the second type frame and the first type frame; and based on the response time, determine the frame deletion strategy for deleting the second type frame. Thus, through the frame deletion technology based on dynamic load, the processing time of a specific type of frame is shortened, so that the blocking time of the event is shortened.

[0066] In some embodiments, the task segmentation module 701 is further configured to: obtain a control loading task set for the first type frame, wherein the control loading task set includes all of the multiple control loading tasks in the first type frame; detect the remaining idle time after the main thread completes the control loading task; and determine to cut the control loading task set based on the remaining idle time being greater than or equal to the execution time of a subsequent control loading task. In some embodiments, the task execution module 703 is further configured to: initiate a preloading task in the multiple preloading tasks based on the execution time of the second type frame and the length of the inter-frame gap remaining after the second type frame is deleted; execute the preloading task; and initiate the next preloading task in the preloading task based on the execution time of the second type frame after completing the preloading task and the length of the inter-frame gap, until all preloading tasks of the first type frame or the multiple preloading tasks are completed. Thus, the segmentation strategy of the first type frame can be dynamically determined based on the second type frame, and the pre-execution of the preloading task can be dynamically executed, thereby achieving a more accurate improvement in event responsiveness.

[0067] In some embodiments, the frame deletion processing module is configured to: determine the worst response time for the second type frame for the number of consecutive frame deletions for consecutively deleting the second type frame; and determine the worst response time for the first type frame for the total number of frame deletions for deleting the second type frame, wherein the total number of frame deletions is based on the number of second type frames between the third type frame and the first type frame and the number of consecutive frame deletions. In some embodiments, the frame deletion processing module is configured to: determine the time point of the frame deletion operation in the frame processing cycle from the third type frame to the previous second type frame of the first type frame based on the number of consecutive frame deletions for the minimum worst response time for the second type frame and the total number of frame deletions for the minimum worst response time for the first type frame, so that the time points of the frame deletion operation are evenly distributed in the frame processing cycle from the third type frame to the previous second type frame of the first type frame; and determine the second type frame to be deleted at the time point of the frame deletion operation based on the time point of the frame deletion operation. In some embodiments, the frame deletion processing module is configured to: delete the second type of frame based on the execution time of the preload task being greater than the remaining time after the second type of frame is executed in the frame processing cycle corresponding to the second type of frame; and not delete the second type of frame based on the execution time of the preload task being less than or equal to the remaining time after the second type of frame is executed in the frame processing cycle corresponding to the second type of frame. Thus, more split control loading tasks can be pre-executed by predicting specific types of frames and deciding which other types of frames to delete, thereby further improving event responsiveness.

[0068] In some embodiments, the frame deletion processing module is configured to: determine the worst response time for the second type of frame based on the frame processing cycle of the main thread, the frame processing time of the main thread of the second type of frame, the processing time of the rendering thread of the second type of frame, and the processing time of the synthesizer of the second type of frame for the number of consecutive frame deletions. In some embodiments, the frame deletion processing module is configured to: determine the worst response time for the first type of frame based on the frame processing cycle of the main thread, the frame processing time of the main thread of the first type of frame, the processing time of the rendering thread of the first type of frame, the processing time of the synthesizer of the first type of frame, and the processing time of the main thread of a control loading operation. Thus, the frame deletion strategy can be determined based on the dynamic load of the worst response time, thereby avoiding arbitrary deletion processing, and achieving uniformity of frame deletion processing, thereby further refining the overall arrangement of frame processing scheduling.

[0069] In some embodiments, the task execution module 703 is further configured to: in response to determining that there is no need to delete the second type frame, delay the second type frame; in the frame processing cycle corresponding to the delayed second type frame, execute at least a portion of the multiple preload tasks; and after completing the at least a portion of the multiple preload tasks, execute the second type frame. In some embodiments, the task execution module 703 is further configured to: after all preload tasks in the first type frame are completed, execute the display corresponding to the specific event. In this way, the overall time of frame processing can be reduced as a whole and the possibility of blocking events can be avoided.

[0070] According to the embodiments of the present disclosure, by performing frame task segmentation and pre-execution of control loading tasks, the workload granularity of specific types of frames that take up a long processing time is reduced, the blocking time for events is shortened, and event responsiveness is improved. By using dynamic load-based frame deletion technology, specific types of frames are predicted and it is decided which other types of frames to delete to pre-execute more segmented control loading tasks, thereby shortening the processing time of specific types of frames, shortening the blocking time for events, and further improving event responsiveness. As a result, overall scheduling of frame task processing is achieved, thereby improving overall responsiveness to specific events.

[0071] Figure 8 The schematic block diagram of the example device 800 of the exemplary implementation mode that can be used to implement the content of the present disclosure is shown, and it can be used to implement at least a part in the method or process of the embodiment of the present disclosure.As shown in the figure, the device 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes according to the computer program instructions stored in the read-only memory (ROM) 802 or the computer program instructions loaded into the random access memory (RAM) 803 from the storage unit 808. In RAM 803, various programs and data required for the operation of the device 800 can also be stored. CPU801, ROM802 and RAM 803 are connected to each other by bus 804. Input / output (I / O) interface 805 is also connected to bus 804.

[0072] A number of components in the device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0073] The various methods and / or processes described above may be executed by the processing unit 801. For example, in some exemplary implementations, the methods may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as the storage unit 808. In some exemplary implementations, part or all of the computer program may be loaded and / or installed on the device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the CPU 801, one or more actions of the methods described above may be performed.

[0074] According to an exemplary implementation of the present disclosure, an electronic device is provided, comprising: at least one processor and at least one memory, wherein the at least one memory is coupled to the at least one processor and stores instructions for execution by the at least one processing unit, and when the instructions are executed by the at least one processing unit, the device executes the method described above.

[0075] The present disclosure may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present disclosure.

[0076] Computer readable storage medium can be a tangible device that can keep and store the instructions used by the instruction execution device. Computer readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (non-exhaustive list) of computer readable storage medium include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, for example, a punch card or a convex structure in a groove on which instructions are stored, and any suitable combination thereof. The computer readable storage medium used herein is not interpreted as a transient signal itself, such as a radio wave or other freely propagating electromagnetic waves, an electromagnetic wave propagated by a waveguide or other transmission medium (for example, a light pulse by an optical fiber cable), or an electrical signal transmitted by a wire.

[0077] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0078] The computer program instructions for performing the disclosed operation may be assembler instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, and conventional procedural programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, executed as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., utilizing an Internet service provider to connect via the Internet). In some exemplary implementations, by utilizing the state information of a computer-readable program instruction to customize an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), the electronic circuit may execute a computer-readable program instruction, thereby realizing various aspects of the present disclosure.

[0079] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices, equipment, and computer program products according to the exemplary implementations of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0080] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0081] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0082] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple exemplary implementations of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.

[0083] Various embodiments of the present disclosure have been described, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A frame task scheduling method, It is characterized in that include: Segmenting the first type of frames including a plurality of control loading tasks in units of control loading tasks, wherein the frame processing time of the first type of frames exceeds a predetermined processing time threshold; generating a plurality of preloading tasks corresponding to the plurality of control loading tasks, wherein the plurality of preloading tasks include a first preloading task and a second preloading task following the first preloading task; as well as In response to detecting a specific event during execution of the first preloading task, the specific event is processed after completing the first preloading task and before starting execution of the second preloading task.

2. The frame task scheduling method according to claim 1, It is characterized in that The method further comprises: At least a portion of the plurality of preload tasks is executed in a frame processing cycle corresponding to a second type frame before executing the first type frame, wherein the frame processing time of the first type frame is less than or equal to the predetermined processing time threshold.

3. The frame task scheduling method according to claim 1, It is characterized in that The method further comprises: deleting a second type frame preceding the first type frame; and At least a portion of the plurality of preloading tasks is performed in a frame processing cycle corresponding to the deleted second-type frame.

4. The frame task scheduling method according to claim 1, It is characterized in that The method further comprises: In response to detecting a predetermined operation, determining the first type frame and a third type frame, wherein the third type frame is a start of a second type frame preceding the first type frame; Determine, based on the first type frame and the third type frame, a response time of deleting the second type frame with respect to the second type frame and the first type frame; and Based on the response time, a frame deletion strategy for deleting the second type of frames is determined.

5. The frame task scheduling method according to claim 1, It is characterized in that Segmenting the first type of frame including multiple control loading tasks includes: For the first type frame, obtaining a control loading task set, wherein the control loading task set includes all of the plurality of control loading tasks in the first type frame; Detect the remaining idle time after the main thread completes the control loading task; Based on the remaining idle time being greater than or equal to the execution time of a subsequent control loading task, it is determined to split the control loading task set.

6. The frame task scheduling method according to claim 3, It is characterized in that Executing at least a portion of the plurality of preloading tasks comprises: Initiate one of the plurality of preloading tasks based on the execution duration of the second type frame and the length of the inter-frame gap remaining after the second type frame is deleted; Executing the one preloading task; Based on the execution time of the second type frame after completing the one preloading task and the length of the inter-frame gap, the next preloading task in the preloading task is initiated until all preloading tasks of the first type frame or the multiple preloading tasks are completed.

7. The frame task scheduling method according to claim 4, It is characterized in that Determining the response time of deleting the second type frame to the second type frame and the first type frame includes: Determining a worst response time for the second type of frames based on a number of consecutive frame deletions in which the second type of frames are consecutively deleted; and A worst response time for the first type of frames is determined for a total number of frame erasures for erasing the second type of frames, wherein the total number of frame erasures is based on the number of second type frames between the third type of frames and the first type of frames and the number of consecutive frame erasures.

8. The frame task scheduling method according to claim 7, It is characterized in that Determining a frame deletion strategy for deleting the second type of frames includes: Determine, based on the number of consecutive frame deletions with the minimum worst-case response time for the second-type frame and the total number of frame deletions with the minimum worst-case response time for the first-type frame, a time point of a frame deletion operation in a frame processing period from the third-type frame to a second-type frame preceding the first-type frame, so that the time points of the frame deletion operation are evenly distributed in the frame processing period from the third-type frame to a second-type frame preceding the first-type frame; and Based on the time point of the frame deletion operation, a second type frame to be deleted at the time point of the frame deletion operation is determined.

9. The frame task scheduling method according to claim 8, It is characterized in that Determining the second type of frame to be deleted at the time point of the frame deletion operation also includes: Deleting the second type frame based on that the execution time of the preload task is longer than the remaining time after executing the second type frame in the frame processing cycle corresponding to the second type frame; and Based on the execution duration of the preloading task being less than or equal to the remaining duration after the second type frame is executed in the frame processing cycle corresponding to the second type frame, the second type frame is not deleted.

10. The frame task scheduling method according to claim 7, It is characterized in that Based on the frame processing cycle of the main thread, the frame processing time of the main thread of the second type frame, the processing time of the rendering thread of the second type frame, and the processing time of the synthesizer of the second type frame, the worst response time for the second type frame is determined for the number of consecutive frame deletions.

11. The frame task scheduling method according to claim 7, It is characterized in that The worst response time for the first type of frame is determined based on the frame processing cycle of the main thread, the frame processing time of the main thread of the first type of frame, the processing time of the rendering thread of the first type of frame, the processing time of the synthesizer of the first type of frame, and the processing time of the main thread of a control loading operation.

12. The frame task scheduling method according to claim 2, It is characterized in that Also includes: In response to determining that the second type of frames do not need to be deleted, delaying the second type of frames; executing at least a portion of the plurality of preloading tasks in a frame processing cycle corresponding to the delayed second type frame; as well as After completing the at least a portion of the plurality of preload tasks, executing the second type frame.

13. The frame task scheduling method according to claim 1, It is characterized in that Also includes: After all preloading tasks in the first type frame are completed, display corresponding to the specific event is performed.

14. A frame task scheduling device, It is characterized in that include: A task segmentation module is configured to segment a first type frame including a plurality of control loading tasks in units of control loading tasks, wherein a frame processing time of the first type frame exceeds a predetermined processing time threshold; A task generating module, configured to generate a plurality of preloading tasks corresponding to the plurality of control loading tasks, wherein the plurality of preloading tasks include a first preloading task and a second preloading task following the first preloading task; as well as The task execution module is configured to, in response to detecting a specific event during the execution of the first preloading task, process the specific event after completing the first preloading task and before starting to execute the second preloading task.

15. A computing device, include: processor; as well as A memory storing instructions, which, when executed by the processor, cause the computing device to perform the method according to any one of claims 1 to 13.

16. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores instructions, which, when executed by a computing device, cause the computing device to perform the method according to any one of claims 1 to 13.

17. A computer program product, It is characterized in that The computer program product comprises instructions which, when executed by a computing device, cause the computing device to perform a method according to any one of claims 1 to 13.