A method, system and device for identifying changes in a mobile application graphical user interface

By collecting and analyzing GUI metadata multiple times, XPath lists are generated, GUI components are matched and clustered, and version iterations and dynamic changes are distinguished. This solves the problem of low GUI change recognition accuracy in the existing technology and achieves more accurate version iterations. Change identification.

CN114153352BActive Publication Date: 2024-10-29SUN YAT SEN UNIV
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202111493827.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-08
Publication Date
2024-10-29
Estimated Expiration
2041-12-08

AI Technical Summary

Technical Problem

Existing mobile application GUI change identification methods do not have high accuracy when processing dynamic content, and it is easy to mistake reasonable GUI changes for changes caused by version iterations.

Method used

By collecting the metadata of the GUI page multiple times, we generate an XPath list based on absolute paths and attributes, match GUI components, and cluster the components that fail to match to determine their existence in the basic version and the updated version, and distinguish between version iterations. Resulting changes, reasonable changes and dynamic changes.

Benefits of technology

It improves the accuracy of GUI change identification, avoids misidentification of reasonable dynamic changes, and enhances the accuracy of version iteration changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114153352B_ABST
    Figure CN114153352B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of Internet technology, and discloses a method, system and device for identifying changes in a graphical user interface of a mobile application. The present invention collects metadata corresponding to different version categories of a GUI page multiple times, parses the collected metadata, constructs XPaths corresponding to GUI components of each metadata, matches between GUI components based on an XPath algorithm, and identifies GUI changes caused by version iterations based on matching results; the present invention can avoid identifying GUI changes caused by reasonable dynamic changes as GUI changes caused by version iterations, and further improves the accuracy of GUI change identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of Internet technology, and in particular to a method, system and device for identifying changes in a mobile application graphical user interface. Background Art

[0002] With the popularity of smart terminals, mobile applications have become one of the most important software fields. More and more users and platforms have put forward higher requirements for the software quality of mobile applications. In the Android environment, there are two logical structures that make up the GUI (Graphical User Interface) of mobile applications, one is the GUI component and the other is the GUI container. There are many different types of GUI components (such as text boxes, buttons, pictures), each type of component has its own specific functions, and each component has a bounding box to specify the area occupied by the component. The GUI container is mainly used to provide a spatial structure for the GUI and define the style details about the background or canvas on which the GUI components are presented. When GUI components and GUI containers are combined together, they form a GUI hierarchy, which is usually in the form of a root tree, where smaller components and containers exist in a separate container, and this container is the root of the GUI hierarchy.

[0003] The GUI of a mobile application is usually defined in a file, which is separated from the main logic of the application. Therefore, the development of the GUI affects the final presentation of the GUI. At present, there are some works dedicated to identifying and summarizing the changes of the GUI in the iterative versions of mobile applications to help developers verify the relevant codes of the GUI. Most of these methods are based on computer vision technology. They match and compare GUI components in different versions through the visual features of the image to find out the changes. However, the GUI of modern mobile applications often contains dynamic content (such as news text). The GUI changes caused by these dynamic contents should be considered reasonable. At this time, the use of computer vision-based methods will produce more false positives, mistaking reasonable GUI changes for application version iterations, and the recognition accuracy is not high. Summary of the invention

[0004] The present invention provides a method, system and device for identifying changes in a mobile application graphical user interface, which solves the technical problem that the existing mobile application GUI change identification method has low accuracy.

[0005] A first aspect of the present invention provides a method for identifying changes in a mobile application graphical user interface, comprising:

[0006] Collecting metadata corresponding to different version categories of the GUI page multiple times, wherein the version category includes a basic version and an updated version;

[0007] Parsing each metadata, generating an XPath list of the GUI components of each metadata, wherein the XPath list includes a first XPath based on an absolute path;

[0008] According to the first XPath, GUI components in the GUI page corresponding to two adjacent collection times of the same version category are matched, and GUI components that fail to match are marked as Class A components;

[0009] Cluster the Class A components to determine whether the cluster where the Class A components are located exists only in the basic version or only in the updated version. If so, determine the changes of all GUI components in the cluster where the Class A components are located as changes caused by version iteration, and output the corresponding first recognition result.

[0010] According to an achievable manner of the first aspect of the present invention, the outputting the corresponding first recognition result includes:

[0011] If the cluster where the class A component is located only exists in the basic version, outputting the identification result that all GUI components in the cluster where the class A component is located are deleted components;

[0012] If the cluster where the class A component is located only exists in the updated version, the identification result that all GUI components in the cluster where the class A component is located are added components is output.

[0013] According to an achievable manner of the first aspect of the present invention, the method further includes:

[0014] If the cluster where the Class A component is located exists in both the basic version and the updated version, changes to all GUI components in the cluster where the Class A component is located are determined to be reasonable changes, and a corresponding second recognition result is output.

[0015] According to an achievable manner of the first aspect of the present invention, the XPath list further includes a second XPath based on an attribute, and the method further includes:

[0016] For a successfully matched GUI component, if the GUI component contains dynamic attributes, the GUI component is marked as a Class B component, otherwise it is marked as a Class C component;

[0017] According to the second XPath, the Class B component is matched between the base version and the updated version; if the Class B component only exists in the base version, the Class B component is determined to be a deleted component; if the Class B component only exists in the updated version, the Class B component is determined to be an added component; if the Class B component exists in both the base version and the updated version, it is determined whether the value of the static attribute of the Class B component has changed between the base version and the updated version, and if so, the Class B component is determined to be a modified component;

[0018] According to the second XPath, the C-type component is matched between the basic version and the updated version. If the C-type component only exists in the basic version, the C-type component is determined as a deleted component; if the C-type component only exists in the updated version, the C-type component is determined as an added component; if the C-type component exists in both the basic version and the updated version, it is determined whether the values ​​of all attributes of the C-type component have changed between the basic version and the updated version. If so, the C-type component is determined as a modified component.

[0019] According to an achievable manner of the first aspect of the present invention, generating an XPath list of GUI components of each metadata includes:

[0020] Generating the attribute-based second XPath according to an improved element attribute-based construction method;

[0021] The improved element attribute-based construction method is:

[0022] If an element cannot construct a unique XPath using its own attribute values, then recursively search for ancestor nodes starting from its parent node, and obtain the unique attribute value corresponding to the element from the descendant nodes of its most recently precisely located ancestor node. The XPath of the element is represented by the XPath of its most recently precisely located ancestor node plus the unique attribute value.

[0023] A second aspect of the present invention provides a system for identifying changes in a mobile application graphical user interface, comprising:

[0024] A metadata collection module, used for collecting metadata corresponding to different version categories of the GUI page for multiple times, wherein the version categories include a basic version and an updated version;

[0025] A metadata parsing module, used for parsing each metadata and generating an XPath list of GUI components of each metadata, wherein the XPath list includes a first XPath based on an absolute path;

[0026] A first matching module, configured to match GUI components in GUI pages corresponding to two adjacent collection times of the same version category according to the first XPath, and mark GUI components that fail to match as Class A components;

[0027] The first identification module is used to cluster the Class A components and determine whether the cluster where the Class A components are located exists only in the basic version or only in the updated version. If so, the changes of all GUI components in the cluster where the Class A components are located are determined to be changes caused by version iteration, and the corresponding first identification result is output.

[0028] According to an achievable manner of the second aspect of the present invention, the first identification module includes:

[0029] A first identification unit, configured to output an identification result that all GUI components in the cluster where the class A component is located are deleted components when the cluster where the class A component is located only exists in the basic version;

[0030] The second identification unit is used for outputting an identification result that all GUI components in the cluster where the class A component is located are added components when the cluster where the class A component is located only exists in the updated version.

[0031] According to an achievable manner of the second aspect of the present invention, the first identification module is further used for:

[0032] If the cluster where the Class A component is located exists in both the basic version and the updated version, changes to all GUI components in the cluster where the Class A component is located are determined to be reasonable changes, and a corresponding second recognition result is output.

[0033] According to an achievable manner of the second aspect of the present invention, the XPath list further includes a second XPath based on an attribute, and the system further includes:

[0034] A marking module is used for marking a successfully matched GUI component as a Class B component if the GUI component contains dynamic attributes, otherwise it is marked as a Class C component;

[0035] A second identification module is used to match the Class B component between the base version and the updated version according to the second XPath; if the Class B component only exists in the base version, the Class B component is determined to be a deleted component; if the Class B component only exists in the updated version, the Class B component is determined to be an added component; if the Class B component exists in both the base version and the updated version, determine whether the value of the static attribute of the Class B component has changed between the base version and the updated version, and if so, determine the Class B component to be a modified component;

[0036] The third identification module is used to match the C-type component between the basic version and the updated version according to the second XPath; if the C-type component only exists in the basic version, the C-type component is determined as a deleted component; if the C-type component only exists in the updated version, the C-type component is determined as an added component; if the C-type component exists in both the basic version and the updated version, it is determined whether the values ​​of all attributes of the C-type component have changed between the basic version and the updated version; if so, the C-type component is determined as a modified component.

[0037] According to an achievable manner of the second aspect of the present invention, the metadata parsing module includes a second XPath generating unit, and the second XPath generating unit is used to:

[0038] Generating the attribute-based second XPath according to an improved element attribute-based construction method;

[0039] The improved element attribute-based construction method is:

[0040] If an element cannot construct a unique XPath using its own attribute values, then recursively search for ancestor nodes starting from its parent node, and obtain the unique attribute value corresponding to the element from the descendant nodes of its most recently precisely located ancestor node. The XPath of the element is represented by the XPath of its most recently precisely located ancestor node plus the unique attribute value.

[0041] A third aspect of the present invention provides a device for identifying changes in a mobile application graphical user interface, comprising:

[0042] A memory for storing instructions; wherein the instructions are instructions that can implement the method for identifying changes in a mobile application graphical user interface as described in any of the above implementation methods;

[0043] A processor is used to execute instructions in the memory.

[0044] A fourth aspect of the present invention is a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method for identifying changes in a mobile application graphical user interface as described in any of the above-implemented methods.

[0045] It can be seen from the above technical solutions that the present invention has the following advantages:

[0046] The present invention collects metadata corresponding to different version categories of GUI pages for multiple times, parses the collected metadata, constructs XPaths of GUI components corresponding to each metadata, matches GUI components based on the XPath algorithm, and identifies GUI changes caused by version iterations according to the matching results; the present invention can avoid identifying GUI changes caused by reasonable dynamic changes as GUI changes caused by version iterations, and further improves the accuracy of GUI change identification. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0048] Figure 1 A flowchart of a method for identifying changes in a mobile application graphical user interface provided by an optional embodiment of the present invention;

[0049] Figure 2 A schematic structural diagram of a system for identifying changes in a mobile application graphical user interface provided as an optional embodiment of the present invention. Description of the drawings:

[0051] 1- Metadata collection module; 2- Metadata parsing module; 3- First matching module; 4- First recognition module. DETAILED DESCRIPTION

[0052] The embodiments of the present invention provide a method, system and device for identifying changes in a graphical user interface of a mobile application, which are used to solve the technical problem that the existing method for identifying changes in a mobile application GUI has low accuracy.

[0053] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0054] In order to better understand the present invention, the terms described in the following embodiments of the present invention are explained as follows:

[0055] GUI page: the application screen displayed on the mobile device;

[0056] GUI metafile: a file used to define the GUI;

[0057] XML: An extensible markup language designed for transmitting and storing data;

[0058] XPath: A language for finding information in XML documents. Its function is to find elements in XML documents by path or attribute.

[0059] See also Figure 1 , Figure 1 A flow chart of a method for identifying changes in a mobile application graphical user interface provided by an embodiment of the present invention is shown.

[0060] An embodiment of the present invention provides a method for identifying changes in a mobile application graphical user interface, comprising steps S1-S4.

[0061] Step S1, collecting metadata of GUI pages corresponding to different version categories for multiple times, wherein the version categories include basic versions and updated versions.

[0062] Specifically, given two versions of a mobile application, one is a basic version and the other is an updated version. The embodiment of the present invention first uses a breadth-first search to traverse the basic version of the mobile application, and records the click event sequence and the GUI page transfer diagram during the traversal. After collecting the GUI metafile (which contains the metadata of the GUI page), the click event sequence is further replayed on the basic version and the updated version of the mobile application, and the metadata of the GUI page is collected again. In this way, for a GUI page, multiple metadata corresponding to the basic version and the updated version will be collected. Among them, the metadata of each GUI page of each version is collected at least twice.

[0063] Step S2: parse each metadata to generate an XPath list of the GUI components of each metadata, wherein the XPath list includes a first XPath based on an absolute path.

[0064] XPath can use absolute path and relative path to locate elements. The absolute path describes the path from the root node of the XML file to the target node, while the relative path describes the path from any node to the target node through elements and attributes. In the embodiment of the present invention, the absolute path is used as the first XPath.

[0065] Step S3: According to the first XPath, GUI components in the GUI page corresponding to two adjacent collection times of the same version category are matched, and GUI components that fail to match are marked as Class A components.

[0066] In step S1, when collecting metadata, the present invention collects the GUI pages of each version of the mobile application multiple times, in order to determine and find out which GUI components will undergo dynamic changes during non-version iterations (i.e., in a single version). When GUI change identification is performed later, these dynamic changes will be considered reasonable.

[0067] The embodiment of the present invention finds out these dynamic changes through step S3. In specific implementation, for each GUI page, its multiple metadata are compared to determine whether the state of the GUI components in the GUI page will change in a single version. Since the GUI page hierarchy in a single version of the mobile application will not change, the embodiment of the present invention uses the first XPath constructed by the absolute path to match the GUI components in different metadata of the GUI page.

[0068] Step S4, clustering the Class A components to determine whether the cluster where the Class A components are located exists only in the basic version or only in the updated version. If so, the changes of all GUI components in the cluster where the Class A components are located are determined to be changes caused by version iteration, and the corresponding first recognition result is output.

[0069] In one achievable manner, the outputting the corresponding first recognition result includes:

[0070] If the cluster where the class A component is located only exists in the basic version, outputting the identification result that all GUI components in the cluster where the class A component is located are deleted components;

[0071] If the cluster where the class A component is located only exists in the updated version, the identification result that all GUI components in the cluster where the class A component is located are added components is output.

[0072] In one implementation, the method further includes:

[0073] If the cluster where the Class A component is located exists in both the basic version and the updated version, changes to all GUI components in the cluster where the Class A component is located are determined to be reasonable changes, and a corresponding second recognition result is output.

[0074] There may also be additions and deletions of GUI components in a single version of a mobile application, and the above-mentioned embodiment of the present invention realizes the identification of this type of GUI components (Class A components). By clustering such GUI components, and when identifying GUI changes, Class A components are not matched (that is, it is not determined whether the number of Class A components has increased or decreased), but it is directly determined whether the cluster where the Class A components are located exists in both the basic version and the updated version of the mobile application. If the cluster exists in both the basic version and the updated version of the mobile application, the addition and deletion of the GUI components contained in this cluster are considered reasonable, otherwise all the GUI components in the cluster are found and regarded as deletions or additions of components. The embodiment of the present invention can avoid identifying GUI changes caused by reasonable dynamic changes as GUI changes caused by version iterations, and further improve the accuracy of GUI change identification.

[0075] In one implementation, clustering the class A components includes:

[0076] The similarity between the two class A components is determined. If the similarity is not less than 0.8, they are classified into the same cluster.

[0077] The method for determining the similarity between the two A-type components is as follows:

[0078] If the two GUI components are located at different levels on the GUI structure tree, the similarity is 0;

[0079] If two GUI components are located at the same level in the GUI structure tree:

[0080] If the ids of two GUI components are not empty and are equal, the similarity is 1;

[0081] If the ids of two components are not all empty and are not equal, the similarity is 0;

[0082] If both component ids are empty:

[0083] Initialize socre=0;

[0084] If the horizontal or vertical coordinates of the two components are equal, then scroe=score+0.4;

[0085] If the length or width of two components is equal, then score = score + 0.4;

[0086] The output similarity is the final value of score.

[0087] The clustering method of the embodiment of the present invention is simple, convenient and easy to implement.

[0088] In one implementation, the XPath list further includes a second XPath based on an attribute, and the method further includes:

[0089] For a successfully matched GUI component, if the GUI component contains dynamic attributes, the GUI component is marked as a Class B component, otherwise it is marked as a Class C component;

[0090] According to the second XPath, the Class B component is matched between the base version and the updated version; if the Class B component only exists in the base version, the Class B component is determined to be a deleted component; if the Class B component only exists in the updated version, the Class B component is determined to be an added component; if the Class B component exists in both the base version and the updated version, it is determined whether the value of the static attribute of the Class B component has changed between the base version and the updated version, and if so, the Class B component is determined to be a modified component;

[0091] According to the second XPath, the C-type component is matched between the basic version and the updated version. If the C-type component only exists in the basic version, the C-type component is determined as a deleted component; if the C-type component only exists in the updated version, the C-type component is determined as an added component; if the C-type component exists in both the basic version and the updated version, it is determined whether the values ​​of all attributes of the C-type component have changed between the basic version and the updated version. If so, the C-type component is determined as a modified component.

[0092] According to the marking method of the embodiment of the present invention, the Class B component is a non-add-delete component with a changed attribute value, while the Class C component is an add-delete component with all attribute values ​​unchanged. The embodiment of the present invention further identifies Class B components and Class C components to achieve the identification of three GUI change types: added components, deleted components, and modified components. The method is simple and convenient.

[0093] Among them, by comparing several attributes of the GUI component, it is determined whether these attributes have changed. If the attribute has changed, the attribute is marked as a dynamic attribute, otherwise it is marked as a static attribute.

[0094] Since the purpose of the present invention is to identify the GUI interface change of the mobile application, in one implementation, the embodiment of the present invention selects attributes related to the GUI for marking, and these attributes are shown in Table 1:

[0095] Table 1

[0096]

[0097] Since the hierarchical structure of the GUI page will not change in a single version of the mobile application, the XPath constructed by the absolute path can be used to match the GUI components; while for the basic version and the updated version of the mobile application, the hierarchical structure of the GUI page inside the two may change more, and it will be difficult to match the GUI components using the XPath constructed by the absolute path. Therefore, in the above embodiment of the present invention, the GUI component matching between the basic version and the updated version of the mobile application is performed according to the second XPath. Since the GUI hierarchical structure of the GUI page in the basic version and the updated version of the mobile application may change, and the uniqueness of the GUI component attribute value in the GUI page may also change, when constructing the second XPath of the GUI component, the present invention stores all the second XPaths that can be used for unique positioning of each component in a list. Assuming there is a GUI page G, G has a GUI component e1 in the basic version of the mobile application, and a GUI component e2 in the updated version of the mobile application, then the matching method of the GUI component is: traverse the XPath lists of e1 and e2, if the XPath lists of e1 and e2 have an intersection, then e1 and e2 are a pair of GUI component matching pairs between the basic version and the updated version of the mobile application.

[0098] Furthermore, if some GUI components still cannot be matched according to the XPath list, a coordinate matching method is used to try to find a match for the unmatched GUI components in their opposite versions. If both of the above two matching methods fail, it means that these unmatched GUI components are GUI components deleted from the basic version of the mobile application or GUI components added to the updated version.

[0099] In one implementation, given two sets X1 and X2 of GUI components, the method for matching elements in the sets X1 and X2 is:

[0100] Traverse the elements in X1 and use the following formula to calculate the similarity score between this element and each unmatched element in set X2. The element in X2 with the highest similarity score is considered to be a match for this element:

[0101] S=(|x1-x2|+|y1-y2|+|w1-w2|+|h1-h2|)

[0102] Where S represents the similarity score, x1, y1, w1, h1 are the horizontal coordinate, vertical coordinate, width and height of element E1, and x2, y2, w2, h2 are the horizontal coordinate, vertical coordinate, width and height of element E2.

[0103] In one achievable manner, generating an XPath list of GUI components of each metadata includes:

[0104] Generating the attribute-based second XPath according to an improved element attribute-based construction method;

[0105] The improved element attribute-based construction method is:

[0106] If an element cannot construct a unique XPath using its own attribute values, then recursively search for ancestor nodes starting from its parent node, and obtain the unique attribute value corresponding to the element from the descendant nodes of its most recently precisely located ancestor node. The XPath of the element is represented by the XPath of its most recently precisely located ancestor node plus the unique attribute value.

[0107] In the prior art, XPath can be located according to element attributes. If the value of a certain attribute of an element is unique in the entire XML document, then XPath can be directly expressed as the value of this attribute (single attribute representation). If a single attribute value of an element is not unique, but the combination of its multiple attribute values ​​is unique, then XPath can be expressed as a combination of multiple attribute values ​​(multi-attribute combination representation). If the combination of all attribute values ​​of an element is still not unique, that is, the element cannot be accurately located, then the ancestor node can be recursively searched from its parent node until an ancestor node is found that can be accurately located. Then the XPath of the element is the XPath of its nearest ancestor node that can be accurately located plus the path from the ancestor node to the element (ancestor node representation), otherwise the element cannot construct XPath through element attributes. In order to make the positioning of XPath more accurate and effective, the embodiment of the present invention improves the existing method of constructing XPath according to element attributes.

[0108] For example, the existing XPath obtained by the existing method is:

[0109] I=[[LineraLayout@id=′12] / LinearLayout[1] / TextView@id=′b1′]

[0110] The XPath contains the element index LinearLayout[1], which will change with the change of the GUI hierarchy. Therefore, using the XPath containing the index to match the GUI component cannot guarantee the correctness of the match. The XPath constructed by the improved element attribute-based construction method in the embodiment of the present invention is: I=[[LinearLayout@id=′12] / TextView@id=′b1′].

[0111] Furthermore, the method of the embodiment of the present invention also includes:

[0112] Generate a corresponding GUI change identification report based on the identification results.

[0113] The present invention also provides a system for identifying changes in a mobile application graphical user interface.

[0114] See also Figure 2 , Figure 2 A structural schematic diagram of a mobile application graphical user interface change recognition system provided by an embodiment of the present invention is shown.

[0115] A system for identifying changes in a mobile application graphical user interface according to an embodiment of the present invention includes:

[0116] The metadata collection module 1 is used to collect metadata corresponding to different version categories of the GUI page for multiple times, and the version categories include basic versions and updated versions;

[0117] A metadata parsing module 2, used for parsing each metadata and generating an XPath list of GUI components of each metadata, wherein the XPath list includes a first XPath based on an absolute path;

[0118] A first matching module 3, configured to match GUI components in GUI pages corresponding to two adjacent collection times of the same version category according to the first XPath, and mark GUI components that fail to match as Class A components;

[0119] The first identification module 4 is used to cluster the Class A components and determine whether the cluster where the Class A components are located exists only in the basic version or only in the updated version. If so, the changes of all GUI components in the cluster where the Class A components are located are determined to be changes caused by version iteration, and the corresponding first identification result is output.

[0120] In one achievable manner, the first identification module 4 includes:

[0121] A first identification unit, configured to output an identification result that all GUI components in the cluster where the class A component is located are deleted components when the cluster where the class A component is located only exists in the basic version;

[0122] The second identification unit is used for outputting an identification result that all GUI components in the cluster where the class A component is located are added components when the cluster where the class A component is located only exists in the updated version.

[0123] In one achievable manner, the first identification module 4 is further used for:

[0124] If the cluster where the Class A component is located exists in both the basic version and the updated version, changes to all GUI components in the cluster where the Class A component is located are determined to be reasonable changes, and a corresponding second recognition result is output.

[0125] In one implementation, the XPath list further includes a second XPath based on an attribute, and the system further includes:

[0126] A marking module is used for marking a successfully matched GUI component as a Class B component if the GUI component contains dynamic attributes, otherwise it is marked as a Class C component;

[0127] A second identification module is used to match the Class B component between the base version and the updated version according to the second XPath; if the Class B component only exists in the base version, the Class B component is determined to be a deleted component; if the Class B component only exists in the updated version, the Class B component is determined to be an added component; if the Class B component exists in both the base version and the updated version, determine whether the value of the static attribute of the Class B component has changed between the base version and the updated version, and if so, determine the Class B component to be a modified component;

[0128] The third identification module is used to match the C-type component between the basic version and the updated version according to the second XPath; if the C-type component only exists in the basic version, the C-type component is determined as a deleted component; if the C-type component only exists in the updated version, the C-type component is determined as an added component; if the C-type component exists in both the basic version and the updated version, it is determined whether the values ​​of all attributes of the C-type component have changed between the basic version and the updated version; if so, the C-type component is determined as a modified component.

[0129] In one achievable manner, the metadata parsing module 2 includes a second XPath generating unit, and the second XPath generating unit is used to:

[0130] Generating the attribute-based second XPath according to an improved element attribute-based construction method;

[0131] The improved element attribute-based construction method is:

[0132] If an element cannot construct a unique XPath using its own attribute values, then recursively search for ancestor nodes starting from its parent node, and obtain the unique attribute value corresponding to the element from the descendant nodes of its most recently precisely located ancestor node. The XPath of the element is represented by the XPath of its most recently precisely located ancestor node plus the unique attribute value.

[0133] The present invention also provides a device for identifying changes in a mobile application graphical user interface, comprising:

[0134] A memory for storing instructions; wherein the instructions are instructions that can implement the method for identifying changes to a mobile application graphical user interface as described in any one of the above embodiments;

[0135] A processor is used to execute instructions in the memory.

[0136] The present invention also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for identifying changes in a mobile application graphical user interface as described in any one of the above embodiments is implemented.

[0137] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0138] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0139] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0140] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0141] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0142] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for identifying changes in a mobile application graphical user interface, characterized in that: include: Collecting metadata corresponding to different version categories of the GUI page multiple times, wherein the version category includes a basic version and an updated version; Parsing each metadata, generating an XPath list of the GUI components of each metadata, wherein the XPath list includes a first XPath based on an absolute path; According to the first XPath, GUI components in the GUI page corresponding to two adjacent collection times of the same version category are matched, and GUI components that fail to match are marked as Class A components; Clustering the Class A components, determining whether the cluster where the Class A components are located exists only in the basic version or only in the updated version, and if so, determining the changes of all GUI components in the cluster where the Class A components are located as changes caused by version iteration, and outputting the corresponding first recognition result; The XPath list further includes a second XPath based on an attribute, and the method further includes: For a successfully matched GUI component, if the GUI component contains dynamic attributes, the GUI component is marked as a Class B component, otherwise it is marked as a Class C component; According to the second XPath, the Class B component is matched between the base version and the updated version; if the Class B component only exists in the base version, the Class B component is determined to be a deleted component; if the Class B component only exists in the updated version, the Class B component is determined to be an added component; if the Class B component exists in both the base version and the updated version, it is determined whether the value of the static attribute of the Class B component has changed between the base version and the updated version, and if so, the Class B component is determined to be a modified component; According to the second XPath, the C-type component is matched between the basic version and the updated version. If the C-type component only exists in the basic version, the C-type component is determined as a deleted component; if the C-type component only exists in the updated version, the C-type component is determined as an added component; if the C-type component exists in both the basic version and the updated version, it is determined whether the values ​​of all attributes of the C-type component have changed between the basic version and the updated version. If so, the C-type component is determined as a modified component.

2. The method for identifying changes in a mobile application graphical user interface according to claim 1, characterized in that: The first recognition result corresponding to the output includes: If the cluster where the class A component is located only exists in the basic version, outputting the identification result that all GUI components in the cluster where the class A component is located are deleted components; If the cluster where the class A component is located only exists in the updated version, the identification result that all GUI components in the cluster where the class A component is located are added components is output.

3. The method for identifying changes in a mobile application graphical user interface according to claim 2, characterized in that: The method further comprises: If the cluster where the Class A component is located exists in both the basic version and the updated version, changes to all GUI components in the cluster where the Class A component is located are determined to be reasonable changes, and a corresponding second recognition result is output.

4. The method for identifying changes in a mobile application graphical user interface according to claim 1, characterized in that: The generating of the XPath list of the GUI components of each metadata comprises: Generating the attribute-based second XPath according to an improved element attribute-based construction method; The improved element attribute-based construction method is: If an element cannot construct a unique XPath using its own attribute values, then recursively search for ancestor nodes starting from its parent node, and obtain the unique attribute value corresponding to the element from the descendant nodes of its most recently precisely located ancestor node. The XPath of the element is represented by the XPath of its most recently precisely located ancestor node plus the unique attribute value.

5. A system for identifying changes in a mobile application graphical user interface, characterized in that: include: A metadata collection module, used for collecting metadata corresponding to different version categories of the GUI page for multiple times, wherein the version categories include a basic version and an updated version; A metadata parsing module, used for parsing each metadata and generating an XPath list of GUI components of each metadata, wherein the XPath list includes a first XPath based on an absolute path; A first matching module, configured to match GUI components in GUI pages corresponding to two adjacent collection times of the same version category according to the first XPath, and mark GUI components that fail to match as Class A components; A first identification module is used to cluster the class A components to determine whether the cluster where the class A components are located exists only in the basic version or only in the updated version. If so, the changes of all GUI components in the cluster where the class A components are located are determined to be changes caused by version iteration, and the corresponding first identification result is output; The XPath list further includes a second XPath based on an attribute, and the system further includes: A marking module is used for marking a successfully matched GUI component as a Class B component if the GUI component contains dynamic attributes, otherwise it is marked as a Class C component; A second identification module is used to match the Class B component between the base version and the updated version according to the second XPath; if the Class B component only exists in the base version, the Class B component is determined to be a deleted component; if the Class B component only exists in the updated version, the Class B component is determined to be an added component; if the Class B component exists in both the base version and the updated version, determine whether the value of the static attribute of the Class B component has changed between the base version and the updated version, and if so, determine the Class B component to be a modified component; The third identification module is used to match the C-type component between the basic version and the updated version according to the second XPath; if the C-type component only exists in the basic version, the C-type component is determined as a deleted component; if the C-type component only exists in the updated version, the C-type component is determined as an added component; if the C-type component exists in both the basic version and the updated version, it is determined whether the values ​​of all attributes of the C-type component have changed between the basic version and the updated version; if so, the C-type component is determined as a modified component.

6. The mobile application graphical user interface change recognition system according to claim 5, characterized in that: The first identification module comprises: A first identification unit, configured to output an identification result that all GUI components in the cluster where the class A component is located are deleted components when the cluster where the class A component is located only exists in the basic version; The second identification unit is used for outputting an identification result that all GUI components in the cluster where the class A component is located are added components when the cluster where the class A component is located only exists in the updated version.

7. The mobile application graphical user interface change recognition system according to claim 6, characterized in that: The first identification module is also used for: If the cluster where the Class A component is located exists in both the basic version and the updated version, changes to all GUI components in the cluster where the Class A component is located are determined to be reasonable changes, and a corresponding second recognition result is output.

8. The system for identifying changes in a mobile application graphical user interface according to claim 5, characterized in that: The metadata parsing module includes a second XPath generating unit, and the second XPath generating unit is used to: Generating the attribute-based second XPath according to an improved element attribute-based construction method; The improved element attribute-based construction method is: If an element cannot construct a unique XPath using its own attribute values, then recursively search for ancestor nodes starting from its parent node, and obtain the unique attribute value corresponding to the element from the descendant nodes of its most recently precisely located ancestor node. The XPath of the element is represented by the XPath of its most recently precisely located ancestor node plus the unique attribute value.

9. A device for identifying changes in a mobile application graphical user interface, characterized in that: include: A memory for storing instructions; wherein the instructions are instructions for implementing the method for identifying changes to a mobile application graphical user interface as described in any one of claims 1 to 4; A processor is used to execute instructions in the memory.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the method for identifying changes in the mobile application graphical user interface as described in any one of claims 1-4 is implemented.

Citation Information

Patent Citations

  • Method, system and equipment for processing service components

    CN102799426A

  • Software design document generating method and device

    CN103984554A

  • User interface element management method and device

    CN104516633A

  • Graphical user interface prototype providing method and device

    CN112181579A

  • Metadata updating method and device, electronic equipment and computer readable storage medium

    CN112685433A