H5 first screen page display method and device, computer equipment and storage medium

By using browser controls to preload interface data and store it in cache during the process of loading the H5 homepage page, the problem of long loading time for H5 homepage page is solved, and faster page display is achieved.

CN120508719APending Publication Date: 2025-08-19PING AN BANK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510579439.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-06
Publication Date
2025-08-19

AI Technical Summary

Technical Problem

In the prior art, the H5 home screen page loading time is long, resulting in the problem of the user waiting time being too long.

Method used

While loading page resource information through browser controls, the first page interface data in the configuration file is preloaded and stored in the preset cache. After the page resource information is loaded, the page rendering process is performed based on the interface data in the cache.

Benefits of technology

Reduces the loading time of the H5 homepage page and improves the display efficiency of the homepage page.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120508719A_ABST
    Figure CN120508719A_ABST
Patent Text Reader

Abstract

The invention provides an H5 first screen page display method and device, computer equipment and a storage medium, and the method comprises the steps: responding to a page address obtaining instruction, and extracting a page URL according to the page address obtaining instruction; loading corresponding page resource information by utilizing the browser control, analyzing a pre-stored configuration file, pre-loading corresponding first page interface data, and storing the first page interface data into a preset cache; after loading of the page resource information is completed, whether first page interface data exists in a preset cache or not is detected according to the configuration file, and a first detection result is obtained; and if the first page interface data exists, performing page rendering processing according to the page resource information and the first page interface data to display the H5 first screen page. According to the method and the device, the first page interface data is loaded in advance while the page resource information is loaded by utilizing the browser control, so that the loading time of the H5 first-screen page is shortened, and the efficiency of displaying the first-screen page is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of H5 pages and financial technology, and in particular to an H5 homepage display method, device, computer equipment and storage medium. Background Art

[0002] With the rapid development of internet technology, financial management applications, due to their convenience and real-time nature, have become essential tools for users to manage their personal assets. To achieve rapid iteration and cross-platform deployment, hybrid development is widely adopted within financial management projects within the industry. The principle behind hybrid development is to develop frequently updated content using HTML5, then leverage the client's native web browser control (Android) or WK browser control (iOS) (collectively referred to as browser controls).

[0003] This H5 solution can be modified and released at any time, without being restricted by APP release reviews. It enables rapid iterative updates and timely responses to financial market changes and user needs, such as adjusting financial activity pages. At the same time, H5 development can run on three platforms at once, running simultaneously on Android, iOS, and browsers, which can reduce development costs. However, in actual applications, browser controls are sometimes overwhelmed by complex user interfaces or animations, resulting in problems such as long white screen times and slow loading times. For example, when displaying a dynamic curve chart of financial product returns, the rendering efficiency of WebView is low, causing the page to remain blank or loading for a long time, and users need to wait for several seconds or even tens of seconds before they can operate. Summary of the Invention

[0004] The embodiments of the present invention provide an H5 homepage display method, apparatus, computer equipment, and storage medium, aiming to solve the problem of long H5 homepage loading time in the prior art.

[0005] In a first aspect, an embodiment of the present invention provides an H5 homepage display method, the method comprising:

[0006] In response to a page address acquisition instruction, extracting a page URL according to the page address acquisition instruction;

[0007] Using a browser control to load page resource information corresponding to the page URL, while parsing a pre-stored configuration file, and pre-loading corresponding first page interface data, and storing the first page interface data in a preset cache;

[0008] After the page resource information is loaded, detecting whether the first page interface data exists in the preset cache according to the configuration file to obtain a first detection result;

[0009] If the first detection result is that the first page interface data exists in the preset cache, page rendering processing is performed according to the page resource information and the first page interface data to obtain the H5 home screen page.

[0010] In a second aspect, an embodiment of the present invention further provides an H5 homepage display device, the device comprising:

[0011] a page address acquisition unit, configured to respond to a page address acquisition instruction and extract a page URL according to the page address acquisition instruction;

[0012] A page data acquisition unit, configured to use a browser control to load page resource information corresponding to the page URL, parse a pre-stored configuration file, pre-load corresponding first page interface data, and store the first page interface data in a preset cache;

[0013] A first detection unit is configured to detect whether the first page interface data exists in the preset cache according to the configuration file after the page resource information is loaded, and obtain a first detection result;

[0014] A page rendering unit is used to perform page rendering processing according to the page resource information and the first page interface data to obtain an H5 home screen page if the first detection result is that the first page interface data exists in the preset cache.

[0015] In a third aspect, an embodiment of the present invention further provides a computer device comprising a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the H5 home screen page display method as described in the first aspect is implemented.

[0016] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a computer program, wherein the computer program includes program instructions, and wherein the program instructions, when executed by a processor, perform the H5 home screen page display method described in the first aspect.

[0017] The embodiment of the present invention provides an H5 home screen page display method, device, computer equipment and storage medium, including: in response to a page address acquisition instruction, extracting the page URL according to the page address acquisition instruction; using a browser control to load the corresponding page resource information, while parsing a pre-stored configuration file, and pre-loading the corresponding first page interface data, and storing the first page interface data in a preset cache; after the page resource information is loaded, detecting whether the first page interface data exists in the preset cache according to the configuration file to obtain a first detection result; if the first page interface data exists, performing page rendering processing according to the page resource information and the first page interface data to display the H5 home screen page. The present invention reduces the loading time of the H5 home screen page and improves the efficiency of the home screen page display by loading the page resource information with a browser control while loading the first page interface data in advance. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0019] Figure 1 A schematic diagram of the process of displaying the H5 homepage page according to an embodiment of the present invention;

[0020] Figure 2 A schematic block diagram of an H5 homepage display device provided by an embodiment of the present invention;

[0021] Figure 3 A schematic block diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0022] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0023] It will be understood that when used in this specification and the appended claims, the terms “comprises” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

[0024] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the present invention. As used in the specification and appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise.

[0025] It should be further understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0026] An embodiment of the present invention provides an H5 homepage display method applied to a client, and the H5 homepage display method is executed by application software installed on the client, such as a financial management app. The client communicates with the server via a network, and the client can be, but is not limited to, various personal computers, laptops, smartphones, tablet computers, and portable wearable devices. The present invention is described in detail below through specific embodiments.

[0027] See also Figure 1 , Figure 1 This is a flow chart of the H5 home page display method provided by an embodiment of the present invention. Figure 1 As shown, the method includes the following steps S110-S140.

[0028] S110 . Responding to a page address acquisition instruction, extracting a page URL according to the page address acquisition instruction.

[0029] In this embodiment, the page address acquisition instruction can be triggered by a relevant person (such as a user) or configured to be triggered periodically, which is not limited by the present invention. Specifically, when a user clicks or enters a page address in the client application software, for example, clicking on a financial management page, the page address acquisition instruction is triggered. At this time, the client responds to the page address acquisition instruction and extracts the page URL according to the page address acquisition instruction. Wherein, URL is the abbreviation of Uniform Resource Locator, which is an address format used to identify and locate resources on the Internet.

[0030] S120: Use the browser control to load the page resource information corresponding to the page URL, parse the pre-stored configuration file, pre-load the corresponding first page interface data, and store the first page interface data in a preset cache.

[0031] In this embodiment, once a page URL is opened, the browser control is used to load the page resource information corresponding to the page URL and render them into displayable web page content, such as the detailed content of a financial management page. The browser (i.e., WebView) control is the native browser environment in the application software and is a component embedded in the application that can parse and display web page content.

[0032] In addition, in order to make rational use of some idle time before page initialization and loading, the first page interface data is loaded in advance while loading the page resource information, so that after the page resource information is loaded, the first page interface data stored in the preset cache can be directly used. In specific implementation, first, a pre-stored configuration file can be obtained from the local file system or remote server, and the configuration file can be in JSON, XML or other formats; and the content of the configuration file is read using a preset file reading method, and parsed to obtain a parsed configuration file, and then the required first page interface data is extracted from the parsed configuration file. In addition, in order to facilitate subsequent rapid access and use of the first page interface data, after obtaining the first page interface data, the first page interface data obtained after parsing is stored in a preset cache negotiated in advance with the H5 page, so that when the page rendering operation is performed later, the first page interface data that meets the pre-load conditions can be directly obtained from the preset cache, thereby reducing the time consumption of the first screen page display, so that the user can see the detailed information of the "financial page" more quickly.

[0033] In one embodiment, the loading of the page resource information corresponding to the page URL by using a browser control includes:

[0034] Parsing the page URL to obtain the page resource location corresponding to the page URL;

[0035] The page resource information is obtained from the page resource location, and the page resource information is loaded into the browser control.

[0036] In this embodiment, in order to realize the loading of page resource information in the browser control, first, the page URL is parsed to extract the storage location or access path of the page resource information, such as https: / / www.XXX.com / query.do; then, based on the obtained page resource location, the page resource information is obtained from the server through a network request (such as a GET request); wherein, the page resource information includes resource information such as html, JavaScript, pictures, external dependencies, etc.; in this embodiment, taking the financial management page as an example, html defines the basic layout of the financial management page; JavaScript is responsible for realizing functions such as dynamic data update, such as real-time update of data changes of financial management page products; pictures may show fund performance trend charts, etc.; external dependencies may be some common style frameworks for unifying the visual style of the page; finally, the page resource information is loaded into the browser control for subsequent rendering and display.

[0037] In one embodiment, parsing a pre-stored configuration file and pre-loading corresponding first page interface data includes:

[0038] Parsing the configuration file using a preset parser to obtain target interface information;

[0039] detecting whether the target interface information includes multiple interfaces to obtain a second detection result;

[0040] If the second detection result is that the target interface information includes multiple interfaces, the multiple interfaces are called in sequence according to a preset sorting strategy to obtain the first page interface data corresponding to the multiple interfaces.

[0041] In this embodiment, after obtaining the configuration file, the configuration file is parsed to obtain the first page interface data; specifically, the configuration file is parsed using a preset parser to obtain an operable data structure; for example, for a JSON configuration file, it can be parsed into a JObject (representing the entire JSON object) or a JArray (representing a JSON array); then the configuration information related to preloading is extracted from the data structure; the configuration information includes the page URL, target interface information, cache storage key value (such as session value), cache validity period (such as expire value), etc.; wherein, the target interface information includes API endpoint URL, request parameters, request header and authentication information and other information. Moreover, this embodiment takes the financial management page scenario as an example. Since the financial management business involves a lot of data, it usually contains multiple interfaces to meet the page display requirements; for example, user personalized data interface, financial product basic information interface, product real-time market interface, etc. Therefore, this embodiment needs to detect whether the target interface information contains multiple interfaces to obtain a second detection result; when the second detection result is that there are multiple interfaces in the target interface information, these interfaces are called in sequence based on a preset sorting strategy (for example, the importance, dependency or calling order of the interface, etc.); and for each called interface, a response will be received, and each response contains the corresponding page interface data; thereby, by obtaining the page interface data, data can be exchanged between the client and the server, and then the page content of the server, such as product elements, is obtained. The product elements include the name, code, issuing institution, yield, custody fee and other elements of the financial product.

[0042] S130: After the page resource information is loaded, detect whether the first page interface data exists in the preset cache according to the configuration file to obtain a first detection result.

[0043] In this embodiment, in order to determine whether a preloading operation is performed after the page resource information is loaded, this embodiment detects whether there is preloaded corresponding first page interface data in the preset cache through the configuration file to verify whether the preloading operation has been successfully executed.

[0044] After obtaining the first detection result, the method further includes:

[0045] If the first detection result is that the first page interface data does not exist in the preset cache, the calling interface is initialized, and the first page interface data is called from the server according to the calling interface, and the page rendering processing is performed according to the page resource information and the first page interface data to obtain the H5 home screen page.

[0046] In a more specific embodiment, when it is detected that the first page interface data does not exist in the preset cache, it means that the preloading operation was not performed in advance during the page resource information loading process. At this time, the initialization call interface is executed to obtain the first page interface data from the server according to the call interface; and the page rendering processing is performed according to the page resource information and the first page interface data to display the H5 home screen page, such as the financial product recommendation page.

[0047] S140. If the first detection result is that the first page interface data exists in the preset cache, page rendering processing is performed according to the page resource information and the first page interface data to display the H5 home screen page.

[0048] In this embodiment, when the page resource information is loaded in the browser control, if it is detected that the first page interface data exists in the preset cache, it means that the preloading operation has been performed during the loading of the page resource information. At this time, the first page interface data cached in the preset cache is obtained in advance according to the requirements of the configuration file. For example, in a financial management APP, when entering the fund details page, the client preloads the first page interface data such as the fund's historical net value and scale changes in advance according to the configuration file, and stores it in the preset cache. Once the page resource information is loaded, it is directly obtained from the preset cache without having to be obtained from the server again, thereby reducing data loading time and improving loading efficiency; in addition, after obtaining the first page interface data, page rendering processing is performed according to the page resource information and the first page interface data to obtain the H5 home screen page, thereby displaying the H5 home screen page to the user.

[0049] In one embodiment, before performing page rendering processing according to the page resource information and the first page interface data, the method further includes:

[0050] Obtaining cache key configuration parameters contained in the configuration file;

[0051] The first page interface data is obtained from the preset cache according to the cache key configuration parameter.

[0052] In this embodiment, in order to achieve rapid display of the first screen page, after the page resource information is loaded, the cache key configuration parameter key value corresponding to the session field is first obtained from the configuration file; then, according to the cache key configuration parameter key value, a precise query is performed in the preset cache to quickly locate the previously preloaded first page interface data, such as product name, expected rate of return, investment period, risk level and other information; thereby improving the efficiency of obtaining the first page interface data.

[0053] In one embodiment, after step S140, the method further includes:

[0054] Responding to the automatically triggered interface call instruction, and obtaining updated page interface data from the server according to the interface call instruction;

[0055] The H5 home screen page is updated using the updated page interface data to obtain an updated H5 home screen page, and the updated page interface data is updated to the preset cache.

[0056] In this embodiment, after the H5 homepage page is displayed, an interface call instruction is automatically triggered, and according to the interface call instruction, updated page interface data is obtained from the server to update the H5 homepage page content. The updated page interface data is then used to update the H5 homepage page, thereby obtaining an updated H5 homepage page to ensure the real-time nature of the page content. In addition, the updated page interface data is updated to the local cache so that it can be quickly accessed later when needed.

[0057] In one embodiment, the method further comprises:

[0058] Obtain the current time and the start time when the first page interface data is stored in the preset cache;

[0059] performing a difference operation on the start time and the current time to obtain a storage time of the first page interface data;

[0060] Comparing the storage time with the preset effective time of the preset cache to obtain a comparison result;

[0061] If the comparison result is that the storage time is equal to or greater than the preset validity time, the first page interface data is automatically deleted;

[0062] If the comparison result is that the storage time is less than the preset valid time, the first page interface data is retained.

[0063] In this embodiment, in order to effectively manage the cache space of the local cache and avoid the accumulation of useless data leading to performance degradation, the local cache in this embodiment sets a certain validity period for the page interface data to ensure that the page interface data in the local cache is valid. Specifically, first, by obtaining time information, that is, the current system time and the start time when the first page interface data is stored in the local cache; performing a difference operation on the start time and the current time to obtain the storage time of the page interface data; comparing the storage time with the preset validity time of the local cache to determine the validity of the page interface data; wherein the preset validity time expire value is specifically a timestamp, for example, 3600s is configured for one hour. If the storage time is less than the preset validity time, the page interface data is retained; if the storage time is equal to or exceeds the preset validity time, the page interface data is automatically deleted to release cache space and keep the data updated.

[0064] It can be seen from the above technical solutions that the present invention uses the browser control to load page resource information while loading the page interface data in advance, thereby reducing the loading time of the H5 home screen page and improving the efficiency of the home screen page display.

[0065] Figure 2 This is a schematic block diagram of the H5 home page display device provided by an embodiment of the present invention. Figure 2 As shown, the present invention also provides an H5 home screen page display device; the H5 home screen page display device includes a unit for executing the above-mentioned H5 home screen page display method, specifically, please refer to Figure 2 The H5 home page display device 100 includes a page address acquisition unit 110, a page data acquisition unit 120, a first detection unit 130 and a page rendering unit 140.

[0066] The page address acquisition unit 110 is configured to respond to a page address acquisition instruction and extract a page URL according to the page address acquisition instruction.

[0067] In this embodiment, the page address acquisition instruction can be triggered by a relevant person (such as a user) or configured to be triggered periodically, which is not limited by the present invention. Specifically, when a user clicks or enters a page address in the client application software, for example, clicking on a financial management page, the page address acquisition instruction is triggered. At this time, the client responds to the page address acquisition instruction and extracts the page URL according to the page address acquisition instruction. Wherein, URL is the abbreviation of Uniform Resource Locator, which is an address format used to identify and locate resources on the Internet.

[0068] The page data acquisition unit 120 is used to use the browser control to load the page resource information corresponding to the page URL, and at the same time parse the pre-stored configuration file, and pre-load the corresponding first page interface data, and store the first page interface data in a preset cache.

[0069] In this embodiment, once a page URL is opened, the browser control is used to load the page resource information corresponding to the page URL and render them into displayable web page content, such as the detailed content of a financial management page. The browser (i.e., WebView) control is the native browser environment in the application software and is a component embedded in the application that can parse and display web page content.

[0070] In addition, in order to make rational use of some idle time before page initialization and loading, the first page interface data is loaded in advance while loading the page resource information, so that after the page resource information is loaded, the first page interface data stored in the preset cache can be directly used. In specific implementation, first, a pre-stored configuration file can be obtained from the local file system or remote server, and the configuration file can be in JSON, XML or other formats; and the content of the configuration file is read using a preset file reading method, and parsed to obtain a parsed configuration file, and then the required first page interface data is extracted from the parsed configuration file. In addition, in order to facilitate subsequent rapid access and use of the first page interface data, after obtaining the first page interface data, the first page interface data obtained after parsing is stored in a preset cache negotiated in advance with the H5 page, so that when the page rendering operation is performed later, the first page interface data that meets the pre-load conditions can be directly obtained from the preset cache, thereby reducing the time consumption of the first screen page display, so that the user can see the detailed information of the "financial page" more quickly.

[0071] In one embodiment, the loading of the page resource information corresponding to the page URL by using a browser control is specifically used to:

[0072] Parsing the page URL to obtain the page resource location corresponding to the page URL;

[0073] The page resource information is obtained from the page resource location, and the page resource information is loaded into the browser control.

[0074] In this embodiment, in order to realize the loading of page resource information in the browser control, first, the page URL is parsed to extract the storage location or access path of the page resource information, such as https: / / www.XXX.com / query.do; then, based on the obtained page resource location, the page resource information is obtained from the server through a network request (such as a GET request); wherein, the page resource information includes resource information such as html, JavaScript, pictures, external dependencies, etc.; in this embodiment, taking the financial management page as an example, html defines the basic layout of the financial management page; JavaScript is responsible for realizing functions such as dynamic data update, such as real-time update of data changes of financial management page products; pictures may show fund performance trend charts, etc.; external dependencies may be some common style frameworks for unifying the visual style of the page; finally, the page resource information is loaded into the browser control for subsequent rendering and display.

[0075] In one embodiment, parsing a pre-stored configuration file and pre-loading corresponding first page interface data is specifically used to:

[0076] Parsing the configuration file using a preset parser to obtain target interface information;

[0077] detecting whether the target interface information includes multiple interfaces to obtain a second detection result;

[0078] If the second detection result is that the target interface information includes multiple interfaces, the multiple interfaces are called in sequence according to a preset sorting strategy to obtain the first page interface data corresponding to the multiple interfaces.

[0079] In this embodiment, after obtaining the configuration file, the configuration file is parsed to obtain the first page interface data; specifically, the configuration file is parsed using a preset parser to obtain an operable data structure; for example, for a JSON configuration file, it can be parsed into a JObject (representing the entire JSON object) or a JArray (representing a JSON array); then the configuration information related to preloading is extracted from the data structure; the configuration information includes the page URL, target interface information, cache storage key value (such as session value), cache validity period (such as expire value), etc.; wherein, the target interface information includes API endpoint URL, request parameters, request header and authentication information and other information. Moreover, this embodiment takes the financial management page scenario as an example. Since the financial management business involves a lot of data, it usually contains multiple interfaces to meet the page display requirements; for example, user personalized data interface, financial product basic information interface, product real-time market interface, etc. Therefore, this embodiment needs to detect whether the target interface information contains multiple interfaces to obtain a second detection result; when the second detection result is that there are multiple interfaces in the target interface information, these interfaces are called in sequence based on a preset sorting strategy (for example, the importance, dependency or calling order of the interface, etc.); and for each called interface, a response will be received, and each response contains the corresponding page interface data; thereby, by obtaining the page interface data, data can be exchanged between the client and the server, and then the page content of the server, such as product elements, is obtained. The product elements include the name, code, issuing institution, yield, custody fee and other elements of the financial product.

[0080] The first detection unit 130 is configured to detect whether the first page interface data exists in the preset cache according to the configuration file after the page resource information is loaded, and obtain a first detection result.

[0081] In this embodiment, in order to determine whether a preloading operation is performed after the page resource information is loaded, this embodiment detects whether there is preloaded corresponding first page interface data in the preset cache through the configuration file to verify whether the preloading operation has been successfully executed.

[0082] Wherein, after obtaining the first detection result, it is further used to:

[0083] If the first detection result is that the first page interface data does not exist in the preset cache, the calling interface is initialized, and the first page interface data is called from the server according to the calling interface, and the page rendering processing is performed according to the page resource information and the first page interface data to obtain the H5 home screen page.

[0084] In a more specific embodiment, when it is detected that the first page interface data does not exist in the preset cache, it means that the preloading operation was not performed in advance during the page resource information loading process. At this time, the initialization call interface is executed to obtain the first page interface data from the server according to the call interface; and the page rendering processing is performed according to the page resource information and the first page interface data to display the H5 home screen page, such as the financial product recommendation page.

[0085] The page rendering unit 140 is used to perform page rendering processing according to the page resource information and the first page interface data to display the H5 home screen page if the first detection result is that the first page interface data exists in the preset cache.

[0086] In this embodiment, when the page resource information is loaded in the browser control, if it is detected that the first page interface data exists in the preset cache, it means that the preloading operation has been performed during the loading of the page resource information. At this time, the first page interface data cached in the preset cache is obtained in advance according to the requirements of the configuration file. For example, in a financial management APP, when entering the fund details page, the client preloads the first page interface data such as the fund's historical net value and scale changes in advance according to the configuration file, and stores it in the preset cache. Once the page resource information is loaded, it is directly obtained from the preset cache without having to be obtained from the server again, thereby reducing data loading time and improving loading efficiency; in addition, after obtaining the first page interface data, page rendering processing is performed according to the page resource information and the first page interface data to obtain the H5 home screen page, thereby displaying the H5 home screen page to the user.

[0087] In one embodiment, before performing page rendering processing according to the page resource information and the first page interface data, the method is further configured to:

[0088] Obtaining cache key configuration parameters contained in the configuration file;

[0089] The first page interface data is obtained from the preset cache according to the cache key configuration parameter.

[0090] In this embodiment, in order to achieve rapid display of the first screen page, after the page resource information is loaded, the cache key configuration parameter key value corresponding to the session field is first obtained from the configuration file; then, according to the cache key configuration parameter key value, a precise query is performed in the preset cache to quickly locate the previously preloaded first page interface data, such as product name, expected rate of return, investment period, risk level and other information; thereby improving the efficiency of obtaining the first page interface data.

[0091] In one embodiment, the page rendering unit 140 is further configured to:

[0092] Responding to the automatically triggered interface call instruction, and obtaining updated page interface data from the server according to the interface call instruction;

[0093] The H5 home screen page is updated using the updated page interface data to obtain an updated H5 home screen page, and the updated page interface data is updated to the preset cache.

[0094] In this embodiment, after the H5 homepage page is displayed, an interface call instruction is automatically triggered, and according to the interface call instruction, updated page interface data is obtained from the server to update the H5 homepage page content. The updated page interface data is then used to update the H5 homepage page, thereby obtaining an updated H5 homepage page to ensure the real-time nature of the page content. In addition, the updated page interface data is updated to the local cache so that it can be quickly accessed later when needed.

[0095] In one embodiment, the device is further configured to:

[0096] Obtain the current time and the start time when the first page interface data is stored in the preset cache;

[0097] performing a difference operation on the start time and the current time to obtain a storage time of the first page interface data;

[0098] Comparing the storage time with the preset effective time of the preset cache to obtain a comparison result;

[0099] If the comparison result is that the storage time is equal to or greater than the preset validity time, the first page interface data is automatically deleted;

[0100] If the comparison result is that the storage time is less than the preset valid time, the first page interface data is retained.

[0101] In this embodiment, in order to effectively manage the cache space of the local cache and avoid the accumulation of useless data leading to performance degradation, the local cache in this embodiment sets a certain validity period for the page interface data to ensure that the page interface data in the local cache is valid. Specifically, first, by obtaining time information, that is, the current system time and the start time when the first page interface data is stored in the local cache; performing a difference operation on the start time and the current time to obtain the storage time of the page interface data; comparing the storage time with the preset validity time of the local cache to determine the validity of the page interface data; wherein the preset validity time expire value is specifically a timestamp, for example, 3600s is configured for one hour. If the storage time is less than the preset validity time, the page interface data is retained; if the storage time is equal to or exceeds the preset validity time, the page interface data is automatically deleted to release cache space and keep the data updated.

[0102] It can be seen from the above technical solutions that the present invention uses the browser control to load page resource information while loading the page interface data in advance, thereby reducing the loading time of the H5 home screen page and improving the efficiency of the home screen page display.

[0103] The H5 home page display device can be implemented in the form of a computer program, which can be used in Figure 3 Runs on the computer equipment shown.

[0104] See also Figure 3 , Figure 3 is a schematic block diagram of a computer device provided in an embodiment of the present invention. Computer device 500 is a server, which can be a standalone server or a server cluster consisting of multiple servers. Computer device 500 can also be a transmitter, which can be a communication-capable electronic device such as a smartphone, tablet computer, laptop computer, desktop computer, personal digital assistant, or wearable device.

[0105] See Figure 3 The computer device 500 includes a processor 502 , a memory, and a network interface 505 connected via a system bus 501 , wherein the memory may include a storage medium 503 and an internal memory 504 .

[0106] The storage medium 503 can store an operating system 5031 and a computer program 5032. When the computer program 5032 is executed, the processor 502 can execute the H5 home page display method.

[0107] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500.

[0108] The internal memory 504 provides an environment for the operation of the computer program 5032 in the storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute the H5 home page display method.

[0109] The network interface 505 is used for network communication, such as providing data information transmission. Those skilled in the art will understand that Figure 3 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present invention and does not constitute a limitation on the computer device 500 to which the solution of the present invention is applied. The specific computer device 500 may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0110] The processor 502 is used to run the computer program 5032 stored in the memory to implement the H5 home page display method disclosed in the embodiment of the present invention.

[0111] Those skilled in the art will understand that Figure 3 The embodiment of the computer device shown in the figure does not constitute a limitation on the specific composition of the computer device. In other embodiments, the computer device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. For example, in some embodiments, the computer device may only include a memory and a processor. In such an embodiment, the structure and function of the memory and processor are the same as those in the figure. Figure 3 The embodiments shown are consistent and will not be described again here.

[0112] It should be understood that in the embodiment of the present invention, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.

[0113] In another embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium may be a non-volatile computer-readable storage medium. The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the method for displaying the homepage of an H5 application disclosed in an embodiment of the present invention is implemented.

[0114] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the devices, systems and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software 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 the present invention.

[0115] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, systems and methods can be implemented in other ways. For example, the system embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, or units with the same function may be combined into one unit. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, systems or units, or may be an electrical, mechanical or other form of connection.

[0116] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the objectives of the embodiments of the present invention.

[0117] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0118] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the existing technology, or all or 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 and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk.

[0119] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and such modifications or substitutions are intended to be within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.

Claims

1. A method for displaying an H5 homepage, characterized in that: The method comprises: In response to a page address acquisition instruction, extracting a page URL according to the page address acquisition instruction; Using a browser control to load page resource information corresponding to the page URL, while parsing a pre-stored configuration file, and pre-loading corresponding first page interface data, and storing the first page interface data in a preset cache; After the page resource information is loaded, detecting whether the first page interface data exists in the preset cache according to the configuration file to obtain a first detection result; If the first detection result is that the first page interface data exists in the preset cache, page rendering processing is performed according to the page resource information and the first page interface data to obtain the H5 home screen page.

2. The H5 home page display method according to claim 1, characterized in that: The step of using a browser control to load the page resource information corresponding to the page URL includes: Parsing the page URL to obtain the page resource location corresponding to the page URL; The page resource information is obtained from the page resource location, and the page resource information is loaded into the browser control.

3. The H5 home page display method according to claim 1, characterized in that: The parsing of the pre-stored configuration file and pre-loading of the corresponding first page interface data includes: Parsing the configuration file using a preset parser to obtain target interface information; detecting whether the target interface information includes multiple interfaces to obtain a second detection result; If the second detection result is that the target interface information includes multiple interfaces, the multiple interfaces are called in sequence according to a preset sorting strategy to obtain the first page interface data corresponding to the multiple interfaces.

4. The H5 home page display method according to claim 1, characterized in that: After performing page rendering processing according to the page resource information and the first page interface data to obtain the H5 home screen page, the method further includes: Responding to the automatically triggered interface call instruction, and obtaining updated page interface data from the server according to the interface call instruction; The H5 home screen page is updated using the updated page interface data to obtain an updated H5 home screen page, and the updated page interface data is updated to the preset cache.

5. The H5 home page display method according to any one of claims 1 to 4, characterized in that: The method further comprises: Obtain the current time and the start time when the first page interface data is stored in the preset cache; performing a difference operation on the start time and the current time to obtain a storage time of the first page interface data; Comparing the storage time with the preset effective time of the preset cache to obtain a comparison result; If the comparison result is that the storage time is equal to or greater than the preset validity time, the first page interface data is automatically deleted; If the comparison result is that the storage time is less than the preset valid time, the first page interface data is retained.

6. The H5 home page display method according to claim 4, characterized in that: After obtaining the first detection result, the method further includes: If the first detection result is that the first page interface data does not exist in the preset cache, the calling interface is initialized, and the first page interface data is called from the server according to the calling interface, and the page rendering processing is performed according to the page resource information and the first page interface data to obtain the H5 home screen page.

7. The H5 home page display method according to claim 1, characterized in that: Before performing page rendering processing according to the page resource information and the first page interface data, the method further includes: Obtaining cache key configuration parameters contained in the configuration file; The first page interface data is obtained from the preset cache according to the cache key configuration parameter.

8. An H5 home page display device, characterized in that: The device comprises: a page address acquisition unit, configured to respond to a page address acquisition instruction and extract a page URL according to the page address acquisition instruction; A page data acquisition unit, configured to use a browser control to load page resource information corresponding to the page URL, parse a pre-stored configuration file, pre-load corresponding first page interface data, and store the first page interface data in a preset cache; A first detection unit is configured to detect whether the first page interface data exists in the preset cache according to the configuration file after the page resource information is loaded, and obtain a first detection result; A page rendering unit is used to perform page rendering processing according to the page resource information and the first page interface data to obtain an H5 home screen page if the first detection result is that the first page interface data exists in the preset cache.

9. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the H5 home screen page display method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that The storage medium stores a computer program, which includes program instructions. When the program instructions are executed by the processor, the H5 home page display method according to any one of claims 1 to 7 can be implemented.