Resource loading method, device and electronic equipment

By preloading UI resources and loading them when conditions are met, the problem of excessively long UI loading times in the game is solved, improving game smoothness and user experience.

CN112386916BActive Publication Date: 2024-11-08NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011391533.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-01
Publication Date
2024-11-08
Estimated Expiration
2040-12-01

AI Technical Summary

Technical Problem

The current game's UI loading time is too long, causing game lag and reducing the player's gaming experience.

Method used

After the user clicks the interface entry control, the interface resources of the associated interface are preloaded and stored in memory, and the interface resources are loaded again when the touch operation meets the conditions.

Benefits of technology

It reduces interface loading time, avoids interface lag, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112386916B_ABST
    Figure CN112386916B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device and electronic device for resource loading, which relates to the technical field of interface interaction. The method includes: responding to a touch operation acting on an interface entry control, preloading interface resources of an associated interface of the interface entry control, and storing the interface resources in a preset memory, wherein the interface resources include image resources and element node information; responding to the end of the touch operation, and when it is determined that the touch operation meets the preset resource loading conditions, obtaining the interface resources from the preset memory, and loading the interface resources on a graphical user interface to obtain the associated interface of the interface entry control. The method, device and electronic device for resource loading provided by the present invention can preload interface resources in a preset memory, reduce the loading time when opening the associated interface to a certain extent, effectively avoid the phenomenon of interface freeze, and improve the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of interface interaction, and in particular to a resource loading method, device and electronic device. Background Art

[0002] User interface, or UI for short, is the medium for players to interact with the game and exchange information. In current games, not all UI interfaces are displayed on the screen at the same time. Instead, a button is used as the entrance to the interface, called an interface entry button. When a player clicks the interface entry button, a fixed interface will be opened. In order to prevent players from operating by mistake, most interface entry buttons will not open the corresponding interface immediately when they are clicked, but will open the corresponding interface when the player's finger leaves the interface entry button. However, for games, the UI interface itself usually has large texture resources or complex animations, so that the entire interface opening process will consume more time to load resources, resulting in the entire UI interface opening time being delayed, making the game appear to be stuck, and reducing the player's gaming experience. Summary of the invention

[0003] In view of this, an object of the present invention is to provide a method, device and electronic device for resource loading to alleviate the above technical problems.

[0004] In a first aspect, an embodiment of the present invention provides a method for resource loading, comprising: in response to a touch operation acting on an interface entry control, preloading interface resources of an associated interface of the interface entry control, and storing the interface resources in a preset memory, wherein the interface resources include image resources and element node information; in response to the end of the touch operation, and when it is determined that the touch operation meets a preset resource loading condition, obtaining the interface resources from the preset memory, and loading the interface resources on a graphical user interface to obtain the associated interface of the interface entry control.

[0005] In a preferred embodiment, after the above-mentioned response to the end of the touch operation, it also includes: detecting whether the end position of the touch operation is within the touch area corresponding to the interface entry control; if so, determining that the touch operation meets the preset resource loading conditions; if not, determining that the touch operation does not meet the preset resource loading conditions.

[0006] In a preferred implementation, the above-mentioned storing the interface resources in a preset memory includes: if the interface resources are preloaded, encapsulating the interface resources into an object; and storing the object in the preset memory.

[0007] In a preferred embodiment, the above-mentioned step of obtaining the interface resources from the preset memory and loading the interface resources on the graphical user interface to obtain the associated interface of the interface entry control includes: obtaining the object from the preset memory; loading the interface resources encapsulated in the object on the graphical user interface to obtain the associated interface of the interface entry control.

[0008] In a preferred embodiment, the step of loading the interface resources on a graphical user interface to obtain the associated interface of the interface entry control further includes: if the preloading of the interface resources is not completed, loading the interface resources on the graphical user interface in a descending order of preset priorities to obtain the associated interface of the interface entry control; wherein the priority of the element node information is higher than the priority of the image resource.

[0009] In a preferred embodiment, the step of preloading the interface resources of the associated interface of the interface entry control includes: searching for the image resources of the associated interface of the interface entry control in a pre-stored image resource mapping file, and searching for the element node information of the associated interface of the interface entry control in a pre-configured element database.

[0010] In a preferred embodiment, the method further includes: if it is determined that the touch operation does not meet a preset resource loading condition, deleting the preloaded interface resource to release the memory.

[0011] In a preferred embodiment, the method further comprises: in response to a touch operation on an interface entry control, displaying a range of the touch area at a position corresponding to the interface entry control, and indicating the touch area.

[0012] In a preferred embodiment, the step of preloading interface resources of the associated interface of the interface entry control further includes: if there are multiple associated interfaces of the interface entry control, displaying a selection control of the associated interface on the graphical user interface; in response to a selection operation acting on the selection control, preloading interface resources of the associated interface corresponding to the selection operation; wherein the associated interface includes at least one group of preset combinations of interfaces.

[0013] In a second aspect, an embodiment of the present invention provides a device for loading resources, comprising: a preloading module, for responding to a touch operation acting on an interface entry control, preloading interface resources of an associated interface of the interface entry control, and storing the interface resources in a preset memory, wherein the interface resources include image resources and element node information; a loading module, for responding to the end of the touch operation, and when determining that the touch operation meets a preset resource loading condition, obtaining the interface resources from the preset memory, and loading the interface resources on a graphical user interface to obtain the associated interface of the interface entry control.

[0014] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in the first aspect when executing the computer program.

[0015] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described in the first aspect are executed.

[0016] The embodiments of the present invention bring the following beneficial effects:

[0017] The resource loading method, device and electronic device provided in the embodiments of the present invention can respond to the touch operation acting on the interface entry control, preload the interface resources of the associated interface of the interface entry control, and store the interface resources in a preset memory, and then in further response to the end of the touch operation and when it is determined that the touch operation meets the preset resource loading conditions, the above-mentioned interface resources can be directly obtained from the preset memory, and the interface resources can be loaded on the graphical user interface to obtain the associated interface of the interface entry control. The above-mentioned method of preloading interface resources in the preset memory can reduce the loading time when opening the associated interface to a certain extent, effectively avoid the phenomenon of interface freeze, and improve the user experience.

[0018] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.

[0019] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.

[0021] Figure 1 A flowchart of a resource loading method provided by an embodiment of the present invention;

[0022] Figure 2 A schematic diagram of a touch operation provided by an embodiment of the present invention;

[0023] Figure 3 A schematic diagram of another touch operation provided by an embodiment of the present invention;

[0024] Figure 4 A flowchart of another resource loading method provided by an embodiment of the present invention;

[0025] Figure 5 A schematic diagram of the structure of a resource loading device provided by an embodiment of the present invention;

[0026] Figure 6 A schematic diagram of the structure of another resource loading device provided by an embodiment of the present invention;

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

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

[0029] In current games, not all UI interfaces are displayed on the screen at the same time. Instead, an interface entry button is used as the interface entrance. When the player clicks the interface entry button, a fixed interface will be opened. In order to prevent players from operating by mistake, most interface entry buttons will not open the corresponding interface immediately when they are clicked. Instead, the corresponding interface will be opened when the player's finger leaves the interface entry button. If the player clicks the interface entry button and finds that he has touched it by mistake, he can move his finger away from the interface entry button and then let go. At this time, it will be judged that the player has canceled the operation. However, if the opened UI interface itself has a large texture resource or complex game animation, it will take a lot of time to load the resources or game animation when the entire interface is opened, which will delay the opening time of the entire interface, making the game appear to be stuck, reducing the player's gaming experience.

[0030] Based on this, a resource loading method, device and electronic device provided by the embodiments of the present invention can effectively alleviate the above technical problems.

[0031] To facilitate understanding of this embodiment, a resource loading method disclosed in an embodiment of the present invention is first introduced in detail.

[0032] In a possible implementation, an embodiment of the present invention provides a method for loading resources, which is run on a terminal device, which can be a network device or a local device. When the method is run on a network device, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device.

[0033] Specifically, in an optional implementation, various cloud applications, such as cloud games, can be run under the cloud interaction system. Taking cloud games as an example, cloud games refer to a game mode based on cloud computing. In the operation mode of cloud games, the operating body of the game program and the main body of the game screen presentation are separated. The storage and operation of the above-mentioned resource loading method are completed on the cloud game server. The role of the client device is used for receiving and sending data and presenting the game screen. For example, the client device can be a display device with data transmission function close to the user side, such as a mobile terminal, a TV, a computer, a handheld computer, etc.; but the terminal device for information processing is a cloud game server in the cloud. When playing the game, the player operates the client device to send an operation instruction to the cloud game server. The cloud game server runs the game according to the operation instruction, encodes and compresses the game screen and other data, and returns it to the client device through the network. Finally, the client device decodes and outputs the game screen.

[0034] In an optional embodiment, the terminal device may be a local terminal device. Taking a game as an example, the local terminal device stores a game program and is used to present a game screen. The local terminal device is used to interact with the player through a graphical user interface, that is, the game program is downloaded and installed by an electronic device and run conventionally. The local terminal device may provide the graphical user interface to the player in a variety of ways, for example, it may be rendered and displayed on a display screen of the terminal, or provided to the player through a holographic projection. For example, the local terminal device may include a display screen and a processor, the display screen is used to present a graphical user interface, the graphical user interface includes a game screen, and the processor is used to run the game, generate a graphical user interface, and control the display of the graphical user interface on the display screen.

[0035] For the resource loading method of the embodiment of the present invention, a graphical user interface can be provided through the above-mentioned terminal device, and the content displayed by the graphical user interface includes part of the game scene or the game interface, and an interface entry control, and the interface entry control is usually the entrance to at least one interface. For example, after the user clicks on this interface entry control, another UI interface can be opened. The corresponding UI interface can be the interface of any game scene, such as the backpack interface of a virtual character in the game, etc., and can be specifically set according to actual usage, and the embodiment of the present invention does not limit this.

[0036] Specifically, Figure 1 A flowchart of a resource loading method is shown, the method comprising the following steps:

[0037] Step S102, in response to a touch operation on an interface entry control, pre-loading interface resources of an interface associated with the interface entry control, and storing the interface resources in a preset memory;

[0038] The above interface resources include picture resources and element node information;

[0039] In actual use, it is considered that the interface usually includes two parts, one is the image resources referenced by the interface, such as png or jpg, and the other is the element node information, which is used to describe the information of each element of the interface, such as how many buttons and text boxes there are on the interface, where these buttons are arranged in the text box, etc. Therefore, the corresponding image resources and element node information need to be loaded during preloading in the above step S102.

[0040] Furthermore, the above-mentioned interface entry control refers to a control that can open another UI interface after touching this control. The corresponding UI interface can also be any interface, for example, a backpack control in a game. After the user touches the backpack control, he can enter the backpack interface, and so on.

[0041] In specific implementation, the above-mentioned interface entry control can be directly set to the form of a button, and displayed with a corresponding icon, such as the above-mentioned backpack control, etc., which is set on the graphical user interface. In addition to the above-mentioned backpack, the above-mentioned interface entry control can also be any virtual item in the game scene, such as flowers, weapons, etc., which can open the corresponding interface when the user touches it.

[0042] Step S104, in response to the touch operation ending, and when it is determined that the touch operation meets the preset resource loading condition, the above interface resources are obtained from the preset memory, and the interface resources are loaded on the graphical user interface to obtain the associated interface of the interface entry control.

[0043] In actual use, the above-mentioned preset resource loading conditions are usually conditions that need to be met by pre-configured touch operations. Through this step S104, it can be determined first that the touch operation meets the preset resource loading conditions, and then the interface resources are obtained from the preset memory. The player's cancel operation can be supported when the interface is loaded, that is, the interface resources are obtained only when the touch operation meets the preset resource loading conditions. If the touch operation does not meet the preset resource loading conditions, the process of obtaining the interface resources is canceled, thereby improving user operability.

[0044] The resource loading method provided in the embodiment of the present invention can respond to the touch operation acting on the interface entry control, preload the interface resources of the associated interface of the interface entry control, and store the interface resources in a preset memory, and then in further response to the end of the touch operation and when it is determined that the touch operation meets the preset resource loading conditions, it can directly obtain the above-mentioned interface resources from the preset memory, and load the interface resources on the graphical user interface to obtain the associated interface of the interface entry control. The above-mentioned method of preloading interface resources in the preset memory can reduce the loading time when opening the associated interface to a certain extent, effectively avoid the phenomenon of interface freeze, and improve the user experience.

[0045] In actual use, the above-mentioned interface entry control can usually have one or more associated interfaces. When there is one associated interface, the interface resources of the associated interface can be directly preloaded. If there are multiple associated interfaces of the interface entry control, a selection control of the associated interface can be displayed on the graphical user interface in response to a touch operation on the interface entry control; then, the interface to be loaded can be selected in response to the selection operation on the selection control, and then the interface resources of the associated interface corresponding to the selection operation can be preloaded.

[0046] Furthermore, the above-mentioned associated interface usually includes at least one group of preset combination interfaces. Taking the above-mentioned interface entry control as a backpack in the game as an example, assuming that the backpack is pre-configured with an associated interface, therefore, after the user touches the backpack control, the backpack's background interface, the backpack's inventory interface, the backpack's currency interface, etc. can be opened at the same time. These interfaces are combined into a group of known fixed combination interfaces, and touching the above-mentioned backpack control indicates that the user wants to open this group of fixed combination interfaces. Therefore, the above-mentioned interface resources obtained usually include the resources of all interfaces in the above-mentioned fixed combination interfaces. The specific combination of associated interfaces can be configured according to actual usage.

[0047] Furthermore, the above touch operation may be a click or a long press, and may be specifically set according to actual usage, which is not limited in the embodiment of the present invention.

[0048] In actual use, the process of the above touch operation can usually be divided into three steps: the first step is that the user touches the above interface entry control, which is equivalent to the start of the touch operation; the second step is that the user maintains the touch state, that is, the touch operation is always applied to the graphical user interface; the third step is the end of the touch operation. Since the above touch operation is an operation performed by the user on the graphical user interface of the terminal device, the terminal device can monitor the process of the above touch operation. Moreover, by monitoring the process of the touch operation, it can be determined whether the touch operation meets the above preset resource loading conditions.

[0049] For ease of understanding, the touch operation is taken as a click operation, and the terminal device is an intelligent device that supports a touch screen as an example to explain the process of the touch operation. The first step is that the user's finger touches the interface entry control, which is equivalent to the start of this touch operation. Specifically, Figure 2 A schematic diagram of a touch operation shown in FIG. 1 includes a portion of a game scene and an interface entry control in the game scene. Figure 2 When the user clicks on the above interface entry control, the touch operation can be responded to and the process of preloading the interface resources of the associated interface of the interface entry control in the above step S102 is executed.

[0050] Further, based on Figure 2 The second step of the touch operation is that the user's finger stays on the graphical user interface and can move the finger on the graphical user interface at will; the third step is that the user's finger moves away from the graphical user interface, indicating that the touch operation is completed.

[0051] Specifically, in Figure 2 On the basis of Figure 3A schematic diagram of another touch operation is shown, that is, the situation where the user's finger leaves the interface entry control, indicating that the touch operation is ended. At this time, the terminal device can respond to the end of the touch operation and determine whether the touch operation meets the preset resource loading conditions, so as to further determine whether the interface resource loading process is required.

[0052] Therefore, in Figure 1 On the basis of Figure 4 A flowchart of another resource loading method is shown, and the condition of whether the touch operation meets the resource loading condition is further explained. Specifically, Figure 4 As shown, the following steps are included:

[0053] Step S402, in response to a touch operation on an interface entry control, pre-load interface resources of an interface associated with the interface entry control, and store the interface resources in a preset memory;

[0054] Among them, interface resources include image resources and element node information;

[0055] Specifically, image resources refer to resources that can record all image resources that each interface needs to reference, and are usually saved in a file called an image resource mapping file. When preloading the above interface resources, the image resources needed can be found in the image resource mapping file and then loaded into the computer memory.

[0056] Furthermore, the above-mentioned element node information can also be called UI interface element node information. Each UI interface is organized by nesting elements, and each control and text box is an element. For example, the common .csd file is organized in this way, and records which elements are in the current UI interface, how these elements are arranged, etc. These element node information are usually stored in the database. Therefore, when preloading interface resources, the element node information can also be found and loaded into the computer memory, waiting for call.

[0057] Therefore, in the above step S402, when preloading interface resources, the image resources of the associated interface of the above interface entry control can be searched in the pre-stored image resource mapping file, and the element node information of the associated interface of the above interface entry control can be searched in the pre-configured element database, and the found interface resources can be loaded into the preset memory.

[0058] Step S404, in response to the end of the touch operation, detecting whether the end position of the touch operation is within the touch area corresponding to the interface entry control; if yes, executing step S406; if not, executing step S410;

[0059] Step S406, determining whether the touch operation satisfies a preset resource loading condition;

[0060] Step S408, obtaining interface resources from a preset memory, and loading the interface resources on a graphical user interface to obtain an associated interface of an interface entry control;

[0061] For ease of understanding, Figure 3 Take the end of the touch operation as an example to explain. Figure 3 In the figure, the box outside the interface entry control represents the touch area corresponding to the interface entry control. The touch area is the effective area acting on the interface entry control. If the touch operation ends and the finger leaves the interface entry control, but the finger still stays in the touch area of ​​the interface entry control, it is considered that the player wants to open the corresponding interface; otherwise, it is considered that the player cancels the touch operation, that is, no interface is opened.

[0062] The touch area of ​​the above interface entry control is usually a rectangle that just contains the visible area of ​​the interface entry control, that is, Figure 3 If the rectangular part outside the middle interface entry control is within the rectangle when the finger leaves the graphical user interface, it is regarded as confirmation to open the interface, that is, the touch operation meets the preset resource loading conditions, and step S408 can be continued at this time to further obtain the preloaded interface resources; otherwise, it is regarded as the user canceling this operation, that is, executing the following steps S410 and S412.

[0063] Furthermore, for the convenience of operation, when the user performs a touch operation, it can further respond to the touch operation on the interface entry control, display the range of the above-mentioned touch area at the position corresponding to the interface entry control, and indicate the touch area, such as highlighting it, etc., so that the user can further confirm or cancel the operation.

[0064] Step S410, determining that the touch operation does not meet a preset resource loading condition;

[0065] Step S412, deleting the preloaded interface resources to release memory.

[0066] Specifically, if it is determined that the touch operation does not meet the preset resource loading condition, the preloaded interface resources are deleted to release memory.

[0067] In actual use, in the above step S410, if it is determined that the touch operation does not meet the preset resource loading condition, it means that the user cancels the operation, that is, Figure 3The process ends when the user's finger leaves the interface entry control and is outside the touch area corresponding to the interface entry control. At this time, the preloaded image resources and element node information can be destroyed. If the preloading is not completed at this time, the preloading process can be interrupted immediately, and the preloaded content can be released to end the process.

[0068] Therefore, the time from when the user clicks the interface entry control to when the user leaves the interface entry control can be used to load the interface resources of the interface to be opened in advance, which can reduce the lag caused by resource loading problems. Compared with the traditional mode, when the user uses it, except that the interface loads faster, the functions are exactly the same.

[0069] In actual use, considering that the element node information is loaded very quickly, but the image resource is loaded slowly, therefore, in the above step S402, when the interface resource is stored in the preset memory, if the interface resource has been preloaded, the interface resource can be encapsulated into an object; and then the object is stored in the preset memory. That is, the preloaded interface resource is encapsulated into an object and stored in the computer memory.

[0070] Furthermore, for the interface resources encapsulated into objects, when executing the loading process of the above step S408, the object can be obtained from the preset memory, and then the interface resources encapsulated in the object are loaded on the graphical user interface to obtain the associated interface of the interface entry control.

[0071] Furthermore, when loading the above-mentioned interface resources to obtain the associated interface of the interface entry control, if the interface resource preloading is not completed, the interface resources are loaded on the graphical user interface in a descending order according to the preset priority to obtain the associated interface of the interface entry control.

[0072] Among them, the priority of element node information is higher than the priority of image resources.

[0073] Specifically, the above-mentioned priority is usually set according to the speed of loading. For example, if the element node information loads faster, it can be set to a higher priority, and if the image resource loads slower, it can be set to a lower priority. In this way, if the touch operation is completed in response, and it is determined that the touch operation meets the preset resource loading conditions, and the interface resource preloading is not completed, the above-mentioned element node information can be loaded first. After the element node information is loaded, the interface can be drawn and the animation can be played without the image resources until the image resources are loaded. Then the image resource information is drawn on the graphical user interface, and then the entire interface is loaded and the process ends.

[0074] In summary, the resource loading method provided by the embodiment of the present invention can execute the interface resource preloading process of the associated interface corresponding to the interface entry control in response to the user's touch operation on the interface entry control, and preload the image resources and element node information of the associated interface into the computer memory and save them. In further response to the end of the user's touch operation, it can be determined whether the touch operation is to open the associated interface or cancel the operation. If you want to cancel the operation, you can immediately release the image resources and element node information placed in the computer memory during preloading. If the associated interface is to open the associated interface, the preloaded image resources and element node information can be used to immediately open the associated interface. At this time, there is no need to load the image resources and element node information, so the associated interface will be opened immediately, without waiting for the resource to be loaded, and the interface will be stuck. Finally, even if the user ends the touch operation and leaves the interface entry control, if the image resources or element node information are still not fully loaded, then continue to load on this basis, which saves a certain amount of loading time compared to the method of loading resources at the end of the touch operation in the prior art.

[0075] Therefore, the resource loading method provided by the embodiment of the present invention can start preloading the interface resources of the associated interface when the user touches the interface entry control, rather than starting to load the interface resources when the touch operation ends. Therefore, the time between the user touching the interface entry control and leaving the interface entry control can be used to load the interface resources, reducing the time waiting for resource loading when the user touches the interface entry control to leave the interface, and improving the smoothness of interface loading.

[0076] Furthermore, when the above resource loading method is used in a game, it can also reduce the waiting time for loading the game interface and improve the user's gaming experience.

[0077] Further, corresponding to Figure 1 The resource loading method shown in the embodiment of the present invention also provides a resource loading device, such as Figure 5 A schematic diagram of a structure of a resource loading device is shown, the device includes the following structure:

[0078] A preloading module 50 is used to respond to a touch operation on an interface entry control, preload interface resources of an associated interface of the interface entry control, and store the interface resources in a preset memory, wherein the interface resources include image resources and element node information;

[0079] The loading module 52 is used to respond to the end of the touch operation, and when it is determined that the touch operation meets the preset resource loading condition, obtain the interface resource from the preset memory, and load the interface resource on the graphical user interface to obtain the associated interface of the interface entry control.

[0080] Furthermore, the preloading module 50 is also used to: after responding to the end of the touch operation, detect whether the end position of the touch operation is within the touch area corresponding to the interface entry control; if so, determine that the touch operation meets the preset resource loading conditions; if not, determine that the touch operation does not meet the preset resource loading conditions.

[0081] Furthermore, the preloading module 50 is also used for: if the preloading of the interface resource is completed, encapsulating the interface resource into an object; and storing the object in a preset memory.

[0082] Furthermore, the loading module 52 is also used to: obtain the object from the preset memory; load the interface resource encapsulated in the object on the graphical user interface to obtain the associated interface of the interface entry control.

[0083] Furthermore, the above-mentioned loading module 52 is also used for: if the interface resource preloading is not completed, then the interface resources are loaded on the graphical user interface in a descending order of preset priorities to obtain the associated interface of the interface entry control; wherein, the priority of the element node information is higher than the priority of the image resource.

[0084] Furthermore, the preloading module 50 is also used to search for image resources of the associated interface of the interface entry control in a pre-stored image resource mapping file, and to search for element node information of the associated interface of the interface entry control in a pre-configured element database.

[0085] Further, in Figure 5 On the basis of Figure 6 A schematic diagram of another resource loading device is also shown. Figure 5 In addition to the structure shown, the above device also includes a deleting module 60, and the deleting module 60 is used to: if it is determined that the touch operation does not meet the preset resource loading condition, delete the preloaded interface resource to release the memory.

[0086] Furthermore, the above-mentioned device also includes a display module 62, which is used to respond to the touch operation acting on the interface entry control, display the range of the touch area at the position corresponding to the interface entry control, and indicate the touch area.

[0087] Furthermore, the above-mentioned preloading module 50 is also used for: if there are multiple associated interfaces of the interface entry control, then displaying the selection control of the associated interface on the graphical user interface; in response to the selection operation acting on the selection control, preloading the interface resources of the associated interface corresponding to the selection operation; wherein the associated interface includes at least one group of preset combination interfaces.

[0088] The resource loading device provided in the embodiment of the present invention has the same technical features as the resource loading method provided in the above embodiment, so it can also solve the same technical problems and achieve the same technical effects.

[0089] An embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above Figure 1 The steps of the method are shown.

[0090] Furthermore, an embodiment of the present invention further provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and the computer program is executed by a processor Figure 1 The steps of the method are shown.

[0091] Furthermore, an embodiment of the present invention also provides a schematic diagram of the structure of an electronic device, such as Figure 7 As shown, it is a schematic diagram of the structure of the electronic device, wherein the electronic device includes a processor 71 and a memory 70, the memory 70 stores computer executable instructions that can be executed by the processor 71, and the processor 71 executes the computer executable instructions to implement the above-mentioned resource loading method.

[0092] exist Figure 7 In the illustrated embodiment, the electronic device further includes a bus 72 and a communication interface 73 , wherein the processor 71 , the communication interface 73 and the memory 70 are connected via the bus 72 .

[0093] Among them, the memory 70 may include a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 73 (which can be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. can be used. The bus 72 can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus 72 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0094] The processor 71 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 71 or the instructions in the form of software. The above processor 71 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiment of the present invention can be directly embodied as a hardware decoding processor to be executed, or the hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor 71 reads the information in the memory and completes the resource loading method of the above-mentioned embodiment in combination with its hardware.

[0095] The resource loading method, device and computer program product of the electronic device provided in the embodiments of the present invention include a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the method described in the previous method embodiments. The specific implementation can be found in the method embodiments and will not be repeated here.

[0096] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0097] In addition, in the description of the embodiments of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, and it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0098] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.

[0099] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.

[0100] Finally, it should be noted that the above embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above embodiments, those skilled in the art should understand that any person skilled in the art can still modify the technical solutions recorded in the above embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A method for loading resources, characterized in that: include: In response to a touch operation on an interface entry control, preload interface resources of an interface associated with the interface entry control, and store the interface resources in a preset memory, wherein the interface resources include image resources and element node information; In response to the touch operation ending, and when it is determined that the touch operation satisfies a preset resource loading condition, the interface resource is obtained from the preset memory, and the interface resource is loaded on the graphical user interface to obtain an associated interface of the interface entry control, and when the touch operation does not satisfy the resource loading condition, the interface resource is cancelled from the memory; In response to the touch operation ending, the method further includes: Detecting whether the end position of the touch operation is within the touch area corresponding to the interface entry control; If yes, determining that the touch operation satisfies a preset resource loading condition; If not, determining that the touch operation does not meet a preset resource loading condition; The method further comprises: If it is determined that the touch operation does not meet the preset resource loading condition, the preloaded interface resource is deleted to release the memory.

2. The method according to claim 1, characterized in that Storing the interface resource in a preset memory includes: If the interface resource is preloaded, encapsulate the interface resource into an object; The object is stored in a preset memory.

3. The method according to claim 2, characterized in that The steps of acquiring the interface resource from the preset memory and loading the interface resource on a graphical user interface to obtain an associated interface of the interface entry control include: Obtaining the object from the preset memory; The interface resource encapsulated in the object is loaded on the graphical user interface to obtain an associated interface of the interface entry control.

4. The method according to claim 2, characterized in that: The step of loading the interface resource on the graphical user interface to obtain the associated interface of the interface entry control also includes: If the preloading of the interface resources is not completed, the interface resources are loaded on the graphical user interface in a descending order of preset priorities to obtain an associated interface of the interface entry control; Among them, the priority of the element node information is higher than the priority of the image resource.

5. The method according to claim 1, characterized in that The step of preloading the interface resources of the associated interface of the interface entry control includes: The image resource of the associated interface of the interface entry control is searched in a pre-stored image resource mapping file, and the element node information of the associated interface of the interface entry control is searched in a pre-configured element database.

6. The method according to claim 2, characterized in that The method further comprises: In response to a touch operation on an interface entry control, a range of the touch area is displayed at a position corresponding to the interface entry control to indicate the touch area.

7. According to the method of claim 1, the step of preloading the interface resources of the associated interface of the interface entry control further comprises: If there are multiple associated interfaces of the interface entry control, displaying a selection control of the associated interfaces on the graphical user interface; In response to a selection operation on the selection control, preloading an interface resource of the associated interface corresponding to the selection operation; Wherein, the associated interface includes at least one group of preset combination interfaces.

8. A resource loading device, characterized in that: include: A preloading module, used to respond to a touch operation on an interface entry control, preload interface resources of an associated interface of the interface entry control, and store the interface resources in a preset memory, wherein the interface resources include image resources and element node information; A loading module, for responding to the end of the touch operation, and when determining that the touch operation meets the preset resource loading condition, obtaining the interface resource from the preset memory, and loading the interface resource on the graphical user interface to obtain the associated interface of the interface entry control, and when the touch operation does not meet the resource loading condition, canceling the acquisition of the interface resource from the memory; The preloading module is further used to, in response to the touch operation ending, detect whether the end position of the touch operation is within the touch area corresponding to the interface entry control; if yes, determine that the touch operation meets the preset resource loading condition; if no, determine that the touch operation does not meet the preset resource loading condition; The device also includes: The deleting module is used to delete the preloaded interface resources to release the memory if it is determined that the touch operation does not meet the preset resource loading condition.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are executed.