Rendering method, apparatus, device, and product

By sharing the index information of material instances during the interface rendering process, the problem of high rendering overhead caused by an excessive number of material instances is solved, thereby improving rendering efficiency.

CN116450864BActive Publication Date: 2026-04-17ALIBABA (CHINA) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ALIBABA (CHINA) CO LTD
Filing Date
2023-03-15
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

During the interface rendering process, an excessive number of material instances leads to high rendering overhead, especially when the interface contains a large number of object instances.

Method used

By obtaining the index information of object instances, the shared material instances are searched from the cache dictionary, and the object instances are rendered based on the shared material instances, thereby reducing the number of material instances used in the rendering process.

Benefits of technology

This reduces the number of material instances during rendering, lowers rendering overhead, and improves rendering efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116450864B_ABST
    Figure CN116450864B_ABST
Patent Text Reader

Abstract

This disclosure relates to a rendering method, apparatus, device, and product. In this embodiment, the method involves obtaining index information of a material instance corresponding to an object instance; searching for a material instance from a cache dictionary based on the index information, wherein the cache dictionary includes shared material instances; and rendering the object instance based on the material instance in response to finding a shared material instance between the object instance and other object instances in the cache dictionary. This allows multiple object instances with the same material in the interface to share a single material instance, reducing the number of material instances used during rendering, decreasing rendering overhead, and improving rendering efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of rendering technology, and more particularly to a rendering method, apparatus, device, and product. Background Technology

[0002] During the UI rendering process, each object instance in the UI corresponds to a material instance. Rendering of the object instance is achieved by creating and calling the corresponding material instance. In other words, a separate material instance must be created for each object instance in the UI. This results in an excessive number of material instances, especially when the UI contains a large number of object instances, leading to significant rendering overhead. Therefore, reducing the number of material instances and minimizing rendering overhead is a technical problem that those skilled in the art need to solve. Summary of the Invention

[0003] To address the aforementioned technical problems, this disclosure provides a rendering method, apparatus, device, and product.

[0004] A first aspect of this disclosure provides a rendering method, comprising:

[0005] Get the index information of the material instance corresponding to the object instance;

[0006] Based on the index information, the material instance is retrieved from the cache dictionary, which includes shared material instances;

[0007] In response to finding the object instance and the material instance shared by other object instances in the cache dictionary, the object instance is rendered based on the material instance.

[0008] A second aspect of this disclosure provides a rendering apparatus, comprising:

[0009] The acquisition module is used to obtain the index information of the material instance corresponding to the object instance;

[0010] The first lookup module is used to look up material instances from the cache dictionary based on index information, wherein the cache dictionary includes shared material instances;

[0011] The first rendering module is used to render the object instance based on the material instance found in the cache dictionary and the material instance shared by other object instances.

[0012] A third aspect of this disclosure provides a terminal device, which includes a memory and a processor, wherein the memory stores a computer program that, when executed by the processor, can implement the method of the first aspect described above.

[0013] A fourth aspect of this disclosure provides a computer program product, wherein the program product is stored in a storage medium and, when the program product is run, can implement the method of the first aspect described above.

[0014] The technical solution provided in this disclosure has the following advantages compared with the prior art:

[0015] In this embodiment of the disclosure, the index information of the material instance corresponding to the object instance is obtained; based on the index information, the material instance is searched from the cache dictionary, wherein the cache dictionary includes shared material instances; in response to finding the material instance shared by the object instance and other object instances in the cache dictionary, the object instance is rendered based on the material instance, so that multiple object instances with the same material in the interface share a material instance, which can reduce the number of material instances used in the rendering process, reduce rendering overhead, and improve rendering efficiency. Attached Figure Description

[0016] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0017] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a schematic diagram of a navigation interface provided in an embodiment of this disclosure;

[0019] Figure 2 This is a schematic diagram of a rendering process provided in an embodiment of this disclosure;

[0020] Figure 3 This is a flowchart of a rendering method provided in an embodiment of this disclosure;

[0021] Figure 4 This is a flowchart of another rendering method provided in an embodiment of this disclosure;

[0022] Figure 5 This is a flowchart of yet another rendering method provided in this embodiment of the disclosure;

[0023] Figure 6 This is a flowchart illustrating how to store object instance identifiers in a reference linked list, as provided in an embodiment of this disclosure.

[0024] Figure 7 This is a flowchart illustrating how to delete an object instance identifier from a reference list, as provided in an embodiment of this disclosure.

[0025] Figure 8 This is a flowchart illustrating an example of recycled material provided in this disclosure.

[0026] Figure 9 This is a flowchart illustrating the deletion of a material instance from a recycling list, as provided in an embodiment of this disclosure.

[0027] Figure 10 This is a schematic diagram of the flow of material instances in a recycling chain provided by an embodiment of this disclosure;

[0028] Figure 11 This is a schematic diagram of the structure of a rendering apparatus provided in an embodiment of this disclosure;

[0029] Figure 12 This is a schematic diagram of the structure of a terminal device according to an embodiment of this disclosure. Detailed Implementation

[0030] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.

[0031] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.

[0032] Rendering objects in an interface can be understood as the process of constructing object images within the interface. Rendering allows objects to display certain effects, improving the visual experience. In the interface rendering process, each object instance corresponds to a material instance. Rendering is performed by creating and calling the corresponding material instance. In other words, a separate material instance must be created for each object instance in the interface. For example, Figure 1 This is a schematic diagram of a navigation interface provided in this disclosure, such as... Figure 1As shown, the navigation interface 100 displays three lanes: lane 110, lane 120, and lane 130. Vehicles travel in lane 120 following the arrow direction. Lanes 110, 120, and 130 are object instances. Lanes 110 and 130 require rendering using material instance 'a', while lane 120 requires rendering using material instance 'b'. Rendering lanes 110, 120, and 130 requires creating two material instances 'a' and one material instance 'b' for each lane. This results in an excessive number of material instances, especially when the interface contains many object instances, leading to higher rendering overhead. Therefore, reducing the number of material instances and thus lowering rendering overhead is a technical problem that those skilled in the art need to solve.

[0033] In view of the deficiencies of related technologies in interface rendering, the present disclosure provides a rendering method, apparatus, device and product that can enable multiple object instances of the same material in the interface to share a single material instance, thereby reducing the number of material instances created during the rendering process, reducing rendering overhead and improving rendering efficiency.

[0034] For example, Figure 2 A schematic diagram of the rendering process is provided, such as... Figure 2 As shown, 210 represents object instance A, 220 represents object instance B, 240 represents the rendering engine (which can use material instances to render object instances), and 250 represents the rendering results of object instances A and B. Object instances A and B share the same material in the interface, meaning they use the same material instance. When rendering object instances A and B is required, the rendering engine can obtain the shared material instance c, and then use this shared material instance c to render object instances A and B respectively, obtaining their rendering results. Therefore, object instances A and B with the same material share a single material instance, meaning they only need to use one material instance to complete the rendering. This reduces the number of material instances used during rendering, decreases rendering overhead, and improves rendering efficiency.

[0035] The rendering method provided in this disclosure can be executed by a terminal device. This device can be understood as any device with processing and computing capabilities, including but not limited to mobile terminals such as smartphones, personal digital assistants (PDAs), tablet computers (PADs), in-vehicle terminals, and wearable devices.

[0036] To better understand the inventive concept of the embodiments of this disclosure, the technical solutions of the embodiments of this disclosure will be described below in conjunction with exemplary embodiments.

[0037] Figure 3 This is a flowchart of a rendering method provided in an embodiment of this disclosure, such as... Figure 3 As shown, the rendering method provided in this embodiment includes the following steps:

[0038] Step 310: Obtain the index information of the material instance corresponding to the object instance.

[0039] The object instances in this disclosure can be understood as various objects displayed in the interface, including objects such as roads, houses, trees, and vehicles. For example, Figure 1 Lanes 110, 120, and 130 are object instances.

[0040] The material instances in this disclosure can be understood as a combination of various visual attribute data required for rendering an object, including the object's surface color, texture, smoothness, transparency, reflectivity, refractive index, luminosity, etc.

[0041] In this embodiment, the index information can be understood as a data value (key). The index information of a material instance can be understood as the index value corresponding to the material instance. The index information can be encoded according to the drawing method and characteristics of the material instance. There is a one-to-one correspondence between the material instance and the index information.

[0042] In this embodiment, the terminal device can pre-store the correspondence between each object instance and its index information, as well as the index relationship between each material instance and its index information. Object instances using the same material instance have the same index information; that is, one index information can correspond to multiple object instances. The material instance used by each object instance can be pre-set as needed, without specific limitations. The index information corresponding to the material instance can be encoded according to the material type, drawing characteristics, drawing method, etc., and can be encoded as needed, without limitations. When the terminal device needs to render an object instance in the interface, i.e., generate an image of the object instance, it can obtain the index information of the material instance corresponding to that object instance.

[0043] Step 320: Based on the index information, search for material instances from the cache dictionary, which includes shared material instances.

[0044] The cache dictionary in this embodiment can be understood as a method of storing data in a dictionary manner, which facilitates quick searching and deletion of data. For details, please refer to relevant technologies, which will not be elaborated here.

[0045] The cache dictionary in this embodiment can store various material instances currently being used on the terminal device's display interface, as well as the index information corresponding to each material instance. The cache dictionary may include shared material instances, which can be understood as material instances that can be used by multiple object instances. The cache dictionary can be stored on the terminal device or on a server; no specific limitation is made here.

[0046] In this embodiment of the disclosure, after obtaining the index information of the material instance corresponding to the object instance, the terminal device can search for the material instance corresponding to the index information from the cache dictionary stored locally or on the server.

[0047] Step 330: In response to finding the object instance and the material instance shared by other object instances in the cache dictionary, render the object instance based on the material instance.

[0048] In this embodiment of the disclosure, the material instance shared by an object instance and other object instances can be understood as the object instance using the same material instance as other object instances.

[0049] In this embodiment of the present disclosure, if a material instance shared by an object instance and other object instances is found in the cache dictionary, the terminal device can respond to the finding of the shared material instance in the cache dictionary by calling the material instance from the cache dictionary to render the object instance and obtain the rendered image of the object instance.

[0050] For example, such as Figure 1 As shown, if the target object instance to be rendered is lane 130, and the material instance required to render lane 130 is material instance a, and the index information corresponding to material instance a is x, then material instance a is searched in the cache dictionary based on the index information x. The cache dictionary stores the material instance a currently being used by object instance lane 110 and its corresponding index information x. Therefore, material instance a is a material instance shared by object instance lane 130 and object instance lane 110. When the terminal device finds the material instance a shared by object instance lane 130 and other object instance lane 110 in the cache dictionary, it can call the material instance a in the cache dictionary to render object instance lane 130, rendering the color of lane 130 as the gray corresponding to material instance a.

[0051] In this embodiment of the disclosure, the index information of the material instance corresponding to the object instance is obtained; based on the index information, the material instance is searched from the cache dictionary, wherein the cache dictionary includes shared material instances; in response to finding the material instance shared by the object instance and other object instances in the cache dictionary, the object instance is rendered based on the material instance, so that multiple object instances with the same material in the interface share a material instance, which can reduce the number of material instances used in the rendering process, reduce rendering overhead, and improve rendering efficiency.

[0052] Figure 4 This is a flowchart of a rendering method provided in an embodiment of this disclosure, such as... Figure 4 As shown, the rendering method provided in this embodiment includes the following steps:

[0053] Step 410: Obtain the index information of the material instance corresponding to the object instance.

[0054] Step 420: Based on the index information, search for material instances from the cache dictionary, which includes shared material instances.

[0055] Step 430: In response to finding the object instance and the material instance shared by other object instances in the cache dictionary, render the object instance based on the material instance.

[0056] The content of steps 410-430 in this embodiment can be referred to the content of steps 310-330 above, and will not be repeated here.

[0057] Step 440: In response to the failure to find a material instance in the cache dictionary, search for the material instance in the recycling list based on the index information.

[0058] In this embodiment of the disclosure, when a material instance in the cache dictionary is not referenced by any object instance, the terminal device can delete the material instance and its corresponding index information from the cache dictionary, and store the material instance and its corresponding index information in a pre-built recycling list. The recycling list can be understood as being used to reclaim material instances and their corresponding index information from the cache dictionary that are not referenced by any object instance.

[0059] In this embodiment of the disclosure, if no material instance shared by an object instance and other object instances is found in the cache dictionary, the terminal device can search for the material instance corresponding to the index information in the recycling list based on the index information of the material instance corresponding to the object instance.

[0060] Step 450: In response to finding a material instance in the recycling list, associate the material instance and index information into the cache dictionary, and render the object instance based on the material instance.

[0061] In this embodiment of the disclosure, if a material instance corresponding to the index information is found in the recycling list, the terminal device can respond to the finding of the material instance in the recycling list by associating the material instance corresponding to the index information with the index information and storing them in the cache dictionary, and calling the material instance corresponding to the index information to render the object instance.

[0062] Step 460: In response to the absence of a material instance in the recycling list, generate a material instance based on a preset material template.

[0063] The material template in this embodiment can be understood as a set of parameters required to create each type of material instance. The material template can be pre-stored in the terminal device or in the server; this is not limited here.

[0064] In this embodiment of the disclosure, if no material instance corresponding to the index information is found in the recycling list, the terminal device can, in response to the lack of a material instance corresponding to the index information in the recycling list, obtain the parameters of the material instance corresponding to the index information from a preset material template, and generate the material instance corresponding to the index information based on the parameters of the material instance. The method for creating the material instance can be found in related technologies and will not be elaborated here.

[0065] Step 470: Render the object instance based on the material instance, and store the material instance and index information in the cache dictionary.

[0066] In this embodiment of the disclosure, after generating a material instance corresponding to the index information based on a preset material template, the terminal device can render the object instance based on the material instance and associate and store the material instance and the index information corresponding to the material instance in a cache dictionary.

[0067] Therefore, the material instance required by the rendered object instance can be searched in the cache dictionary and the recycling list first. Only when the required material instance cannot be found in either the cache dictionary or the recycling list will the material instance be created based on the material template. This can reduce the number of times material instances are created during the rendering process, reduce the number of material instances used during the rendering process, reduce rendering overhead, and improve rendering efficiency.

[0068] Figure 5 This is a flowchart of a rendering method provided in an embodiment of this disclosure, such as... Figure 5 As shown, the rendering method provided in this embodiment includes the following steps:

[0069] Step 510: Obtain the index information of the material instance corresponding to the object instance.

[0070] Step 520: Based on the index information, search for material instances from the cache dictionary, which includes shared material instances.

[0071] Step 530: In response to finding the object instance and the material instance shared by other object instances in the cache dictionary, render the object instance based on the material instance.

[0072] The content of steps 510-530 in this embodiment can be referred to the content of steps 310-330 above, and will not be repeated here.

[0073] Step 540: Store the identifier of the object instance in the reference list corresponding to the material instance.

[0074] In this embodiment of the disclosure, to facilitate recording the references of each material instance by object instances, a reference list corresponding to each material instance can be constructed. There is a one-to-one correspondence between material instances and reference lists. The reference list corresponding to a material instance can be understood as recording the specific information of the object instances referencing that material instance, and may include the identifier of the object instance referencing that material instance. The identifier of an object instance can be understood as data that can uniquely identify the identity information of that object instance. The reference list can be stored in a terminal device or in a server; no limitation is made here.

[0075] In this embodiment of the disclosure, after finding a material instance shared by an object instance and other object instances in the cache dictionary, the terminal device can store the identifier of the object instance in the reference list corresponding to the material instance shared by the object instance and other object instances. For example, Figure 6 This is a flowchart illustrating how to store object instance identifiers in a reference linked list, as provided in this embodiment of the disclosure. Figure 6 As shown, it may include the following steps:

[0076] Step 610: Render the object instance in response to the referenced material instance and obtain the object instance's identifier.

[0077] In this embodiment of the disclosure, after the object instance is rendered by referencing the material instance, that is, after the material instance is referenced by the object instance, the terminal device can respond to the rendering of the object instance by referencing the material instance and obtain the identifier of the object instance.

[0078] Step 620: Store the identifier of the object instance in the reference list corresponding to the material instance.

[0079] In this embodiment of the disclosure, after obtaining the identifier of the object instance, the terminal device can store the identifier of the object instance in the reference list corresponding to the material instance.

[0080] Step 550: In response to clearing the object instance from the display interface, remove the object instance's identifier from the reference list.

[0081] In this embodiment of the disclosure, when it is necessary to clear object instances from the display interface, for example, when the display interface is shrunk or the display area is moved, some object instances originally displayed on the display interface are no longer on the current display interface. In response to clearing object instances from the display interface, the terminal device can delete the identifier of the object instance to be cleared from the reference list corresponding to the material instance referenced by the object instance to be cleared. For example, Figure 7 This is a flowchart illustrating how to delete an object instance identifier from a reference list, as provided in this embodiment of the disclosure. Figure 7 As shown, it may include the following steps:

[0082] Step 710: Monitor object instances.

[0083] In this embodiment of the disclosure, the terminal device can monitor object instances.

[0084] Step 720: Determine whether the object instance has been cleared.

[0085] In this embodiment of the disclosure, the terminal device can determine whether an object instance has been cleared.

[0086] Step 730: If an object instance is cleared, remove the object instance's identifier from the reference list corresponding to the material instance referenced by the object instance.

[0087] In this embodiment of the disclosure, if an object instance is cleared, the terminal device can delete the identifier of the object instance from the reference list corresponding to the material instance referenced by the object instance.

[0088] Step 560: In response to the material instance's reference list being empty, associate the material instance and its index information into the recycling list, and remove the material instance and its index information from the cache dictionary.

[0089] In this embodiment of the disclosure, if the reference list corresponding to a material instance is empty, that is, if there are 0 object instances referencing the material instance, it means that the material instance in the cache dictionary is not referenced by any object instance. In this case, the terminal device can respond to the empty reference list by associating and storing the material instance and its corresponding index information in the recycling list, and deleting the material instance and its corresponding index information from the cache dictionary. For example... Figure 8 This is a flowchart illustrating an example of recycled material provided in this disclosure, such as... Figure 8 As shown, it may include the following steps:

[0090] Step 810: Count the number of object instances in the reference chain corresponding to the material instance.

[0091] In this embodiment of the disclosure, the terminal device can count the number of object instances in the reference chain corresponding to the material instance in real time.

[0092] Step 820: Determine if the reference list corresponding to the material instance is empty.

[0093] In this embodiment of the disclosure, the terminal device can determine whether the reference list corresponding to the material instance is empty, that is, whether the number of object instances in the reference list is 0.

[0094] Step 830: If the reference list corresponding to the material instance is empty, then store the material instance and its corresponding index information together in the recycling list, and delete the material instance and its corresponding index information from the cache dictionary.

[0095] In this embodiment of the disclosure, if the reference list corresponding to the material instance is empty, it means that the number of object instances in the reference list is 0. In this case, the material instance and the index information corresponding to the material instance are associated and stored in the recycling list, and the material instance and the index information corresponding to the material instance are deleted from the cache dictionary.

[0096] Therefore, by using a reference list corresponding to each material instance to record the reference status of each material instance by object instances, and recycling referenced material instances through a recycling list, the number of times material instances are created during rendering can be reduced, the number of material instances used during rendering can be reduced, rendering overhead can be reduced, and rendering efficiency can be improved.

[0097] In some embodiments of this disclosure, since the storage space of the recycling list is limited, that is, the number of queues storing material instances in the recycling list is limited, and the number of material instances that can be stored in the recycling list is limited, it is necessary to determine the order in which material instances are deleted from the recycling list. Figure 9 A flowchart illustrating the deletion of a material instance from a recycling list, as provided in this embodiment of the disclosure, is shown below. Figure 9 As shown, the steps for deleting a material instance from the recycling list may include:

[0098] Step 910: Monitor the number of material instances stored in the recycling list.

[0099] In this embodiment of the disclosure, the terminal device can monitor the number of material instances stored in the recycling chain in real time.

[0100] Step 920: Determine whether the number of material instances exceeds the preset number.

[0101] In this embodiment of the disclosure, the maximum number of material instances that can be stored in the recycling list can be set to a preset number. The preset number is less than or equal to the maximum number of material instances that the recycling list is allowed to store. The preset number can be set as needed, and no specific limitation is made here.

[0102] In this embodiment of the disclosure, the terminal device can determine whether the number of material instances stored in the recycling chain exceeds a preset number.

[0103] Step 930: If the number of material instances stored in the recycling list exceeds the preset number, then delete one or more material instances from the recycling list in descending order of storage duration.

[0104] In this embodiment of the disclosure, if the number of material instances stored in the recycling list exceeds a preset number, the terminal device may, in response to the exceeding of the preset number, delete one or more material instances from the recycling list sequentially in descending order of storage duration. Material instances with longer storage durations indicate that they have not been referenced for a long time, and their probability and frequency of reference are low. Conversely, material instances with shorter storage durations indicate that they have been frequently referenced recently, and their probability and frequency of reference are high.

[0105] Therefore, by deleting one or more material instances from the recycling list in descending order of storage duration, the frequency of creating and destroying material instances can be reduced, thus saving rendering overhead.

[0106] For example, such as Figure 10 As shown, Figure 10 This is a schematic diagram illustrating the flow of material instances in a recycling list according to an embodiment of this disclosure. The storage time of the material instances in the recycling list decreases sequentially from bottom to top. The storage order of the material instances reclaimed from the cache dictionary by the recycling list is material instance a, material instance b, material instance c, and material instance d. The deletion order of the stored material instances in the recycling list is material instance a, material instance b, material instance c, and material instance d, that is, deletion is performed in order of storage time from longest to shortest. The search order of the terminal device in the recycling list for material instances is material instance d, material instance c, material instance b, and material instance a, that is, search is performed in order of storage time from shortest to longest.

[0107] Specifically, the Least Recently Used (LRU) algorithm can be used to delete one or more material instances from the recycling list in descending order of storage time. LRU is a commonly used page replacement algorithm that selects the least recently used page for eviction. This algorithm assigns an access field to each page to record the time t elapsed since the page was last accessed. When a page needs to be evicted, the page with the largest t value among the existing pages, i.e., the least recently used page, is selected for eviction.

[0108] In some other embodiments of this disclosure, the display interface of the terminal device has a display layer. The display layer can be understood as a parameter reflecting the number of object instances displayed on the display interface. The display layer can also be understood as a display scale, which is the ratio of the actual length of a line segment per unit length on the display interface to the actual length of the corresponding line segment on the ground. The larger the display scale, the higher the display layer. There is a positive correlation between the display layer and the number of object instances currently displayed on the display interface. The higher the display layer, the more object instances are displayed on the current display interface, and the more material instances are required. Conversely, the lower the display layer, the fewer object instances are displayed on the current display interface, and the fewer material instances are required.

[0109] The terminal device can adjust the storage capacity of the recycling list to match the current display layer. The storage capacity of the recycling list can be understood as the number of queues in the recycling list, i.e., the storage resources occupied by the recycling list. There is a positive correlation between the current display layer and the storage capacity of the recycling list: the higher the display layer, the larger the storage capacity of the recycling list; the lower the display layer, the smaller the storage capacity of the recycling list. Therefore, the storage capacity of the recycling list can be dynamically adjusted according to the current display layer, that is, according to the number of object instances displayed on the current display. This improves the utilization rate of the recycling list queues, reduces the frequency of material instance destruction and creation, and thus saves rendering overhead.

[0110] Figure 11 This is a schematic diagram of a rendering apparatus provided in an embodiment of this disclosure. This apparatus can be understood as the aforementioned terminal device or a functional module within the aforementioned terminal device. For example... Figure 11 As shown, the rendering apparatus 1100 may include:

[0111] The acquisition module 1110 is used to obtain the index information of the material instance corresponding to the object instance;

[0112] The first lookup module 1120 is used to look up material instances from the cache dictionary based on index information, wherein the cache dictionary includes shared material instances;

[0113] The first rendering module 1130 is used to render the object instance based on the material instance found in the cache dictionary and the material instance shared by other object instances.

[0114] Optionally, the rendering apparatus 1100 described above may include:

[0115] The second lookup module is used to search for a material instance in the recycling list based on index information when the material instance is not found in the cache dictionary.

[0116] The first storage module is used to, in response to finding a material instance in the recycling list, associate and store the material instance and index information in the cache dictionary, and render the object instance based on the material instance;

[0117] The generation module is used to generate a material instance based on a preset material template in response to the failure to find a material instance in the recycling chain.

[0118] The second rendering module is used to render object instances based on material instances and associate and store the material instances and index information in a cache dictionary.

[0119] Optionally, the rendering apparatus 1100 described above may include:

[0120] The second storage module is used to store the identifier of the object instance into the reference list corresponding to the material instance.

[0121] Optionally, the rendering apparatus 1100 described above may include:

[0122] The first deletion module is used to remove the identifier of the object instance from the reference list in response to clearing the object instance from the display interface.

[0123] Optionally, the rendering apparatus 1100 described above may include:

[0124] The third storage module is used to store the material instance and its index information in the recycling list in response to the reference list corresponding to the material instance being empty, and to delete the material instance and its index information from the cache dictionary.

[0125] Optionally, the rendering apparatus 1100 described above may include:

[0126] The second deletion module is used to delete one or more material instances from the recycling list in descending order of storage duration when the number of material instances stored in the recycling list exceeds a preset number.

[0127] Optionally, the rendering apparatus 1100 described above may include:

[0128] The adjustment module is used to adjust the storage capacity of the recycling list to match the display level of the current display interface. The display level is positively correlated with the number of object instances displayed on the current display interface, and there is a positive correlation between the display level and the storage capacity.

[0129] The rendering apparatus provided in this embodiment can implement the methods of any of the above embodiments, and its execution method and beneficial effects are similar, so they will not be described again here.

[0130] This disclosure also provides a terminal device, which includes a memory and a processor. The memory stores a computer program. When the computer program is executed by the processor, it can implement the rendering method of any of the above embodiments. The execution method and beneficial effects are similar and will not be described again here.

[0131] Example, Figure 12 This is a schematic diagram of the structure of a terminal device according to an embodiment of this disclosure. See below for details. Figure 12 The diagram illustrates a structural schematic suitable for implementing the terminal device 1200 in the embodiments of this disclosure. The terminal device 1200 in the embodiments of this disclosure can be understood as any device with processing and computing capabilities, including but not limited to mobile terminals such as smartphones, personal digital assistants (PDAs), in-vehicle terminals, wearable devices, etc. Figure 12 The terminal device shown is merely an example and should not be construed as limiting the functionality or scope of the embodiments described herein.

[0132] like Figure 12 As shown, the terminal device 1200 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 1201, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1202 or a program loaded from a storage device 1208 into a random access memory (RAM) 1203. The RAM 1203 also stores various programs and data required for the operation of the terminal device 1200. The processing unit 1201, ROM 1202, and RAM 1203 are interconnected via a bus 1204. An input / output (I / O) interface 1205 is also connected to the bus 1204.

[0133] Typically, the following devices can be connected to I / O interface 1205: input devices 1206 including, for example, a touchscreen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 1207 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1208 including, for example, magnetic tape, hard disk, etc.; and communication devices 1209. Communication device 1209 allows terminal device 1200 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 12 A terminal device 1200 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0134] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 1209, or installed from storage device 1208, or installed from ROM 1202. When the computer program is executed by processing device 1201, it performs the functions defined in the methods of embodiments of this disclosure.

[0135] This disclosure provides a computer program product, which is stored in a storage medium. When the program product is run, it can implement the methods of any of the above embodiments. The execution method and beneficial effects are similar, and will not be described again here.

[0136] This disclosure also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it can implement the methods of any of the above embodiments. The execution method and beneficial effects are similar, and will not be described again here.

[0137] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be referenced by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program referenced by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0138] The aforementioned computer-readable medium may be included in the aforementioned terminal device; or it may exist independently and not assembled into the terminal device.

[0139] The aforementioned computer-readable medium carries one or more programs, which, when executed by a processing device, cause the processing device to: obtain index information of a material instance corresponding to an object instance; search for a material instance from a cache dictionary based on the index information, wherein the cache dictionary includes shared material instances; and, in response to finding a material instance shared by the object instance and other object instances in the cache dictionary, render the object instance based on the material instance.

[0140] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including but not limited to object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can 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 can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0141] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0142] The units described in the embodiments of this disclosure can be implemented in software or hardware. The names of the units are not, in some cases, intended to limit the specific unit.

[0143] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that may be cited, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0144] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for reference by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0145] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0146] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A rendering method, wherein, include: Get the index information of the material instance corresponding to the object instance; Based on the index information, the material instance is retrieved from the cache dictionary, wherein the cache dictionary includes shared material instances; In response to finding the material instance shared by the object instance and other object instances in the cache dictionary, the object instance is rendered based on the material instance, and the identifier of the object instance is stored in the reference list corresponding to the material instance; In response to the fact that the reference list corresponding to the material instance is empty, the material instance and the index information are associated and stored in the recycling list, and the material instance and the index information are deleted from the cache dictionary.

2. The method according to claim 1, wherein, The method further includes: In response to the absence of the material instance in the cache dictionary, the material instance is searched in the recycling list based on the index information; In response to finding the material instance in the recycling list, the material instance and the index information are associated and stored in the cache dictionary, and the object instance is rendered based on the material instance; In response to the absence of the material instance in the recycling list, the material instance is generated based on a preset material template; The object instance is rendered based on the material instance, and the material instance and the index information are associated and stored in the cache dictionary.

3. The method according to claim 1, wherein, The method further includes: In response to clearing the object instance from the display interface, the identifier of the object instance is removed from the reference list.

4. The method according to claim 1, wherein, The method further includes: In response to the number of material instances stored in the recycling list exceeding a preset number, one or more material instances are deleted from the recycling list in descending order of storage duration.

5. The method according to claim 2, wherein, The method further includes: Based on the current display layer of the display interface, the storage capacity of the recycling list is adjusted to match the display layer. The display layer is positively correlated with the number of object instances displayed on the current display interface, and the display layer is positively correlated with the storage capacity.

6. A rendering apparatus, wherein, include: The acquisition module is used to obtain the index information of the material instance corresponding to the object instance; The first lookup module is used to look up the material instance from the cache dictionary based on the index information, wherein the cache dictionary includes shared material instances; The first rendering module is configured to, in response to finding the material instance shared by the object instance and other object instances in the cache dictionary, render the object instance based on the material instance, and store the identifier of the object instance in the reference list corresponding to the material instance; The third storage module is used to store the material instance and its index information in the recycling list in response to the reference list corresponding to the material instance being empty, and to delete the material instance and its index information from the cache dictionary.

7. A terminal device, wherein, It includes a memory and a processor, wherein the memory stores a computer program that, when executed by the processor, implements the method as described in any one of claims 1-5.

8. A computer program product, wherein, The program product is stored in a storage medium, and when the program product is run, it implements the method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Model management method and device, terminal and computer readable storage medium

    CN112257133A