A page positioning method, device, equipment, storage medium and product

By using control attribute comparison technology to locate the page in automated testing of mobile applications, the problem of being unable to locate the page was solved, thus improving the automation level and efficiency of testing.

CN119759751BActive Publication Date: 2026-07-07BEIJING CO WHEELS TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING CO WHEELS TECH CO LTD
Filing Date
2024-08-20
Publication Date
2026-07-07

Smart Images

  • Figure CN119759751B_ABST
    Figure CN119759751B_ABST
Patent Text Reader

Abstract

The application discloses a page positioning method and device, equipment, storage medium and product, and relates to the field of page identification. The page positioning method comprises the following steps: acquiring a first control attribute set corresponding to a first control set in a to-be-positioned page; comparing the first control attribute set with second control attribute sets of second control sets of each page in a page control graph to obtain an attribute comparison result; and positioning the page where the to-be-positioned page is located according to the attribute comparison result, which provides an important basis for automatic testing of an application in an operating system and is beneficial to improving the automation degree and testing efficiency of the operating system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of page recognition, and more particularly to a page positioning method, apparatus, device, storage medium, and product. Background Technology

[0002] With the rapid development of mobile internet technology, mobile applications (Android / iOS applications) are growing in scale. Ensuring the quality of mobile applications through effective testing has become a major challenge for all mobile application development teams. Faced with frequent version releases and numerous device types, manual testing is increasingly inadequate, leading to a growing demand for automated testing. Automated testing simulates each user action automatically. Each step consists of "object location" and "object operation," with "object location" being the primary task. In the context of automated testing for mobile applications, page location becomes a crucial foundation.

[0003] In traditional automated testing, there are two main methods for identifying the page being tested: the first is manual intervention followed by automated testing; the second is using an automated script to actively navigate to the page where the test point is located. However, neither of these methods can actively locate the page, thus failing to achieve fully automated testing. Summary of the Invention

[0004] This invention provides a page location method, apparatus, device, storage medium, and product to solve the problem of being unable to locate the page during the testing of mobile applications, and to provide an important foundation for the automated testing of mobile applications.

[0005] In a first aspect, embodiments of the present invention provide a page positioning method, including:

[0006] Get the set of properties of the first control corresponding to the first set of controls in the page to be located;

[0007] Compare the first set of control attributes with the second set of control attributes of each page in the page control graph to obtain the attribute comparison results.

[0008] The page containing the page to be located is determined based on the comparison results of each attribute.

[0009] Secondly, embodiments of the present invention provide a page positioning device, comprising:

[0010] The first attribute acquisition module is used to obtain the first control attribute set corresponding to the first control set in the page to be located.

[0011] The attribute comparison module is used to compare the attribute set of the first control with the attribute set of the second control set of each page in the page control graph, and obtain the attribute comparison result.

[0012] The first page positioning module is used to locate the page where the page to be located is located based on the comparison results of the attributes.

[0013] Thirdly, embodiments of the present invention provide an electronic device, the electronic device comprising:

[0014] At least one processor; and

[0015] A memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the page positioning method according to any embodiment of the present invention.

[0017] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing computer instructions that, when executed by a processor, implement the page positioning method described in any embodiment of the present invention.

[0018] Fifthly, embodiments of the present invention provide a computer program product including a computer program, which, when executed by a processor, implements the page positioning method described in any embodiment of the present invention.

[0019] The technical solution of this invention involves obtaining a first set of control attributes corresponding to a first set of controls within the page to be located; comparing the first set of control attributes with the second set of control attributes of each page in the page control graph to obtain an attribute comparison result; and locating the page containing the page to be located based on the attribute comparison result. By locating the page containing the page based on the matching degree of control attributes within the page, automatic location of the page to be located is achieved, solving the problem of being unable to locate the page during mobile application testing. This provides an important foundation for automated testing of applications within operating systems and is beneficial for improving the automation level and testing efficiency of operating systems.

[0020] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 A flowchart of a page positioning method provided in Embodiment 1 of the present invention;

[0023] Figure 2 A flowchart of a page positioning method provided in Embodiment 2 of the present invention;

[0024] Figure 3 A flowchart of a page positioning method provided in Embodiment 3 of the present invention;

[0025] Figure 4 This is a schematic diagram of the structure of a page positioning device provided in Embodiment 4 of the present invention;

[0026] Figure 5 This is a schematic diagram of the structure of an electronic device that implements the page positioning method of this invention. Detailed Implementation

[0027] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0028] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0029] Example 1

[0030] Figure 1This is a flowchart illustrating a page positioning method according to Embodiment 1 of the present invention. This embodiment is applicable to situations where the page containing an application within an operating system needs to be located. The method can be executed by a page positioning device, which can be implemented in hardware and / or software and can be configured in an electronic device. The page positioning method provided by this embodiment is applicable to situations where the operating system requires page positioning, and is particularly suitable for automated testing scenarios of applications within Android or iOS operating systems.

[0031] like Figure 1 As shown, the method includes:

[0032] S110. Obtain the first set of control attributes corresponding to the first set of controls within the page to be located.

[0033] The page to be located can be understood as a page within the operating system application that is waiting to be located, such as the currently accessed page. The first set of controls can be understood as the collection of the first controls within the page to be located. Controls refer to visual graphic "elements" that can be placed on a form, such as buttons, file editing boxes, etc. The first set of control properties can be understood as the collection of properties contained in each first control within the page to be located.

[0034] Specifically, using data crawling tools or algorithms, crawl the first controls contained in the page to be located, form a first control set, and obtain the control attributes of each first control in the first control set to form a first control attribute set.

[0035] S120. Compare the attributes of the first control attribute set with the second control attribute set of each page in the page control graph to obtain the attribute comparison result.

[0036] The page control graph can be understood as a graph depicting pages within an operating system, the controls contained within those pages, and the properties of those controls. The page control graph reflects the navigation relationships between pages, the containment relationships between pages and controls, and the attribute information of the controls. The attribute comparison result is a comparison between the attributes of the first control within the page to be located and the attributes of controls within each page in the page control graph. The attribute comparison result aims to indicate the degree of matching between the page to be located and the pages in the page control graph. The attribute comparison result may include: whether the second set of control attributes contains the first set of control attributes, or the number of times the second set of control attributes contains the first set of control attributes.

[0037] Specifically, the attribute set of the first control set corresponding to the first control set in the page to be located is compared with the attribute set of the second control set of each page in the page control graph, respectively, to obtain the attribute comparison results between the page to be located and each control in each page of the page control graph.

[0038] Understandably, before locating the page to be located, it is necessary to crawl the pages of various applications within the operating system, the controls within the pages, and the control attribute information, draw the page control map, and store it on the computer device for later use.

[0039] In an optional embodiment, before obtaining the first set of control attributes corresponding to the first set of controls within the page to be located, the method further includes: drawing a page map of each application in the operating system, the page map including pages within the application and the jump relationships between pages; obtaining a second set of controls within each page under the page map, and obtaining a second set of control attributes for the second set of controls; and constructing a page control map based on the page map of the operating system, the second set of controls, and the corresponding second set of control attributes.

[0040] Specifically, using data crawling tools or algorithms, the system crawls sets of second controls and their corresponding attribute sets from the pages of various applications within the operating system. A page graph is then drawn based on the navigation relationships between pages, where each node represents a page. Building upon this page graph, the system draws the second controls contained within each page, along with their corresponding attributes, thus constructing a page control graph. Second control attributes can include general attributes of the second control, or aggregated attributes of multiple general attributes.

[0041] Optionally, the general properties of a control include at least one of the following: control identifier, control class name, control display text, control description, whether the control is selected, whether the control is clickable, whether the control is enabled, whether the control is selectable, and whether the control has focus.

[0042] Specifically, the control identifier (ID) uniquely identifies the control. The control class name (class) indicates the control type; it can be defined by the developer, and multiple controls may have the same class name, so uniqueness is not guaranteed. The control display text (text) represents the text content displayed on the control. The control description (description / content-desc) describes the function of the control; some controls may lack this attribute. The control is checked (checked), typically used for checkboxes, radio buttons, switches, etc. The control is clickable (clickable); if clickable returns false, the control is currently not clickable. The control is enabled (enabled); if not, the control cannot be operated. The control is checked (checkable); returning false indicates it is not selectable, meaning it will be automatically released after being clicked. The control has focus (focused), indicating whether the control has input focus.

[0043] S130. Locate the page containing the page to be located based on the attribute comparison results.

[0044] In addition to locating the page containing the page to be located as one of the location results, the page name or identifier can also be obtained as a location result.

[0045] Specifically, the basic principle of locating the page containing the page to be located based on attribute comparison results is to determine the page containing the page whose attributes best match the page to be located, based on the attribute comparison results of each page. The specific form of the matching degree can be represented by matching probability or matching weight, etc., and this embodiment does not set any restrictions on this.

[0046] In this embodiment, the page containing the control attributes in the page to be located is compared with the control attributes in each page of the application. The page to be located is located based on the degree of matching of the control attributes in the page, thereby realizing the location of the page to be located and providing an important foundation for the automated testing of applications in the operating system.

[0047] The technical solution of this invention involves obtaining a first set of control attributes corresponding to a first set of controls within a page to be located; comparing the first set of control attributes with the second set of control attributes of each page in the page control graph to obtain an attribute comparison result; and locating the page where the page to be located is located based on the attribute comparison result. This provides an important foundation for automated testing of applications within an operating system and is beneficial for improving the automation level and testing efficiency of the operating system.

[0048] Example 2

[0049] Figure 2This is a flowchart of a page positioning method provided in Embodiment 2 of the present invention. Based on the above embodiments, this embodiment further refines the process of generating attribute comparison results and the process of page positioning based on attribute comparison results, specifically as follows:

[0050] The step of comparing the first control attribute set with the second control attribute set of each page in the page control graph to obtain the attribute comparison result includes: obtaining the core attribute corresponding to each first control in the first control set in the first control attribute set; for each first control, comparing the core attribute with the second control attribute set of each page in the page control graph to obtain the number of core attributes corresponding to each first control contained in the second control attribute set, and using the number of core attributes corresponding to each first control contained in the second control attribute set as the attribute comparison result.

[0051] The step of locating the page to be located based on the comparison results of each attribute includes: determining the number of core attributes corresponding to the first control contained in the second control attribute set as the weight of the page where the second control set is located; and determining the page with the largest weight as the page where the page to be located is located.

[0052] like Figure 2 As shown, the method includes:

[0053] S210. Obtain the first set of control attributes corresponding to the first set of controls within the page to be located.

[0054] S220. Obtain the core attribute corresponding to each control in the first control set in the first control attribute set.

[0055] The core attributes of the first control are the attributes of related controls centered around the first control. Optionally, the core attributes include: general attributes of the first control; or, aggregate attributes of key attributes of the first control and key attributes of its parent control; wherein the key attributes are selected from general attributes.

[0056] It should be noted that parent controls include: the parent control, the two-level parent controls, and even higher-level controls. For example, the first control is a volume control, and the parent control is a music playback control. The aggregated property of the key attribute "text" of the volume control and the key attribute "text" of the music playback control is used as the core property of the volume control.

[0057] In the process of page positioning based on the comparison of control attributes between pages, there may be some special cases. For example, multiple different controls on the same page may have the same common attributes. In this case, it is not accurate enough to locate the page by relying solely on the common attributes of the first control. Therefore, this embodiment utilizes the nesting relationship of controls within the page to aggregate the key attributes of the first control with the key attributes of the first control's parent control to obtain aggregated attributes. This significantly improves the recognizability of control attributes, thereby improving the accuracy of page positioning results based on attribute comparison.

[0058] S230. For each first control, compare the core attribute with the second control attribute set of each page in the page control graph to obtain the number of core attributes corresponding to each first control contained in the second control attribute set, and use the number of core attributes corresponding to each first control contained in the second control attribute set as the attribute comparison result.

[0059] Specifically, for each first control, the core attribute of the first control is compared one by one with the second control attributes contained in the second control attribute set of each page in the page control graph. If the second control attribute is the same as the core attribute of the first control, the statistical value is incremented by one, thereby counting the number of core attributes corresponding to each first control contained in the second control attribute set. The number of core attributes corresponding to each first control contained in the second control attribute set is taken as the attribute comparison result between the first control attribute set and the second control attribute set.

[0060] S240. The number of core attributes corresponding to the first control contained in the second control attribute set is determined as the weight of the page where the second control set is located.

[0061] The page weight is used to indicate the degree of matching between the page and the control properties of the page to be located.

[0062] Specifically, for each first control in the first control set, the core attribute of the first control is compared with the attribute set of the second control set of each page in the page control graph. If the attribute set of the second control contains the core attribute of the first control, such as the same XML Path Language (XPath) value, the weight of the page where the second control set is located is increased by 1, thereby obtaining the weight of each page in the page control graph.

[0063] S250. The page with the highest weight is identified as the page containing the page to be located.

[0064] Specifically, the page with the highest weight is identified as the page containing the page to be located. Furthermore, the page name of the page to be located is obtained as the location result, facilitating its use during application testing.

[0065] The technical solution of this invention involves obtaining a first set of control attributes corresponding to a first set of controls within the page to be located; obtaining the core attribute corresponding to each first control in the first set of controls within the first set of controls; for each first control, comparing the core attribute with the second set of control attributes of each page in the page control graph to obtain the number of core attributes corresponding to each first control contained in the second set of control attributes, and using the number of core attributes corresponding to each first control contained in the second set of control attributes as the attribute comparison result; for the second set of control attributes of each page in the page control graph, determining the number of core attributes corresponding to the first control contained in the second set of control attributes as the weight of the page where the corresponding second set of controls is located; and determining the page with the largest weight as the page where the page to be located is located. By using the aggregated attributes of the first control and its parent controls for attribute comparison to achieve page location, this method provides an important foundation for automated testing of applications within the operating system, improves the accuracy of page location, and is beneficial for improving the automation level and testing efficiency of the operating system.

[0066] Example 3

[0067] Figure 3 This is a flowchart of a page positioning method provided in Embodiment 3 of the present invention. Based on the above embodiments, this embodiment further refines the step of comparing the attributes of the first control attribute set with the second control attribute sets of the second control sets of each page in the page control graph to obtain attribute comparison results. The steps include: obtaining the unique control attribute set of a unique control set; the unique control set includes: single unique controls or combined unique controls of each page in the page control graph; comparing the attributes of the unique control attribute set with the first control attribute set to determine whether the page to be positioned contains a unique control; if the page to be positioned does not contain a unique control, then comparing the attributes of the first control attribute set with the second control attribute sets of the second control sets of each page in the page control graph to obtain attribute comparison results.

[0068] like Figure 3 As shown, the method includes:

[0069] S310. Obtain the first set of control attributes corresponding to the first set of controls within the page to be located.

[0070] S320. Obtain the unique control attribute set of the unique control set. The unique control set includes: unique controls of each page in the page control graph, wherein the unique controls include single unique controls or combined unique controls.

[0071] The unique control set is a collection of unique controls across all pages in the page control graph. A unique control can be understood as a control with unique attributes within each application's page. The unique control attribute set is a collection of the control attributes of each unique control in the unique control set. In this embodiment, a unique control can be a single unique control or a combination of unique controls. A single unique control refers to a single control that is unique; a combination of unique controls refers to a combination of at least two unique controls, where each control individually may not be unique.

[0072] Specifically, the unique control can be configured and optimized by the developer, and can also be adjusted and maintained according to changes in the pages and controls of different applications.

[0073] S330. Compare the unique control attribute set with the first control attribute set to determine whether the page to be located contains a unique control.

[0074] Specifically, for each unique control in the unique control attribute set, the unique control attribute corresponding to each unique control is compared with the first control attribute set corresponding to the first control set in the page to be located, to determine whether any unique control attribute exists in the first control attribute set; if it exists, it is determined that the page to be located contains a unique control; if it does not exist, it is determined that the page to be located does not contain a unique control.

[0075] S340. If it is determined that the page to be located contains a unique control, then the page containing the unique control is determined as the page containing the page to be located.

[0076] Specifically, if it is determined that the page to be located contains a unique control, the page containing the unique control is identified as the page containing the unique control; that is, the page to be located is the page containing the unique control. Furthermore, the page name of the page to be located is obtained as the location result, facilitating its use during application testing.

[0077] For example, the control typically present on the page to be located, "Music Player - My Favorites Page", is xpath=" / / android.widget.TextView[@text='My Favorites']".

[0078] However, this control may appear on other pages within the same application, which could lead to misidentification if only this one control is used for page location. Therefore, in addition to this control, a related control should also be associated, such as a back button: / / android.widget.ImageButton[@description='Back'].

[0079] In this way, the combination of these two controls forms a unique combined control, and the only page containing this unique combined control is the "Music Player - My Favorites" page. This method allows you to quickly locate the page you want to target as the "Music Player - My Favorites" page.

[0080] In this embodiment, a fallback logic is designed using the uniqueness of the control attributes of unique controls. Priority attribute comparison is performed on the first set of attributes corresponding to the first set of controls within the page to be located. If the page to be located contains unique controls, the page can be located quickly without needing to perform subsequent attribute comparisons with the second set of attributes of the second set of controls for each page in the page control graph. Furthermore, the number of unique controls within each page is limited, the data volume is small, and the fallback logic is simple. Therefore, the resource consumption for page location is reduced, and the efficiency of page location is improved.

[0081] S350. If the page to be located does not contain a unique control, then obtain the core attribute corresponding to each first control in the first control attribute set.

[0082] Specifically, if the page to be located does not contain a unique control, it means that the page to be located does not have a unique control or the current fallback logic does not include the unique control attribute of the page to be located, and the page to be located cannot be quickly located based on the unique control attribute. In this case, it is also necessary to execute S360 to S380 to locate the page to be located. S360 to S380 refer to S220 to S250 of the above embodiment, and will not be described again in this embodiment.

[0083] S360. For each first control, compare the core attribute with the second control attribute set of each page in the page control graph to obtain the number of core attributes corresponding to each first control contained in the second control attribute set, and use the number of core attributes corresponding to each first control contained in the second control attribute set as the attribute comparison result.

[0084] In an optional embodiment, after comparing the attributes of the first set of control attributes with the second set of control attributes of each page in the page control graph to obtain the attribute comparison result, the method further includes: if the page control graph contains at least two pages with the same attribute comparison result, then adding the unique control attribute of the unique control in each page with the same attribute comparison result to the unique control attribute set.

[0085] Specifically, if the page control graph contains at least two pages with identical attribute comparison results, it's impossible to directly determine which page the page to be located belongs to, which is undesirable in automated testing. Furthermore, the fallback logic mentioned earlier failed to directly locate pages in this situation, indicating that the fallback logic configuration needs optimization.

[0086] In this embodiment, by obtaining the unique control attributes of unique controls within each page with the same attribute comparison results, and adding the unique control attributes of the unique controls to the unique control attribute set, the unique control attribute set in the fallback logic can be maintained and optimized. The fallback logic reduces the occurrence of situations where the page to be located cannot be directly determined due to the same attribute comparison results of at least two pages, which is beneficial to improving the automation level of application testing.

[0087] S370. The number of core attributes corresponding to the first control contained in the second control attribute set is determined as the weight of the page where the second control set is located.

[0088] S380. The page with the highest weight is identified as the page containing the page to be located.

[0089] The technical solution of this invention involves obtaining a first set of control attributes corresponding to a first set of controls within a page to be located; obtaining a unique set of control attributes for a unique set of controls, including unique controls for each page in the page control graph, wherein the unique controls include single unique controls or combinations of unique controls; comparing the unique control attribute set with the first set of control attributes to determine whether the page to be located contains a unique control; if the page to be located contains a unique control, then the page containing the unique control is determined as the page to be located; if the page to be located does not contain a unique control, then comparing the first set of control attributes with the second set of control attributes for each page in the page control graph to obtain attribute comparison results; and locating the page to be located based on the attribute comparison results. This approach utilizes a fallback logic based on unique control attributes to prioritize locating the page to be located. If locating the page cannot be achieved, then comparing the attributes with the second set of control attributes for each page in the page control graph to determine the location of the page to be located. This provides an important foundation for automated testing of applications within the operating system, reduces resource consumption for page location, improves page location efficiency, and is beneficial for improving the automation level and testing efficiency of the operating system.

[0090] Example 4

[0091] Figure 4 This is a schematic diagram of a page positioning device provided in Embodiment 4 of the present invention. Figure 4 As shown, the device includes: a first attribute acquisition module 410, an attribute comparison module 420, and a first page positioning module 430; wherein,

[0092] The first attribute acquisition module 410 is used to acquire the first control attribute set corresponding to the first control set in the page to be located.

[0093] The attribute comparison module 420 is used to compare the first set of control attributes with the second set of control attributes of each page in the page control graph to obtain the attribute comparison result; the page control graph is a graph drawn from the pages in the operating system, the controls contained in the pages, and the control attributes.

[0094] The first page positioning module 430 is used to locate the page where the page to be located is located based on the comparison results of each attribute.

[0095] The technical solution of this invention involves obtaining a first set of control attributes corresponding to a first set of controls within a page to be located; comparing the first set of control attributes with the second set of control attributes of each page in the page control graph to obtain an attribute comparison result; and locating the page where the page to be located is located based on the attribute comparison result. This provides an important foundation for automated testing of applications within an operating system and is beneficial for improving the automation level and testing efficiency of the operating system.

[0096] Optional, attribute comparison module 420, including:

[0097] A unique attribute acquisition unit is used to acquire a unique control attribute set of a unique control set; the unique control set includes unique controls of each page in the page control graph, and the unique controls include single unique controls or combined unique controls.

[0098] The first attribute comparison unit is used to compare the attribute set of the unique control with the first attribute set of the control to determine whether the page to be located contains a unique control.

[0099] The second attribute comparison unit is used to compare the attributes of the first control attribute set with the second control attribute set of each page in the page control map if the page to be located does not contain a unique control, and to obtain the attribute comparison result.

[0100] Optional, also includes:

[0101] The second page positioning module is used to, after comparing the unique control attribute information with the first control attribute set of the first control set to determine whether the page to be positioned contains a unique control, determine the page where the unique control is located as the page where the page to be positioned is located if it is determined that the page to be positioned contains a unique control.

[0102] Optional, also includes:

[0103] The attribute adding module is used to, after comparing the first set of control attributes with the second set of control attributes of each page in the page control graph to obtain the attribute comparison results, add the unique control attributes of the unique controls in each page with the same attribute comparison results to the unique control attribute set.

[0104] Optional, the attribute comparison module 420 includes:

[0105] The core attribute acquisition unit is used to acquire the core attribute corresponding to each first control in the first control set in the first control attribute set.

[0106] The third attribute comparison unit is used to compare the core attribute of each first control with the second control attribute set of each page in the page control graph, respectively, to obtain the number of core attributes corresponding to each first control contained in the second control attribute set, and to use the number of core attributes corresponding to each first control contained in the second control attribute set as the attribute comparison result.

[0107] Optionally, the first page positioning module 430 is specifically used for:

[0108] The number of core attributes corresponding to the first control contained in the second control attribute set is determined as the weight of the page where the second control set is located;

[0109] The page with the highest weight is determined as the page containing the page to be located.

[0110] Optionally, the core attributes include: the general attributes of the first control;

[0111] Alternatively, the aggregated attribute of the key attribute of the first control and the key attribute of the parent control of the first control; wherein the key attribute is selected from the general attribute.

[0112] Optionally, the general attribute includes at least one of the following:

[0113] Control identifier, control class name, control display text, control description, whether the control is selected, whether the control is clickable, whether the control is enabled, whether the control is selectable, and whether the control has focus.

[0114] Optional, also includes:

[0115] The page graph drawing module is used to draw the page graph of each application in the operating system before the step of obtaining the first set of attributes of the first set of controls in the page to be located. The page graph includes the pages in the application and the jump relationship between the pages.

[0116] The second attribute acquisition module is used to acquire the second set of controls within each page under the page map, and to acquire the second set of control attributes of the second set of controls;

[0117] The page control graph construction module is used to construct a page control graph based on the page graph of the operating system, the second set of controls, and the corresponding set of second control attributes.

[0118] The page positioning device provided in the embodiments of the present invention can execute the page positioning method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the method execution.

[0119] Example 5

[0120] Figure 5 A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0121] like Figure 5 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0122] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0123] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as page positioning methods.

[0124] In some embodiments, the page positioning method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or mounted on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the page positioning method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the page positioning method by any other suitable means (e.g., by means of firmware).

[0125] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0126] In some embodiments, the page positioning method may be implemented as a computer program, which is implicitly included in a computer program product. When executed by a processor, the computer program implements the page positioning method of the present invention. The computer program product can be understood as a software product that primarily implements its solution through a computer program. The computer program used to implement the method of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer program causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer program may be executed entirely on a machine, partially on a machine, partially on a remote machine as a standalone software package, or entirely on a remote machine or server.

[0127] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0128] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0129] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0130] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0131] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0132] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A page positioning method, characterized in that, include: Get the set of properties of the first control corresponding to the first set of controls in the page to be located; The first set of control attributes is compared with the second set of control attributes of each page in the page control graph to obtain the attribute comparison results; the page control graph is a graph drawn based on the application pages in the operating system, the controls contained in the pages, and the control attributes. The page containing the page to be located is determined based on the comparison results of each attribute. The step of comparing the attribute set of the first control with the attribute set of the second control set of each page in the page control graph to obtain the attribute comparison result includes: Obtain the unique control attribute set of the unique control set; the unique control set includes the unique controls of each page in the page control graph, and the unique controls include single unique controls or combined unique controls; The unique control attribute set is compared with the first control attribute set to determine whether the page to be located contains a unique control; If the page to be located does not contain a unique control, then the attribute set of the first control is compared with the attribute set of the second control set of each page in the page control map to obtain the attribute comparison result.

2. The page positioning method according to claim 1, characterized in that, After comparing the unique control attribute set with the first control attribute set of the first control set to determine whether the page to be located contains a unique control, the method further includes: If it is determined that the page to be located contains a unique control, then the page containing the unique control is determined as the page containing the page to be located.

3. The page positioning method according to any one of claims 1-2, characterized in that, After comparing the attributes of the first set of control attributes with the second set of control attributes of each page in the page control graph to obtain the attribute comparison results, the method further includes: If the page control graph contains at least two pages with the same attribute comparison results, then the unique control attributes of the unique controls in each page with the same attribute comparison results are added to the unique control attribute set.

4. The page positioning method according to any one of claims 1-2, characterized in that, The step of comparing the first set of control attributes with the second set of control attributes of each page in the page control graph to obtain the attribute comparison result includes: Obtain the core attribute corresponding to each first control in the first control set in the first control attribute set; For each first control, the core attribute is compared with the second control attribute set of each page in the page control graph to obtain the number of core attributes corresponding to each first control contained in the second control attribute set, and the number of core attributes corresponding to each first control contained in the second control attribute set is used as the attribute comparison result.

5. The page positioning method according to claim 4, characterized in that, The step of locating the page containing the page to be located based on the comparison results of each attribute includes: The number of core attributes corresponding to the first control contained in the second control attribute set is determined as the weight of the page where the second control set is located; The page with the highest weight is determined as the page containing the page to be located.

6. The page positioning method according to claim 4, characterized in that, The core attributes include: the general attributes of the first control; Alternatively, the aggregated property of the key properties of the first control and the key properties of the parent control of the first control; wherein the key properties are selected from general properties.

7. The page positioning method according to claim 6, characterized in that, The general attribute includes at least one of the following: Control identifier, control class name, control display text, control description, whether the control is selected, whether the control is clickable, whether the control is enabled, whether the control is selectable, and whether the control has focus.

8. The page positioning method according to any one of claims 1-2, characterized in that, Before the step of obtaining the first set of properties of the first set of controls within the page to be located, the following steps are also included: Draw a page graph of each application in the operating system, the page graph including the pages within the application and the navigation relationships between the pages; Obtain the second set of controls within each page of the page graph, and obtain the second set of control attributes for the second set of controls; The page control graph is constructed based on the page graph of the operating system, the second set of controls, and the corresponding set of second control attributes.

9. A page positioning device, characterized in that, include: The first attribute acquisition module is used to obtain the first control attribute set corresponding to the first control set in the page to be located. The attribute comparison module is used to compare the attributes of the first set of control attributes with the second set of control attributes of each page in the page control graph to obtain the attribute comparison results; the page control graph is a graph drawn based on the application pages in the operating system, the controls contained in the pages, and the control attributes. The first page positioning module is used to locate the page where the page to be located is located based on the comparison results of each attribute. The attribute comparison module includes: A unique attribute acquisition unit is used to acquire a unique control attribute set of a unique control set; the unique control set includes unique controls of each page in the page control graph, and the unique controls include single unique controls or combined unique controls. The first attribute comparison unit is used to compare the attribute set of the unique control with the first attribute set of the control to determine whether the page to be located contains a unique control. The second attribute comparison unit is used to compare the attributes of the first control attribute set with the second control attribute set of each page in the page control map if the page to be located does not contain a unique control, and to obtain the attribute comparison result.

10. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the page positioning method according to any one of claims 1-8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the page positioning method according to any one of claims 1-8.

12. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the page positioning method according to any one of claims 1-8.