Pre-sending server access method, device and system and storage medium
By intercepting and updating the acquisition request on the user terminal, and using the intermediate server to access the pre-release server, the problem of cumbersome operations in the existing technology is solved, convenient access to the pre-release server is achieved, and the testing experience is improved.
Patent Information
- Application Number
- CN202310342542.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-31
- Publication Date
- 2024-10-01
AI Technical Summary
In the existing technology, the test terminal needs to install an HTTPS certificate and modify the network proxy and firewall to achieve access to the pre-release server. The operation steps are cumbersome, resulting in a poor testing experience for testers.
By intercepting the acquisition request on the user terminal, updating the request based on the parsed access page code, sending it to the intermediate server, allowing it to access the pre-release server, and returning the response data to the user terminal, realizing convenient access to the pre-release server.
Without cumbersome configuration, user terminals can easily access the pre-release server, simplifying the testing process and improving testers' experience.
Smart Images

Figure CN118740918A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of computer technology, and in particular to a pre-send server access method, device, system and storage medium. Background Art
[0002] During the application project development process, the application project needs to be deployed on the pre-release server for sufficient testing to ensure that there are no problems before the application project is deployed on the online server, and then users can access the tested application project based on the online server. Therefore, during the application project development stage, how to access the application project deployed on the pre-release server based on the test terminal is particularly important.
[0003] In the prior art, a host proxy can be configured for a test terminal based on tools such as whistlejs and fiddler. By configuring the host, the test terminal is forced to jump to the pre-send server when accessing the online server.
[0004] In the process of implementing the present invention, the inventors found that there are at least the following technical problems in the prior art:
[0005] It is necessary to install an HTTPS certificate on the test terminal, modify the network proxy of the test terminal, and modify the firewall to configure the host. The operation steps are cumbersome, resulting in a poor testing experience for testers. Summary of the invention
[0006] The present invention provides a pre-sending server access method, device, system and storage medium, so as to access the pre-sending server based on a user terminal, and the user terminal does not need complicated configuration.
[0007] In a first aspect, an embodiment of the present invention provides a pre-sending server access method, which is applied to a user terminal and includes:
[0008] Intercepting a user's acquisition request triggered based on an access page, and updating the acquisition request according to a proxy rule to obtain a pre-sent acquisition request, wherein the proxy rule is obtained by parsing an access page code corresponding to the access page;
[0009] Sending the pre-sent acquisition request to an intermediate server, so that the intermediate server accesses the pre-sent server based on the pre-sent acquisition request, and determining response data corresponding to the pre-sent acquisition request in the pre-sent server;
[0010] Receive and display the response data sent by the intermediate server.
[0011] In a second aspect, an embodiment of the present invention further provides a pre-send server access method, which is applied to an intermediate server, comprising:
[0012] Receiving a pre-sent acquisition request sent by a user terminal and triggered based on an access page;
[0013] Determine the pre-send server domain name according to the pre-send acquisition request;
[0014] The pre-sending server is accessed based on the pre-sending server domain name, response data corresponding to the pre-sending acquisition request is determined in the pre-sending server, and the response data is sent to the user terminal.
[0015] In a third aspect, an embodiment of the present invention further provides a pre-sending server access device, which is configured in a user terminal and includes:
[0016] An interception module, used to intercept a user's acquisition request triggered based on an access page, and update the acquisition request according to a proxy rule to obtain a pre-sent acquisition request, wherein the proxy rule is obtained by parsing an access page code corresponding to the access page;
[0017] A sending module, used for sending the pre-sent acquisition request to an intermediate server, so that the intermediate server accesses the pre-sent server based on the pre-sent acquisition request, and determines the response data corresponding to the pre-sent acquisition request in the pre-sent server;
[0018] An execution module is used to receive and display the response data sent by the intermediate server.
[0019] In a fourth aspect, an embodiment of the present invention further provides a pre-send server access device, which is configured on an intermediate server and includes:
[0020] A receiving module, used for receiving a pre-sent acquisition request sent by a user terminal and triggered based on an access page;
[0021] A determination module, used to determine a pre-send server domain name according to the pre-send acquisition request;
[0022] An execution module is used to access the pre-sending server based on the pre-sending server domain name, determine the response data corresponding to the pre-sending acquisition request in the pre-sending server, and send the response data to the user terminal.
[0023] In the fifth aspect, an embodiment of the present invention further provides a user terminal, which includes: one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the pre-send server access method as described in any one of the first aspects.
[0024] In the sixth aspect, an embodiment of the present invention further provides an intermediate server, comprising: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the pre-send server access method as described in any one of the second aspects.
[0025] In the seventh aspect, an embodiment of the present invention further provides a pre-send server access system, characterized in that the pre-send server access system includes: a user terminal and an intermediate server, wherein the user terminal is used to execute the pre-send server access method as described in any one of the first aspect, and the intermediate server is used to execute the pre-send server access method as described in any one of the second aspect.
[0026] In an eighth aspect, an embodiment of the present invention further provides a storage medium comprising computer executable instructions, wherein the computer executable instructions, when executed by a computer processor, are used to execute the pre-send server access method as described in any one of the first aspect or the second aspect.
[0027] The embodiments of the above invention have the following advantages or beneficial effects:
[0028] An embodiment of the present invention provides a pre-sent server access method, which is applied to a user terminal, and includes: intercepting an acquisition request triggered by a user based on an access page, updating the acquisition request according to a proxy rule to obtain a pre-sent acquisition request, wherein the proxy rule is obtained by parsing an access page code corresponding to the access page; sending the pre-sent acquisition request to an intermediate server so that the intermediate server accesses the pre-sent server based on the pre-sent acquisition request, and determining response data corresponding to the pre-sent acquisition request in the pre-sent server; receiving and displaying the response data sent by the intermediate server. According to the above technical solution, after the user triggers an acquisition request based on an access page, the user terminal can intercept the acquisition request, and update the acquisition request according to the proxy rule obtained by parsing the access page code corresponding to the access page to obtain a pre-sent acquisition request. When it is determined that the URL to be accessed contained in the acquisition request is consistent with the proxy URL contained in the proxy rule, the URL to be accessed in the acquisition request is replaced based on the target domain name contained in the proxy rule to update the acquisition request. The pre-sent acquisition request obtained by updating the acquisition request includes a proxy rule identifier and a service identifier to be accessed. After the user terminal sends the pre-sent acquisition request to the intermediate server, the intermediate server can determine the pre-sent server domain name based on the proxy rule identifier and the service identifier to be accessed contained in the pre-sent acquisition request, and access the pre-sent server based on the pre-sent server domain name. Response data corresponding to the pre-sent acquisition request is determined in the pre-sent server, and the response data is sent to the user terminal. The user terminal receives and displays the response data. The user terminal intercepts the access to the URL to be accessed by intercepting the acquisition request, so that the user terminal can access the pre-sent server based on the intermediate server, thereby achieving convenient access to the pre-sent server. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 A flowchart of a pre-send server access method provided by an embodiment of the present invention;
[0030] Figure 2 A flowchart of another pre-send server access method provided by an embodiment of the present invention;
[0031] Figure 3 A flowchart of another pre-send server access method provided by an embodiment of the present invention;
[0032] Figure 4 A flowchart of another pre-send server access method provided by an embodiment of the present invention;
[0033] Figure 5 A schematic diagram of the structure of a pre-send server access device provided by an embodiment of the present invention;
[0034] Figure 6 A schematic diagram of the structure of another pre-send server access device provided by an embodiment of the present invention;
[0035] Figure 7 A schematic diagram of the structure of a pre-send server access system provided by an embodiment of the present invention;
[0036] Figure 8 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0037] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0038] It should be mentioned before discussing exemplary embodiments in more detail that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe various operations (or steps) as sequential processes, many operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of various operations can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the accompanying drawings. The process can correspond to methods, functions, procedures, subroutines, subprograms, etc. In addition, the embodiments in the present invention and the features in the embodiments can be combined with each other without conflict.
[0039] In the application service development stage, how to access the application service deployed in the pre-release server based on the user terminal can be achieved in two ways in the existing technology. First, the front-end service code can be deployed on a website with a different domain name from the online server. For example, the URL of the front-end code of the application service deployed in the online server is: https: / / static.jd.com, and the URL of the front-end code of the application service deployed in the pre-release server is: https: / / beta-static.jd.com. By deploying it on a different URL from the online one, users can avoid accessing the pre-release server, and testers can access the pre-release server for testing and modification; second, the host proxy can be configured for the test terminal based on tools such as whistlejs and fiddler. By configuring the host, when the test terminal accesses the application service deployed on the online server, it is forced to jump to the application service deployed on the pre-release server.
[0040] For the solution proposed in the first aspect, it is necessary to apply for a domain name for the pre-release server and modify the URL of the front-end project code. When it comes to jump page process testing and page upload parameter testing, the testing is difficult. For the solution proposed in the second aspect, it is necessary to install an HTTPS certificate on the test terminal, and it is also necessary to modify the network proxy of the test terminal and modify the firewall to configure the host. Not only are the operation steps cumbersome, but also involve some network expertise. It is not easy to configure the proxy, resulting in a poor testing experience for testers.
[0041] Therefore, the present application proposes a pre-send server access method to achieve access to the pre-send server based on a test terminal without complicated configuration.
[0042] The pre-send server access method proposed in this application will be described in detail below with reference to the diagrams and embodiments.
[0043] Figure 1 The present invention provides a flowchart of a pre-send server access method. The present invention can be applied to a user terminal and is suitable for situations where convenient access to a pre-send server is required. The method can be executed by a pre-send server access device, which can be implemented by software and / or hardware. Optionally, the pre-send server access device can be configured in a user terminal, which can be a laptop, smart tablet, mobile phone or other electronic device. Figure 1 The method specifically comprises the following steps:
[0044] Step 110: intercept the acquisition request triggered by the user based on the access page, and update the acquisition request according to the proxy rule to obtain a pre-sent acquisition request.
[0045] The proxy rule is obtained by parsing the access page code corresponding to the access page.
[0046] The database of the intermediate server stores the service identifier to be accessed and the proxy rule identifier, and also stores the proxy rule identifier and the proxy rule. The proxy rule may include the proxy website and the target domain name. The intermediate server may generate an access link of the intermediate server according to the intermediate server website, the proxy rule identifier, the service identifier to be accessed and the website to be accessed.
[0047] After the user triggers the access link of the intermediate server based on the user terminal, the access request can be determined and sent to the intermediate server. The intermediate server can replace the URL to be accessed in the access request with the target domain name contained in the proxy rule, and determine the access page code corresponding to the access request in the pre-send server based on the target domain name, and return the access page code to the user terminal, and then the user terminal can render the access page code to obtain the access page.
[0048] The user terminal can also parse the access page code, determine the proxy rules according to the parsing results, and update the page request mode to the target page request mode according to the parsing results. The target page request mode has the function of intercepting requests.
[0049] Specifically, a user clicks on an access page to trigger a request for acquisition. The user terminal can intercept the request for acquisition based on the target page request method and determine whether the URL to be accessed contained in the acquisition request is consistent with the proxy URL contained in the proxy rule. If the URL to be accessed contained in the acquisition request is consistent with the proxy URL contained in the proxy rule, the URL to be accessed contained in the acquisition request is replaced based on the intermediate server URL to update the acquisition request and obtain a pre-sent acquisition request. Compared with an acquisition request, a pre-sent acquisition request carries more data, such as data acquisition method, request parameters, proxy rule identifier, and service identifier to be accessed.
[0050] In an embodiment of the present invention, after a user triggers an acquisition request based on an access page of a user terminal, the user terminal can intercept the acquisition request, and when it is determined that the URL to be accessed contained in the acquisition request is consistent with the proxy URL contained in the proxy rule, the acquisition request is updated to obtain a pre-sent acquisition request. Since the pre-sent acquisition request carries a proxy rule identifier that can be used to access the pre-sent server, the user terminal has the ability to access the pre-sent server.
[0051] Step 120: Send the pre-sent acquisition request to the intermediate server, so that the intermediate server accesses the pre-sent server based on the pre-sent acquisition request, and determines the response data corresponding to the pre-sent acquisition request in the pre-sent server.
[0052] Specifically, the user terminal can send a pre-sent acquisition request to the intermediate server. The intermediate server can determine the pre-sent server domain name based on the proxy rule identifier and the service identifier to be accessed contained in the pre-sent acquisition request, and access the pre-sent server based on the pre-sent server domain name. Then, the pre-sent server can determine the response data corresponding to the pre-sent acquisition request based on the data acquisition method and request parameters contained in the pre-sent acquisition request.
[0053] Step 130: Receive and display the response data sent by the intermediate server.
[0054] Specifically, the user terminal may receive the response data sent by the intermediate server, and display the response data on a next-level page corresponding to the accessed page.
[0055] In an embodiment of the present invention, after the user terminal sends a pre-sent acquisition request to the intermediate server, the intermediate server can determine the response data corresponding to the pre-sent acquisition request in the pre-sent server, and send the response data to the user terminal, so that the user terminal can receive and display the response data and realize access to the pre-sent server.
[0056] The pre-sent server access method provided in an embodiment of the present invention is applied to a user terminal, and includes: intercepting an acquisition request triggered by a user based on an access page, updating the acquisition request according to a proxy rule to obtain a pre-sent acquisition request, wherein the proxy rule is obtained by parsing an access page code corresponding to the access page; sending the pre-sent acquisition request to an intermediate server so that the intermediate server accesses the pre-sent server based on the pre-sent acquisition request, and determining response data corresponding to the pre-sent acquisition request in the pre-sent server; receiving and displaying the response data sent by the intermediate server. According to the above technical solution, after the user triggers an acquisition request based on an access page, the user terminal can intercept the acquisition request, and update the acquisition request according to the proxy rule obtained by parsing the access page code corresponding to the access page to obtain a pre-sent acquisition request. When it is determined that the URL to be accessed contained in the acquisition request is consistent with the proxy URL contained in the proxy rule, the URL to be accessed in the acquisition request is replaced based on the intermediate server URL to update the acquisition request. The pre-sent acquisition request obtained by updating the acquisition request includes a proxy rule identifier and a service identifier to be accessed. After the user terminal sends the pre-sent acquisition request to the intermediate server, the intermediate server can determine the pre-sent server domain name based on the proxy rule identifier and the service identifier to be accessed contained in the pre-sent acquisition request, and access the pre-sent server based on the pre-sent server domain name. Response data corresponding to the pre-sent acquisition request is determined in the pre-sent server, and the response data is sent to the user terminal. The user terminal receives and displays the response data. The user terminal intercepts the access to the URL to be accessed by intercepting the acquisition request, so that the user terminal can access the pre-sent server based on the intermediate server, thereby achieving convenient access to the pre-sent server.
[0057] Figure 2A flowchart of another pre-posting server access method provided by an embodiment of the present invention, the embodiment of the present invention can be applied to a user terminal, and is applicable to situations where convenient access to a pre-posting server is required. Based on the above embodiment, the embodiment of the present invention adds "determining an access request according to the triggering of the user's access link to the intermediate server, and sending the access request to the intermediate server, so that the intermediate server determines the access page code corresponding to the access request; receiving the access page code corresponding to the access request sent by the intermediate server, and rendering the access page code to generate an access page." After receiving the access page code corresponding to the access request sent by the intermediate server, "parsing the access page code, determining the proxy rule according to the parsing result, and updating the page request mode according to the parsing result to obtain the target page request mode, wherein the proxy rule includes a proxy website and a target domain name." After intercepting the acquisition request triggered by the user based on the access page based on the target page request mode, "determining that when the request domain name in the acquisition request is inconsistent with the proxy website, sending the acquisition request to the online server, so that the online server determines the response data corresponding to the acquisition request; receiving and displaying the response data sent by the online server." The explanations of the terms that are the same or corresponding to the above embodiments are not repeated here. See also Figure 2 The pre-send server access method provided by the embodiment of the present invention includes:
[0058] Step 210: Determine an access request according to the triggering of the access link of the intermediate server by the user, and send the access request to the intermediate server so that the intermediate server determines the access page code corresponding to the access request.
[0059] The intermediate server may be a NoHost server.
[0060] The access link of the intermediate server is generated by the intermediate server according to the intermediate server website, the service identifier to be accessed, the proxy rule identifier and the website to be accessed. The link carries the intermediate server website, the service identifier to be accessed, the proxy rule identifier and the website to be accessed. In practical applications, the access link of the intermediate server can be a simple network link or a QR code determined according to the network link. For example, http: / / noHost.jd.com / index.html? rules=rule1&projectId=123&returnUrl=https: / / dem omjd.com / index.html, where http: / / noHost.jd.com / index.html is the intermediate server website, rules=rule1 is the proxy rule identifier, projectId=123 is the service identifier to be accessed, and https: / / demo.m.jd.com / index.html is the website to be accessed.
[0061] Specifically, when the access link of the intermediate server is a network link, the user terminal can determine the access request according to the user's triggering of the access link of the intermediate server, and when the access link of the intermediate server is a QR code, the user terminal can determine the access request by scanning the QR code. Since the access link of the intermediate server carries the service identifier to be accessed and the proxy rule identifier, the access request determined based on the access link of the intermediate server also includes the service identifier to be accessed and the proxy rule identifier.
[0062] The user terminal can send an access request to the intermediate server. The intermediate server can search for the corresponding proxy rule in the database of the intermediate server according to the to-be-accessed service identifier and the proxy rule identifier contained in the access request. The proxy rule may include a proxy website and a target domain name. At this time, the intermediate server can replace the to-be-accessed website contained in the access request with the target domain name. The target domain name here is the pre-send server website. Then, based on the access request, the initial code corresponding to the access request can be determined in the pre-send server, and the proxy rule in the form of a global variable can be inserted into the initial code to obtain the access page code.
[0063] In actual applications, the access pages corresponding to different logged-in users are often different. Therefore, before determining the initial code corresponding to the access request in the pre-send server, the user information can also be determined in the database in the intermediate server according to the user identifier contained in the access request, and the user information is placed in the request header of the access request to access the pre-send server, so as to determine the initial code corresponding to the access request triggered by the user in the pre-send server, and then determine the access page code corresponding to the access request triggered by the user.
[0064] For example, if the proxy URL is https: / / demo.m.jd.com / index.html and the target domain name is 11.127.15.123, when the URL to be accessed contained in the access request is https: / / demo.m.jd.com / index.html, it can be replaced with https: / / 11.127.15.123 / index.html. After setting the request header for the access request based on the user information cookie, the pre-send server is accessed based on the access request, the initial code corresponding to the access request is determined in the pre-send server, the proxy rules are set to the global variables proxyHost and proxyApi, and the global variables are inserted into the initial code corresponding to the access request, and the access page code corresponding to the access request can be obtained.
[0065] In an embodiment of the present invention, the user terminal can determine the access request by the user triggering a network link or scanning a QR code, and access the intermediate server based on the access request, so that the intermediate server further accesses the pre-sending server and determines the access page code in the pre-sending server.
[0066] Step 220: Receive the access page code corresponding to the access request sent by the intermediate server, and render the access page code to generate an access page.
[0067] Specifically, the user terminal may receive an access page code corresponding to the access request sent by the intermediate server, and after receiving the access page code, render the access page code to generate an access page corresponding to the access page code.
[0068] Step 230: parse the access page code, determine the proxy rules according to the parsing result, and update the page request mode according to the parsing result to obtain the target page request mode.
[0069] The proxy rules include a proxy website and a target domain name.
[0070] Specifically, after receiving the access page code, the user terminal can also parse the access page code, determine the proxy rules according to the parsing results, rewrite the page request method according to the parsing results, and obtain the target page request method, which can intercept all requests received by the user terminal. Specifically, the sdk.js file in the access page code can be parsed to obtain the proxy rules. The proxy rules in the access page code can also be parsed to rewrite the page request method to obtain the target page request method.
[0071] In an embodiment of the present invention, the user terminal can receive an access page code corresponding to an access request sent by an intermediate server, can render the access page code to obtain an access page, and can parse the access page code to obtain proxy rules and a target page request method, so that the user terminal has built-in proxy rules and also enables the user terminal to have the function of intercepting requests triggered by the access page.
[0072] Step 240: intercept the acquisition request triggered by the user based on the access page based on the target page request mode, and determine whether the URL to be accessed in the acquisition request is consistent with the proxy URL.
[0073] Specifically, a user clicking on any control in an access page may trigger an acquisition request, and the user terminal may intercept the acquisition request based on a target page request method.
[0074] When it is determined that the URL to be accessed in the acquisition request is consistent with the proxy URL, step 250 is executed; otherwise, step 280 is executed.
[0075] Step 250: Replace the URL to be accessed in the acquisition request based on the intermediate server URL to obtain the pre-sent acquisition request.
[0076] Specifically, if the URL to be accessed contained in the acquisition request is consistent with the proxy URL contained in the proxy rule, the URL to be accessed contained in the acquisition request is replaced based on the intermediate server URL to update the acquisition request and obtain a pre-sent acquisition request, which can access the intermediate server based on the intermediate server URL. Compared with the acquisition request, the pre-sent acquisition request carries more data, such as data acquisition method, request parameters, proxy rule identifier, and service identifier to be accessed.
[0077] For example, when the URL to be accessed is https: / / demo.m.jd.com / api / getName, the proxy URL demo.m.jd.com is matched, so it can be replaced with http: / / noHost.jd.com / api / getName.
[0078] Step 260: Send the pre-sent acquisition request to the intermediate server, so that the intermediate server accesses the pre-sent server based on the pre-sent acquisition request, and determines the response data corresponding to the pre-sent acquisition request in the pre-sent server.
[0079] Specifically, after the user terminal determines that the URL to be accessed in the acquisition request is consistent with the proxy URL, and updates the acquisition request based on the intermediate server URL to obtain a pre-sent acquisition request, the intermediate server can be accessed based on the pre-sent acquisition request. After sending the pre-sent acquisition request to the intermediate server, the intermediate server can determine the pre-sent server domain name in the database based on the proxy rule identifier and the service identifier to be accessed contained in the pre-sent acquisition request, and then access the pre-sent server based on the pre-sent server domain name, and determine the response data corresponding to the pre-sent acquisition request in the pre-sent server to achieve access to the pre-sent server.
[0080] For example, the pre-send server domain name can be determined as http: / / 11.127.15.123 / api / getName in the database based on the proxy rule identifier and the service identifier to be accessed contained in the pre-send request, and the response data corresponding to the pre-send request can be determined in the pre-send server based on the user information, data acquisition method and request parameters contained in the pre-send request.
[0081] In addition, the pre-send acquisition request can also be used to obtain static resources in the pre-send server. As mentioned above, the user terminal can send the pre-send acquisition request to the intermediate server, the intermediate server can forward the pre-send acquisition request to the pre-send server, the pre-send server can determine the static resource corresponding to the pre-send acquisition request and return the static resource to the intermediate server. Of course, the intermediate server can further return the static resource to the user terminal as corresponding data.
[0082] In actual applications, the intermediate server's database may store preset response data corresponding to the proxy rule identifier set by the user and the service identifier to be accessed. After the intermediate server receives the pre-sent acquisition request, it may also determine the response data corresponding to the pre-sent acquisition request in the intermediate server's database based on the proxy rule identifier and the service identifier to be accessed contained in the pre-sent acquisition request.
[0083] Step 270: Receive and display the response data sent by the intermediate server.
[0084] Specifically, the user terminal may receive the response data sent by the intermediate server, and display the response data on a next-level page corresponding to the accessed page.
[0085] In an embodiment of the present invention, after the user terminal sends a pre-sent acquisition request to the intermediate server, the intermediate server can further determine the data corresponding to the pre-sent acquisition request in the pre-sent server, and send the data corresponding to the pre-sent acquisition request to the user terminal, so that the user terminal can receive and display the data corresponding to the pre-sent acquisition request, thereby realizing access to the pre-sent server.
[0086] Step 280: Send the acquisition request to an online server, so that the online server determines response data corresponding to the acquisition request.
[0087] Specifically, if the URL to be accessed included in the acquisition request is inconsistent with the proxy URL included in the proxy rule, the online server is accessed normally based on the URL to be accessed, that is, the acquisition request can be sent to the online server, and the online server can determine the corresponding response data according to the acquisition request.
[0088] Step 290: Receive and display the response data sent by the online server.
[0089] Specifically, the user terminal may receive response data sent by the online server, and display the response data on a next-level page corresponding to the accessed page.
[0090] In an embodiment of the present invention, after the user terminal sends a request to the online server, the online server can determine the response data corresponding to the request and send the response data corresponding to the request to the user terminal. The user terminal can further receive and display the response data corresponding to the request to achieve access to the online server.
[0091] The pre-sent server access method provided by the embodiment of the present invention includes: determining an access request according to the triggering of the access link of the intermediate server by the user, and sending the access request to the intermediate server so that the intermediate server determines the access page code corresponding to the access request; receiving the access page code corresponding to the access request sent by the intermediate server, rendering the access page code to generate an access page; parsing the access page code, determining the proxy rule according to the parsing result, updating the page request method according to the parsing result to obtain the target page request method; intercepting the acquisition request triggered by the user based on the access page based on the target page request method, and determining whether the URL to be accessed in the acquisition request is the same as the proxy URL. whether the to-be-accessed URL in the acquisition request is consistent with the proxy URL; when it is determined that the to-be-accessed URL in the acquisition request is consistent with the proxy URL, the to-be-accessed URL in the acquisition request is replaced based on the intermediate server URL to obtain the pre-sent acquisition request; the pre-sent acquisition request is sent to the intermediate server, so that the intermediate server accesses the pre-sent server based on the pre-sent acquisition request, and the response data corresponding to the pre-sent acquisition request is determined in the pre-sent server; the response data sent by the intermediate server is received and displayed; when it is determined that the request domain name in the acquisition request is inconsistent with the proxy URL, the acquisition request is sent to the online server, so that the online server determines the response data corresponding to the acquisition request; the response data sent by the online server is received and displayed.According to the above technical solution, after the user terminal determines the access request according to the access link of the intermediate server, the access request can be sent to the intermediate server. Since the access link of the intermediate server contains the identifier of the service to be accessed and the identifier of the proxy rule, after receiving the access request, the intermediate server can determine the access page code containing the proxy rule according to the access request, and send the access page code to the user terminal. The user terminal can render the access page code sent by the intermediate server to obtain the access page, and can also parse the access page code, and determine the proxy rule and the target page request method according to the parsing result. The target page request method enables the user terminal to have the ability to intercept all requests triggered based on the access page. Therefore, the user terminal can intercept the user's acquisition request triggered based on the access page, and Determine whether the to-be-accessed URL contained in the acquisition request is consistent with the proxy URL contained in the proxy rule. When it is determined that the to-be-accessed URL in the acquisition request is consistent with the proxy URL, replace the to-be-accessed URL in the acquisition request with the intermediate server URL to obtain a pre-sent acquisition request, and send the pre-sent acquisition request to the intermediate server, so that the intermediate server accesses the pre-sent server based on the pre-sent acquisition request and determines the response data corresponding to the pre-sent acquisition request in the pre-sent server. When the to-be-accessed URL in the acquisition request is inconsistent with the proxy URL, send the acquisition request to the online server and determine the response data corresponding to the acquisition request in the online server. Finally, the user terminal can receive and display the pre-sent response data determined from the pre-sent server or from the online server, and realize access to the pre-sent server and the online server. In addition, the online server and the pre-sent server are isolated, so that the access to the pre-sent server does not affect the normal operation of the online server.
[0092] Figure 3 The flowchart of another pre-send server access method provided by the embodiment of the present invention is applicable to the server side and is suitable for situations where convenient access to the pre-send server is required. The method can be executed by a pre-send server access device, which can be implemented by software and / or hardware. Optionally, the pre-send server access device can be configured in the server. Figure 3 , the method specifically comprises the following steps:
[0093] Step 310: Receive a pre-sent acquisition request triggered by a page access sent by a user terminal.
[0094] The pre-sent acquisition request includes data acquisition method, request parameters, proxy rule identifier and to-be-accessed service identifier, etc.
[0095] Step 320: Determine the pre-send server domain name according to the pre-send acquisition request.
[0096] Specifically, the pre-sent acquisition request is obtained by the user terminal according to the proxy rule update acquisition request, and the pre-sent acquisition request contains the proxy rule identifier and the to-be-accessed service identifier, and the database of the intermediate server stores the proxy rule identifier and the to-be-accessed service identifier, and also stores the to-be-accessed service identifier and the to-be-accessed website address, and stores the proxy rule identifier and the proxy rule. Therefore, the to-be-accessed website address and the proxy rule can be determined in the database according to the proxy rule identifier and the to-be-accessed identifier contained in the pre-sent acquisition request, and the pre-sent server domain name can be determined according to the target domain name in the proxy rule, so as to determine the pre-sent server domain name according to the received pre-sent acquisition request.
[0097] In the embodiment of the present invention, the intermediate server can determine the pre-sending server domain name according to the pre-sending acquisition request. The pre-sending server domain name can provide a basis for the intermediate server to access the pre-sending server, and of course, also provide a basis for the user terminal to access the pre-sending server.
[0098] Step 330: access the pre-sending server based on the pre-sending server domain name, determine the response data corresponding to the pre-sending acquisition request in the pre-sending server, and send the response data to the user terminal.
[0099] Specifically, the intermediate server can access the pre-sending server based on the pre-sending server domain name, and can also determine the response data corresponding to the pre-sending acquisition request based on the data acquisition method and request parameters contained in the pre-sending acquisition request in the pre-sending server. Then, the response data corresponding to the pre-sending acquisition request can be returned to the user terminal.
[0100] In an embodiment of the present invention, the intermediate server can access the pre-send server based on the pre-server domain name determined by the received pre-send acquisition request, determine the response data corresponding to the pre-send acquisition request in the pre-send server, and send the response data to the user terminal, so that the user terminal can receive and display the response data, and further enable the user terminal to access the pre-send server.
[0101] The pre-send server access method provided by the embodiment of the present invention includes: receiving a pre-send acquisition request triggered by an access page sent by a user terminal; determining the pre-send server domain name according to the pre-send acquisition request; accessing the pre-send server based on the pre-send server domain name, determining the response data corresponding to the pre-send acquisition request in the pre-send server, and sending the response data to the user terminal. In the above technical scheme, the intermediate server can receive the pre-send acquisition request sent by the user terminal, and determine the pre-send server domain name according to the pre-send acquisition request, and can also access the pre-send server based on the pre-send server domain name. The intermediate server can implement request forwarding, forwarding the received pre-send acquisition request sent by the user terminal to the pre-send server, so as to determine the response data corresponding to the pre-send acquisition request in the pre-send server, and then return the response data to the user terminal, thereby implementing access to the pre-send server, and further enabling the user terminal to implement access to the pre-send server.
[0102] Figure 4 A flowchart of another pre-send server access method provided for an embodiment of the present invention. The embodiment of the present invention can be applied to the server side and to situations where convenient access to the pre-send server is required. Based on the above embodiment, the embodiment of the present invention adds "parsing the access request sent by the user terminal to obtain the service identifier to be accessed, the proxy rule identifier and the website address to be accessed, and determining the proxy rule according to the service identifier to be accessed and the proxy rule identifier; updating the website address to be accessed based on the target domain name in the proxy rule to obtain the pre-send server domain name, determining the access page code corresponding to the access request according to the pre-send server domain name and the proxy rule, and sending the access page code to the user terminal." and "generating an access link to the intermediate server according to the proxy rule identifier, the service identifier to be accessed and the website address to be accessed; sending the access link of the intermediate server to the user terminal." The explanations of the terms that are the same or corresponding to the above embodiments are not repeated here. See Figure 4 The pre-send server access method provided by the embodiment of the present invention includes:
[0103] Step 410: Generate an access link to the intermediate server according to the intermediate server website, the proxy rule identifier, the to-be-accessed service identifier, and the to-be-accessed website.
[0104] The management personnel can input the project to be tested, the project ID to be tested and the website address of the project to be tested based on the management terminal. The test project is the service to be accessed, the project ID to be tested is the identification of the service to be accessed, and the website address of the project to be tested is the website address of the service to be accessed. The proxy rule identification and proxy rules corresponding to the service to be accessed can also be set. The proxy rules can include the proxy website address and the target domain name, as well as identification information and user information. Then the management terminal can upload the service to be accessed, the identification of the service to be accessed, the website address to be accessed, the proxy rule identification, the proxy rules, the identification information and the user information to the intermediate server.
[0105] Furthermore, the intermediate server stores the to-be-accessed service, the to-be-accessed service identifier, the to-be-accessed website, the proxy rule identifier, the proxy rule, and the user information in a database correspondingly.
[0106] Specifically, the intermediate server can generate an access link of the intermediate server according to the intermediate server URL, the proxy rule identifier, the service identifier to be accessed and the URL to be accessed, and the access link of the intermediate server carries the intermediate server URL, the service identifier to be accessed, the proxy rule identifier and the URL to be accessed.
[0107] As mentioned above, the access link of the intermediate server can be a simple network link, for example, http: / / noHost.jd.com / index.html?rules=rule1&projectId=123&returnUrl=https: / / demo.m.jd.com / index.html, where http: / / noHost.jd.com / index.html is the intermediate server URL, rules=rule1 is the proxy rule identifier, projectId=123 is the identifier of the service to be accessed, and https: / / demo.m.jd.com / index.html is the URL to be accessed.
[0108] Step 420: Send the access link of the intermediate server to the user terminal.
[0109] Specifically, the intermediate server may send an access link of the intermediate server to the user terminal, so that the user terminal may display the access link of the intermediate server, and the user may click on the access link of the intermediate server to trigger an access request.
[0110] In actual applications, the intermediate server can also generate an access link of the intermediate server in the form of a QR code based on the access link of the intermediate server in the form of a network link, and send the access link of the intermediate server in the form of a QR code to other user terminals so that the user terminals can scan the QR code to determine the access request.
[0111] In an embodiment of the present invention, the intermediate server can generate an access link of the intermediate server based on the intermediate server URL, proxy rule identifier, service identifier to be accessed and URL to be accessed, and send it to the user terminal, so that the user terminal can determine the access request based on the access link of the intermediate server.
[0112] Step 430: Parse the access request sent by the user terminal to obtain the service identifier to be accessed, the proxy rule identifier and the website to be accessed, and determine the proxy rule according to the service identifier to be accessed and the proxy rule identifier.
[0113] Specifically, the access request is determined by the user terminal according to the access link of the intermediate server. The link carries the proxy rule identifier of the service identifier to be accessed. Therefore, the access request also contains the service identifier to be accessed and the proxy rule identifier. Therefore, after the intermediate server receives the access request sent by the user terminal, it can parse the access request to obtain the service identifier to be accessed and the proxy rule identifier, and at the same time, it can also obtain the website address to be accessed. Furthermore, the proxy rule can be determined in the database according to the service identifier to be accessed and the proxy rule identifier contained in the access request. For example, it can be determined that the proxy website address in the proxy rule is https: / / demo.m.jd.com / index.html, and the target domain name is 11.127.15.123.
[0114] In the embodiment of the present invention, the intermediate server may determine the proxy rule according to the access service identifier and the proxy rule identifier included in the access request.
[0115] Step 440: Update the to-be-accessed website based on the target domain name in the proxy rule to obtain the pre-send server domain name, determine the access page code corresponding to the access request according to the pre-send server domain name and the proxy rule, and send the access page code to the user terminal.
[0116] Specifically, the intermediate server can replace the URL to be accessed contained in the access request with the target domain name. When the URL to be accessed contained in the access request is https: / / demo.m.jd.com / index.html, the URL to be accessed can be replaced with the target domain name https: / / 11.127.15.123 / index.html. The target domain name can then be determined as the pre-sending server domain name, and the pre-sending server can be accessed based on the pre-sending server domain name, and the access page code can be determined in the pre-sending server, and the access page code can be returned to the user terminal.
[0117] In one implementation, determining the access page code corresponding to the access request according to the pre-sending server domain name and the proxy rule includes:
[0118] An initial code corresponding to the access request is determined based on the pre-send server domain name and user information determined according to the access request, and the proxy rule is inserted into the initial code to obtain the access page code.
[0119] Specifically, the access request also includes the identification information of the user logged in by the user terminal sending the access request. The database of the intermediate server stores the identification information and the user information accordingly. Therefore, the user information cookie can be determined according to the identification information, and then the request header of the access request can be set according to the user information. The intermediate server can access the pre-sending server based on the access request with the request header, determine the initial code corresponding to the access request in the pre-sending server, and insert the proxy information into the initial code corresponding to the access request in the form of a global variable to obtain the access page code corresponding to the access request.
[0120] As described in the second embodiment, the proxy rules may be set as global variables proxyHost and proxyApi, and the global variables may be inserted into the initial code corresponding to the access request to obtain the access page code corresponding to the access request.
[0121] In an embodiment of the present invention, the intermediate server can replace the URL to be accessed in the access request with the target domain name, which is the pre-sending server domain name. Then, the intermediate server can access the pre-sending server based on the pre-sending server domain name and determine the access page code corresponding to the access request in the pre-sending server.
[0122] Step 450: Receive a pre-sent acquisition request triggered by an access page sent by a user terminal.
[0123] After receiving the access page code, the user terminal can render the access page code to obtain the access page. The access page code can also be parsed to obtain the proxy rules and the target page request method. The pre-sent acquisition request is obtained by the user terminal intercepting the received acquisition request according to the target page request method and updating the acquisition request based on the proxy rules. The pre-sent acquisition request includes the data acquisition method, request parameters, proxy rule identifier, and the service identifier to be accessed.
[0124] Step 460: Determine the pre-send server domain name according to the pre-send acquisition request.
[0125] Specifically, the database of the intermediate server stores proxy rule identifiers and to-be-accessed service identifiers, as well as to-be-accessed service identifiers and to-be-accessed web addresses, and proxy rule identifiers and proxy rules. Therefore, the web address to be accessed and the proxy rules can be determined in the database according to the proxy rule identifier and to-be-accessed identifier included in the pre-sent acquisition request, and the pre-sent server domain name can be determined according to the target domain name in the proxy rule, thereby determining the pre-sent server domain name according to the received pre-sent acquisition request.
[0126] In the embodiment of the present invention, the intermediate server can determine the pre-sending server domain name according to the pre-sending acquisition request. The pre-sending server domain name can provide a basis for the intermediate server to access the pre-sending server, and of course, also provide a basis for the user terminal to access the pre-sending server.
[0127] Step 470: access the pre-sending server based on the pre-sending server domain name, determine the response data corresponding to the pre-sending acquisition request in the pre-sending server, and send the response data to the user terminal.
[0128] Specifically, the intermediate server can access the pre-sending server based on the pre-sending server domain name, and can also determine the response data corresponding to the pre-sending acquisition request based on the data acquisition method and request parameters contained in the pre-sending acquisition request in the pre-sending server. Then, the response data corresponding to the pre-sending acquisition request can be returned to the user terminal.
[0129] In an embodiment of the present invention, the intermediate server can access the pre-send server based on the pre-server domain name determined by the received pre-send acquisition request, determine the response data corresponding to the pre-send acquisition request in the pre-send server, and send the response data to the user terminal, so that the user terminal can receive and display the response data, and further enable the user terminal to access the pre-send server.
[0130] The pre-send server access method provided by the embodiment of the present invention includes: generating an access link of the intermediate server according to the proxy rule identifier, the service identifier to be accessed and the website to be accessed; sending the access link of the intermediate server to the user terminal; parsing the access request sent by the user terminal to obtain the service identifier to be accessed, the proxy rule identifier and the website to be accessed, and determining the proxy rule according to the service identifier to be accessed and the proxy rule identifier; updating the website to be accessed based on the target domain name in the proxy rule to obtain the pre-send server domain name, determining the access page code corresponding to the access request according to the pre-send server domain name and the proxy rule, and sending the access page code to the user terminal; receiving the pre-send acquisition request triggered by the access page sent by the user terminal; determining the pre-send server domain name according to the pre-send acquisition request; accessing the pre-send server based on the pre-send server domain name, determining the response data corresponding to the pre-send acquisition request in the pre-send server, and sending the response data to the user terminal. In the above technical solution, the intermediate server can generate an access link of the intermediate server according to the intermediate server URL, the proxy rule identifier, the to-be-accessed service identifier and the to-be-accessed URL, and send it to the user terminal, so that the user terminal can determine the access request according to the access link of the intermediate server. The intermediate server can also determine the proxy rule according to the access service identifier and the proxy rule identifier contained in the access request sent by the user terminal, and replace the to-be-accessed URL in the access request with the target domain name, and then access the pre-sending server based on the target domain name, determine the access page code corresponding to the access request in the pre-sending server, and after returning the access page code to the user terminal, the user terminal can render the access page code to obtain the access page, and can decode The access page code is analyzed to obtain the proxy rules and the target page request method. The intermediate server can then receive the pre-sent acquisition request sent by the user terminal. The pre-sent acquisition request is obtained by the user terminal intercepting the received acquisition request according to the target page request method and updating the acquisition request based on the proxy rules. The pre-sent server domain name can be determined based on the pre-sent acquisition request. The pre-sent server is accessed based on the pre-sent server domain name, and request forwarding can be achieved. The pre-sent acquisition request received from the user terminal is forwarded to the pre-sent server, so as to determine the response data corresponding to the pre-sent acquisition request in the pre-sent server, and then return the response data to the user terminal to achieve access to the pre-sent server, thereby enabling the user terminal to access the pre-sent server.
[0131] Figure 5The present invention provides a schematic diagram of the structure of a pre-sending server access device provided in an embodiment of the present invention, and the pre-sending server access device can be configured in a user terminal. The device and the pre-sending server access method of the above embodiments belong to the same inventive concept, and the details not described in detail in the embodiment of the pre-sending server access device can refer to the embodiment of the above pre-sending server access method.
[0132] The specific structure of the pre-send server access device is as follows Figure 5 As shown, including:
[0133] The interception module 510 is used to intercept the acquisition request triggered by the user based on the access page, and update the acquisition request according to the proxy rule to obtain a pre-sent acquisition request, wherein the proxy rule is obtained by parsing the access page code corresponding to the access page;
[0134] A sending module 520, configured to send the pre-sent acquisition request to an intermediate server, so that the intermediate server accesses the pre-sent server based on the pre-sent acquisition request, and determines the response data corresponding to the pre-sent acquisition request in the pre-sent server;
[0135] The first execution module 530 is used to receive and display the response data sent by the intermediate server.
[0136] Based on the above embodiment, the device further includes:
[0137] The page generation module is used to determine the access request according to the triggering of the access link of the intermediate server by the user, and send the access request to the intermediate server so that the intermediate server determines the access page code corresponding to the access request; receive the access page code corresponding to the access request sent by the intermediate server, and render the access page code to generate an access page.
[0138] Based on the above embodiment, the page generation module is further used for:
[0139] Parse the access page code, determine the proxy rules according to the parsing result, and update the page request mode according to the parsing result to obtain the target page request mode, wherein the proxy rules include the proxy website and the target domain name.
[0140] Based on the above embodiment, the interception module 510 is specifically used for:
[0141] Intercepting the acquisition request triggered by the user based on the access page based on the target page request mode;
[0142] When it is determined that the URL to be accessed in the acquisition request is consistent with the proxy URL, the URL to be accessed in the acquisition request is replaced based on the intermediate server URL to obtain the pre-sent acquisition request.
[0143] In one implementation, after intercepting the acquisition request triggered by the user based on the access page based on the target page request mode, the method further includes:
[0144] When it is determined that the request domain name in the acquisition request is inconsistent with the proxy website address, the acquisition request is sent to the online server so that the online server determines the response data corresponding to the acquisition request; and the response data sent by the online server is received and displayed.
[0145] The pre-send server access device provided in the embodiment of the present invention can execute the pre-send server access method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the pre-send server access method.
[0146] It is worth noting that in the above-mentioned embodiment of the pre-send server access device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0147] Figure 6 A schematic diagram of the structure of another pre-sending server access device provided in an embodiment of the present invention, the pre-sending server access device can be configured in an intermediate server. The device and the pre-sending server access method of the above embodiments belong to the same inventive concept, and the details not described in detail in the embodiment of the pre-sending server access device can refer to the embodiment of the above pre-sending server access method.
[0148] The specific structure of the pre-send server access device is as follows Figure 6 As shown, including:
[0149] The receiving module 610 is used to receive a pre-sent acquisition request triggered by an access page sent by a user terminal;
[0150] A determination module 620, configured to determine a pre-send server domain name according to the pre-send acquisition request;
[0151] The second execution module 630 is used to access the pre-sending server based on the pre-sending server domain name, determine the response data corresponding to the pre-sending acquisition request in the pre-sending server, and send the response data to the user terminal.
[0152] Based on the above embodiment, the device further includes:
[0153] A determination module is used to parse the access request sent by the user terminal, obtain the service identifier to be accessed, the proxy rule identifier and the website address to be accessed, and determine the proxy rule according to the service identifier to be accessed and the proxy rule identifier; update the website address to be accessed based on the target domain name in the proxy rule to obtain the pre-sending server domain name, determine the access page code corresponding to the access request according to the pre-sending server domain name and the proxy rule, and send the access page code to the user terminal.
[0154] In one implementation, determining the access page code corresponding to the access request according to the pre-sending server domain name and the proxy rule includes:
[0155] An initial code corresponding to the access request is determined based on the pre-send server domain name and user information determined according to the access request, and the proxy rule is inserted into the initial code to obtain the access page code.
[0156] Based on the above embodiment, the device further includes:
[0157] The link generation module is used to generate an access link of the intermediate server according to the proxy rule identifier, the service identifier to be accessed and the website to be accessed; and send the access link of the intermediate server to the user terminal.
[0158] The pre-send server access device provided in the embodiment of the present invention can execute the pre-send server access method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the pre-send server access method.
[0159] It is worth noting that in the above-mentioned embodiment of the pre-send server access device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0160] Figure 7 A structural diagram of a pre-sending server access system provided for an embodiment of the present invention. The system and the pre-sending server access methods of the above-mentioned embodiments belong to the same inventive concept. For details not described in detail in the embodiments of the pre-sending server access system, reference can be made to the embodiments of the above-mentioned pre-sending server access methods.
[0161] The specific structure of the pre-release server access system is as follows Figure 7 As shown, it includes: a user terminal 710 and an intermediate server 720.
[0162] The user terminal 710 is used to intercept the acquisition request triggered by the user based on the access page, update the acquisition request according to the proxy rule to obtain a pre-sent acquisition request, wherein the proxy rule is obtained by parsing the access page code corresponding to the access page; send the pre-sent acquisition request to the intermediate server so that the intermediate server accesses the pre-sent server based on the pre-sent acquisition request, and determine the response data corresponding to the pre-sent acquisition request in the pre-sent server; receive and display the response data sent by the intermediate server;
[0163] The intermediate server 720 is used to receive a pre-sent acquisition request triggered by an access page sent by a user terminal; determine a pre-sent server domain name based on the pre-sent acquisition request; access the pre-sent server based on the pre-sent server domain name, determine response data corresponding to the pre-sent acquisition request in the pre-sent server, and send the response data to the user terminal.
[0164] The pre-send server access system provided in the embodiment of the present invention can execute the pre-send server access method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the pre-send server access method.
[0165] Figure 8 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Figure 8 A block diagram of an exemplary electronic device 8 suitable for use in implementing embodiments of the present invention is shown. Figure 8 The electronic device 8 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0166] like Figure 8 As shown, the electronic device 8 is in the form of a general purpose computing electronic device. The components of the electronic device 8 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 connecting different system components (including the system memory 28 and the processing unit 16).
[0167] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0168] The electronic device 8 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 8, including volatile and non-volatile media, removable and non-removable media.
[0169] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The electronic device 8 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 8 not shown, usually called a "hard drive"). Although Figure 8 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The system memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.
[0170] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 42 generally perform the functions and / or methods of the embodiments described herein.
[0171] The electronic device 8 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), one or more devices that enable a user to interact with the electronic device 8, and / or any device that enables the electronic device 8 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the electronic device 8 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 20. Figure 8 As shown, the network adapter 20 communicates with other modules of the electronic device 8 via the bus 18. It should be understood that although Figure 8Not shown, other hardware and / or software modules may be used in conjunction with electronic device 8, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0172] The processing unit 16 executes various functional applications and page displays by running the program stored in the system memory 28, for example, implementing the pre-send server access method provided in the embodiment of the present invention, the method comprising:
[0173] Among them, when the method is applied to a user terminal, the method includes: intercepting an acquisition request triggered by a user based on an access page, updating the acquisition request according to a proxy rule to obtain a pre-sent acquisition request, wherein the proxy rule is obtained by parsing the access page code corresponding to the access page; sending the pre-sent acquisition request to an intermediate server so that the intermediate server accesses the pre-sent server based on the pre-sent acquisition request, and determining the response data corresponding to the pre-sent acquisition request in the pre-sent server; receiving and displaying the response data sent by the intermediate server.
[0174] Among them, when the method is applied to an intermediate server, the method includes: receiving a pre-send acquisition request triggered by an access page sent by a user terminal; determining a pre-send server domain name based on the pre-send acquisition request; accessing the pre-send server based on the pre-send server domain name, determining response data corresponding to the pre-send acquisition request in the pre-send server, and sending the response data to the user terminal.
[0175] Of course, those skilled in the art can understand that the processor can also implement the technical solution of the pre-send server access method provided by any embodiment of the present invention.
[0176] An embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, a pre-sending server access method provided in an embodiment of the present invention is implemented, for example, and the method includes:
[0177] Among them, when the method is applied to a user terminal, the method includes: intercepting an acquisition request triggered by a user based on an access page, updating the acquisition request according to a proxy rule to obtain a pre-sent acquisition request, wherein the proxy rule is obtained by parsing the access page code corresponding to the access page; sending the pre-sent acquisition request to an intermediate server so that the intermediate server accesses the pre-sent server based on the pre-sent acquisition request, and determining the response data corresponding to the pre-sent acquisition request in the pre-sent server; receiving and displaying the response data sent by the intermediate server.
[0178] Among them, when the method is applied to an intermediate server, the method includes: receiving a pre-send acquisition request triggered by an access page sent by a user terminal; determining a pre-send server domain name based on the pre-send acquisition request; accessing the pre-send server based on the pre-send server domain name, determining response data corresponding to the pre-send acquisition request in the pre-send server, and sending the response data to the user terminal.
[0179] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0180] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0181] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0182] Computer program code for performing the operations of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0183] It should be understood by those skilled in the art that the modules or steps of the present invention described above can be implemented by a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, optionally, they can be implemented by a program code executable by a computer device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0184] It should be noted that the collection, collection, updating, analysis, processing, use, transmission, storage and other aspects of user personal information involved in the technical solution of this disclosure are in compliance with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Take necessary measures for user personal information to prevent illegal access to user personal information data and maintain the security of user personal information, network security and national security. For example: After collecting user information, we will de-identify the data through technical means.
[0185] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A pre-send server access method, characterized in that: Applied to user terminals, including: Intercepting a user's acquisition request triggered based on an access page, and updating the acquisition request according to a proxy rule to obtain a pre-sent acquisition request, wherein the proxy rule is obtained by parsing an access page code corresponding to the access page; Sending the pre-sent acquisition request to an intermediate server, so that the intermediate server accesses the pre-sent server based on the pre-sent acquisition request, and determining response data corresponding to the pre-sent acquisition request in the pre-sent server; Receive and display the response data sent by the intermediate server.
2. The pre-post server access method according to claim 1, characterized in that: Also includes: Determine an access request according to a trigger of an access link of the intermediate server by a user, and send the access request to the intermediate server so that the intermediate server determines an access page code corresponding to the access request; Receive the access page code corresponding to the access request sent by the intermediate server, and render the access page code to generate an access page.
3. The pre-post server access method according to claim 2, characterized in that: After receiving the access page code corresponding to the access request sent by the intermediate server, the method further includes: Parse the access page code, determine the proxy rules according to the parsing result, and update the page request mode according to the parsing result to obtain the target page request mode, wherein the proxy rules include the proxy website and the target domain name.
4. The pre-send server access method according to claim 3, characterized in that: include: Intercepting a user's acquisition request triggered based on the access page, and updating the acquisition request to obtain a pre-sent acquisition request, including: Intercepting the acquisition request triggered by the user based on the access page based on the target page request mode; When it is determined that the URL to be accessed in the acquisition request is consistent with the proxy URL, the URL to be accessed in the acquisition request is replaced based on the intermediate server URL to obtain the pre-sent acquisition request.
5. The pre-send server access method according to claim 4, characterized in that: After intercepting the acquisition request triggered by the user based on the access page based on the target page request mode, the method further includes: When it is determined that the request domain name in the acquisition request is inconsistent with the proxy website address, sending the acquisition request to an online server so that the online server determines response data corresponding to the acquisition request; Receive and display the response data sent by the online server.
6. A pre-send server access method, characterized in that: Applicable to intermediate servers, including: Receiving a pre-sent acquisition request sent by a user terminal and triggered based on an access page; Determine the pre-send server domain name according to the pre-send acquisition request; The pre-sending server is accessed based on the pre-sending server domain name, response data corresponding to the pre-sending acquisition request is determined in the pre-sending server, and the response data is sent to the user terminal.
7. The pre-send server access method according to claim 6, characterized in that: Also includes: Parsing the access request sent by the user terminal to obtain the service identifier to be accessed, the proxy rule identifier and the website to be accessed, and determining the proxy rule according to the service identifier to be accessed and the proxy rule identifier; The to-be-accessed website is updated based on the target domain name in the proxy rule to obtain the pre-send server domain name, the access page code corresponding to the access request is determined according to the pre-send server domain name and the proxy rule, and the access page code is sent to the user terminal.
8. The pre-send server access method according to claim 7, characterized in that: Determining the access page code corresponding to the access request according to the pre-sending server domain name and the proxy rule includes: An initial code corresponding to the access request is determined based on the pre-send server domain name and user information determined according to the access request, and the proxy rule is inserted into the initial code to obtain the access page code.
9. The pre-send server access method according to claim 7, characterized in that: Also includes: Generate an access link to the intermediate server according to the intermediate server website, the proxy rule identifier, the to-be-accessed service identifier and the to-be-accessed website; The access link of the intermediate server is sent to the user terminal.
10. A pre-send server access device, characterized in that: Configured on the user terminal, including: An interception module, used to intercept a user's acquisition request triggered based on an access page, and update the acquisition request according to a proxy rule to obtain a pre-sent acquisition request, wherein the proxy rule is obtained by parsing an access page code corresponding to the access page; A sending module, used for sending the pre-sent acquisition request to an intermediate server, so that the intermediate server accesses the pre-sent server based on the pre-sent acquisition request, and determines the response data corresponding to the pre-sent acquisition request in the pre-sent server; An execution module is used to receive and display the response data sent by the intermediate server.
11. A pre-send server access device, characterized in that: Configured on the intermediate server, including: A receiving module, used for receiving a pre-sent acquisition request sent by a user terminal and triggered based on an access page; A determination module, used to determine a pre-send server domain name according to the pre-send acquisition request; An execution module is used to access the pre-sending server based on the pre-sending server domain name, determine the response data corresponding to the pre-sending acquisition request in the pre-sending server, and send the response data to the user terminal.
12. A user terminal, characterized in that: The user terminal comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the pre-send server access method as described in any one of claims 1-5.
13. An intermediate server, characterized in that: The intermediate server comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the pre-send server access method as described in any one of claims 6-9.
14. A pre-release server access system, characterized in that: The pre-send server access system comprises: a user terminal and an intermediate server, wherein the user terminal is used to execute the pre-send server access method as described in any one of claims 1-5, and the intermediate server is used to execute the pre-send server access method as described in any one of claims 6-9.
15. A storage medium comprising computer executable instructions, wherein the computer executable instructions are used to execute the pre-send server access method as described in any one of claims 1-5 or 6-9 when executed by a computer processor.
