Data processing method, device, controller, medium and program product

By obtaining and managing data processing tasks in the browser, skipping or delaying the execution of data rendering tasks until preset conditions are met and then centrally refreshed, the problems of slow rendering speed and lagging interface are solved, and the rendering efficiency and user experience are improved.

CN119105873BActive Publication Date: 2025-05-09SHENZHEN DIPAI LEZHITU TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411263269.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-09
Publication Date
2025-05-09
Estimated Expiration
2044-09-09

AI Technical Summary

Technical Problem

When a browser processes large amount of data rendering, it may cause slow rendering speed, long waiting time, and even lag in the interface, unable to achieve smooth frame rate control, affecting the user experience.

Method used

By obtaining the data processing task to be executed corresponding to the target rendering cycle of the terminal, it judges the current task type, skips if it is a data rendering task, otherwise, the non-data rendering task is executed, and the total execution time is obtained after it is completed. When the preset rendering conditions are met, the skipped data rendering task is performed.

Benefits of technology

Ensure that the browser handles a certain amount of rendering tasks in each display refresh cycle, avoid performance problems caused by too many single rendering tasks, and concentrate refresh operations when conditions are met, merge resources, and improve page refresh performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119105873B_ABST
    Figure CN119105873B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a data processing method, device, controller, medium and program product, the method comprising: obtaining at least one data processing task to be executed corresponding to a target rendering cycle of a terminal, the data processing task comprising a data rendering task and a non-data rendering task; the target rendering cycle is determined according to a display refresh cycle of a browser of the terminal; in the case of executing at least one data processing task, if the currently executed data processing task is a data rendering task, skipping the data rendering task; or, if the currently executed data processing task is a non-data rendering task, executing the non-data rendering task, and after the non-data rendering task is completed, obtaining the total execution time of the non-data rendering task executed within the target rendering cycle; and executing the skipped data rendering task when it is determined that the total execution time and the target rendering cycle satisfy a preset rendering condition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, and in particular, to a data processing method, device, controller, medium and program product. Background Art

[0002] With the continuous development of Internet technology, browsers are increasingly used. Many terminal devices such as PCs, mobile phones, smart TVs, and electronic display screens use browsers as content display tools to display various information. In order to provide users with a more convenient and beautiful visual operation interface, system resources need to be used to render and refresh data, so as to transform the object model and data inside the computer into visual objects through algorithm instructions.

[0003] In related technologies, when a browser processes a large amount of data rendering, it may cause slow rendering speed, long waiting time, or even interface freeze, and it may be impossible to achieve smooth frame rate control, affecting the user experience. Summary of the invention

[0004] To overcome the problems existing in the related art, the present disclosure provides a data processing method, device, controller, medium and program product.

[0005] According to a first aspect of an embodiment of the present disclosure, a data processing method is provided, the method comprising:

[0006] Acquire at least one data processing task to be executed corresponding to a target rendering period of the terminal, wherein the data processing task includes a data rendering task and a non-data rendering task; the target rendering period is determined according to a display refresh period of a browser of the terminal;

[0007] In the case of executing at least one data processing task, if the currently executed data processing task is a data rendering task, skipping the data rendering task; or,

[0008] If the currently executed data processing task is a non-data rendering task, then execute the non-data rendering task, and after the non-data rendering task is completed, obtain the total execution time of the non-data rendering task that has been executed within the target rendering cycle; if it is determined that the total execution time and the target rendering cycle meet the preset rendering conditions, execute the skipped data rendering task.

[0009] Optionally, the preset rendering condition includes:

[0010] The time difference between the target rendering period and the total execution time is less than or equal to a preset difference threshold.

[0011] Optionally, the acquiring of at least one to-be-executed data processing task corresponding to the target rendering period of the terminal includes:

[0012] Acquire at least one candidate data processing task to be executed by the terminal;

[0013] Obtaining timestamp information of the candidate data processing task;

[0014] At least one to-be-executed data processing task corresponding to the target rendering period of the terminal is determined according to the at least one timestamp information.

[0015] Optionally, determining, according to the at least one timestamp information, at least one to-be-executed data processing task corresponding to the terminal in the target rendering period includes:

[0016] The candidate data processing task whose timestamp information is before the target time is used as at least one data processing task to be executed by the terminal corresponding to the target rendering period.

[0017] Optionally, obtaining the total execution time of the non-data rendering task executed within the target rendering cycle includes:

[0018] When the non-data rendering task is executed, the total execution duration of the non-data rendering tasks executed in the target rendering cycle is determined according to the timestamp information corresponding to the non-data rendering tasks executed in the target rendering cycle.

[0019] Optionally, determining the total execution duration of the non-data rendering tasks executed in the target rendering period according to the timestamp information corresponding to the non-data rendering tasks executed in the target rendering period includes:

[0020] Determining, according to the timestamp information corresponding to the non-data rendering tasks executed in the target rendering cycle, the execution duration corresponding to each of the non-data rendering tasks executed in the target rendering cycle;

[0021] The sum of each execution duration is taken as the total execution duration.

[0022] Optionally, the method further comprises:

[0023] The unfinished data processing task among at least one to-be-executed data processing task corresponding to the target rendering cycle is used as the data processing task to be executed in the next rendering cycle of the target rendering cycle.

[0024] Optionally, the acquiring of at least one to-be-executed data processing task corresponding to the target rendering period of the terminal includes:

[0025] The data processing task that is not completed in the previous rendering cycle of the target rendering cycle is used as the data processing task to be executed by the terminal in the target rendering cycle.

[0026] According to a second aspect of an embodiment of the present disclosure, a data processing device is provided, the device comprising:

[0027] A first acquisition module, used to acquire at least one data processing task to be executed by the terminal corresponding to a target rendering period, wherein the data processing task includes a data rendering task and a non-data rendering task; the target rendering period is determined according to a display refresh period of the browser of the terminal;

[0028] a first execution module, configured to skip the data rendering task if the currently executed data processing task is a data rendering task when executing at least one data processing task; or

[0029] The second execution module is used to execute the non-data rendering task if the data processing task currently being executed is a non-data rendering task, and after the non-data rendering task is completed, obtain the total execution time of the non-data rendering task that has been executed within the target rendering cycle; when it is determined that the total execution time and the target rendering cycle meet the preset rendering conditions, execute the skipped data rendering task.

[0030] Optionally, the preset rendering condition includes:

[0031] The time difference between the target rendering period and the total execution time is less than or equal to a preset difference threshold.

[0032] Optionally, the first acquisition module includes:

[0033] A first acquisition submodule, used to acquire at least one candidate data processing task to be executed by the terminal;

[0034] A second acquisition submodule is used to acquire the timestamp information of the candidate data processing task;

[0035] The first determining submodule is used to determine at least one to-be-executed data processing task corresponding to the target rendering period of the terminal according to the at least one timestamp information.

[0036] Optionally, the first determining submodule is used to use the candidate data processing task whose timestamp information is before the target time as at least one data processing task to be executed by the terminal corresponding to a target rendering period.

[0037] Optionally, the second execution module is used to determine the total execution time of the non-data rendering tasks executed within the target rendering cycle according to the timestamp information corresponding to the non-data rendering tasks executed within the target rendering cycle when the non-data rendering tasks are executed.

[0038] Optionally, the second execution module includes:

[0039] A second determining submodule, configured to determine an execution duration corresponding to each of the non-data rendering tasks executed within the target rendering cycle according to timestamp information corresponding to the non-data rendering tasks executed within the target rendering cycle;

[0040] The third determining submodule is used to take the sum of each execution duration as the total execution duration.

[0041] Optionally, the first acquisition module further includes:

[0042] The fourth determining submodule is used to use the unfinished data processing task in at least one to-be-executed data processing task corresponding to the target rendering cycle as the data processing task to be executed in the next rendering cycle of the target rendering cycle.

[0043] Optionally, the first acquisition module is used to use the data processing task that is not completed in a previous rendering cycle of the target rendering cycle as the data processing task to be executed by the terminal in the target rendering cycle.

[0044] According to a third aspect of an embodiment of the present disclosure, a controller is provided, including:

[0045] processor;

[0046] a memory for storing processor-executable instructions;

[0047] Among them, the processor is configured to implement the steps of the data processing method provided in the first aspect of the present disclosure when executed.

[0048] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the data processing method provided in the first aspect of the present disclosure are implemented.

[0049] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the steps of the data processing method provided in the first aspect of the present disclosure.

[0050] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0051] By obtaining at least one data processing task to be executed corresponding to the target rendering cycle of the terminal, the data processing task includes a data rendering task and a non-data rendering task; the target rendering cycle is determined according to the display refresh cycle of the browser of the terminal; in the case of executing at least one data processing task, if the currently executed data processing task is a data rendering task, the data rendering task is skipped; or, if the currently executed data processing task is a non-data rendering task, the non-data rendering task is executed, and after the non-data rendering task is completed, the total execution time of the non-data rendering task executed in the target rendering cycle is obtained; when it is determined that the total execution time and the target rendering cycle meet the preset rendering conditions, the skipped data rendering task is executed. In this way, the data processing tasks that need to be processed in the display refresh cycle of the terminal's browser can be determined, and multiple data processing tasks corresponding to the terminal's browser can be batched to ensure that the browser processes a certain amount of rendering tasks in each display refresh cycle, thereby avoiding performance problems caused by too many single rendering tasks. And when executing tasks within each target rendering cycle, determine whether each task is a data rendering task, skip the data rendering task, and only refresh the rendering operation once when the preset rendering conditions are met, and merge the refresh operations. This can effectively avoid resource waste and improve page refresh performance.

[0052] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the present disclosure but do not constitute a limitation of the present disclosure. In the accompanying drawings:

[0054] Figure 1 The invention is a flowchart of a data processing method according to an exemplary embodiment.

[0055] Figure 2 The figure is a flowchart of another data processing method according to an exemplary embodiment.

[0056] Figure 3 The figure is a flowchart of another data processing method according to an exemplary embodiment.

[0057] Figure 4 The figure is a flowchart of another data processing method according to an exemplary embodiment.

[0058] Figure 5 It is a business flow diagram of a data processing method according to an exemplary embodiment.

[0059] Figure 6 It is a block diagram of a data processing device according to an exemplary embodiment.

[0060] Figure 7 is based on Figure 6 The illustrated embodiment shows a block diagram of a first acquisition module.

[0061] Figure 8 is based on Figure 6 The illustrated embodiment shows a block diagram of a second execution module.

[0062] Fig. 9 is based on Figure 7 The illustrated embodiment shows a block diagram of a first acquisition module.

[0063] Fig.10 is a block diagram of a controller according to an exemplary embodiment.

[0064] Fig.11 is a block diagram of another controller according to an exemplary embodiment. DETAILED DESCRIPTION

[0065] The specific implementation of the present disclosure is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described herein is only used to illustrate and explain the present disclosure, and is not used to limit the present disclosure.

[0066] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0067] Before introducing the specific implementation methods of the present disclosure in detail, the application scenarios of the present disclosure are first described. The present disclosure can be applied to the scenario where the browser displays data. At present, with the continuous development of Internet technology, the application of browsers is becoming more and more widespread. Many terminal devices such as PCs, mobile phones, smart TVs, electronic display screens, etc., have adopted browsers as tool carriers for content display, which are used to display various information. In order to provide users with a more convenient and beautiful visual operation interface, it is necessary to occupy system resources to render and refresh the data, so as to transform the object model and data inside the computer into visual objects through algorithm instructions. In the related art, when the browser processes a large amount of data rendering, it may cause slow rendering speed, too long waiting time, and even cause the interface to freeze, and it is impossible to achieve smooth frame rate control, affecting the user experience.

[0068] The present disclosure is described below in conjunction with specific embodiments.

[0069] Figure 1 is a flow chart of a data processing method according to an exemplary embodiment. Figure 1 As shown, the method is used in a terminal, which may include a mobile phone, a tablet computer, a laptop computer, a virtual reality (VR) device, an augmented reality (AR) device, a mixed reality (MR) device, an extended reality (ER), a vehicle-mounted camera device, etc. The method includes the following steps.

[0070] In step S101, at least one to-be-executed data processing task corresponding to a target rendering cycle of a terminal is obtained.

[0071] The data processing task includes a data rendering task and a non-data rendering task; the target rendering cycle is determined according to the display refresh cycle of the browser of the terminal.

[0072] In this step, the target rendering cycle may be obtained first.

[0073] In the process of the terminal browser converting the object model and data inside the computer into visual objects through algorithm instructions, the browser will continuously refresh according to the display refresh cycle to display the data. The display refresh cycle can be expressed as the refresh rate. Under normal circumstances, the refresh rate of the browser is consistent with the refresh rate of the device's display. For example, if the refresh rate of the device's display is 60Hz, then the refresh rate of the browser is also 60Hz, which means that the browser will try to redraw the page 60 times per second. Taking a refresh rate of 60Hz as an example, the target rendering cycle can be expressed as 1000ms / 60.

[0074] Then, during the process of refreshing and displaying data on the terminal, at least one data processing task to be executed by the terminal can be obtained, and the data processing task is used to refresh and display the data to be rendered. The data processing task to be executed can be divided into at least one data processing task group, and then a target data processing task group corresponding to the terminal in the target rendering cycle can be determined in the at least one data processing task group, and the data processing tasks in the target data processing task group can be used as at least one data processing task to be executed corresponding to the terminal in the target rendering cycle.

[0075] In a possible implementation, different data processing task groups may correspond to different task queues, and the task execution order of the data processing tasks in the task queue may be determined according to the priority information of each data processing task.

[0076] In step S102, when executing at least one data processing task, if the currently executed data processing task is a data rendering task, the data rendering task is skipped.

[0077] In this step, when it is determined that the terminal has at least one data processing task to be executed corresponding to the target rendering cycle, the at least one data processing task to be executed can be executed in sequence, and when executing at least one data processing task, the task type of the data processing task is determined, and when it is determined that the currently executed data processing task is a data rendering task, the data rendering task is temporarily not executed.

[0078] In step S103, if the currently executed data processing task is a non-data rendering task, the non-data rendering task is executed, and after the non-data rendering task is completed, the total execution time of the non-data rendering task that has been executed within the target rendering cycle is obtained; when it is determined that the total execution time and the target rendering cycle meet the preset rendering conditions, the skipped data rendering task is executed.

[0079] In this step, when it is determined that the terminal has at least one data processing task to be executed corresponding to the target rendering cycle, the at least one data processing task to be executed can be executed in sequence, and when executing at least one data processing task, the task type of the data processing task is determined. When it is determined that the currently executed data processing task is a non-data rendering task, the non-data rendering task is continued to be executed until the non-data rendering task is completed, and after the non-data rendering task is completed, the total execution time of the non-data rendering task executed in the target rendering cycle is obtained. Then, based on the total execution time and the target rendering cycle, it is determined whether the preset rendering condition is met. When it is determined that the preset rendering condition is met, the data rendering task skipped in the target rendering cycle is executed.

[0080] Optionally, the preset rendering condition may include that a time difference between the target rendering cycle and the total execution time is less than or equal to a preset difference threshold.

[0081] In some embodiments, Figure 2 As shown, the method may further include the following steps.

[0082] In step S104, an unfinished data processing task among at least one to-be-executed data processing task corresponding to the target rendering cycle is used as a data processing task to be executed in a next rendering cycle of the target rendering cycle.

[0083] For example, during the execution of at least one data processing task to be executed corresponding to the target rendering cycle, the terminal may not complete all the data processing tasks to be executed within the target rendering cycle. Therefore, the completed data processing tasks can be marked as completed, and the incomplete data processing tasks can be marked as incomplete, and the incomplete data processing tasks can be used as the data processing tasks to be executed in the next rendering cycle of the target rendering cycle.

[0084] The above technical solution is adopted, by obtaining at least one data processing task to be executed corresponding to the target rendering cycle of the terminal, the data processing task includes a data rendering task and a non-data rendering task; the target rendering cycle is determined according to the display refresh cycle of the browser of the terminal; in the case of executing at least one data processing task, if the currently executed data processing task is a data rendering task, then the data rendering task is skipped; or, if the currently executed data processing task is a non-data rendering task, then the non-data rendering task is executed, and after the non-data rendering task is completed, the total execution time of the non-data rendering task executed in the target rendering cycle is obtained; when it is determined that the total execution time and the target rendering cycle meet the preset rendering conditions, the skipped data rendering task is executed. In this way, the data processing tasks that need to be processed in the display refresh cycle of the terminal's browser can be determined, and multiple data processing tasks corresponding to the terminal's browser can be batched to ensure that the browser processes a certain amount of rendering tasks in each display refresh cycle, thereby avoiding performance problems caused by too many single rendering tasks. And when executing tasks within each target rendering cycle, determine whether each task is a data rendering task, skip the data rendering task, and only refresh the rendering operation once when the preset rendering conditions are met, and merge the refresh operations. This can effectively avoid resource waste and improve page refresh performance.

[0085] In some embodiments, Figure 3 As shown, the above step S11 may include the following steps.

[0086] In step S1011, at least one candidate data processing task to be executed by the terminal is obtained.

[0087] In step S1012, the timestamp information of the candidate data processing task is obtained.

[0088] Optionally, when at least one candidate data processing task to be executed by the terminal is obtained, the at least one candidate data processing task can be added to a task list, which is used to temporarily store the at least one candidate data processing task to be executed by the terminal. When a new task is added to the task list, a callback function can be triggered, which is used to asynchronously start the task in the callback processing task list. For example, the callback function can be a window.requestAnimationFrame function, which is used to request the browser to call a specified callback function before the next redraw. The calling frequency of this function is consistent with the refresh frequency of the browser.

[0089] Before executing at least one candidate data processing task in the task list, timestamp information corresponding to the at least one candidate data processing task may be first obtained, where the timestamp information is the time when the candidate data processing task is added to the task list.

[0090] In step S1013, at least one to-be-executed data processing task corresponding to the target rendering period of the terminal is determined according to the at least one timestamp information.

[0091] Optionally, based on the at least one timestamp information, the candidate data processing task with the timestamp information before the target time can be used as the at least one data processing task to be executed by the terminal corresponding to the target rendering cycle. The target time can be represented as the triggering time of the callback function.

[0092] When the target time is represented as the triggering time of the callback function, the candidate data processing task before the target time is added before the start of the current callback processing cycle and needs to be processed within the current cycle. Tasks added later than the triggering time will be left for the next callback processing.

[0093] In some embodiments, the data processing task that is not completed in the previous rendering cycle of the target rendering cycle can also be used as the data processing task to be executed by the terminal in the target rendering cycle.

[0094] By adopting the above technical solution, the data processing tasks that need to be executed in the process of data rendering and refreshing display of the terminal can be organized into a list in the form of a task queue, so that a large number of data processing tasks can be managed more effectively, and the target time can be used to batch the tasks according to the timestamp information of the tasks, so as to ensure that the browser has enough time to process the tasks in each frame, thereby avoiding performance problems caused by executing too many tasks at a single time.

[0095] In some embodiments, when the non-data rendering task is completed, the total execution time of the non-data rendering task executed in the target rendering cycle can be determined according to the timestamp information corresponding to the non-data rendering task executed in the target rendering cycle.

[0096] Optionally, the execution duration corresponding to each non-data rendering task executed in the target rendering cycle can be first determined according to the timestamp information corresponding to the non-data rendering task executed in the target rendering cycle; and then the sum of each execution duration is taken as the total execution duration.

[0097] Figure 4 is a flow chart of another data processing method according to an exemplary embodiment. Figure 4 As shown, the method is used in a terminal, and the method may include the following steps.

[0098] In step S201, a target rendering cycle is determined according to a display refresh cycle of a browser of a terminal.

[0099] In the process of the terminal browser converting the object model and data inside the computer into visual objects through algorithm instructions, the browser will continuously refresh according to the display refresh cycle to display the data. The display refresh cycle can be expressed as the refresh rate. Under normal circumstances, the refresh rate of the browser is consistent with the refresh rate of the device's display. For example, if the refresh rate of the device's display is 60Hz, then the refresh rate of the browser is also 60Hz, which means that the browser will try to redraw the page 60 times per second. Taking a refresh rate of 60Hz as an example, the target rendering cycle can be expressed as 1000ms / 60.

[0100] In step S202, at least one candidate data processing task to be executed by the terminal is obtained, and timestamp information corresponding to the candidate data processing task is obtained.

[0101] During the process of refreshing and displaying data on the terminal, at least one data processing task to be executed by the terminal may be acquired, where the data processing task is used to refresh and display the data to be rendered.

[0102] When at least one candidate data processing task to be executed by the terminal is obtained, the at least one candidate data processing task can be added to the task list. The task list is used to temporarily store the at least one candidate data processing task to be executed by the terminal. When a new task is added to the task list, a callback function can be triggered. The callback function is used to asynchronously start the task in the callback processing task list. For example, the callback function can be the window.requestAnimationFrame function, which is used to request the browser to call the specified callback function before the next redraw. The calling frequency of this function is consistent with the refresh frequency of the browser.

[0103] Before executing at least one candidate data processing task in the task list, the timestamp information corresponding to the at least one candidate data processing task may be obtained first, where the timestamp information is the time when the candidate data processing task is added to the task list.

[0104] In step S203, the candidate data processing task whose timestamp information is before the target time is used as at least one data processing task to be executed by the terminal corresponding to the target rendering period.

[0105] When the target time is represented as the triggering time of the callback function, the candidate data processing task before the target time is added before the start of the current callback processing cycle and needs to be processed within the current cycle. Tasks added later than the triggering time will be left for the next callback processing.

[0106] In step S204, the data processing task that is not completed in the previous rendering cycle of the target rendering cycle is used as the data processing task to be executed by the terminal in the target rendering cycle.

[0107] In step S205, at least one data processing task is executed.

[0108] When it is determined that the currently executed data processing task is a data rendering task, step S206 is executed;

[0109] When it is determined that the currently executed data processing task is a non-data rendering task, step S207 is executed;

[0110] In step S206, the data rendering task is skipped.

[0111] In this step, the system can add the data that needs to be rendered or the modification information of the existing data to the renderer. This data may include new geometry, textures, shader parameters and other rendering-related content. When adding data, the system will determine whether the operation is a refresh rendering operation. If it is a refresh rendering operation, the rendering will not be performed temporarily and the data rendering task will be skipped.

[0112] In step S207, the non-data rendering task is executed.

[0113] In step S208, after the non-data rendering task is executed, the total execution time of the non-data rendering task that has been executed within the target rendering cycle is obtained.

[0114] Optionally, the execution duration corresponding to each non-data rendering task executed in the target rendering cycle can be first determined according to the timestamp information corresponding to the non-data rendering task executed in the target rendering cycle; and then the sum of each execution duration is taken as the total execution duration.

[0115] In step S209, it is determined whether the total execution time and the target rendering cycle meet a preset rendering condition.

[0116] Optionally, when the time difference between the target rendering cycle and the total execution time is less than or equal to a preset difference threshold, it can be determined that the total execution time and the target rendering cycle meet the preset rendering condition; when the time difference between the target rendering cycle and the total execution time is greater than the preset difference threshold, it can be determined that the total execution time and the target rendering cycle do not meet the preset rendering condition.

[0117] If the preset rendering conditions are met, execute step S2010;

[0118] If the preset rendering condition is not met, executing step S205;

[0119] In step S2010, the skipped data rendering task is executed.

[0120] In step S2011, an unfinished data processing task among at least one to-be-executed data processing task corresponding to the target rendering cycle is used as a data processing task to be executed in the next rendering cycle of the target rendering cycle.

[0121] By adopting the above technical solution, a centralized rendering can be performed when the target rendering cycle meets the preset rendering conditions. Doing so can improve rendering efficiency, avoid frequent rendering operations, improve the overall efficiency of the system, and reduce the frequency of rendering and the overhead of repeated calculations. Centralized rendering reduces the display of intermediate states, which can ensure the continuity of the animation and the consistency of the visual effects. Users will see complete and coherent rendering results rather than fragments of intermediate states. By reducing frequent rendering operations, the load on the CPU and GPU can be reduced, thereby reducing the consumption of system resources. This helps to extend the service life of the device and reduce energy consumption. Control the workload of each rendering within the browser's refresh cycle to ensure that the system can respond to user operations in a timely manner, avoid long periods of unresponsiveness, and improve the user experience.

[0122] Considering that the application of this solution is highly correlated with whether the data processing task is a data rendering task or a non-data rendering task, the business flow of this solution is explained below using a specific number of data rendering tasks and non-data rendering tasks as an example. Figure 5 is a business flow diagram of a data processing method according to an exemplary embodiment. Figure 5 As shown, the business flow process may include the following processes.

[0123] Process 1: Determine the target rendering cycle according to the display refresh cycle of the terminal's browser.

[0124] Process 2: Obtain at least one candidate data processing task to be executed by the terminal.

[0125] Process 3: Determine at least one data processing task to be executed corresponding to the target rendering period of the terminal according to the timestamp information of the candidate data processing task.

[0126] Process 4: The data processing task that is not completed in the previous rendering cycle of the target rendering cycle is used as the data processing task to be executed by the terminal in the target rendering cycle.

[0127] The data processing tasks to be executed in process 3 and process 4 include data rendering task A, data rendering task B, non-data rendering task C, non-data rendering task D and non-data rendering task E.

[0128] Process 5: Execute data rendering task A, data rendering task B, non-data rendering task C, non-data rendering task D and non-data rendering task E in sequence.

[0129] Process 6: When it is determined that the currently executed data processing task is a data rendering task, the data rendering task is skipped; when it is determined that the currently executed data processing task is a non-data rendering task, the non-data rendering task is executed.

[0130] Process 7: After the non-data rendering task is executed, the total execution time of the non-data rendering task that has been executed within the target rendering cycle is obtained.

[0131] Process 8: Determine whether the total execution time and the target rendering cycle meet the preset rendering conditions.

[0132] Process 9: When the preset rendering condition is met, the skipped data rendering task is executed; when the preset rendering condition is not met, the next data processing task adjacent to the currently executed data processing task is executed.

[0133] Figure 6is a block diagram of a data processing device according to an exemplary embodiment. Figure 6 The device includes a first acquisition module 301, a first execution module 302 and a second execution module 303.

[0134] A first acquisition module 301 is used to acquire at least one data processing task to be executed corresponding to a target rendering period of the terminal, the data processing task including a data rendering task and a non-data rendering task; the target rendering period is determined according to a display refresh period of the browser of the terminal;

[0135] The first execution module 302 is configured to skip the data rendering task if the currently executed data processing task is a data rendering task when executing at least one data processing task; or

[0136] The second execution module 303 is used to execute the non-data rendering task if the currently executed data processing task is a non-data rendering task, and after the non-data rendering task is completed, obtain the total execution time of the non-data rendering task that has been executed within the target rendering cycle; when it is determined that the total execution time and the target rendering cycle meet the preset rendering conditions, execute the skipped data rendering task.

[0137] Optionally, the preset rendering condition includes:

[0138] The time difference between the target rendering period and the total execution time is less than or equal to a preset difference threshold.

[0139] Figure 7 is based on Figure 6 The embodiment shown is a block diagram of a first acquisition module. Figure 7 , the first acquisition module includes:

[0140] A first acquisition submodule 3011 is used to acquire at least one candidate data processing task to be executed by the terminal;

[0141] The second acquisition submodule 3012 is used to acquire the timestamp information of the candidate data processing task;

[0142] The first determining submodule 3013 is configured to determine, according to the at least one timestamp information, at least one to-be-executed data processing task corresponding to the target rendering period of the terminal.

[0143] Optionally, the first determining submodule 3013 is used to use the candidate data processing task whose timestamp information is before the target time as at least one data processing task to be executed by the terminal corresponding to the target rendering period.

[0144] Optionally, the second execution module 303 is used to determine the total execution time of the non-data rendering task executed within the target rendering cycle according to the timestamp information corresponding to the non-data rendering task executed within the target rendering cycle when the non-data rendering task is executed.

[0145] Figure 8 is based on Figure 6 The embodiment shown is a block diagram of a second execution module. Figure 8 The second execution module 303 includes:

[0146] The second determining submodule 3031 is used to determine the execution duration corresponding to each of the non-data rendering tasks executed in the target rendering cycle according to the timestamp information corresponding to the non-data rendering tasks executed in the target rendering cycle;

[0147] The third determining submodule 3032 is configured to take the sum of each execution duration as the total execution duration.

[0148] Fig. 9 is based on Figure 7 The embodiment shown is a block diagram of a first acquisition module. Fig. 9 The first acquisition module 301 further includes:

[0149] The fourth determining submodule 3014 is configured to use an unfinished data processing task among at least one to-be-executed data processing task corresponding to the target rendering cycle as a data processing task to be executed in a next rendering cycle of the target rendering cycle.

[0150] Optionally, the first acquisition module 301 is used to use the data processing task that is not completed in a previous rendering cycle of the target rendering cycle as the data processing task to be executed by the terminal in the target rendering cycle.

[0151] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0152] By obtaining at least one data processing task to be executed corresponding to the target rendering cycle of the terminal, the data processing task includes a data rendering task and a non-data rendering task; the target rendering cycle is determined according to the display refresh cycle of the browser of the terminal; in the case of executing at least one data processing task, if the currently executed data processing task is a data rendering task, then the data rendering task is skipped; or, if the currently executed data processing task is a non-data rendering task, then the non-data rendering task is executed, and after the non-data rendering task is completed, the total execution time of the non-data rendering task executed in the target rendering cycle is obtained; when it is determined that the total execution time and the target rendering cycle meet the preset rendering conditions, the skipped data rendering task is executed. In this way, the data processing tasks that need to be processed in the display refresh cycle of the terminal's browser can be determined, and multiple data processing tasks corresponding to the terminal's browser can be batched to ensure that the browser processes a certain amount of rendering tasks in each display refresh cycle, thereby avoiding performance problems caused by too many single rendering tasks. And when executing tasks within each target rendering cycle, determine whether each task is a data rendering task, skip the data rendering task, and only refresh the rendering operation once when the preset rendering conditions are met, and merge the refresh operations. This can effectively avoid resource waste and improve page refresh performance.

[0153] Fig.10 FIG. 4 is a block diagram of a controller 400 according to an exemplary embodiment. Fig.10 As shown, the controller 400 may include: a processor 401 and a memory 402. The controller 400 may also include one or more of a multimedia component 403, an input / output interface 404, and a communication component 405.

[0154] The processor 401 is used to control the overall operation of the controller 400 to complete all or part of the steps in the above data processing method. The memory 402 is used to store various types of data to support the operation of the controller 400. For example, these data may include instructions for any application or method used to operate on the controller 400, and application-related data, such as contact data, sent and received messages, pictures, audio, video, etc. The memory 402 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, referred to as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, referred to as EPROM), programmable read-only memory (Programmable Read-Only Memory, referred to as PROM), read-only memory (Read-Only Memory, referred to as ROM), magnetic memory, flash memory, magnetic disk or optical disk. The multimedia component 403 may include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may be further stored in the memory 402 or sent through the communication component 405. The audio component also includes at least one speaker for outputting audio signals. The input / output interface 404 provides an interface between the processor 401 and other interface modules, and the other interface modules may be keyboards, mice, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 405 is used for wired or wireless communication between the controller 400 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IOT, eMTC, or other 5G, etc., or a combination of one or more of them, is not limited here. Therefore, the corresponding communication component 405 may include: Wi-Fi module, Bluetooth module, NFC module, etc.

[0155] In an exemplary embodiment, the controller 400 can be implemented by one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned data processing method.

[0156] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, and when the program instructions are executed by a processor, the steps of the above-mentioned data processing method are implemented. For example, the computer-readable storage medium can be the above-mentioned memory 402 including program instructions, and the above-mentioned program instructions can be executed by the processor 401 of the controller 400 to complete the above-mentioned data processing method.

[0157] Fig.11 FIG. 5 is a block diagram of another controller 500 according to an exemplary embodiment. For example, the controller 500 may be provided as a server. Fig.11 The controller 500 includes a processor 522, which may be one or more, and a memory 532 for storing a computer program executable by the processor 522. The computer program stored in the memory 532 may include one or more modules, each corresponding to a set of instructions. In addition, the processor 522 may be configured to execute the computer program to perform the above-mentioned data processing method.

[0158] In addition, the controller 500 may further include a power supply component 526 and a communication component 550, wherein the power supply component 526 may be configured to perform power management of the controller 500, and the communication component 550 may be configured to implement communication, for example, wired or wireless communication, of the controller 500. In addition, the controller 500 may further include an input / output interface 558. The controller 500 may operate based on an operating system stored in the memory 532.

[0159] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, and when the program instructions are executed by the processor, the steps of the above-mentioned data processing method are implemented. For example, the non-transitory computer-readable storage medium can be the above-mentioned memory 532 including program instructions, and the above-mentioned program instructions can be executed by the processor 522 of the controller 500 to complete the above-mentioned data processing method.

[0160] In another exemplary embodiment, a computer program product is also provided. The computer program product includes a computer program executable by a programmable device, and the computer program has a code portion for executing the above data processing method when executed by the programmable device.

[0161] The preferred embodiments of the present disclosure are described in detail above in conjunction with the accompanying drawings; however, the present disclosure is not limited to the specific details in the above embodiments. Within the technical concept of the present disclosure, a variety of simple modifications can be made to the technical solution of the present disclosure, and these simple modifications all fall within the protection scope of the present disclosure.

[0162] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present disclosure will not further describe various possible combinations.

[0163] In addition, various embodiments of the present disclosure may be arbitrarily combined, and as long as they do not violate the concept of the present disclosure, they should also be regarded as the contents disclosed by the present disclosure.

Claims

1. A data processing method, characterized in that: The method comprises: Acquire at least one data processing task to be executed corresponding to a target rendering cycle of the terminal, wherein the data processing task includes a data rendering task and a non-data rendering task; the target rendering cycle is determined according to a display refresh cycle of a browser of the terminal; In the case of executing at least one data processing task, if the currently executed data processing task is a data rendering task, skipping the data rendering task; or, If the currently executed data processing task is a non-data rendering task, then execute the non-data rendering task, and after the non-data rendering task is completed, obtain the total execution time of the non-data rendering task that has been executed within the target rendering cycle; if it is determined that the total execution time and the target rendering cycle meet the preset rendering conditions, execute the skipped data rendering task.

2. The method according to claim 1, characterized in that The preset rendering conditions include: The time difference between the target rendering period and the total execution time is less than or equal to a preset difference threshold.

3. The method according to claim 1, characterized in that The acquiring terminal comprises: Acquire at least one candidate data processing task to be executed by the terminal; Obtaining timestamp information of the candidate data processing task; At least one to-be-executed data processing task corresponding to the target rendering period of the terminal is determined according to the at least one timestamp information.

4. The method according to claim 3, characterized in that The determining, according to the at least one timestamp information, at least one to-be-executed data processing task corresponding to the terminal in the target rendering period comprises: The candidate data processing task whose timestamp information is before the target time is used as at least one data processing task to be executed by the terminal corresponding to the target rendering period.

5. The method according to claim 3, characterized in that: The obtaining of the total execution time of the non-data rendering task executed within the target rendering cycle includes: When the non-data rendering task is executed, the total execution duration of the non-data rendering tasks executed in the target rendering cycle is determined according to the timestamp information corresponding to the non-data rendering tasks executed in the target rendering cycle.

6. The method according to claim 5, characterized in that The determining, according to the timestamp information corresponding to the non-data rendering tasks executed in the target rendering period, the total execution duration of the non-data rendering tasks executed in the target rendering period comprises: Determining, according to the timestamp information corresponding to the non-data rendering tasks executed in the target rendering cycle, the execution duration corresponding to each of the non-data rendering tasks executed in the target rendering cycle; The sum of each execution duration is taken as the total execution duration.

7. The method according to claim 3, characterized in that The method further comprises: The unfinished data processing task among at least one to-be-executed data processing task corresponding to the target rendering cycle is used as the data processing task to be executed in the next rendering cycle of the target rendering cycle.

8. The method according to claim 7, characterized in that The acquiring terminal comprises: The data processing task that is not completed in the previous rendering cycle of the target rendering cycle is used as the data processing task to be executed by the terminal in the target rendering cycle.

9. A data processing device, characterized in that: The device comprises: A first acquisition module, used to acquire at least one data processing task to be executed by the terminal corresponding to a target rendering period, wherein the data processing task includes a data rendering task and a non-data rendering task; the target rendering period is determined according to a display refresh period of the browser of the terminal; a first execution module, configured to skip the data rendering task if the currently executed data processing task is a data rendering task when executing at least one data processing task; or The second execution module is used to execute the non-data rendering task if the data processing task currently being executed is a non-data rendering task, and after the non-data rendering task is completed, obtain the total execution time of the non-data rendering task that has been executed within the target rendering cycle; when it is determined that the total execution time and the target rendering cycle meet the preset rendering conditions, execute the skipped data rendering task.

10. A controller, characterized in that: The controller comprises: a memory having a computer program stored thereon; A processor, configured to execute the computer program in the memory to implement the steps of the method according to any one of claims 1 to 8.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.

12. A computer program product, characterized in that The invention comprises a computer program, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Image rendering method and device, equipment, medium and program product

    CN114202608A

  • Page rendering method and device, computer equipment and storage medium

    CN114238815A