Resource access request processing method and device, equipment and storage medium

By detecting and obtaining the target configuration file when the network page is loaded, and querying the domain name replacement rules for automatic domain name update, the problems of low execution efficiency and high operation and maintenance costs after the domain name change are solved, and the stability of resource access and user experience are improved.

CN120223755APending Publication Date: 2025-06-27GUANGZHOU BAIGUOYUAN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510268163.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-07
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

After the domain name is changed in the prior art, the execution efficiency is low, tedious manual operations are required, and the operation and maintenance costs are high, which affects the user experience.

Method used

By detecting the target configuration file when the network page is triggered to load, if it is not stored, the configuration file will be obtained through dual network channels in parallel, and after receiving the configuration file, query whether there is a domain name replacement rule, intercept the request for domain name update, and send the updated request.

Benefits of technology

It realizes domain name replacement, restores resource access capabilities, does not require manual operations, ensures business stability and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120223755A_ABST
    Figure CN120223755A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a resource access request processing method and device, equipment and a storage medium, and the method comprises the steps: detecting whether a target configuration file is stored or not under the condition of triggering the loading of a network page; and under the condition that the target configuration file is not stored, sending a first network request to the target resource server, sending a second network request to the proxy server, receiving the target configuration file fed back by the target resource server or the proxy server, and under the condition that the resource access request is detected, sending a second network request to the proxy server. Querying whether a target domain name replacement rule matched with the resource access request exists in the target configuration file, intercepting the resource access request under the condition that the target domain name replacement rule is queried, and performing domain name updating on the resource access request based on the target domain name replacement rule, and sending the updated resource access request to the target resource server. According to the scheme, domain name replacement is realized, the resource access capability is recovered, manual operation is not needed, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technologies, and in particular, to a method, apparatus, device, and storage medium for processing resource access requests. Background Art

[0002] In network applications, a web view control needs to request page resources from a resource server and load a page based on the obtained page resources. The page resources include pictures, videos, script files, cascading style sheets, etc., which can meet the visual experience and functional requirements of different users. However, since the domain names associated with some regions or network service providers may change or become invalid, it is impossible to normally obtain page resources and load the page, seriously affecting the display and interaction of the page. For users, the failure to load the page or the loss of page resources will cause a significant decline in the usage experience, thereby affecting the stability of the business and user retention.

[0003] In related technologies, the domain name is changed by manually modifying the server-side code, and the page is republished to restore normal resource access. However, the foregoing method has low execution efficiency, requires relatively cumbersome manual operations, has high operation and maintenance costs, and also affects the user experience. Summary of the Invention

[0004] The embodiments of the present application provide a method, apparatus, and device for processing resource access requests, which solve the problems in related technologies that the execution efficiency for domain name change is low, requires relatively cumbersome manual operations, has high operation and maintenance costs, and also affects the user experience. It can implement domain name replacement, restore the resource access ability, without manual operations, can ensure the stability of the business, and improve the user experience.

[0005] In a first aspect, the embodiments of the present application provide a method for processing resource access requests, and the method includes:

[0006] When a network page loading is triggered, detecting whether a target configuration file is stored;

[0007] When the target configuration file is not stored, sending a first network request to a target resource server to enable the target resource server to feedback the target configuration file, and sending a second network request to a proxy server to enable the proxy server to feedback the target configuration file obtained by requesting the target resource server;

[0008] Receive the target configuration file fed back by the target resource server or the proxy server. When a resource access request is detected, query whether there is a target domain name replacement rule in the target configuration file that matches the resource access request. When the target domain name replacement rule is found, intercept the resource access request, update the domain name of the resource access request based on the target domain name replacement rule, and send the updated resource access request to the target resource server.

[0009] In a second aspect, an embodiment of the present application further provides a resource access request processing device, which includes:

[0010] A configuration file detection module, configured to detect whether a target configuration file is stored when a network page load is triggered;

[0011] A configuration file acquisition module, configured to send a first network request to the target resource server to make the target resource server feedback the target configuration file, and send a second network request to the proxy server to make the proxy server feedback the target configuration file obtained by requesting the target resource server when the target configuration file is not stored;

[0012] A request update processing module, configured to receive the target configuration file fed back by the target resource server or the proxy server. When a resource access request is detected, query whether there is a target domain name replacement rule in the target configuration file that matches the resource access request. When the target domain name replacement rule is found, intercept the resource access request, update the domain name of the resource access request based on the target domain name replacement rule, and send the updated resource access request to the target resource server.

[0013] In a third aspect, an embodiment of the present application further provides a resource access request processing device, which includes:

[0014] One or more processors;

[0015] A storage device, configured to store one or more programs,

[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the resource access request processing method described in the embodiments of the present application.

[0017] In a fourth aspect, an embodiment of the present application further provides a non-volatile storage medium storing computer-executable instructions, and the computer-executable instructions are configured to execute the resource access request processing method described in the embodiments of the present application when executed by a computer processor.

[0018] Fifth aspect, an embodiment of the present application further provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor of the device reads and executes the computer program, so that the device executes the resource access request processing method described in the embodiment of the present application.

[0019] In the embodiment of the present application, when a network page loading is triggered, it is detected whether a target configuration file is stored; if the target configuration file is not stored, a first network request is sent to the target resource server to enable the target resource server to feedback the target configuration file, and a second network request is sent to the proxy server to enable the proxy server to feedback the target configuration file obtained by requesting the target resource server; the target configuration file feedback by the target resource server or the proxy server is received. When a resource access request is detected, it is queried whether there is a target domain name replacement rule in the target configuration file that matches the resource access request. If a target domain name replacement rule is queried, the resource access request is intercepted, the domain name of the resource access request is updated based on the target domain name replacement rule, and the updated resource access request is sent to the target resource server. In the above solution, when the target configuration file is not stored, a first network request is sent to the target resource server and a second network request is sent to the proxy server respectively, which can realize parallel acquisition of the target configuration file through dual network channels, improve the success rate of obtaining the target configuration file, and help to perform domain name update of the resource access request subsequently. By querying whether there is a target domain name replacement rule in the target configuration file that matches the resource access request, it can effectively confirm whether the domain name of the resource access request has changed or is invalid, and when a target domain name replacement rule is queried, the resource access request is intercepted and the domain name of the resource access request is updated based on the target domain name replacement rule, which can realize domain name replacement, restore the resource access ability, without manual operation, and can ensure the stability of the service and improve the user experience. Description of the Drawings

[0020] Figure 1 It is a flowchart of a resource access request processing method provided by an embodiment of the present application;

[0021] Figure 2 It is a flowchart of a resource access request processing method provided by an embodiment of the present application that includes a process of querying a target domain name replacement rule that matches a resource access request;

[0022] Figure 3 It is a flowchart of a resource access request processing method provided by an embodiment of the present application that includes a process of performing domain name update on a resource access request;

[0023] Figure 4Flowchart of a resource access request processing method provided by an embodiment of the present application, which includes a process of determining an alternative domain name corresponding to network attribute information;

[0024] Figure 5 Flowchart of a resource access request processing method provided by an embodiment of the present application, which includes a process of request processing through an exception handling script;

[0025] Figure 6 Flowchart of a resource access request processing method provided by an embodiment of the present application, which includes a process of requesting to obtain an exception handling script;

[0026] Figure 7 Flowchart of a resource access request processing method provided by an embodiment of the present application, which includes a process of domain name update without intercepting resource access requests;

[0027] Figure 8 Block diagram of a resource access request processing device provided by an embodiment of the present application;

[0028] Figure 9 Structural schematic diagram of a resource access request processing device provided by an embodiment of the present application. Detailed implementation manners

[0029] The following further describes the embodiments of the present application in detail with reference to the drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the embodiments of the present application, rather than limiting the embodiments of the present application. Additionally, it should be noted that for the sake of description, only parts related to the embodiments of the present application are shown in the drawings, rather than all structures.

[0030] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same category, and do not limit the number of objects. For example, the first object can be one or multiple. In addition, "and / or" in the specification and claims means at least one of the connected objects, and the character " / " generally represents an "or" relationship between the associated objects before and after.

[0031] The resource access request processing method provided by the embodiments of this application can obtain the target configuration file in parallel through a dual network channel, match the target domain name replacement rule corresponding to the resource access request in the target configuration file, and update the domain name of the resource access request based on the target domain name replacement rule to achieve domain name replacement. No manual operation is required, which can ensure the stability of the service. Related application scenarios can include web browsing within a network application, etc., and the embodiments of this application do not limit this. The resource access request processing method, device, equipment, and storage medium provided by the embodiments of this application aim to solve the problems in the related art that the execution efficiency for domain name change is relatively low, manual operations are relatively cumbersome, the operation and maintenance cost is relatively high, and it will also affect the user experience.

[0032] For the resource access request processing method provided by the embodiments of this application, the execution subject of each step can be a computer device, which refers to any electronic device with data calculation, processing, and storage capabilities, such as terminal devices like mobile phones, PCs (Personal Computers), and tablet computers. The embodiments of this application do not limit this.

[0033] Figure 1 It is a flowchart of a resource access request processing method provided by the embodiments of this application. As Figure 1 shown, it includes the following steps:

[0034] Step S101, when a network page load is triggered, detect whether the target configuration file is stored.

[0035] Among them, the target configuration file can be a domain name replacement rule for domain name update stored in advance. Specifically, the developer can edit and generate the target configuration file and publish it on the target resource server, which can be provided to the user terminal for request and download. The target resource server can be a server that stores or provides specific page resources, target configuration files, scripts, etc. Therefore, when a network page load is triggered, it can be regarded as starting to enter the page loading process of the network application, and it is possible to first detect whether the target configuration file is stored to facilitate subsequent domain name update of the resource access request. The target configuration file can be obtained by requesting and downloading from the target resource server in advance.

[0036] Step S102, when the target configuration file is not stored, send a first network request to the target resource server to make the target resource server feedback the target configuration file, and send a second network request to the proxy server to make the proxy server feedback the target configuration file obtained by requesting the target resource server.

[0037] Among them, if the target configuration file is not stored, this embodiment correspondingly sets two network channels to obtain the target configuration file. Specifically, the relevant step process can be executed by the set web front-end. The web front-end can be used to send data requests, pull data content and display pages, including creating pages using HTML5 (HyperText Markup Language), performing style design using CSS (Cascading Style Sheets), and implementing interactive logic using JavaScript. In one embodiment, the first network channel can be to send a first network request from the web front-end to the target resource server. The first network request can be an HTTPS (Hypertext Transfer Protocol Secure) request to obtain the target configuration file and listen for the return result. Among them, the first network request will pass through load balancing components including but not limited to LVS and NGINX. After receiving the first network request, the target resource server can query and return the target configuration file. After the web front-end listens for the result to be returned, it can receive the target configuration file. In one embodiment, the second network channel can be to request the target configuration file from the set client based on the JSBridge (JavaScript Bridge) interface from the web front-end, and the client can send a second network request to the proxy server. The client can be used to initialize the web view component to load the web page, provide the JSBridge interface for the web front-end to obtain data, and maintain a long connection with the proxy server to obtain data from the target resource server. The proxy server can be used to provide a routing function similar to a gateway, maintain a long connection with the client, and convert the external network domain name corresponding to the request into an internal network domain name when receiving the client request, and send an HTTP request with the same request content to the target resource server based on the internal network domain name. Among them, a long connection private channel based on the TCP protocol can be established between the client and the proxy server. The proxy server can parse the URL (Uniform Resource Locator) corresponding to the target configuration file from the second network request, replace its external network domain name with the internal network domain name, and then send an HTTP request to the target resource server based on the URL after domain name replacement. After receiving the HTTP request, the target resource server can query and return the target configuration file to the proxy server. The proxy server transparently transmits the target configuration file to the client. Through the client, the target configuration file can be returned to the web front-end based on the JSBridge interface. After the web front-end listens for the result to be returned, it can receive the target configuration file.It can be understood that the proxy server and the target resource server in the second network channel communicate through the internal network and are not affected or restricted by the external network environment. Therefore, if the first network channel fails to directly obtain the target configuration file from the target resource server due to reasons such as domain name change or invalidation, or network quality, the target configuration file can also be obtained through the second network channel, enabling parallel requests for the target configuration file through the two network channels, which can improve the success rate of obtaining the target configuration file.

[0038] Step S103: Receive the target configuration file fed back by the target resource server or the proxy server. When a resource access request is detected, query whether there is a target domain name replacement rule in the target configuration file that matches the resource access request. If a target domain name replacement rule is found, intercept the resource access request, update the domain name of the resource access request based on the target domain name replacement rule, and send the updated resource access request to the target resource server.

[0039] Since step S102 is to parallelly request the target configuration file through the two network channels, as long as the target configuration file fed back by either the target resource server or the proxy server is received, the subsequent domain name update process can continue. After receiving the target configuration file, if a resource access request is detected, it can first query whether there is a target domain name replacement rule in the target configuration file that matches the resource access request. The target domain name replacement rule can be pre-set with domain name replacement information related to the specific network attributes of the resource access request, which can specifically be geographical location attributes, network service attributes, etc. For example, the domain names associated with certain regions may change or become invalid, and corresponding target domain name replacement rules related to that region can be set for domain name update. Another example is that the domain names associated with certain network service providers may also change or become invalid, and corresponding target domain name replacement rules related to that network service can be set for domain name update. If a target domain name replacement rule is found, it indicates that the domain name of the current resource access request needs to be updated. Otherwise, directly obtaining the page resources based on this resource access request is likely to fail, resulting in the inability to normally load the page resources. Therefore, it is necessary to determine the alternative domain name that matches the resource access request based on this target domain name replacement rule, intercept the currently detected resource access request, replace the current domain name of the resource access request with the alternative domain name, and send the updated resource access request to the target resource server for the target resource server to feedback the page resources.

[0040] As described above, when triggering the loading of a network page, it is detected whether a target configuration file is stored; when the target configuration file is not stored, a first network request is sent to the target resource server to enable the target resource server to feedback the target configuration file, and a second network request is sent to the proxy server to enable the proxy server to feedback the target configuration file obtained by requesting the target resource server; the target configuration file feedback by the target resource server or the proxy server is received. When a resource access request is detected, it is queried whether there is a target domain name replacement rule in the target configuration file that matches the resource access request. When the target domain name replacement rule is queried, the resource access request is intercepted, the domain name of the resource access request is updated based on the target domain name replacement rule, and the updated resource access request is sent to the target resource server. In the above solution, when the target configuration file is not stored, a first network request is sent to the target resource server and a second network request is sent to the proxy server respectively, which can implement parallel acquisition of the target configuration file through dual network channels, improve the success rate of obtaining the target configuration file, and contribute to subsequent domain name update of the resource access request. By querying whether there is a target domain name replacement rule in the target configuration file that matches the resource access request, it can be effectively confirmed whether the domain name of the resource access request has changed or is invalid. When the target domain name replacement rule is queried, the resource access request is intercepted and the domain name of the resource access request is updated based on the target domain name replacement rule, which can implement domain name replacement, restore the resource access ability, without manual operation, ensure the stability of the service, and improve the user experience.

[0041] Figure 2 FIG. is a flowchart of a resource access request processing method including a process of querying a target domain name replacement rule matching a resource access request provided by an embodiment of the present application. As Figure 2 shown, it includes the following steps:

[0042] Step S201: When triggering the loading of a network page, detect whether a target configuration file is stored.

[0043] Step S202: When the target configuration file is not stored, send a first network request to the target resource server to enable the target resource server to feedback the target configuration file, and send a second network request to the proxy server to enable the proxy server to feedback the target configuration file obtained by requesting the target resource server.

[0044] Step S203: Receive the target configuration file feedback by the target resource server or the proxy server. When a resource access request is detected, extract network attribute information from the resource access request, and query whether there is a target domain name replacement rule in the target configuration file that matches the network attribute information.

[0045] Among them, since the domain names associated with some regions or network service providers may change or become invalid, the network attribute information in the resource access request can be extracted accordingly. The network attribute information can specifically reflect the geographical location attribute, network service attribute, etc. of the resource access request. Thus, the target configuration file can be queried according to the network attribute information to determine whether there is a matching target domain name replacement rule, so as to determine whether domain name update is required.

[0046] Step S204, in the case where a target domain name replacement rule is queried, intercept the resource access request, update the domain name of the resource access request based on the target domain name replacement rule, and send the updated resource access request to the target resource server.

[0047] As described above, by querying whether there is a target domain name replacement rule in the target configuration file that matches the network attribute information, it can be effectively determined whether the domain name of the resource access request needs to be updated, which is beneficial to timely processing of resource access requests that may have access anomalies and guarantees the user experience.

[0048] Figure 3 This is a flowchart of a resource access request processing method provided by an embodiment of the present application, which includes a process of updating the domain name of a resource access request. As Figure 3 shown, it includes the following steps:

[0049] Step S301, when a network page loading is triggered, detect whether a target configuration file is stored.

[0050] Step S302, in the case where the target configuration file is not stored, send a first network request to the target resource server to make the target resource server feedback the target configuration file, and send a second network request to the proxy server to make the proxy server feedback the target configuration file obtained by requesting the target resource server.

[0051] Step S303, receive the target configuration file feedback by the target resource server or the proxy server. When a resource access request is detected, extract the network attribute information from the resource access request, and query whether there is a target domain name replacement rule in the target configuration file that matches the network attribute information.

[0052] Step S304, in the case where a target domain name replacement rule is queried, intercept the resource access request, determine the alternative domain name corresponding to the network attribute information according to the target domain name replacement rule, update the domain name of the resource access request to the alternative domain name, and send the updated resource access request to the target resource server.

[0053] Among them, the network attribute information may include one or more network attributes, for example, geographical location attribute, network service attribute, etc. If the target domain name replacement rule is set with domain name replacement information associated with multiple target network attributes in the network attribute information, in one embodiment, the multiple target network attributes may be used as parallel search conditions to determine a matching alternative domain name from the target domain name replacement rule. In one embodiment, each target network attribute may be used as an individual search condition to separately determine multiple candidate domain name sets that match from the target domain name replacement rule, and the intersection of the multiple candidate domain name sets is obtained to get the alternative domain name.

[0054] As described above, by determining the alternative domain name corresponding to the network attribute information according to the target domain name replacement rule, it is possible to effectively determine the alternative domain name that is adapted to the network attributes corresponding to the resource access request, which is applicable to scenarios where the domain name changes or becomes invalid due to network attribute changes, and improves the success rate of subsequent resource access.

[0055] Figure 4 The figure is a flowchart of a resource access request processing method provided by an embodiment of the present application, which includes a process of determining an alternative domain name corresponding to network attribute information. As Figure 4 shown, it includes the following steps:

[0056] Step S401: When triggering the loading of a network page, detect whether a target configuration file is stored.

[0057] Step S402: When the target configuration file is not stored, send a first network request to the target resource server to enable the target resource server to feedback the target configuration file, and send a second network request to the proxy server to enable the proxy server to feedback the target configuration file requested from the target resource server.

[0058] Step S403: Receive the target configuration file feedback by the target resource server or the proxy server. When detecting a resource access request, extract the network attribute information from the resource access request, and query whether there is a target domain name replacement rule in the target configuration file that matches the network attribute information. Among them, the network attribute information includes a country code and an operator identifier, and the target domain name replacement rule includes a domain name mapping relationship.

[0059] Step S404: When a target domain name replacement rule is queried, intercept the resource access request, query the domain name mapping relationship according to the country code and the operator identifier to determine the corresponding alternative domain name, update the domain name of the resource access request to the alternative domain name, and send the updated resource access request to the target resource server.

[0060] Among them, the network attribute information may include a country code and an operator identifier. The country code can be used to represent the geographical location to which the resource access request belongs, and the operator identifier can be used to represent the network service provider to which the resource access request belongs. In the target domain name replacement rule, a domain name mapping relationship with the country code and the operator identifier as query conditions can be set, and a backup domain name can be queried from the domain name mapping relationship based on the country code and the operator identifier.

[0061] As described above, by querying the domain name mapping relationship according to the country code and the operator identifier to determine the corresponding backup domain name, the replaceable backup domain name corresponding to the resource access request can be accurately matched and determined, ensuring the normal progress of resource access.

[0062] Figure 5 The figure is a flowchart of a resource access request processing method provided by an embodiment of the present application, which includes a process of processing requests through an exception handling script. As Figure 5 shown, it includes the following steps:

[0063] Step S501, when a network page loading is triggered, detect whether a target configuration file is stored through a pre-stored exception handling script.

[0064] Among them, the exception handling script may include a configuration file detection module, which is used to detect whether a target configuration file is stored. Optionally, the exception handling script may further include a configuration file request module, a domain name replacement rule detection module, a requested domain name update module, and a request sending module. The configuration file request module is used to send corresponding network requests to a target resource server and a proxy server respectively to obtain the target configuration file. The domain name replacement rule detection module is used to query whether there is a target domain name replacement rule in the target configuration file that matches the resource access request. The requested domain name update module is used to intercept the resource access request and update the domain name of the resource access request based on the target domain name replacement rule. The request sending module is used to send the updated resource access request to the target resource server. Specifically, the exception handling script can be edited and generated by a developer and published on the target resource server, and can be provided to the user terminal for request download. Since the user terminal may not have pre-deployed the relevant operation process for domain name update, in this embodiment, a request can be made to the target resource server in advance to download the exception handling script, and when a network page loading is triggered, directly detect whether the target configuration file is stored through the pre-stored exception handling script, and other relevant steps of domain name update.

[0065] Step S502: When the target configuration file is not stored, send a first network request to the target resource server to make the target resource server feedback the target configuration file, and send a second network request to the proxy server to make the proxy server feedback the target configuration file obtained by requesting the target resource server.

[0066] Step S503: Receive the target configuration file feedback by the target resource server or the proxy server. When a resource access request is detected, query whether there is a target domain name replacement rule in the target configuration file that matches the resource access request through an exception handling script. When the target domain name replacement rule is queried, intercept the resource access request, update the domain name of the resource access request based on the target domain name replacement rule, and send the updated resource access request to the target resource server.

[0067] Among them, when a resource access request is detected, the relevant step process of domain name update can be continued through this exception handling script to achieve the interception, domain name replacement and resending of the resource access request.

[0068] Above, by executing the relevant step process of domain name update through the pre-stored exception handling script, the domain name of the resource access request can be updated dynamically and efficiently, adapted to the request processing requirements of different user terminals, and the resource access ability can be guaranteed.

[0069] Figure 6 This is a flowchart of a resource access request processing method provided by an embodiment of the present application, which includes a process of requesting and obtaining an exception handling script. As Figure 6 shown, it includes the following steps:

[0070] Step S601: When a network page loading is triggered, detect whether an exception handling script is stored. When the exception handling script is not stored, send a third network request to the target resource server to make the target resource server feedback the exception handling script, and send a fourth network request to the proxy server to make the proxy server feedback the exception handling script obtained by requesting the target resource server. When the exception handling script feedback by the target resource server or the proxy server is received, store the exception handling script.

[0071] Among them, if the exception handling script is not stored, this embodiment correspondingly sets two network channels to obtain the exception handling script. The first network channel is to request and obtain from the target resource server, and the second network channel is to request and obtain from the proxy server. The proxy server communicates with the target resource server through an internal network. The specific network channel settings can refer to the relevant embodiments of requesting and obtaining the target configuration file mentioned above, which will not be elaborated in this application. If the first network channel fails to directly obtain the exception handling script from the target resource server due to reasons such as domain name change or failure, or network quality, the exception handling script can also be obtained through the second network channel. Implementing parallel requests for the exception handling script through dual network channels can improve the success rate of obtaining the exception handling script.

[0072] Step S602: Detect whether the target configuration file is stored through the pre-stored exception handling script.

[0073] Step S603: In the case where the target configuration file is not stored, send a first network request to the target resource server to make the target resource server feedback the target configuration file, and send a second network request to the proxy server to make the proxy server feedback the target configuration file obtained by requesting the target resource server.

[0074] Step S604: Receive the target configuration file feedback by the target resource server or the proxy server. In the case of detecting a resource access request, query whether there is a target domain name replacement rule in the target configuration file that matches the resource access request through the exception handling script. In the case of querying the target domain name replacement rule, intercept the resource access request, update the domain name of the resource access request based on the target domain name replacement rule, and send the updated resource access request to the target resource server.

[0075] As described above, parallelly obtaining the exception handling script through dual network channels can improve the success rate of obtaining the exception handling script, which is beneficial to the user terminal to deploy the relevant processing flow of domain name update, ensure the normal progress of subsequent automatic domain name update, and help restore the resource access ability.

[0076] Figure 7 This is a flowchart of a resource access request processing method provided by an embodiment of the present application, which includes a process of updating the domain name without intercepting the resource access request. As Figure 7 shown, it includes the following steps:

[0077] Step S701: In the case of triggering the loading of a network page, detect whether the target configuration file is stored.

[0078] Step S702: In the case where the target configuration file is not stored, send a first network request to the target resource server to cause the target resource server to feedback the target configuration file, and send a second network request to the proxy server to cause the proxy server to feedback the target configuration file obtained by requesting the target resource server.

[0079] Step S703: Receive the target configuration file feedback by the target resource server or the proxy server. In the case where a resource access request is detected, query whether there is a target domain name replacement rule in the target configuration file that matches the resource access request.

[0080] Step S704: In the case where a target domain name replacement rule is queried, intercept the resource access request, update the domain name of the resource access request based on the target domain name replacement rule, and send the updated resource access request to the target resource server.

[0081] Step S705: In the case where no target domain name replacement rule is queried, send a resource access request to the target resource server.

[0082] Among them, if no target domain name replacement rule is queried, it means that the domain name of the current resource access request does not need to be updated, and the page resource can be obtained normally by making a request.

[0083] As described above, by confirming whether there is a target domain name replacement rule in the target configuration file that matches the resource access request, it is possible to intercept and process the resource access requests that need to update the domain name, and directly send the resource access requests that do not need to update the domain name, thereby ensuring the normal access of page resources and improving the stability of the service.

[0084] Figure 8 It is a structural block diagram of a resource access request processing device provided by an embodiment of the present application. The device is configured to execute the resource access request processing method provided by the above embodiment, and has corresponding functional modules and beneficial effects for executing the method. As Figure 8 shown, the device includes:

[0085] A configuration file detection module 101, configured to detect whether the target configuration file is stored in the case of triggering the loading of a network page;

[0086] A configuration file acquisition module 102, configured to send a first network request to the target resource server in the case where the target configuration file is not stored, so that the target resource server feedbacks the target configuration file, and send a second network request to the proxy server, so that the proxy server feedbacks the target configuration file obtained by requesting the target resource server;

[0087] The request update processing module 103 is configured to receive the target configuration file fed back by the target resource server or the proxy server, and when detecting a resource access request, query whether there is a target domain name replacement rule in the target configuration file that matches the resource access request. When the target domain name replacement rule is found, intercept the resource access request, update the domain name of the resource access request based on the target domain name replacement rule, and send the updated resource access request to the target resource server.

[0088] As described above, when triggering the loading of a network page, detect whether the target configuration file is stored; when the target configuration file is not stored, send a first network request to the target resource server to enable the target resource server to feed back the target configuration file, and send a second network request to the proxy server to enable the proxy server to feed back the target configuration file obtained by requesting the target resource server; receive the target configuration file fed back by the target resource server or the proxy server, and when detecting a resource access request, query whether there is a target domain name replacement rule in the target configuration file that matches the resource access request. When the target domain name replacement rule is found, intercept the resource access request, update the domain name of the resource access request based on the target domain name replacement rule, and send the updated resource access request to the target resource server. In the above solution, when the target configuration file is not stored, send a first network request to the target resource server and a second network request to the proxy server respectively, which can realize parallel acquisition of the target configuration file through dual network channels, improve the success rate of obtaining the target configuration file, and help perform domain name update of the resource access request subsequently. By querying whether there is a target domain name replacement rule in the target configuration file that matches the resource access request, it can effectively confirm whether the domain name of the resource access request has changed or is invalid, and when the target domain name replacement rule is found, intercept the resource access request and update the domain name of the resource access request based on the target domain name replacement rule, which can realize domain name replacement, restore the resource access ability, without manual operation, and can ensure the stability of the service and improve the user experience.

[0089] In a possible embodiment, the request update processing module 103 is further configured to:

[0090] Extract network attribute information from the resource access request;

[0091] Query whether there is a target domain name replacement rule in the target configuration file that matches the network attribute information.

[0092] In a possible embodiment, the request update processing module 103 is further configured to:

[0093] Determine the alternative domain name corresponding to the network attribute information according to the target domain name replacement rule;

[0094] Update the domain name of the resource access request to the alternative domain name.

[0095] In a possible embodiment, the network attribute information includes a country code and an operator identifier, the target domain name replacement rule includes a domain name mapping relationship, and the request update processing module 103 is further configured to:

[0096] Query the domain name mapping relationship according to the country code and the operator identifier to determine the corresponding alternative domain name.

[0097] In a possible embodiment, the configuration file detection module 101 is further configured to:

[0098] Detect whether the target configuration file is stored through a pre-stored exception handling script;

[0099] In a possible embodiment, the request update processing module 103 is further configured to:

[0100] Query whether there is a target domain name replacement rule matching the resource access request in the target configuration file through the exception handling script.

[0101] In a possible embodiment, it further includes an exception handling script acquisition module, configured to:

[0102] Detect whether the exception handling script is stored. In the case where the exception handling script is not stored, send a third network request to the target resource server to cause the target resource server to feedback the exception handling script, and send a fourth network request to the proxy server to cause the proxy server to feedback the exception handling script obtained by requesting the target resource server;

[0103] In the case of receiving the exception handling script fed back by the target resource server or the proxy server, store the exception handling script.

[0104] In a possible embodiment, it further includes an access request sending module, configured to:

[0105] In the case where the target domain name replacement rule is not queried, send a resource access request to the target resource server.

[0106] Figure 9 The structural schematic diagram of a resource access request processing device provided by an embodiment of the present application is shown in Figure 9 As shown, the device includes a processor 201, a memory 202, an input device 203, and an output device 204; the number of processors 201 in the device can be one or more, Figure 9 Taking one processor 201 as an example; the processor 201, the memory 202, the input device 203, and the output device 204 in the device can be connected through a bus or other means, Figure 9Take the bus connection as an example. The memory 202, as a computer-readable storage medium, can be configured to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the resource access request processing method in the embodiments of the present application. The processor 201 executes various functional applications and data processing of the device by running the software programs, instructions, and modules stored in the memory 202, that is, implements the above-mentioned resource access request processing method. The input device 203 can be configured to receive input digital or character information, and generate key signal inputs related to the user settings and function controls of the device. The output device 204 can include display devices such as a display screen.

[0107] The embodiments of the present application also provide a non-volatile storage medium containing computer-executable instructions. The computer-executable instructions are configured to execute a resource access request processing method described in one of the above embodiments when executed by a computer processor. The method includes: when a network page loading is triggered, detecting whether a target configuration file is stored; when the target configuration file is not stored, sending a first network request to a target resource server to cause the target resource server to feedback the target configuration file, and sending a second network request to a proxy server to cause the proxy server to feedback the target configuration file obtained by requesting the target resource server; receiving the target configuration file feedback by the target resource server or the proxy server, when a resource access request is detected, querying whether there is a target domain name replacement rule in the target configuration file that matches the resource access request, and when the target domain name replacement rule is queried, intercepting the resource access request, updating the domain name of the resource access request based on the target domain name replacement rule, and sending the updated resource access request to the target resource server.

[0108] It should be noted that in the embodiments of the above-mentioned resource access request processing device, the included units and modules are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of the functional units are only for the convenience of mutual distinction and are not configured to limit the protection scope of the embodiments of the present application.

[0109] In some possible implementation manners, various aspects of the method provided in the present application can also be implemented in the form of a program product, which includes program code. When the program product runs on a computer device, the program code is configured to cause the computer device to execute the steps in the methods according to various exemplary embodiments of the present application described above in this specification. For example, the computer device can execute the resource access request processing method recorded in the embodiments of the present application. The program product can be implemented by any combination of one or more readable media.

Claims

1. A method for processing a resource access request, characterized in that: include: When the network page loading is triggered, detect whether the target configuration file is stored; In the case where the target configuration file is not stored, sending a first network request to a target resource server so that the target resource server feeds back the target configuration file, and sending a second network request to a proxy server so that the proxy server feeds back the target configuration file obtained by requesting the target resource server; Receive the target configuration file fed back by the target resource server or the proxy server, and when a resource access request is detected, query whether there is a target domain name replacement rule that matches the resource access request in the target configuration file, and when the target domain name replacement rule is found, intercept the resource access request, update the domain name of the resource access request based on the target domain name replacement rule, and send the updated resource access request to the target resource server.

2. The resource access request processing method according to claim 1, characterized in that: The querying whether there is a target domain name replacement rule matching the resource access request in the target configuration file includes: extracting network attribute information from the resource access request; The target configuration file is queried to determine whether there is a target domain name replacement rule that matches the network attribute information.

3. The resource access request processing method according to claim 2, characterized in that: The updating of the domain name of the resource access request based on the target domain name replacement rule includes: Determine the alternate domain name corresponding to the network attribute information according to the target domain name replacement rule; The domain name of the resource access request is updated to the backup domain name.

4. The resource access request processing method according to claim 3, characterized in that: The network attribute information includes a country code and an operator identifier, the target domain name replacement rule includes a domain name mapping relationship, and determining the backup domain name corresponding to the network attribute information according to the target domain name replacement rule includes: The domain name mapping relationship is queried according to the country code and the operator identifier to determine a corresponding backup domain name.

5. The resource access request processing method according to claim 1, characterized in that: The detecting whether the target configuration file is stored includes: Whether the target configuration file is stored is detected through a pre-stored exception handling script.

6. The resource access request processing method according to claim 5, characterized in that: The querying whether there is a target domain name replacement rule matching the resource access request in the target configuration file includes: The exception handling script is used to query whether there is a target domain name replacement rule matching the resource access request in the target configuration file.

7. The resource access request processing method according to claim 5, characterized in that: Before detecting whether the target configuration file is stored by using the pre-stored exception handling script, the method further includes: Detecting whether an exception handling script is stored, and if the exception handling script is not stored, sending a third network request to the target resource server so that the target resource server feeds back the exception handling script, and sending a fourth network request to the proxy server so that the proxy server feeds back the exception handling script obtained by requesting the target resource server; When the exception handling script fed back by the target resource server or the proxy server is received, the exception handling script is stored.

8. The resource access request processing method according to any one of claims 1 to 7, characterized in that: After querying whether there is a target domain name replacement rule matching the resource access request in the target configuration file, the method further includes: When the target domain name replacement rule is not found, the resource access request is sent to the target resource server.

9. A resource access request processing device, characterized in that: include: a configuration file detection module, configured to detect whether a target configuration file is stored when a network page load is triggered; a configuration file acquisition module, configured to, when the target configuration file is not stored, send a first network request to a target resource server so that the target resource server feeds back the target configuration file, and send a second network request to a proxy server so that the proxy server feeds back the target configuration file obtained by requesting the target resource server; The request update processing module is configured to receive the target configuration file fed back by the target resource server or the proxy server, and when a resource access request is detected, query whether there is a target domain name replacement rule matching the resource access request in the target configuration file, and when the target domain name replacement rule is found, intercept the resource access request, perform a domain name update on the resource access request based on the target domain name replacement rule, and send the updated resource access request to the target resource server.

10. A resource access request processing device, the device comprising: one or more processors; A storage device configured to store one or more programs, when the one or more programs are executed by the one or more processors, enables the one or more processors to implement the resource access request processing method described in any one of claims 1-8.

11. A non-volatile storage medium storing computer executable instructions, wherein the computer executable instructions are configured to execute the resource access request processing method according to any one of claims 1 to 8 when executed by a computer processor.

12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the resource access request processing method according to any one of claims 1 to 8 is implemented.