Page display method and device and computer readable storage medium

By storing H5 page resources corresponding to multiple controls in the private directory of the software and loading these resources in the webview component, the memory usage problem caused by multiple webview components in the existing technology is solved, and more efficient page display and memory are achieved. manage.

CN119356671APending Publication Date: 2025-01-24SHENZHEN WORKEC TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411256618.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-09
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

When existing software displays multiple pages, it needs to use multiple webview components, resulting in an increase in memory footprint.

Method used

By storing H5 page resources corresponding to multiple controls in the private directory of the software, and loading these resources in the webview component to display the page, the dependence on the webview cache is reduced and the use of multiple webview components is avoided.

Benefits of technology

Effectively reduce the memory occupation of the software display page, and improve the speed and system performance of the page loading.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119356671A_ABST
    Figure CN119356671A_ABST
Patent Text Reader

Abstract

The invention provides a page display method and device and a computer readable storage medium, relates to the technical field of computers, and can reduce memory occupied when software displays a page. The method comprises the steps of obtaining a target URL of a target H5 page corresponding to a target control in response to a control triggering operation of a user on the target control in a plurality of controls of software; under the condition that the target page resource of the target H5 page does not exist in the webview cache of the webview component of the software, loading the target page resource in the private directory of the software through the webview component, and displaying the target H5 page; the private directory comprises page resources of the H5 page corresponding to each control in the plurality of controls, and the webview component is used for displaying the H5 page corresponding to any one of the plurality of controls.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a page display method, device and computer-readable storage medium. Background Art

[0002] When users control the pages of the software, they can jump to the page corresponding to the control by clicking the control in the page. For example, taking WeChat software as an example, the main page of WeChat software includes the "WeChat" control, "Contacts" control, "Discover" control, and "Me" control. After the user clicks the "Discover" control, he can jump to the discovery page corresponding to the "Discover" control.

[0003] Software can use webview components to display pages. In existing solutions, software usually uses different webview components to display different pages, that is, the software needs to use multiple webview components to display multiple pages. Since webview components need to occupy memory, the more pages the software has and the more webview components it has, the more memory the software occupies. Summary of the invention

[0004] The present application provides a page display method, device and computer-readable storage medium, which can reduce the memory occupied when software displays pages.

[0005] In order to achieve the above objectives, this application adopts the following technical solutions:

[0006] In a first aspect, a page display method is provided, the method comprising: in response to a user triggering operation on a target control among multiple controls of software, obtaining a target URL of a target H5 page corresponding to the target control; when there is no target page resource of the target H5 page in the webview cache of a webview component of the software, loading the target page resource in a private directory of the software through the webview component and displaying the target H5 page; the private directory includes page resources of the H5 page corresponding to each control among multiple controls, and the webview component is used to display the H5 page corresponding to any one of the multiple controls.

[0007] Based on this scheme, in response to the user triggering operation on the target control among the multiple controls of the software, the target URL of the target H5 page corresponding to the target control is obtained. Thereafter, when the target page resource of the target H5 page does not exist in the webview cache of the webview component of the software, the target page resource in the private directory of the software is loaded through the webview component and the target H5 page is displayed. Since the private directory includes the page resources of the H5 page corresponding to each control among the multiple controls, the webview component is used to display the H5 page corresponding to any one of the multiple controls. Therefore, the H5 page corresponding to any one of the multiple controls in the private directory can be displayed through one webview component, without the need to display multiple H5 pages through multiple webview components, thereby reducing the number of webview components used, and since the page resources are stored in the private directory, they will not occupy the webview cache, thereby reducing the memory occupied by the software when displaying the page.

[0008] In combination with the first aspect, in certain embodiments of the first aspect, the method also includes: when there are target page resources of the target H5 page in the webview cache of the webview component of the software, loading the target page resources in the webview cache through the webview component and displaying the target H5 page.

[0009] Based on this solution, when the target page resources of the target H5 page exist in the webview cache of the software's webview component, the target page resources in the webview cache are loaded through the webview component, and the target H5 page is displayed. The target H5 page can be quickly displayed through the webview component, thereby improving the display speed of the target H5 page.

[0010] In combination with the first aspect, in certain embodiments of the first aspect, the target page resources in the private directory of the software are loaded through the webview component and the target H5 page is displayed, including: calling the target js method through the webview component; the target js method is used to load the target page resources into the webview cache and display the target H5 page.

[0011] Based on this solution, since the target js method is used to load the target page resources into the webview cache and display the target H5 page, calling the target js method through the webview component can load the target page resources in the private directory of the software and display the target H5 page.

[0012] In combination with the first aspect, in certain embodiments of the first aspect, the method also includes: in response to the user's startup operation on the software, obtaining the page resources of the H5 page corresponding to each of the multiple controls; storing the page resources of the H5 page corresponding to each of the multiple controls in the private directory of the software.

[0013] Based on this solution, by responding to the user's startup operation on the software, the page resources of the H5 page corresponding to each of the multiple controls are obtained, and then the page resources of the H5 page corresponding to each of the multiple controls are stored in the private directory of the software. Subsequently, there is no need to obtain the page resources of the H5 page through the network, but the page resources of the H5 page can be obtained directly from the private directory, avoiding the impact of network delay on the rate of obtaining page resources, thereby improving the rate of obtaining page resources of the H5 page.

[0014] In combination with the first aspect, in certain embodiments of the first aspect, the method also includes: in response to the user's target operation on the software, obtaining the memory usage percentage of the software; the memory usage percentage is the memory occupied by the software and the total memory of the terminal running the software, the target operation includes a control trigger operation and a state switching operation, the state switching operation is used to switch the running state of the software, and the running state includes running in the foreground of the terminal or running in the background of the terminal; when the memory usage percentage is greater than a preset threshold, storing the static page resource of the first page resource among the multiple page resources cached by the webview in a private directory; the page corresponding to the first page resource is not currently displayed; deleting the first page resource in the webview cache.

[0015] Based on this solution, by responding to the user's target operation on the software, the software's memory usage percentage is obtained, and then, when the memory usage percentage is greater than a preset threshold, the static page resources of the first page resources that are not currently displayed and correspond to the page in the multiple page resources cached by the webview are stored in a private directory, and then the first page resources in the webview cache are deleted. On the one hand, the static page resources of the first page resources are stored in the private directory, and when the page corresponding to the first page resource is displayed again later, there is no need to obtain the static page resources of the first page resources from the network, but the static page resources of the first page resources can be directly obtained from the private directory, thereby improving the speed of obtaining the static page resources of the first page resources; on the other hand, deleting the first page resources can release the memory occupied by the software when the software occupies a large amount of memory.

[0016] In combination with the first aspect, in certain embodiments of the first aspect, the private directory includes a first folder, the first folder includes a second folder, the name of the first folder includes the user ID of the user, the name of the second folder includes the URL corresponding to the first page resource, and the static page resources of the first page resource among the multiple page resources cached by the webview are stored in the private directory, including: storing the static page resources of the first page resource in the second folder.

[0017] Based on this solution, since the private directory includes a first folder, the first folder includes a second folder, the name of the first folder includes the user ID of the user, and the name of the second folder includes the URL corresponding to the first page resource, by storing the static page resources of the first page resource in the second folder, the static page resources of the first page resource can be managed based on the user ID and URL subsequently, which can improve the orderliness of the static page resources storing the first page resource.

[0018] In a second aspect, a page display device is provided for implementing the page display method of the first aspect. The page display device includes a module, unit, or means corresponding to the method, which can be implemented by hardware, software, or by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above functions.

[0019] In combination with the second aspect, in certain embodiments of the second aspect, the device includes: an acquisition module and a processing module; the acquisition module is used to respond to the user's control trigger operation on the target control among multiple controls of the software, and obtain the target URL of the target H5 page corresponding to the target control; the processing module is used to load the target page resources in the private directory of the software through the webview component and display the target H5 page when the target page resources of the target H5 page do not exist in the webview cache of the webview component of the software; the private directory includes page resources of the H5 page corresponding to each control among the multiple controls, and the webview component is used to display the H5 page corresponding to any one of the multiple controls.

[0020] In combination with the second aspect, in certain embodiments of the second aspect, the processing module is also used to: when there are target page resources of the target H5 page in the webview cache of the webview component of the software, load the target page resources in the webview cache through the webview component and display the target H5 page.

[0021] In combination with the second aspect, in certain embodiments of the second aspect, the processing module is used to load the target page resources in the private directory of the software through the webview component and display the target H5 page, including: calling the target js method through the webview component; the target js method is used to load the target page resources into the webview cache and display the target H5 page.

[0022] In combination with the second aspect, in certain embodiments of the second aspect, the processing module is also used to: in response to the user's startup operation on the software, obtain the page resources of the H5 page corresponding to each of the multiple controls; store the page resources of the H5 page corresponding to each of the multiple controls in the private directory of the software.

[0023] In combination with the second aspect, in certain embodiments of the second aspect, the processing module is also used to: obtain the memory usage percentage of the software in response to the user's target operation on the software; the memory usage percentage is the memory occupied by the software and the total memory of the terminal running the software, and the target operation includes a control trigger operation and a state switching operation, and the state switching operation is used to switch the running state of the software, and the running state includes running in the foreground of the terminal or running in the background of the terminal; when the memory usage percentage is greater than a preset threshold, the static page resource of the first page resource among the multiple page resources cached by the webview is stored in a private directory; the page corresponding to the first page resource is not currently displayed; and the first page resource in the webview cache is deleted.

[0024] In combination with the second aspect, in certain embodiments of the second aspect, the private directory includes a first folder, the first folder includes a second folder, the name of the first folder includes the user ID of the user, the name of the second folder includes the URL corresponding to the first page resource, and the processing module is also used to store the static page resources of the first page resource among the multiple page resources cached by the webview to the private directory, including: storing the static page resources of the first page resource to the second folder.

[0025] In a third aspect, a page display device is provided, comprising: at least one processor and a memory for storing instructions executable by the processor; wherein the processor is configured to execute instructions to implement the method provided in the first aspect and any possible implementation manner thereof.

[0026] In a fourth aspect, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of a page display device, the page display device is enabled to execute the method provided in the first aspect and any possible implementation manner thereof.

[0027] In a fifth aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the method provided in the first aspect and any possible implementation manner thereof.

[0028] Among them, the technical effects brought about by any implementation of the second to fifth aspects can refer to the technical effects brought about by different implementations of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 A schematic diagram of the architecture of a page display system provided for this application;

[0030] Figure 2 A flow chart of a page display method provided by this application;

[0031] Figure 3 A flowchart of another page display method provided by the present application;

[0032] Figure 4 A flowchart of another page display method provided by the present application;

[0033] Figure 5 A schematic diagram of the structure of a page display device provided by the present application;

[0034] Figure 6 A schematic diagram of the structure of another page display device provided in the present application. DETAILED DESCRIPTION

[0035] In the description of this application, unless otherwise specified, "plurality" means two or more than two. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.

[0036] In addition, in order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish the same items or similar items with substantially the same functions and effects. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit the difference.

[0037] Meanwhile, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete manner for ease of understanding.

[0038] It is understood that the "embodiment" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, the various embodiments in the entire specification do not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It is understood that in various embodiments of the present application, the size of the sequence number of each process does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.

[0039] It can be understood that in the present application, "when", "if" and "if" all mean that corresponding processing will be carried out under certain objective circumstances, but do not limit the time, nor do they require judgment actions when implementing them, nor do they mean the existence of other limitations.

[0040] It can be understood that some optional features in the embodiments of the present application may be implemented independently in certain scenarios without relying on other features, such as the solution on which they are currently based, to solve corresponding technical problems and achieve corresponding effects, or may be combined with other features according to needs in certain scenarios. Accordingly, the devices provided in the embodiments of the present application may also realize these features or functions accordingly, which will not be elaborated here.

[0041] In this application, unless otherwise specified, the same or similar parts between the various embodiments can refer to each other. In the various embodiments in this application, and the various implementation methods in each embodiment, if there is no special description and logical conflict, the terms and / or descriptions between different embodiments and the various implementation methods in each embodiment are consistent and can be referenced to each other. The technical features in different embodiments and the various implementation methods in each embodiment can be combined to form new embodiments, implementation methods, implementation methods, or implementation methods according to their inherent logical relationships. The following implementation methods of this application do not constitute a limitation on the scope of protection of this application.

[0042] Figure 1 This is a schematic diagram of the architecture of a page display system provided by the present application. The technical solution of the embodiment of the present application can be applied to Figure 1 The page shown shows the system, such as Figure 1As shown, the page display system 10 includes a page display device 11 and an electronic device 12 .

[0043] The page display device 11 is directly or indirectly connected to the electronic device 12. In this connection relationship, a wired connection or a wireless connection may be adopted, which is not limited in the embodiment of the present application.

[0044] Data can be exchanged between the page display device 11 and the electronic device 12 .

[0045] It should be noted that the page display device 11 and the electronic device 12 may be independent devices or integrated into the same device, and this application does not make any specific limitation on this.

[0046] When the page display device 11 and the electronic device 12 are integrated into the same device, for example, integrated into a terminal, the communication between the page display device 11 and the electronic device 12 is the communication between the internal modules of the device. In this case, the communication process between the two is the same as "the communication process between the page display device 11 and the electronic device 12 when they are independent of each other".

[0047] Exemplarily, the terminal in the embodiments of the present application may be a mobile phone, a tablet computer, a wearable device (such as a smart watch), a personal digital assistant (PDA), a laptop computer, a vehicle-mounted device, an Internet of Things device, or the like. The embodiments of the present application do not impose any special restrictions on the specific form of the terminal.

[0048] In the following embodiments provided in the present application, the present application is described by taking the example that the page display device 11 and the electronic device 12 are independently configured.

[0049] In practical applications, the page display method provided in the embodiment of the present application can be applied to the page display device 11, and can also be applied to the device included in the page display device 11.

[0050] The page display method provided in the embodiment of the present application is described below with reference to the accompanying drawings, taking the application of the page display method to the page display device 11 as an example.

[0051] Figure 2 A flow chart of a page display method provided by this application, such as Figure 2 As shown, the method comprises the following steps:

[0052] S201. A page display device obtains a target uniform resource locator (URL) of a target HTML5 (H5) page corresponding to a target control in response to a user's control triggering operation on a target control among a plurality of controls of a software.

[0053] It should be noted that the control can also be called a tab button.

[0054] The control triggering operation may be clicking on the target control or sliding on the target control, and this application does not impose any specific restrictions on this.

[0055] As a possible implementation, combining Figure 1 After the user performs a control trigger operation on a target control among multiple controls of the software, the page display device sends a first request message for requesting a target URL of a target H5 page corresponding to the target control to the electronic device in response to the control trigger operation. Correspondingly, the electronic device receives the first request message from the page display device.

[0056] The electronic device generates a first response message including the target URL of the target H5 page corresponding to the target control, and sends the first response message to the page display device. Correspondingly, the page display device receives the first response message of the electronic device and obtains the target URL of the target H5 page corresponding to the target control from the first response message.

[0057] S202. The page display device determines whether there is a target page resource of a target H5 page in the webview cache of the webview component of the software.

[0058] It should be noted that the webview component is used to display the H5 page corresponding to any one of the multiple controls.

[0059] Page resources may include dynamic page resources or static page resources.

[0060] Static page resources are page resources that are not related to user requests or data, and may include, for example, static page resources such as page HTML files, JS files, and image resources. This application does not impose any specific restrictions on this.

[0061] Dynamic page resources are page resources related to user requests or data dynamics, such as the return value of user requests, which is not specifically limited in this application.

[0062] As a possible implementation method, the page display device determines whether there is a target URL of the target H5 page in the webview cache. If the target URL of the target H5 page exists in the webview cache, it means that the target page resource of the target H5 page exists in the webview cache; if the target URL of the target H5 page does not exist in the webview cache, it means that the target page resource of the target H5 page does not exist in the webview cache.

[0063] When the target page resource of the target H5 page does not exist in the webview cache of the webview component of the software, the page display device executes S203; when the target page resource of the target H5 page exists in the webview cache of the webview component of the software, the page display device executes S204.

[0064] S203: When the target page resource of the target H5 page does not exist in the webview cache of the webview component of the software, the page display device loads the target page resource in the private directory of the software through the webview component and displays the target H5 page.

[0065] The private directory includes page resources of an H5 page corresponding to each of the multiple controls.

[0066] As a possible implementation method, the page display device calls the target js method through the webview component, loads the target page resource in the private directory of the software and displays the target H5 page.

[0067] Among them, the target js method is used to load the target page resources into the webview cache and display the target H5 page.

[0068] The target js method can be expressed as js method (js: page route switching, parameter: target URL). Among them, "js: page route switching" means that the target js method is used to switch the page route, and "parameter: target url)" means that when displaying the target H5 page, the parameter in the target js method is configured as the target URL. This application does not specifically limit the specific content of the target js method.

[0069] Based on this possible implementation, since the target js method is used to load the target page resources into the webview cache and display the target H5 page, calling the target js method through the webview component can load the target page resources in the private directory of the software and display the target H5 page.

[0070] Based on S201-S203, in response to the user's control trigger operation on the target control among the multiple controls of the software, the target URL of the target H5 page corresponding to the target control is obtained. Thereafter, when the target page resource of the target H5 page does not exist in the webview cache of the webview component of the software, the target page resource in the private directory of the software is loaded through the webview component and the target H5 page is displayed. Since the private directory includes the page resources of the H5 page corresponding to each control among the multiple controls, the webview component is used to display the H5 page corresponding to any one of the multiple controls. Therefore, the H5 page corresponding to any one of the multiple controls in the private directory can be displayed through one webview component, without the need to display multiple H5 pages through multiple webview components, thereby reducing the number of webview components used, and since the page resources are stored in the private directory, they will not occupy the webview cache, thereby reducing the memory occupied by the software when displaying the page.

[0071] S204. When the target page resource of the target H5 page exists in the webview cache of the webview component of the software, the page display device loads the target page resource in the webview cache through the webview component and displays the target H5 page.

[0072] As a possible implementation method, the page display device calls the target js method through the webview component, loads the target page resources in the webview cache, and displays the target H5 page.

[0073] Based on S204, when the target page resources of the target H5 page exist in the webview cache of the webview component of the software, the target page resources in the webview cache are loaded through the webview component, and the target H5 page is displayed. The target H5 page can be quickly displayed through the webview component, thereby improving the display speed of the target H5 page.

[0074] The above is a general description of the page display method provided by the present application. The page display method provided by the present application will be further described below in conjunction with the accompanying drawings.

[0075] In one design, Figure 3 A flow chart of another page display method provided by the present application is as follows: Figure 3 As shown, before S201, the page display method provided by the present application may further include the following steps:

[0076] S301. The page display device obtains page resources of an H5 page corresponding to each of a plurality of controls in response to a user's startup operation on the software.

[0077] As a possible implementation method, after the user performs a startup operation on the software, the page display device obtains the page resource of the H5 page corresponding to each of the multiple controls from the network side in response to the startup operation.

[0078] As another possible implementation, after the user starts the software, the page display device obtains the dynamic page resources of the H5 page corresponding to each of the multiple controls from the network side in response to the start-up operation.

[0079] The page display device obtains the dynamic page resource of the H5 page corresponding to each control in the plurality of controls from the second folder in the private directory of the software.

[0080] It should be noted that the relevant description of the second folder can refer to the relevant description in the subsequent part of the specific implementation method of this application, and this application will not explain it here.

[0081] S302: The page display device stores the page resources of the H5 page corresponding to each of the multiple controls in a private directory of the software.

[0082] As a possible implementation manner, the page display device stores the page resources in a fourth folder in the third folder in the private directory of the software.

[0083] The name of the third folder includes the user's identity document (ID), and the name of the fourth folder includes the URL corresponding to the first page resource.

[0084] Based on this solution, by responding to the user's startup operation on the software, the page resources of the H5 page corresponding to each of the multiple controls are obtained, and then the page resources of the H5 page corresponding to each of the multiple controls are stored in the private directory of the software. Subsequently, there is no need to obtain the page resources of the H5 page through the network, but the page resources of the H5 page can be obtained directly from the private directory, avoiding the impact of network delay on the rate of obtaining page resources, thereby improving the rate of obtaining page resources of the H5 page.

[0085] In one design, Figure 4 A flow chart of another page display method provided by the present application is as follows: Figure 4 As shown, the page display method provided by the present application may also include the following steps:

[0086] S401. The page display device obtains the memory usage percentage of the software in response to the user's target operation on the software.

[0087] Among them, the memory usage ratio is the memory occupied by the software and the total memory of the terminal running the software. The target operation includes the control trigger operation and the state switching operation. The state switching operation is used to switch the running state of the software. The running state includes running in the foreground of the terminal or running in the background of the terminal.

[0088] It should be noted that the page display device can execute S401 and S201 in parallel.

[0089] As a possible implementation, after the user performs a target operation on the software, the page display device sends a second request message to the electronic device in response to the target operation, requesting the software's memory usage percentage. Correspondingly, the electronic device receives the second request message from the page display device.

[0090] The electronic device generates a second response message including the memory usage percentage of the software, and sends the second response message to the page display device. The corresponding page display device receives the second response message from the electronic device and obtains the memory usage percentage of the software from the second response message.

[0091] S402: When the memory usage ratio is greater than a preset threshold, the page display device stores the static page resource of the first page resource among the multiple page resources cached by the webview in a private directory.

[0092] Among them, the page corresponding to the first page resource is not currently displayed.

[0093] Optionally, the page corresponding to the first page resource does not include a page corresponding to a control triggered by the control triggering operation.

[0094] The private directory may include a first folder, the first folder includes a second folder, the name of the first folder includes a user ID of the user, and the name of the second folder includes a URL corresponding to the first page resource.

[0095] As a possible implementation manner, the page display device stores the static page resource of the first page resource in the second folder.

[0096] Based on this possible implementation method, since the private directory includes a first folder, the first folder includes a second folder, the name of the first folder includes the user ID of the user, and the name of the second folder includes the URL corresponding to the first page resource, by storing the static page resources of the first page resource in the second folder, the static page resources of the first page resource can be managed based on the user ID and URL subsequently, which can improve the orderliness of the static page resources storing the first page resource.

[0097] Optionally, the first folder may also include a fifth folder in the private directory of the software.

[0098] The name of the fifth folder may be web_res. The fifth folder is only used to store static page resources.

[0099] S403: The page display device deletes the first page resource in the webview cache.

[0100] Based on this solution, by responding to the user's target operation on the software, the software's memory usage percentage is obtained, and then, when the memory usage percentage is greater than a preset threshold, the static page resources of the first page resources that are not currently displayed and correspond to the page in the multiple page resources cached by the webview are stored in a private directory, and then the first page resources in the webview cache are deleted. On the one hand, the static page resources of the first page resources are stored in the private directory, and when the page corresponding to the first page resource is displayed again later, there is no need to obtain the static page resources of the first page resources from the network, but the static page resources of the first page resources can be directly obtained from the private directory, thereby improving the speed of obtaining the static page resources of the first page resources; on the other hand, deleting the first page resources can release the memory occupied by the software when the software occupies a large amount of memory.

[0101] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the page display device executing the page display method. In order to achieve the above functions, the page display device includes a hardware structure and / or software module corresponding to each function. It should be easy for those skilled in the art to realize that, in combination with the units and algorithm steps of each example described in the embodiment disclosed herein, the embodiment of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0102] The embodiment of the present application can divide the functional modules of the page display device according to the above method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. Optionally, the division of modules in the embodiment of the present application is schematic, which is only a logical function division, and there may be other division methods in actual implementation. In addition, the "module" here may refer to a specific application-specific integrated circuit (ASIC), a circuit, a processor and memory that executes one or more software or firmware programs, an integrated logic circuit, and / or other devices that can provide the above functions.

[0103] In the case of functional module division, Figure 5 FIG. 1 shows a schematic diagram of the structure of a page display device. Figure 5 As shown, the page display device 50 includes an acquisition module 501 and a processing module 502 .

[0104] In some embodiments, the page display device 50 may also include a storage module ( Figure 5 ), for storing program instructions and data.

[0105] Among them, the acquisition module 501 is used to respond to the user's control trigger operation on the target control among the multiple controls of the software, and obtain the target URL of the target H5 page corresponding to the target control; the processing module 502 is used to load the target page resources in the private directory of the software through the webview component and display the target H5 page when the target page resources of the target H5 page do not exist in the webview cache of the webview component of the software; the private directory includes the page resources of the H5 page corresponding to each control among the multiple controls, and the webview component is used to display the H5 page corresponding to any one of the multiple controls.

[0106] Optionally, the processing module 502 is also used to: when there are target page resources of the target H5 page in the webview cache of the webview component of the software, load the target page resources in the webview cache through the webview component and display the target H5 page.

[0107] Optionally, processing module 502 is used to load the target page resources in the private directory of the software through the webview component and display the target H5 page, including: calling the target js method through the webview component; the target js method is used to load the target page resources into the webview cache and display the target H5 page.

[0108] Optionally, the processing module 502 is also used to: in response to the user's startup operation on the software, obtain the page resources of the H5 page corresponding to each of the multiple controls; store the page resources of the H5 page corresponding to each of the multiple controls in the private directory of the software.

[0109] Optionally, processing module 502 is also used to: obtain the memory usage percentage of the software in response to the user's target operation on the software; the memory usage percentage is the memory occupied by the software and the total memory of the terminal running the software, the target operation includes a control trigger operation and a state switching operation, the state switching operation is used to switch the running state of the software, and the running state includes running in the foreground of the terminal or running in the background of the terminal; when the memory usage percentage is greater than a preset threshold, the static page resource of the first page resource among the multiple page resources cached by the webview is stored in a private directory; the page corresponding to the first page resource is not currently displayed; and the first page resource in the webview cache is deleted.

[0110] Optionally, the private directory includes a first folder, the first folder includes a second folder, the name of the first folder includes the user ID of the user, the name of the second folder includes the URL corresponding to the first page resource, and the processing module 502 is also used to store the static page resources of the first page resource among the multiple page resources cached by the webview in the private directory, including: storing the static page resources of the first page resource in the second folder.

[0111] All relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here.

[0112] When the functions of the above functional modules are implemented in the form of hardware, Figure 6 FIG. 2 shows a structural diagram of another page display device. Figure 6 As shown, the page display device 60 includes a processor 601, a memory 602 and a bus 603. The processor 601 and the memory 602 may be connected via the bus 603.

[0113] The processor 601 is the control center of the page display device 60, which can be a processor or a general term for multiple processing elements. For example, the processor 601 can be a general-purpose central processing unit (CPU) or other general-purpose processors. Among them, the general-purpose processor can be a microprocessor or any conventional processor.

[0114] As an embodiment, the processor 601 may include one or more CPUs, such as Figure 6 CPU0 and CPU1 are shown in the figure.

[0115] The memory 602 may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to these.

[0116] As a possible implementation, the memory 602 can exist independently of the processor 601, and the memory 602 can be connected to the processor 601 via the bus 603 to store instructions or program codes. When the processor 601 calls and executes the instructions or program codes stored in the memory 602, the page display method provided in the embodiment of the present application can be implemented.

[0117] In another possible implementation, the memory 602 may also be integrated with the processor 601 .

[0118] The bus 603 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0119] It should be pointed out that Figure 6 The structure shown does not constitute a limitation on the page display device 60. Figure 6 In addition to the components shown, the page display device 60 may include more or fewer components than shown, or combine certain components, or arrange the components differently.

[0120] As an example, combining Figure 5 The functions implemented by the acquisition module 501 and the processing module 502 in the page display device 50 are similar to those Figure 6 The function of processor 601 in is the same.

[0121] Optional, such as Figure 6 As shown, the page display device 60 provided in the embodiment of the present application may further include a communication interface 604 .

[0122] The communication interface 604 is used to connect with other devices through a communication network. The communication network may be Ethernet, wireless access network, wireless local area network (WLAN), etc. The communication interface 604 may include a receiving unit for receiving data and a sending unit for sending data.

[0123] In a possible implementation, in the page display device 60 provided in the embodiment of the present application, the communication interface 604 may also be integrated into the processor 601, and the embodiment of the present application does not specifically limit this.

[0124] As a possible product form, the page display device of the embodiment of the present application can also be implemented using the following: one or more field programmable gate arrays (FPGA), programmable logic devices (PLD), controllers, state machines, gate logic, discrete hardware components, any other suitable circuits, or any combination of circuits that can perform the various functions described throughout the present application.

[0125] Through the description of the above implementation methods, those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above functional units is used as an example. In practical applications, the above functions can be assigned to different functional units as needed, that is, the internal structure of the device can be divided into different functional units to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0126] An embodiment of the present application also provides a computer-readable storage medium on which a computer program or instruction is stored. When the computer program or instruction is executed, the computer executes each step in the method flow shown in the above method embodiment.

[0127] An embodiment of the present application provides a computer program product including instructions. When the instructions are executed on a computer, the computer is caused to execute each step in the method flow shown in the above method embodiment.

[0128] An embodiment of the present application provides a chip system, including: a processor and an interface circuit; the interface circuit is used to receive a computer program or instruction and transmit it to the processor; the processor is used to execute the computer program or instruction so that the chip system executes each step in the method flow shown in the above method embodiment.

[0129] Among them, the computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable computer disk, and a hard disk. Random Access Memory (RAM), Read-Only Memory (ROM), Erasable Programmable Read Only Memory (EPROM), registers, hard disks, optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any other form of computer-readable storage media in a suitable combination of the above, or numerical values ​​in the art. An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in a specific-purpose ASIC. In the embodiments of the present application, a computer-readable storage medium may be any tangible medium that contains or stores a program, which may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0130] Since the page display device, computer-readable storage medium, and computer program product provided in this embodiment can be applied to the page display method provided in this embodiment, the technical effects that can be obtained can also refer to the above-mentioned method embodiments, and the embodiments of this application will not be repeated here.

[0131] Although the present application is described herein in conjunction with various embodiments, in the process of implementing the claimed application, those skilled in the art may understand and implement other changes to the disclosed embodiments by viewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "one" or "an" does not exclude multiple situations. A single processor or other unit may implement several functions listed in the claims. Certain measures are recorded in different dependent claims, but this does not mean that these measures cannot be combined to produce good results.

[0132] Although the present application has been described in conjunction with specific features and embodiments thereof, it is obvious that various modifications and combinations may be made thereto without departing from the spirit and scope of the present application. Accordingly, this specification and the drawings are merely exemplary illustrations of the present application as defined by the appended claims, and are deemed to have covered any and all modifications, variations, combinations or equivalents within the scope of the present application. Obviously, those skilled in the art may make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A page display method, characterized in that: The method comprises: In response to a user triggering operation on a target control among multiple controls of the software, obtaining a target URL of a target H5 page corresponding to the target control; When the target page resource of the target H5 page does not exist in the webview cache of the webview component of the software, the target page resource in the private directory of the software is loaded through the webview component and the target H5 page is displayed; the private directory includes the page resources of the H5 page corresponding to each of the multiple controls, and the webview component is used to display the H5 page corresponding to any one of the multiple controls.

2. The method according to claim 1, characterized in that The method further comprises: In the case that the target page resource of the target H5 page exists in the webview cache of the webview component of the software, the target page resource in the webview cache is loaded through the webview component, and the target H5 page is displayed.

3. According to claim 1, it is characterized in that The step of loading the target page resource in the private directory of the software through the webview component and displaying the target H5 page includes: The target js method is called through the webview component; the target js method is used to load the target page resources into the webview cache and display the target H5 page.

4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: In response to the user's startup operation on the software, obtaining a page resource of an H5 page corresponding to each of the multiple controls; The page resources of the H5 page corresponding to each of the multiple controls are stored in the private directory of the software.

5. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: In response to the user's target operation on the software, the memory usage ratio of the software is obtained; the memory usage ratio is the memory occupied by the software and the total memory of the terminal running the software, the target operation includes the control triggering operation and the state switching operation, the state switching operation is used to switch the running state of the software, and the running state includes running in the foreground of the terminal or running in the background of the terminal; When the memory usage ratio is greater than a preset threshold, a static page resource of a first page resource among the multiple page resources cached by the webview is stored in the private directory; the page corresponding to the first page resource is not currently displayed; Delete the first page resource in the webview cache.

6. The method according to claim 5, characterized in that The private directory includes a first folder, the first folder includes a second folder, the name of the first folder includes the user ID of the user, the name of the second folder includes the URL corresponding to the first page resource, and storing the static page resource of the first page resource among the multiple page resources cached by the webview in the private directory includes: The static page resources of the first page resources are stored in the second folder.

7. A page display device, characterized in that: The device comprises: an acquisition module and a processing module; The acquisition module is used to obtain a target URL of a target H5 page corresponding to the target control in response to a user's control triggering operation on a target control among multiple controls of the software; The processing module is used to load the target page resources in the private directory of the software and display the target H5 page through the webview component when the target page resources of the target H5 page do not exist in the webview cache of the webview component of the software; the private directory includes page resources of the H5 page corresponding to each of the multiple controls, and the webview component is used to display the H5 page corresponding to any one of the multiple controls.

8. The method according to claim 7, characterized in that The processing module is further used for: In the case that the target page resource of the target H5 page exists in the webview cache of the webview component of the software, the target page resource in the webview cache is loaded through the webview component, and the target H5 page is displayed.

9. A page display device, characterized in that: The page display device comprises: a processor, the processor is coupled to a memory, the memory is used to store programs or instructions, when the program or instructions are executed by the processor, the device executes the method according to any one of claims 1 to 6.

10. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instructions are executed, the computer is caused to perform the method according to any one of claims 1 to 6.