Webpage resource request method and device, equipment and storage medium

By generating dynamic configuration tables and eliminating low correlation interfaces, the problem of low-efficiency interface configuration in the prior art is solved, the efficiency of pre-request and data effectiveness of pre-requests are improved, and efficient requests and configuration of application resources are realized.

CN119149838APending Publication Date: 2024-12-17MASHANG CONSUMER FINANCE CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411045061.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-30
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

The existing interface pre-request resource configuration scheme is inefficient in complex request scenarios, making it difficult to effectively process resource access interface data of target accounts.

Method used

By obtaining the resource access interface data of the target application, generating dynamic configuration tables, generating pre-requests in response to application startup operations, excluding low-relevance interfaces, and improving the efficiency and data effectiveness of pre-requests.

Benefits of technology

It improves the efficiency of pre-requests and data effectiveness, simplifies the resource access interface through customized dynamic configuration tables, and improves the request and configuration efficiency of application resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119149838A_ABST
    Figure CN119149838A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, in particular to a webpage resource request method and device, computer equipment, a storage medium and a computer program product. The method comprises the steps of obtaining first data of a target application, wherein the first data comprises resource access interface data corresponding to a resource access request of a target account; according to the resource access interface data, generating a dynamic configuration table corresponding to the target account, the dynamic configuration table being used for configuring a resource access interface; in response to a starting operation of the target application, generating a pre-request for resource access of the target application based on the dynamic configuration table; and sending the pre-request, and receiving webpage resource data in response to the pre-request. By adopting the method, the request efficiency of the webpage resources in a complex request scene and the validity of the requested resource access interface data can be improved.
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 method, apparatus, computer equipment, storage medium and computer program product for requesting web page resources. Background Art

[0002] In order to implement interface pre-request, you first need to configure a list of interfaces to be requested. The client will obtain the configuration after the application is started, read the pre-requested page address and the corresponding interface information. When the user opens WebView (a graphical tool), the corresponding pre-requested interface will be initiated in parallel and the results will be saved for subsequent JS (javascript, a translated scripting language) to initiate inquiries.

[0003] In the related art, the resource configuration schemes for interface pre-request include: fixed interface list configuration, remote delivery configuration and integrated configuration file. However, this configuration scheme has the problem of low processing efficiency for complex request scenarios. Summary of the invention

[0004] The present application provides a method, apparatus, computer device, computer-readable storage medium and computer program product for requesting web page resources.

[0005] In a first aspect, the present application provides a method for requesting web page resources. The method comprises:

[0006] Acquire first data of a target application, wherein the first data includes resource access interface data corresponding to a resource access request of a target account;

[0007] Generate a dynamic configuration table corresponding to the target account according to the resource access interface data, wherein the dynamic configuration table is used to configure the resource access interface;

[0008] In response to a start-up operation of the target application, generating a pre-request for resource access of the target application based on the dynamic configuration table;

[0009] The pre-request is sent, and web page resource data in response to the pre-request is received.

[0010] In a second aspect, the present application also provides a device for requesting web resources. The device comprises:

[0011] An acquisition module, configured to acquire first data of a target application, wherein the first data includes resource access interface data corresponding to a resource access request of a target account;

[0012] A configuration table generating module, used to generate a dynamic configuration table corresponding to the target account according to the resource access interface data, wherein the dynamic configuration table is used to configure the resource access interface;

[0013] A pre-request generation module, configured to generate a pre-request for resource access of the target application based on the dynamic configuration table in response to a startup operation of the target application;

[0014] The transceiver module is used to send the pre-request and receive web page resource data in response to the pre-request.

[0015] In a third aspect, the present application further provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps in the method for requesting a webpage resource as described in any one of the embodiments in the first aspect are implemented.

[0016] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps in the method for requesting a webpage resource as described in any one of the embodiments in the first aspect are implemented.

[0017] In a fifth aspect, the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps in the method for requesting a webpage resource as described in any one of the embodiments in the first aspect are implemented.

[0018] The above-mentioned webpage resource request method, device, computer equipment, storage medium and computer program product can achieve the following beneficial effects corresponding to the technical problems in the background technology by deducing the technical features in the claims:

[0019] By acquiring the first data of the target application, the resource access interface data corresponding to the resource access request of the target account is obtained, so that a dynamic configuration table corresponding to the target account can be generated according to the resource access interface data. In the dynamic configuration table obtained at this time, the resource access interface data corresponding to the resource access request in the history of the target account can be recorded and summarized. Subsequently, when the target application is started, the terminal can respond to the startup operation of the target application and generate a pre-request for the resource access of the target application according to the dynamic configuration table. The resource access interface contained in the pre-request generated at this time corresponds to the target account, wherein the resource access interface with low relevance to the target account is excluded, thereby improving the data validity of the web resource data obtained by the pre-request and improving the efficiency of the pre-request. In implementation, the present application scheme improves the pertinence of the pre-request of the resource access interface by forming a customized dynamic configuration table for the target account within the framework of the pre-request, thereby improving the efficiency of the request and configuration of the application resources. On the other hand, in the specific implementation of the pre-request, the resource access interface required for the request is simplified by the dynamic configuration table customized by the target account, thereby improving the effective data ratio of the web resource data obtained in the response. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 An application environment diagram of a method for requesting webpage resources in one embodiment;

[0021] Figure 2 A first flow chart of a method for requesting a webpage resource in one embodiment;

[0022] Figure 3 A second flow chart of a method for requesting a webpage resource in another embodiment;

[0023] Figure 4 A third flow chart of a method for requesting a webpage resource in another embodiment;

[0024] Figure 5 A fourth flow chart of a method for requesting a webpage resource in another embodiment;

[0025] Figure 6 A fifth flow chart of a method for requesting a webpage resource in another embodiment;

[0026] Figure 7 A sixth flow chart of a method for requesting a webpage resource in another embodiment;

[0027] Figure 8 A seventh flow chart of a method for requesting a webpage resource in another embodiment;

[0028] Fig. 9A schematic diagram of a flow chart of a method for requesting a webpage resource in a specific embodiment;

[0029] Fig.10 It is a structural block diagram of a webpage resource requesting device in one embodiment;

[0030] Fig.11 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0031] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0032] In related technologies, in order to implement interface pre-request, a list of interfaces to be requested is first required. The client obtains the configuration after the App is started, reads the pre-requested page address and the corresponding interface information, and when the user opens the WebView, initiates the corresponding pre-requested interface in parallel and saves the result for subsequent JS to initiate inquiries. Currently, there are many solutions for interface configuration, which are mainly divided into: fixed interface list configuration, remote distribution configuration and integrated configuration file.

[0033] However, the current method for requesting web resources has the following technical problems:

[0034] The existing resource request method for implementing interface pre-request has the problem of low processing efficiency for complex request scenarios.

[0035] Based on this, a webpage resource request method provided in an embodiment of the present application can be applied to Figure 1 In the application environment shown in FIG. 1 , the terminal 102 communicates with the server 104 via a network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or placed on a cloud or other network server. Figure 1In the application environment shown, the terminal 102 can be used to store and run the application software (APP) required by the user. The application software can be an application architecture using a hybrid development solution, that is, a native app plus an H5 program. In the process of the user using the application software, the application software body can load the H5 program page through Webview to implement services that require high flexibility. The server 104 can refer to an application server for responding to data requests initiated from the terminal 102, and can store application resources such as configuration files and media data related to the application operation. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.

[0036] In one embodiment, Figure 2 As shown, a method for requesting web page resources is provided, and the method is applied to Figure 1 The terminal in is used as an example to illustrate, including the following steps:

[0037] Step 202: Acquire first data of the target application, where the first data includes resource access interface data corresponding to the resource access request of the target account.

[0038] Among them, resources may refer to data resources used to configure and manage application content, which may include application settings, parameters, options and other information, and may also include database connection information, media file paths and access permissions, etc. Resources can be fed back by the application client when the user starts or uses the application. Resource access interface data may refer to the record information obtained by recording the user's application resource request behavior, which may include the URL of the resource access interface, request method, parameters, offline package version, user ID (userID) and current timestamp, etc. Specifically, resources may also include configuration files, such as Json, XML, JS, etc. The first data may refer to the log data that records the application data in the target application, and the first data includes the resource access interface data corresponding to the resource access request of the target account.

[0039] Exemplarily, the terminal may obtain the first data of the target application on the premise of obtaining sufficient authorization and permission, thereby obtaining the resource access interface data corresponding to the resource access request of the target account through the first data.

[0040] Step 204: Generate a dynamic configuration table corresponding to the target account according to the resource access interface data, wherein the dynamic configuration table is used to configure the resource access interface.

[0041] Among them, the dynamic configuration table can refer to a personalized resource access interface table associated with the target account, which can be used to indicate the configuration of the resource access interface of the target application. The dynamic configuration table can be dynamically adjusted according to changes in the resource access interface data, and is therefore associated with the target account as a dynamic configuration table.

[0042] Exemplarily, after acquiring the first data, the terminal can parse and process the first data, and extract and generate a dynamic configuration table based on the obtained resource access interface data. At this time, the obtained dynamic configuration table is associated with the target account, and the dynamic configuration table records the resource access interface data that can identify the personalized needs of the target account.

[0043] Step 206: In response to the start-up operation of the target application, a pre-request for resource access of the target application is generated based on the dynamic configuration table.

[0044] Among them, pre-request can refer to the process of loading the required data in advance before the application is started or the user operates to shorten the user's waiting time. The resource access interface of the web page resource needs to be determined in the pre-request process. The target application resource can refer to the data or resources required by the application when the application is started or the user operates, including page data, pictures, videos, and style sheets. The startup operation can refer to the interactive operation that can trigger the target application to switch from the closed state to the open state.

[0045] Exemplarily, the terminal can monitor the state of the target application, and when the startup operation of the target application is detected, the terminal can generate a pre-request for resource access of the target application based on the dynamic configuration table in response to the startup operation of the target application. Specifically, the terminal can monitor the target application by monitoring the entry file, startup page, etc. of the target application.

[0046] Step 208: Send the pre-request, and receive web page resource data in response to the pre-request.

[0047] Exemplarily, after sending a pre-request, the terminal can receive web resource data in response to the pre-request. In this way, the terminal can apply the received web resource data to implement the content configuration of the target application, such as completing the first screen rendering of the target application, thereby improving the loading efficiency of the target application. Among them, content configuration can refer to the process of managing and customizing the text content, pictures, videos, audio and other resources in the target application through configuration files or other resources. Content configuration can help developers and users flexibly manage and adjust the display content of the application to meet the requirements of different user groups and needs.

[0048] In the above-mentioned method for requesting webpage resources, reasonable deduction is performed in combination with the technical features in the embodiment, which can achieve the following beneficial effects of solving the technical problems raised in the background technology:

[0049] By acquiring the first data of the target application, the resource access interface data corresponding to the resource access request of the target account is obtained, so that a dynamic configuration table corresponding to the target account can be generated according to the resource access interface data. In the dynamic configuration table obtained at this time, the resource access interface data corresponding to the resource access request in the history of the target account can be recorded and summarized. Subsequently, when the target application is started, the terminal can respond to the startup operation of the target application and generate a pre-request for the resource access of the target application according to the dynamic configuration table. The resource access interface contained in the pre-request generated at this time corresponds to the target account, wherein the resource access interface with low relevance to the target account is excluded, thereby improving the data validity of the web resource data obtained by the pre-request and improving the efficiency of the pre-request. In implementation, the present application scheme improves the pertinence of the pre-request of the resource access interface by forming a customized dynamic configuration table for the target account within the framework of the pre-request, thereby improving the efficiency of the request and configuration of the application resources. On the other hand, in the specific implementation of the pre-request, the resource access interface required for the request is simplified by the dynamic configuration table customized by the target account, thereby improving the effective data ratio of the web resource data obtained in the response.

[0050] In one embodiment, the Figure 3 As shown, step 206 includes:

[0051] Step 302: When the dynamic configuration table is valid, a pre-request for accessing the target application resource is generated based on the dynamic configuration table of the resource access interface.

[0052] Exemplarily, the terminal may perform validity verification on the dynamic configuration table and obtain a validity verification result.

[0053] The validity verification may refer to a process of detecting the availability status of the dynamic configuration table according to a preset process. The validity verification may avoid the processing of applying an invalid dynamic configuration table, thereby improving the stability of the process.

[0054] Exemplarily, when the terminal responds to the application startup operation and initiates a pre-request, it can first verify the validity of the dynamic configuration table, and then determine the subsequent processing based on the obtained validity verification result. Specifically, the validity verification of the dynamic configuration table can include account information verification for the target account identity, application offline package version consistency verification for the application version, and environmental security verification for the application running environment. Subsequently, the terminal can generate a pre-request for target application resource access based on the dynamic configuration table of the resource access interface if the dynamic configuration table is valid.

[0055] In this embodiment, when making a pre-request for the target application, the dynamic configuration table can be first verified for validity, so that when the dynamic configuration table is confirmed to be valid, a pre-request for access to the target application resources is generated, thereby improving the stability of the pre-request implementation process and being able to rely on the dynamic configuration table to ensure the validity of the requested web page resource data.

[0056] In one embodiment, the Figure 4 As shown, the step 206 also includes:

[0057] Step 402: When the dynamic configuration table is invalid, obtain version information of the offline installation package of the target application.

[0058] Among them, since in the Hybrid application architecture, the target application resources are associated with the version of the offline installation package, that is, the resource access interface within the same version usually does not change, the json file of the resource access interface can be stored in the offline package, and the application can update the offline package each time by reading the configuration file therein. The offline installation package may refer to packaging a Web application into an independent resource package, which the user can download to the local device and access and use the application even without a network connection. The H5 offline package usually contains the static resources of the application (HTML, CSS, JavaScript files, etc.) and necessary data files, and the user can open these offline packages through a browser or a specific application. The offline package in this solution may include an H5 offline package, and may also include remote H5, CDN, SSR, NSR, etc. Specifically:

[0059] Remote H5 refers to deploying HTML5 pages (HTML, Hypertext Markup Language) on a remote server, and users access these pages by visiting the address on the remote server. Remote H5 can achieve advantages such as cross-platform, rapid deployment and update, and is suitable for scenarios that require frequent updates and maintenance.

[0060] CDN (Content Distribution Network) refers to a method of caching static resources (such as images, videos, CSS, JavaScript files, etc.) on servers closer to users by deploying node servers around the world, thereby accelerating users' access to these resources. CDN can reduce the load on the source server and improve the access speed and stability of the website.

[0061] SSR (Server-Side Rendering) refers to a technology that renders the pages of a web application on the server side and then sends the rendered pages to the client for display. SSR can improve the first screen loading speed, SEO friendliness and user experience, and is suitable for scenarios that require page loading speed and search engine optimization.

[0062] NSR (Client-Side Rendering) refers to the framework (such as React, Vue, etc.) for front-end development, and dynamically generates page content through client-side rendering. Compared with SSR, NSR has more advantages in interactivity and dynamism, and is suitable for applications that require a lot of interactivity and dynamic content.

[0063] Exemplarily, the terminal may obtain version information of an offline installation package of the target application when the dynamic configuration table is invalid.

[0064] Step 404: Determine a static configuration table of a resource access interface that matches the version information.

[0065] The static configuration table may refer to a configuration table of a resource access interface formed following an offline installation package of a target application, and the static configuration table may be a configuration table containing a full set of resource access interfaces.

[0066] Exemplarily, the terminal may determine a static configuration table of a resource access interface that matches the version information.

[0067] Step 406: Generate a pre-request for accessing the target application resource based on the static configuration table of the resource access interface.

[0068] Exemplarily, when it is determined that the dynamic configuration table is invalid, the terminal may generate a pre-request for target application resource access based on the static configuration table of the resource access interface.

[0069] In this embodiment, when the target user enters the target application, the dynamic configuration table is verified for validity, which helps to pre-determine whether the current dynamic configuration table can adapt to the target user and meet the application startup efficiency and application content adaptation effect. When the dynamic configuration table is confirmed to be invalid, in order to avoid deviation of the application content, the application resources can be pulled through the static configuration table, thereby ensuring that even if the dynamic configuration table fails under the Hybrid application architecture, the efficiency of pre-request processing can be guaranteed.

[0070] In one embodiment, the Figure 5 As shown, step 204 includes:

[0071] Step 502: Obtain the initial dynamic configuration table when the target account calls the resource access interface for the L-1th time to initiate a resource access request.

[0072] Wherein, L is a positive integer greater than or equal to 2.

[0073] Exemplarily, the terminal may obtain the initial dynamic configuration table when the target account calls the resource access interface for the L-1th time to initiate a resource access request.

[0074] Step 504: Based on the resource access interface data obtained when the target account initiates the resource access request for the Lth time, the initial dynamic configuration table is updated to obtain a dynamic configuration table of the resource access interface corresponding to the target account.

[0075] Exemplarily, the terminal may update the initial dynamic configuration table based on the resource access interface data obtained when the target account initiates the resource access request for the Lth time, and obtain the dynamic configuration table of the resource access interface corresponding to the target account.

[0076] In this embodiment, in the generation process of the dynamic configuration table, the terminal can update and iterate the dynamic configuration table when obtaining new resource access interface data, so as to obtain a dynamic configuration table with a higher probability of information validity and a stronger timeliness. In this way, pre-requesting with a dynamic configuration table that is kept updated helps to increase the effective proportion of web resource data obtained by pre-requesting.

[0077] In one embodiment, the Figure 6 As shown, step 504 includes:

[0078] Step 602: Based on the preset capacity of the dynamic configuration table and the resource access interface data obtained by initiating the resource access request for the Lth time, determine the redundant information of the resource access interface of the initial dynamic configuration table.

[0079] Among them, redundancy refers to redundant data or redundant resources, that is, redundant or duplicate data or resources existing in the system. Redundant data may cause problems such as waste of resources, performance degradation, and maintenance difficulties in the system. The preset capacity of the interface may refer to the number of resource access interfaces identified in the dynamic configuration table that is pre-set by the technical staff in order to achieve this solution to improve the application configuration efficiency and the effective data ratio. If the number of resource access interfaces in the dynamic configuration table exceeds the interface capacity regulations, it may lead to defects such as reduced application configuration efficiency and reduced data effective ratio.

[0080] Exemplarily, the terminal can determine the redundant information of the resource access interface of the initial dynamic configuration table based on the preset capacity of the dynamic configuration table and the resource access interface data obtained by initiating the resource access request for the Lth time. The redundant information can refer to the description information of the resource access interface used to describe the redundant part.

[0081] Step 604: Based on the redundant information of the resource access interface, the resource access interface of the initial dynamic configuration table is updated.

[0082] Exemplarily, the terminal may eliminate redundant resource access interfaces in the dynamic configuration table, and maintain the dynamic configuration table to meet a preset interface capacity.

[0083] Exemplarily, the terminal can eliminate redundant resource access interfaces in the dynamic configuration table, thereby maintaining the dynamic configuration table to meet the preset interface capacity. In a specific implementation, the setting of the interface capacity can refer to the threshold of the number of interfaces, or the threshold of the amount of data corresponding to all resource access interfaces. In the specific processing of eliminating redundant interfaces, the LRU (Least Recently Used, classic cache elimination algorithm) elimination strategy can be called for processing, and the LFU (Least Frequently Used, minimum access frequency elimination algorithm) algorithm, random elimination algorithm, etc. can also be used.

[0084] In this embodiment, during the maintenance and management of the dynamic configuration table, the dynamic configuration table is managed through an elimination mechanism so that the dynamic configuration table maintains a specific capacity, which helps to ensure the efficiency and acquisition efficiency of pre-requesting web resource data.

[0085] In one embodiment, the Figure 7 As shown, before step 206, the following steps are included:

[0086] Step 702: Query whether the terminal where the target application is located stores webpage resource data required by the target application.

[0087] In this embodiment, the web page data may refer to web page resource data stored locally in the terminal and directly pulled by the application for application configuration.

[0088] Exemplarily, before making a pre-request, the terminal may query whether the terminal where the target application is located stores the web resource data required by the target application, thereby enabling the application to be configured directly when the local web resource data exists, thereby helping to improve the loading and configuration efficiency of the target application.

[0089] Step 704: if the webpage resource data required by the target application is not found, the step of generating a pre-request for accessing the target application resources based on the dynamic configuration table is executed.

[0090] Exemplarily, when the terminal fails to find the webpage resource data required by the target application, the terminal executes the step of generating a pre-request for accessing the target application resources based on the dynamic configuration table.

[0091] Optionally, the terminal may switch between the two processing modes according to a preset timeout determination mechanism, etc. The specific switching mode may be determined according to the use requirements of the application.

[0092] The timeout judgment mechanism refers to a mechanism that sets a certain time limit to determine whether an operation has timed out in order to prevent the program from running normally due to long waiting or no response during network communication or system operation. When an operation is not completed after exceeding the set time limit, the system will trigger the timeout processing mechanism, and usually perform some preset operations, such as closing the connection, re-requesting, prompting the user, etc.

[0093] Exemplarily, if the response of the target application meets the preset timeout judgment mechanism, it can be determined that the web resource data required by the target application cannot be queried, and then a step of generating a pre-request for target application resource access based on the dynamic configuration table can be executed.

[0094] In this embodiment, when the target user accesses the target application, if there is web resource data that can be directly pulled and used locally in the terminal, the configuration of the target application resources can be achieved directly based on the query and pull of the web resource data, which can improve the configuration efficiency of the target application resources. If it is determined that the currently required web resource data is missing by triggering a pre-set timeout judgment mechanism, etc., an independent web resource data pre-request can be initiated to obtain the required data to meet the configuration requirements of the target application resources, which can improve the stability of application use.

[0095] In one embodiment, the Figure 8 As shown, step 202 includes:

[0096] Step 802: Acquire the resource access interface data, process and assemble the resource access interface data according to a preset format, and obtain updated resource access interface data.

[0097] Exemplarily, after acquiring the resource access interface data, the terminal may process and assemble the resource access interface data according to a preset format to obtain updated resource access interface data, thereby achieving standardized processing of the data.

[0098] The step 204 includes:

[0099] Step 804: Generate the dynamic configuration table corresponding to the target account according to the updated resource access interface data.

[0100] Exemplarily, the terminal may generate a dynamic configuration table corresponding to the target account according to the updated resource access interface data.

[0101] In this embodiment, in the generation process of the dynamic configuration table, the resource access interface data is processed and assembled according to a preset format, which helps to improve the generation efficiency and stability of the dynamic configuration table.

[0102] In an exemplary embodiment, the Fig. 9 As shown, the details are as follows:

[0103] (1) In the scenario where the target user uses the target application, when user A downloads the APP, it can be assumed that the offline installation package version is v1 and the user id is user1.

[0104] (2) When user A opens the APP for the first time, the APP uses the built-in static configuration table v1.json to complete the first web resource data pre-request and configure the target application resources. After the target application is started, when the JS file is executed to obtain the first screen data, it will first ask the client whether the corresponding web resource data has been stored. If the web resource data has been obtained at this time, there is no need to initiate a request. Otherwise, the timeout mechanism is used to determine whether a separate pre-request needs to be initiated.

[0105] In practice, each time the terminal pulls web resource data or initiates an independent pre-request, it records the request information such as the interface URL, request method, parameters, offline package version, userID, and current timestamp, etc., assembles it in the format, and transmits the notification to the APP for recording. After receiving the notification, the APP stores a customized dynamic configuration table (user1.v1.hot.json) associated with the target user locally, and manages this configuration table using the LRU elimination strategy (LRU, Least Recently Used, a classic cache elimination algorithm). After multiple records of application resource requests, a complete dynamic configuration table customized for user A of version v1 can be formed in the terminal.

[0106] Later, when user A enters the APP again, a diff judgment can be made based on information such as userID and the current offline package version to determine whether the user1.v1.hot.json dynamic configuration table is available. If available, the dynamic configuration table is used for pre-request. If not available, it falls back to using the v1.json static configuration table for pre-request.

[0107] Repeat the above processing for user access to the app. If the offline installation package version has not changed and the user has not been switched, the resource access interface configuration list can be dynamic to the greatest extent. If the offline installation package version is updated and the user is switched, the APP can differentiate whether it is available based on the version and userID information recorded in the user1.v1.hot.json dynamic configuration table. If it is not available, the above steps for generating a dynamic configuration table can be repeated to generate a new customized dynamic configuration table.

[0108] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0109] Based on the same inventive concept, the embodiment of the present application also provides a webpage resource request device for implementing the webpage resource request method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of one or more webpage resource request devices provided below can refer to the limitations of the webpage resource request method above, and will not be repeated here.

[0110] In one embodiment, Fig.10 As shown, a device for requesting web page resources is provided, including: an acquisition module, a configuration table generation module, a pre-request generation module and a transceiver module.

[0111] An acquisition module, configured to acquire first data of a target application, wherein the first data includes resource access interface data corresponding to a resource access request of a target account;

[0112] A configuration table generating module, used to generate a dynamic configuration table corresponding to the target account according to the resource access interface data, wherein the dynamic configuration table is used to configure the resource access interface;

[0113] A pre-request generation module, configured to generate a pre-request for resource access of the target application based on the dynamic configuration table in response to a startup operation of the target application;

[0114] The transceiver module is used to send the pre-request and receive web page resource data in response to the pre-request.

[0115] In one embodiment, the pre-request generation module includes:

[0116] The valid situation processing module is used to generate a pre-request for accessing the target application resource based on the dynamic configuration table of the resource access interface when the dynamic configuration table is valid.

[0117] In one embodiment, the pre-request generation module further includes:

[0118] An invalid situation processing module, used for obtaining version information of the offline installation package of the target application when the dynamic configuration table is invalid;

[0119] A static configuration table query module, used to determine a static configuration table of a resource access interface that matches the version information;

[0120] The static configuration table application module is used to generate a pre-request for accessing the target application resource based on the static configuration table of the resource access interface.

[0121] In one embodiment, the configuration table generation module includes:

[0122] An initial configuration table module, used to obtain the initial dynamic configuration table when the target account calls the resource access interface for the L-1th time to initiate a resource access request;

[0123] The configuration table updating module is used to update the initial dynamic configuration table based on the resource access interface data obtained by the target account initiating the resource access request for the Lth time, and obtain the dynamic configuration table of the resource access interface corresponding to the target account; wherein L is a positive integer greater than or equal to 2. .

[0124] In one embodiment, the configuration table updating module includes:

[0125] A capacity management module, configured to determine redundant information of the resource access interface of the initial dynamic configuration table based on the preset capacity of the dynamic configuration table and the resource access interface data obtained by initiating the resource access request for the Lth time;

[0126] The redundancy elimination module is used to update the resource access interface of the initial dynamic configuration table based on the redundant information of the resource access interface.

[0127] In one embodiment, the pre-request generation module includes:

[0128] A local query module, used to query whether the terminal where the target application is located stores the webpage resource data required by the target application;

[0129] The independent pre-request module is used to execute the step of generating a pre-request for accessing the target application resources based on the dynamic configuration table when the webpage resource data required by the target application is not found.

[0130] In one embodiment, the acquisition module includes:

[0131] A data preprocessing module, used to obtain the resource access interface data, process and assemble the resource access interface data according to a preset format, and obtain updated resource access interface data;

[0132] The configuration table generating module comprises:

[0133] The second configuration table generating module is used to generate the dynamic configuration table corresponding to the target account according to the updated resource access interface data.

[0134] Each module in the above-mentioned webpage resource request device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0135] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.11As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for requesting a webpage resource is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0136] Those skilled in the art will understand that Fig.11 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0137] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0138] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0139] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0140] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0141] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0142] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0143] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for requesting web page resources, characterized in that: The method comprises: Acquire first data of a target application, wherein the first data includes resource access interface data corresponding to a resource access request of a target account; Generate a dynamic configuration table corresponding to the target account according to the resource access interface data, wherein the dynamic configuration table is used to configure the resource access interface; In response to a start-up operation of the target application, generating a pre-request for resource access of the target application based on the dynamic configuration table; The pre-request is sent, and web page resource data in response to the pre-request is received.

2. The method according to claim 1, characterized in that The generating a pre-request for accessing the target application resource based on the dynamic configuration table includes: When the dynamic configuration table is valid, a pre-request for accessing the target application resource is generated based on the dynamic configuration table of the resource access interface.

3. The method according to claim 2, characterized in that The generating a pre-request for accessing the target application resource based on the dynamic configuration table further includes: When the dynamic configuration table is invalid, obtaining version information of the offline installation package of the target application; Determine a static configuration table of resource access interfaces that matches the version information; Based on the static configuration table of the resource access interface, a pre-request for accessing the target application resource is generated.

4. The method according to claim 1, characterized in that: The step of generating a dynamic configuration table corresponding to the target account according to the resource access interface data includes: Obtaining the initial dynamic configuration table when the target account calls the resource access interface for the L-1th time to initiate a resource access request; Based on the resource access interface data obtained when the target account initiates the resource access request for the Lth time, the initial dynamic configuration table is updated to obtain a dynamic configuration table of the resource access interface corresponding to the target account; Wherein, L is a positive integer greater than or equal to 2.

5. The method according to claim 4, characterized in that The updating of the initial dynamic configuration table based on the resource access interface data obtained when the target account initiates the resource access request for the Lth time includes: Determine redundant information of the resource access interface of the initial dynamic configuration table based on the preset capacity of the dynamic configuration table and the resource access interface data obtained by initiating the resource access request for the Lth time; Based on the redundant information of the resource access interface, the resource access interface of the initial dynamic configuration table is updated.

6. The method according to any one of claims 1 to 5, characterized in that: Before generating a pre-request for accessing the target application resource based on the dynamic configuration table, the method includes: Querying whether the terminal where the target application is located stores web resource data required by the target application; In the case where the webpage resource data required by the target application is not found, the step of generating a pre-request for accessing the target application resources based on the dynamic configuration table is performed.

7. The method according to any one of claims 1 to 5, characterized in that: The obtaining the first data of the target application includes: Acquire the resource access interface data, process and assemble the resource access interface data according to a preset format, and obtain updated resource access interface data; The step of generating a dynamic configuration table corresponding to the target account according to the resource access interface data includes: The dynamic configuration table corresponding to the target account is generated according to the updated resource access interface data.

8. A webpage resource request device, characterized in that: The device comprises: An acquisition module, configured to acquire first data of a target application, wherein the first data includes resource access interface data corresponding to a resource access request of a target account; A configuration table generating module, used to generate a dynamic configuration table corresponding to the target account according to the resource access interface data, wherein the dynamic configuration table is used to configure the resource access interface; A pre-request generation module, configured to generate a pre-request for resource access of the target application based on the dynamic configuration table in response to a startup operation of the target application; The transceiver module is used to send the pre-request and receive web page resource data in response to the pre-request.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Resource access method and device, computer equipment and storage medium

    CN109902257A

  • Webpage resource acquisition method and device

    CN111159614A

  • Page display method and device, electronic equipment and storage medium

    CN113722638A

  • Page rendering method, electronic equipment and storage medium

    CN113761408A

  • Page display method and device, storage medium and computer equipment

    CN115934241A