Display method and device of target interface, storage medium and electronic equipment

CN116999808BActive Publication Date: 2026-08-21TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210993980.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-18
Publication Date
2026-08-21
Estimated Expiration
2042-08-18

AI Technical Summary

Technical Problem

[0004]本申请实施例提供了一种目标界面的显示方法和装置、存储介质及电子设备,以至少相关技术中的目标界面的显示方法存在由于界面打开时所需加载的资源量过多导致的界面打开时间过长的问题

Benefits of technology

[0010]In this embodiment, an interface containing all loaded media resources is displayed immediately after the smaller media resources are loaded synchronously. After receiving the interface display instruction for the target interface, if there is a specific media resource (each specific media resource's size is greater than a preset threshold) in the set of media resources to be loaded in the target interface, only the other media resources besides the specific media resource need to be loaded synchronously. Regardless of whether the specific media resource has been loaded, the interface containing all loaded media resources is displayed. Since the display of the interface does not depend on the specific media resource whose size exceeds the preset threshold, the interface can be displayed as long as the other media resources besides the specific media resource are loaded. In this way, the amount of media resources required to display the interface can be reduced. At the same time, media resources loaded after the interface is displayed can be displayed on the displayed interface, which can shorten the interface display time and improve the integrity of information display. This solves the problem in related technologies where the target interface display method has a long interface opening time due to the excessive amount of resources required to be loaded when the interface is opened.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116999808B_ABST
    Figure CN116999808B_ABST
Patent Text Reader

Abstract

The application discloses a target interface display method and device, a storage medium and an electronic device. The method comprises the following steps: obtaining an interface display instruction, wherein the interface display instruction is used for requesting to display a target interface; in the case that a first group of media resources exist in a media resource set to be loaded in the target interface, loading a second group of media resources in the media resource set except the first group of media resources in response to the interface display instruction, wherein the resource size of each media resource in the first group of media resources is greater than a preset threshold; in the case that the second group of media resources are loaded completely and none of the first group of media resources are loaded completely, displaying the target interface containing the second group of media resources; in the case that the target interface containing the second group of media resources is displayed, waiting until the first group of media resources are loaded completely, and displaying the first group of media resources in the target interface.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computers, and more specifically, to a method and apparatus for displaying a target interface, a storage medium, and an electronic device. Background Technology

[0002] An application's interface can contain various media resources, such as text, images, or other resources. When an interface is opened within an application, all the resources contained within it typically need to be loaded. If the number of media resources contained in the interface is too large, the amount of resources that need to be loaded when the interface is opened will be excessive, resulting in a longer opening time and thus affecting the user experience.

[0003] Therefore, it can be seen that the interface resource processing methods in the relevant technologies have the problem of excessive interface opening time due to the excessive amount of resources required to load when the interface is opened. Summary of the Invention

[0004] This application provides a method and apparatus for displaying a target interface, a storage medium, and an electronic device, addressing the problem that the target interface display methods in at least the related technologies suffer from excessively long interface opening times due to the excessive amount of resources required to load when the interface is opened.

[0005] According to one aspect of the embodiments of this application, a method for displaying a target interface is provided, comprising: obtaining an interface display instruction, wherein the interface display instruction is used to request the display of a target interface; if a first group of media resources exists in a media resource set to be loaded in the target interface, in response to the interface display instruction, loading a second group of media resources in the media resource set other than the first group of media resources, wherein the resource size of each media resource in the first group of media resources is greater than a preset threshold; if the second group of media resources has been loaded and the first group of media resources has not been fully loaded, displaying the target interface containing the second group of media resources; if the target interface containing the second group of media resources is displayed, waiting until the first group of media resources has been fully loaded, and then displaying the first group of media resources in the target interface.

[0006] According to another aspect of the embodiments of this application, a display device for a target interface is also provided, comprising: a first acquisition unit, configured to acquire an interface display instruction, wherein the interface display instruction is used to request the display of a target interface; a first loading unit, configured to, in response to the interface display instruction, load a second group of media resources other than the first group of media resources in the media resource set if a first group of media resources exists in the media resource set to be loaded in the target interface, wherein the resource size of each media resource in the first group of media resources is greater than a preset threshold; a first display unit, configured to display the target interface containing the second group of media resources after the second group of media resources has been loaded and before the first group of media resources has been fully loaded; and a second display unit, configured to, while displaying the target interface containing the second group of media resources, wait until the first group of media resources has been fully loaded and then display the first group of media resources in the target interface.

[0007] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer program, and the computer program is configured to execute the above-described display method of the target interface when it is run.

[0008] According to another aspect of the embodiments of this application, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the display method of the target interface as described above.

[0009] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the above-described method for displaying the target interface through the computer program.

[0010] In this embodiment, an interface containing all loaded media resources is displayed immediately after the smaller media resources are loaded synchronously. After receiving the interface display instruction for the target interface, if there is a specific media resource (each specific media resource's size is greater than a preset threshold) in the set of media resources to be loaded in the target interface, only the other media resources besides the specific media resource need to be loaded synchronously. Regardless of whether the specific media resource has been loaded, the interface containing all loaded media resources is displayed. Since the display of the interface does not depend on the specific media resource whose size exceeds the preset threshold, the interface can be displayed as long as the other media resources besides the specific media resource are loaded. In this way, the amount of media resources required to display the interface can be reduced. At the same time, media resources loaded after the interface is displayed can be displayed on the displayed interface, which can shorten the interface display time and improve the integrity of information display. This solves the problem in related technologies where the target interface display method has a long interface opening time due to the excessive amount of resources required to be loaded when the interface is opened. Attached Figure Description

[0011] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0012] Figure 1 This is a schematic diagram of an application environment for an optional target interface display method according to an embodiment of this application;

[0013] Figure 2 This is a flowchart illustrating an optional method for displaying a target interface according to an embodiment of this application;

[0014] Figure 3 This is a schematic diagram of an optional UMG blueprint according to an embodiment of this application;

[0015] Figure 4 This is a schematic diagram of an optional target interface according to an embodiment of this application;

[0016] Figure 5 This is a schematic diagram of another optional target interface according to an embodiment of this application;

[0017] Figure 6 This is a schematic diagram of an optional method for displaying a target interface according to an embodiment of this application;

[0018] Figure 7 This is a schematic diagram of another optional target interface according to an embodiment of this application;

[0019] Figure 8 This is a schematic diagram of another optional target interface according to an embodiment of this application;

[0020] Figure 9 This is a schematic diagram of another optional target interface according to an embodiment of this application;

[0021] Figure 10 This is a flowchart illustrating another optional method for displaying a target interface according to an embodiment of this application;

[0022] Figure 11 This is a flowchart illustrating another optional method for displaying a target interface according to an embodiment of this application;

[0023] Figure 12 This is a flowchart illustrating another optional method for displaying a target interface according to an embodiment of this application;

[0024] Figure 13 This is a schematic diagram of an optional asynchronous loading process for image resources according to an embodiment of this application;

[0025] Figure 14 This is a schematic diagram of an optional mobile phone installation package construction process according to an embodiment of this application;

[0026] Figure 15 This is a schematic diagram of an optional image unbinding process according to an embodiment of this application;

[0027] Figure 16 This is a structural block diagram of an optional target interface display device according to an embodiment of this application;

[0028] Figure 17 This is a schematic diagram of the structure of an optional electronic device according to an embodiment of this application;

[0029] Figure 18 This is a structural block diagram of a computer system for an optional electronic device according to an embodiment of this application. Detailed Implementation

[0030] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0031] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0032] According to one aspect of the embodiments of this application, a method for displaying a target interface is provided. Optionally, as an optional implementation, the above-described method for displaying a target interface may be applied to, but is not limited to, methods such as... Figure 1 The environment shown may include, but is not limited to, terminal device 102, network 110, and server 112. The terminal device 102 may include, but is not limited to, a display 108, a processor 106, and a memory 104.

[0033] The specific process can be summarized in the following steps:

[0034] Step S102: Store the resource package corresponding to the target interface in the database 114 of server 112.

[0035] The target interface can contain various media resources. The media resources in the target interface can be saved to the corresponding resource package, and the resource package can be stored in the database 114 of the server 112.

[0036] In step S104, the processing engine 116 of server 112 can determine to send the resource package to terminal device 102, and can send the resource package to terminal device 102. Terminal device 102 can receive and save the resource package. For example, when downloading the target application to which the target interface belongs, updating the target application, or at other times, the processing engine 116 of server 112 can determine to send the resource package to terminal device 102.

[0037] In step S106, the terminal device 102 loads the set of media resources to be loaded in the target interface into memory and displays the target interface on the display 108.

[0038] Optionally, the terminal device 102 may include, but is not limited to, at least one of the following: mobile phones (such as Android phones, iOS phones, etc.), laptops, tablets, handheld computers, mobile internet devices (MIDs), tablets, desktop computers, smart home appliances, in-vehicle devices, etc. The network 110 may include, but is not limited to, wired networks and wireless networks. The wired network includes local area networks (LANs), metropolitan area networks (MANs), and wide area networks (WANs). The wireless network includes Bluetooth, Wireless Fidelity (WIFI), and other networks that enable wireless communication. The server 112 may be a single server, a server cluster consisting of multiple servers, or a cloud server. The above is merely an example, and no limitations are imposed in this embodiment.

[0039] Optionally, the above-mentioned method for displaying the target interface can be executed by the terminal device 102 or the server 112 alone, or by other processing devices other than the terminal device 102 and the server 112, as long as the processed atlas can be applied to the terminal device 102 and the server 112.

[0040] As an optional implementation, taking the display method of the target interface in this embodiment executed by the terminal device 102 as an example, Figure 2 This is a flowchart illustrating an optional method for displaying a target interface according to an embodiment of this application, as shown below. Figure 2 As shown, the process of displaying the target interface may include the following steps:

[0041] Step S202: Obtain the interface display instruction, wherein the interface display instruction is used to request the display of the target interface.

[0042] The target interface display method in this embodiment can be applied to scenarios where media resources in a target interface to be displayed are loaded, and the target interface is displayed based on the loaded media resources. Here, the target interface can be the application interface of a target application. The target application can be an application with an application interface containing media resources, such as a game application, a short video application, or a third-party payment application. The media resources in the target interface can be one or more, including but not limited to at least one of the following: image resources, text resources, animation resources, or other types of media resources. During the opening of the target interface, various media resources with strong reference relationships to the target interface can be loaded first. After these media resources are loaded, the target interface can be displayed.

[0043] Taking game applications as an example, game applications can include, but are not limited to, all games that use firearms for ranged attacks, including but not limited to first-person shooter games and third-person shooter games. Specifically, target shooting applications can be multiplayer online battle arena (MOBA) games or single-player games (SPG). It should be noted that the type of game application can include, but is not limited to, at least one of the following: two-dimensional (2D) game applications, three-dimensional (3D) game applications, virtual reality (VR) game applications, augmented reality (AR) game applications, and mixed reality (MR) game applications. The above is merely an example, and no limitation is made in this embodiment.

[0044] It's important to note that strong references refer to a strong association between different objects in terms of loading. If A strongly references B, then when A is loaded, B will also be loaded into memory. Besides strong references, different objects can also have soft references. Soft references refer to a weak association between different objects in terms of loading. If A softly references B, then when A is loaded, resource B will not be loaded into memory. Instead, a resource path for B is stored on A, and resource B can be loaded into memory through the path.

[0045] Media resources with a strong reference relationship to the target interface can be media resources that require synchronous loading. Synchronous loading refers to synchronous mode (also known as blocking mode), where the engine prevents subsequent file loading (e.g., images), rendering, code execution, etc., while downloading and executing the resource. Media resources with a soft reference relationship to the target interface can be media resources that require asynchronous loading. Asynchronous loading refers to asynchronous mode (also known as non-blocking mode), where the engine can continue processing subsequent logic while downloading and executing the resource. Asynchronous loading avoids game stuttering or other abnormal interface display issues.

[0046] Taking a game application as the target application and a game interface as the target interface as an example, when opening a game interface in a game, if the game interface contains a large number of large media resources (e.g., large images), it will result in a long interface opening time. The long latency will seriously affect the user's game experience.

[0047] For example, developers (i.e., those who build the interface, such as artists) can use UE4 (Unreal Engine 4) to build the game's installation package. While building the installation package, they can use UMG (Unreal Motion Graphics UI Designer) to add various media assets to the game interface. Here, UE4 is a game development engine; compared to other engines, Unreal Engine is not only efficient and versatile, but also allows for direct previewing of development effects, giving developers stronger development capabilities. UMG is UE4's UI (User Interface) system, which can be used as a visual UI creation tool to create UI elements, such as the HUD (Head-up Display), menus, or other interface-related graphics that need to be presented to the user.

[0048] For example, taking adding image resources to a game interface as an example, when creating a game interface using UMG, you can first create a UMG blueprint, add an Image component to the UMG blueprint, and attach an image under the Brush / Image node of the Image component, thus binding the attached image to the UMG. Figure 3 As shown. In this case, when the UMG is created in the game interface, the image is strongly bound to the UMG, that is, the UMG strongly references the image.

[0049] According to the interface opening logic in relevant technologies, when requesting to open the interface, all strongly referenced resources need to be loaded first. Only after all resources are loaded can the interface open. Since images are bound to UMG files, when the UMG is opened during gameplay, these bound image resources will also be loaded along with it. This may lead to the following situation: if there are many image resources (strongly referenced image resources) that need to be loaded, the loading process will consume a relatively long time, resulting in a longer interface opening time. Excessive time will seriously affect the user's gaming experience.

[0050] To at least partially solve the above-mentioned technical problems, in this embodiment, some media resources of the target interface to be opened can be loaded synchronously, while others can be loaded asynchronously. Once the synchronously loaded media resources are loaded, the target interface can be displayed. Regardless of whether the asynchronously loaded media resources are loaded, since the size of the asynchronously loaded media resources is greater than a preset threshold, the amount of media resources required for the interface display can be greatly reduced, thereby shortening the interface opening time, improving the interface opening efficiency, and thus enhancing the user experience.

[0051] In this embodiment, a user can trigger the opening of a target interface by performing a trigger operation on their terminal device. In response to the detected trigger operation, the terminal device can generate an interface display instruction to request the display of the target interface, thereby allowing the terminal device to obtain the interface display instruction. Here, the trigger operation can be one operation or a combination of multiple operations, including but not limited to at least one of the following: single-click operation, double-click operation, swipe operation, gesture operation, etc. The trigger operation can be detected through its touchscreen or received from an input / output device (e.g., keyboard, mouse, remote control, etc.) through an input / output port. Optionally, the interface display instruction can also be received by the terminal device from other devices (e.g., server, other terminal devices). This embodiment does not limit the method of obtaining the interface display instruction.

[0052] Step S204: If a first group of media resources exists in the media resource set to be loaded in the target interface, in response to the interface display instruction, a second group of media resources other than the first group of media resources is loaded from the media resource set, wherein the resource size of each media resource in the first group of media resources is greater than a preset threshold.

[0053] In response to the received interface display instruction, the terminal device can first determine the set of media resources to be loaded in the target interface, that is, the combination of media resources required to display the target interface. The media resources in the set of media resources to be loaded can include one or more types, such as media resources that need to be loaded before displaying the target interface and media resources that do not need to be loaded before displaying the target interface. If the set of media resources to be loaded contains a first group of media resources (i.e., a group of media resources that do not need to be loaded before displaying the target interface), in response to the interface display instruction, the terminal device can load a second group of media resources in the media resource set, excluding the first group of media resources.

[0054] Optionally, media resource conditions can be preset. These conditions may include, but are not limited to, at least one of the following: conditions that media resources need to be loaded before the target interface is displayed, and conditions that media resources do not need to be loaded before the target interface is displayed. These conditions may include conditions corresponding to resource size, and may also include other types of conditions, such as conditions corresponding to resource type. Based on the preset media resource conditions, the terminal device can determine that a first group of media resources exists in the set of media resources to be loaded. Here, the resource size of each media resource in the first group is greater than a preset threshold, which is a preset threshold for the resource size of media resources, such as 1M, 2M, or other values.

[0055] The first group of media resources can be asynchronously loaded, and the second group of media resources can be synchronously loaded. The target interface will only be displayed after all media resources in the second group have been loaded, not necessarily after all media resources in the first group have been loaded. The media resources in the second group can be loaded in parallel or sequentially, as long as all media resources in the second group are loaded completely. The media resources in the first group can also be loaded in parallel or sequentially. They can begin loading after the target interface is displayed, or they can begin loading immediately upon receiving an interface display command. This embodiment does not limit the loading method or timing of the first and second groups of media resources.

[0056] For example, such as Figure 4 As shown, the media resource set to be loaded in the target interface includes media resources A1 to A4 and B1 to B8. The first group of media resources includes A1 to A4 and the second group of media resources includes B1 to B8. The resource size of each media resource in A1 to A4 is greater than the preset threshold. The resource size of each media resource in B1 to B8 can be less than or equal to the preset threshold, or it can be partially less than or equal to the preset threshold and partially greater than the preset threshold.

[0057] It should be noted that the resource size of each media resource in the first group is greater than the preset threshold, while the resource size of the media resources in the second group may be less than or equal to the preset threshold, or it may be greater than the preset threshold. For example, the first group of media resources may include media resources of a specified resource type whose resource size is greater than the preset threshold. Media resources of a specified resource type whose resource size is less than or equal to the preset threshold, as well as media resources of other resource types, may all belong to the second group of media resources.

[0058] Step S206: After the second group of media resources has been loaded, and the first group of media resources has not been fully loaded, display the target interface containing the second group of media resources.

[0059] After the second set of media resources is loaded, the target interface will be displayed regardless of whether the first set of media resources has finished loading. If the second set of media resources is loaded but the first set of media resources has not finished loading, the terminal device can display the target interface containing the second set of media resources. For example, after all media resources that need to be loaded synchronously have been loaded, the target interface will still be displayed on the terminal device even if any asynchronously loaded media resource has not finished loading.

[0060] When loading any media resource, loading can be performed based on the resource component corresponding to the media resource. Once loaded, the media resource can be displayed within its corresponding display area on the target interface. The area parameters for each media resource's display area can be fixed, and these parameters may include at least one of the following: area position, area size, and the layer the area is located on. The display area for each media resource can be fixed or variable; the display areas for different media resources can be non-overlapping, partially overlapping, or fully overlapping, but this embodiment does not impose any limitations on this.

[0061] For example, when all the media resources in the second group (i.e., B1 to B8) have finished loading, but any one of the media resources in the first group (i.e., A1 to A4) has not yet finished loading, the target interface can be displayed directly, such as... Figure 5 As shown. On the target interface, the second group of media resources can be displayed only in the corresponding display area, or the second group of media resources and alternative media resources of all or part of the first group of media resources can be displayed.

[0062] Step S208: When the target interface containing the second group of media resources is displayed, wait until the first group of media resources is loaded, and then display the first group of media resources in the target interface.

[0063] In this embodiment, while displaying the target interface containing the second set of media resources, the first set of media resources can be continuously loaded. The loading of the first set of media resources can begin before or after the target interface containing the second set of media resources is displayed. Once the first set of media resources has finished loading, it can be displayed on the target interface; that is, the target interface containing both the first and second sets of media resources is displayed. The final displayed target interface can be as follows: Figure 4 As shown in the image.

[0064] The loading times for different media resources in the first group can be different. You can wait until all media resources in the first group are loaded before displaying the first group on the target interface, or you can wait until any one media resource in the first group is loaded before displaying the loaded media resources on the target interface. In other words, you can display a target interface that includes the loaded media resources from the first group and the second group of media resources.

[0065] After displaying the target interface containing the second set of media resources, the terminal device can detect the interface closing operation performed on the target interface. If there are any media resources in the first set that have not been fully loaded at this time, loading of these media resources can be stopped. Alternatively, the loaded media resources in the first set can be retained or deleted from the terminal device's memory. If the loaded media resources in the first set are retained, they can be directly retrieved from memory the next time the target interface is opened, and only the unfounded media resources can be loaded. Optionally, the unloaded media resources in the first set can continue to be loaded, resulting in a fully loaded first set of media resources. The fully loaded first set of media resources can be stored in the terminal device's memory, making it convenient to directly read the first set of media resources from memory the next time the target interface is opened.

[0066] For the second set of media resources, they can be retained or deleted from the terminal device's memory. If the second set of media resources is retained, it can be searched directly from memory the next time the target interface is opened. If all the second set of media resources have been found, the target interface containing the second set of media resources can be displayed directly, or the target interface containing the second set of media resources and the media resources found in the first set of media resources can be displayed, or the target interface containing the second set of media resources, the media resources found in the first set of media resources, and the media resources already loaded in the first set of media resources can be displayed.

[0067] Optionally, for scenarios where all or part of the media resources in the target interface are retained, to reduce memory usage, media resources in the target interface can be deleted from memory upon detecting resource deletion conditions. For example, all or part of the loaded media resources in the first group can be deleted, and the media resources in the second group can be deleted. Resource deletion conditions may include at least one of the following: remaining memory space is less than or equal to a preset space threshold, or the target interface has not been opened for a preset duration. This embodiment does not limit the processing procedure when the target interface is closed.

[0068] The embodiments provided in this application, by obtaining an interface display instruction, wherein the interface display instruction is used to request the display of a target interface; if a first group of media resources exists in the media resource set to be loaded in the target interface, in response to the interface display instruction, a second group of media resources other than the first group of media resources is loaded from the media resource set, wherein the resource size of each media resource in the first group of media resources is greater than a preset threshold; if the second group of media resources is loaded and the first group of media resources has not been fully loaded, the target interface containing the second group of media resources is displayed; if the target interface containing the second group of media resources is displayed, the first group of media resources is displayed in the target interface after the first group of media resources has been fully loaded. This solves the problem of excessively long interface opening time caused by excessive resources required to be loaded when the interface is opened in the related art display methods, shortens the interface display time, and improves the completeness of information display.

[0069] As an optional approach, the above method also includes:

[0070] S11, Load the first set of media resources, wherein the first set of media resources is loaded in response to the interface display instruction, or loaded after the target interface is displayed.

[0071] In this embodiment, there are several possible loading times for the first group of media resources. For example, the loading of the first group of media resources can begin in response to an interface display command. By using the above loading method, the time when only the second group of media resources or a portion of the second group of media resources and the first group of media resources are displayed on the target interface can be shortened. Alternatively, the loading of the first group of media resources can begin after the target interface is displayed. Since loading media resources requires certain hardware and software resources, this increases the loading time of the second group of media resources. Therefore, by using the above loading method, the speed of interface display can be improved.

[0072] For example, such as Figure 6 As shown, if the interface display instruction of the target interface is obtained at the first moment, the loading of the first group of media resources can begin immediately upon obtaining the interface display instruction, or it can wait until the second moment, that is, after the target interface is displayed, to begin loading the first group of media resources.

[0073] The embodiments provided in this application enable the loading of asynchronously loaded media resources in response to interface display instructions, or after displaying the target interface, thereby improving the flexibility of resource loading.

[0074] As an optional approach, after obtaining the interface display instructions, the above method also includes:

[0075] S21, if there is a first alternative resource for the first media resource in the first group of media resources, the first alternative resource is loaded in response to the interface display instruction, wherein the first alternative resource is used to replace the first media resource for display in the first display area corresponding to the first media resource in the target interface.

[0076] When the second group of media resources has finished loading, but the first group of media resources has not yet finished loading, no information can be displayed in the corresponding display area on the target interface; that is, a blank display can be shown. However, regardless of whether the loading is synchronous or asynchronous, the loading of media resources (e.g., image resources) takes time. Therefore, if a blank display is shown in the corresponding display area of ​​the first group of media resources on the target interface during this loading time, a short blank time will not have a significant impact on the user's visual experience (e.g., gaming experience), but a long blank time will affect the user's visual experience.

[0077] In this embodiment, to improve the user's visual experience, alternative media resources can be configured for all or part of the media resources in the first group of media resources. These alternative media resources are used to replace the replaced media resources and display them in the display area corresponding to the replaced media resources on the target interface. For example, a corresponding LOD (Level of Detail) image can be configured for the image resources on the target interface. For instance, an LOD image can be bound to the component corresponding to the image. LOD images are smaller in size and can be strongly bound to the corresponding UMG. LOD images have smaller image resources, load faster, and do not affect the user's visual perception.

[0078] Here, LOD images can be replacement images for images generated using LOD technology. LOD technology reduces the polygon count of a model, and replacing distant objects with low-polygon models in real time can improve performance. Alternatively, LOD images can be thumbnails of image resources, images obtained by adjusting the sharpness, contrast, or other image parameters of image resources, as long as the size (image dimensions) of the LOD image is less than or equal to a preset threshold.

[0079] In this embodiment, if a first alternative resource exists for the first media resource in the first group of media resources, the first alternative resource can be loaded in response to an interface display instruction. The first media resource can be all or part of the media resources in the first group of media resources; it can be one or more media resources with larger resource sizes in the first group of media resources, or one or more media resources with lower resource loading priority in the first group of media resources. The first alternative resource can be used to replace the first media resource for display in the first display area corresponding to the first media resource in the target interface.

[0080] Correspondingly, after the second set of media resources has been loaded, but before the first set of media resources has been fully loaded, the target interface containing the second set of media resources is displayed, including:

[0081] S22, after loading the second group of media resources and the first alternative resources, and before the first group of media resources has been fully loaded, display the target interface containing the second group of media resources and the first alternative resources.

[0082] To improve the user's visual experience, the first alternative resource can be configured as a media resource that needs to be loaded before the target interface is displayed; this can be a media resource loaded synchronously. After the second set of media resources and the first alternative resource have been loaded, even if the first set of media resources has not yet been fully loaded, the target interface containing the second set of media resources and the first alternative resource can be directly displayed on the terminal device.

[0083] For example, the first set of media resources A1 to A4 corresponds to a set of alternative media resources A'1 to A'4. After loading A'1 to A'4 and B1 to B8, the target interface can be displayed, as shown in the image. Figure 7 As shown. A'1 to A'4 are displayed in the display areas corresponding to A1 to A4 respectively.

[0084] By configuring alternative media resources for asynchronously loaded media resources and displaying the target interface immediately after loading both synchronously loaded media resources and alternative media resources through the embodiments provided in this application, the situation of a large amount of blank space or long blank time on the interface can be avoided, thereby improving the user's visual experience.

[0085] As an optional solution, when displaying the target interface containing the second set of media resources, wait until the first set of media resources has finished loading before displaying the first set of media resources in the target interface, including:

[0086] S31, when displaying the target interface containing the second set of media resources and the first alternative resource, wait until the first media resource is loaded, and then use the first media resource to replace the first alternative resource displayed in the first display area.

[0087] The first alternative resource is a media resource used to replace the first media resource for display on the target interface. It is not the actual first media resource. The size of the alternative media resource is relatively small (e.g., less than or equal to a preset threshold). Compared with the replaced media resource, it is insufficient in terms of the richness of information display. For example, compared with the corresponding high-detail media resource, the model level of the alternative media resource is lower and lacks richness in detail display, thus affecting the user's visual experience.

[0088] In this embodiment, to improve the user's visual experience, after displaying the target interface containing the second set of media resources and the first alternative resource, the terminal device can replace the first alternative resource with the first media resource displayed in the first display area after the first media resource has finished loading. Since the first media resource is also displayed in the first display area, the visual impact on the user is minimal; the user will perceive only an improvement in the quality of the media resource displayed in the first display area.

[0089] For example, while using a Level-of-Depth (LOD) image to replace the original image resource in the target interface, the original image resource can be loaded asynchronously in the background. After the original image resource is loaded, the displayed LOD image can be replaced with the original image resource.

[0090] The embodiments provided in this application allow for the replacement of the alternative media resources displayed in the corresponding display area of ​​the target interface after the asynchronously loaded media resources have been loaded, thereby improving the richness of the interface information display and enhancing the user's visual experience.

[0091] As an optional approach, after loading the second group of media resources in the media resource set (excluding the first group) in response to the interface display instruction, the above method further includes:

[0092] S41, after loading the second group of media resources and the third group of media resources in the first group of media resources has been loaded, display the target interface containing the second group of media resources and the third group of media resources.

[0093] S42, while displaying the target interface containing the second group of media resources and the third group of media resources, wait until the fourth group of media resources (excluding the third group of media resources) in the first group of media resources is loaded, and then display the fourth group of media resources in the target interface.

[0094] In this embodiment, the first group of media resources may be loaded in response to an interface display command. If the loading status of the first group of media resources is as follows when the second group is loaded, there are several possibilities: no media resources are loaded, some media resources are loaded, or all media resources are loaded. In the case where some media resources are loaded, if the third group of media resources in the first group is loaded when the second group is loaded, the terminal device can display a target interface containing both the second and third group of media resources. Here, the third group of media resources is a portion of the first group of media resources; it can be media resources historically loaded into memory or media resources loaded after the interface display command is received.

[0095] For example, if A1 and A2 (an example of a third group of media resources) in the first group have already been loaded when the second group of media resources B1-B8 have finished loading, a target interface containing B1-B8 and A1 and A2 can be displayed, such as... Figure 8 As shown.

[0096] In this embodiment, while displaying the target interface containing the second and third sets of media resources, a fourth set of media resources can be continuously loaded. The loading of the fourth set of media resources can begin before or after the target interface containing the second and third sets of media resources is displayed. Once the fourth set of media resources has finished loading, it can be displayed on the target interface; that is, the target interface containing the first and second sets of media resources can be displayed.

[0097] The loading times of different media resources in the fourth group can be different. Alternatively, the fourth group can be displayed on the target interface only after all media resources in the fourth group have finished loading. Or, it can be displayed on the target interface only after any one media resource in the fourth group has finished loading; that is, the target interface will display the media resources already loaded in the first group and the second group.

[0098] After displaying the target interface containing the second and third sets of media resources, the terminal device can detect the interface closing operation performed on the target interface. If there are unloaded media resources in the fourth set of media resources at this time, loading of these media resources can be stopped. Alternatively, the loaded media resources in the first set of media resources (including the third set and the loaded portions of the fourth set) can be retained or deleted from the terminal device's memory. If the loaded media resources in the first set are retained, they can be directly retrieved from memory the next time the target interface is opened, and only the unfounded media resources can be loaded. Optionally, the unloaded media resources in the fourth set can continue to be loaded to obtain the fully loaded first set of media resources. The fully loaded first set of media resources can be saved in the terminal device's memory, making it convenient to directly read the first set of media resources from memory the next time the target interface is opened.

[0099] For the second set of media resources, they can be retained or deleted from the terminal device's memory. If the second set of media resources is retained, it can be searched directly from memory the next time the target interface is opened. If all the second set of media resources have been found, the target interface containing the second set of media resources can be displayed directly, or the target interface containing the second set of media resources and the media resources found in the first set of media resources can be displayed, or the target interface containing the second set of media resources, the media resources found in the first set of media resources, and the media resources already loaded in the first set of media resources can be displayed.

[0100] Optionally, for scenarios where all or part of the media resources in the target interface are retained, in order to reduce memory usage, the media resources in the target interface can be deleted from memory upon detecting a resource deletion condition. For example, all or part of the media resources already loaded in the first group can be deleted, and the second group of media resources can be deleted. The resource deletion condition is similar to that in the previous embodiments and will not be described again here.

[0101] The embodiments provided in this application display the synchronously loaded media resources and the asynchronously loaded media resources on the target interface when the synchronously loaded media resources have finished loading, and display the remaining asynchronously loaded media resources on the target interface after they have finished loading. This can shorten the time required for interface display while ensuring the integrity of the interface display.

[0102] As an optional approach, after obtaining the interface display instructions, the above method also includes:

[0103] S51, in response to the interface display instruction, searches for the first group of media resources in memory, wherein the third group of media resources includes the historical media resources found in memory from the first group of media resources.

[0104] When the target interface is first opened, its media resource set is loaded into memory for display. The loaded media resource set can be retained in memory, either partially or completely, when the target interface is closed or for a period of time afterward; alternatively, all or part of the media resources can be preloaded before the target interface is reopened. Retrieving media resources from memory is more efficient than loading them into memory.

[0105] In this embodiment, in response to the received interface display instruction, the terminal device can first search for the first set of historically loaded media resources in memory. The media resources that can be found may be all or part of the media resources in the first set, or no media resources in the first set may be found. The aforementioned third set of media resources includes the historical media resources found in memory from the first set of media resources.

[0106] For example, for such Figure 8 The target interface shown has A1 in the first group of media resources, which is a media resource found in memory.

[0107] It should be noted that the second set of media resources can also be loaded by first searching in memory and then loading the media resources that are not found, or it can be loaded synchronously directly (in which case the second set of media resources can be left unstored in memory). This embodiment does not limit this.

[0108] By using the embodiments provided in this application, the media resource loading time can be shortened and the efficiency of media resource loading can be improved by finding the media resources that need to be loaded asynchronously from memory and displaying the found media resources directly on the target interface.

[0109] As an optional approach, after obtaining the interface display instructions, the above method also includes:

[0110] S61, in response to the interface display command, load other media resources in the first group of media resources other than historical media resources, wherein the third group of media resources also includes media resources that have been loaded in other media resources when the second group of media resources is loaded.

[0111] In this embodiment, for media resources other than historical media resources in the first group of media resources, they can be loaded after the target interface is opened, or they can be loaded asynchronously without waiting for the target interface to open. The loading method for other media resources is similar to that in the previous embodiments, and will not be described in detail here.

[0112] For cases where other media resources are loaded only after the target interface opens, the third group of media resources consists of the historical media resources retrieved from memory. For cases where asynchronous loading occurs directly, when the second group of media resources has finished loading, other media resources may not have finished loading, or they may have at least partially finished loading. In the case where other media resources may not have finished loading, the third group of media resources consists of the historical media resources retrieved from memory. In the case where at least some have finished loading, the third group of media resources includes the historical media resources retrieved from memory and the media resources that have already been loaded from the other media resources when the second group of media resources has finished loading.

[0113] For example, for such Figure 8 The target interface shown includes other media resources A2, A3, and A4. Among them, A2 is the media resource that has been loaded in the other media resources when the second group of media resources has been loaded.

[0114] By implementing the embodiments provided in this application, media resources that are not found in memory from asynchronously loaded media resources can be directly loaded in response to interface display instructions, thereby improving the richness of interface information display and enhancing the user's visual experience.

[0115] As an optional approach, after obtaining the interface display instructions, the above method also includes:

[0116] S71, if there is a second alternative resource for the second media resource other than the historical media resource in the first group of media resources, in response to the interface display instruction, the second alternative resource is loaded, wherein the second alternative resource is used to replace the second media resource for display on the second display area corresponding to the second media resource in the target interface.

[0117] When the second group of media resources has finished loading, the media resources in the first group that have not yet finished loading can be left blank in their corresponding display area on the target interface. However, similar to the previous embodiments, if the blank period is too long, it will affect the user's visual experience.

[0118] To at least partially solve the aforementioned technical problems, for other media resources in the first group that are not found in memory, it can be determined whether there are alternative media resources for each of these media resources. The meaning of alternative media resources is similar to that in the previous embodiments and will not be repeated here. If a second alternative resource exists for a second media resource in the first group other than the historical media resources, the second alternative resource can be loaded in response to the interface display instruction. Here, the second media resource can be all or part of the other media resources. It can be one or more media resources in the first group with a larger resource size, or one or more media resources in the first group with a lower resource loading priority. The second alternative resource can be used to replace the second media resource for display in the second display area corresponding to the second media resource in the target interface.

[0119] Correspondingly, after the second group of media resources has been loaded and the third group of media resources in the first group has been loaded, the target interface containing the second and third group of media resources is displayed, including:

[0120] S72, after loading the second group of media resources and the second alternative resources, and after loading the third group of media resources, and if the third group of media resources does not include the second media resources, display the target interface containing the second group of media resources, the third group of media resources, and the second alternative resources.

[0121] To improve the user's visual experience, a second alternative resource can be configured as a media resource that needs to be loaded before displaying the target interface; this resource can be a synchronously loaded media resource. After loading the second set of media resources and the second alternative resource, even if other media resources have not yet finished loading, the target interface containing the second set of media resources, the first alternative resource, and historical media resources can be directly displayed on the terminal device. Furthermore, even if the third set of media resources includes media resources that have already been loaded among the other media resources when the second set of media resources has finished loading, if the media resources that have already been loaded among the other media resources do not include the second media resource, the terminal device can display the target interface containing the second set of media resources, the third set of media resources, and the second alternative resource.

[0122] For example, in the first group of media resources A1-A4, media resources with corresponding alternative media resources include A3 and A4 (an example of a second media resource), and the corresponding alternative media resources are A'3 and A'4 (an example of a second alternative resource). The third group of media resources includes A1 and A2. After loading A1-A2, A'3-A'4, and B1-B8, a target interface containing A1-A2, A'3-A'4, and B1-B8 can be displayed. The displayed target interface is as follows: Figure 9 As shown.

[0123] Optionally, if the third group of media resources includes some of the media resources in the second group of media resources, the media resources in the second group of media resources that do not belong to the third group of media resources can be identified to obtain the target sub-media resources. The terminal device can then display a target interface that includes the second group of media resources, the third group of media resources, and the alternative resources in the second alternative resources that correspond to the target sub-media resources.

[0124] For example, in the first group of media resources A1 to A4, the media resources with corresponding alternative media resources include A1 to A4. Here, A1 is a media resource retrieved from memory, and A2 to A4 are second media resources, with corresponding alternative media resources A'2 to A'4 (an example of a second alternative resource). The third group of media resources includes A1 and A2. After loading A1 to A2, A'2 to A'4, and B1 to B8, a target interface containing A1 to A2, A'3 to A'4, and B1 to B8 can be displayed. The displayed target interface is as follows: Figure 9 As shown.

[0125] By configuring alternative media resources for asynchronously loaded media resources and displaying the target interface immediately after loading both synchronously loaded media resources and alternative media resources through the embodiments provided in this application, the situation of a large amount of blank space or long blank time on the interface can be avoided, thereby improving the user's visual experience.

[0126] As an optional solution, when displaying the target interface containing the second and third sets of media resources, once the fourth set of media resources (excluding the third set) from the first set has finished loading, the fourth set of media resources is displayed on the target interface, including:

[0127] S81, when displaying the target interface containing the second group of media resources, the third group of media resources, and the second alternative resource, wait until the second media resource is loaded, and then use the second media resource to replace the second alternative resource displayed on the second display area, wherein the fourth group of media resources includes the second media resource.

[0128] The second alternative resource is a media resource used to replace the second media resource for display on the target interface. It is not the actual second media resource. The alternative media resource is relatively small in size and is insufficient in terms of information display richness compared to the replaced media resource. For example, compared with the corresponding high-detail media resource, the model level of the alternative media resource is lower and lacks richness in detail display, thus affecting the user's visual experience.

[0129] In this embodiment, to improve the user's visual experience, after displaying the target interface containing the second set of media resources, the third set of media resources, and the second alternative resource, the terminal device can replace the second alternative resource with the second media resource and display it on the second display area after the second media resource has finished loading. Since the second media resource is also displayed in the second display area, its visual impact on the user is minimal; the user will perceive only an improvement in the quality of the media resources displayed in the second display area.

[0130] The embodiments provided in this application allow for the replacement of the alternative media resources displayed in the corresponding display area of ​​the target interface after the asynchronously loaded media resources have been loaded, thereby improving the richness of the interface information display and enhancing the user's visual experience.

[0131] Through the embodiments provided in this application, after the media resources are asynchronously loaded, the corresponding alternative resources can be replaced on the interface, thereby improving the refinement of the interface display.

[0132] As an optional approach, after loading the second group of media resources in the media resource set (excluding the first group) in response to the interface display instruction, the above method further includes:

[0133] S91, after the second set of media resources has been loaded and the first set of media resources has been fully loaded, display the target interface containing the second set of media resources and the first set of media resources.

[0134] In this embodiment, the first group of media resources may be loaded in response to an interface display command. When the second group of media resources is loaded, the loading status of the first group of media resources may be that all media resources have been loaded. In this case, the terminal device can display a target interface containing both the second and first group of media resources, thus displaying the complete target interface.

[0135] For example, if all media resources in the first group have been loaded by the time the second group of media resources B1-B8 have finished loading, then the target interface containing B1-B8 and A1-A4 can be displayed, such as... Figure 4 As shown.

[0136] Through the embodiments provided in this application, if the asynchronously loaded media resources are also loaded when the synchronously loaded media resources are loaded, the two types of loaded media resources can be directly displayed, which can improve the efficiency of interface display.

[0137] As an optional approach, after obtaining the interface display instructions, the above method also includes:

[0138] S101, the media resources in the media resource set that have a preset resource type and a resource size greater than a preset threshold are identified as the first group of media resources.

[0139] In this embodiment, media resources in the determined media resource set whose resource type is a preset resource type and whose resource size is greater than the preset threshold can be identified as the first group of media resources, based on the aforementioned preset threshold. The preset resource type here can be a media resource that allows asynchronous loading, and it can include one or more resource types, such as image resources, animation resources, etc.

[0140] The embodiments provided in this application determine the media resources that need to be loaded asynchronously based on the resource type and resource size, thereby improving the rationality of media resource loading.

[0141] As an optional approach, after obtaining the interface display instructions, the above method also includes:

[0142] S111, in response to the command to obtain the interface display, obtain the resource description information corresponding to the target interface, wherein the resource description information is used to describe the resource attributes of the media resources contained in the target interface, and the resource attributes include the resource size;

[0143] S112, Based on the resource description information, determine the media resource set, the first group of media resources, and the second group of media resources.

[0144] In this embodiment, the interface display command may carry an interface identifier of the target interface to be displayed. Based on the interface identifier carried in the interface display command, the target interface to be displayed can be determined. In order to quickly determine the media resources contained in the interface to be displayed, corresponding resource description information can be pre-configured for each interface. The resource description information corresponding to each interface is used to describe the resource attributes of the media resources contained in each interface. Resource attributes may include resource size, and may also include one or more other resource attributes, such as resource type, resource name, etc. This embodiment does not limit this.

[0145] Based on the interface identifier of the target interface, the terminal device can obtain the resource description information corresponding to the target interface. This resource description information can be used to describe the resource attributes of the media resources contained in the target interface, including but not limited to resource size. Based on the resource description information corresponding to the target interface, the set of media resources on the target interface can be determined; based on the resource attribute information such as the resource size of each media resource in the set, the first group of media resources and the second group of media resources in the set can be determined.

[0146] The embodiments provided in this application can improve the efficiency of interface display by determining the media resources in the interface to be displayed, as well as the media resources that need to be loaded synchronously and the media resources that need to be loaded asynchronously, based on the interface description information.

[0147] The method for displaying the target interface in this application embodiment will be explained below with reference to an optional example. In this optional example, the target interface is a game interface, the asynchronously loaded media resource is an image resource, and the alternative media resource is a LOD image.

[0148] This optional example provides a solution for improving game interface loading speed based on UE4. When opening the game interface, images that affect loading speed are not loaded immediately, but are loaded asynchronously. This method can improve the interface opening speed and thus enhance the user's gaming experience.

[0149] Combination such as Figure 10 The process of displaying the target interface in this optional example may include the following steps:

[0150] Step S1002: In response to the detected trigger operation, request to open the game interface.

[0151] In step S1004, apart from performing a series of other operations, the terminal device skips image loading and loads the LOD image.

[0152] Step S1006: The UMG interface (i.e., the game interface) is opened.

[0153] Step S1008: Read the image resource path.

[0154] Step S1010: Asynchronous loading of images.

[0155] Step S1012: Loading complete, the loaded image is displayed on the UMG interface.

[0156] The following is combined with, for example Figure 11 The steps related to image loading in the interface opening process are explained. The process of displaying the target interface in this optional example may include the following steps:

[0157] Step S1102: Open a game interface.

[0158] Step S1104: Load various resources other than image resources (e.g., text resources).

[0159] Step S1106: Load image resources.

[0160] Step S1108: Determine whether the image resource needs to be loaded asynchronously. If not, proceed to step S1110; if yes, proceed to step S1114.

[0161] Step S1110: Load image resources using a synchronous loading method.

[0162] Step S1112, the game interface opens successfully. Here, the game interface opens successfully after all resources that need to be loaded synchronously have been loaded.

[0163] Step S1114: Determine whether the soft reference resource (i.e., the soft reference image resource) is already in memory. If yes, display it directly in the game interface. Here, step S1114 is executed before step S1112. If no, execute steps S1116 and S1120.

[0164] Step S1116: Asynchronous loading of image resources. Here, step S1116 can be executed after step S1112 or before step S1114.

[0165] Step S1118: After the image resources are loaded, the loaded image resources are displayed on the game interface.

[0166] Step S1120: Determine if a LOD image exists. If it does, proceed to step S1122; otherwise, do not proceed to other steps.

[0167] Step S1122: Synchronously load the LOD image. Here, step S1122 is executed before step S1112. After loading the LOD image, if the corresponding image resource has not yet finished loading, the LOD image can be displayed in the display area corresponding to the image resource on the game interface. If the corresponding image resource has finished loading, the LOD image will not be displayed on the game interface.

[0168] The above image loading scheme was tested, and the test data is shown in Table 1.

[0169] Table 1

[0170]

[0171] Table 1 (continued)

[0172]

[0173] Here, Option 1 is the approach in related technologies where all image resources are loaded synchronously, and Option 2 is the image loading approach in this optional example; the size of the large image is 2048×1024, and the size of the small image is 128×128; "no reference" means that there are no loaded image resources in memory.

[0174] Based on the test data above, the image loading scheme in this optional example yields the following conclusions: asynchronous loading significantly improves the performance of large images; asynchronous loading is not as good as synchronous loading for small images without references, and the difference increases with the number of small images.

[0175] As can be seen, asynchronous image loading significantly improves UI loading time, but it doesn't perform as well as synchronous loading for small images. Therefore, an improvement scheme for image loading is proposed. The following section will illustrate this with examples... Figure 12 The steps of the improved image loading solution are explained.

[0176] Depend on Figure 11 and Figure 12 It can be seen that, relative to Figure 11 The improved image loading solution includes the following steps:

[0177] Step S1202: Determine whether the image size meets the set threshold (i.e., whether it is greater than the set threshold). If yes, proceed to step S1114; otherwise, proceed to step S1110.

[0178] Here, by adding asynchronous image size detection, if the image size is too small, asynchronous loading is not required; instead, synchronous loading is used, thereby shortening the UI loading time.

[0179] In this optional example, asynchronous loading of image resources can be performed via an asynchronous thread; see [link to example]. Figure 13 The asynchronous loading process for image resources can include the following steps:

[0180] Step S1302: The main thread requests asynchronous loading from the asynchronous thread;

[0181] Step S1304: The asynchronous thread triggers the main thread to load LOD image resources (synchronous loading);

[0182] Step S1306: The main thread executes other logic;

[0183] Step S1308: The asynchronous thread sorts the image resources according to their loading priority and loads them according to the sorting result.

[0184] Step S1310: After the image resources are loaded, the loaded image resources are used to replace the LOD resources for display in the game interface.

[0185] Here, the main thread refers to the thread that loads image resources. Different image resources may use the same or different main threads. The asynchronous thread refers to the thread that loads image resources. Different image resources may use the same or different asynchronous threads. The main thread and the asynchronous thread can run concurrently.

[0186] This optional example demonstrates how asynchronous loading of all or part of image resources can shorten interface loading time. A LOD-like image loading scheme avoids blank areas in the game interface during asynchronous image resource loading, ensuring the game interface remains intact even when image loading is skipped during a request to open the interface. This significantly improves image loading performance (e.g., loading large images).

[0187] As an optional approach, the above method may also include the following steps before obtaining the interface display instructions:

[0188] S121, In the process of constructing the resource package corresponding to the target interface, the serialization operation of each media resource in the target interface container is initiated, wherein the target interface container is the interface container corresponding to the target interface.

[0189] S122, perform an unbinding operation on the target media resource bound to the target interface container, wherein the resource type of the target media resource is a preset resource type, and the unbinding operation is used to remove the association between displaying the target interface and loading the target media resource;

[0190] S123, Perform serialization operation on the target media resource after the unbinding operation.

[0191] To asynchronously load the first set of media resources, programmers (the code writers) or other relevant personnel could perform asynchronous loading for different images separately within the code logic. However, having relevant personnel control whether media resources need to be loaded asynchronously through their own code is not only time-consuming and labor-intensive, but also prone to errors. Furthermore, it requires these personnel to spend a significant amount of time writing repetitive code, resulting in a waste of human resources.

[0192] Furthermore, for those who refactor the interface (e.g., those who refactor UMG), it would be difficult and costly to change their original way of building the interface. Therefore, changing the way refactorers build the interface is not universal or compatible.

[0193] In this embodiment, the entire process can be completed in a configurable manner. Without changing the interface reconstruction process, the strong references to media resources (e.g., image resources) of the target interface (e.g., UMG interface) can be changed to soft references. This can improve the performance of the constructed interface while ensuring the convenience of code writing for programmers and the convenience of interface construction for reconstruction personnel.

[0194] For a target interface (e.g., a UMG interface), its lifecycle can include the following stages: initialization; construction preparation; construction start; deletion and destruction. In this embodiment, during the initialization stage of the lifecycle, the resource paths of media resources previously stored in soft references can be loaded asynchronously. This allows for changes to the media resource application method (or loading method) without altering the interface configuration process.

[0195] Building the resource package for the target interface involves obtaining the resource package corresponding to the target interface. This resource package can be the installation package or update package of the target application to which the target interface belongs. It can be a mobile installation package (e.g., a mobile phone installation package, such as a game installation package on a mobile phone), a PC installation package, etc. During the process of building the resource package corresponding to the target interface, there is a process of performing serialization operations on each media resource in the target interface container. Here, the target interface container can contain multiple components (media resource components), each component is used to bind one or more media resources. The target interface container can be a blueprint, such as a UMG blueprint.

[0196] During the serialization process described above, the target media resource bound to the target interface container can be unbound. The device executing the resource package construction process can be the aforementioned terminal device or other devices. Here, the resource type of the target media resource is a preset resource type (e.g., image resource). The unbinding operation breaks the binding relationship between the target interface and the target media resource, that is, the association between the displayed target interface and the loaded target media resource. After the unbinding operation is completed, the serialization operation can be performed on the unbound target media resource. The target media resource can be bound to a target component in the target interface container, and the target media resource and the target interface container are bound through the target component. Correspondingly, the unbinding operation breaks the binding relationship between the target component and the target media resource.

[0197] If there is a binding relationship between the target interface and the target media resource, the target media resource needs to be loaded before the target interface is displayed. In this case, the target interface strongly references the target media resource, and the target media resource is loaded synchronously. If there is no binding relationship between the target interface and the target media resource, the target media resource does not need to be loaded before the target interface is displayed. In this case, the target interface softly references the target media resource, and the target media resource is loaded asynchronously. The above-mentioned reference relationship can be a reference relationship between the target component and the target media resource.

[0198] It's important to note that serialization refers to the process of converting an object into a byte stream, thereby storing the object or transferring it to memory, a database, or a file. The primary purpose of serialization is to preserve the state of an object so that it can be recreated when needed. The reverse process of serialization is called deserialization. In other words, saving and reading an object are respectively the processes of serialization and deserialization.

[0199] For example, the process of building a mobile phone installation package involves serializing the UMG blueprint resources. When serializing the image resources bound to the image component, you can first unbind the image resources and then perform the serialization operation on the unbound image resources.

[0200] Optionally, when displaying the target interface, for asynchronously loaded media resources, it can be determined whether to load them asynchronously based on whether their resource size reaches a preset threshold. If the preset threshold is reached, asynchronous loading is performed; otherwise, synchronous loading is still used. By unbinding media resources of a preset resource type and determining whether to load them asynchronously based on whether their resource size reaches a preset threshold when displaying the interface, asynchronous loading of media resources of a preset resource type and whose resource size reaches the preset threshold can be achieved.

[0201] The embodiments provided in this application demonstrate how the association between the target display interface and the loaded media resources of the preset resource type can be severed by performing an unbinding operation on the media resources of the preset resource type during the serialization process. This improves compatibility with existing media resource loading schemes and enhances the convenience and accuracy of asynchronous media resource loading configuration.

[0202] As an optional approach, the target media resource can be bound to a target component within a target interface container. The binding can be configured through the target resource container; for example, selecting the media resource bound to the target component as the target media resource. Alternatively, a substitute media resource can be selected, meaning the substitute target media resource is displayed in the corresponding display position within the target interface. Correspondingly, an unbinding operation is performed on the target media resource bound to the target interface container, including:

[0203] S131, Assign the target resource path of the target media resource to the asynchronous loading variable of the target component, wherein the asynchronous loading variable is used to indicate that the target media resource is loaded asynchronously when the target interface is displayed;

[0204] S132, Clear the synchronous loading variable of the target component to remove the association between displaying the target interface and loading the target media resources. The synchronous loading variable is used to indicate that the target media resources are loaded synchronously when displaying the target interface.

[0205] In this embodiment, the target media resource can be unbound from the target component by assigning the resource path of the target media resource to the asynchronous loading variable (i.e., soft reference variable) of the target component and clearing the synchronous loading variable of the target component. If there are multiple synchronous loading variables, the synchronous loading variable corresponding to the target media resource among the multiple synchronous loading variables of the target component can be cleared.

[0206] When performing an unbinding operation on a target media resource, the target resource path of the target media resource can be assigned to the asynchronous loading variable of the target component. The asynchronous loading variable can be pre-configured or generated during the serialization process. It can be used to indicate that the target media resource is loaded asynchronously when the target interface is displayed. Since the target media resource is loaded asynchronously, whether it is loaded or not does not affect the display of the target interface, thereby severing the association between displaying the target interface and loading the target media resource.

[0207] Furthermore, because the target media resource is bound to the target component, the target resource has a corresponding synchronization loading variable (strong reference variable), which indicates that the target media resource should be loaded synchronously when the target interface is displayed. Since the target media resource loads synchronously when the target interface is displayed, the target interface can only be displayed after its loading is complete. Therefore, there is a correlation between displaying the target interface and the completion of loading the target media resource. Retaining this synchronization loading variable will either lead to errors in loading the target media resource or result in the target media resource still being loaded synchronously. To address this, the synchronization loading variable of the target component can be cleared to sever the correlation between displaying the target interface and the completion of loading the target media resource.

[0208] It should be noted that both strong reference variables and soft reference variables can point to the target resource path through pointers, but the variable types or pointer types of the two are different. Therefore, it is possible to determine whether the target media resource needs to be loaded synchronously or asynchronously based on the variable type or pointer type.

[0209] By using the embodiments provided in this application, the efficiency of unbinding media resources can be improved by assigning the resource path of the media resource to the asynchronous loading variable of the bound component and deleting the corresponding synchronous loading variable.

[0210] As an optional approach, the above method also includes:

[0211] S141, if the target media resource has a corresponding alternative media resource, perform a serialization operation on the alternative media resource, wherein the alternative media resource is used to replace the target media resource in the display area corresponding to the target media resource in the target interface.

[0212] In this embodiment, a corresponding alternative media resource can be configured for the target media resource. This alternative media resource is used to replace the target media resource in displaying on the corresponding display area of ​​the target media resource in the target interface, such as the aforementioned LOD image. For example, an LOD image can be bound to the target component on the target interface container as an alternative media resource for its bound image resource. The alternative media resource can be a media resource that needs to be loaded synchronously, and it has a strong reference relationship with the target interface container or target component. If the target media resource has a corresponding alternative media resource, a serialization operation can be performed on the alternative media resource. The process of performing a serialization operation on a media resource can be referred to relevant technologies, and will not be elaborated here.

[0213] The embodiments provided in this application improve the convenience of processing alternative media resources by performing serialization operations on the alternative media resources corresponding to the asynchronously loaded media resources (both the asynchronously loaded media resources and the corresponding alternative media resources are serialized during the serialization process).

[0214] The method for displaying the target interface in this application embodiment will be explained below with reference to optional examples. In this optional example, the target interface is a game interface, the asynchronously loaded media resource is an image resource, the alternative media resource is a LOD image, and the resource package is the installation package of the mobile game, i.e., the mobile phone installation package.

[0215] This optional example provides a solution for improving game interface loading speed based on UE4. During serialization, the image resources bound to the UMG can be unbound, and then the path of the unbound image resources can be saved to a soft reference (which can be understood as saving the image resource path), thereby realizing the attribute change of the image between the strong reference and the soft reference.

[0216] Here, serialization is a step in the process of building a mobile phone installation package, such as... Figure 14 As shown, the process of building a mobile phone installation package may include the following steps:

[0217] Step S1402: Start the build process, that is, begin building the mobile phone installation package.

[0218] In step S1404, in addition to performing a series of other processes, the UMG blueprint is serialized. During serialization, each component in the UMG blueprint is serialized separately.

[0219] Steps S1406-1408: Unbind image references and save image paths.

[0220] Image reference unbinding changes the image resource from a strong reference to a soft reference. For example... Figure 15 As shown, the process of unbinding images may include the following steps:

[0221] Step S1502: Determine whether the system is in the process of building. If not, proceed to step S1504; if yes, proceed to step S1506.

[0222] During the serialization of the UMG blueprint, the text component, image component, and various other components can be serialized separately. When serializing the image component, it can first be determined whether the current process is in the process of building the mobile phone installation package. If not, step S1504 is executed; if so, step S1506 is executed.

[0223] Step S1504: If not in the construction phase, no action is taken.

[0224] Step S1506: Determine whether asynchronous loading is enabled and whether image resources are bound. If asynchronous loading is not enabled or image resources are not bound, proceed to step S1508. If asynchronous loading is enabled and image resources are bound, proceed to step S1510.

[0225] In step S1508, if asynchronous loading is not enabled, no operation will be performed regardless of whether image resources are bound; if image resources are not bound, no operation will be performed regardless of whether asynchronous loading is enabled.

[0226] Step S1510: Assign the image resource to a soft reference variable (i.e., asynchronously load the variable);

[0227] Step S1512: Clear the original image resource bindings.

[0228] After the entire process is completed, the image resources bound to the image component can be successfully unloaded, and the image information can be saved in another form, namely, through a soft reference.

[0229] Step S1410: Complete the mobile phone installation package building process by executing other processes.

[0230] This optional example presents a general solution to improve the loading speed of UMG interfaces without affecting the existing interface reconstruction process or requiring additional learning costs. Furthermore, this solution can be extended to other game engines besides UE4, and is applicable to different game engines, with the only difference being the implementation method in different game engines.

[0231] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0232] According to another aspect of the embodiments of this application, a display device for a target interface for implementing the above-described target interface display method is also provided. Figure 16 This is a schematic diagram of the structure of an optional target interface display device according to an embodiment of this application, such as... Figure 16 As shown, the above-mentioned device may include:

[0233] The first acquisition unit 1602 is used to determine a set of first images and multiple sets of second images, wherein each first image in the set of first images is an image referenced by more than a preset number of business modules of the target application in multiple images of the target application, and each set of second images in the multiple sets of second images contains other images in multiple images other than the set of first images corresponding to a business module.

[0234] The first loading unit 1604 is connected to the first acquisition unit 1602 and is used to divide a group of first images into multiple first image sets according to the similarity between the reference module information of each first image. The reference module information of each first image is used to represent the business module that references each first image.

[0235] The first display unit 1606, connected to the first loading unit 1604, is used to divide each group of second textures into multiple second texture sets based on the similarity between the prefab reference information of each second texture in each group of second textures. The prefab reference information of each second texture is used to indicate that the prefab reference of each second texture is used in the multiple prefabs of the business module corresponding to each group of second textures.

[0236] The second display unit 1608 is connected to the first display unit 1606 and is used to display the first group of media resources in the target interface after the first group of media resources has been loaded, when the target interface containing the second group of media resources is being displayed.

[0237] It should be noted that the first acquisition unit 1602 in this embodiment can be used to execute the above step S202, the first loading unit 1604 in this embodiment can be used to execute the above step S204, the first display unit 1606 in this embodiment can be used to execute the above step S206, and the second display unit 1608 can be used to execute the above step S208.

[0238] The embodiments provided in this application, by obtaining an interface display instruction, wherein the interface display instruction is used to request the display of a target interface; if a first group of media resources exists in the media resource set to be loaded in the target interface, in response to the interface display instruction, a second group of media resources other than the first group of media resources is loaded from the media resource set, wherein the resource size of each media resource in the first group of media resources is greater than a preset threshold; if the second group of media resources is loaded and the first group of media resources has not been fully loaded, the target interface containing the second group of media resources is displayed; if the target interface containing the second group of media resources is displayed, the first group of media resources is displayed in the target interface after the first group of media resources has been fully loaded. This solves the problem of excessively long interface opening time caused by excessive resources required to be loaded when the interface is opened in the related art display methods, shortens the interface display time, and improves the completeness of information display.

[0239] As an optional solution, the above-mentioned device further includes:

[0240] The second loading unit is used to load the first set of media resources, wherein the first set of media resources is loaded in response to the interface display instruction, or loaded after the target interface is displayed.

[0241] Optional examples of this implementation scheme can be found in the examples shown in the above target interface display method, which will not be repeated here.

[0242] As an optional solution, the above-mentioned device further includes: a third loading unit, and the first display unit includes: a first display module, wherein,

[0243] The third loading unit is used to load the first alternative resource in response to the interface display instruction after obtaining the interface display instruction, in the case that there is a first alternative resource for the first media resource in the first group of media resources. The first alternative resource is used to replace the first media resource in the first display area corresponding to the first media resource in the target interface.

[0244] The first display module is used to display a target interface containing the second set of media resources and the first alternative resources when the second set of media resources and the first alternative resources have been loaded, but the first set of media resources have not been fully loaded.

[0245] Optional examples of this implementation scheme can be found in the examples shown in the above target interface display method, which will not be repeated here.

[0246] As an optional solution, the second display unit includes:

[0247] The first replacement module is used to replace the first alternative resource in the first display area when the target interface containing the second set of media resources and the first alternative resource is displayed, after the first media resource has been loaded.

[0248] Optional examples of this implementation scheme can be found in the examples shown in the above target interface display method, which will not be repeated here.

[0249] As an optional solution, the above-mentioned device further includes:

[0250] The third display unit is used to display a target interface containing the second group of media resources and the third group of media resources after loading the second group of media resources (excluding the first group of media resources) in response to the interface display instruction, and after loading the second group of media resources and the third group of media resources in the first group of media resources has been loaded.

[0251] The fourth display unit is used to display the fourth group of media resources in the target interface when the target interface containing the second group of media resources and the third group of media resources is being displayed. After the fourth group of media resources (excluding the third group of media resources) in the first group of media resources has been loaded, the fourth group of media resources is displayed in the target interface.

[0252] Optional examples of this implementation scheme can be found in the examples shown in the above target interface display method, which will not be repeated here.

[0253] As an optional solution, the above-mentioned device further includes:

[0254] The lookup unit is used to respond to the interface display instruction after obtaining it, and to search for the first group of media resources in memory. The third group of media resources includes the historical media resources found in memory from the first group of media resources.

[0255] Optional examples of this implementation scheme can be found in the examples shown in the above target interface display method, which will not be repeated here.

[0256] As an optional solution, the above-mentioned device further includes:

[0257] The fourth loading unit is used to load other media resources in the first group of media resources in response to the interface display instruction after obtaining the interface display instruction. The third group of media resources also includes media resources that have been loaded in the other media resources when the second group of media resources is loaded.

[0258] Optional examples of this implementation scheme can be found in the examples shown in the above target interface display method, which will not be repeated here.

[0259] As an optional solution, the above-mentioned device further includes: a fifth loading unit, and the third display unit includes: a second display module, wherein,

[0260] The fifth loading unit is used to load the second alternative resource in response to the interface display instruction after obtaining the interface display instruction, in the case that there is a second alternative resource in the second media resource other than the historical media resource in the first group of media resources. The second alternative resource is used to replace the second media resource in the second display area corresponding to the second media resource in the target interface.

[0261] The second display module is used to display a target interface containing the second group of media resources, the third group of media resources, and the second alternative resources when the second group of media resources and the second alternative resources have been loaded, the third group of media resources have been loaded, and the third group of media resources does not include the second media resources.

[0262] Optional examples of this implementation scheme can be found in the examples shown in the above target interface display method, which will not be repeated here.

[0263] As an optional solution, the fourth display unit includes:

[0264] The second replacement module is used to replace the second alternative resource in the second display area when the target interface containing the second group of media resources, the third group of media resources, and the second alternative resource is displayed, after the second media resource has been loaded. The fourth group of media resources includes the second media resource.

[0265] Optional examples of this implementation scheme can be found in the examples shown in the above target interface display method, which will not be repeated here.

[0266] As an optional solution, the above-mentioned device further includes:

[0267] The fifth display unit is used to display a target interface containing the second group of media resources and the first group of media resources after loading the second group of media resources in the media resource set in response to the interface display instruction, and after loading the second group of media resources and all the first group of media resources have been loaded.

[0268] Optional examples of this implementation scheme can be found in the examples shown in the above target interface display method, which will not be repeated here.

[0269] As an optional solution, the above-mentioned device further includes:

[0270] The second acquisition unit is used to acquire resource description information corresponding to the target interface in response to the acquisition interface display instruction after acquiring the interface display instruction. The resource description information is used to describe the resource attributes of the media resources contained in the target interface, and the resource attributes include the resource size.

[0271] The first determining unit is used to determine the media resource set, the first group of media resources, and the second group of media resources based on the resource description information.

[0272] Optional examples of this implementation scheme can be found in the examples shown in the above target interface display method, which will not be repeated here.

[0273] As an optional solution, the above-mentioned device further includes:

[0274] The second determining unit is used to determine, after obtaining the interface display instruction, the media resources in the media resource set whose resource type is a preset resource type and whose resource size is greater than a preset threshold as the first group of media resources.

[0275] Optional examples of this implementation scheme can be found in the examples shown in the above target interface display method, which will not be repeated here.

[0276] As an optional solution, the above-mentioned device further includes:

[0277] The startup unit is used to initiate the serialization operation of each media resource in the target interface container during the process of building the resource package corresponding to the target interface before obtaining the interface display instruction. The target interface container is the interface container corresponding to the target interface.

[0278] The first execution unit is used to perform an unbinding operation on the target media resource bound to the target interface container. The resource type of the target media resource is a preset resource type. The unbinding operation is used to remove the association between the displayed target interface and the loaded target media resource.

[0279] The second execution unit is used to perform serialization operations on the target media resources after the unbinding operation is performed.

[0280] Optional examples of this implementation scheme can be found in the examples shown in the above target interface display method, which will not be repeated here.

[0281] As an optional approach, the target media resource is bound to a target component within the target interface container; the first execution unit includes:

[0282] The assignment module is used to assign the target resource path of the target media resource to the asynchronous loading variable of the target component. The asynchronous loading variable is used to indicate that the target media resource is loaded asynchronously when the target interface is displayed.

[0283] The clearing module is used to clear the synchronous loading variables of the target component, so as to sever the association between displaying the target interface and loading the target media resources. The synchronous loading variables are used to indicate that the target media resources are loaded synchronously when the target interface is displayed.

[0284] Optional examples of this implementation scheme can be found in the examples shown in the above target interface display method, which will not be repeated here.

[0285] As an optional solution, the above-mentioned device further includes:

[0286] The third execution unit is used to perform serialization operations on the alternative media resource when the target media resource has a corresponding alternative media resource. The alternative media resource is used to replace the target media resource in the display area corresponding to the target media resource in the target interface.

[0287] Optional examples of this implementation scheme can be found in the examples shown in the above target interface display method, which will not be repeated here.

[0288] According to another aspect of the embodiments of this application, an electronic device for implementing the above-described display method for the target interface is also provided. This electronic device may be... Figure 1 The terminal device or server shown. This embodiment uses this electronic device as an example for illustration. Figure 17 As shown, the electronic device includes a memory 1702 and a processor 1704. The memory 1702 stores a computer program, and the processor 1704 is configured to execute the steps of any of the above method embodiments via the computer program.

[0289] Optionally, in this embodiment, the aforementioned electronic device may be located in at least one of a plurality of network devices in a computer network.

[0290] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:

[0291] S1, obtain the interface display instruction, wherein the interface display instruction is used to request the display of the target interface;

[0292] S2, if there is a first group of media resources in the media resource set to be loaded in the target interface, in response to the interface display instruction, load the second group of media resources in the media resource set other than the first group of media resources, wherein the resource size of each media resource in the first group of media resources is greater than a preset threshold.

[0293] S3, after the second set of media resources has been loaded, and before the first set of media resources has been fully loaded, display the target interface containing the second set of media resources;

[0294] S4, while displaying the target interface containing the second group of media resources, wait until the first group of media resources is loaded, and then display the first group of media resources in the target interface.

[0295] Alternatively, as those skilled in the art will understand, Figure 17 The structure shown is for illustrative purposes only. Electronic devices can also be smartphones (such as Android phones, iOS phones, etc.), tablets, PDAs, and other terminal devices such as MIDs and PADs. Figure 17 This does not limit the structure of the aforementioned electronic devices. For example, the electronic device may also include components that are more... Figure 17 The more or fewer components shown (such as network interfaces, etc.), or having the same Figure 17 The different configurations shown.

[0296] The memory 1702 can be used to store software programs and modules, such as the program instructions / modules corresponding to the display method and apparatus of the target interface in this embodiment. The processor 1704 executes various functional applications and data processing by running the software programs and modules stored in the memory 1702, thereby realizing the aforementioned display method of the target interface. The memory 1702 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1702 may further include memory remotely located relative to the processor 1704, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Specifically, the memory 1702 may be used, but is not limited to, for serializing files and compiling files, etc. As an example, such as... Figure 17As shown, the memory 1702 may include, but is not limited to, the first acquisition unit 1602, the first loading unit 1604, the first display unit 1606, and the second display unit 1608 in the display device of the target interface. Furthermore, it may include, but is not limited to, other module units in the display device of the target interface, which will not be described further in this example.

[0297] Optionally, the transmission device 1706 described above is used to receive or send data via a network. Specific examples of the network described above may include wired networks and wireless networks. In one example, the transmission device 1706 includes a Network Interface Controller (NIC), which can be connected to other network devices and a router via a network cable to communicate with the Internet or a local area network. In another example, the transmission device 1706 is a radio frequency (RF) module, used for wireless communication with the Internet.

[0298] In addition, the aforementioned electronic device also includes: a display 1708 for displaying a target interface; and a connection bus 1710 for connecting various module components in the aforementioned electronic device.

[0299] In other embodiments, the aforementioned terminal device or server can be a node in a distributed system, wherein the distributed system can be a blockchain system, which is a distributed system formed by connecting multiple nodes through network communication. The nodes can form a peer-to-peer (P2P) network, and any form of computing device, such as a server, terminal, or other electronic device, can become a node in the blockchain system by joining this peer-to-peer network.

[0300] According to one aspect of this application, a computer program product is provided, comprising a computer program / instructions containing program code for performing the methods shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via communication section 1809, and / or installed from removable media 1811. When the computer program is executed by central processing unit 1801, it performs various functions provided in the embodiments of this application. The above embodiment numbers are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0301] Figure 18 A schematic block diagram of a computer system architecture for implementing embodiments of the present application is shown. Figure 18As shown, the computer system 1800 includes a central processing unit (CPU) 1801, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 1802 or programs loaded from storage section 1808 into random access memory (RAM). The RAM 1803 also stores various programs and data required for system operation. The CPU 1801, ROM 1802, and RAM 1803 are interconnected via a bus 1804. An input / output interface 1805 (I / O interface) is also connected to the bus 1804.

[0302] The following components are connected to the input / output interface 1805: an input section 1806 including a keyboard, mouse, etc.; an output section 1807 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1808 including a hard disk, etc.; and a communication section 1809 including a network interface card such as a local area network card, modem, etc. The communication section 1809 performs communication processing via a network such as the Internet. A drive 1810 is also connected to the input / output interface 1805 as needed. Removable media 1811, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on the drive 1810 as needed so that computer programs read from them can be installed into the storage section 1808 as needed.

[0303] Specifically, according to embodiments of this application, the processes described in the various method flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a 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 section 1809, and / or installed from removable medium 1811. When the computer program is executed by central processing unit 1801, it performs various functions defined in the system of this application.

[0304] It should be noted that, Figure 18 The computer system 1800 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0305] According to one aspect of this application, a computer-readable storage medium is provided, from which a processor of a computer device reads computer instructions, and the processor executes the computer instructions, causing the computer device to perform the methods provided in various optional implementations of the above embodiments.

[0306] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:

[0307] S1, obtain the interface display instruction, wherein the interface display instruction is used to request the display of the target interface;

[0308] S2, if there is a first group of media resources in the media resource set to be loaded in the target interface, in response to the interface display instruction, load the second group of media resources in the media resource set other than the first group of media resources, wherein the resource size of each media resource in the first group of media resources is greater than a preset threshold.

[0309] S3, after the second set of media resources has been loaded, and before the first set of media resources has been fully loaded, display the target interface containing the second set of media resources;

[0310] S4, while displaying the target interface containing the second group of media resources, wait until the first group of media resources is loaded, and then display the first group of media resources in the target interface.

[0311] Optionally, in this embodiment, those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0312] If the integrated units in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in the aforementioned computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.

[0313] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0314] In the several embodiments provided in this application, it should be understood that the disclosed client can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between units or modules, and may be electrical or other forms.

[0315] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0316] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or at least two units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0317] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for displaying a target interface, characterized in that, include: Obtain an interface display instruction, wherein the interface display instruction is used to request the display of a target interface; If a first group of media resources exists in the media resource set to be loaded in the target interface, in response to the interface display instruction, a second group of media resources other than the first group of media resources is loaded from the media resource set, wherein the resource size of each media resource in the first group of media resources is greater than a preset threshold. When the second group of media resources has been loaded and there is a first group of alternative resources for the first group of media resources, the first group of alternative resources is loaded in response to the interface display instruction. The first group of alternative resources is used to replace the first group of media resources in the display area of ​​the target interface corresponding to the first group of media resources when the first group of media resources has not been loaded. After loading the second group of media resources and the first group of alternative resources, but before the first group of media resources has been fully loaded, the target interface containing the second group of media resources and the first group of alternative resources is displayed. When the target interface containing the second set of media resources and the first set of alternative resources has been displayed, and the first set of media resources has been loaded, the first set of alternative resources in the target interface is replaced with the first set of media resources.

2. The method according to claim 1, characterized in that, The method further includes: Load the first set of media resources, wherein the first set of media resources is loaded in response to the interface display instruction, or loaded after the target interface is displayed.

3. The method according to claim 1, characterized in that, After loading a second group of media resources from the media resource set other than the first group of media resources in response to the interface display instruction, the method further includes: After the second group of media resources has been loaded and the third group of media resources in the first group of media resources has been loaded, the target interface containing the second group of media resources and the third group of media resources is displayed. When the target interface containing the second group of media resources and the third group of media resources is displayed, the fourth group of media resources (excluding the third group of media resources) is displayed on the target interface after the fourth group of media resources is loaded.

4. The method according to claim 3, characterized in that, After obtaining the interface display instruction, the method further includes: In response to the interface display instruction, the first group of media resources is located in memory, wherein the third group of media resources includes the historical media resources located in memory from the first group of media resources.

5. The method according to claim 4, characterized in that, After obtaining the interface display instruction, the method further includes: In response to the interface display instruction, other media resources in the first group of media resources, excluding the historical media resources, are loaded. The third group of media resources also includes media resources that have been loaded when the second group of media resources is loaded.

6. The method according to claim 4, characterized in that, After obtaining the interface display instruction, the method further includes: if there is a second alternative resource in the second media resource other than the historical media resource in the first group of media resources, in response to the interface display instruction, loading the second alternative resource, wherein the second alternative resource is used to replace the second media resource for display in the second display area corresponding to the second media resource in the target interface; The step of displaying the target interface containing the second group of media resources and the third group of media resources when the second group of media resources has been loaded and the third group of media resources in the first group of media resources has been loaded includes: when the second group of media resources and the second alternative resource have been loaded, the third group of media resources has been loaded and the third group of media resources does not include the second media resources, the target interface containing the second group of media resources, the third group of media resources and the second alternative resource has been displayed.

7. The method according to claim 6, characterized in that, When displaying the target interface containing the second group of media resources and the third group of media resources, after the fourth group of media resources (excluding the third group of media resources) from the first group of media resources has been loaded, the fourth group of media resources is displayed in the target interface, including: When the target interface containing the second group of media resources, the third group of media resources, and the second alternative resource is displayed, after the second media resource has finished loading, the second media resource is used to replace the second alternative resource and is displayed on the second display area, wherein the fourth group of media resources includes the second media resource.

8. The method according to claim 1, characterized in that, After loading a second group of media resources from the media resource set other than the first group of media resources in response to the interface display instruction, the method further includes: After the second group of media resources has been loaded and all the first group of media resources have been loaded, the target interface containing the second group of media resources and the first group of media resources is displayed.

9. The method according to claim 1, characterized in that, After obtaining the interface display instruction, the method further includes: In response to the interface display instruction, resource description information corresponding to the target interface is obtained, wherein the resource description information is used to describe the resource attributes of the media resources contained in the target interface, and the resource attributes include resource size; Based on the resource description information, the media resource set, the first group of media resources, and the second group of media resources are determined.

10. The method according to any one of claims 1 to 9, characterized in that, After obtaining the interface display instruction, the method further includes: Media resources in the media resource set that have a preset resource type and a resource size greater than the preset threshold are identified as the first group of media resources.

11. The method according to claim 10, characterized in that, Before obtaining the interface display instruction, the method further includes: During the process of constructing the resource package corresponding to the target interface, the serialization operation of each media resource in the target interface container is initiated, wherein the target interface container is the interface container corresponding to the target interface; Perform an unbinding operation on the target media resource bound to the target interface container, wherein the resource type of the target media resource is a preset resource type, and the unbinding operation is used to remove the association between displaying the target interface and loading the target media resource; Perform a serialization operation on the target media resource after the unbinding operation is performed.

12. The method according to claim 11, characterized in that, The target media resource is bound to a target component within the target interface container; the unbinding operation of the target media resource bound to the target interface container includes: Assign the target resource path of the target media resource to the asynchronous loading variable of the target component, wherein the asynchronous loading variable is used to indicate that the target media resource is loaded asynchronously when the target interface is displayed; Clear the synchronization loading variable of the target component to remove the association between displaying the target interface and loading the target media resource. The synchronization loading variable is used to indicate that the target media resource is loaded synchronously when the target interface is displayed.

13. The method according to claim 11, characterized in that, The method further includes: If the target media resource has a corresponding alternative media resource, a serialization operation is performed on the alternative media resource, wherein the alternative media resource is used to replace the target media resource for display in the display area corresponding to the target media resource in the target interface.

14. A display device for a target interface, characterized in that, include: The first acquisition unit is used to acquire an interface display instruction, wherein the interface display instruction is used to request the display of a target interface; The first loading unit is configured to, in response to the interface display instruction, load a second group of media resources in the media resource set other than the first group of media resources when a first group of media resources exists in the media resource set to be loaded in the target interface, wherein the resource size of each media resource in the first group of media resources is greater than a preset threshold. The first display unit is configured to display the target interface containing the second group of media resources and the first group of alternative resources when the second group of media resources and the first group of alternative resources have been loaded, but the first group of media resources have not been fully loaded. The second display unit is configured to replace the first set of alternative resources in the target interface with the first set of media resources when the target interface containing the second set of media resources and the first set of alternative resources has been displayed and the first set of media resources has been loaded. The device is further configured to, in response to the interface display instruction, load a second group of media resources other than the first group of media resources in the media resource set, and after loading the second group of media resources is completed and a first group of alternative resources exists for the first group of media resources, load the first group of alternative resources in response to the interface display instruction, wherein the first group of alternative resources is used to replace the first group of media resources in the display area corresponding to the first group of media resources in the target interface when the first group of media resources has not been fully loaded.

15. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program, when executed, performs the method of any one of claims 1 to 13.

16. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method described in any one of claims 1 to 13.

17. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method of any one of claims 1 to 13 through the computer program.

Citation Information

Patent Citations

  • Page resource loading method and system

    CN110347446A

  • Game map storage method and device and game map display method and device

    CN111603768A