Page access method and device based on IPv6 detection and medium
By combining IPv6 detection and dynamic rendering page recognition in the page access method, sub-links are obtained and accessed, the problem of poor combination of IPv6 detection and real-time access in the prior art is solved, and the website access efficiency and success rate are improved.
Patent Information
- Application Number
- CN202411457877.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-18
- Publication Date
- 2025-02-11
AI Technical Summary
The existing technology has failed to effectively combine IPv6 detection with real-time access to website pages, resulting in the inability to fully identify the content of the website page, affecting the efficiency of website access.
A page access method based on IPv6 detection is proposed. By running a preset detection command to obtain the command response, the parsing response result determines whether the page information exists. If it exists, it determines whether the page is a dynamic rendering page, obtains a sub-link and accesses.
It realizes comprehensive detection of whether the website supports IPv6 access, and improves IPv6 access efficiency through dynamic rendering page recognition, ensuring access success rate.
Smart Images

Figure CN119420684A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer network technology, and in particular to a page access method, device and medium based on IPv6 detection. Background Art
[0002] IPv6 (Internet Protocol Version 6) is the next generation IP protocol that replaces IPv4, that is, the protocol for the next generation Internet. The use of IPv6 not only solves the problem of the number of network address resources, but also solves the obstacles for various access devices to connect to the Internet. With the exhaustion of IPv4 addresses, IPv6 deployment is accelerating, but the IPv6 deployment of different websites is not the same. Some websites may have achieved a large degree of IPv6 support coverage, while other websites may not support the IPv6 protocol at all. Therefore, it is necessary to detect whether the website supports IPv6.
[0003] In the prior art, there are online detection tools specifically used to detect IPv6 support or to detect websites through browser plug-ins, but they fail to effectively combine IPv6 detection with real-time access to website pages. Therefore, when detecting IPv6 support and accessing website pages, the following problems will occur: the content of the website pages cannot be identified more comprehensively, thereby affecting the efficiency of website access. Summary of the invention
[0004] In order to overcome the above-mentioned defects, the present application proposes a page access method, device and medium based on IPv6 detection, which can effectively solve the problems existing in the prior art.
[0005] In a first aspect, the present application provides a page access method based on IPv6 detection, comprising: Step S1: running a preset detection command to obtain a command response, wherein the preset detection command is a detection command generated according to an access address of a target request page; Step S2: parsing the command response to obtain a parsing result, and determining whether the parsing result includes page information of the target request page. If yes, executing step S3; otherwise, prompting that the target request page does not support IPv6 access; Step S3: judging whether the target requested page to be accessed is a dynamically rendered page according to the page information, and if so, calling the automation program database to obtain a sub-link, otherwise, obtaining a sub-link according to the page information; Step S4: Access the target request page based on the sub-link.
[0006] Preferably, the running of the preset detection command to obtain a command response in step S1 includes: sending a request to a server that provides the target request page based on a browser, and receiving a command response returned by the server.
[0007] Preferably, before step S1, the method further includes obtaining a link address of a server that provides the target request page, and detecting whether the server and the network to which it is located support the IPv6 protocol according to the link address.
[0008] Preferably, the step S2 specifically includes: Step 21: parse the command response and determine whether the parsing result contains the page information of the target requested page. If yes, execute step S3; otherwise, it indicates that IPv6 access is not supported.
[0009] Or the step S2 specifically includes: Step 21: parse the command response and determine whether the parsing result contains preset response data. If yes, it indicates that IPv6 access is supported, and step 22 is executed. Otherwise, it indicates that IPv6 access is not supported. Step 22: Determine whether the parsing result contains the page information of the target requested page, if yes, execute step S3, otherwise it indicates that IPv6 access is not supported.
[0010] Preferably, the automation program database includes at least a simulator method function and a processor method function, and the calling of the automation program database to obtain a sub-link includes: By calling the simulator method function, the operation of a user inputting information and clicking a button in a browser is simulated; The processing method function is called to obtain the sub-link based on the element appearing in the dynamic rendering page.
[0011] Preferably, after step S4, the method further includes obtaining an access response time of accessing the target request page based on the sub-link, and determining an IPv6 access success rate of the target request page according to the access response time.
[0012] Preferably, after step S4, the method further includes obtaining the network data transmission volume when accessing the target request page based on the sub-link, and determining the IPv6 access success rate of the target request page according to the network data transmission volume and the access response time.
[0013] In a second aspect, the present application provides a computer device, comprising: a processor and a memory communicatively connected to the processor; wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the page access method based on IPv6 detection described in any one of the above technical solutions is implemented.
[0014] In a third aspect, the present application provides a computer-readable storage medium, which stores a plurality of program codes, wherein the program codes are suitable for being loaded and run by a processor to execute the page access method based on IPv6 detection as described in any one of the above technical solutions.
[0015] The present application has the following beneficial effects: the present application scheme first detects whether the target request page supports IPv6 based on a preset detection command, and then further evaluates the detection result in combination with whether the target request page is a dynamically rendered page to ensure that a sub-link for accessing the target request page can be obtained. It not only takes into account the detection of whether the target request page supports IPv6 access, but also improves the access efficiency of the target request page based on IPv6 based on the combination of detection response and dynamic rendering page identification. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The disclosure of the present application will become more easily understood with reference to the accompanying drawings. It is easy for those skilled in the art to understand that these drawings are only for illustrative purposes and are not intended to limit the scope of protection of the present application. In addition, similar numbers in the drawings are used to represent similar components, among which: Figure 1 This is a schematic flow chart of the main steps of a page access method based on IPv6 detection according to an embodiment of the present application; Figure 2 yes Figure 1 A schematic diagram of a specific implementation step flow of step S12; Figure 3 yes Figure 1 Another specific implementation step flow diagram of step S12; Figure 4 It is a schematic block diagram of a computer device according to an embodiment of the present application. DETAILED DESCRIPTION
[0017] Some embodiments of the present application are described below with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are only used to explain the technical principles of the present application and are not intended to limit the protection scope of the present application.
[0018] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings, and "multiple" generally includes at least two, but does not exclude the inclusion of at least one.
[0019] Some embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the case where there is no conflict between the embodiments, the following embodiments and the features in the embodiments can be combined with each other. In addition, the step sequence in the following method embodiments is only an example and not a strict limitation.
[0020] like Figure 1 As shown, a page access method based on IPv6 detection provided in an embodiment of the present application mainly includes the following steps S1 to S4.
[0021] Step S1: running a preset detection command to obtain a command response, wherein the preset detection command is a detection command generated according to an access address of a target request page.
[0022] In this embodiment, the browser is specifically Google Chrome, and the preset detection command is a curl command, for example: curl -6 http: / / example.com.
[0023] A preferred implementation of this step is: obtain the link address of the server that provides the target request page, detect whether the server and its network support the IPv6 protocol based on the link address, and when the detection result is that the IPv6 protocol is supported, send a request to the server that provides the target request page based on the browser, and receive the command response returned by the server. Among them, the content of the command response may include at least one of preset response data, page information of the target request page, page response time and network connectivity status. Furthermore, when the access times out, that is, when the response returned by the access URL times out, the website address carried in the preset detection command can be sent to other server nodes for retry to prevent the single point IP from being blocked and causing inaccurate detection.
[0024] Step S2: parse the command response to obtain a parsing result, and determine whether the parsing result includes page information of the target request page. If yes, execute step S3; otherwise, prompt that the target request page does not support IPv6 access.
[0025] In this embodiment, when it is determined that the parsing result includes the page information of the target request page, it can be preliminarily determined that IPv6 access is supported, and step S3 is further executed.
[0026] An optional implementation of this step is as follows Figure 2 The step 21 is shown as comprising: Step 21, parse the command response, and determine whether the parsing result contains the page information of the target request page. If yes, execute step S3, otherwise it indicates that IPv6 access is not supported, that is, it indicates that the target request page does not support IPv6 access.
[0027] Another optional implementation of this step is as follows Figure 3 The steps shown include step 21 and step 22: Step 21: parse the command response and determine whether the parsing result contains preset response data. If yes, it indicates that IPv6 access is supported, and step 22 is executed. Otherwise, it indicates that IPv6 access is not supported. For example, if the command response contains the HTML content of the website or a response specific to the website, it indicates that the website supports IPv6. If the command response contains a return error, such as Network is unreachable or Could not resolvehost, it may indicate that the website does not support IPv6 or the network environment does not support IPv6.
[0028] Step 22: Determine whether the parsing result contains the page information of the target requested page, if yes, execute step S3, otherwise it indicates that IPv6 access is not supported.
[0029] Step S3: judging whether the target requested page to be accessed is a dynamically rendered page according to the page information, and if so, calling the automation program database to obtain a sub-link, otherwise obtaining a sub-link according to the page information.
[0030] In this embodiment, the page response time can also be obtained while obtaining the page information. Determining whether the target request page to be accessed is a dynamically rendered page based on the page information may include: determining whether the target request page is loaded within the page response time, and if so, identifying the target request page as a dynamically rendered page.
[0031] The automation program database in this embodiment includes at least a simulator method function and a processor method function, and calling the automation program database to obtain a sub-link includes: By calling the simulator method function, the operation of a user inputting information and clicking a button in a browser is simulated; The processing method function is called to obtain the sub-link based on the element appearing in the dynamic rendering page.
[0032] For example, the automation program database is specifically a chromedp library for Google Chrome. The processing method function can be implemented using chromedp.WaitVisible and chromedp.WaitNotVisible functions, and the processing method function is called to wait for the element in the dynamic rendering page to appear or disappear to obtain the sub-link in the page.
[0033] Step S4: Access the target request page based on the sub-link.
[0034] In this embodiment, accessing the target request page based on the sub-link may include sending an access request to the sub-link and receiving a corresponding access response.
[0035] Preferably, this step may also include: calculating the time difference according to the time of sending the access request and the time of receiving the corresponding access response, obtaining the access delay of the website in the IPv6 network, and evaluating the IPv6 support according to the access delay.
[0036] Furthermore, step S5 and / or step S6 may be included after step S4.
[0037] Step S5: Obtaining an access response time for accessing the target request page based on the sub-link, and determining an IPv6 access success rate of the target request page according to the access response time.
[0038] Step S6: Acquire the network data transmission volume when accessing the target request page based on the sub-link, and determine the IPv6 access success rate of the target request page according to the network data transmission volume.
[0039] In some embodiments, access requests may be sent to the sublink of the target request page for multiple times in succession to obtain access responses corresponding to each access request; the number of times of success in each access response is counted; the ratio between the number and the total number of access requests sent is calculated to obtain the target request page access success rate. That is, by accessing the homepage of the target website multiple times, obtaining access responses corresponding to each access request sent, and determining whether each access to the homepage is successful based on the access response, counting the number of successful homepage accesses, and then calculating the ratio between the number of successful homepage accesses and the total number of homepage accesses, the success rate of accessing the target request page in the IPv6 network is obtained as a support index to evaluate the support level of IPv6.
[0040] Furthermore, the present application also provides a computer device.
[0041] In an embodiment of a computer device according to the present application, the computer device mainly includes a processor and a memory connected to the processor in communication, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the program of the page access method based on IPv6 detection in the above method embodiment is implemented. The processor can be configured to execute the program in the memory, which includes but is not limited to the program of the page access method based on IPv6 detection in the above method embodiment. Figure 2 , Figure 2In the example, the memory 11 and the processor 12 are connected to each other through a bus. For the convenience of explanation, only the part related to the embodiment of the present application is shown. For the specific technical details not disclosed, please refer to the method part of the embodiment of the present application.
[0042] Furthermore, the present application also provides a computer-readable storage medium.
[0043] In a computer-readable storage medium embodiment according to the present application, the computer-readable storage medium can be configured to store a program for executing the page access method based on IPv6 detection of the above method embodiment, and the program can be loaded and run by a processor to implement the above page access method based on IPv6 detection. For ease of explanation, only the parts related to the embodiment of the present application are shown. For specific technical details not disclosed, please refer to the method part of the embodiment of the present application. The computer-readable storage medium can be a memory device formed by various electronic devices. Optionally, the computer-readable storage medium in the embodiment of the present application is a non-transitory computer-readable storage medium.
[0044] So far, the technical solutions of the present application have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present application is obviously not limited to these specific embodiments. Without departing from the principles of the present application, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present application.
Claims
1. A page access method based on IPv6 detection, characterized in that: The method comprises: Step S1: running a preset detection command to obtain a command response, wherein the preset detection command is a detection command generated according to an access address of a target request page; Step S2: parsing the command response to obtain a parsing result, and determining whether the parsing result includes page information of the target request page. If yes, executing step S3; otherwise, prompting that the target request page does not support IPv6 access; Step S3: judging whether the target requested page to be accessed is a dynamically rendered page according to the page information, and if so, calling the automation program database to obtain a sub-link, otherwise, obtaining a sub-link according to the page information; Step S4: Access the target request page based on the sub-link.
2. The method according to claim 1, characterized in that: The running of the preset detection command to obtain a command response in step S1 includes: sending a request to a server that provides the target request page based on a browser, and receiving a command response returned by the server.
3. The method according to claim 2, characterized in that: Before step S1, the method further includes obtaining a link address of a server that provides the target request page, and detecting whether the server and the network to which it is located support the IPv6 protocol according to the link address.
4. The method according to claim 1, characterized in that: The step S2 specifically includes: Step 21: parse the command response and determine whether the parsing result contains the page information of the target requested page. If yes, execute step S3; otherwise, it indicates that IPv6 access is not supported.
5. The method according to claim 1, characterized in that The step 2 specifically includes: Step 21: parse the command response and determine whether the parsing result contains preset response data. If yes, it indicates that IPv6 access is supported, and step 22 is executed. Otherwise, it indicates that IPv6 access is not supported. Step 22: Determine whether the parsing result contains the page information of the target requested page, if yes, execute step S3, otherwise it indicates that IPv6 access is not supported.
6. The method according to claim 1, characterized in that: The automation program database includes at least a simulator method function and a processor method function, and calling the automation program database to obtain a sub-link includes: By calling the simulator method function, the operation of a user inputting information and clicking a button in a browser is simulated; The processing method function is called to obtain the sub-link based on the element appearing in the dynamic rendering page.
7. The method according to claim 1, characterized in that: After step S4, the method further includes obtaining an access response time of accessing the target request page based on the sub-link, and determining an IPv6 access success rate of the target request page according to the access response time.
8. The method according to claim 6, characterized in that: After step S4, the method further includes obtaining the network data transmission volume when accessing the target request page based on the sub-link, and determining the IPv6 access success rate of the target request page according to the network data transmission volume and the access response time.
9. A computer device, characterized in that: include: A processor and a memory communicatively connected to the processor; wherein the memory stores a computer program, and when the computer program is executed by the processor, the page access method based on IPv6 detection described in any one of claims 1 to 8 is implemented.
10. A computer-readable storage medium storing a plurality of program codes, characterized in that: The program code is suitable for being loaded and run by a processor to execute the page access method based on IPv6 detection according to any one of claims 1 to 8.
Citation Information
Patent Citations
Method and device for testing IPv6 network support degree of website
CN116827816A
Webpage information extraction method and system
CN118113957A
Network support degree test method, device, equipment, medium and program product
CN118740675A