CN109510738B - Communication link test method and device - Google Patents

Communication link test method and device Download PDF

Info

Publication number
CN109510738B
CN109510738B CN201811531510.6A CN201811531510A CN109510738B CN 109510738 B CN109510738 B CN 109510738B CN 201811531510 A CN201811531510 A CN 201811531510A CN 109510738 B CN109510738 B CN 109510738B
Authority
CN
China
Prior art keywords
test
communication
page
network
link
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811531510.6A
Other languages
Chinese (zh)
Other versions
CN109510738A (en
Inventor
杨子康
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An E Wallet Electronic Commerce Co Ltd
Original Assignee
Ping An E Wallet Electronic Commerce Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An E Wallet Electronic Commerce Co Ltd filed Critical Ping An E Wallet Electronic Commerce Co Ltd
Priority to CN201811531510.6A priority Critical patent/CN109510738B/en
Publication of CN109510738A publication Critical patent/CN109510738A/en
Application granted granted Critical
Publication of CN109510738B publication Critical patent/CN109510738B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications

Abstract

The invention is suitable for the technical field of test, and provides a test method and a test device of a communication link, wherein the test method comprises the following steps: acquiring and analyzing a two-dimensional code image of a target page to obtain a webpage link of the target page; inquiring the page type of the target webpage based on the webpage link, and generating a network communication diagnosis page matched with the page type; creating a communication link for accessing the target page based on the web page link; testing the communication link through each communication diagnosis item to obtain a test result of each communication diagnosis item; if the test result of any one connected test item is a test failure, marking the connected test item with the test failure on the network connected diagnosis page; and outputting a communication abnormal report based on the marked network communication diagnosis page. The method and the device can accurately position the reason why the network page cannot be correctly output, are convenient to repair and respond to the condition causing the abnormal communication, and improve the communication test efficiency and the use experience of the user.

Description

Communication link test method and device
Technical Field
The invention belongs to the technical field of testing, and particularly relates to a testing method and equipment of a communication link.
Background
With the continuous development of network technology, the interaction frequency between a user and the internet is higher and higher, the user often accesses a network page in a two-dimensional code scanning mode, and if the network page cannot be generated in the process of accessing the network page, the user can determine the abnormal reason in a network diagnosis mode. The existing network connectivity diagnosis technology is mainly that when an abnormal condition occurs, a user terminal sends a connectivity test data packet to a default path, so that the connectivity condition of the current network is determined.
However, the above method can only determine whether the network environment where the current user terminal is located is available, and cannot accurately determine the abnormal reason why the corresponding network page cannot be generated, thereby reducing the efficiency and accuracy of diagnosis.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for testing a communication link, so as to solve the problem that the conventional testing technology for a communication link cannot accurately determine the cause of the abnormality that the corresponding network page cannot be generated, thereby reducing the efficiency and accuracy of diagnosis.
A first aspect of an embodiment of the present invention provides a method for testing a communication link, including:
acquiring and analyzing a two-dimensional code image of a target page to obtain a webpage link of the target page;
inquiring the page type of a target webpage based on the webpage link, and generating a network communication diagnosis page matched with the page type; the network communication diagnosis page comprises a plurality of communication diagnosis items;
creating a communication link for accessing the target page based on the web page link;
testing the communication link through each communication diagnosis item to obtain a test result of each communication diagnosis item;
if the test result of any one of the connected test items is a test failure, marking the connected test item with the test failure on the network connected diagnosis page;
and outputting a communication abnormal report based on the marked network communication diagnosis page.
A second aspect of an embodiment of the present invention provides a test apparatus for a communication link, including:
the two-dimensional code image processing unit is used for acquiring and analyzing a two-dimensional code image of a target page to obtain a webpage link of the target page;
the network communication diagnosis page generation unit is used for inquiring the page type of the target webpage based on the webpage link and generating a network communication diagnosis page matched with the page type; the network communication diagnosis page comprises a plurality of communication diagnosis items;
a communication link establishing unit for creating a communication link for accessing the target page based on the web page link;
the test result output unit is used for testing the communication link through each communication diagnostic item to obtain a test result of each communication diagnostic item;
the abnormal item marking unit is used for marking the communication test item with the test failure on the network communication diagnosis page if the test result of any communication test item is the test failure;
and the communication abnormal report output unit is used for outputting a communication abnormal report based on the marked network communication diagnosis page.
A third aspect of embodiments of the present invention provides a terminal device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the first aspect when executing the computer program.
A fourth aspect of embodiments of the present invention provides a computer-readable storage medium storing a computer program which, when executed by a processor, performs the steps of the first aspect.
The communication link testing method and the communication link testing equipment provided by the embodiment of the invention have the following beneficial effects:
according to the embodiment of the invention, before the network page is generated, the network diagnosis page related to the target page is obtained, the communication link established between the terminal equipment and the server of the target page is subjected to the communication test through each communication test item in the network diagnosis page, the communication test item which fails in the test is marked in the network diagnosis page, and the communication abnormal report related to the communication test at this time is generated, so that the accuracy of the communication test is improved. Compared with the existing communication link test mode, the communication link test method and the communication link test device can achieve the purpose of performing directional communication test on each target path, can accurately position the reason why the network page cannot be correctly output, are convenient to repair and respond to the condition causing abnormal communication, and improve the communication test efficiency and the use experience of a user.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a flowchart of an implementation of a method for testing a communication link according to a first embodiment of the present invention;
fig. 2 is a flowchart illustrating a detailed implementation of a method S103 for testing a communication link according to a second embodiment of the present invention;
fig. 3 is a flowchart illustrating a detailed implementation of a method S104 for testing a communication link according to a third embodiment of the present invention;
fig. 4 is a flowchart illustrating a detailed implementation of a method S101 for testing a communication link according to a fourth embodiment of the present invention;
fig. 5 is a flowchart of a specific implementation of a method for testing a communication link according to a fifth embodiment of the present invention;
FIG. 6 is a block diagram of a test apparatus for a communication link according to an embodiment of the present invention;
fig. 7 is a schematic diagram of a terminal device according to another embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
According to the embodiment of the invention, before the network page is generated, the network diagnosis page related to the target page is obtained, the communication link established between the terminal equipment and the server of the target page is subjected to the communication test through each communication test item in the network diagnosis page, the communication test item which fails in the test is marked in the network diagnosis page, and the communication abnormal report related to the communication test is generated, so that the accuracy of the communication test is improved, the problem that the conventional communication link test technology cannot accurately judge the abnormal reason which cannot generate the corresponding network page is solved, and the diagnosis efficiency and accuracy are reduced.
In the embodiment of the invention, the execution subject of the process is the terminal equipment. The terminal devices include but are not limited to: the terminal device may be a mobile terminal provided with a camera module, and a user may scan each two-dimensional code image through the mobile terminal to jump to a required web page for browsing.
Fig. 1 shows a flowchart of an implementation of a method for testing a communication link according to a first embodiment of the present invention, which is detailed as follows:
in S101, a two-dimensional code image of a target page is acquired and analyzed to obtain a web page link of the target page.
In this embodiment, the terminal device may acquire, through the built-in camera module, a two-dimensional code image of a target page to which the user needs to jump. Specifically, after the camera module is started, the terminal device activates a two-dimensional code recognition process, the two-dimensional code recognition process monitors whether a picture acquired by the camera module contains a two-dimensional code image in real time, if it is detected that the currently acquired picture contains the two-dimensional code image and the time that a user stays in the current picture is greater than a preset jump time threshold, it indicates that the user needs to jump to a corresponding page, and under the condition, the terminal device extracts the two-dimensional code image from the currently acquired picture. Certainly, the terminal device may also extract the two-dimensional code image of the target page from the local image file, for example, a user may specify a target image in the album as the two-dimensional code image of the target page, and after receiving the identification instruction input by the user, the terminal device may extract the image file corresponding to the identification instruction from the storage unit, and detect whether the image file contains the two-dimensional code image, and if so, analyze the two-dimensional code image; otherwise, if the image does not contain the two-dimensional code image, outputting identification failure information so that the user can select again.
In this embodiment, the web page link of the target image may convert the domain name corresponding to the web page link into a two-dimensional code image through a two-dimensional code conversion algorithm. The terminal device can restore the webpage domain name corresponding to the webpage link by analyzing the two-dimensional code image, and generate the corresponding webpage link based on the webpage domain name. The terminal device stores a decoding function of the two-dimensional code image, the obtained two-dimensional code image is imported into the decoding function, the image information can be converted into text information, whether the text information accords with a text format of a webpage link or not is judged, if yes, the text information obtained through identification is identified as the webpage link, and relevant operation of S102 is executed; otherwise, if the text information does not conform to the text format of the web page link, the text information is output on a display module of the terminal device, and the generation of the web page and the test operation of the communication link are not executed.
Optionally, in order to improve the acquisition quality of the two-dimensional code image and the accuracy of subsequently analyzing the two-dimensional code image, when the terminal device acquires the two-dimensional code image, the terminal device detects the ambient light intensity of the current environment acquired by the photosensitive sensor, and determines the image acquisition adjustment coefficient based on the ambient light intensity. When the terminal equipment acquires the two-dimensional code image, the original two-dimensional code image is optimized according to the image acquisition adjustment coefficient, and the adjusted two-dimensional code image is analyzed, so that the identification accuracy is improved. In the prior art, ambient light is generally corrected and reinforced by using a flash lamp and other modes, however, the mode requires that a flash lamp module is arranged on a terminal device, and the energy consumption is high when the flash lamp is turned on.
In S102, inquiring the page type of a target webpage based on the webpage link, and generating a network connection diagnosis page matched with the page type; the network connectivity diagnostic page contains a plurality of connectivity diagnostic items.
In this embodiment, after determining the web page link of the target page, the terminal device may determine the page identifier of the target page based on the web page link, so as to obtain the page type corresponding to the target page through the page identifier, and may determine the plug-in type included in the target page through the web page type, so as to select a corresponding network connectivity diagnosis page to test the communication link corresponding to the target page. For example, if the page type of the target webpage is a video page type, the video file contains a video playing plug-in, and the terminal device obtains a network connectivity diagnosis page matched with the video page type based on the video page type, where the network connectivity diagnosis page contains a connectivity diagnosis item of the video playing plug-in; if the page type of the target page is the page type supporting the online instant call, the corresponding network communication diagnosis page needs to be provided with a diagnosis item of real-time communication. Therefore, the connected diagnostic items corresponding to different page types are different, and in order to improve the accuracy of the communication link test, the terminal device can acquire the network connected diagnostic page matched with the page type of the target page according to the page type of the target page.
In this embodiment, the network connectivity diagnostic page includes a plurality of connectivity diagnostic items, and the terminal device needs to complete the plurality of connectivity diagnostic items for a communication link established between the local server and the server to determine whether the communication link is valid, so that the terminal device can be supported to access the target page. Specifically, the connected diagnostic items include, but are not limited to: the method comprises the following test items of a network domain name resolution item, a network credit and newspaper protocol data packet response test, a route addressing test item, a TCP handshake test, an API call test and the like.
Optionally, in this embodiment, the user may select a connected diagnostic item to be tested from the template library, and generate a connected diagnostic page about the target web page. Because different users have differences in test key points and test purposes in the process of testing the communication link, the terminal equipment provides the self-defined operation of the communication test page and adds all communication test items into the template base. The user can mark the connected test items to be tested in the template base, the terminal equipment captures the connected test items added with the marks in the template base after the user finishes setting, generates a network connected diagnosis page related to the target page, and establishes an association relationship between the page identification of the target page and the network connected diagnosis page. In the subsequent operation, if the two-dimensional code image of the target page is received, the page identifier of the target page is determined based on the two-dimensional code image, whether the page identifier is associated with a self-defined network connection diagnosis page or not is inquired, and if the page identifier is associated with the self-defined network connection diagnosis page, the relevant operation of S103 is executed based on the associated network connection diagnosis page; otherwise, determining the network communication diagnosis page matched with the page type according to the page type of the network page.
In S103, a communication link for accessing the target page is created based on the web page link.
In this embodiment, the terminal device determines a communication address of the server corresponding to the target page according to the web page link, and establishes a communication link for performing data interaction with the server of the target page through the communication interface and the communication address. The communication link may be established using different network protocols based on the type of network page. For example, if the network page needs to perform real-time data transmission, the communication link may be established based on a UDP protocol; if the web page is a presentation page or does not require real-time data transmission, it can be established based on the TCP protocol. After determining that the communication link is established, the terminal device performs the relevant operation of S104.
In this embodiment, S103 and S102 may be executed concurrently, that is, in the process of determining the network connectivity diagnostic page of the target page, the terminal device may establish a communication link between the local server and the server through the web link at the same time, and in this case, the terminal device may divide two concurrent threads in the main process to respectively execute the two steps; of course, the terminal device may also perform the related operations of S102 and S103 in sequence based on a preset execution order, which is not limited herein.
In S104, the communication link is tested through each of the connected diagnostic items, and a test result of each of the connected diagnostic items is obtained.
In this embodiment, after the communication link is established, the terminal device may extract each connected diagnostic item to be tested from the network diagnostic page, and obtain a corresponding test script based on each connected diagnostic item. And testing the communication link through each test script, and acquiring a test result corresponding to each test script after the test is finished. Optionally, if the test script outputs the network parameters of the communication link in the test process, the terminal device may identify a test result corresponding to the connected test item according to a preset judgment condition and a preset threshold.
Optionally, each connected diagnostic item corresponds to a test sequence, and the terminal device may invoke the main process to sequentially complete the test flow of each connected diagnostic item and sequentially obtain the test result of each connected diagnostic item. If the test order of each connected diagnostic item is not recorded in the network connected diagnostic page, the terminal device may determine the test order of each connected test item according to the input parameter and the output parameter of each connected diagnostic item. The specific implementation process is as follows: if the input parameters of one connected diagnostic item comprise the output parameters of another connected diagnostic item, the test sequence of the other connected diagnostic item is the test sequence of the connected diagnostic item after adding one; if the output parameter of one connected diagnostic item is the input parameter of another connected diagnostic item, the test sequence of the connected diagnostic item is the test sequence of another diagnostic item after adding one. The test sequence of each connected test item can be determined in the above manner.
In S105, if the test result of any of the connected test items is a test failure, the connected test item with the test failure is marked on the network connected diagnosis page.
In this embodiment, if the terminal device recognizes that the test result of a certain connection test item is a test failure, that is, it indicates that an abnormal condition exists in the communication link, the target page is normally accessed. In this case, the user needs to perform exception handling on the terminal device so as to be able to normally produce the web page of the target page. Therefore, the terminal device can identify the communication test item with the test result of failure, and mark the identified communication test item in the network communication diagnosis page. The user can determine abnormal connected diagnostic items through the network connected diagnostic page so as to repair the abnormal condition.
Alternatively, the terminal device may be placed in a corresponding area on the network connectivity diagnosis page according to a hierarchy to which the test content of each connectivity diagnosis item belongs in the network structure. For example, the network connectivity diagnostic page is divided into 7 levels based on the OSI network structure, and the connectivity diagnostic items belonging to the network layer are placed in the corresponding area of the network layer in the network diagnostic page, and so on. Therefore, the user can quickly determine the network hierarchy with the exception based on the network connectivity diagnosis page and execute the corresponding exception response operation.
In S106, a connectivity anomaly report is output based on the marked network connectivity diagnosis page.
In this embodiment, the terminal device may analyze and obtain a cause of occurrence of an abnormality of the communication link according to the marked network connectivity diagnosis page, and provide a preset abnormality response scheme based on each abnormality cause, the terminal device synthesizes the determined abnormality response scheme, the abnormality cause, and the marked network connectivity diagnosis page to obtain a connectivity abnormality report, and a user may set a network operation parameter of the terminal device through the connectivity abnormality report, so that the communication link between the terminal device and the server of the target page is normal.
As can be seen from the above, in the communication link testing method provided in the embodiment of the present invention, before the network page is generated, the network diagnosis page associated with the target page is obtained, the communication link established between the terminal device and the server of the target page is subjected to the connectivity test through each connectivity test item in the network diagnosis page, the connectivity test item that fails in the test is marked in the network diagnosis page, and the connectivity anomaly report about the current connectivity test is generated, so that the accuracy of the connectivity test is improved. Compared with the existing communication link test mode, the communication link test method and the communication link test device can achieve the purpose of performing directional communication test on each target path, can accurately position the reason why the network page cannot be correctly output, are convenient to repair and respond to the condition causing abnormal communication, and improve the communication test efficiency and the use experience of a user.
Fig. 2 shows a flowchart of a specific implementation of the method for testing a communication link S103 according to the second embodiment of the present invention. Referring to fig. 2, with respect to the embodiment shown in fig. 1, the method for testing a communication link according to this embodiment for creating a communication link for accessing the target page based on the web page link includes: s1031 to S1034 are specifically described as follows:
in S1031, the web page link is converted into a network address based on a preset domain name database.
In this embodiment, since the two-dimensional code image is generated by converting the web page link of the target page, that is, the domain name information, the terminal device needs to analyze the domain name information after acquiring the web page link, so as to determine the network address of the target web page. The terminal device is associated with a domain name database, namely a DNS, the terminal device can import the acquired webpage links into the DNS, and the DNS records the corresponding relation between each webpage link and the network address, so that after the import operation, the DNS can output the network address associated with the webpage link. The domain name database may be stored in the terminal device or in a separate DNS server. In this case, the terminal device may be provided with a default DNS server, and after receiving the web page link, the terminal device may send a domain name resolution request to the DNS server, and the DNS server may convert the web page link into a network address, such as an IP address, and return the network address to the terminal device, and the terminal device may communicate with the server of the target web page through the network address.
In S1032, a network credit protocol data packet is generated according to the network address, and the network credit protocol data packet is sent to the server to which the target page belongs.
In this embodiment, after acquiring the network address of the server of the target web page, the terminal device may forward the data to the server through each routing node between the local terminal and the server of the target web page, and in order to determine the routing path between the terminal device and the server of the target web page and to avoid too long delay when data transmission is performed through the routing path, the terminal device may send a network protocol data packet to the server to which the target web page belongs, where a source address recorded in the network protocol data packet is the network address of the terminal device, and a destination address is the network address determined by the web page link.
In this embodiment, the terminal device may be provided with a response timer, and after the network credit and newspaper protocol data packet is sent to the server on the target page, the response timer may be started to determine the time length for the server to send the data packet in response. If the count value of the response timer is less than the waiting time within the preset waiting time, the related operation of S1033 is executed; otherwise, if the network credit and newspaper protocol response information returned by the server is received within the preset waiting time, identifying that the route between the local terminal and the server to which the target page belongs is unreachable, and outputting communication link establishment failure information.
In S1033, if the network credit protocol response message returned by the server is received within the preset waiting time, a routing path is extracted from the network credit protocol response message.
In this embodiment, in the process of sending the network credit report protocol data packet to the server of the target page, forwarding paths of each router are recorded, so that the server can obtain a routing path from the terminal device to the local after receiving the routing path, the server can encapsulate the obtained routing path into the network signal protocol response information and return the network signal protocol response information to the terminal device, and the terminal device can obtain the routing path from the network credit report protocol response information.
In S1034, the communication link is created based on the routing path.
In this embodiment, the terminal device may establish a communication link between the terminal device and the server to which the target page belongs according to the routing path. And if a plurality of routing paths are recorded in the network message protocol response information, selecting the routing path with the least hop nodes or the shortest time delay for establishing the communication link.
In the embodiment of the invention, the communication link is established in the modes of domain name conversion and routing addressing, so that after the communication link is established, the communication link between the terminal equipment and the server of the target page is determined to have no abnormity on the level of DNS conversion, routing addressing and a network layer, thereby reducing the number of items for communicating diagnostic items and improving the testing efficiency.
Fig. 3 shows a flowchart of a specific implementation of the method S104 for testing a communication link according to the third embodiment of the present invention. Referring to fig. 3, with respect to the embodiment shown in fig. 1, in the method for testing a communication link according to this embodiment, the testing the communication link through each of the communication diagnostic items to obtain a test result of each of the communication diagnostic items includes: s1041 to S1042 are specifically described as follows:
in S1041, dividing each connected diagnostic item into a plurality of test groups according to a test type of each connected diagnostic item; the test types of the connected diagnostic items in the test group are the same.
In this embodiment, the terminal device may execute the test flow of the plurality of connected diagnostic items simultaneously through the plurality of concurrent test threads. Specifically, due to the fact that different test types and different excitation signals and test cases are required, in order to improve the test efficiency of concurrent tests, the terminal device needs to classify the connected diagnostic items included in the network connected diagnostic page, so that a plurality of test groups are obtained through division.
In this embodiment, different connected diagnostic items correspond to one test type. And the terminal equipment divides the connected diagnostic items belonging to the same test type into the same test group. Wherein the test type can be determined based on a network hierarchy to which the test content of the connectivity test item belongs. For example, the terminal device needs to perform a diagnostic test on the connectivity of a communication link at seven levels in the OSI network structure, so that different test types are obtained based on different levels, and if a certain connectivity diagnostic item is a TCP connectivity test, the test content belongs to a transport layer connectivity test, so that the test type of the connectivity diagnostic item is a transport layer test.
In S1042, a concurrent test thread is configured for each test group, and the concurrent test thread is invoked to complete the connected diagnostic item in the test group associated with the concurrent test thread.
In this embodiment, the terminal device counts and divides the number of the test groups, creates multiple concurrent test threads with the same number in the main process, associates a test group with each concurrent test thread, and executes each connected diagnostic item in the associated test group through the concurrent test thread. It should be noted that, the connected diagnostic items in a test group can be executed in sequence according to the priority order.
In the embodiment of the invention, the connection diagnosis items are processed by creating a plurality of concurrent test threads, so that the connection test efficiency can be improved.
Fig. 4 shows a flowchart of a specific implementation of a method S101 for testing a communication link according to a fourth embodiment of the present invention. Referring to fig. 4, with respect to the embodiment described in fig. 1 to fig. 3, in the method for testing a communication link according to this embodiment, acquiring and analyzing a two-dimensional code image of a target page to obtain a web page link of the target page includes: s1011 to S1012, detailed description is as follows:
in S1011, a connectivity test program is started, the connectivity test program is called to obtain and analyze the two-dimensional code image, and a feature sequence related to the two-dimensional code image is output.
In this embodiment, when the user first starts to open the network page and finds that the network page cannot be normally displayed, connectivity detection needs to be performed on a communication link between the terminal device and the server of the target page. Under the default condition, the connection test program can be in a closed state, so that the opening rate of the network page can be improved; when the fact that the network service cannot be displayed is detected, the user can be inquired whether the connection test program needs to be started or not through popping up the activation frame, or the connection test program can be activated in an automatic starting mode, and the two-dimensional code image of the target page can be obtained through the connection test program.
In this embodiment, after the terminal device starts the connectivity test program, the connectivity test program may convert the two-dimensional code image into the corresponding feature sequence through a preset two-dimensional code analysis algorithm. Before the two-dimensional code image is reproduced, in order to improve the security of the web page link, the server may perform an encryption operation on the web page link, so as to prevent an illegal user from accessing the target page, identify the encrypted web page link as a feature sequence, and generate the two-dimensional code image based on the feature sequence.
In S1012, if the feature sequence includes a connection start identifier, decrypting the feature sequence by using the connection start identifier to obtain the web page link.
In this embodiment, after obtaining the feature sequence corresponding to the two-dimensional code image, the terminal device may check whether a connection start identifier is included in the feature sequence, where the connection start identifier is used to indicate whether the network page needs to perform a connection test operation, and if the feature sequence does not include the connection start identifier, access to the target page is performed, otherwise, if the feature sequence includes the connection start identifier, the operation of S1012 is performed.
In this embodiment, when the feature sequence is generated, the server may encrypt the web page link through the connection start identifier, so that on the basis that the connection start identifier can be correctly identified, the feature sequence may be decrypted through the connection start identifier, and thus the terminal device is not required to store the decryption key, thereby reducing the storage pressure of the terminal device and improving the confidentiality of the web page link. Based on the method, the terminal equipment decrypts the characteristic sequence through the communication starting identifier, and therefore the webpage link of the target page is obtained.
In the embodiment of the invention, the two-dimensional code of the target page is analyzed and acquired through the communication test program, so that whether the communication link is abnormal can be detected only when a user needs to perform the communication test, the target page can be directly accessed under a general condition, the user is prevented from waiting for a long time, the webpage access can be performed only after the test is completed, and the use experience of the user is improved.
Fig. 5 is a flowchart illustrating a specific implementation of a method for testing a communication link according to a fifth embodiment of the present invention. Referring to fig. 5, with respect to the embodiment shown in fig. 1 to fig. 3, in the method for testing a communication link according to this embodiment, after the testing the communication link through each of the connectivity diagnostic items to obtain the test result of each of the connectivity diagnostic items, the method further includes: s501, detailed details are as follows:
in S501, if each test result passes the test, obtaining page data of the target page through the communication link, and outputting the target page.
In this embodiment, if the test results of all the connected test items are passed, it indicates that the communication link is not abnormal, and the target page may be normally output. In this case, the terminal device retrieves the page data from the server to which the target page belongs through the communication link, constructs the target page according to the page data, and outputs the constructed target page.
In the embodiment of the invention, the target page is generated after the test is passed, so that the success rate of generating the target page can be improved.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Fig. 6 shows a block diagram of a terminal device according to an embodiment of the present invention, where the terminal device includes units for executing steps in the corresponding embodiment of fig. 1. Please refer to fig. 1 and fig. 1 for the corresponding description of the embodiment. For convenience of explanation, only the portions related to the present embodiment are shown.
Referring to fig. 6, the test apparatus of the communication link includes:
the two-dimensional code image processing unit 61 is used for acquiring and analyzing a two-dimensional code image of a target page to obtain a webpage link of the target page;
a network connectivity diagnosis page generating unit 62, configured to query a page type of a target web page based on the web page link, and generate a network connectivity diagnosis page matching the page type; the network communication diagnosis page comprises a plurality of communication diagnosis items;
a communication link establishing unit 63 for creating a communication link for accessing the target page based on the web page link;
a test result output unit 64, configured to test the communication link through each of the connected diagnostic items to obtain a test result of each of the connected diagnostic items;
an abnormal item marking unit 65, configured to mark a communication test item with a test failure on the network communication diagnosis page if a test result of any communication test item is a test failure;
and a connected anomaly report output unit 66, configured to output a connected anomaly report based on the marked network connected diagnosis page.
Optionally, the communication link establishing unit 63 includes:
the network address determining unit is used for converting the webpage link into a network address based on a preset domain name database;
the protocol data packet sending unit is used for generating a network credit report protocol data packet according to the network address and sending the network credit report protocol data packet to a server to which the target page belongs;
the routing path determining unit is used for extracting a routing path from the network credit protocol response information if the network credit protocol response information returned by the server is received within the preset waiting time;
a communication link connection unit for creating the communication link based on the routing path.
Optionally, the test result output unit 64 includes:
the test group dividing unit is used for dividing each communication diagnosis item into a plurality of test groups according to the test type of each communication diagnosis item; the testing types of all the connected diagnostic items in the testing group are the same;
and the concurrent test unit is used for configuring a concurrent test thread for each test group and calling the concurrent test thread to finish the communication diagnostic items in the test group associated with the concurrent test thread.
Optionally, the two-dimensional code image processing unit 61 includes:
the characteristic sequence generating unit is used for starting a communication test program, calling the communication test program to acquire and analyze the two-dimensional code image, and outputting a characteristic sequence related to the two-dimensional code image;
and the webpage link output unit is used for decrypting the characteristic sequence through the communication starting identifier to obtain the webpage link if the characteristic sequence contains the communication starting identifier.
Optionally, the test equipment for the communication link further includes:
and the target page output unit is used for acquiring the page data of the target page through the communication link and outputting the target page if all the test results pass the test.
Therefore, the test device for the communication link provided by the embodiment of the present invention can also perform connectivity test on the communication link established between the terminal device and the server of the target web page through each connectivity test item in the network diagnosis page by acquiring the network diagnosis page associated with the target page before generating the network page, mark the connectivity test item failed in the network diagnosis page, and generate a connectivity anomaly report related to the connectivity test of this time, thereby improving the accuracy of the connectivity test. Compared with the existing communication link test mode, the communication link test method and the communication link test device can achieve the purpose of performing directional communication test on each target path, can accurately position the reason why the network page cannot be correctly output, are convenient to repair and respond to the condition causing abnormal communication, and improve the communication test efficiency and the use experience of a user.
Fig. 7 is a schematic diagram of a terminal device according to another embodiment of the present invention. As shown in fig. 7, the terminal device 7 of this embodiment includes: a processor 70, a memory 71 and a computer program 72 stored in said memory 71 and executable on said processor 70, such as a test program for a communication link. The processor 70, when executing the computer program 72, implements the steps in the above-described embodiments of the testing method for the respective communication links, e.g., S101 to S106 shown in fig. 1. Alternatively, the processor 70, when executing the computer program 72, implements the functions of the units in the above-described device embodiments, such as the functions of the modules 61 to 66 shown in fig. 6.
Illustratively, the computer program 72 may be divided into one or more units, which are stored in the memory 71 and executed by the processor 70 to accomplish the present invention. The one or more units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 72 in the terminal device 7. For example, the computer program 72 may be divided into a two-dimensional code image processing unit, a network connection diagnosis page generation unit, a communication link establishment unit, a test result output unit, an abnormal item marking unit, and a connection abnormality report output unit, and the specific functions of the units are as described above.
The terminal device 7 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal device may include, but is not limited to, a processor 70, a memory 71. It will be appreciated by those skilled in the art that fig. 7 is merely an example of a terminal device 7 and does not constitute a limitation of the terminal device 7 and may comprise more or less components than shown, or some components may be combined, or different components, for example the terminal device may further comprise input output devices, network access devices, buses, etc.
The Processor 70 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 71 may be an internal storage unit of the terminal device 7, such as a hard disk or a memory of the terminal device 7. The memory 71 may also be an external storage device of the terminal device 7, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 7. Further, the memory 71 may also include both an internal storage unit and an external storage device of the terminal device 7. The memory 71 is used for storing the computer program and other programs and data required by the terminal device. The memory 71 may also be used to temporarily store data that has been output or is to be output.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (8)

1. A method for testing a communication link, comprising:
acquiring and analyzing a two-dimensional code image of a target page to obtain a webpage link of the target page;
inquiring the page type of a target webpage based on the webpage link, and generating a network communication diagnosis page matched with the page type; the network communication diagnosis page comprises a plurality of communication diagnosis items;
creating a communication link for accessing the target page based on the web page link;
testing the communication link through each communication diagnosis item to obtain a test result of each communication diagnosis item;
if the test result of any one of the connected diagnostic items is test failure, marking the connected diagnostic item with test failure on the network connected diagnostic page;
outputting a communication abnormal report based on the marked network communication diagnosis page;
the creating a communication link for accessing the target page based on the web page link includes:
converting the webpage link into a network address based on a preset domain name database;
generating a network credit and report protocol data packet according to the network address, and sending the network credit and report protocol data packet to a server to which the target page belongs;
if network credit and newspaper protocol response information returned by the server is received within preset waiting time, extracting a routing path from the network credit and newspaper protocol response information;
creating the communication link based on the routing path.
2. The method according to claim 1, wherein the testing the communication link through each of the connected diagnostic items to obtain a test result of each of the connected diagnostic items comprises:
dividing each communication diagnosis item into a plurality of test groups according to the test type of each communication diagnosis item; the testing types of all the connected diagnostic items in the testing group are the same;
and configuring a concurrent test thread for each test group, and calling the concurrent test thread to finish the communication diagnostic items in the test group associated with the concurrent test thread.
3. The testing method according to any one of claims 1-2, wherein the obtaining and analyzing the two-dimensional code image of the target page to obtain the web page link of the target page comprises:
starting a communication test program, calling the communication test program to acquire and analyze the two-dimensional code image, and outputting a characteristic sequence related to the two-dimensional code image;
and if the characteristic sequence contains a communication starting identifier, decrypting the characteristic sequence through the communication starting identifier to obtain the webpage link.
4. The method according to any one of claims 1-2, further comprising, after the testing the communication link by each of the connected diagnostic items to obtain a test result of each of the connected diagnostic items:
and if all the test results pass the test, acquiring the page data of the target page through the communication link, and outputting the target page.
5. A test apparatus for a communication link, comprising:
the two-dimensional code image processing unit is used for acquiring and analyzing a two-dimensional code image of a target page to obtain a webpage link of the target page;
the network communication diagnosis page generation unit is used for inquiring the page type of the target webpage based on the webpage link and generating a network communication diagnosis page matched with the page type; the network communication diagnosis page comprises a plurality of communication diagnosis items;
a communication link establishing unit for creating a communication link for accessing the target page based on the web page link;
the test result output unit is used for testing the communication link through each communication diagnostic item to obtain a test result of each communication diagnostic item;
the abnormal item marking unit is used for marking the communication diagnostic item with the test failure on the network communication diagnostic page if the test result of any communication diagnostic item is the test failure;
the communication abnormal report output unit is used for outputting a communication abnormal report based on the marked network communication diagnosis page;
the communication link establishment unit includes:
the network address determining unit is used for converting the webpage link into a network address based on a preset domain name database;
the protocol data packet sending unit is used for generating a network credit report protocol data packet according to the network address and sending the network credit report protocol data packet to a server to which the target page belongs;
the routing path determining unit is used for extracting a routing path from the network credit protocol response information if the network credit protocol response information returned by the server is received within the preset waiting time;
a communication link connection unit for creating the communication link based on the routing path.
6. The test apparatus of claim 5, wherein the test result output unit comprises:
the test group dividing unit is used for dividing each communication diagnosis item into a plurality of test groups according to the test type of each communication diagnosis item; the testing types of all the connected diagnostic items in the testing group are the same;
and the concurrent test unit is used for configuring a concurrent test thread for each test group and calling the concurrent test thread to finish the communication diagnostic items in the test group associated with the concurrent test thread.
7. A terminal device, characterized in that the terminal device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, the processor executing the computer program with the steps of the method according to any of claims 1 to 4.
8. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 4.
CN201811531510.6A 2018-12-14 2018-12-14 Communication link test method and device Active CN109510738B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811531510.6A CN109510738B (en) 2018-12-14 2018-12-14 Communication link test method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811531510.6A CN109510738B (en) 2018-12-14 2018-12-14 Communication link test method and device

Publications (2)

Publication Number Publication Date
CN109510738A CN109510738A (en) 2019-03-22
CN109510738B true CN109510738B (en) 2022-02-22

Family

ID=65752509

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811531510.6A Active CN109510738B (en) 2018-12-14 2018-12-14 Communication link test method and device

Country Status (1)

Country Link
CN (1) CN109510738B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111106983B (en) * 2019-12-27 2021-09-21 杭州迪普科技股份有限公司 Method and device for detecting network connectivity
CN113138886A (en) * 2021-04-23 2021-07-20 摩拜(北京)信息技术有限公司 Method and device for testing embedded equipment and testing equipment
CN113409040B (en) * 2021-05-19 2023-04-21 支付宝(杭州)信息技术有限公司 Information sending method, device, equipment and medium
CN115269953A (en) * 2022-08-01 2022-11-01 明阳产业技术研究院(沈阳)有限公司 Method for tracking link jump under IPv6 network and related equipment

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2327553B (en) * 1997-04-01 2002-08-21 Porta Systems Corp System and method for telecommunications system fault diagnostics
JP3997013B2 (en) * 1998-10-30 2007-10-24 キヤノン株式会社 Information processing apparatus and information processing method
AUPQ289099A0 (en) * 1999-09-16 1999-10-07 Silverbrook Research Pty Ltd Method and apparatus for manipulating a bayer image
AU2003257309A1 (en) * 2002-08-13 2004-02-25 Microbotics Corporation Microsurgical robot system
RU2510758C2 (en) * 2007-12-31 2014-04-10 Дека Продактс Лимитед Партнершип Infusion pump assembly
US8959200B2 (en) * 2008-07-01 2015-02-17 Ortho-Clinical Diagnostics, Inc. Event-based communication in a clinical diagnostic analyzer
CN102035693A (en) * 2009-09-29 2011-04-27 国基电子(上海)有限公司 Internetworking device and method for detecting state of internet connection by internetworking device
CN103955383A (en) * 2014-04-15 2014-07-30 深圳市道通科技有限公司 Method and system for rapidly positioning automobile diagnosis application program
KR20160139810A (en) * 2015-05-28 2016-12-07 삼성전자주식회사 Method and apparatus for displaying a medical image
CN107436843A (en) * 2016-05-27 2017-12-05 北京京东尚科信息技术有限公司 Webpage performance test methods and device
CN106302004A (en) * 2016-08-01 2017-01-04 金蝶软件(中国)有限公司 network detecting method and device
CN107784011B (en) * 2016-08-30 2021-10-08 阿里巴巴(中国)有限公司 Webpage access method, client, webpage server and programmable device
CN107133180B (en) * 2017-06-07 2021-03-23 腾讯科技(深圳)有限公司 Dynamic page testing method, testing device and storage medium

Also Published As

Publication number Publication date
CN109510738A (en) 2019-03-22

Similar Documents

Publication Publication Date Title
CN109510738B (en) Communication link test method and device
US10812513B1 (en) Correlation and consolidation holistic views of analytic data pertaining to a malware attack
IL275042A (en) Self-adaptive application programming interface level security monitoring
US11108803B2 (en) Determining security vulnerabilities in application programming interfaces
CN108156178B (en) SSL/TLS data monitoring system and method
CN106484611B (en) Fuzzy test method and device based on automatic protocol adaptation
US9614866B2 (en) System, method and computer program product for sending information extracted from a potentially unwanted data sample to generate a signature
CN104182681B (en) Hook-based iOS (iPhone operating system) key behavior detection device and detection method thereof
CN108664395A (en) Applied program testing method, device, equipment and storage medium
CN111131544A (en) Method for realizing NAT traversal
CN112866193A (en) Equipment deployment method, device, equipment and storage medium
CN113992642B (en) Flow auditing method, device and related equipment of gateway proxy server
KR101792235B1 (en) Method and system for scanning vulnerability of the network printer
CN112671574A (en) Front-end and back-end joint debugging method and device, proxy equipment and storage medium
JP2015106914A (en) Malware communication analyzer and malware communication analysis method
CN108737350B (en) Information processing method and client
CN113472813B (en) Security asset identification method and system
CN108229180B (en) Screenshot data processing method and device and electronic equipment
CN111200666A (en) Method and system for identifying access domain name
CN114710547A (en) Page display method, resource sending method, electronic equipment, server and medium
CN114116448A (en) Pressure testing method and device of application program, storage medium and computer equipment
KR100657328B1 (en) Method and system for transmitting scanning data form a network scanner to a host
US9049170B2 (en) Building filter through utilization of automated generation of regular expression
JP6219621B2 (en) Communication verification device
CN115208951B (en) Request processing method, request processing device, electronic equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant