Request method, device and equipment of web page resource and storage medium

By generating a dynamic configuration table and pre-requests for accessing target application resources, the problem of low processing efficiency in complex request scenarios in existing technologies is solved, achieving more efficient acquisition of web resource data and configuration of application resources.

CN119149838BActive Publication Date: 2026-11-24MASHANG CONSUMER FINANCE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411045061.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-30
Publication Date
2026-11-24
Estimated Expiration
2044-07-30

AI Technical Summary

Technical Problem

Existing methods for requesting web resources are inefficient in complex request scenarios and cannot effectively improve the targeting and validity of pre-requests.

Method used

By obtaining the first data of the target application, a dynamic configuration table is generated. Based on the dynamic configuration table, a pre-request for accessing the target application's resources is generated, excluding low-relevance interfaces and improving the efficiency and validity of the pre-request.

Benefits of technology

It improves the targeting and data validity of pre-requests, simplifies resource access interfaces, and enhances the efficiency of application resource requests and configurations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119149838B_ABST
    Figure CN119149838B_ABST
Patent Text Reader

Abstract

This application relates to the field of computer technology, and in particular to a method, apparatus, computer device, storage medium, and computer program product for requesting web page resources. The method includes: acquiring first data of a target application, the first data including resource access interface data corresponding to a resource access request of a target account; generating a dynamic configuration table corresponding to the target account based on the resource access interface data, the dynamic configuration table being used to configure the resource access interface; generating 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; sending the pre-request; and receiving web page resource data in response to the pre-request. This method can improve the efficiency of requesting web page resources in complex request scenarios and the validity of the obtained resource access interface data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, computer device, storage medium, and computer program product for requesting web resources. Background Technology

[0002] To implement API pre-request, a list of APIs to be requested is first required. The client will obtain the configuration after the application starts, read the page address to be requested and the corresponding API information. When the user opens WebView (a graphical tool), the corresponding pre-requested APIs will be initiated in parallel and the results will be saved for subsequent queries by JS (JavaScript, an interpreted scripting language).

[0003] In related technologies, resource configuration schemes for interface pre-requesting include: fixed interface list configuration, remote distribution configuration, and integrated configuration files. However, these configuration schemes suffer from low efficiency in handling complex request scenarios. Summary of the Invention

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

[0005] Firstly, this application provides a method for requesting web page resources. The method includes:

[0006] Obtain first data of the target application, the first data including resource access interface data corresponding to the resource access request of the target account;

[0007] Based on the resource access interface data, a dynamic configuration table corresponding to the target account is generated, and the dynamic configuration table is used to configure the resource access interface.

[0008] In response to the startup operation of the target application, a pre-request for access to the target application's resources is generated based on the dynamic configuration table;

[0009] Send the pre-request and receive the web page resource data in response to the pre-request.

[0010] Secondly, this application also provides a device for requesting web page resources. The device includes:

[0011] The acquisition module is used to acquire the first data of the target application, the first data including the resource access interface data corresponding to the resource access request of the target account;

[0012] The configuration table generation module is used to generate a dynamic configuration table corresponding to the target account based on the resource access interface data. The dynamic configuration table is used to configure the resource access interface.

[0013] A pre-request generation module is used to generate a pre-request for accessing the target application's resources based on the dynamic configuration table in response to the target application's startup operation.

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

[0015] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of a web page resource request method as described in any embodiment of the first aspect.

[0016] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps of a web page resource request method as described in any embodiment of the first aspect.

[0017] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the steps of a web page resource request method as described in any embodiment of the first aspect.

[0018] The aforementioned method, apparatus, computer device, storage medium, and computer program product for requesting web page resources, derived from the technical features in the claims, can achieve the following beneficial effects corresponding to the technical problems in the background art:

[0019] By acquiring the first data of the target application, the resource access interface data corresponding to the resource access requests of the target account is obtained. Based on this resource access interface data, a dynamic configuration table corresponding to the target account is generated. This dynamic configuration table records and summarizes the resource access interface data corresponding to resource access requests in the target account's history. Subsequently, when the target application starts, the terminal responds to the application's startup operation and generates a pre-request for target application resource access based on the dynamic configuration table. The resource access interfaces included in this pre-request are corresponding to the target account, excluding those with low relevance to the target account. This improves the validity of the web resource data obtained from the pre-request and also increases the efficiency of the pre-request. In implementation, this application's solution, within the framework of the pre-request, improves the targeting of the resource access interface pre-request by forming a customized dynamic configuration table for the target account, thereby improving the efficiency of application resource requesting and configuration. Furthermore, in the specific implementation of the pre-request, the customized dynamic configuration table for the target account simplifies the required resource access interfaces, thereby increasing the effective data ratio of the web resource data obtained in the response. Attached Figure Description

[0020] Figure 1 This is an application environment diagram of a web page resource request method in one embodiment;

[0021] Figure 2 This is a schematic diagram of the first process of a method for requesting web page resources in one embodiment;

[0022] Figure 3 This is a second flowchart illustrating a method for requesting web page resources in another embodiment;

[0023] Figure 4 This is a third flowchart illustrating a method for requesting web page resources in another embodiment;

[0024] Figure 5 This is a schematic diagram of the fourth process of a method for requesting web page resources in another embodiment;

[0025] Figure 6 This is a fifth flowchart illustrating a method for requesting web page resources in another embodiment;

[0026] Figure 7 This is a sixth flowchart illustrating a method for requesting web page resources in another embodiment;

[0027] Figure 8 This is a schematic diagram of the seventh process of a method for requesting web page resources in another embodiment;

[0028] Figure 9This is a flowchart illustrating a method for requesting web page resources in a specific embodiment.

[0029] Figure 10 This is a structural block diagram of a web page resource request device in one embodiment;

[0030] Figure 11 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0031] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0032] In related technologies, to implement API pre-requests, a configuration list of APIs to be requested is first required. The client obtains this configuration after the app starts, reads the page addresses to be requested and the corresponding API information, and when the user opens the WebView, the corresponding pre-requested APIs are initiated in parallel, and the results are saved for subsequent queries by JavaScript. Currently, there are many solutions for providing API configuration, mainly divided into: fixed API list configuration, remote configuration distribution, and integrated configuration files.

[0033] However, current methods for requesting web page resources have the following technical problems:

[0034] Existing methods for implementing pre-requested resources in interfaces suffer from low efficiency in handling complex request scenarios.

[0035] Based on this, the web resource request method provided in this application embodiment can be applied to, for example, Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or placed on a cloud or other network server. Specifically, in an environment such as... Figure 1In the illustrated application environment, terminal 102 can be used to store and run the application software (APP) required by the user. This application software can adopt a hybrid development architecture, i.e., a native app plus an H5 program. During the user's use of the application software, the application software itself can load the H5 program page through a Webview to implement business operations requiring high flexibility. Server 104 can refer to an application server that responds to data requests initiated from terminal 102, and can store application resources such as configuration files and media data related to application operation. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc. Portable wearable devices can include smartwatches, smart bracelets, head-mounted devices, etc. Server 104 can be implemented using a standalone server or a server cluster composed of multiple servers.

[0036] In one embodiment, such as Figure 2 As shown, a method for requesting web page resources is provided, which can be applied to... Figure 1 Taking the terminal in the example, the explanation includes the following steps:

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

[0038] Here, "resources" can refer to data resources used to configure and manage application content. These can include application settings, parameters, options, database connection information, media file paths, and access permissions. Resources are provided by the application client when the user launches or uses the application. "Resource access interface data" refers to log information obtained from recording the user's application resource request behavior. This can include the URL of the resource access interface, request method, parameters, offline package version, user ID, and current timestamp. Specifically, resources can also include configuration files such as JSON, XML, and JS. "First data" can refer to log data recorded in the target application, including resource access interface data corresponding to the target account's resource access requests.

[0039] For example, with sufficient authorization and permission, the terminal can obtain the first data of the target application, and then obtain 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 based on the resource access interface data. The dynamic configuration table is used to configure the resource access interface.

[0041] The dynamic configuration table can refer to a personalized resource access interface table associated with the target account. It 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 therefore it is associated with the target account as a dynamic configuration table.

[0042] For example, after obtaining 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 resource access interface data that can identify the personalized needs of the target account.

[0043] Step 206: In response to the startup operation of the target application, generate a pre-request for access to the target application resources based on the dynamic configuration table.

[0044] Pre-requesting refers to loading necessary data in advance before the application starts or user interaction occurs, thereby reducing user waiting time. Pre-requesting requires determining the resource access interface for web page resources. Target application resources can refer to the data or resources required by the application when it starts or user interaction occurs, including page data, images, videos, and style sheets. Startup operations refer to interactive operations that trigger the target application to transition from a closed state to an open state.

[0045] For example, the terminal can monitor the status of the target application's application. When a startup operation of the target application is detected, the terminal can respond to the startup operation by generating a pre-request for access to the target application's resources based on the dynamic configuration table. Specifically, the terminal can monitor the target application by monitoring its entry file, startup page, etc.

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

[0047] For example, after sending a pre-request, the terminal can receive webpage resource data in response to the pre-request. In this way, the terminal can use the received webpage resource data to implement content configuration for the target application, such as completing the initial rendering of the target application, thereby improving the loading efficiency of the target application. Content configuration refers to the process of managing and customizing resources such as text content, images, videos, and audio in the target application through configuration files or other resources. Content configuration helps developers and users flexibly manage and adjust the displayed content of the application to meet the requirements of different user groups and needs.

[0048] In the above-described method for requesting web page resources, by reasonably deducing the technical features in the embodiments, the following beneficial effects can be achieved in solving the technical problems raised in the background art:

[0049] By acquiring the first data of the target application, the resource access interface data corresponding to the resource access requests of the target account is obtained. Based on this resource access interface data, a dynamic configuration table corresponding to the target account is generated. This dynamic configuration table records and summarizes the resource access interface data corresponding to resource access requests in the target account's history. Subsequently, when the target application starts, the terminal responds to the application's startup operation and generates a pre-request for target application resource access based on the dynamic configuration table. The resource access interfaces included in this pre-request are corresponding to the target account, excluding those with low relevance to the target account. This improves the validity of the web resource data obtained from the pre-request and also increases the efficiency of the pre-request. In implementation, this application's solution, within the framework of the pre-request, improves the targeting of the resource access interface pre-request by forming a customized dynamic configuration table for the target account, thereby improving the efficiency of application resource requesting and configuration. Furthermore, in the specific implementation of the pre-request, the customized dynamic configuration table for the target account simplifies the required resource access interfaces, thereby increasing the effective data ratio of the web resource data obtained in the response.

[0050] In one embodiment, it can be as follows Figure 3 As shown, step 206 includes:

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

[0052] For example, the terminal can perform validity verification on the dynamic configuration table and obtain the validity verification result.

[0053] Among them, validity verification refers to the process of detecting the availability status of dynamic configuration tables according to a preset process. Validity verification can avoid the application of invalid dynamic configuration tables and improve the stability of the process.

[0054] For example, when a terminal initiates a pre-request in response to an application's startup operation, it can first verify the validity of the dynamic configuration table, and then determine the subsequent processing based on the 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 environment security verification for the application runtime environment. Subsequently, if the dynamic configuration table is valid, the terminal can generate a pre-request for accessing the target application resources based on the dynamic configuration table of the resource access interface.

[0055] In this embodiment, when making a pre-request for the target application, the validity of the dynamic configuration table can be verified first. If the dynamic configuration table is confirmed to be valid, a pre-request for accessing the target application resources can be generated, thereby improving the stability of the pre-request implementation process and ensuring the validity of the web page resource data obtained by the request by relying on the dynamic configuration table.

[0056] In one embodiment, it can be as follows Figure 4 As shown, step 206 further includes:

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

[0058] In this hybrid application architecture, the target application resources are version-dependent with the offline installation package. This means that resource access interfaces within the same version typically remain unchanged. Therefore, the JSON file containing the resource access interfaces can be stored in the offline package, allowing the application to update the package by reading the configuration file. An offline installation package can refer to packaging a web application into a standalone resource package that users can download to their local devices and access and use the application even without a network connection. H5 offline packages typically contain the application's static resources (HTML, CSS, JavaScript files, etc.) and necessary data files. Users can open these offline packages through a browser or a specific application. The offline packages in this solution can include H5 offline packages, as well as remote H5, CDN, SSR, NSR, etc., specifically:

[0059] Remote H5 refers to deploying HTML5 pages (HTML, Hypertext Markup Language) on a remote server, allowing users to access these pages by visiting an address on the remote server. Remote H5 offers advantages such as cross-platform compatibility, rapid deployment, and updates, making it suitable for scenarios requiring frequent updates and maintenance.

[0060] A CDN (Content Delivery Network) is a network that caches static resources (such as images, videos, CSS, JavaScript files, etc.) on servers closer to users by deploying node servers around the world, thereby accelerating the access speed of these resources. A CDN can reduce the load on the origin server and improve website access speed and stability.

[0061] Server-Side Rendering (SSR) is a technology that renders web application pages on the server side before sending the rendered pages to the client for display. SSR can improve first-screen loading speed, SEO friendliness, and user experience, making it suitable for scenarios where page loading speed and search engine optimization are critical.

[0062] NSR (Network Rendering) refers to the use of frameworks (such as React, Vue, etc.) in front-end development to dynamically generate page content through client-side rendering. Compared to SSR, NSR has advantages in interactivity and dynamism, making it suitable for applications that require a large amount of interaction and dynamic content.

[0063] For example, the terminal can obtain the version information of the offline installation package of the target application when the dynamic configuration table is invalid.

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

[0065] Among them, the static configuration table can refer to the configuration table of resource access interfaces formed with the offline installation package of the target application. The static configuration table can be a configuration table containing all resource access interfaces.

[0066] For example, the terminal can determine a static configuration table of resource access interfaces that match the version information.

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

[0068] For example, if the dynamic configuration table is determined to be invalid, the terminal can generate a pre-request for access to the target application's resources based on the static configuration table of the resource access interface.

[0069] In this embodiment, when a target user enters the target application, the validity of the dynamic configuration table is verified. This helps to pre-determine whether the current dynamic configuration table can adapt to the target user and meet the requirements of application startup efficiency and application content adaptation. When the dynamic configuration table is confirmed to be invalid, application resources can be fetched using a static configuration table to avoid deviations in application content. This ensures that even if the dynamic configuration table fails, the efficiency of pre-request processing can still be guaranteed under the Hybrid application architecture.

[0070] In one embodiment, it can be as follows Figure 5 As shown, step 204 includes:

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

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

[0073] For example, the terminal can obtain the initial dynamic configuration table when the target account initiates a resource access request by calling the resource access interface for the L-1th time.

[0074] Step 504: Based on the resource access interface data obtained from the Lth resource access request initiated by the target account, update the initial dynamic configuration table to obtain the dynamic configuration table of the resource access interface corresponding to the target account.

[0075] For example, the terminal can update the initial dynamic configuration table based on the resource access interface data obtained from the Lth resource access request initiated by the target account, and obtain the dynamic configuration table of the resource access interface corresponding to the target account.

[0076] In this embodiment, during the generation of the dynamic configuration table, the terminal can update and iterate the dynamic configuration table when obtaining new resource access interface data, thereby obtaining a dynamic configuration table with a higher probability of information validity and better timeliness. This approach of pre-requesting with an updated dynamic configuration table helps to improve the effective proportion of web resource data obtained through pre-requesting.

[0077] In one embodiment, it can be as follows 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 from the Lth resource access request, determine the redundancy information of the resource access interface of the initial dynamic configuration table.

[0079] Redundancy refers to redundant data or resources, that is, excess or duplicate data or resources existing in the system. Redundant data may lead to problems such as resource waste, performance degradation, and maintenance difficulties. The preset capacity of the interface refers to the number of resource access interfaces identified in the dynamic configuration table that needs to be pre-set by technical personnel to achieve the goal of improving application configuration efficiency and data validity in this solution. If the number of resource access interfaces in the dynamic configuration table exceeds the interface capacity limit, it may lead to reduced application configuration efficiency and a lower data validity rate.

[0080] For example, the terminal can determine the redundancy information of the resource access interfaces in the initial dynamic configuration table based on the preset capacity of the dynamic configuration table and the resource access interface data obtained from the Lth resource access request. The redundancy information may refer to descriptive information used to describe the redundant parts of the resource access interfaces.

[0081] Step 604: Update the resource access interfaces in the initial dynamic configuration table based on the redundancy information of the resource access interfaces.

[0082] For example, the terminal can eliminate redundant resource access interfaces in the dynamic configuration table and maintain the dynamic configuration table to meet the preset interface capacity.

[0083] For example, the terminal can evict redundant resource access interfaces in the dynamic configuration table, thereby maintaining the dynamic configuration table to meet the preset interface capacity. In specific implementations, the interface capacity setting can refer to a threshold for the number of interfaces or a threshold for the amount of data corresponding to all resource access interfaces. In the specific processing of redundant interface eviction, the LRU (Least Recently Used, a classic cache eviction algorithm) eviction policy can be invoked, or the LFU (Least Frequently Used, a least frequent access eviction algorithm) algorithm, random eviction algorithms, etc., can also be used.

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

[0085] In one embodiment, it can be as follows 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 the web page resource data required by the target application.

[0087] In this embodiment, web page data can refer to web page resource data that is stored locally on the terminal and can be directly retrieved by the application for application configuration.

[0088] For example, before making a pre-request, the terminal can query whether the terminal where the target application is located stores the web page resource data required by the target application, so that the application configuration can be performed directly if the local web page resource data exists, thereby helping to improve the loading and configuration efficiency of the target application.

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

[0090] For example, if the terminal does not find the web page resource data required by the target application, it performs the step of generating a pre-request for accessing the target application resources based on a dynamic configuration table.

[0091] Optionally, the terminal can switch between the two processing methods based on a preset timeout judgment mechanism or other means. The specific switching method can be determined according to the application's usage needs.

[0092] The timeout detection mechanism refers to a mechanism used in network communication or system operation to prevent programs from malfunctioning due to prolonged waiting or lack of response. It sets a time limit to determine if an operation has timed out. When an operation fails to complete within the set time limit, the system triggers the timeout handling mechanism, typically performing pre-defined actions such as closing the connection, re-requesting, or prompting the user.

[0093] For example, if the response of the target application meets the preset timeout judgment mechanism, it can be determined that the web page resource data required by the target application cannot be found. Then, the step of generating a pre-request for accessing the target application resources based on the dynamic configuration table can be executed.

[0094] In this embodiment, when a target user accesses a target application, if the terminal has web resource data that can be directly retrieved and used locally, the configuration of the target application resources can be achieved directly based on the query and retrieval 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, 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, it can be as follows Figure 8 As shown, step 202 includes:

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

[0097] For example, after obtaining resource access interface data, the terminal can process and assemble the resource access interface data according to a preset format to obtain updated resource access interface data, thereby achieving data standardization.

[0098] Step 204 includes:

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

[0100] For example, the terminal can generate a dynamic configuration table corresponding to the target account based on the updated resource access interface data.

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

[0102] In one exemplary embodiment, it can be as follows: Figure 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, we can assume 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 pre-request of web page resource data and configure the target application resources. After the target application starts, when the JS file starts to obtain the first screen data, it will first ask the client whether the corresponding web page resource data is already stored. If the web page resource data has been obtained at this time, there is no need to initiate a request. Otherwise, it will determine whether a separate pre-request needs to be initiated through timeout mechanism, etc.

[0105] In implementation, each time the terminal retrieves webpage 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. This information is then assembled according to a specified format and sent to the app for recording. Upon 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 an LRU eviction policy (Least Recently Used, a classic cache eviction algorithm). After recording multiple application resource requests, a complete customized dynamic configuration table for user A in version v1 can be formed on the terminal.

[0106] Subsequently, when user A re-enters the app, the app can use information such as userID and the current offline package version to perform a diff to determine whether the dynamic configuration table user1.v1.hot.json is available. If it is available, the app uses the dynamic configuration table for pre-request; otherwise, it falls back to using the static configuration table v1.json for pre-request.

[0107] Repeating the above processing for user access to the app, the resource access interface configuration list can be dynamically updated to the maximum extent, provided the offline installation package version remains unchanged and the user is not switched. If scenarios such as offline installation package version updates or user switching occur, the app can use the version and userID information recorded in the user1.v1.hot.json dynamic configuration table to differentiate whether access is available. If it is unavailable, the steps to generate the dynamic configuration table described above can be repeated to generate a new, customized dynamic configuration table.

[0108] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0109] Based on the same inventive concept, this application also provides a web resource requesting apparatus for implementing the above-described web resource requesting method. The solution provided by this apparatus is similar to the implementation described in the above-described method; therefore, the specific limitations of one or more embodiments of the web resource requesting apparatus provided below can be found in the limitations of the web resource requesting method described above, and will not be repeated here.

[0110] In one embodiment, such as Figure 10 As shown, a web page resource request device is provided, including: an acquisition module, a configuration table generation module, a pre-request generation module, and a sending and receiving module.

[0111] The acquisition module is used to acquire the first data of the target application, the first data including the resource access interface data corresponding to the resource access request of the target account;

[0112] The configuration table generation module is used to generate a dynamic configuration table corresponding to the target account based on the resource access interface data. The dynamic configuration table is used to configure the resource access interface.

[0113] A pre-request generation module is used to generate a pre-request for accessing the target application's resources based on the dynamic configuration table in response to the target application's startup operation.

[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 case processing module is used to generate a pre-request for accessing the target application resources 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] The invalid case handling module is used to obtain the version information of the offline installation package of the target application when the dynamic configuration table is invalid;

[0119] The static configuration table query module is used to determine the static configuration table of the 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 resources based on the static configuration table of the resource access interface.

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

[0122] The initial configuration table module is used to obtain the initial dynamic configuration table when the target account initiates a resource access request by calling the resource access interface for the L-1th time.

[0123] The configuration table update module is used to update the initial dynamic configuration table based on the resource access interface data obtained from the Lth resource access request initiated by the target account, thereby obtaining a dynamic configuration table for the resource access interface corresponding to the target account; where L is a positive integer greater than or equal to 2.

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

[0125] The capacity management module is used to determine the redundancy information of the resource access interface in the initial dynamic configuration table based on the preset capacity of the dynamic configuration table and the resource access interface data obtained by the Lth resource access request.

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

[0127] In one embodiment, prior to the pre-request generation module, the following is included:

[0128] The local query module is used to query whether the terminal where the target application is located stores the web page resource data required by the target application.

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

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

[0131] The data preprocessing module is used to acquire the resource access interface data, process and assemble the resource access interface data according to a preset format, and obtain the updated resource access interface data.

[0132] The configuration table generation module includes:

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

[0134] The modules in the aforementioned web resource request device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0135] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 11As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements a method for requesting web resources. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0136] Those skilled in the art will understand that Figure 11 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0137] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0138] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.

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

[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, data stored, data displayed, 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 related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0141] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media 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), magnetic 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. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0142] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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 embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for requesting web page resources, characterized in that, The method includes: Obtain first data of the target application, the first data including resource access interface data corresponding to the resource access request of the target account; Based on the resource access interface data, a dynamic configuration table corresponding to the target account is generated. This dynamic configuration table is used to configure the resource access interface, including: Obtain the initial dynamic configuration table when the target account initiates a resource access request via the resource access interface for the (L-1)th time; based on the preset capacity of the dynamic configuration table and the resource access interface data obtained from the Lth resource access request, determine the redundancy information of the resource access interfaces in the initial dynamic configuration table; based on the redundancy information of the resource access interfaces, update the resource access interfaces in the initial dynamic configuration table to obtain the dynamic configuration table of the resource access interfaces corresponding to the target account; where L is a positive integer greater than or equal to 2. In response to the startup operation of the target application, a pre-request for access to the target application's resources is generated based on the dynamic configuration table; Send the pre-request and receive the web page resource data in response to the pre-request.

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

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

4. The method according to any one of claims 1 to 3, characterized in that, Before generating the pre-request for accessing the target application resources based on the dynamic configuration table, the process includes: Check whether the terminal where the target application is located stores the web page resource data required by the target application; If the web page 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.

5. The method according to any one of claims 1 to 3, characterized in that, The acquisition of the first data of the target application includes: The resource access interface data is obtained, and the resource access interface data is processed and assembled according to a preset format to obtain the updated resource access interface data. The step of generating a dynamic configuration table corresponding to the target account based on the resource access interface data includes: Based on the updated resource access interface data, generate the dynamic configuration table corresponding to the target account.

6. A device for requesting web page resources, characterized in that, The device includes: The acquisition module is used to acquire the first data of the target application, the first data including the resource access interface data corresponding to the resource access request of the target account; The configuration table generation module is used to generate a dynamic configuration table corresponding to the target account based on the resource access interface data. The dynamic configuration table is used to configure the resource access interface, including: Obtain the initial dynamic configuration table when the target account initiates a resource access request via the resource access interface for the (L-1)th time; based on the preset capacity of the dynamic configuration table and the resource access interface data obtained from the Lth resource access request, determine the redundancy information of the resource access interfaces in the initial dynamic configuration table; based on the redundancy information of the resource access interfaces, update the resource access interfaces in the initial dynamic configuration table to obtain the dynamic configuration table of the resource access interfaces corresponding to the target account; where L is a positive integer greater than or equal to 2. A pre-request generation module is used to generate a pre-request for accessing the target application's resources based on the dynamic configuration table in response to the target application's startup operation. The transceiver module is used to send the pre-request and receive web page resource data in response to the pre-request.

7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.

9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Page rendering method, electronic equipment and storage medium

    CN113761408A

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

    CN115934241A