Network support degree test method, device, equipment, medium and program product
Through IPv4 and IPv6 dual-stack container and mouse simulator technology, automated network support testing is realized, solving the problems of low testing efficiency and poor compliance in existing technologies, and improving detection accuracy and compliance.
Patent Information
- Application Number
- CN202410987300.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2024-10-01
AI Technical Summary
In the existing technology, network support test efficiency is low, cannot be effectively automated, is easily intercepted by website security policies, and lacks comparison of IPv4 and IPv6 page content, resulting in poor compliance.
By creating an IPv4 and IPv6 dual-stack container, using a mouse simulator to call the browser that comes with the container, simulating terminal access, obtaining and comparing the page information of sub-pages in IPv4 and IPv6 network environments, and using edge computing power for comparison and analysis. Identify and verify verification codes to achieve automated network support testing.
It improves the efficiency and accuracy of network support testing, avoids being intercepted by website security policies, meets the requirements of IPv6 support evaluation indicators and test methods, provides comparison of IPv4 and IPv6 page content, and enhances the accuracy of detection. Regularity and accuracy.
Smart Images

Figure CN118740675A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technology, and in particular to a network supportability testing method, device, equipment, medium and program product. Background Art
[0002] In the related art, when determining the network support of a website to be tested for a certain network (for example, the network support for the Internet Protocol version 6 (IPv6) network), the website to be tested in the network environment is manually accessed, and the network support of the website to be tested for a certain network is determined based on whether the web page display of the website to be tested is normal. In the related art, the network support is tested manually, and the efficiency of the network support test is low. Summary of the invention
[0003] The embodiments of the present application provide a network supportability testing method, apparatus, device, medium and program product to solve the problem of low efficiency of network supportability testing.
[0004] To solve the above technical problems, this application is implemented as follows:
[0005] In a first aspect, an embodiment of the present application provides a network supportability testing method, the method comprising:
[0006] Determine a first container corresponding to the website to be detected, and determine at least one sub-page of the website to be detected through the first container;
[0007] Determine at least one second container corresponding to the at least one sub-page, access the at least one sub-page in the first network and the second network respectively through the at least one second container, and obtain first page information of the at least one sub-page in the first network and second page information of the at least one sub-page in the second network, wherein the first page information is used to characterize the webpage characteristics of the at least one sub-page in the first network, and the second page information is used to characterize the webpage characteristics of the at least one sub-page in the second network;
[0008] Based on the first page information and the second page information, the network support degree of the to-be-detected website for the second network is determined.
[0009] Optionally, accessing the at least one sub-page in the first network and the second network respectively through the at least one second container includes:
[0010] The mouse simulator is called through the at least one second container to access the at least one sub-page in the first network and the second network respectively.
[0011] Optionally, calling a mouse simulator through the at least one second container to access the at least one sub-page in the first network and the second network respectively includes:
[0012] Invoking a mouse simulator through the at least one second container to obtain verification code information of the at least one sub-page in the first network and the second network respectively;
[0013] Identify the verification code information to obtain an identification result;
[0014] A verification code is verified based on the recognition result to access the at least one sub-page.
[0015] Optionally, the method further comprises at least one of the following:
[0016] caching static content of a subpage corresponding to the second container by a browser built into each of the at least one second container;
[0017] The webpage rendering of the subpage corresponding to the second container is performed through the browser built into each second container in the at least one second container.
[0018] Optionally, determining the network support degree of the to-be-detected website for the second network based on the first page information and the second page information includes:
[0019] By using the edge computing power of each second container in the at least one second container, the first page information and the second page information corresponding to each second container are compared to obtain a comparison result;
[0020] The network support degree of the to-be-detected website for the second network is determined based on the comparison result.
[0021] Optionally, the comparing the first page information and the second page information corresponding to each second container includes at least one of the following:
[0022] Comparing hash values of the page snapshot files of the first page information and the second page information corresponding to each second container;
[0023] Comparing the status codes of the uniform resource locators of the page elements in the first page information and the second page information corresponding to each second container;
[0024] The hash values of the contents of the page elements in the first page information and the second page information corresponding to each second container are compared.
[0025] Optionally, before determining the first container corresponding to the website to be detected, the method further includes:
[0026] Receive a task request message sent by a client, wherein the task request message carries the website domain name of the website to be detected;
[0027] After determining the network support degree of the to-be-detected website for the second network based on the first page information and the second page information, the method further includes:
[0028] A task response message is sent to the client, where the task response message carries the network support.
[0029] In a second aspect, an embodiment of the present application provides a network supportability testing device, the device comprising:
[0030] A first determination module, configured to determine a first container corresponding to the website to be detected, and determine at least one sub-page of the website to be detected through the first container;
[0031] an acquisition module, configured to determine at least one second container corresponding to the at least one sub-page, access the at least one sub-page in the first network and the second network respectively through the at least one second container, and acquire first page information of the at least one sub-page in the first network and second page information of the at least one sub-page in the second network, wherein the first page information is used to characterize the webpage characteristics of the at least one sub-page in the first network, and the second page information is used to characterize the webpage characteristics of the at least one sub-page in the second network;
[0032] The second determination module is used to determine the network support degree of the to-be-detected website for the second network based on the first page information and the second page information.
[0033] Optionally, the acquisition module includes:
[0034] A first determining unit, configured to determine at least one second container corresponding to the at least one sub-page;
[0035] An access unit, configured to call a mouse simulator through the at least one second container to access the at least one sub-page in the first network and the second network respectively;
[0036] The acquisition unit is used to acquire the first page information of the at least one subpage in the first network and the second page information of the at least one subpage in the second network.
[0037] Optionally, the acquiring unit is specifically used for:
[0038] Invoking a mouse simulator through the at least one second container to obtain verification code information of the at least one sub-page in the first network and the second network respectively;
[0039] Identify the verification code information to obtain an identification result;
[0040] A verification code is verified based on the recognition result to access the at least one sub-page.
[0041] Optionally, the device further comprises a processing module, wherein the processing module is specifically used for at least one of the following:
[0042] caching static content of a subpage corresponding to the second container by a browser built into each of the at least one second container;
[0043] The webpage rendering of the subpage corresponding to the second container is performed through the browser built into each second container in the at least one second container.
[0044] Optionally, the second determining module includes:
[0045] a comparison unit, configured to compare the first page information and the second page information corresponding to each second container by using the edge computing power of each second container in the at least one second container to obtain a comparison result;
[0046] A second determining unit is configured to determine the network support degree of the to-be-detected website for the second network based on the comparison result.
[0047] Optionally, the comparison unit is specifically used for at least one of the following:
[0048] Comparing hash values of the page snapshot files of the first page information and the second page information corresponding to each second container;
[0049] Comparing the status codes of the uniform resource locators of the page elements in the first page information and the second page information corresponding to each second container;
[0050] The hash values of the contents of the page elements in the first page information and the second page information corresponding to each second container are compared.
[0051] Optionally, the device further comprises:
[0052] A receiving module, used for receiving a task request message sent by a client, wherein the task request message carries the website domain name of the website to be detected;
[0053] The sending module is used to send a task response message to the client, wherein the task response message carries the network support.
[0054] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a memory, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the steps of the method described in the first aspect.
[0055] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.
[0056] According to a fifth aspect, a computer program product is provided, comprising computer instructions, which, when executed by a processor, implement the steps of the method described in the first aspect.
[0057] In an embodiment of the present application, a first container corresponding to a website to be detected is determined, and at least one sub-page of the website to be detected is determined through the first container; at least one second container corresponding to the at least one sub-page is determined, and the at least one sub-page is accessed respectively on a first network and a second network through the at least one second container to obtain first page information of the at least one sub-page on the first network and second page information of the at least one sub-page on the second network, wherein the first page information is used to characterize web page features of the at least one sub-page on the first network, and the second page information is used to characterize web page features of the at least one sub-page on the second network; based on the first page information and the second page information, the network support of the website to be detected for the second network is determined; thereby, the network support test can be automatically implemented, thereby improving the efficiency of the network support test. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0059] Figure 1 is a flow chart of a network supportability testing method provided in an embodiment of the present application;
[0060] Figure 2 It is a flow chart of a network supportability testing method in the related art;
[0061] Figure 3 This is one of the structural diagrams of a website content scanner provided in an embodiment of the present application;
[0062] Figure 4This is the second structural diagram of a website content scanner provided in an embodiment of the present application;
[0063] Figure 5 It is a structural diagram of a network supportability testing device provided in an embodiment of the present application;
[0064] Figure 6 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0065] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0066] In the embodiments of the present application, a network supportability testing method, apparatus, device, medium and program product are proposed to solve the problem of low efficiency of network supportability testing.
[0067] See also Figure 1 , Figure 1 is a flow chart of a network supportability testing method provided by an embodiment of the present application, such as Figure 1 As shown, the method comprises the following steps:
[0068] Step 101: determine a first container corresponding to a website to be detected, and determine at least one sub-page of the website to be detected through the first container.
[0069] The network support test method can be performed by a website content scanner. The determining of the first container corresponding to the website to be detected and determining at least one subpage of the website to be detected through the first container can include: the website content scanner obtains the website domain name of the website to be detected from the client; creates a first container corresponding to the website domain name of the website to be detected; requests the page corresponding to the website domain name of the website to be detected through the browser built into the first container, and obtains the subpage information of at least one subpage of the website to be detected.
[0070] In one implementation, at least one subpage of the website to be detected may include an external link page of the website to be detected. For example, the subpage of the website to be detected may be a page opened after accessing a certain external link in the page of the website to be detected.
[0071] Step 102: determine at least one second container corresponding to the at least one sub-page, access the at least one sub-page through the at least one second container in the first network and the second network respectively, obtain first page information of the at least one sub-page in the first network and second page information of the at least one sub-page in the second network, the first page information is used to characterize the web page characteristics of the at least one sub-page in the first network, and the second page information is used to characterize the web page characteristics of the at least one sub-page in the second network.
[0072] Wherein, the at least one second container may correspond one-to-one to the at least one sub-page. The Internet Protocol version of the first network may be lower than the Internet Protocol version of the second network. By way of example, the first network may be an Internet Protocol version 4 (IPv4) network, and the second network may be an Internet Protocol version 6 (IPv6) network. Accessing a sub-page under an IPv4 network may also be described as accessing a sub-page under an IPv4 network environment, and accessing a sub-page under an IPv6 network may also be described as accessing a sub-page under an IPv6 network environment. The second container may be a dual-stack container, capable of performing web page access under both the first network and the second network at the same time.
[0073] In addition, the first page information may include page information obtained by accessing the at least one sub-page on the first network, such as page elements, page tags, page text content or page image content, etc.; or, the first page information may include feature information further processed by the page information obtained by accessing the at least one sub-page on the first network, such as a page snapshot file, a hash value of the page text content or page image content, etc. The second page information may include page information obtained by accessing the at least one sub-page on the second network; or, the second page information may include feature information further processed by the page information obtained by accessing the at least one sub-page on the second network.
[0074] In one embodiment, each of the at least one subpage is provided with a corresponding second container, and the subpage corresponding to the second container is accessed in the first network and the second network respectively through each second container to obtain the first page information of the subpage corresponding to the second container in the first network and the second page information in the second network. For example, the second container corresponding to subpage A is the second container B, and the first page information is obtained by accessing subpage A in the IPv4 network through the second container B, and the second page information is obtained by accessing subpage A in the IPv6 network through the second container B.
[0075] Step 103: Determine the network support of the to-be-detected website for the second network based on the first page information and the second page information.
[0076] Among them, the determined network support of the website to be detected for the second network can be a specific value. For example, the first page information and the second page information can be compared. For example, the comparison items are 10 items, 3 of the comparison items are different, and 7 of the comparison items are the same, then the network support can be 70%; or, the determined network support of the website to be detected for the second network can be a network support level, for example, high network support, medium network support or low network support. For example, the first page information and the second page information can be compared. For example, the comparison items are 10 items, and more than 7 of the comparison items are the same, then the network support can be high network support; or, the determined network support of the website to be detected for the second network can be that the network support meets the target specification, or that the network support does not meet the target specification. For example, the target specification can be the relevant specification of the website IPv6 support evaluation index and the test method. The first page information and the second page information can be compared to determine whether the network support of the website to be detected for the second network meets the target specification; and so on, this embodiment does not limit this.
[0077] In addition, the first page information and the second page information corresponding to each second container can be compared, and the network support of the website to be detected for the second network can be determined based on the comparison result; or, the first page information and the second page information can be analyzed for consistency to determine whether the first page information and the second page information are the same. When it is determined that the first page information and the second page information are the same, it is determined that the network support of the website to be detected for the second network is high.
[0078] In one implementation, the first page information and the second page information corresponding to each second container may be compared to obtain a comparison result; and the network support of the to-be-detected website for the second network may be determined based on the comparison result. For example, the hash values of the page snapshot files of the first page information and the second page information corresponding to each second container may be compared; or, the status codes of the uniform resource locators of the page elements in the first page information and the second page information corresponding to each second container may be compared; or, the hash values of the contents of the page elements in the first page information and the second page information corresponding to each second container may be compared.
[0079] In an embodiment of the present application, a first container corresponding to a website to be detected is determined, and at least one sub-page of the website to be detected is determined through the first container; at least one second container corresponding to the at least one sub-page is determined, and the at least one sub-page is accessed respectively on a first network and a second network through the at least one second container to obtain first page information of the at least one sub-page on the first network and second page information of the at least one sub-page on the second network, wherein the first page information is used to characterize web page features of the at least one sub-page on the first network, and the second page information is used to characterize web page features of the at least one sub-page on the second network; based on the first page information and the second page information, the network support of the website to be detected for the second network is determined; thereby, the network support test can be automatically implemented, thereby improving the efficiency of the network support test.
[0080] Optionally, accessing the at least one sub-page in the first network and the second network respectively through the at least one second container includes:
[0081] The mouse simulator is called through the at least one second container to access the at least one sub-page in the first network and the second network respectively.
[0082] Among them, each subpage in the at least one subpage may be correspondingly provided with a second container, and each second container calls the mouse simulator to access the subpage corresponding to the second container in the first network and the second network respectively, and obtains the first page information of the subpage corresponding to the second container in the first network and the second page information in the second network. Taking subpage A in the at least one subpage as an example, the second container corresponding to subpage A is the second container B, and the mouse simulator is called through the second container B to access subpage A in the IPv4 network to obtain the first page information corresponding to subpage A, and the mouse simulator is called through the second container B to access subpage A in the IPv6 network to obtain the second page information corresponding to subpage A.
[0083] In this implementation, by invoking a mouse simulator through the at least one second container to access the at least one sub-page in the first network and the second network respectively, access to a web page can be simulated well, thereby being able to more accurately test network support.
[0084] Optionally, calling a mouse simulator through the at least one second container to access the at least one sub-page in the first network and the second network respectively includes:
[0085] Invoking a mouse simulator through the at least one second container to obtain verification code information of the at least one sub-page in the first network and the second network respectively;
[0086] Identify the verification code information to obtain an identification result;
[0087] A verification code is verified based on the recognition result to access the at least one sub-page.
[0088] The identification result may include an identification result of the verification code information of the at least one sub-page in the first network and an identification result of the verification code information of the at least one sub-page in the second network. The verification code verification may be performed through the identification result of the verification code information of the at least one sub-page in the first network to access the at least one sub-page in the first network; the verification code verification may be performed through the identification result of the verification code information of the at least one sub-page in the second network to access the at least one sub-page in the second network.
[0089] In one embodiment, each of the at least one sub-page may be provided with a corresponding second container, and the mouse simulator is called through each second container to obtain the verification code information of the corresponding sub-page in the first network and the second network respectively. Taking sub-page A in the at least one sub-page as an example, the second container corresponding to sub-page A is the second container B, and the mouse simulator is called through the second container B to obtain the verification code information C1 of sub-page A in the IPv4 network, and the mouse simulator is called through the second container B to obtain the verification code information C2 of sub-page A in the IPv6 network; the verification code information C1 is identified to obtain the identification result D1, and the verification code is verified based on the identification result D1, and the sub-page A is accessed in the IPv4 network; the verification code information C2 is identified to obtain the identification result D2, and the verification code is verified based on the identification result D2, and the sub-page A is accessed in the IPv6 network.
[0090] In this implementation, the mouse simulator is called through the at least one second container to obtain the verification code information of the at least one sub-page in the first network and the second network respectively; the verification code information is identified to obtain an identification result; the verification code is verified based on the identification result to access the at least one sub-page; thereby, the web page verification can be passed more effectively, the effect of simulating access to the web page can be improved, and the network support can be tested more accurately.
[0091] Optionally, the method further comprises at least one of the following:
[0092] caching static content of a subpage corresponding to the second container by a browser built into each of the at least one second container;
[0093] The webpage rendering of the subpage corresponding to the second container is performed through the browser built into each second container in the at least one second container.
[0094] Wherein, each of the at least one sub-page may be provided with a corresponding second container. Taking sub-page A in the at least one sub-page as an example, the second container corresponding to sub-page A is second container B, and the static content of sub-page A may be cached by the browser built into the second container B, and / or the webpage of sub-page A may be rendered by the browser built into the second container B.
[0095] In this implementation, the static content of the sub-page corresponding to the second container is cached by a browser built into each of the at least one second container; and / or the web page of the sub-page corresponding to the second container is rendered by a browser built into each of the at least one second container; thereby being able to better simulate access to a web page and achieve more accurate testing of network support.
[0096] Optionally, determining the network support degree of the to-be-detected website for the second network based on the first page information and the second page information includes:
[0097] By using the edge computing power of each second container in the at least one second container, the first page information and the second page information corresponding to each second container are compared to obtain a comparison result;
[0098] The network support degree of the to-be-detected website for the second network is determined based on the comparison result.
[0099] Among them, each sub-page in the at least one sub-page may be provided with a corresponding second container, and the first page information and the second page information corresponding to each second container may be compared and processed through the edge computing power of each second container. Taking sub-page A in the at least one sub-page as an example, the second container corresponding to sub-page A is the second container B, and the first page information corresponding to sub-page A and the second page information corresponding to sub-page A may be compared and processed through the edge computing power of the second container B to obtain a comparison result.
[0100] It should be noted that the comparison result may indicate that the comparison items of the first page information and the second page information are the same or different. For example, the comparison items of the first page information and the second page information are 10, and the comparison result indicates that 3 of the comparison items are different and 7 are the same.
[0101] In this implementation, the first page information and the second page information corresponding to each second container are compared and processed through the edge computing power of each second container in the at least one second container to obtain a comparison result; based on the comparison result, the network support of the website to be tested for the second network is determined; in this way, by comparing the page information through edge computing power, the network support can be tested more accurately.
[0102] Optionally, the comparing the first page information and the second page information corresponding to each second container includes at least one of the following:
[0103] Comparing hash values of the page snapshot files of the first page information and the second page information corresponding to each second container;
[0104] Comparing the status codes of the uniform resource locators of the page elements in the first page information and the second page information corresponding to each second container;
[0105] The hash values of the contents of the page elements in the first page information and the second page information corresponding to each second container are compared.
[0106] Among them, the comparison result can represent whether the hash value of the page snapshot file of the first page information is the same as the hash value of the page snapshot file of the second page information; and / or, the comparison result can represent whether the status code of the uniform resource locator URL of the page element in the first page information is the same as the status code of the uniform resource locator of the page element in the second page information; and / or, the comparison result can represent whether the hash value of the content of the page element in the first page information is the same as the hash value of the content of the page element in the second page information.
[0107] In this implementation, the hash values of the page snapshot files of the first page information and the second page information corresponding to each second container are compared; or, the status codes of the uniform resource locators of the page elements in the first page information and the second page information corresponding to each second container are compared; and / or, the hash values of the contents of the page elements in the first page information and the second page information corresponding to each second container are compared; in this way, the comparison of page information under different network accesses can be achieved, so that the network support can be tested more accurately.
[0108] Optionally, before determining the first container corresponding to the website to be detected, the method further includes:
[0109] Receive a task request message sent by a client, wherein the task request message carries the website domain name of the website to be detected;
[0110] After determining the network support degree of the to-be-detected website for the second network based on the first page information and the second page information, the method further includes:
[0111] A task response message is sent to the client, where the task response message carries the network support.
[0112] In this implementation, a task request message sent by a client is received, the task request message carries the website domain name of the website to be tested; a task response message is sent to the client, the task response message carries the network support; in this way, the network support test is triggered by the client, which can further improve the automation level of the network support test.
[0113] It should be noted that IPv6 technology has been widely used and promoted. The main reason is that due to the exhaustion of IPv4 address space, more Internet service providers and enterprises have begun to adopt IPv6. In addition, IPv6 technology has a wide range of application prospects in new Internet applications such as industrial Internet, smart cities, and the Internet of Things, which will further promote the development and promotion of IPv6 technology.
[0114] IPv6 technology will play an increasingly important role in the future. The website IPv6 support evaluation index and test method in the relevant technology standardizes the detection and statistical methods of IPv6 support rate. The verification index and key points of IPv6 support evaluation index and test method are as follows:
[0115] Domain name consistency: The IPv6 domain name of the website www must be the same as the IPv4 domain name;
[0116] Address resolvability: The www domain name of the website can be resolved to an IPv6 address in multiple locations and links;
[0117] Home page access success rate: The website home page can be accessed via IPv6, and the access success rate is greater than 90%;
[0118] Content layout consistency: The content and layout should remain completely consistent when accessing the website via IPv4 and IPv6;
[0119] Link support rate: The link rate of all levels of the website should reach 100%;
[0120] External link accessibility: It can completely solve the IPv6 external link problem, and the depth is not less than 5 layers;
[0121] Access fluency: The website www domain name resolution delay and website homepage access delay are no more than 300 milliseconds;
[0122] Access stability rate: The website's entire network IPv6 can stably access no less than 90%.
[0123] In the related art, the website IPv6 transformation detection scheme is as follows: the test case is automatically executed by an automated tool, wherein the IPv6 support concentration of the website page is that the crawler script simulates the browser behavior to access the website uniform resource locator (URL), and then the website IPv6 support rate is determined by statistically analyzing the results of the crawled data on the website, such as Figure 2 The specific steps are as follows:
[0124] (1) Get the sub-page content below the home page;
[0125] Use the crawler script to obtain the homepage of the website domain name and obtain the URL address linking to other pages.
[0126] (2) Analyze the page structure;
[0127] After obtaining the homepage of the website, you need to parse the page source code to determine the elements or tags that link to other pages, and then obtain all the required links.
[0128] (3) Filter duplicate links;
[0129] Some links may be obtained multiple times, and the links need to be deduplicated to avoid repeated visits to the same page later.
[0130] (4) Crawling sub-page content;
[0131] After obtaining all the links to the second-level sub-pages, use the crawler script to access them in order, parse the content of the corresponding pages, and extract the result status code and other data of the accessed pages. The processing of the third-level sub-pages is performed according to steps (1) to (4), which will not be repeated here.
[0132] (5) Data storage and analysis;
[0133] The result status code and other data of the accessed page are extracted and stored in a local file or database, and the report and other data are generated using a data analysis tool and displayed on the World Wide Web (WEB) interface.
[0134] It should be noted that the website IPv6 transformation detection solution in the related art has the following disadvantages:
[0135] (1) The crawler has obvious characteristics and is easy to be intercepted;
[0136] Since crawler scripts automatically crawl page information through programs, the number of requests per unit time is large, and the time interval between adjacent requests is relatively fixed. They are easily identified as the behavior of crawler scripts and easily judged as attacks and intercepted by the security policy of the source site, thus affecting the accuracy of detection.
[0137] (2) For businesses with special architecture websites, crawler scripts cannot handle them;
[0138] Some websites have special page structures, such as JavaScript rendering. The phenomenon that JavaScript changes the Hyper Text Markup Language (HTML) Document Object Model (DOM) to cause page content to change is called dynamic rendering. Since programming languages do not have built-in JavaScript interpreters and rendering engines like browsers, dynamic rendering is a natural anti-crawler method. For websites rendered with JavaScript, crawlers cannot crawl page content normally, which will affect the integrity of statistical data.
[0139] (3) Crawlers cannot process Cookie detection and verification codes;
[0140] Currently, most websites have anti-crawler strategies, which will detect whether the access terminal has mouse and keyboard features by sending cookies or sending verification codes for verification. Crawlers cannot truly simulate mouse and keyboard behaviors, nor can they process verification code verification. They are easily judged as attacks by the security policies of the source site and intercepted, thus affecting the accuracy of detection.
[0141] (4) There is a lack of comparison between IPv4 page content and IPv6 page content, resulting in poor compliance;
[0142] There is a lack of comparison of page content in IPv4 and IPv6 network environments, and the detection logic does not meet the requirements of website IPv6 support evaluation indicators and testing methods in relevant technologies.
[0143] The embodiment of the present application performs IPv6 support detection according to the verification indicators and verification points of the IPv6 support evaluation indicators and test methods. The embodiment of the present application utilizes IPv4 and IPv6 dual stack container technology to disperse requests, and superimposes the use of a mouse simulator to call the browser that comes with the container to simulate terminal access, which can effectively avoid being mistakenly intercepted by the website security policy and improve detection accuracy.
[0144] The embodiment of the present application proposes a method for collecting and counting the access support rate of website external links in an IPv6 network environment. A website content scanner is used to create an IPv4 and IPv6 dual-stack container, and a mouse simulator is used to call the browser that comes with the container to simulate terminal access statistics of the access support of external links in an IPv6 network environment, and compare the differences between pages in IPv4 and IPv6 network environments. The management and control center of the website content scanner collects the content data fed back by the container corresponding to each sub-page, and uses edge computing power to analyze and process the collected raw data using a preset analysis program, including statistical analysis, trend analysis, abnormal page analysis, and abnormal element analysis of the data. The website content scanner accurately counts the support rate of external links in an IPv6 network environment, uses edge computing power to process data and output reports, and generates reports and visualized results for display to the client.
[0145] As a specific embodiment, the network supportability test method can be performed by a website content scanner, such as Figure 3 As shown in the figure, the website content scanner architecture is divided into the business interaction layer, the core engine layer and the business processing layer, among which:
[0146] (1) The business interaction layer consists of four modules: domain name resolution processing module, protocol processing module, interactive command control processing module, and intelligent verification processing module. It is responsible for analyzing the domain name resolution process of the Domain Name System (DNS) and calling simulated user behavior processing request instructions.
[0147] Domain name resolution processing module: responsible for resolving the IPv4 and IPv6 address information of the domain name website server;
[0148] Protocol processing module: responsible for the processing of Hypertext Transfer Protocol (HTTP) and Hypertext Transfer Protocol Secure (HTTPS) requests from WEB websites;
[0149] Interactive command control module: Use the mouse simulator tool to monitor the simulated mouse and keyboard behaviors in real time and traverse the page content elements;
[0150] Intelligent verification processing module: intelligently identify and process verification code and other verification events.
[0151] (2) The core engine layer consists of three modules: the management control center module, the container scheduling module, and the browser module. It is responsible for page architecture analysis, client request logic design, and proxy processing requests.
[0152] Management control center module: responsible for parsing the website page architecture, compiling the mouse simulator's operation content script, scheduling and assigning scanning tasks to different containers, and collecting and counting the result data of sub-page processing. Specifically, the management control center module performs page architecture parsing, filtering duplicate links, operation content script compilation, and task scheduling and publishing. Among them, page architecture parsing: obtaining the WEB page architecture by parsing HTML, Cascading Style Sheets (CSS) and JavaScript files; filtering duplicate links: obtaining the URL of the website's HTML page by parsing the page architecture, and deduplicating the page URL; operation content script compilation: customizing the mouse simulation access script by parsing the page architecture; task scheduling and publishing: assigning scanning tasks to different containers for execution according to sub-pages.
[0153] Container scheduling module: responsible for the life cycle management of the container, creating and allocating a dedicated container for each sub-page, and releasing and destroying the container after the task is completed.
[0154] Browser module: Depends on the container, and works with the mouse simulator to complete the access to the sub-page content of the WEB website, content rendering processing, and browser proxy requests to pull the corresponding page element content. Specifically, the browser module performs operation instruction processing, WEB content interaction, cache processing, and serves as a web page rendering engine. Operation instruction processing: Use the browser built into the container and the mouse simulator to perform sub-page scanning tasks; WEB content interaction: Complete proxy access to scan sub-pages in the browser built into the container; cache processing: Use the browser to cache sub-page static content; Web page rendering engine: Complete rendering interaction of scanned sub-pages in the browser built into the container.
[0155] (3) The business processing layer consists of a system configuration data module, a general parameter configuration module, a log analysis and processing module, a log download module, and a statistical report data module. It is responsible for summarizing and processing the scan data and generating a scan report to output to the end user.
[0156] System configuration data module: set the website domain name to be scanned and the page level to be scanned;
[0157] General parameter configuration module: set page title, page description, page script, page character encoding and page voice, etc.;
[0158] Log analysis and processing module: collects log fields of page element URLs, such as access status code, access time, and element hash value;
[0159] Log download module: download the log of the scanned page element URL;
[0160] Statistical report data module: outputs the results of log analysis according to the template to form report data.
[0161] like Figure 4 As shown, taking the container as a cluster container as an example, the client sends a network support test task to the management and control center; the management and control center sends a page request of the website to be tested to cluster container 1; cluster container 1 requests page content from the domain name website server of the website to be tested; the domain name website server sends a response carrying the page content to cluster container 1; cluster container 1 sends a response carrying the page content to the management and control center; the management and control center analyzes the page architecture, formulates and sends a script task for sub-page request; cluster containers 2 to cluster containers n call mouse simulation, and execute the script task for sub-page request in IPv4 and IPv6 network environments respectively; cluster containers 2 to cluster containers n obtain sub-page response content from the domain name / external link website server; cluster containers 2 to cluster containers n feed back the processing result of the sub-page response content to the management and control center; the management and control center reports the website content processing feedback result to the client.
[0162] The specific process of collecting and counting the access support rate of website external links in the IPv6 network environment by using a website content scanner in the embodiment of the present application is as follows:
[0163] (1) After the user enters the website domain name to be detected on the client, the client sends the task to the website content scanner cluster;
[0164] (2) The management control center of the website content scanner creates an allocation container for the domain name, and requests the website domain name page through a more common browser carried by the container to obtain sub-page information;
[0165] (3) Create independent containers for each sub-page through the management control center of the website content scanner, set a different Internet Protocol (IP) address for each container, and issue the execution script corresponding to the sub-page that each container needs to access;
[0166] (4) The container uses its own browser and calls the mouse simulator according to the script to access the content of the sub-page using the IPv4 network and the IPv6 network respectively, and obtains the sub-page snapshot at the same time. When accessing the sub-page, the intelligent verification module is used to process the verification code.
[0167] For example, the process of using the intelligent verification module to process the verification code is as follows:
[0168] Call the application programming interface (API) of the intelligent verification module to upload the verification code image to be verified;
[0169] The intelligent verification module analyzes and identifies the uploaded image and extracts the text content in the verification code image;
[0170] The intelligent verification module returns the identification result to the caller (such as the management control center module or container);
[0171] The caller can use the returned recognition result to verify the verification code, for example, returning the recognition result to a sub-page for verification.
[0172] If the verification passes, continue with the subsequent operations; if the verification fails, you need to re-enter the verification code or perform other operations.
[0173] (5) The container compares the page snapshots obtained by accessing the IPv4 network environment and the IPv6 network environment, and uses the container's edge computing power to calculate the hash values of the page snapshot files accessed in the IPv4 network environment and the IPv6 network environment respectively through the MD5 method, and compares the consistency of the hash values of the page snapshot files to determine the consistency of the page content items, and outputs the comparison results back to the management control center module of the website content scanner for summary;
[0174] (6) Using the edge computing power of the container to count the status code and content MD5 hash value of the URL of each page element (including external link elements) in the IPv6 network environment, the results are fed back to the management control center module for aggregation;
[0175] (7) The management and control center module of the website content scanner collects the content data fed back by the container corresponding to each sub-page, and uses edge computing power to analyze and process the collected raw data using preset analysis programs, including statistical analysis, trend analysis, abnormal page analysis, and abnormal element analysis of the data; the processed data is used to generate reports and visualized results output for display to the client.
[0176] The embodiment of the present application creates an IPv4 and IPv6 dual-stack container and superimposes a mouse emulator, and uses a more common browser carried by the container to simulate terminal access, which can effectively pass common anti-crawl strategies such as user agent (UA) verification and cookie verification; by using containers with different export IP addresses and controlling the execution frequency of the mouse emulator script, the website server frequency limit strategy can be effectively bypassed; the website content scanner uses edge computing power to implement verification strategies such as identification and processing of verification codes, which can effectively improve the success rate and accuracy of scanning; the website content scanner can support customization of the level of scanned pages according to customer needs, and has high flexibility and adaptability.
[0177] See also Figure 5 , Figure 5is a schematic diagram of the structure of a network supportability testing device provided in an embodiment of the present application, such as Figure 5 As shown, the network support testing device 200 includes:
[0178] A first determination module 201 is used to determine a first container corresponding to the website to be detected, and determine at least one sub-page of the website to be detected through the first container;
[0179] The acquisition module 202 is used to determine at least one second container corresponding to the at least one sub-page, access the at least one sub-page in the first network and the second network respectively through the at least one second container, and acquire first page information of the at least one sub-page in the first network and second page information of the at least one sub-page in the second network, wherein the first page information is used to characterize the web page characteristics of the at least one sub-page in the first network, and the second page information is used to characterize the web page characteristics of the at least one sub-page in the second network;
[0180] The second determination module 203 is configured to determine the network support degree of the to-be-detected website for the second network based on the first page information and the second page information.
[0181] Optionally, the acquisition module includes:
[0182] A first determining unit, configured to determine at least one second container corresponding to the at least one sub-page;
[0183] An access unit, configured to call a mouse simulator through the at least one second container to access the at least one sub-page in the first network and the second network respectively;
[0184] The acquiring unit is used to acquire first page information of the at least one subpage in the first network and second page information of the at least one subpage in the second network.
[0185] Optionally, the acquiring unit is specifically used for:
[0186] Invoking a mouse simulator through the at least one second container to obtain verification code information of the at least one sub-page in the first network and the second network respectively;
[0187] Identify the verification code information to obtain an identification result;
[0188] A verification code is verified based on the recognition result to access the at least one sub-page.
[0189] Optionally, the device further comprises a processing module, wherein the processing module is specifically used for at least one of the following:
[0190] caching static content of a subpage corresponding to the second container by a browser built into each of the at least one second container;
[0191] The webpage rendering of the subpage corresponding to the second container is performed through the browser built into each second container in the at least one second container.
[0192] Optionally, the second determining module includes:
[0193] a comparison unit, configured to compare the first page information and the second page information corresponding to each second container by using the edge computing power of each second container in the at least one second container to obtain a comparison result;
[0194] A second determining unit is configured to determine the network support degree of the to-be-detected website for the second network based on the comparison result.
[0195] Optionally, the comparison unit is specifically used for at least one of the following:
[0196] Comparing hash values of the page snapshot files of the first page information and the second page information corresponding to each second container;
[0197] Comparing the status codes of the uniform resource locators of the page elements in the first page information and the second page information corresponding to each second container;
[0198] The hash values of the contents of the page elements in the first page information and the second page information corresponding to each second container are compared.
[0199] Optionally, the device further comprises:
[0200] A receiving module, used for receiving a task request message sent by a client, wherein the task request message carries the website domain name of the website to be detected;
[0201] The sending module is used to send a task response message to the client, wherein the task response message carries the network support.
[0202] The network supportability testing device can achieve Figure 1 The various processes implemented in the method embodiment can achieve the same technical effect, and to avoid repetition, they will not be described again here.
[0203] like Figure 6As shown, an embodiment of the present application also provides an electronic device 300, including: a processor 301, a memory 302, and a program stored in the memory 302 and executable on the processor 301. When the program is executed by the processor 301, each process of the above-mentioned network support test method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0204] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above-mentioned network supportability test method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, ROM, RAM, a magnetic disk or an optical disk.
[0205] The embodiment of the present application also provides a computer program product, including computer instructions, which, when executed by a processor, implement the various processes of the above-mentioned network support test method embodiment and can achieve the same technical effect. To avoid repetition, they are not repeated here.
[0206] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0207] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0208] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A network supportability testing method, characterized in that: The method comprises: Determine a first container corresponding to the website to be detected, and determine at least one sub-page of the website to be detected through the first container; Determine at least one second container corresponding to the at least one sub-page, access the at least one sub-page in the first network and the second network respectively through the at least one second container, and obtain first page information of the at least one sub-page in the first network and second page information of the at least one sub-page in the second network, wherein the first page information is used to characterize the webpage characteristics of the at least one sub-page in the first network, and the second page information is used to characterize the webpage characteristics of the at least one sub-page in the second network; Based on the first page information and the second page information, the network support degree of the to-be-detected website for the second network is determined.
2. The method according to claim 1, characterized in that The accessing the at least one sub-page in the first network and the second network respectively through the at least one second container includes: The mouse simulator is called through the at least one second container to access the at least one sub-page in the first network and the second network respectively.
3. The method according to claim 2, characterized in that The calling of the mouse simulator through the at least one second container to access the at least one sub-page in the first network and the second network respectively includes: Invoking a mouse simulator through the at least one second container to obtain verification code information of the at least one sub-page in the first network and the second network respectively; Identify the verification code information to obtain an identification result; A verification code is verified based on the recognition result to access the at least one sub-page.
4. The method according to claim 3, characterized in that The method further comprises at least one of the following: caching static content of a subpage corresponding to the second container by a browser built into each of the at least one second container; The webpage rendering of the subpage corresponding to the second container is performed through the browser built into each second container in the at least one second container.
5. The method according to claim 1, characterized in that The determining, based on the first page information and the second page information, the network support degree of the to-be-detected website for the second network includes: By using the edge computing power of each second container in the at least one second container, the first page information and the second page information corresponding to each second container are compared to obtain a comparison result; The network support degree of the to-be-detected website for the second network is determined based on the comparison result.
6. The method according to claim 5, characterized in that The comparing the first page information and the second page information corresponding to each second container includes at least one of the following: Comparing hash values of the page snapshot files of the first page information and the second page information corresponding to each second container; Comparing the status codes of the uniform resource locators of the page elements in the first page information and the second page information corresponding to each second container; The hash values of the contents of the page elements in the first page information and the second page information corresponding to each second container are compared.
7. The method according to claim 1, characterized in that Before determining the first container corresponding to the website to be detected, the method further includes: Receive a task request message sent by a client, wherein the task request message carries the website domain name of the website to be detected; After determining the network support degree of the to-be-detected website for the second network based on the first page information and the second page information, the method further includes: A task response message is sent to the client, where the task response message carries the network support.
8. A network supportability testing device, characterized in that: The device comprises: A first determination module, configured to determine a first container corresponding to the website to be detected, and determine at least one sub-page of the website to be detected through the first container; an acquisition module, configured to determine at least one second container corresponding to the at least one sub-page, access the at least one sub-page in the first network and the second network respectively through the at least one second container, and acquire first page information of the at least one sub-page in the first network and second page information of the at least one sub-page in the second network, wherein the first page information is used to characterize the webpage characteristics of the at least one sub-page in the first network, and the second page information is used to characterize the webpage characteristics of the at least one sub-page in the second network; The second determination module is used to determine the network support degree of the to-be-detected website for the second network based on the first page information and the second page information.
9. An electronic device, characterized in that: include: A processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, the steps of the network supportability testing method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the network supportability testing method according to any one of claims 1 to 7 are implemented.
11. A computer program product, characterized in that The method comprises computer instructions, which, when executed by a processor, implement the steps of the network supportability testing method according to any one of claims 1 to 7.
Citation Information
Cited By
Page access method and device based on IPv6 detection and medium
CN119420684A
