CN113132181B - Method and device for detecting network protocol support degree of IPv6 mobile application program - Google Patents

Method and device for detecting network protocol support degree of IPv6 mobile application program Download PDF

Info

Publication number
CN113132181B
CN113132181B CN202110340600.2A CN202110340600A CN113132181B CN 113132181 B CN113132181 B CN 113132181B CN 202110340600 A CN202110340600 A CN 202110340600A CN 113132181 B CN113132181 B CN 113132181B
Authority
CN
China
Prior art keywords
network protocol
image
screen
result
page
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
CN202110340600.2A
Other languages
Chinese (zh)
Other versions
CN113132181A (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.)
Beijing University of Posts and Telecommunications
Original Assignee
Beijing University of Posts and Telecommunications
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 Beijing University of Posts and Telecommunications filed Critical Beijing University of Posts and Telecommunications
Priority to CN202110340600.2A priority Critical patent/CN113132181B/en
Publication of CN113132181A publication Critical patent/CN113132181A/en
Application granted granted Critical
Publication of CN113132181B publication Critical patent/CN113132181B/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/18Protocol analysers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/22Image preprocessing by selection of a specific region containing or referencing a pattern; Locating or processing of specific regions to guide the detection or recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/12Fingerprints or palmprints
    • G06V40/13Sensors therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Multimedia (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

One or more embodiments of the present specification provide a method and an apparatus for detecting a network protocol support degree of an IPv6 mobile application, including: acquiring a first screen page image of an application program to be tested; extracting a first network protocol image and a second network protocol image from the first screen page image; identifying the first network protocol image and the second network protocol image to obtain a first screen accessibility result; responding to the first screen accessibility result that the first screen page is accessible, and comparing the first network protocol image with the second network protocol image to obtain a first screen support degree result; and determining a detection result according to the first screen support degree result. The embodiment can realize the detection of the network protocol support degree of the application program.

Description

Method and device for detecting network protocol support degree of IPv6 mobile application program
Technical Field
One or more embodiments of the present disclosure relate to the field of computer network technologies, and in particular, to a method and an apparatus for detecting a support degree of an IPv6 network protocol of a mobile application.
Background
Internet Protocol Version six (IPv 6) is the next generation IP Protocol designed by the Internet Engineering Task Force (IETF) to replace IPv 4. The IPv6 has obvious advantages over IPv4 in the aspects of address space capacity, mobility, security performance, service quality and the like, and can provide better service for users.
As the infrastructure and deployment of IPv6 are still in its infancy, IPv4 and IPv6 need to coexist for a long period of time. The mobile device needs to be compatible with the IPv4 and the IPv6 in terms of hardware, a network layer, and the like, and the application program of the application layer also needs to be upgraded and modified to be adapted to the IPv6, so that access and acquisition of application program resources are realized through an IPv6 protocol. However, because the infrastructure of the IPv6 is not perfect enough, the network connectivity and reliability cannot be guaranteed, and the phenomenon that the IPv6 access request is overtime or even fails generally occurs, which causes the phenomena of delayed page loading, incomplete page loading or even wrong page loading of an application program in a pure IPv6 network environment, and causes the difference of IPv6 support degrees visually for users. At present, IPv6 support degree detection of an application program is generally completed manually, automatic testing cannot be achieved, detection efficiency is low, and detection results are inaccurate.
Disclosure of Invention
In view of this, one or more embodiments of the present disclosure provide a method and an apparatus for detecting a support degree of an IPv6 network protocol, which can detect a support degree of a network protocol.
In view of the above object, one or more embodiments of the present specification provide a method for detecting a network protocol support degree of an IPv6 mobile application, including:
acquiring a first screen page image of an application program to be tested;
extracting a first network protocol image and a second network protocol image from the first screen page image;
identifying the first network protocol image and the second network protocol image to obtain a first screen accessibility result;
responding to the first screen accessibility result that the first screen page is accessible, and comparing the first network protocol image with the second network protocol image to obtain a first screen support degree result;
and determining a detection result according to the first screen support degree result.
Optionally, the method further includes:
acquiring at least one secondary page image of an application program to be tested;
extracting a third network protocol image from the secondary page image;
identifying the third network protocol image to obtain a secondary reachability result;
counting the number of reachable secondary pages of which the secondary reachability result is a secondary page;
determining a secondary support degree result according to the number of the reachable secondary pages and the total number of the secondary pages;
and determining a detection result according to the first screen support degree result and the second-level support degree result.
Optionally, before the obtaining of the first screen page image of the application program to be tested, the method includes:
starting the application program to be tested according to the configuration information;
closing other programs in the starting process;
the acquiring of the first screen page image of the application program to be detected is as follows: and executing screen capture operation when the home screen page of the application program to be tested is entered.
Optionally, after entering the first screen page of the application program to be tested, the method further includes:
acquiring at least one secondary page element to be detected in the first screen page;
before the second-level page image of the application program to be tested is obtained, the method comprises the following steps:
jumping from the first screen page to a second level page to be detected according to the second level page element to be detected;
closing other programs in the jumping process;
the acquiring of the secondary page image of the application program to be detected is as follows: and when the secondary page to be detected is entered, executing screen capture operation.
Optionally, the identifying and processing the first network protocol image and the second network protocol image to obtain a first screen reachability result includes:
performing text recognition processing on the first network protocol image and the second network protocol image to obtain a first recognition result and a second recognition result;
and determining that the first screen page is reachable in response to the first recognition result and the second recognition result being not abnormal.
Optionally, the first network protocol image and the second network protocol image are compared, and the result of the first screen support degree is:
and calculating the first screen similarity of the first network protocol image and the second network protocol image.
Optionally, in response to that neither the first recognition result nor the second recognition result is abnormal, it is determined that the home screen page can be reached:
responding to the first recognition result and the second recognition result which are not empty and do not contain preset keywords, and determining that the home screen page is reachable;
calculating the first screen similarity of the first network protocol image and the second network protocol image, including:
calculating a first fingerprint of the first network protocol image;
calculating a second fingerprint of the second network protocol image;
calculating a distance between the first fingerprint and the second fingerprint.
Optionally, the identifying and processing the third network protocol image to obtain a secondary reachability result includes:
performing text recognition processing on the third network protocol image to obtain a third recognition result;
determining that the secondary page is reachable in response to the third recognition result not having an exception;
according to the number of the reachable secondary pages and the total number of the secondary pages, determining that the secondary support degree result is as follows:
and calculating the ratio of the number of the reachable secondary pages to the total number of the secondary pages.
Optionally, determining a detection result according to the first screen support degree result and the second-level support degree result, including:
and according to a preset weight proportion, calculating to obtain the detection result according to the first screen similarity and the ratio.
An embodiment of the present specification further provides a device for detecting a network protocol support degree of an IPv6 mobile application, including:
the acquisition module is used for acquiring a first screen page image of the application program to be detected;
the extraction module is used for extracting a first network protocol image and a second network protocol image from the first screen page image;
the identification module is used for identifying the first network protocol image and the second network protocol image to obtain a first screen accessibility result;
the comparison module is used for responding to the first screen accessibility result that the first screen page is accessible, and comparing the first network protocol image with the second network protocol image to obtain a first screen support degree result;
and the determining module is used for determining a detection result according to the support degree result of the first screen.
As can be seen from the foregoing, in the method and apparatus for detecting IPv6 network protocol support of a mobile application provided in one or more embodiments of the present disclosure, a first screen page image of an application to be detected is acquired, a first network protocol image and a second network protocol image are extracted from the first screen page image, the first network protocol image and the second network protocol image are identified to obtain a first screen reachability result, the first network protocol image and the second network protocol image are compared in response to the first screen reachability result being the first screen page reachability, so as to obtain a first screen support result, and a detection result is determined according to the first screen support result. The embodiment can realize the detection of the network protocol support degree of the application program.
Drawings
In order to more clearly illustrate one or more embodiments or prior art solutions of the present specification, the drawings that are needed in the description of the embodiments or prior art will be briefly described below, and it is obvious that the drawings in the following description are only one or more embodiments of the present specification, and that other drawings may be obtained by those skilled in the art without inventive effort from these drawings.
FIG. 1 is a schematic flow diagram of a method according to one or more embodiments of the present disclosure;
FIG. 2 is a schematic flow chart of a method according to another embodiment of the present disclosure;
FIG. 3 is a schematic flow chart of a method according to yet another embodiment of the present disclosure;
FIG. 4 is a schematic diagram of an apparatus according to one or more embodiments of the present disclosure;
fig. 5 is a schematic structural diagram of an electronic device according to one or more embodiments of the present disclosure.
Detailed Description
For the purpose of promoting a better understanding of the objects, aspects and advantages of the present disclosure, reference is made to the following detailed description taken in conjunction with the accompanying drawings.
It is to be noted that unless otherwise defined, technical or scientific terms used in one or more embodiments of the present specification should have the ordinary meaning as understood by those of ordinary skill in the art to which this disclosure belongs. The use of "first," "second," and similar terms in one or more embodiments of the specification is not intended to indicate any order, quantity, or importance, but rather is used to distinguish one element from another. The word "comprising" or "comprises", and the like, means that the element or item listed before the word covers the element or item listed after the word and its equivalents, but does not exclude other elements or items. The terms "connected" or "coupled" and the like are not restricted to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "upper", "lower", "left", "right", and the like are used merely to indicate relative positional relationships, and when the absolute position of the object being described is changed, the relative positional relationships may also be changed accordingly.
As described in the background art, the IPv6 support degree detection of an application program is currently difficult to implement automation and scale, and the accuracy of a detection result is not high. Mainly because: on one hand, the triggering of the application program and the multi-level page skipping are mainly completed through manual operation, so that the efficiency is low and the test result is not accurate enough; on the other hand, the existing detection indexes (such as the success rate and the performance of web content analysis, weblog analysis and the like) are not suitable for application program detection with diversified interface loading modes and diversified data channels; thirdly, the granularity of the detection result is rough, and by adopting a support degree result (support or non-support) of two divisions, the content loading completion degree of the application program is difficult to be reflected quantitatively, and the support degree is difficult to be evaluated accurately.
In view of this, the present specification provides a method for detecting the network protocol support degree of the IPv6 mobile application, which obtains a network protocol support degree detection result of an application by obtaining a first screen page image of the application, extracting a network protocol image contained in the first screen page image, and processing the network protocol image.
Hereinafter, the technical means of the present disclosure will be described in further detail with reference to specific examples.
As shown in fig. 1, one or more embodiments of the present specification provide a method for detecting a network protocol support degree of a mobile application IPv6, including:
s101: acquiring a first screen page image of an application program to be tested;
in this embodiment, an automatic testing tool is used to automatically obtain the first screen page image of the application program to be tested, which is convenient for subsequent processing.
In some modes, the application to be tested is an application installed on an Android mobile device, and the application on the Android mobile terminal is automatically tested based on an Appium automation framework and an Android Debug Bridge (adb tool, Android Debug Bridge tools). Other types of applications may be tested using corresponding automated testing tools, and the embodiment is not limited in particular.
S102: extracting a first network protocol image and a second network protocol image from the first screen page image;
in this embodiment, after the first-screen page image is acquired, the network protocol image is extracted from the first-screen page image.
In some modes, under a pure IPv4 network environment only supporting an IPv4 network protocol, a first screen page image of an application program to be tested is acquired, and a first network protocol image adapted to the IPv4 network protocol is extracted from the first screen page image. Under the pure IPv6 network environment only supporting the IPv6 network protocol, the first screen page image of the application program to be tested is obtained, and the second network protocol image matched with the IPv6 network protocol is extracted from the first screen page image.
S103: identifying the first network protocol image and the second network protocol image to obtain a first screen accessibility result;
in this embodiment, based on the extracted first network protocol image and second network protocol image, identification processing is performed, and a first screen reachability result of the application program to be detected is determined according to the identification result.
For example, for a first network protocol image, if the identification result is normal, the first screen page of the application program to be tested can be reached under a pure IPv4 network environment; and if the identification result is abnormal, the first screen page is not reachable. For the second network protocol image, if the identification result is normal, the first screen page of the application program to be tested can be reached under the pure IPv6 network environment; and if the identification result is abnormal, the first screen page is not reachable.
S104: responding to the first screen accessibility result that the first screen page is accessible, and comparing the first network protocol image with the second network protocol image to obtain a first screen support degree result;
s105: and determining a detection result according to the first screen support degree result.
In this embodiment, when it is determined that the first screen pages of the first network protocol image and the second network protocol image are both reachable according to the first screen reachability result, the first network protocol image and the second network protocol image are further compared to obtain a comparison result of the first network protocol image and the second network protocol image, and a support degree detection result of the application program to be detected for the network protocol is determined according to the comparison result of the first network protocol image and the second network protocol image.
The method for detecting the network protocol support degree provided by the embodiment comprises the following steps: the method comprises the steps of obtaining a first screen page image of an application program to be detected, extracting a first network protocol image and a second network protocol image from the first screen page image, identifying the first network protocol image and the second network protocol image to obtain a first screen accessibility result, responding to the first screen accessibility result that the first screen page is accessible, comparing the first network protocol image and the second network protocol image to obtain a first screen support degree result, and determining a detection result according to the first screen support degree result. The method of the embodiment can automatically detect the support degree of the application program to the network protocol, improve the accuracy of the detection result, and guide and promote the upgrading and deployment work of the network protocol according to the support degree detection result.
As shown in fig. 2, in some embodiments, the method for detecting the network protocol support degree of the IPv6 of the mobile application further includes:
s201: acquiring at least one secondary page image of an application program to be tested;
s202: extracting a third network protocol image from the secondary page image;
in this embodiment, the next level of the first screen page includes at least one second level page. Under the pure IPv6 network environment, entering each secondary page from the first screen page, acquiring the secondary page image of each secondary page, and extracting a third network protocol image which is adapted to the IPv6 network protocol from the secondary page image.
S203: identifying the third network protocol image to obtain a secondary reachability result;
in this embodiment, based on the third network protocol image, the identification processing is performed, and the secondary reachability result of the application to be detected is determined according to the identification result. If the identification result is normal, the secondary page of the application program to be tested can be reached under the pure IPv6 network environment; and if the identification result is abnormal, the secondary page is not reachable.
S204: counting the number of reachable secondary pages of which the secondary reachability result is the reachable secondary pages;
s205: determining a secondary support degree result according to the number of reachable secondary pages and the total number of the secondary pages;
s206: and determining a detection result according to the first screen support degree result and the second-level support degree result.
In this embodiment, according to a second-level page image corresponding to each second-level page under a first-screen page, a second-level reachability result of each second-level page is determined, the number of second-level pages that can be reached by the second-level page is counted, a second-level support result is determined according to the number of second-level pages that can be reached by the second-level page and the total number of second-level pages, and then, according to the first-screen support result and the second-level support result, a support result of the application degree to be detected on the network protocol is determined. In this way, the embodiment can comprehensively evaluate the support degree of the application degree on the IPv6 network protocol from three dimensions, namely, the reachability of the top screen page, the support degree of the top screen page, and the support degree of the second-level page.
In some embodiments, before acquiring the first-screen page image of the application program to be tested, the method includes:
starting the application program to be tested according to the configuration information;
closing other programs in the starting process;
acquiring a first screen page image of an application program to be detected as follows: and when the first screen page of the application program to be tested is entered, screen capturing operation is executed.
In this embodiment, to implement an automatic test process, configuration information is written in advance, so that an automatic test tool automatically starts an application program to be tested according to the configuration information, and in the starting process, other programs (for example, a popup window such as an advertisement and a system prompt) are automatically closed, so that a currently displayed page is a first-screen page of the application program to be tested, and after entering the first-screen page, a screen capture operation is automatically executed to obtain an image of the first-screen page.
In some embodiments, after entering the first screen page of the application program to be tested, the method further includes:
acquiring at least one secondary page element to be detected in a first screen page;
before acquiring a secondary page image of an application program to be tested, the method comprises the following steps:
jumping from the first screen page to the second page to be detected according to the second page elements to be detected;
closing other programs in the jumping process;
the two-level page image of the application program to be detected is obtained as follows: and when entering a secondary page to be detected, executing screen capture operation.
In this embodiment, in order to further detect each secondary page under the first-screen page, each secondary page element in the first-screen page is obtained, and each secondary page element is stored in the secondary page list to be detected. The second-level page element is a component that can enter a corresponding second-level page by triggering, for example, a link, a button, a picture, and the like, and this embodiment is not particularly limited.
When a second-level page is detected, sequentially taking out elements of the second-level page to be detected from a second-level page list to be detected corresponding to a first-screen page, automatically jumping to the corresponding second-level page from the first-screen page according to the elements of the second-level page to be detected, automatically closing other programs in the jumping process, enabling a currently displayed page to be the second-level page below the first-screen page, and automatically executing screen capture operation after entering the second-level page so as to obtain a second-level page image.
In some embodiments, identifying the first network protocol image and the second network protocol image to obtain the first screen reachability result includes:
performing text recognition processing on the first network protocol image and the second network protocol image to obtain a first recognition result and a second recognition result;
and determining that the first screen page is reachable in response to the first recognition result and the second recognition result being not abnormal.
In this embodiment, text recognition processing is performed on the first network protocol image and the second network protocol image, respectively, to obtain a corresponding first recognition result and a corresponding second recognition result. And then, judging whether the first network protocol image has abnormality or not according to the first identification result, if so, not reaching the first screen page in the pure IPv4 network environment, and if not, reaching the first screen page. And judging whether the second network protocol image is abnormal or not according to the second identification result, if so, the first screen page is unreachable under the pure IPv6 network environment, and if not, the first screen page is reachable.
In some embodiments, through text recognition processing, if it is determined that the first network protocol image and/or the second network protocol image is empty or contains a predetermined keyword, the first network protocol image and/or the second network protocol image is abnormal, and if the first network protocol image and/or the second network protocol image is not empty and does not contain a predetermined keyword, the first network protocol image and/or the second network protocol image is normal. In some modes, null means that no text content is contained in the image; loading error warning information according to an application program network, constructing an error prompt list comprising a plurality of keywords in advance, searching the error prompt list according to a text recognition result, judging whether the error prompt list is matched with a specific keyword in the error prompt list, and if the error prompt list is matched with the specific keyword, the image comprises a preset keyword, wherein the keywords are error prompt information such as 'network loading error', 'network connection incapability' and the like, and the specific form is not limited.
In some modes, the OCR character recognition technology may be utilized to perform text recognition on the acquired first network protocol image and the acquired second network protocol image, so as to obtain a text recognition result. Other text recognition algorithms may also be used for text recognition, and this embodiment is not particularly limited.
In some embodiments, comparing the first network protocol image with the second network protocol image to obtain a result of the first screen support degree is:
and calculating the first screen similarity of the first network protocol image and the second network protocol image.
In this embodiment, under the condition that it is determined that the IPv4 network is reachable and the IPv6 network is reachable, the first network protocol image is compared with the second network protocol image, the similarity of the top-screen pages obtained in the two network environments is calculated, and the top-screen support result of the application to be tested for the IPv6 network protocol is determined according to the similarity of the top-screen pages in the two network protocols.
In some embodiments, in response to the first recognition result and the second recognition result being both abnormal, it is determined that the first-screen page can be reached:
responding to the first recognition result and the second recognition result which are not empty and do not contain preset keywords, and determining that the first screen page is reachable;
calculating the first screen similarity of the first network protocol image and the second network protocol image, comprising:
calculating a first fingerprint of a first network protocol image;
calculating a second fingerprint of a second network protocol image;
a distance between the first fingerprint and the second fingerprint is calculated.
In this embodiment, according to the text recognition result of the first network protocol image, if it is determined that the first recognition result is not empty and does not include a predetermined keyword, the home screen page in the IPv4 network environment is reachable; and according to the text recognition result of the second network protocol image, determining that the second recognition result is not empty and does not contain a preset keyword, and enabling the home screen page under the IPv6 network environment to be accessible. Under the condition that the IPv4 network is determined to be reachable and the IPv6 network is determined to be reachable, the similarity of the first screen between the first network protocol image and the second network protocol image is calculated by a similarity calculation method, first fingerprints of the first network protocol image and second fingerprints of the second network protocol image are respectively calculated, and then the hamming distance between the first fingerprints and the second fingerprints is calculated to obtain the similarity of the first screen between the first network protocol image and the second network protocol image. In some ways, the similarity algorithm uses a perceptual hash algorithm, and the embodiment does not describe in detail the specific process and principle of the algorithm.
In some embodiments, the identifying the third network protocol image to obtain the second-level reachability result includes:
performing text recognition processing on the third network protocol image to obtain a third recognition result;
responding to the third recognition result without exception, and determining that the secondary page is reachable;
according to the number of the reachable secondary pages and the total number of the secondary pages, determining that the secondary support degree result is as follows: the ratio of the number of reachable secondary pages to the total number of secondary pages is calculated.
In this embodiment, after the secondary page image of the application program to be detected is obtained, the third network protocol image adapted to the IPv6 protocol is extracted from the secondary page image, text recognition processing is performed on the third network protocol image, if the third recognition result is not null and does not include a predetermined keyword, the third network protocol image is not abnormal, and it is determined that the secondary page can be reached in the IPv6 network environment.
After testing all the second-level pages under the first-screen page, counting the number of the second-level pages which can be reached by all the second-level pages, calculating the ratio between the second-level pages which can be reached by the second-level pages and the total number of the second-level pages under the first-screen page, and taking the ratio as a second-level page support degree result. Therefore, the detection result of the support degree of the second-level page is obtained under the condition that the first-screen page can be reached and the second-level page can be partially or completely reached.
In some embodiments, determining the detection result according to the first-screen support result and the second-level support result includes:
and according to a preset weight proportion, calculating to obtain a detection result according to the first screen similarity and the ratio.
In this embodiment, after detecting the first screen accessibility, the first screen support degree, the second-level page accessibility, and the second-level page support degree of the application program to be tested, based on the first screen page accessibility and the second-level page partly or completely accessibility, the support degree of the application program to be tested on the IPv6 network protocol is determined according to the first screen support degree result and the second-level support degree result. In some modes, the weight of the first screen support degree result and the weight of the second screen support degree result are set, and the final detection result is obtained through calculation according to the set weights and the calculated first screen similarity and ratio.
Referring to fig. 3, in an application scenario, an automated testing tool is used to perform network protocol support detection on a plurality of applications to be tested installed on a mobile device. And constructing a mobile application program queue according to each application program to be tested, and sequentially reading one application program to be tested from the mobile application program queue during testing.
For each application program to be tested, the application program to be tested is automatically started under a pure IPv4 network environment and an IPv6 network environment respectively, a first screen page of the application program to be tested is entered, first screen page images under the two network environments are obtained, all secondary page elements contained in the first screen page images are obtained, and all secondary page elements are placed in a secondary page starting queue. Extracting a first network protocol image according to a first screen page image in a pure IPv4 network environment, and extracting a second network protocol image according to a first screen page image in a pure IPv6 network environment; performing text recognition processing on the first network protocol image and the second network protocol image, and judging whether the two network environments can be reached or not according to a text recognition result; and under the condition that both network environments are reachable, calculating the similarity between the first network protocol image and the second network protocol image to obtain a first screen support degree result of the IPv6 network protocol.
And then, sequentially extracting secondary page elements to be detected from a secondary page starting queue under a first screen page, jumping from the first screen page to a corresponding secondary page according to the secondary page elements to acquire a secondary page image for each secondary page element under a pure IPv6 network environment, extracting a third network protocol image from the secondary page image, performing text recognition processing on the third network protocol image, and judging whether the IPv6 network can reach or not according to a text recognition result. And after the accessibility detection of all the secondary pages is finished, counting the number of the secondary pages which can be reached by the secondary pages, and calculating the ratio of the number of the secondary pages which can be reached by the secondary pages to the total number of the secondary pages to obtain a secondary page support degree result. And finally, calculating the support degree of the application program to be tested to the IPv6 network protocol according to the first screen support degree result and the second-level page support degree result.
According to the above process, automatic network protocol support degree detection is performed on all the applications to be detected on the mobile device, and support degree detection results of the applications on the IPv6 network protocol can be obtained. The network protocol support degree detection method of the embodiment can perform automatic and large-scale network protocol support degree detection on the application program, improve the detection efficiency and improve the accuracy of the detection result; the detection result integrates the dimensions of the reachability, the support degree, the reachability of the second-level page, the support degree and the like of the first-screen page, the support degree of the IPv6 network protocol can be evaluated more intuitively and quantitatively, and the detection result obtained by the embodiment can provide technical support for upgrading, modifying, deploying and the like of the IPv 6.
It should be noted that the method of one or more embodiments of the present disclosure may be performed by a single device, such as a computer or server. The method of the embodiment can also be applied to a distributed scene and completed by the mutual cooperation of a plurality of devices. In such a distributed scenario, one of the devices may perform only one or more steps of the method of one or more embodiments of the present disclosure, and the devices may interact with each other to complete the method.
It should be noted that the above description describes certain embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
As shown in fig. 4, an embodiment of the present specification further provides an apparatus for detecting a network protocol support degree of a mobile application IPv6, including:
the acquisition module is used for acquiring a first screen page image of the application program to be detected;
the extraction module is used for extracting a first network protocol image and a second network protocol image from the first screen page image;
the identification module is used for identifying the first network protocol image and the second network protocol image to obtain a first screen reachability result;
the comparison module is used for responding to the first screen accessibility result that the first screen page is accessible, and comparing the first network protocol image with the second network protocol image to obtain a first screen support degree result;
and the determining module is used for determining the detection result according to the first screen support degree result.
For convenience of description, the above devices are described as being divided into various modules by functions, and are described separately. Of course, the functionality of the modules may be implemented in the same one or more software and/or hardware implementations in implementing one or more embodiments of the present description.
The apparatus of the foregoing embodiment is used to implement the corresponding method in the foregoing embodiment, and has the beneficial effects of the corresponding method embodiment, which are not described herein again.
Fig. 5 is a schematic diagram illustrating a more specific hardware structure of an electronic device according to this embodiment, where the electronic device may include: a processor 1010, a memory 1020, an input/output interface 1030, a communication interface 1040, and a bus 1050. Wherein the processor 1010, memory 1020, input/output interface 1030, and communication interface 1040 are communicatively coupled to each other within the device via a bus 1050.
The processor 1010 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits, and is configured to execute related programs to implement the technical solutions provided in the embodiments of the present disclosure.
The Memory 1020 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, or the like. The memory 1020 may store an operating system and other application programs, and when the technical solution provided by the embodiments of the present specification is implemented by software or firmware, the relevant program codes are stored in the memory 1020 and called to be executed by the processor 1010.
The input/output interface 1030 is used for connecting an input/output module to input and output information. The i/o module may be configured as a component in a device (not shown) or may be external to the device to provide a corresponding function. Wherein the input devices may include a keyboard, mouse, touch screen, microphone, various sensors, etc., and the output devices may include a display, speaker, vibrator, indicator light, etc.
The communication interface 1040 is used for connecting a communication module (not shown in the drawings) to implement communication interaction between the present apparatus and other apparatuses. The communication module can realize communication in a wired mode (such as USB, network cable and the like) and also can realize communication in a wireless mode (such as mobile network, WIFI, Bluetooth and the like).
Bus 1050 includes a path that transfers information between various components of the device, such as processor 1010, memory 1020, input/output interface 1030, and communication interface 1040.
It should be noted that although the above-mentioned device only shows the processor 1010, the memory 1020, the input/output interface 1030, the communication interface 1040 and the bus 1050, in a specific implementation, the device may also include other components necessary for normal operation. In addition, those skilled in the art will appreciate that the above-described apparatus may also include only those components necessary to implement the embodiments of the present description, and not necessarily all of the components shown in the figures.
The electronic device of the foregoing embodiment is used to implement the corresponding method in the foregoing embodiment, and has the beneficial effects of the corresponding method embodiment, which are not described herein again.
Computer-readable media of the present embodiments, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, is limited to these examples; within the spirit of the present disclosure, features from the above embodiments or from different embodiments may also be combined, steps may be implemented in any order, and there are many other variations of different aspects of one or more embodiments of the present description as described above, which are not provided in detail for the sake of brevity.
In addition, well-known power/ground connections to Integrated Circuit (IC) chips and other components may or may not be shown in the provided figures, for simplicity of illustration and discussion, and so as not to obscure one or more embodiments of the disclosure. Furthermore, devices may be shown in block diagram form in order to avoid obscuring the understanding of one or more embodiments of the present description, and this also takes into account the fact that specifics with respect to implementation of such block diagram devices are highly dependent upon the platform within which the one or more embodiments of the present description are to be implemented (i.e., specifics should be well within purview of one skilled in the art). Where specific details (e.g., circuits) are set forth in order to describe example embodiments of the disclosure, it should be apparent to one skilled in the art that one or more embodiments of the disclosure can be practiced without, or with variation of, these specific details. Accordingly, the description is to be regarded as illustrative instead of restrictive.
While the present disclosure has been described in conjunction with specific embodiments thereof, many alternatives, modifications, and variations thereof will be apparent to those skilled in the art in light of the foregoing description. For example, other memory architectures (e.g., dynamic ram (dram)) may use the discussed embodiments.
It is intended that the one or more embodiments of the present specification embrace all such alternatives, modifications and variations as fall within the broad scope of the appended claims. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of one or more embodiments of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (10)

1. The method for detecting the network protocol support degree of the IPv6 mobile application program is characterized by comprising the following steps:
acquiring a first screen page image of an application program to be tested;
extracting a first network protocol image and a second network protocol image from the first screen page image; the method specifically comprises the following steps: automatically acquiring a first screen page image of an application program to be tested by using an automatic testing tool; extracting the first network protocol image and the second network protocol image from the first screen page image;
identifying the first network protocol image and the second network protocol image to obtain a first screen accessibility result;
responding to the first screen accessibility result that the first screen page is accessible, and comparing the first network protocol image with the second network protocol image to obtain a first screen support degree result;
and determining a detection result according to the first screen support degree result.
2. The method of claim 1, further comprising:
acquiring at least one secondary page image of an application program to be tested;
extracting a third network protocol image from the secondary page image;
identifying the third network protocol image to obtain a secondary reachability result;
counting the number of reachable secondary pages of which the secondary reachability result is a secondary page;
determining a secondary support degree result according to the number of the reachable secondary pages and the total number of the secondary pages;
and determining a detection result according to the first screen support degree result and the second-level support degree result.
3. The method according to claim 2, wherein before acquiring the first screen page image of the application program to be tested, the method comprises:
starting the application program to be tested according to the configuration information;
closing other programs in the starting process;
the acquiring of the first screen page image of the application program to be detected is as follows: and executing screen capture operation when the home screen page of the application program to be tested is entered.
4. The method according to claim 3, wherein after entering the first screen page of the application program to be tested, the method further comprises:
acquiring at least one secondary page element to be detected in the first screen page;
before the second-level page image of the application program to be detected is obtained, the method includes:
jumping from the first screen page to a second level page to be detected according to the second level page element to be detected;
closing other programs in the jumping process;
the step of acquiring the secondary page image of the application program to be detected comprises the following steps: and when entering the secondary page to be detected, executing screen capture operation.
5. The method of claim 1, wherein identifying the first network protocol image and the second network protocol image to obtain a first screen accessibility result comprises:
performing text recognition processing on the first network protocol image and the second network protocol image to obtain a first recognition result and a second recognition result;
and determining that the first screen page is reachable in response to the first recognition result and the second recognition result being not abnormal.
6. The method of claim 5, wherein the first network protocol image and the second network protocol image are compared to obtain a result of the first screen support degree as follows:
and calculating the first screen similarity of the first network protocol image and the second network protocol image.
7. The method of claim 6, wherein in response to neither the first recognition result nor the second recognition result being abnormal, determining that the home screen page is reachable is:
responding to the first recognition result and the second recognition result which are not empty and do not contain preset keywords, and determining that the home screen page is reachable;
calculating the first screen similarity of the first network protocol image and the second network protocol image, including:
calculating a first fingerprint of the first network protocol image;
calculating a second fingerprint of the second network protocol image;
calculating a distance between the first fingerprint and the second fingerprint.
8. The method of claim 2, wherein identifying the third network protocol image to obtain a secondary reachability result comprises:
performing text recognition processing on the third network protocol image to obtain a third recognition result;
determining that the secondary page is reachable in response to the third recognition result not having an exception;
according to the number of the reachable secondary pages and the total number of the secondary pages, determining that the secondary support degree result is as follows:
and calculating the ratio of the number of the reachable secondary pages to the total number of the secondary pages.
9. The method of claim 8, wherein determining a detection result according to the first screen support result and the second level support result comprises:
and according to a preset weight proportion, calculating to obtain the detection result according to the first screen similarity and the ratio.
10. The device for detecting the network protocol support degree of the IPv6 mobile application program is characterized by comprising the following steps:
the acquisition module is used for acquiring a first screen page image of the application program to be detected;
the extraction module is used for extracting a first network protocol image and a second network protocol image from the first screen page image; the method specifically comprises the following steps: automatically acquiring a first screen page image of an application program to be tested by using an automatic testing tool; extracting the first network protocol image and the second network protocol image from the first screen page image;
the identification module is used for identifying the first network protocol image and the second network protocol image to obtain a first screen accessibility result;
the comparison module is used for responding to the first screen accessibility result that the first screen page is accessible, and comparing the first network protocol image with the second network protocol image to obtain a first screen support degree result;
and the determining module is used for determining a detection result according to the first screen support degree result.
CN202110340600.2A 2021-03-30 2021-03-30 Method and device for detecting network protocol support degree of IPv6 mobile application program Active CN113132181B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110340600.2A CN113132181B (en) 2021-03-30 2021-03-30 Method and device for detecting network protocol support degree of IPv6 mobile application program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110340600.2A CN113132181B (en) 2021-03-30 2021-03-30 Method and device for detecting network protocol support degree of IPv6 mobile application program

Publications (2)

Publication Number Publication Date
CN113132181A CN113132181A (en) 2021-07-16
CN113132181B true CN113132181B (en) 2022-08-05

Family

ID=76775466

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110340600.2A Active CN113132181B (en) 2021-03-30 2021-03-30 Method and device for detecting network protocol support degree of IPv6 mobile application program

Country Status (1)

Country Link
CN (1) CN113132181B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114866511A (en) * 2022-04-28 2022-08-05 中国电信股份有限公司 Method, device, system and storage medium for statistical communication protocol deployment
CN115277502B (en) * 2022-06-17 2023-10-10 广州根链国际网络研究院有限公司 Method for automatically measuring IPv6 flow aiming at APP

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111130845A (en) * 2019-11-25 2020-05-08 北京邮电大学 Method and device for testing IPv6 support degree of website page based on visual information
CN111782492A (en) * 2020-05-22 2020-10-16 平安国际智慧城市科技股份有限公司 Page first screen loading duration testing method and device, computer equipment and medium
CN112350892A (en) * 2020-10-29 2021-02-09 中星科源(北京)信息技术有限公司 IPv4/IPv6 network detection method, storage device and processing device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9424167B2 (en) * 2014-05-21 2016-08-23 Cgi Technologies And Solutions Inc. Automated testing of an application system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111130845A (en) * 2019-11-25 2020-05-08 北京邮电大学 Method and device for testing IPv6 support degree of website page based on visual information
CN111782492A (en) * 2020-05-22 2020-10-16 平安国际智慧城市科技股份有限公司 Page first screen loading duration testing method and device, computer equipment and medium
CN112350892A (en) * 2020-10-29 2021-02-09 中星科源(北京)信息技术有限公司 IPv4/IPv6 network detection method, storage device and processing device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
全国高校官网的IPv6部署状态探测系统的实现;刘天一;《计算机科学》;20191031;第46卷(第10A期);全文 *

Also Published As

Publication number Publication date
CN113132181A (en) 2021-07-16

Similar Documents

Publication Publication Date Title
CN113132181B (en) Method and device for detecting network protocol support degree of IPv6 mobile application program
CN102419727A (en) Automatic test method and device
US20150293898A1 (en) Method and apparatus for word detection in application program
CN112817866A (en) Recording playback method, device, system, computer equipment and storage medium
CN108399125B (en) Automatic testing method and device, computer equipment and storage medium
CN111460448B (en) Malicious software family detection method and device
CN112380115A (en) Regression testing method and device, electronic equipment and storage medium
CN111612158A (en) Model deployment method, device, equipment and storage medium
CN109376285B (en) Data sorting verification method based on json format, electronic device and medium
CN115987549A (en) Abnormal behavior detection method and device of mobile terminal and storage medium
CN114422175A (en) Network security supervision and inspection behavior auditing method and device
CN115168575A (en) Subject supplement method applied to audit field and related equipment
CN115309661A (en) Application testing method and device, electronic equipment and readable storage medium
CN113312261A (en) Test case screening method, test case screening equipment, storage medium and device
CN114942878A (en) Automatic performance testing method for internet application and related equipment
CN114465926A (en) Recursive server monitoring method, device, equipment and storage medium
CN111552634A (en) Method and device for testing front-end system and storage medium
CN114238119A (en) Automatic testing method and system for android application and storage medium
CN112507342A (en) Vulnerability detection method and device, electronic equipment and storage medium
CN112052150A (en) Page loading time detection method, equipment, storage medium and device
CN111914741A (en) House property certificate identification method, device and equipment
CN111104308A (en) Display page testing method and device, storage medium and electronic equipment
CN115775126A (en) Method, apparatus, device and medium for inspecting component assembly
CN112286753B (en) Method, device, server and storage medium for testing image processing accuracy
CN112417252B (en) Crawler path determination method and device, storage medium and electronic equipment

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