Graphic data rendering method and device, equipment, readable storage medium and product

By determining priority according to the exposure order of the graphic data in user interface rendering and performing frame-based rendering, the problem that user interface rendering cannot be completed at a specified frame rate is solved, frame dropping is avoided, and user experience is improved.

CN119941946APending Publication Date: 2025-05-06BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202311446579.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-01
Publication Date
2025-05-06

Smart Images

  • Figure CN119941946A_ABST
    Figure CN119941946A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a graphic data rendering method and device, equipment, a readable storage medium and a product, and the method comprises the steps: obtaining a plurality of pieces of graphic data in a to-be-rendered user interface, and determining an exposure sequence corresponding to the plurality of pieces of graphic data; determining priority information corresponding to the multiple pieces of graphic data according to the exposure sequence; and performing framing rendering operation on the plurality of pieces of graphic data based on the priority information corresponding to the plurality of pieces of graphic data. Therefore, the graphic data needing emergency rendering can be preferentially rendered based on the priority information. Besides, framing rendering operation can be carried out on multiple pieces of graphic data, incremental rendering can be carried out on the graphic data in each frame, so that a browser can complete graphic drawing within specified time without overload, and the problem of frame dropping in the rendering process and the influence on the browsing experience of a user are effectively avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of data processing technology, and in particular, to a method, device, equipment, readable storage medium and product for rendering graphic data. Background Art

[0002] User Interface (UI) is a medium for interaction and information exchange between the system and the user. It realizes the conversion between the internal form of information and the form acceptable to humans. The user interface generally displays multiple graphic data to enable users to obtain more information from the user interface.

[0003] The current user interface rendering method generally renders all the graphic data to be displayed in the user interface when the user interface is opened.

[0004] However, when using the above method to render the user interface, the browser rendering single thread may be too busy and overloaded, so it cannot complete the drawing of graphics data at the specified frame rate, resulting in frame drops in the UI display, affecting the user's browsing experience. Summary of the invention

[0005] The embodiments of the present disclosure provide a method, apparatus, device, readable storage medium and product for rendering graphic data, which are used to solve the technical problem that the existing user interface rendering method cannot complete the drawing of graphic data at a specified frame rate, resulting in frame drops in the display of the graphic interface.

[0006] In a first aspect, an embodiment of the present disclosure provides a method for rendering graphics data, including:

[0007] Acquire multiple graphic data in the user interface to be rendered, and determine an exposure order corresponding to the multiple graphic data;

[0008] Determining priority information corresponding to the plurality of graphic data according to the exposure sequence;

[0009] A frame rendering operation is performed on the multiple graphic data based on priority information corresponding to the multiple graphic data.

[0010] In a second aspect, an embodiment of the present disclosure provides a graphics data rendering device, including:

[0011] An acquisition module, used to acquire a plurality of graphic data in a user interface to be rendered, and determine an exposure order corresponding to the plurality of graphic data;

[0012] A determination module, configured to determine priority information corresponding to the plurality of graphic data according to the exposure sequence;

[0013] A rendering module is used to perform frame rendering operations on the multiple graphic data based on priority information corresponding to the multiple graphic data.

[0014] In a third aspect, an embodiment of the present disclosure provides an electronic device, including: a processor and a memory;

[0015] The memory stores computer-executable instructions;

[0016] The processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the graphics data rendering method as described in the first aspect and various possible designs of the first aspect.

[0017] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the graphics data rendering method described in the first aspect and various possible designs of the first aspect is implemented.

[0018] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the graphics data rendering method as described in the first aspect and various possible designs of the first aspect.

[0019] The graphics data rendering method, device, equipment, readable storage medium and product provided in this embodiment determine the priority information of multiple graphics data according to the exposure order of the graphics data. Then, the multiple graphics data can be rendered based on the priority information, so that the graphics data that need to be rendered urgently can be given priority rendering based on the priority information. In addition, the multiple graphics data can also be rendered in frames, and the graphics data can be rendered incrementally in each frame, so that the browser can complete the drawing of the graphics without overloading within the specified time, effectively avoiding the problem of frame drops during the rendering process, which affects the user's browsing experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0021] Figure 1 A flowchart of a method for rendering graphic data provided by an embodiment of the present disclosure;

[0022] Figure 2 A schematic diagram of a user interface provided for an embodiment of the present disclosure;

[0023] Figure 3 A schematic diagram of frame rendering provided in an embodiment of the present disclosure;

[0024] Figure 4 A flowchart of a method for rendering graphics data provided by another embodiment of the present disclosure;

[0025] Figure 5 A flowchart of a method for rendering graphics data provided by another embodiment of the present disclosure;

[0026] Figure 6 A schematic diagram of the structure of a graphics data rendering device provided in an embodiment of the present disclosure;

[0027] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0028] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0029] Glossary:

[0030] User Interface (UI): The interface refers to the medium that can interact with users, such as apps and web pages. As the name suggests, UI focuses on the presentation of the user interface, such as visual beauty, design aesthetics, convenience, style presentation, and details include fonts, font size, color, logos, buttons, animation effects, etc.

[0031] Frame rate: The frequency (rate) at which bitmap images, called frames, appear continuously on a display. The term also applies to film and video cameras, computer graphics, and motion capture systems. Frame rate can also be called frame frequency and is expressed in Hertz (Hz).

[0032] Frame drop: Generally refers to the phenomenon that the picture stagnates (for a short or long time) due to the low frame rate caused by the hardware being insufficient to support the dynamic display refresh frequency of the monitor screen. Frame drop in the game means that the game is stuck during the game, and the image is not refreshed in time, resulting in a sticky screen.

[0033] Frames Per Second (FPS): In the field of images, it refers to the number of frames transmitted per second. In layman's terms, it refers to the number of frames in an animation or video. The number of consecutive pictures displayed in 1 second. For example, 30fps means 30 consecutive pictures are displayed in one second. For example, 60fps means 60 consecutive pictures are displayed in one second.

[0034] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0035] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0036] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0037] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0038] In order to solve the technical problem that the existing user interface rendering method cannot complete the drawing of graphic data at a specified frame rate, resulting in frame drops in the display of the graphic interface, the present disclosure provides a graphic data rendering method, device, equipment, readable storage medium and product.

[0039] It should be noted that the graphics data rendering method, device, equipment, readable storage medium and product provided by the present disclosure can be applied to any application scenario of graphics interface rendering.

[0040] Currently, the system displays many UI elements to users. As a result, when users first load or use the system, the browser rendering thread is too busy and overloaded, and cannot complete the drawing of graphic data within the specified frame rate (the refresh rate of the screen within a time range). As a result, the UI display may drop frames, affecting the user's browsing experience.

[0041] In the process of solving the above technical problems, the inventors discovered through research that in order to avoid frame drops during the rendering process, the graphic data can be segmented according to the exposure order of the graphic data to be rendered, and multiple graphic data can be divided into queues to be rendered with different priorities.

[0042] Furthermore, during the rendering process, the graphic data may be displayed on the screen in frames. At least one target graphic data is determined based on the rendering capability of the browser used to render the graphic data and the rendering time of the graphic data in each queue to be rendered. In each frame, an incremental rendering operation is performed on at least one target graphic data corresponding to the current frame.

[0043] Figure 1 A flowchart of a method for rendering graphic data provided by an embodiment of the present disclosure is shown in FIG. Figure 1 As shown, the method includes:

[0044] Step 101: Acquire a plurality of graphic data in a user interface to be rendered, and determine an exposure sequence corresponding to the plurality of graphic data.

[0045] The execution subject of this embodiment is a graphics data rendering device. The graphics data rendering device can be coupled to a terminal device, so that the graphics data rendering operation can be performed based on the priority information of the graphics data based on the browsing operation of the user interface on the terminal device. Alternatively, the graphics data rendering device can also be coupled to a server, which can be connected to the terminal device for communication. In this way, a graphics data rendering request sent by the terminal device can be obtained, and the graphics data rendering operation can be performed based on the graphics data rendering request and the priority information of the graphics data.

[0046] In this embodiment, the user can browse the user interface on the terminal device, and the user interface generally includes a plurality of graphic data, wherein the graphic data includes but is not limited to graphic contents such as images, controls, and icons.

[0047] When a user opens the user interface for the first time, or switches the graphic content displayed in the user interface, in order to meet the user's browsing needs for the user interface, a rendering operation may be performed on multiple graphic data in the user interface.

[0048] Optionally, multiple graphic data in the user interface to be rendered may be obtained. When the user opens the user interface for the first time, the multiple graphic data may be all the graphic data in the user interface. When the user performs a content browsing operation through a switching operation, the multiple graphic data may be updated graphic data corresponding to the user's switching operation.

[0049] Furthermore, in order to improve the accuracy and efficiency of rendering the graphic data, the exposure order corresponding to the multiple graphic data may be determined. Since there are many graphic contents to be displayed in the user interface, an exposure area and an area to be exposed may be set in the user interface. The exposure area may be an area that can be browsed currently in the user interface. The exposure order of the graphic data that is in the exposure area but has not been rendered takes precedence over the graphic data in the area to be exposed.

[0050] Step 102: Determine priority information corresponding to the plurality of graphic data according to the exposure sequence.

[0051] In this embodiment, after the exposure sequence corresponding to the plurality of graphic data is determined, priority information corresponding to the plurality of graphic data may be determined based on the exposure sequence.

[0052] Optionally, if the exposure order of at least one graphic data is that it is already in the exposure area but has not been rendered, the highest priority can be set for the graphic data so that the graphic data can be rendered urgently to ensure the user's browsing experience. If the exposure order of at least one graphic data is that it is in the area to be exposed, it can be switched to the exposure area for exposure based on a switching operation triggered by the user, and a lower priority can be set for the graphic data so that it can be rendered when it is switched to the exposure area. The priority of the graphic data in the exposure area but not rendered is higher than that of the graphic data in the area to be exposed and higher than that of other graphic data.

[0053] Step 103: Perform frame rendering operations on the multiple graphic data based on priority information corresponding to the multiple graphic data.

[0054] In this implementation, after respectively determining the priority information corresponding to the plurality of graphic data, in order to ensure the timeliness of the rendering operation, the plurality of graphic data may be subjected to frame-by-frame rendering operations based on the priority information.

[0055] Optionally, the rendering operation may be performed on the graphics data with the highest priority first, and after the rendering operation on the graphics data with the highest priority is completed, the rendering operation may be performed on the graphics data with a lower priority.

[0056] Furthermore, multiple graphics data can be rendered in frames. Graphic data is rendered incrementally in each frame so that the browser can complete the drawing of the graphics within a specified time without overloading.

[0057] Further, based on any of the above embodiments, step 101 includes:

[0058] In response to a triggering operation on a user interface, a plurality of graphic data to be rendered corresponding to the user interface is acquired.

[0059] In this embodiment, the user can perform a trigger operation on the user interface, wherein the trigger operation includes but is not limited to an interface opening operation, a forward loading operation, a reverse loading operation, etc. In response to the user's trigger operation on the user interface, a plurality of graphics data to be rendered corresponding to the user interface can be obtained.

[0060] When the user opens the user interface for the first time, the multiple graphic data may be all the graphic data in the user interface. When the user browses the content through forward loading operation and reverse loading operation, the multiple graphic data may be the updated graphic data corresponding to the forward loading operation and reverse loading operation of the user.

[0061] The graphics data rendering method provided in this embodiment determines the priority information of multiple graphics data according to the exposure order of the graphics data. Then, the multiple graphics data can be rendered based on the priority information, so that the graphics data that need to be rendered urgently can be given priority rendering based on the priority information. In addition, the multiple graphics data can also be rendered in frames, and the graphics data can be rendered incrementally in each frame, so that the browser can complete the drawing of the graphics within the specified time without overloading, effectively avoiding the problem of frame drops during the rendering process, which affects the user's browsing experience.

[0062] Optionally, based on any of the above embodiments, step 102 includes:

[0063] If the graphic data is in an exposure area in the user interface and is in an unrendered state, the priority of the graphic data is determined to be the first priority.

[0064] If the graphic data is within the area to be exposed in the user interface, the priority of the graphic data is determined to be the second priority.

[0065] Graphics data other than the first priority and the second priority among the plurality of graphics data are determined as a third priority.

[0066] Among them, the first priority is higher than the second priority and higher than the third priority.

[0067] In this embodiment, when the graphic data is already in the exposure area of ​​the user interface and is not rendered, in order to avoid page jitter, an empty placeholder bone screen can be displayed at the display position corresponding to the graphic data. In order to be able to present the graphic data on the user interface in a timely manner, the priority of the graphic data can be set to the first priority. The first priority can be the highest priority, so that the graphic data of the first priority can be urgently rendered later.

[0068] Furthermore, if the graphic data is in the to-be-exposed area in the user interface, it can be displayed based on the loading operation triggered by the user. The urgency of its rendering is lower than that of the graphic data that is already in the exposed area in the user interface and is not rendered. Therefore, a second priority can be set for the graphic data. The second priority is lower than the first priority. After the rendering operation of the graphic data corresponding to the first priority is completed, the rendering operation of the graphic data corresponding to the second priority can continue.

[0069] Furthermore, for the graphic data other than the graphic data corresponding to the first priority and the second priority among the multiple graphic data, a third priority may be set for it. The first priority is higher than the second priority and higher than the third priority. After completing the rendering operation of the graphic data corresponding to the first priority and the second priority, the rendering operation may continue to be performed on the graphic data corresponding to the third priority.

[0070] Figure 2 A user interface diagram provided in an embodiment of the present disclosure, such as Figure 2 As shown, the user interface 21 includes an exposure area 22 and an area to be exposed 23. Among them, a plurality of graphic data 24 can be displayed in the exposure area 22. For the graphic data in the exposure area 22 but not rendered, a placeholder operation can be performed with a preset block diagram, and its priority can be set to the first priority. For the graphic data 25 in the area to be exposed 23, its priority can be set to the second priority.

[0071] The graphics data rendering method provided in this embodiment determines the priority of the graphics data based on the exposure order of the graphics data. The exposure order can accurately represent the urgency of the graphics data rendering, thereby providing a basis for the rendering of the graphics data.

[0072] Further, based on any of the above embodiments, step 103 includes:

[0073] A first queue to be rendered corresponding to the first priority, a second queue to be rendered corresponding to the second priority, and a third queue to be rendered corresponding to the third priority are respectively constructed.

[0074] Frame rendering operations are performed sequentially on multiple graphics data corresponding to the first queue to be rendered, the second queue to be rendered, and the third queue to be rendered.

[0075] In this embodiment, after determining the priority information corresponding to each graphic data respectively, the graphic data can be divided based on the priority information to obtain a first queue to be rendered corresponding to the first priority, a second queue to be rendered corresponding to the second priority, and a third queue to be rendered corresponding to the third priority.

[0076] Furthermore, since the first priority is higher than the second priority which is higher than the third priority, in order to be able to give priority to rendering operations on graphic data that require urgent rendering, frame rendering operations can be performed on multiple graphic data corresponding to the first queue to be rendered, the second queue to be rendered and the third queue to be rendered in turn.

[0077] Figure 3 A schematic diagram of frame rendering provided by an embodiment of the present disclosure, such as Figure 3 As shown, after three queues to be rendered are established based on the priority information, the graphics data 31 in the first queue to be rendered can be rendered first. After the rendering operation on the graphics data 31 in the first queue to be rendered is completed, the graphics data 32 in the second queue to be rendered can be rendered in the next frame. After the rendering operation on the graphics data 32 in the second queue to be rendered is completed, the graphics data 33 in the third queue to be rendered can be rendered in the next frame.

[0078] The graphics data rendering method provided in this embodiment performs frame rendering operations on multiple graphics data corresponding to the first queue to be rendered, the second queue to be rendered, and the third queue to be rendered in sequence, thereby ensuring that other graphics data are rendered in a timely manner based on the priority rendering operations on the graphics data that need to be rendered urgently.

[0079] Figure 4 A flowchart of a graphics data rendering method provided by another embodiment of the present disclosure is provided. Based on any of the above embodiments, Figure 4 As shown, step 103 includes:

[0080] Step 401: Construct a preset number of priority queues according to the priority information.

[0081] Step 402: Determine the rendering capability of the browser for the graphics rendering operation in each frame.

[0082] Step 403: Perform frame rendering operations on the graphic data corresponding to the preset number of priority queues in descending order of priority according to the rendering capability.

[0083] In this embodiment, after respectively determining the priority information corresponding to each graphic data, the graphic data may be divided based on the priority information to obtain a preset number of priority queues, wherein the number of the priority queues is consistent with the number of levels of the priority information.

[0084] Furthermore, in order to enable the browser to complete the drawing of graphics within a specified time without being overloaded, the graphics data may be rendered in frames based on the priority information and the rendering capability of the browser.

[0085] Optionally, the rendering capability of the browser used for the graphics rendering operation in each frame may be determined, and then the graphics data corresponding to the preset number of priority queues may be subjected to frame rendering operations in descending order of priority according to the rendering capability.

[0086] The graphics data rendering method provided in this embodiment performs frame rendering operations on the graphics data based on the rendering capability and priority information of the browser, so that the browser can complete the drawing of the graphics within a specified time without being overloaded, and effectively avoids the problem of frame drops during the rendering process.

[0087] Further, based on any of the above embodiments, step 303 includes:

[0088] According to the rendering capability corresponding to the current frame of the browser, at least one target graphic data matching the rendering capability is obtained from the preset number of priority queues in order of priority from high to low.

[0089] A rendering operation is performed on the at least one target graphics data.

[0090] In this embodiment, for each time frame, the rendering capability of the browser corresponding to the current frame can be determined, and the priority queue for rendering the current frame is determined in the preset number of priority queues in order from high to low priority.

[0091] Furthermore, at least one target graphic data that matches the rendering capability may be determined in the priority queue to be rendered in the current frame, and a rendering operation may be performed on the at least one target graphic data, wherein the sum of the rendering times corresponding to the at least one target graphic data is less than or equal to the rendering capability of the current frame of the browser.

[0092] Further, based on any of the above embodiments, the rendering operation on the at least one target graphic data includes:

[0093] An incremental rendering operation is performed on the at least one target graphics data in the user interface.

[0094] In this embodiment, during the frame rendering operation, the urgent graphic data may be given priority in rendering, at least one target graphic data is determined according to the priority information and the rendering capability, and an incremental rendering operation is performed on the at least one target graphic data based on the currently rendered data.

[0095] The graphics data rendering method provided in this embodiment obtains at least one target graphics data matching the rendering capability in a preset number of priority queues in a descending order of priority according to the rendering capability corresponding to the current frame of the browser. The rendering operation is performed on the at least one target graphics data, so that the at least one target graphics data to be rendered can be accurately determined. In addition, the browser can be prevented from being overloaded during the rendering process, and the frame drop problem can be effectively avoided during the rendering process, thereby improving the user experience.

[0096] Figure 5 A flowchart of a graphics data rendering method provided by another embodiment of the present disclosure is provided. Based on any of the above embodiments, Figure 5 As shown, according to the rendering capability corresponding to the current frame of the browser, obtaining at least one target graphic data matching the rendering capability from the preset number of priority queues in a descending order of priority includes:

[0097] Step 501: Determine the queue to be rendered by the browser in the current frame in descending order of priority.

[0098] Step 502: Determine at least one graphic data in the queue to be rendered according to the rendering capability, so that the sum of the rendering time corresponding to the at least one graphic data matches the rendering capability.

[0099] Step 503: Determine the at least one graphic data as the at least one target graphic data.

[0100] In this embodiment, in order to accurately determine at least one target graphic data to be rendered currently, for each time frame, the queue to be rendered of the current frame to be processed may be determined according to the historical rendering progress and the order of priority from high to low.

[0101] After determining the queue to be rendered, at least one graphic data matching the rendering capability can be determined in the queue to be rendered, wherein the sum of the rendering time corresponding to the at least one graphic data is less than or equal to the rendering capability of the current frame of the browser, so that the at least one graphic data can be determined as at least one target graphic data.

[0102] For example, assuming that in the current frame, the browser's corresponding rendering capability can bear the time consumption of graphic data as n, then three graphic data with time consumptions of a, b, and c are taken out from the priority queue, and the layout and rendering are serially arranged in sequence, where: a+b+c<=n. This ensures that the rendering of the graphic data in the current round will not exceed the rendering load of the browser.

[0103] The graphic data rendering method provided in this embodiment determines at least one target graphic data based on the rendering capability of the browser, priority information, and the rendering time consumption of the graphic data, so that the total rendering time consumption of at least one target graphic data matches the rendering capability of the browser, avoiding overloading the browser during the rendering process, ensuring stable rendering of the graphic data, and improving the user experience.

[0104] Further, based on any of the above embodiments, step 402 includes:

[0105] If it is determined that the sum of the rendering time consumptions corresponding to at least one remaining graphic data in the current rendering queue to be rendered is less than the rendering capability, determine the next rendering queue according to the priority information.

[0106] Determine at least one graphic data in the next rendering queue so that the sum of the rendering time consumptions of at least one graphic data in the next rendering queue and the at least one remaining graphic data corresponds to the rendering capability.

[0107] Determine the at least one remaining graphic data and at least one graphic data in the next rendering queue as the at least one target graphic data.

[0108] In this embodiment, if the sum of the rendering time consumptions corresponding to at least one remaining graphic data in the rendering queue to be rendered in the current time frame is less than the rendering capability, the at least one remaining graphic data can be directly rendered in the current frame.

[0109] As an implementable manner, in order to make full use of the rendering capability of the browser, determine at least one graphic data in the next rendering queue so that the sum of the rendering time consumptions of at least one graphic data in the next rendering queue and the at least one remaining graphic data corresponds to the rendering capability. Determine the at least one remaining graphic data and at least one graphic data in the next rendering queue as the at least one target graphic data. Thus, the graphic data in two priority queues can be rendered in one frame.

[0110] For example, assume that in the current frame, the rendering capability corresponding to the browser can be that the tolerable graphic data time consumption is n, and the time consumptions corresponding to the two remaining graphic data in the current rendering queue to be rendered are a and b respectively, where: a + b < n. At this time, in order to make full use of the rendering capability of the browser, a graphic data can be determined from the next rendering queue, and the time consumption corresponding to this graphic data can be c, where: a + b + c <= n. Thus, the three graphic data can be serially typeset and laid out for rendering, and it can be ensured that the rendering of the graphic data in the current round will not exceed the rendering load of the browser.

[0111] The graphics data rendering method provided in this embodiment obtains at least one graphics data in the next rendering queue after the data in the current rendering queue is rendered, and renders the graphics data in the two rendering queues within one frame, thereby making full use of the rendering capabilities of the browser and improving the efficiency of graphics data rendering.

[0112] Figure 6 A schematic diagram of the structure of a graphics data rendering device provided by an embodiment of the present disclosure, such as Figure 6 As shown, the device includes: an acquisition module 61, a determination module 62 and a rendering module 63. The acquisition module 61 is used to acquire multiple graphic data in the user interface to be rendered, and determine the exposure order corresponding to the multiple graphic data. The determination module 62 is used to determine the priority information corresponding to the multiple graphic data according to the exposure order. The rendering module 63 is used to perform frame rendering operations on the multiple graphic data based on the priority information corresponding to the multiple graphic data.

[0113] Further, based on any of the above embodiments, the determination module is used to: if the graphic data is in the exposure area of ​​the user interface and is not rendered, determine the priority of the graphic data to be the first priority. If the graphic data is in the to-be-exposed area of ​​the user interface, determine the priority of the graphic data to be the second priority. Determine the graphic data other than the first priority and the second priority among the multiple graphic data as the third priority. The first priority is higher than the second priority and higher than the third priority.

[0114] Further, based on any of the above embodiments, the rendering module is used to: respectively construct a first queue to be rendered corresponding to the first priority, a second queue to be rendered corresponding to the second priority, and a third queue to be rendered corresponding to the third priority, and sequentially perform frame rendering operations on multiple graphics data corresponding to the first queue to be rendered, the second queue to be rendered, and the third queue to be rendered.

[0115] Further, based on any of the above embodiments, the rendering module is used to: construct a preset number of priority queues according to the priority information, determine the rendering capability of the browser for graphics rendering operation in each frame, and perform frame rendering operations on the graphics data corresponding to the preset number of priority queues in descending order of priority according to the rendering capability.

[0116] Further, based on any of the above embodiments, the rendering module is used to: obtain at least one target graphic data matching the rendering capability from the preset number of priority queues in descending order of priority according to the rendering capability of the browser corresponding to the current frame, and perform a rendering operation on the at least one target graphic data.

[0117] Further, based on any of the above embodiments, the rendering module is used to: determine the queue to be rendered of the browser in the current frame in descending order of priority; determine at least one graphic data in the queue to be rendered according to the rendering capability, so that the sum of the rendering time corresponding to the at least one graphic data matches the rendering capability; and determine the at least one graphic data as the at least one target graphic data.

[0118] Further, based on any of the above embodiments, the rendering module is used to: if it is determined that the sum of the rendering time corresponding to at least one remaining graphic data in the current queue to be rendered is less than the rendering capability, determine the next queue to be rendered according to the priority information. Determine at least one graphic data in the next rendering queue so that the sum of the rendering time corresponding to at least one graphic data in the next rendering queue and the at least one remaining graphic data matches the rendering capability. Determine the at least one remaining graphic data and the at least one graphic data in the next rendering queue as the at least one target graphic data.

[0119] Further, based on any of the above embodiments, the rendering module is used to: perform an incremental rendering operation on the at least one target graphic data in the user interface.

[0120] Further, based on any of the above embodiments, the acquisition module is used to: in response to a trigger operation on a user interface, acquire a plurality of graphic data to be rendered corresponding to the user interface.

[0121] The device provided in this embodiment can be used to execute the technical solution of the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be repeated here.

[0122] In order to implement the above embodiments, the embodiments of the present disclosure further provide a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the graphics data rendering method described in any of the above embodiments is implemented.

[0123] In order to implement the above embodiments, the embodiments of the present disclosure further provide a computer program product, including a computer program, which implements the method for rendering graphics data as described in any of the above embodiments when executed by a processor.

[0124] In order to implement the above embodiment, the present disclosure also provides an electronic device, including: a processor and a memory;

[0125] The memory stores computer-executable instructions;

[0126] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the graphics data rendering method as described in any of the above embodiments.

[0127] Figure 7 The electronic device 700 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure, and the electronic device 700 may be a terminal device or a server. The terminal device may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (Portable Media Players, PMPs), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0128] like Figure 7 As shown, the electronic device 700 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 to a random access memory (RAM) 703. Various programs and data required for the operation of the electronic device 700 are also stored in the RAM 703. The processing device 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0129] Typically, the following devices may be connected to the I / O interface 705: input devices 706 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 708 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 709. The communication devices 709 may allow the electronic device 700 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 7 The electronic device 700 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0130] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 709, or installed from a storage device 708, or installed from a ROM 702. When the computer program is executed by the processing device 701, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0131] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, 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), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0132] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0133] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.

[0134] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely 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., via the Internet using an Internet service provider).

[0135] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession 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 a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0136] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".

[0137] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0138] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, 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), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0139] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0140] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0141] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A method for rendering graphic data, characterized in that: include: Acquire multiple graphic data in the user interface to be rendered, and determine an exposure order corresponding to the multiple graphic data; Determining priority information corresponding to the plurality of graphic data according to the exposure sequence; A frame rendering operation is performed on the multiple graphic data based on priority information corresponding to the multiple graphic data.

2. The method according to claim 1, characterized in that The determining, according to the exposure sequence, priority information corresponding to the plurality of graphic data includes: If the graphic data is in an exposure area in the user interface and is in an unrendered state, determining that the priority of the graphic data is a first priority; If the graphic data is within the area to be exposed in the user interface, determining the priority of the graphic data to be the second priority; Determining the graphic data other than the first priority and the second priority among the plurality of graphic data as a third priority; Among them, the first priority is higher than the second priority and higher than the third priority.

3. The method according to claim 2, characterized in that The performing frame rendering operations on the plurality of graphic data based on priority information corresponding to the plurality of graphic data includes: Constructing a first queue to be rendered corresponding to the first priority, a second queue to be rendered corresponding to the second priority, and a third queue to be rendered corresponding to the third priority respectively; Frame rendering operations are performed sequentially on multiple graphics data corresponding to the first queue to be rendered, the second queue to be rendered, and the third queue to be rendered.

4. The method according to claim 1, characterized in that: The performing frame rendering operations on the plurality of graphic data based on priority information corresponding to the plurality of graphic data includes: Constructing a preset number of priority queues according to the priority information; Determine the browser's rendering capabilities for each frame for graphics rendering operations; According to the rendering capability, frame rendering operations are performed on the graphics data corresponding to the preset number of priority queues in order from high to low priority.

5. The method according to claim 4, characterized in that The step of performing frame rendering operations on the graphics data corresponding to the preset number of priority queues in descending order of priority according to the rendering capability includes: According to the rendering capability of the browser corresponding to the current frame, acquiring at least one target graphic data matching the rendering capability from the preset number of priority queues in descending order of priority; A rendering operation is performed on the at least one target graphics data.

6. The method according to claim 5, characterized in that The step of acquiring at least one target graphic data matching the rendering capability from the preset number of priority queues in a descending order of priority according to the rendering capability corresponding to the current frame of the browser includes: Determine the rendering queue to be processed by the browser in the current frame in order of priority from high to low; Determine at least one graphic data in the queue to be rendered according to the rendering capability, so that the sum of the rendering time corresponding to the at least one graphic data matches the rendering capability; The at least one graphic data is determined as the at least one target graphic data.

7. The method according to claim 6, characterized in that The determining at least one graphic data in the queue to be rendered according to the rendering capability comprises: If it is determined that the sum of the rendering times corresponding to at least one remaining graphic data in the current queue to be rendered is less than the rendering capability, determining the next queue to be rendered according to the priority information; Determining at least one graphic data in the next rendering queue so that a sum of rendering times corresponding to the at least one graphic data in the next rendering queue and the at least one remaining graphic data matches the rendering capability; The at least one remaining graphics data and at least one graphics data in a next rendering queue are determined as the at least one target graphics data.

8. The method according to claim 5, characterized in that The rendering operation on the at least one target graphic data comprises: An incremental rendering operation is performed on the at least one target graphics data in the user interface.

9. The method according to any one of claims 1 to 8, characterized in that: The obtaining of a plurality of graphic data in the user interface to be rendered includes: In response to a triggering operation on a user interface, a plurality of graphic data to be rendered corresponding to the user interface is acquired.

10. A graphics data rendering device, characterized in that: include: An acquisition module, used to acquire a plurality of graphic data in a user interface to be rendered, and determine an exposure order corresponding to the plurality of graphic data; A determination module, configured to determine priority information corresponding to the plurality of graphic data according to the exposure sequence; A rendering module is used to perform frame rendering operations on the multiple graphic data based on priority information corresponding to the multiple graphic data.

11. An electronic device, characterized in that: include: Processor and memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor executes the graphics data rendering method according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the processor executes the computer-executable instructions, the graphics data rendering method according to any one of claims 1 to 9 is implemented.

Citation Information

Cited By

  • Building drawing display method, device and equipment suitable for large-scale buildings and medium

    CN122507960A

  • Building drawing display method, device and equipment suitable for large-scale buildings and medium

    CN122507960B