Page comparison detection method and computer program product

By using methods such as region identification and component information layer extraction on the page, the problem of accurately identifying page data changes after software system version iterations in existing technologies has been solved, achieving more efficient and reliable page detection.

CN121301975BActive Publication Date: 2026-04-07HUNDSUN TECH
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-12
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately identify subtle changes in page data after software system version iterations, leading to insufficient testing efficiency and reliability.

Method used

By performing region identification and component information layering extraction on the page, region information, component structure information, component attribute information, and component content information are extracted and compared in multiple dimensions to identify changes in the structure and content of the front-end page.

Benefits of technology

It improves the reliability and efficiency of page detection and comparison, and can identify key content changes on the front-end page while avoiding the influence of irrelevant factors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121301975B_ABST
    Figure CN121301975B_ABST
Patent Text Reader

Abstract

The application provides a page comparison detection method and a computer program product, wherein the method comprises: performing feature extraction on a first page of a first version to obtain first page information of the first page, performing feature extraction on a second page of a second version to obtain second page information of the second page, and obtaining a detection result of the second page according to a comparison result of the first page information and the second page information. The application performs region identification on the system software page, and performs information hierarchical extraction and information coding on the components of each region, so as to reduce the influence of page structure fine tuning, front-end framework upgrading or UI style reconstruction on page detection comparison, and improve the efficiency and reliability of page comparison detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and more specifically, to a page comparison and detection method and a computer program product. Background Technology

[0002] During the iteration of software system versions, the functions in the system may be modified due to various reasons, which may lead to hidden defects. For example, after the query page is modified, there may be problems such as abnormal query data, biased aggregation results, or abnormal pagination logic.

[0003] Current technology typically involves testing personnel manually comparing data or using tools to compare raw interface data after a software system version iteration to pinpoint problems following the iteration.

[0004] However, existing solutions struggle to accurately identify subtle changes in page data, resulting in blind spots in detection. Consequently, both testing efficiency and reliability need improvement. Summary of the Invention

[0005] The purpose of this application is to address the shortcomings of the prior art by providing a page comparison detection method and computer program product, so as to solve the problem that the prior art is difficult to accurately identify relatively hidden page data changes, has detection blind spots, and therefore the testing efficiency and reliability need to be improved.

[0006] To achieve the above objectives, the technical solution adopted in this application is as follows:

[0007] Firstly, this application provides a page comparison and detection method, the method comprising:

[0008] Feature extraction is performed on the first page of the first version to obtain the first page information of the first page. The first page information includes: first region information, first component structure information, first component attribute information and first component content information. The first region information includes the region category and region summary of at least one region in the first page. The first component structure information includes the component structure features and component summary of each component in each region. The first component attribute information includes the attributes and attribute summary of each component.

[0009] Feature extraction is performed on the second page of the second version to obtain the second page information, which includes: second region information, second component structure information, second component attribute information, and second component content information. The second version is later than the first version.

[0010] The information on the first page and the information on the second page are compared, and the detection result of the second page is obtained based on the comparison result.

[0011] Secondly, embodiments of this application also provide an electronic device, including: a processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of a page comparison detection method as described in any one of the first aspects.

[0012] Thirdly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of a page comparison detection method as described in any one of the first aspects.

[0013] Fourthly, embodiments of this application also provide a computer program product, which, when executed by a processor, implements the steps of the page comparison and detection method as described in the first aspect.

[0014] The beneficial effects of this application are: by extracting regional information, component structure information, component attribute information, and component content information before and after version iteration, multi-dimensional comparison of the structure, attributes, and content of the regions and components of the front-end interface can be achieved. Even if the front-end page undergoes structural adjustments, framework upgrades, or UI style reconstruction, changes in the regional structure or components of key content can still be identified, improving the reliability of page detection and comparison. At the same time, this application extracts features from key information in the page, which can also avoid the influence of irrelevant factors on page detection and comparison, improving the efficiency of page detection and comparison.

[0015] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0016] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This illustration shows an application scenario provided by an embodiment of this application.

[0018] Figure 2A flowchart of a page comparison detection method provided in an embodiment of this application is shown;

[0019] Figure 3 This illustration shows a query page provided in an embodiment of this application;

[0020] Figure 4 This document illustrates a flowchart of a feature extraction process for a page, as provided in an embodiment of this application.

[0021] Figure 5 This document illustrates a flowchart of a method for determining region information according to an embodiment of this application.

[0022] Figure 6 This document illustrates a flowchart of yet another method for determining region information provided in an embodiment of this application.

[0023] Figure 7 This document illustrates a flowchart of a component list generation method provided in an embodiment of this application.

[0024] Figure 8 This document illustrates a flowchart of an embodiment of information extraction from a component provided in this application.

[0025] Figure 9 This document illustrates a flowchart of a method for determining component structure information according to an embodiment of this application.

[0026] Figure 10 This document illustrates a flowchart of a page detection and comparison procedure provided in an embodiment of this application.

[0027] Figure 11 This document illustrates a flowchart of a page region structure comparison method provided in an embodiment of this application.

[0028] Figure 12 This document illustrates an overall flowchart of a page detection and comparison procedure provided in an embodiment of this application.

[0029] Figure 13 This illustration shows a schematic diagram of the structure of a page detection and comparison device provided in an embodiment of this application;

[0030] Figure 14 A schematic diagram of the structure of an electronic device 140 provided in an embodiment of this application is shown. Detailed Implementation

[0031] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0032] It should be noted that the term "comprising" will be used in the embodiments of this application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.

[0033] Current technology typically involves testing personnel manually comparing data or using tools to compare raw interface data after a software system version iteration to pinpoint problems following the iteration.

[0034] In existing technologies, when manually comparing pages before and after iteration, some subtle page changes are difficult to identify accurately. For example, performance optimization and framework reconstruction are more likely to cause unexpected deviations in data display format, aggregation results, and pagination logic. These page changes are usually difficult to identify accurately when manually comparing them.

[0035] Existing technologies can also use tools to capture page changes before and after software iterations. These tools typically obtain raw data and return values ​​from backend interfaces. However, this approach still struggles to capture differences in the page rendering layer and anomalies in pagination control metadata, particularly regarding data display format discrepancies, aggregation result deviations, and pagination logic anomalies. Furthermore, in some query pages, the frontend interface can perform calculations on the data, such as calculating and displaying totals. This type of data, as intermediate data, is not returned to the backend interface, making it difficult to verify the frontend statistical logic using existing methods.

[0036] In summary, after system software iterations, existing solutions struggle to accurately identify subtle page data changes when performing version comparison checks on pages, resulting in blind spots in detection. Consequently, both testing efficiency and reliability need improvement.

[0037] Based on this, this application proposes a page comparison detection method, which performs region identification on the system software page and extracts and encodes information of components in each region in a hierarchical manner, thereby reducing the impact of page structure fine-tuning, front-end framework upgrade or UI (User Interface) style reconstruction on page detection and comparison, and improving the efficiency and reliability of page comparison detection.

[0038] The method described in this application can be applied to scenarios where, after a system software version iteration, it is necessary to compare and detect the pages of the system software after the iteration with those before the iteration. The method can be executed by an electronic device. Figure 1 Electronic devices can use the method of this application to extract and compare features of corresponding pages of system software before and after version iteration, thereby determining which pages, page components and component content have changed before and after version iteration, and output the detection results to the test user in the form of a detection report.

[0039] Next, combine Figure 2 The page comparison and detection method of this application is described, such as... Figure 2 As shown, the method includes:

[0040] S201. Extract features from the first page of the first version to obtain the first page information.

[0041] The first page information includes: first region information, first component structure information, first component attribute information, and first component content information. The first region information includes the region category and region summary of at least one region in the first page. The first component structure information includes the component structure features and component summary of each component in each region. The first component attribute information includes the attributes and attribute summary of each component.

[0042] The first version can be an older version prior to a system / software iteration, and the first page can be any page in the first version of the system / software. Each page can include at least one area, and each area includes at least one component. Areas on a page can be multiple areas on the page that meet preset conditions, or areas composed of all components used to implement the functionality of a page.

[0043] Figure 3 This is an example image for the first page. (See reference.) Figure 3 The first page is the query page, which includes a query criteria area, a results table area, a pagination control area, and a statistics panel area. Each area contains at least one component.

[0044] It's important to note that a page contains a wide variety of components, and changes to some components may not affect page functionality or data. To further improve the efficiency of page comparison and detection and avoid redundant component comparisons, key component types that need to be compared in different areas can be predefined. That is, if a component change would affect page data or functionality, it can be designated as a key component, and its first component structure information, first component attribute information, and first component content information can be determined. For example, in the results table area of ​​the page, the form component requires special attention; therefore, the form component can be designated as a key component, and its first component structure information, first component attribute information, and first component content information can be determined.

[0045] Optionally, the first region information includes the region category and region summary of each region on the first page. The region summary can be a summary calculated from the key information or non-dynamic information of the region, such as performing a hash calculation on the path information of the region and using the hash value as the region summary. The first region information can characterize the region structure of the first page, that is, how many regions are included in the first page, and the region category of each region.

[0046] Each component can have its own corresponding first component structure information. This first component structure information includes the component's structural features and a component summary. The component's structural features characterize its position and tag structure on the page. The component summary can be a summary calculated from the component's key information or non-dynamic information, such as hashing the component's path information or a combination of its core features (e.g., component name, element type, static ID). The first component structure information characterizes the component structure of each component within the area, i.e., how many components are included in the area and the position and hierarchical relationship of each component within the area.

[0047] Each component can have its own corresponding first component attribute information, which includes the component's attributes and attribute summaries. Component attributes include attribute fields and their corresponding values. For example, component attributes may include: component ID, component name, component data type, component element type, etc. In one possible implementation, component attributes and attribute values ​​can be recorded as key-value pairs, and an attribute summary can be obtained by calculating the key-value pairs of key attributes or static attributes.

[0048] Optionally, the first component content information includes the content displayed after the component is rendered on the page. In one possible implementation, information can be extracted from the component's content, and the extracted component content can be standardized to obtain the first component content information.

[0049] S202. Extract features from the second page of the second version to obtain the second page information.

[0050] The second page information includes: second area information, second component structure information, second component attribute information, and second component content information. The second version is later than the first version.

[0051] The second page can be the page in the second version that corresponds to the first page in the first version in the software, and it has the same location and the same function in the software system.

[0052] After software / system version iteration, step S201 can be performed on the first version of the software / system, and step S202 can be performed on the second version of the software / system to determine the first page information and the second page information for each page. Each piece of first page information and second page information includes a page identifier. Corresponding pages in the first and second versions have the same page identifier; that is, the first page information and second page information of the first and second pages have the same page identifier, facilitating subsequent comparison.

[0053] For example, suppose Figure 3 The query page shown is the query page for the first version; therefore, the second page could be the query page for the second version. Figure 3 The query page shown is at the same level as the query page in the software.

[0054] The second area information includes the area category and area summary of at least one area in the second page; the second component structure information includes the component structure features and component summary of each component in each area; and the second component attribute information includes the attributes and attribute summary of each component.

[0055] The determination methods for the second region information, the second component structure information, the second component attribute information, and the second component content information are the same as those for the first region information, the first component structure information, the first component attribute information, and the first component content information, and will not be repeated here.

[0056] S203. Compare the information on the first page and the information on the second page, and obtain the detection result of the second page based on the comparison result.

[0057] Optionally, the comparison processing of the first page information and the second page information includes comparing the first area information of the first page and the second area information of the second page to determine whether the area structure in the page has changed; comparing the first component structure information and the second component structure information to determine whether the number of components and the component structure in each area of ​​the page have changed; comparing the first component attribute information and the second component attribute information to determine whether the attribute values ​​and attribute fields of the components have changed; and comparing the first component content information and the second component content information to determine whether the content of the components has changed.

[0058] Optionally, the comparison processing results include the changed areas, changed components, changed attributes of components, and changed content of components on the second page relative to the first page. The detection results of the second page can indicate at least one of the following: areas, components, component attributes, and component content that have changed on the second page relative to the first page.

[0059] In one possible implementation, the information of the first region and the information of the second region can be compared first to determine whether the region structure has changed, referring to... Figure 3 If the query criteria area and the result table area remain unchanged, but the pagination control area and the statistics panel area change, then the component structure information, component attribute information, and component content information of the unchanged pagination control area and the statistics panel area can be further compared to confirm whether the components in the area have changed. At this time, the output detection results will include the changed areas and the changed components in the unchanged areas.

[0060] In another possible implementation, if changes are found in some areas after comparing the information of the first region and the information of the second region, subsequent comparisons can be omitted, and the detection results can be directly output, indicating that the regional structure of the page has changed.

[0061] In this embodiment, feature extraction is performed on the first page of the first version to obtain the first page information. The first page information includes: first region information, first component structure information, first component attribute information, and first component content information. The first region information includes the region category and region summary of at least one region in the first page. The first component structure information includes the component structure features and component summary of each component in each region. The first component attribute information includes the attributes and attribute summary of each component. Feature extraction is performed on the second page of the second version to obtain the second page information. The second page information includes: second region information, second component structure information, second component attribute information, and second component content information. The second version is later than the first version. The first page information and the second page information are compared, and the detection result of the second page is obtained based on the comparison result.

[0062] By extracting regional information, component structure information, component attribute information, and component content information before and after version iteration, multi-dimensional comparison of the structure, attributes, and content of the front-end interface's regions and components can be achieved. Even if the front-end page undergoes structural adjustments, framework upgrades, or UI style reconstruction, changes in the regional structure or components of key content can still be identified, improving the reliability of page detection and comparison. At the same time, this application extracts features from key information on the page, which can also avoid the influence of irrelevant factors on page detection and comparison, improving the efficiency of page detection and comparison.

[0063] The following is a further explanation of the feature extraction of the first page of the first version to obtain the first page information. It should be understood that the specific implementation of step S201 can be referred to the implementation process of step S201, and will not be repeated here. Figure 4 As shown, the above step S201 includes:

[0064] S401. Obtain the DOM structure corresponding to the first page.

[0065] The pages of a software system can be presented through the DOM (Document Object Model) structure. The DOM structure is the DOM tree corresponding to the page. The DOM structure includes the hierarchical relationship, type and association information of all elements in the page. Each page can be stored in the format of a DOM tree. When extracting features from the first page, the DOM tree corresponding to the first page can be obtained, and the first page information of the first page can be extracted from the DOM tree.

[0066] S402. Perform region detection on the DOM structure to obtain at least one region included in the first page and the region category of each region, and generate a region summary for each region based on the region category of each region.

[0067] A page consists of multiple regions with independent functions or semantics. By analyzing the hierarchical relationship of the DOM tree, semantic tags, or preset features, the regions included in the page can be identified from the DOM tree.

[0068] The area category can be a functional category or a semantic category. For example, the query page can be divided into query condition area, result table area, pagination control area and statistics panel area according to functional semantics. The product display interface can be divided into navigation area, advertising area, product list area, etc. The area category can be predefined based on business needs, and the specific type is not restricted here.

[0069] A region summary can be a concise description generated based on a region and its region category. It's used to determine, from a macro perspective, whether a region has been added, removed, or its type has changed during comparison. For example, a region summary can be generated based on the region category and its content description, such as "Navigation area - includes five menu items, Content area - includes three article cards." Alternatively, a hash calculation can be performed on the region category and its static attributes, and the hash value can be used as the region summary.

[0070] S403. Extract components from each region according to the preset mapping configuration table and DOM structure to obtain a component list for each region. The component list includes component information of multiple components in the region.

[0071] The mapping configuration table stores the predefined correspondence between region categories and component types, specifying which key component types each region type should include. Users can expand the mapping configuration table to add UI components from different frameworks or user-defined components.

[0072] Based on the preset mapping configuration table, the component types that need to be compared and detected for each region type can be determined, and the corresponding components can be extracted from the DOM structure according to these component types. For example, if the mapping configuration table records "Results Table Region - Form Component", then... Figure 3 When the page shown is inspected, it can be extracted. Figure 3 The form components in the results table area are used to obtain a list of components.

[0073] Optionally, the component list includes component information for multiple components in the area. The component information can be the DOM node corresponding to the component in the DOM tree, including the component's position, nesting relationship, attributes, and content.

[0074] S404. Based on the component list, obtain the first component structure information, first component attribute information, and first component content information for each component.

[0075] In one possible implementation, the component list can be traversed, and for each traversed component, the first component structure information can be extracted from the component information, the component position and the nesting relationship of the components, the first component attribute information can be extracted from the component attributes, and the first component content information can be extracted from the component content. The first component structure information, first component attribute information and first component content information of each component can be saved.

[0076] In another possible implementation, the first component structure information, first component attribute information, and first component content information of each component can be saved directly while generating the component list. While extracting components from each region according to a preset mapping configuration table, the first component structure information, first component attribute information, and first component content information of each component can be extracted from the component information, and the component, its first component structure information, first component attribute information, and first component content information can be included as an item in the component list.

[0077] In this embodiment, components are extracted from each region by using a preset mapping configuration table and DOM structure. This allows for the pre-filtering of unnecessary components in the page region, focusing only on changes in key components, thereby improving the efficiency of page comparison and detection.

[0078] The following is a further explanation of the above-mentioned region detection of the DOM structure, which yields at least one region included in the first page and the region categories of each region, such as... Figure 5 As shown, step S402 above includes:

[0079] S501. Perform semantic keyword matching on the DOM structure according to the preset semantic lexicon to obtain multiple semantic tags corresponding to the first page.

[0080] Among them, semantic tags are used to characterize the regions contained in the first page and the region categories of those regions.

[0081] The semantic lexicon includes multiple predefined semantic tags based on the business needs of the software system. For example, in spreadsheet management software, the predefined semantic tags in the lexicon include: query, search, pagination, statistics, etc.; in product management software, the predefined semantic tags include: search, product, recommendation, etc. Each semantic tag corresponds to a region category; for example, "query" corresponds to the query conditions region, and "statistics" corresponds to the statistics panel region.

[0082] In one possible implementation, DOM nodes in the DOM structure can be parsed to obtain information such as the text and attributes of page elements contained in the page. The text and attributes of the page elements can then be matched with a semantic dictionary. If the page element has the same semantic meaning as the semantic tag in the semantic dictionary, the semantic tag can be used as the semantic tag corresponding to the first page, and the DOM node and semantic tag corresponding to the page element can be recorded.

[0083] S502. Extract structural features from the DOM structure to obtain the page structure features of the first page.

[0084] Page structure features are used to characterize the regions contained in the first page and the region categories of those regions. These features include: stable path information for the regions and their categories. The stable path information describes the relative path information of the regions within the page and their static attributes.

[0085] It is worth noting that determining the regions contained in the first page and their regional categories solely based on semantic tags may lead to misjudgments. For example, a region may contain the text "query" but is not actually a query condition region. Therefore, this application further improves the reliability of regional category determination by combining structural feature verification with the determination of regional categories based on semantic keywords.

[0086] S503. Based on semantic tags and page structure features, determine at least one region contained in the first page and the region category of each region.

[0087] Both semantic tags and page structure features can characterize the region category. For each identified region and region category, dual verification can be performed based on semantic tags and page structure features.

[0088] As one possible implementation, at least one candidate region can be determined based on semantic tags, and the candidate regions indicated by page structure features can be compared with each candidate region. If the region category of the candidate region is the same as that of the candidate region, then the candidate region is determined to be a region contained in the page, and the region category of the region is recorded.

[0089] As another possible implementation, different weights can be set for semantic tags and page structure features, and the region categories indicated by semantic tags and page structure features can be weighted and calculated. For example, if both semantic tags and page structure features indicate multiple region categories, the region category corresponding to the region can be determined from the multiple region categories according to the weighted calculation result.

[0090] In this embodiment of the application, the accuracy of region positioning and the credibility of region and region category can be improved by using a dual verification mechanism of semantic tags and structural features.

[0091] The following is a further explanation of the above-mentioned extraction of structural features from the DOM structure to obtain the page structure features of the first page, such as... Figure 6 As shown, the above step S502 includes:

[0092] S601. Extract stable path information of each region in the first page from the DOM structure;

[0093] Optionally, the stable path information may be information composed of the relative positional relationship between DOM nodes in each area of ​​the first page and DOM nodes in other areas, or the preset DOM nodes, as well as the static attributes of the area, used to uniquely identify the area in the first page.

[0094] The preset DOM node can be a component or a DOM node corresponding to a region whose relative position to the region remains unchanged within the page. This application records the relative path information of the region rather than its absolute path information, thus achieving accurate identification of regions within the page even when the page structure is finely adjusted. For example, if an outer container is added to a region of the page, the location of the region can still be accurately identified by its relative position to other regions on the page.

[0095] Taking the path information representation of the “A” region as an example, in the existing method, the original path information of “A” can be represented as “ / html / body / div[1] / main / div[3] / div / form / div[2] / A [1]”. Starting from the root node of the DOM tree, the DOM node corresponding to node A is searched to obtain the original path information, which is used to indicate the position of region A relative to the root node in the DOM tree. Its stable path information can be represented as: form[@id='searchForm'] / div[@class='filter-group'] / A[@name='username'], where form[@id='searchForm'] is the relative path information, representing the parent node of A, div[@class='filter-group'] is the predefined static feature of region A, and “A[@name='username']” represents the static attribute of region A.

[0096] By extracting the relative positional relationship, static features, and static attributes of region A as the relative path information of region A, even if region A is nested with an outer container, the expression of the relative path information will not be affected, thereby achieving accurate identification of region A.

[0097] S602. Extract at least one candidate region from the DOM structure based on CSS selectors, and obtain the region category of each candidate region.

[0098] Among them, the CSS (Cascading Style Sheets) selector can combine stable features such as element type and fixed attributes to identify the DOM structure, obtain at least one candidate area, and identify the area category of the candidate area.

[0099] S603. Determine the stable path information corresponding to each candidate region, and combine each candidate region, the region category of each candidate region, and the stable path information corresponding to each candidate region into a page structure feature.

[0100] Optionally, the static attributes of the region extracted in step S601 can be compared with those of the candidate region extracted in step S602. If the static attributes are the same, the relative path information of the region can be used as the stable path information of the candidate region, and the candidate region, the region category of the candidate region, and the stable path information of the candidate region can be combined into a page structure feature.

[0101] The following is a further explanation of the above process of extracting components from each region based on the preset mapping configuration table and DOM structure to obtain the component list for each region. Figure 7 As shown, the above step S403 includes:

[0102] S701. Use the region category as a query parameter to find the target component type corresponding to the region category in the mapping configuration table.

[0103] The component types corresponding to the region categories recorded in the mapping configuration table can be the components that need to be focused on in the region of that region type, or components whose changes may cause changes to the page content. For example, the form components of the result table region can be used as the key component types of the result table region type.

[0104] Taking the query page as an example, the component types corresponding to the queryable form area in the mapping configuration table include "user input controls input, select, textarea, and submit button [type="submit"] or input [type="submit"]", the component types corresponding to the result form area include "column header cell th or [role="columnheader"] and data row tr or [role="row"]", the component types corresponding to the pagination control area include "page number buttons (such as a, button), previous / next page buttons, and text nodes displaying the total number of pages / total number of records", and the component types corresponding to the statistics panel area include "DOM nodes displaying statistical values ​​(such as span, div, and nodes with specific identifiers)".

[0105] S702. Based on the target component type, extract at least one target component corresponding to the target component type from the region.

[0106] S703. Determine the DOM nodes of each target component from the DOM structure and add the DOM nodes of each target component to the component list.

[0107] It is worth noting that the mapping configuration table can record the region category and the component type of the smallest functional unit corresponding to the region category. That is, if a component does not contain other components nested within it, it can be regarded as a smallest functional unit. Each component of the smallest functional unit has a corresponding DOM node in the DOM tree.

[0108] Based on the target component type, at least one target component of the smallest functional unit can be extracted from the region, and the DOM node corresponding to the target component can be determined from the DOM tree structure and added to the component list.

[0109] In one possible implementation, if a component contains other nested components, the DOM node corresponding to the component, as well as the DOM nodes of the other nested components, can also be added to the component list.

[0110] In this embodiment of the application, the component types that need to be focused on for each region type are defined by the mapping configuration table. Unnecessary components can be filtered out, so that key components can be compared and detected in a focused manner, reducing interference items in page detection and comparison, and thus improving the efficiency of comparison.

[0111] The following is a further explanation of how the first component structure information, first component attribute information, and first component content information of each component are obtained from the component list above. Figure 8 As shown, the above S404 step includes:

[0112] S801. Retrieve the component information of the current component from the component list.

[0113] Iterate through the component information of each component in the component list. The current component can be the component being iterated over.

[0114] S802. Extract structural information from the component information of the current component to obtain the component structural features in the first component structural information of the current component, and obtain the component summary in the first component structural information based on the component structural features.

[0115] Optionally, relative path information and static attributes can be extracted from the component information of the current component to obtain the component structure characteristics of the current component.

[0116] In one possible implementation, the component's structural features can be hashed, and the resulting hash value can be used as the component digest of the current component.

[0117] S803. Based on a preset attribute extraction strategy, extract attribute information from the component information to obtain the component's attributes, and obtain the attribute summary in the first component attribute information based on the component's attributes.

[0118] The attribute extraction strategy allows for the pre-definition of attribute fields for key properties within a component. These key properties can be attributes that affect the component's page rendering results or static properties. Based on the attribute extraction strategy, key properties can be extracted from the component information, and hash calculations can be performed on these key properties to obtain an attribute digest.

[0119] In one possible implementation, the attribute fields of the key attributes of the component can be determined based on the attribute extraction strategy. Based on the attribute fields of each key attribute, the attribute content corresponding to each attribute field is extracted from the component information. The attribute field is used as the key of the key-value pair, the attribute content is used as the value of the key-value pair, and the combined key-value pair is used as a first component attribute information.

[0120] S804. Extract the content of the component to obtain the component content, and perform tolerance processing on the component content to obtain the first component content information.

[0121] The component's content includes the text displayed after the component is rendered on the page. After obtaining the component's content, tolerance processing can be performed on the component's content to obtain the first component content information.

[0122] The component content undergoes tolerance processing, including normalization of numerical values ​​and character filtering of text. If the component content is a numerical field, it is normalized, and the result is used as the first component content information. If the component content is a text field, it is filtered, and case-sensitive matching is performed, with the result used as the first component content information.

[0123] For example, if the component content includes "100.0, Account", the value "100.0" can be normalized to get "100", and "Account" can be case-consistently processed to get "account", thereby avoiding the impact of different numerical standards or different capitalization on the comparison results during subsequent comparisons.

[0124] It should be noted that the normalization of numerical fields can be set based on actual business needs. For example, when it is necessary to check the difference in the accuracy of data on the page, the numerical fields can be left unnormalized in order to discover the change in the accuracy of the values ​​before and after the page iteration.

[0125] The following describes the steps for extracting structural information from the component information of the current component to obtain the component structural features in the first component structural information of the current component. Figure 9 As shown, the above S802 step includes:

[0126] S901. Determine the original path information of the current component from the component information.

[0127] Among them, the original path information can be the position of the DOM node of the current component in the DOM structure. For example, the original path information of the component input can be represented as " / html / body / div[1] / main / div[3] / div / form / div[2] / input[1]", which is generated by searching for the position of the component input from the root node of the DOM tree.

[0128] In one possible implementation, when generating the component list in step S403 above, the DOM structure can be searched and the original path information of the current component can be generated, and the original path information can be recorded as an item in the component information.

[0129] In another possible implementation, the component information records the component ID, and in this step, the original path information of the current component is obtained by searching in the DOM tree based on the component ID.

[0130] S902. Extract the relative path information of the current component from the original path information.

[0131] The relative path information is used to describe the relative position of a component on the page. The relative path information includes the static attribute information of the component's related components. For example, it can record the static attribute information of the current component's parent node or child node to represent the relative positional relationship between the current component and other components on the page.

[0132] It should be noted that if the page structure changes, such as by nesting containers outside components, the original path information will change. Therefore, when performing page detection and comparison based on the original path information, inconsistencies will occur, even though the page data and display are actually normal. This application extracts the relative path information of components. Even if a component is nested outside a container, the relative position of the component and its parent or child nodes remains unchanged, and the relative path information will not change. Therefore, it avoids the influence of nested containers on the comparison results of components.

[0133] Optionally, the parent node of the current component can be determined from the original path information. For example, in the original path information, “ / html / body / div[1] / main / div[3] / div / form / div[2] / input[1]”, the parent node of the current component input can be determined to be “form”. Then the static attribute of the parent node “form” can be recorded as relative path information to obtain form[@id='searchForm'].

[0134] S903. Extract the static property information of the current component from the component information.

[0135] Static property information can be information in the component information that does not change, such as the component name, user-defined static properties of the component, etc.

[0136] For example, suppose a user-defined component has an associated static container div, and the type of the static container div is defined, then the type of the static container div can be used as a static property of the user-defined component.

[0137] S904. Combine the relative path information and static attribute information to obtain the component structure characteristics.

[0138] In one possible implementation, relative path information and static attribute information can be combined according to a preset combination format to obtain component structural features.

[0139] In this embodiment, by extracting the relative path information of the current component from the original path and representing the component using its relative position, the impact of nested external containers or changes in component structure on page comparison detection can be avoided. By combining relative path information and static attribute information as component structural features, relatively stable information can be used to represent the component structure, thereby minimizing the impact of structural path changes on page comparison detection.

[0140] The following is a further explanation of the comparison process between the information on the first page and the information on the second page, and the detection result of the second page obtained based on the comparison process. Figure 10 As shown, step S203 above includes:

[0141] S1001. Based on the first area information and the second area information, determine whether the area structure of the first page is the same as the area structure of the second page.

[0142] The first area information can represent the area and area category contained in the first page, and the second area information can represent the area and area category contained in the second page.

[0143] If every region contained in the second page has a corresponding region in the first page, and the regions have the same region category, then the region structures of the first page and the second page can be considered to be the same.

[0144] S1002. If the area structure of the first page is different from that of the second page, the first detection result is output. The first detection result is used to indicate that the area structure of the second page has changed relative to the first page.

[0145] If the area contained in the second page does not have a corresponding area in the first page, or if there is a corresponding area but the area category is different, then the area structure of the first page is considered to be different from that of the second page.

[0146] It should be noted that if the page structure changes significantly, there is no need to further compare the components on the page. Based on this, the similarity of the page's regional structure can be calculated, and the decision on whether to conduct further comparison can be made based on the similarity. If the similarity is too low, the comparison detection can be terminated directly.

[0147] Optionally, the first detection result can also indicate the areas and content that have changed relative to the first page in the second page. For example, area A in the second page does not have a corresponding area, or the attribute of area A in the second page changes from the query condition area to the result table area.

[0148] S1003. If the area structure of the first page is the same as that of the second page, the detection result of the second page is determined based on the structure information of the first component, the structure information of the second component, the attribute information of the first component, the attribute information of the second component, the content information of the first component, and the content information of the second component.

[0149] If the regional structures are the same or the regional structures are greater than or equal to the preset similarity threshold, the component structures, component attributes, and component content in the regions can be further compared to obtain the detection results for the second page.

[0150] The detection results of the second page are used to indicate changes in the component structure, component attributes, or component content of the second page relative to the first page.

[0151] The process described above, which determines whether the regional structure of the first page is the same as the regional structure of the second page based on the information of the first and second regions, is as follows: Figure 11 As shown, it includes:

[0152] S1101. Determine whether the region summary in the first region information and the region summary in the second region information are the same.

[0153] The region summary is calculated based on the information of the first region and the information of the second region. If the region summaries are the same, it means that the information of the first region and the information of the second region are the same. Conversely, if the region summaries are different, it means that the region structure may have changed.

[0154] S1102. If the region summary in the first region information and the region summary in the second region information are different, then determine the region structure similarity between the first region information and the second region information based on the region category in the first region information and the region category in the second region information.

[0155] S1103. If the regional structure similarity is greater than or equal to the preset similarity threshold, then the regional structure of the second page and the first page are determined to be the same.

[0156] If the region structures are different, the similarity between the strings of the first and second region information can be calculated. For example, string similarity can be calculated based on the edit distance algorithm, and the string similarity can be used as the region structure similarity. The similarity threshold can be 0.95.

[0157] S1104. If the similarity of the regional structures is less than the similarity threshold, then the regional structures of the second page and the first page are determined to be different.

[0158] If the regional structure similarity is greater than or equal to the preset similarity threshold, it indicates that the regional structure has not changed significantly, and further comparison of its components is possible. If the regional structure similarity is less than the preset similarity threshold, it indicates that the regional structure has changed. In this case, risk markers can be added to the changed content in the first and second regional information, and it can be configured whether to perform further detection.

[0159] In this embodiment, the change of the regional structure is first determined by the regional summary. If the regional summaries are the same, there is no need to further calculate the first regional information and the second regional information, which can reduce the complexity of page detection and comparison and improve the efficiency of page detection and comparison.

[0160] Next, combine Figure 12 The process of determining the detection result of the second page based on the structural information of the first component, the structural information of the second component, the attribute information of the first component, the attribute information of the second component, the content information of the first component, and the content information of the second component will be explained, such as... Figure 12 As shown, the process includes:

[0161] Based on the first component structure information and the second component structure information, determine whether the component structures of the second page and the first page are the same. If the component structures are different, output a second detection result. The second detection result is used to indicate that the component structure of the second page has changed compared to the first page.

[0162] If the component structures are the same, the first component attribute information and the second component attribute information are used to determine whether the component attributes of the second page and the first page are the same. If the component attributes are different, a third detection result is output. The third detection result is used to indicate that the component attributes of the second page have changed compared to the first page, and to indicate the attribute fields that have changed.

[0163] If the component attributes are the same, then based on the content information of the first component and the content information of the second component, it is determined whether the component content of the second page and the first page are the same. If the component content is different, then the fourth detection result is output. The fourth detection result is used to indicate that the component content of the second page has changed compared to the first page, and to indicate the component content that has changed.

[0164] If the component content is the same, the fifth detection result will be output, which indicates that the second page is the same as the first page.

[0165] When comparing the structural information of the first and second components, the component summaries can be compared first. If the component summaries in the first and second component structural information are the same, the components on the second page can be considered to have the same structure as those on the first page. If the component summaries in the first and second component structural information are different, the component structural features in the first and second component structural information can be further compared to determine the structural changes of the components on the second page compared to those on the first page. If there are differences in the component structures, risk markers can be added to the components with differing structures.

[0166] If the components on the second page have the same structure as those on the first page, then the component attributes on the second page are further compared with those on the first page.

[0167] When comparing the attribute information of the first component and the second component, the attribute summaries can be compared first. If the attribute summaries in the first and second component attribute information are the same, then the components on the second page and the components on the first page can be considered to have the same attributes. If the attribute summaries in the first and second component attribute information are different, then the attributes in the first and second component attribute information can be compared further to determine the attribute changes of the components on the second page compared to the components on the first page. If there are differences in component attributes, risk markers can be added to the component attributes with differences.

[0168] If the components on the second page have the same attributes as the components on the first page, then the content of the components on the second page is further compared with the content of the components on the first page.

[0169] When comparing the content information of the first component and the content information of the second component, the similarity of the component content after tolerance processing can be calculated. If the similarity is greater than the preset threshold, the component content of the first page and the component content of the second page are considered to be the same.

[0170] In another possible implementation, the component content can be compared string by string. If the component content in the first component content information is the same as the component content in the second component content information, then the component content of the first page and the component content of the second page can be considered the same. If the component content differs, a risk marker can be added to the component content with the difference.

[0171] In this embodiment, by performing layer-by-layer detection of region information, component structure information, component attribute information, and component content information, the efficiency of page comparison detection can be improved. If there are differences in the page rendering layer, or if the intermediate data calculated by the front-end page changes, the changed content can also be detected, thereby covering detection blind spots and improving the reliability of page detection comparison.

[0172] Based on the same inventive concept, this application also provides a page comparison detection device corresponding to the page comparison detection method. Since the principle of the device in this application is similar to that of the page comparison detection method described above, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.

[0173] Figure 13 A schematic diagram of the structure of a page comparison and detection device provided in an embodiment of this application is shown.

[0174] The first extraction module 1301 is used to extract features from the first page of the first version to obtain the first page information of the first page. The first page information includes: first region information, first component structure information, first component attribute information and first component content information. The first region information includes the region category and region summary of at least one region in the first page. The first component structure information includes the component structure features and component summary of each component in each region. The first component attribute information includes the attributes and attribute summary of each component.

[0175] The second extraction module 1302 is used to extract features from the second page of the second version to obtain the second page information of the second page. The second page information includes: second region information, second component structure information, second component attribute information and second component content information. The second version is later than the first version.

[0176] The comparison module 1303 is used to compare the information on the first page and the information on the second page, and to obtain the detection result of the second page based on the comparison result.

[0177] Optionally, the first extraction module 1301 is specifically used for:

[0178] Get the DOM structure corresponding to the first page;

[0179] Perform region detection on the DOM structure to obtain at least one region included in the first page and the region category of each region, and generate a region summary for each region based on the region category of each region;

[0180] Based on the preset mapping configuration table and DOM structure, components are extracted from each region to obtain a component list for each region. The component list includes component information for multiple components in the region.

[0181] Based on the component list, obtain the first component structure information, first component attribute information, and first component content information for each component.

[0182] Optionally, the first extraction module 1301 is specifically used for:

[0183] Based on a pre-defined semantic lexicon, semantic keywords are matched to the DOM structure to obtain multiple semantic tags corresponding to the first page. These semantic tags are used to represent the regions contained in the first page and the region categories of those regions.

[0184] Structural features are extracted from the DOM structure to obtain the page structure features of the first page. The page structure features are used to characterize the regions contained in the first page and the region categories of the regions.

[0185] Based on semantic tags and page structure features, determine at least one region contained in the first page and the region category of each region.

[0186] Optionally, the first extraction module 1301 is specifically used for:

[0187] Extract stable path information for each region in the first page from the DOM structure;

[0188] At least one candidate region is extracted from the DOM structure based on CSS selectors, and the region category of each candidate region is obtained.

[0189] Determine the stable path information corresponding to each candidate region, and combine each candidate region, the region category of each candidate region, and the stable path information corresponding to each candidate region into a page structure feature.

[0190] Optionally, the first extraction module 1301 is specifically used for:

[0191] Use the region category as a query parameter to find the target component type corresponding to the region category in the mapping configuration table;

[0192] Based on the target component type, extract at least one target component corresponding to the target component type from the region;

[0193] Identify the DOM nodes of each target component from the DOM structure and add the DOM nodes of each target component to the component list.

[0194] Optionally, the first extraction module 1301 is specifically used for:

[0195] Retrieve component information for the current component from the component list;

[0196] Structural information is extracted from the component information of the current component to obtain the component structural features in the first component structural information of the current component, and a component summary in the first component structural information is obtained based on the component structural features.

[0197] Based on a preset attribute extraction strategy, attribute information is extracted from component information to obtain the attributes of the component, and an attribute summary in the attribute information of the first component is obtained based on the attributes of the component.

[0198] Extract the content from the component to obtain the component content, and perform tolerance processing on the component content to obtain the first component content information.

[0199] Optionally, the first extraction module 1301 is specifically used for:

[0200] Determine the original path information of the current component from the component information;

[0201] Extract the relative path information of the current component from the original path information;

[0202] Extract the static property information of the current component from the component information;

[0203] By combining relative path information and static attribute information, the component structure characteristics are obtained.

[0204] Optionally, the comparison module 1303 is specifically used for:

[0205] Based on the information of the first region and the information of the second region, determine whether the regional structure of the first page is the same as that of the second page;

[0206] If the area structure of the first page is different from that of the second page, the first detection result is output. The first detection result is used to indicate that the area structure of the second page has changed relative to the first page.

[0207] If the area structure of the first page is the same as that of the second page, the detection result of the second page is determined based on the structure information of the first component, the structure information of the second component, the attribute information of the first component, the attribute information of the second component, the content information of the first component, and the content information of the second component.

[0208] Optionally, the comparison module 1303 is specifically used for:

[0209] Determine whether the region summary in the first region information and the region summary in the second region information are the same;

[0210] If the region summary in the first region information is different from the region summary in the second region information, then the region structure similarity between the first region information and the second region information is determined based on the region category in the first region information and the region category in the second region information.

[0211] If the regional structure similarity is greater than or equal to the preset similarity threshold, then the regional structure of the second page and the first page are determined to be the same.

[0212] If the similarity of the regional structures is less than the similarity threshold, then the regional structures of the second page and the first page are determined to be different.

[0213] Optionally, the comparison module 1303 is specifically used for:

[0214] Based on the first component structure information and the second component structure information, determine whether the component structures of the second page and the first page are the same. If the component structures are different, output the second detection result. The second detection result is used to indicate that the component structure of the second page has changed compared to the first page.

[0215] If the component structures are the same, then based on the first component attribute information and the second component attribute information, determine whether the component attributes of the second page and the first page are the same. If the component attributes are different, then output the third detection result. The third detection result is used to indicate that the component attributes of the second page have changed compared to the first page, and to indicate the attribute fields that have changed.

[0216] If the component attributes are the same, then based on the content information of the first component and the content information of the second component, it is determined whether the component content of the second page and the first page are the same. If the component content is different, then the fourth detection result is output. The fourth detection result is used to indicate that the component content of the second page has changed compared to the first page, and to indicate the component content that has changed.

[0217] If the component content is the same, the fifth detection result will be output, which indicates that the second page is the same as the first page.

[0218] This application's embodiments extract regional information, component structure information, component attribute information, and component content information before and after version iterations. This enables multi-dimensional comparison of the structure, attributes, and content of the regions and components of the front-end interface. Even if the front-end page undergoes structural adjustments, framework upgrades, or UI style reconstruction, changes in the regional structure or components of key content can still be identified, improving the reliability of page detection and comparison. Furthermore, this application extracts features from key information on the page, avoiding the influence of irrelevant factors on page detection and comparison, thus improving the efficiency of page detection and comparison.

[0219] Figure 14The diagram illustrates the structure of an electronic device 140 according to an embodiment of this application, including a processor 1401, a storage medium 1402, and a bus 1403. The storage medium 1402 stores machine-readable instructions executable by the processor 1401. When the electronic device runs a page comparison detection method as described in the embodiment, the processor 1401 communicates with the storage medium 1402 via the bus 1403. The processor 1401 executes the machine-readable instructions, and the preamble of the method item of the processor 1401 performs the steps in the page comparison detection method described above.

[0220] This application also provides a computer-readable storage medium storing a computer program that is executed by a processor, wherein the processor performs the steps in the page comparison detection method described above.

[0221] In this embodiment, the computer program, when run by the processor, can also execute other machine-readable instructions to perform other methods as described in the embodiments. For details on the specific execution steps and principles, please refer to the description of the embodiments, which will not be repeated here.

[0222] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.

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

[0224] In addition, the functional units in the embodiments provided in this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0225] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0226] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0227] Finally, it should be noted that the above-described embodiments are merely specific implementations of this application, used to illustrate the technical solutions of this application, and not to limit them. The protection scope of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this application; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application. All should be covered within the protection scope of this application. Therefore, the protection scope of this application should be determined by the protection scope of the claims.

Claims

1. A page comparison and detection method, characterized in that, include: Feature extraction is performed on the first page of the first version to obtain the first page information, including: obtaining the DOM structure corresponding to the first page; performing semantic keyword matching on the DOM structure according to a preset semantic lexicon to obtain multiple semantic tags corresponding to the first page, wherein the semantic tags are used to characterize the regions contained in the first page and the region categories of the regions, wherein the region categories are the functional categories or semantic categories of the regions. Stable path information of each region in the first page is extracted from the DOM structure. The stable path information is used to describe the relative path information of the region in the first page and the static attributes of the region. At least one candidate region is extracted from the DOM structure based on CSS selectors, and the region category of each candidate region is obtained. The stable path information corresponding to each candidate region is determined, and each candidate region, the region category of each candidate region, and the stable path information corresponding to each candidate region are combined into a page structure feature. The page structure feature is used to characterize the regions contained in the first page and the region category of the regions. Based on the semantic tags and the page structure features, at least one region and the region category of each region are determined in the first page, and a region summary of each region is generated based on the region category of each region. Components are extracted from each region according to a preset mapping configuration table and the DOM structure to obtain a component list for each region. The component list includes component information of multiple components in the region. Based on the component list, the first component structure information, first component attribute information, and first component content information of each component are obtained. The first page information includes: first region information, first component structure information, first component attribute information, and first component content information. The first region information includes the region category and region summary of at least one region in the first page. The first component structure information includes the component structure features and component summary of each component in each region. The first component attribute information includes the attributes and attribute summary of each component. Feature extraction is performed on the second page of the second version to obtain the second page information, which includes: second region information, second component structure information, second component attribute information, and second component content information. The second version is later than the first version. The information on the first page and the information on the second page are compared, and the detection result of the second page is obtained based on the comparison result.

2. The method according to claim 1, characterized in that, The step of extracting components from each region based on a preset mapping configuration table and the DOM structure to obtain a component list for each region includes: Use the region category of the region as a query parameter to find the target component type corresponding to the region category in the mapping configuration table; Based on the target component type, extract at least one target component corresponding to the target component type from the region; The DOM nodes of each target component are determined from the DOM structure, and the DOM nodes of each target component are added to the component list.

3. The method according to claim 1, characterized in that, The step of obtaining the first component structure information, first component attribute information, and first component content information for each component based on the component list includes: Retrieve the component information of the current component from the component list; Structural information is extracted from the component information of the current component to obtain the component structural features in the first component structural information of the current component, and a component summary in the first component structural information is obtained based on the component structural features. Based on a preset attribute extraction strategy, attribute information is extracted from the component information to obtain the attributes of the component, and an attribute summary in the first component attribute information is obtained based on the attributes of the component. Content is extracted from the component to obtain component content, and tolerance processing is performed on the component content to obtain the first component content information.

4. The method according to claim 3, characterized in that, The step of extracting structural information from the component information of the current component to obtain the component structural features in the first component structural information of the current component includes: The original path information of the current component is determined from the component information; Extract the relative path information of the current component from the original path information; Extract the static attribute information of the current component from the component information; The relative path information and the static attribute information are combined to obtain the component structure features.

5. The method according to claim 1, characterized in that, The step of comparing the first page information and the second page information, and obtaining the detection result of the second page based on the comparison result, includes: Based on the first area information and the second area information, determine whether the area structure of the first page is the same as the area structure of the second page; If the regional structure of the first page is different from that of the second page, a first detection result is output. The first detection result is used to indicate that the regional structure of the second page has changed relative to the first page. If the regional structure of the first page is the same as that of the second page, then the detection result of the second page is determined based on the first component structure information, the second component structure information, the first component attribute information, the second component attribute information, the first component content information, and the second component content information.

6. The method according to claim 5, characterized in that, The step of determining whether the regional structure of the first page is the same as the regional structure of the second page based on the first regional information and the second regional information includes: Determine whether the region summary in the first region information and the region summary in the second region information are the same; If the region summary in the first region information and the region summary in the second region information are different, then the region structure similarity between the first region information and the second region information is determined based on the region category in the first region information and the region category in the second region information. If the similarity of the regional structures is greater than or equal to a preset similarity threshold, then the regional structures of the second page and the first page are determined to be the same. If the similarity of the regional structures is less than the similarity threshold, then it is determined that the regional structures of the second page and the first page are different.

7. The method according to claim 5, characterized in that, The step of determining the detection result of the second page based on the first component structure information, the second component structure information, the first component attribute information, the second component attribute information, the first component content information, and the second component content information includes: Based on the first component structure information and the second component structure information, determine whether the component structures of the second page and the first page are the same. If the component structures are not the same, output a second detection result. The second detection result is used to indicate that the component structure of the second page has changed compared to the first page. If the component structures are the same, then based on the first component attribute information and the second component attribute information, it is determined whether the component attributes of the second page and the first page are the same. If the component attributes are not the same, then a third detection result is output. The third detection result is used to indicate that the component attributes of the second page have changed compared to the first page, and to indicate the changed attribute fields. If the component attributes are the same, then based on the first component content information and the second component content information, it is determined whether the component content of the second page and the first page are the same. If the component content is different, then a fourth detection result is output. The fourth detection result is used to indicate that the component content of the second page has changed compared to the first page, and to indicate the changed component content. If the components have the same content, a fifth detection result is output, which indicates that the second page is the same as the first page.

8. An electronic device, characterized in that, include: The device includes a processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the page comparison detection method as described in any one of claims 1 to 7.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the page comparison detection method as described in any one of claims 1 to 7.

10. A computer program product, characterized in that, When the computer program product is executed by a processor, it implements the page comparison detection method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Page update detection method, device, equipment, and storage medium

    CN112445693A

  • Information comparison method and electronic equipment

    CN113360044A

  • Data processing method and device

    CN119690828A