Page anomaly detection method and device, equipment, program product and storage medium

By detecting elements and display abnormalities on the front-end page, generating abnormal prompt information and displaying it to the operation and maintenance personnel, the business interruption problem caused by passive monitoring in the existing technology is solved, and the real-time stability and user experience of the front-end page are improved.

CN119807001APending Publication Date: 2025-04-11INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411862206.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

The existing technology used for front-end page abnormality detection methods in the field of financial technology are mainly passive monitoring, and abnormalities such as page clicks cannot be detected in a timely manner, resulting in business interruption and decline in user experience.

Method used

By obtaining the business type and page information of the front-end page (including basic information, element path information and page screenshots), element abnormality detection and display abnormality detection, generate abnormality prompt information and display it to the operation and maintenance personnel.

Benefits of technology

Real-time abnormality detection of front-end pages is realized, potential problems are discovered and dealt with in a timely manner, the stability and user experience of the business system are improved, and the risk of business interruption is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119807001A_ABST
    Figure CN119807001A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a page anomaly detection method and device, equipment, a program product and a storage medium, and relates to the field of financial science and technology, and the method comprises the steps: obtaining the business type of a front-end page at the current moment, and obtaining the page information of the front-end page when the business type is a preset to-be-inspected type; performing element anomaly detection on the front-end page based on the basic information and the element path information, and obtaining an element detection result; performing display anomaly detection on the front-end page based on the page screenshot and each predetermined standard page screenshot, and obtaining a display detection result; and when the element detection result or the display detection result is abnormal, generating abnormal prompt information based on the element detection result or the display detection result, and displaying the abnormal prompt information to operation and maintenance personnel. According to the method, potential problems existing in the page can be comprehensively found in time, and the robustness and stability of a service system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of financial technology, and in particular to a page anomaly detection method, apparatus, device, program product, and storage medium. Background Art

[0002] The front-end page is the primary interface for users to interact with business systems. Any page failure can disrupt business processes. By performing anomaly detection on the front-end page, problems can be discovered and fixed in a timely manner, ensuring business continuity and stability.

[0003] In the FinTech sector, business systems often handle a variety of high-risk, time-sensitive tasks. For example, in cross-border clearing scenarios, due to the high risk involved, many tasks involve accounts and have high timeliness requirements, requiring manual user processing within a specified timeframe. Therefore, the stability of the business system's front-end pages must be constantly maintained. Current front-end page anomaly detection methods are mostly passive monitoring methods. For example, when a page displays a blank screen, load errors, or other anomalies, the business system identifies the anomaly by capturing the corresponding distinct error codes. This approach can only passively detect page anomalies when they are obvious and significantly impact user experience. Furthermore, this passive monitoring approach only captures known error types, making page anomaly detection incomplete. In time-sensitive scenarios like cross-border clearing, anomalies such as unresponsive page clicks cannot be detected promptly, resulting in inoperable cross-border clearing operations. Developers are unable to detect and respond to anomalies promptly, preventing timely closure of the business, causing losses for the cross-border clearing business, and reducing the efficiency and accuracy of front-end page anomaly detection. Summary of the Invention

[0004] The embodiments of the present invention provide a page anomaly detection method, apparatus, equipment, program product and storage medium, which can comprehensively and timely discover potential problems in the page, improve the robustness and stability of the business system, and promptly notify the operation and maintenance personnel to handle the anomaly when an anomaly is found in the page, thereby reducing the risk of business interruption and improving user experience.

[0005] In a first aspect, an embodiment of the present invention provides a page anomaly detection method, comprising:

[0006] Obtain the business type of the front-end page at the current moment. When the business type is a pre-set type to be inspected, obtain the page information of the front-end page, wherein the page information includes basic information, element path information, and page screenshots;

[0007] Performing element anomaly detection on the front-end page based on the basic information and the element path information, and obtaining an element detection result;

[0008] Performing display anomaly detection on the front-end page based on the page screenshot and predetermined standard page screenshots, and obtaining a display detection result;

[0009] When the element detection result or the display detection result shows that an abnormality exists, abnormality prompt information is generated based on the element detection result or the display detection result, and the abnormality prompt information is displayed to the operation and maintenance personnel.

[0010] In a second aspect, an embodiment of the present invention provides a page anomaly detection device, the device comprising:

[0011] An information receiving module, configured to receive packet information sent by each terminal, wherein the packet information includes a terminal identifier, a packet identifier, and a packet amount;

[0012] an information generating module, configured to generate a packet receiving plan according to each packet information, and present the packet receiving plan to the first user so that the first user executes the packet receiving plan;

[0013] An information management module is used to obtain the packet status of each packet at the current moment based on the packet receiving plan, and perform page anomaly detection on each packet according to the packet status; wherein the packet status includes a waiting to be received status, a waiting to be stored status, a stored status, an accounted status or an abnormal status.

[0014] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the program, a page anomaly detection method as described in any one of the embodiments of the present invention is implemented.

[0015] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the page anomaly detection method as described in any one of the embodiments of the present invention.

[0016] In a fifth aspect, an embodiment of the present invention provides a computer program product, including a computer program, which, when executed by a processor, implements the page anomaly detection method as described in any one of the embodiments of the present invention.

[0017] In an embodiment of the present invention, the business type of the front-end page at the current moment is obtained. When the business type is a pre-set inspection type, the page information of the front-end page is obtained, wherein the page information includes basic information, element path information, and page screenshots; element anomaly detection is performed on the front-end page based on the basic information and element path information, and the element detection result is obtained; display anomaly detection is performed on the front-end page based on the page screenshot and predetermined standard page screenshots, and the display detection result is obtained; when the element detection result or the display detection result shows an anomaly, an anomaly prompt message is generated based on the element detection result or the display detection result, and the anomaly prompt message is displayed to the operation and maintenance personnel. The method of the embodiment of the present invention, by performing element anomaly detection and actual anomaly detection on the front-end page in real time, can comprehensively and timely discover potential problems existing in the page, improve the robustness and stability of the business system, and promptly notify the operation and maintenance personnel to handle the anomaly when an anomaly is found on the page, thereby reducing the risk of business interruption and improving user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.

[0019] Figure 1 A first flow chart of a page anomaly detection method provided by an embodiment of the present invention;

[0020] Figure 2 A second flow chart of a page anomaly detection method provided by an embodiment of the present invention;

[0021] Figure 3 A third flow chart of a page anomaly detection method provided by an embodiment of the present invention;

[0022] Figure 4 A schematic diagram of the structure of a page anomaly detection device provided by an embodiment of the present invention;

[0023] Figure 5 A schematic structural diagram of an electronic device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0024] The present invention will be further described in detail below with reference to the accompanying drawings and examples. It will be understood that the specific embodiments described herein are intended only to illustrate the present invention and are not intended to limit the present invention. It should also be noted that, for ease of description, the accompanying drawings only illustrate portions relevant to the present invention, not all structures.

[0025] Figure 1 This is the first flow chart of a page anomaly detection method provided by an embodiment of the present invention. The method of the embodiment of the present invention can comprehensively and timely discover potential problems existing in the page, improve the robustness and stability of the business system, and promptly notify the operation and maintenance personnel to handle the anomaly when an anomaly is found in the page, thereby reducing the risk of business interruption and improving user experience. The information collected in the method of the embodiment of the present invention is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of relevant data comply with the relevant laws, regulations and standards of the relevant countries and regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse. The method can be executed by a page anomaly detection device provided by an embodiment of the present invention, which can be implemented in software and / or hardware. The following embodiments will be described by taking the device integrated in an electronic device as an example. The electronic device can be a server or computer device that carries a business system. Figure 1 , the method may specifically include the following steps:

[0026] Step 101: Obtain the business type of the front-end page at the current moment. When the business type is a pre-set type to be inspected, obtain the page information of the front-end page.

[0027] The current front-end page is the front-end page currently opened and currently in use by the user. The business type of the front-end page is the type of business that the front-end page is used to handle. For example, if pages A, B, and C are all pages that a user might use when handling a deposit, the business types of pages A, B, and C are determined to be deposit-type. A single front-end page can correspond to multiple business types. The pending inspection types are business types pre-determined by the business system and have high security and timeliness requirements, such as deposit types, transfer types, and cross-border clearing types.

[0028] Page information includes basic information, element path information, and page screenshots. Basic page (front-end page) information includes page identifiers, page content, and page specifications. Page identifiers are used to identify different pages, with each page corresponding to one identifier. Elements are the basic units that make up a page, such as components like text, images, buttons, forms, and links. Element path information is pre-determined by the business system and represents the location of elements on a page. This element's location path uniquely identifies the element within the page. In this solution, element path information includes both element identifiers and element paths. For example, if page A includes an element called "Query Button" with an identifier of cx1, the element path information corresponding to this element is: (Page A) -> (A-cx1). Specifically, when a user conducts business on a front-end page in the business system, the business system can use the page identifier to obtain the business type of the page being used in real time and determine whether the business type is pending inspection. If the business type is pending inspection, the front-end page's page information is directly obtained, facilitating subsequent anomaly detection. If the business type of the page is not the type to be inspected, other routine anomaly detection can be performed on it to reduce the computing pressure of the business system.

[0029] Step 102: Detect element anomalies on the front-end page based on the basic information and element path information, and obtain element detection results.

[0030] Specifically, the elements in the front-end page can help users interact with the business system, especially the key elements used to implement key functions (such as form submission, button clicks, and data display, etc.). Key elements are directly related to the smooth progress of the business process. Before the user clicks or triggers the elements in the page, the business system cannot immediately perceive them even if an abnormality occurs. By performing element abnormality detection on the page, potential problems in the page can be comprehensively and timely discovered to ensure the stability of the business system. Specifically, after obtaining the basic information and element path information of the front-end page, the key elements used to implement key functions in the page can be determined based on the basic information, and abnormality detection can be performed on each key element in the element path information. For example, it is detected whether each key element exists in the front-end page at the current moment, and whether each key element can operate normally.

[0031] In an optional embodiment, each key element of the front-end page is determined based on the page information, and the key element identifier of each key element is determined; for each key element, the element identifier in the element path information that is the same as the current key element identifier is determined as the current target identifier, and the element path corresponding to the current target identifier is determined as the current target path; based on the current target path, the current key element is searched in the front-end page to obtain the existence detection result of the current key element. Among them, the existence detection result is existence or non-existence. Operability detection is performed on all key elements whose existence detection results are existence to obtain the operability detection results of the existence key elements; based on the existence detection results of each key element and the operability detection results of the existence key elements, the element detection results of the front-end page are obtained.

[0032] Step 103: Perform display anomaly detection on the front-end page based on the page screenshot and predetermined standard page screenshots, and obtain a display detection result.

[0033] Among them, the display anomaly detection is used to detect whether the display effect of the front-end page is consistent with the expected effect, and the display detection result is normal or abnormal. Specifically, in the process of users using the front-end page, there may be situations such as chaotic front-end page layout, loading content errors, and image loading failures. After obtaining the basic information of the front-end page, use the automatic screenshot tool to take a screenshot of the front-end page to obtain a page screenshot. Determine the standard page screenshot corresponding to the page screenshot in the standard screenshot database. By comparing the page screenshot with its corresponding standard page screenshot for consistency, it can be determined whether the display effect of the front-end page is normal.

[0034] In an optional embodiment, after determining that the front-end page needs to be detected for display anomalies, the current page path corresponding to the page screenshot is determined based on the front-end page; the target standard screenshot corresponding to the page screenshot is determined based on the current page path and the page paths of each standard page screenshot; the current page path corresponding to the page screenshot is determined based on the front-end page; the target standard screenshot corresponding to the page screenshot is determined based on the current page path and the page paths of each standard page screenshot; screenshot anomaly detection is performed on the page screenshot based on the target standard screenshot to obtain the display detection result of the front-end page.

[0035] Step 104: When the element detection result or the display detection result shows an abnormality, an abnormality prompt message is generated based on the element detection result or the display detection result, and the abnormality prompt message is displayed to the operation and maintenance personnel.

[0036] Among them, the abnormal prompt information is used to remind the operation and maintenance personnel that there is an abnormality in the front-end page, so that the operation and maintenance personnel can deal with the abnormal page in time. Specifically, when there is an abnormality in the element detection result, it means that there is an abnormality in the key elements used to implement key functions in the front-end page. When there is an abnormality in the display detection result, it means that there is an abnormality in the content effect displayed on the front-end page. Whether there is an abnormality in the element or the displayed content effect, it will affect the user's interaction with the business system. Therefore, when any of the detection results in the element detection result or the display detection result is abnormal, the business system will generate abnormal prompt information based on the result. The abnormal prompt information includes the basic information of the front-end page, the element detection result, the display detection result, and the cause and object of the abnormality. Furthermore, the business system can send the abnormal prompt information to the operation and maintenance personnel in a timely manner so that the operation and maintenance personnel can quickly deal with the abnormal page, ensure the stability of the business system, and improve the user experience.

[0037] The technical solution of this embodiment is to obtain the business type of the front-end page at the current moment. When the business type is a pre-set inspection type, the page information of the front-end page is obtained, wherein the page information includes basic information, element path information and page screenshots; based on the basic information and element path information, the front-end page is detected for element anomalies, and the element detection results are obtained; based on the page screenshot and the pre-determined standard page screenshots, the front-end page is detected for display anomalies, and the display detection results are obtained; when the element detection result or the display detection result is abnormal, an abnormal prompt information is generated based on the element detection result or the display detection result, and the abnormal prompt information is displayed to the operation and maintenance personnel. The technical solution of this embodiment can comprehensively and timely discover potential problems in the page by performing element anomaly detection and actual anomaly detection on the front-end page in real time, improve the robustness and stability of the business system, and promptly notify the operation and maintenance personnel to handle the anomaly when an anomaly is found on the page, thereby reducing the risk of business interruption and improving user experience.

[0038] Figure 2 This is a second flow chart of a page anomaly detection method provided by an embodiment of the present invention. This embodiment is a refinement based on the above embodiment. The specific method can be as follows: Figure 2 As shown, the method may include the following steps:

[0039] Step 201: Obtain the business type of the front-end page at the current moment. When the business type is a pre-set type to be inspected, obtain the page information of the front-end page.

[0040] Among them, page information includes basic information, element path information and page screenshots.

[0041] Step 202: determine each key element of the front-end page based on the page information; perform an existence check on each key element according to the element path information to obtain an existence check result of each key element.

[0042] Among them, the existence detection result is existence or non-existence. Key elements are elements used to implement key functions. The key elements in the page are pre-defined by the developer when generating the front-end page. Specifically, the front-end page consists of multiple elements, but not every element will affect the user's business on the front-end page when an exception occurs. For example, an advertising image is lost in the front-end page, but the absence of the advertising image does not affect the normal use of the user. In this case, there is no need to prompt the operation and maintenance personnel. Therefore, in this solution, in order to improve the efficiency of anomaly detection, only the key elements need to be detected for anomalies. After obtaining the page information, all the key elements in the front-end page at the current moment are determined, and whether each key element exists in the front-end page is determined based on the element path information. If the key element is in the front-end page, the existence detection result of the key element is determined to be existence. If the key element is not in the front-end page, the existence detection result of the key element is determined to be non-existence. In this solution, optionally, each key element is detected for existence based on the element path information to obtain the existence detection result of each key element, including the following steps A1-step A3:

[0043] Step A1: Determine the key element identifier of each key element.

[0044] Specifically, the element identifier is defined by the developer during the front-end development process. The element identifier is used to mark different elements, and one element in a page corresponds to one identifier. The key elements in the page are pre-defined elements used to implement key functions. After determining that the front-end page needs to be detected for element anomalies, the key elements in the front-end page at the current moment and the element identifiers of each key element are determined. For example, page A includes 9 elements. When the developer develops the front-end page, he defines that page A includes 3 key elements based on the business functions corresponding to each element. When the user uses page A, the business system can retrieve the front-end code of page A, and determine the 3 key elements of page A and their corresponding element path information based on the front-end code of page A, and determine the 3 key element identifiers of page A based on the element path information.

[0045] Step A2: For each key element, the element identifier in the element path information that is identical to the current key element identifier is determined as the current target identifier, and the element path corresponding to the current target identifier is determined as the current target path.

[0046] Specifically, after obtaining the key element identifiers of each key element, the element path information of the page is analyzed to obtain the element identifiers of all elements on the front-end page. Based on the key element identifiers, the element identifiers identical to the key element identifiers are searched in the element path information and determined as the target element identifiers. After determining the target element identifiers, the element path corresponding to the target element identifiers is determined as the target path, that is, the path of the key element. For example, page A includes two key elements, whose element identifiers are locate1 and locate2 respectively. The element path information of page A includes a total of five element paths: A->(A-locate1), A->(A-locate2), A->(A-locate3), A->(A-locate4), and A->(A-locate5). Based on locate1 and locate2, the two target paths of page A can be determined to be A->(A-locate1) and A->(A-locate2).

[0047] Step A3: Search the current key element in the front-end page based on the current target path to obtain the existence detection result of the current key element.

[0048] Among them, the existence detection result is existence or non-existence. In an optional embodiment, after obtaining the target path of each key element, the business system can use a predetermined search tool to search for the key element in the Document Object Model (DOM) structure of the front-end page along the target path. If an element that matches the target path is found in the DOM structure, it is determined that the key element exists, that is, the existence detection result of the key element is "existence". If no element that matches the target path is found in the DOM structure, it is considered that the key element does not exist, and the existence detection result of the key element is further determined to be "non-existence".

[0049] Through the above steps, the business system can accurately determine whether each key element in the page exists, thereby ensuring the stability of the front-end page and user experience.

[0050] Step 203: Perform an operability test on all key elements whose existence test results indicate that they exist, and obtain operability test results of the key elements.

[0051] Operability testing is used to check whether key elements on the front-end page can respond to user interactions such as clicks, input, and selections. Operability testing is crucial to ensuring that users can use page functions normally. In real-world applications, an element may exist but be inoperable. Therefore, after obtaining the existence test results for key elements, it is necessary to perform operability testing on the existing key elements.

[0052] Specifically, after obtaining all existing key elements, the business system uses automated tools or scripts to simulate user operations on existing key elements, including clicking buttons, filling out forms, or selecting drop-down menu options. After simulating the operation of the key elements, the business system can check the response of the key elements to the simulated operation, including checking the events triggered by the state changes of the key elements (such as enabled or disabled, visible or hidden) and the output generated. Furthermore, based on the response of the key elements, it is determined whether the key elements are operable. If the key elements can respond to the simulated operation as expected, it is determined that the key elements are operable, and it is further determined that the operability test result of the key elements is passed. If the key elements cannot respond to the simulated operation as expected, it is determined that the key elements are inoperable, and it is further determined that the operability test result of the key elements is failed.

[0053] Step 204: Obtain element detection results of the front-end page based on the existence detection results of each key element and the operability detection results of the key elements.

[0054] Specifically, only when an element exists and is operable will it not affect user use. Therefore, when the existence detection result of each key element is "existent" and the operability detection result is "operable", the element detection result of the front-end page is determined to be normal. If the existence detection result of at least one key element in the front-end page is "non-existent" or the operability detection result is "inoperable", the element detection result of the front-end page is determined to be abnormal.

[0055] In an optional embodiment, when performing an existence check on a key element, if the key element exists, a correct mark "T" is added to the element identification mark of the key element; if the key element does not exist, an error mark "F" is added to the element identification mark of the key element. Similarly, when performing an operability check on a key element, if the key element is operable, a correct mark "T" is added to the element identification mark of the key element; if the key element is not operable, an error mark "F" is added to the element identification mark of the key element. For example, page A includes two key elements locate1 and locate2. If both locate1 and locate2 exist and are operable, the element detection result of page A is determined to be: (page A->(A-locate1->T->TT, A-locate2->T->TT). If locate1 exists and is operable, and locate2 exists but is not operable, the element detection result of page A is determined to be: (page A->(A-locate1->T->TT, A-locate2->T->TF). As long as there is an "F" in the element detection result of page A, the element detection result of page A is determined to be abnormal.

[0056] Step 205: Determine the current page path corresponding to the page screenshot based on the front-end page; and determine the target standard screenshot corresponding to the page screenshot based on the current page path and the page paths of each standard page screenshot.

[0057] Among them, the standard page screenshot is a screenshot of the page under normal circumstances that is pre-acquired by the business system. The page path is used to identify the location of the page on the server, such as the Uniform Resource Locator (URL) of the front-end page. Specifically, the business system pre-stores each page. After determining that the front-end page needs to be detected for display anomalies, a pre-set screenshot tool can be used to automatically obtain a page screenshot of the front-end page. After obtaining the page screenshot, the path that is the same as the current page path is searched in the standard page screenshot repository according to the page path of the front-end page (current page path), and the page screenshot corresponding to the path is determined as the target standard page screenshot.

[0058] Step 206: Perform screenshot anomaly detection on the page screenshot according to the target standard screenshot to obtain a display detection result of the front-end page.

[0059] Specifically, after obtaining the target standard screenshot, the target standard screenshot and the page screenshot can be compared for similarity, thereby performing screenshot anomaly detection on the page screenshot and obtaining a display detection result of the front-end page. In this solution, optionally, performing screenshot anomaly detection on the page screenshot based on the target standard screenshot to obtain a display detection result of the front-end page includes: calculating the image similarity between the target standard screenshot and the page screenshot; if the image similarity is greater than a preset similarity, determining that the display detection result of the front-end page is normal; if the image similarity is less than or equal to the preset similarity, determining that the display detection result of the front-end page is abnormal.

[0060] Among them, the preset similarity is a similarity value that is pre-set and used to determine whether the page screenshot is normal. The front-end pages of different business types may correspond to different preset similarities. Specifically, after obtaining the target standard screenshot, the image similarity between the page screenshot and the target standard screenshot is calculated according to a pre-set similarity algorithm (such as pixel-level comparison, feature point matching or structural similarity index, etc.). The image similarity is compared with the preset similarity. If the image similarity is greater than the preset similarity value, it is considered that the display effect of the front-end page is the same as the standard screenshot. Figure 1 If the image similarity is less than or equal to the preset similarity, the display detection result of the front-end page is considered normal. If the image similarity is less than or equal to the preset similarity, it is considered that there is a display abnormality on the current page. The front-end page may have a disordered page layout, missing style, missing elements, or position offset, and further, the display detection result of the front-end page is determined to be abnormal.

[0061] In this solution, when the display detection result of the front-end page is abnormal, the abnormality level of the display detection result can be determined based on the specific image similarity value. In an optional embodiment, the business system can set different page display abnormality levels based on the importance of different businesses and page characteristics. For example, the importance of the business corresponding to page A is higher, so the preset similarity of page A is 80%. The abnormality levels of page A include 3: Level 1 abnormality: 0% < image similarity < 50%; Level 2 abnormality: 50% <= image similarity < 70%; Level 3 abnormality: 70% <= image similarity <= 80%; The business system calculates that the image similarity between the page screenshot of page A and the target standard screenshot is 75%, then determines that the display detection result of page A is abnormal, and the abnormality level is level 3 abnormality. The business system can determine the alarm method corresponding to the level 3 abnormality based on the display detection result of page A. According to the alarm method corresponding to the level 3 abnormality, the operation and maintenance personnel are prompted to handle it in time.

[0062] Step 207: When the element detection result or the display detection result shows an abnormality, an abnormality prompt message is generated based on the element detection result or the display detection result, and the abnormality prompt message is displayed to the operation and maintenance personnel.

[0063] In the technical solution of this embodiment, the business type of the current front-end page is obtained. If the business type is a pre-set inspection type, page information of the front-end page is obtained, where the page information includes basic information, element path information, and a page screenshot. Based on the page information, key elements of the front-end page are determined; an existence check is performed on each key element based on the element path information to obtain an existence check result for each key element. The existence check result is either present or absent. An operability check is performed on all key elements for which the existence check result is present, obtaining an operability check result for the present key elements. Based on the existence check results for each key element and the operability check results for the present key elements, an element detection result for the front-end page is obtained. Based on the front-end page, the current page path corresponding to the page screenshot is determined; and based on the current page path and the page paths of each standard page screenshot, the target standard screenshot corresponding to the page screenshot is determined. Screenshot anomaly detection is performed on the page screenshot based on the target standard screenshot to obtain a display detection result for the front-end page. If the element detection result or the display detection result indicates an anomaly, an anomaly prompt is generated based on the element detection result or the display detection result and displayed to operation and maintenance personnel. The technical solution of this embodiment monitors the existence and operability of key elements in real time, enabling timely detection and reporting of key element anomalies on a page, preventing business interruptions caused by missing or inoperable elements. By comparing screenshots to check whether the page display is normal, problems such as blank screens and missing styles can be promptly discovered and addressed. When an anomaly is detected, the business system can immediately generate an exception prompt and display it to operations and maintenance personnel, enabling rapid response and resolution, reducing the duration and scope of business interruptions.

[0064] Figure 3 The third flow chart of a page anomaly detection method provided by an embodiment of the present invention. The specific method can be as follows Figure 3 As shown, the method may include the following steps:

[0065] Step 301: Obtain page information of all inspection pages of the to-be-inspected type at preset time intervals.

[0066] Among them, the preset time interval is predetermined by the business system based on domain big data, etc., and the preset time interval is used to indicate when the business system will proactively detect anomalies on the inspection page. The preset time interval can be one hour, one day, or one week. The inspection page is a page whose corresponding business type belongs to the type to be inspected. Page information includes basic information, element path information, and page screenshots. Specifically, when the user is not using the front-end page, an anomaly may have occurred on the front-end page. In order to avoid anomalies when the user uses the front-end page, the business system can obtain page information of all inspection pages of the type to be inspected according to the preset time interval.

[0067] Step 302: For each inspection page, perform element anomaly detection and display anomaly detection on the current inspection page based on the page information of the current inspection page, and obtain the element detection result and display detection result of the current inspection page.

[0068] Specifically, after obtaining each inspection page, each element in the inspection page is subjected to element anomaly detection. In an optional embodiment, according to the element identifier of the inspection page determined in advance, each element is searched in the inspection page. If the element is found, it is marked as existing (T); if it is not found, it is marked as not existing (F). After confirming the existence of the element, the system can perform corresponding operations on the existing element (such as clicking the button for a button element). If the operation is successful and enters the corresponding next page, the element is marked as operable (TT), otherwise it is marked as inoperable (TF). The existence detection results and operability detection results of each key element in the page are recorded. For example, page A includes three elements, whose identifiers are in the format of locate1, locate2 and locate3 respectively. The existence detection results of locate1, locate2 and locate3 are all existing and the operability detection results are all operable. Then, the element detection results of page A can be determined as: page A->(A-locate1->T->TT, A-locate2->T->TT, A-locate3->T->TT).

[0069] Specifically, after obtaining each inspection page, the inspection page is detected for display anomalies. In an optional embodiment, after obtaining each inspection page, an automatic screenshot tool is used to take a screenshot of the inspection page to obtain an inspection page screenshot. The business system can obtain a standard page screenshot in advance when the page is normal and name it according to the screenshot path. For example, the standard page screenshot of page A is page A->image name A1. The standard page screenshot of page B is page B->image name B1. When performing display anomaly detection on page A, a screenshot of the inspection page of page A is obtained and named page A->A11 according to its screenshot path. Further, A11 is matched with A1 and B1 in the standard page screenshot library, and the standard page screenshot corresponding to A1 is determined to be A11 based on the matching result. Further, the similarity between images A1 and A11 is compared to obtain the similarity between images A1 and A11. The display anomaly detection result of the front-end page is determined based on the preset similarity and the similarity between images A1 and A11.

[0070] Step 303: When the element detection result or the display detection result shows an abnormality, an abnormality prompt message is generated based on the element detection result or the display detection result, and the abnormality prompt message is displayed to the operation and maintenance personnel.

[0071] Specifically, when there is an abnormality in the element detection result, it means that there is an abnormality in the key elements used to implement key functions in the front-end page. When there is an abnormality in the display detection result, it means that there is an abnormality in the content effect displayed on the front-end page. Whether there is an abnormality in the element or the displayed content effect, it will affect the user's interaction with the business system. Therefore, when any of the detection results in the element detection result or the display detection result is abnormal, the business system will generate an abnormal prompt information based on the result. The abnormal prompt information includes the basic information of the front-end page, the element detection result, the display detection result, and the cause and object of the abnormality. For example, if the business system determines that there is an abnormality in the operability of the query button of page A, it can generate a prompt information as follows: "The 'Query' button of page A cannot respond, please check." If the business system determines that the display of page A is abnormal (such as a white screen or missing style), it can generate a prompt information as follows: "The screenshot of page A is only 1% similar to the standard screenshot. The page may be a white screen or missing style."

[0072] The technical solution of this embodiment obtains the page information of all inspection pages of the type to be inspected at preset time intervals; for each inspection page, element anomaly detection and display anomaly detection are performed on the current inspection page based on the page information of the current inspection page, and the element detection result and display detection result of the current inspection page are obtained; when the element detection result or the display detection result shows that an anomaly exists, an anomaly prompt message is generated based on the element detection result or the display detection result, and the anomaly prompt message is displayed to the operation and maintenance personnel. The technical solution of this embodiment automatically obtains the page information of all inspection pages of the type to be inspected at preset time intervals, which reduces the need for manual intervention and significantly improves the efficiency of page anomaly detection. Comprehensive element anomaly detection and display anomaly detection are performed on all inspection pages of the type to be inspected, ensuring the comprehensiveness of page anomaly detection, improving the robustness and stability of the business system, and promptly notifying the operation and maintenance personnel to handle the anomaly when an anomaly is found on the page, reducing the risk of business interruption and improving user experience.

[0073] Figure 4 This is a schematic diagram of the structure of a page anomaly detection device provided by an embodiment of the present invention, which is suitable for executing the page anomaly detection method provided by an embodiment of the present invention. Figure 4 As shown, the device may specifically include:

[0074] The data acquisition module 401 is used to obtain the business type of the front-end page at the current moment. When the business type is a pre-set type to be inspected, the page information of the front-end page is obtained, wherein the page information includes basic information, element path information, and page screenshots;

[0075] An element detection module 402 is configured to perform element anomaly detection on the front-end page based on the basic information and the element path information, and obtain an element detection result;

[0076] A display detection module 403 is configured to perform display anomaly detection on the front-end page based on the page screenshot and predetermined standard page screenshots, and obtain a display detection result;

[0077] The information display module 404 is used to generate abnormal prompt information based on the element detection result or the display detection result when the element detection result or the display detection result shows that there is an abnormality, and display the abnormal prompt information to the operation and maintenance personnel.

[0078] Optionally, the element detection module 402 is specifically configured to: determine each key element of the front-end page based on the page information, and perform an existence detection on each key element according to the element path information to obtain an existence detection result of each key element; wherein the existence detection result is existence or non-existence;

[0079] Performing an operability test on all key elements whose existence test results indicate that they exist, to obtain operability test results of the key elements;

[0080] The element detection result of the front-end page is obtained based on the existence detection result of each key element and the operability detection result of the existing key element.

[0081] Optionally, the element detection module 402 is further configured to: determine a key element identifier of each key element;

[0082] For each key element, determine the element identifier in the element path information that is the same as the current key element identifier as the current target identifier, and determine the element path corresponding to the current target identifier as the current target path;

[0083] The current key element is searched in the front-end page based on the current target path to obtain an existence detection result of the current key element.

[0084] Optionally, the display detection module 403 is specifically configured to: determine the current page path corresponding to the page screenshot based on the front-end page;

[0085] Determining a target standard screenshot corresponding to the page screenshot according to the current page path and the page paths of each standard page screenshot;

[0086] The page screenshot is subjected to screenshot anomaly detection according to the target standard screenshot to obtain a display detection result of the front-end page.

[0087] Optionally, the display detection module 403 is further configured to: calculate image similarity between the target standard screenshot and the page screenshot;

[0088] If the image similarity is greater than a preset similarity, determining that the display detection result of the front-end page is normal;

[0089] If the image similarity is less than or equal to the preset similarity, it is determined that the display detection result of the front-end page is abnormal.

[0090] Optionally, the information display module 404 is specifically configured to: obtain page information of all inspection pages of the to-be-inspected type according to a preset time interval;

[0091] For each inspection page, perform element anomaly detection and display anomaly detection on the current inspection page based on the page information of the current inspection page, and obtain the element detection result and display detection result of the current inspection page;

[0092] When the element detection result or the display detection result shows that an abnormality exists, abnormality prompt information is generated based on the element detection result or the display detection result, and the abnormality prompt information is displayed to the operation and maintenance personnel.

[0093] The page anomaly detection device provided in the embodiment of the present invention can execute the page anomaly detection method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method. For the contents not fully described in this embodiment, reference can be made to the description of any method embodiment of the present invention.

[0094] An embodiment of the present invention also provides a computer program product.

[0095] Various embodiments of the systems and techniques described 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), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer program products, which can include one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0096] Figure 5A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention, referring to Figure 5 , Figure 5 The electronic device 12 shown is only an example and should not limit the functions and scope of use of the embodiments of the present application. Figure 5 As shown, electronic device 12 is implemented as a general-purpose computing device. Components of electronic device 12 may include, but are not limited to, one or more processors or processing units 16, system memory 28, and a bus 18 that connects various system components (including system memory 28 and processing unit 16).

[0097] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. Examples of these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.

[0098] The electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 12, including volatile and non-volatile media, removable and non-removable media.

[0099] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be configured to read and write non-removable, non-volatile magnetic media ( Figure 5 Not shown, often called a "hard drive"). Although Figure 5 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the various embodiments of the present application.

[0100] A program / utility 40 having a set (at least one) of program modules 46 may be stored, for example, in memory 28. Such program modules 46 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may include an implementation of a network environment. Program modules 46 generally implement the functions and / or methods of the embodiments described herein.

[0101] The electronic device 12 may also communicate with one or more external devices 14 (e.g., a keyboard, a pointing device, a display 24, etc.), one or more devices that enable a user to interact with the electronic device 12, and / or any device that enables the electronic device 12 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). Such communication may be performed through an input / output (I / O) interface 22. Furthermore, the electronic device 12 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 20. As shown, the network adapter 20 communicates with the other modules of the electronic device 12 via the bus 18. It should be understood that although Figure 5 Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems. The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing a page anomaly detection method provided by an embodiment of the present invention: obtaining the business type of the front-end page at the current moment, and when the business type is a pre-set inspection type, obtaining page information of the front-end page, wherein the page information includes basic information, element path information, and page screenshots; performing element anomaly detection on the front-end page based on the basic information and the element path information, and obtaining an element detection result; performing display anomaly detection on the front-end page based on the page screenshot and pre-determined standard page screenshots, and obtaining a display detection result; when the element detection result or the display detection result indicates an anomaly, generating an anomaly prompt message based on the element detection result or the display detection result, and displaying the anomaly prompt message to the operation and maintenance personnel.

[0102] An embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, a page anomaly detection method as provided in all embodiments of the present invention is implemented: obtaining the business type of the front-end page at the current moment; when the business type is a pre-set type to be inspected, obtaining page information of the front-end page, wherein the page information includes basic information, element path information, and a page screenshot; performing element anomaly detection on the front-end page based on the basic information and the element path information, and obtaining an element detection result; performing display anomaly detection on the front-end page based on the page screenshot and predetermined standard page screenshots, and obtaining a display detection result; when the element detection result or the display detection result indicates an anomaly, generating an anomaly prompt message based on the element detection result or the display detection result, and displaying the anomaly prompt message to operation and maintenance personnel. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electronic device, device, or component that is electrical, magnetic, optical, electromagnetic, infrared, or semiconductor, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fibers, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction-executing electronic device, apparatus, or device.

[0103] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transfer a program for use by or in conjunction with an instruction-executing electronic device, apparatus, or device.

[0104] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0105] Computer program code for performing the operations of the present invention can be written in one or more programming languages, or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0106] Note that the above are only preferred embodiments of the present invention and the technical principles employed. Those skilled in the art will appreciate that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments, and substitutions are possible for those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments and may include many other equivalent embodiments without departing from the scope of the present invention. The scope of the present invention is determined by the scope of the appended claims.

Claims

1. A page anomaly detection method, characterized in that: The method comprises: Obtain the business type of the front-end page at the current moment, and when the business type is a preset type to be inspected, obtain the page information of the front-end page, wherein the page information includes basic information, element path information, and page screenshots; Performing element anomaly detection on the front-end page based on the basic information and the element path information, and obtaining an element detection result; Performing display anomaly detection on the front-end page based on the page screenshot and predetermined standard page screenshots, and obtaining a display detection result; When the element detection result or the display detection result shows that an abnormality exists, abnormality prompt information is generated based on the element detection result or the display detection result, and the abnormality prompt information is displayed to the operation and maintenance personnel.

2. The method according to claim 1, characterized in that Performing element anomaly detection on the front-end page based on the basic information and the element path information, and obtaining element detection results, including: Determine each key element of the front-end page based on the page information, and perform existence detection on each key element according to the element path information to obtain an existence detection result of each key element; wherein the existence detection result is existence or non-existence; Performing an operability test on all key existence elements for which the existence test results are that they exist, to obtain an operability test result of the key existence element; The element detection result of the front-end page is obtained based on the existence detection result of each key element and the operability detection result of the existing key element.

3. The method according to claim 2, characterized in that The element path information includes the element identifier and element path of each element in the front-end page; performing existence detection on each key element according to the element path information to obtain the existence detection result of each key element includes: Determine the key element identification of each key element; For each key element, determine the element identifier in the element path information that is the same as the current key element identifier as the current target identifier, and determine the element path corresponding to the current target identifier as the current target path; The current key element is searched in the front-end page based on the current target path to obtain an existence detection result of the current key element.

4. The method according to claim 1, characterized in that Performing display anomaly detection on the front-end page based on the page screenshot and predetermined standard page screenshots, and obtaining display detection results, including: Determine the current page path corresponding to the page screenshot based on the front-end page; Determine a target standard screenshot corresponding to the page screenshot according to the current page path and the page paths of each standard page screenshot; The page screenshot is subjected to screenshot anomaly detection according to the target standard screenshot to obtain a display detection result of the front-end page.

5. The method according to claim 4, characterized in that Performing screenshot anomaly detection on the page screenshot according to the target standard screenshot to obtain a display detection result of the front-end page, including: Calculating the image similarity between the target standard screenshot and the page screenshot; If the image similarity is greater than a preset similarity, determining that the display detection result of the front-end page is normal; If the image similarity is less than or equal to the preset similarity, it is determined that the display detection result of the front-end page is abnormal.

6. The method according to claim 1, characterized in that The method further comprises: Obtain page information of all inspection pages of the type to be inspected at preset time intervals; For each inspection page, perform element anomaly detection and display anomaly detection on the current inspection page based on the page information of the current inspection page, and obtain the element detection result and display detection result of the current inspection page; When the element detection result or the display detection result shows that an abnormality exists, abnormality prompt information is generated based on the element detection result or the display detection result, and the abnormality prompt information is displayed to the operation and maintenance personnel.

7. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements a page exception detection method according to any one of claims 1 to 6.

8. A page anomaly detection device, characterized in that: include: A data acquisition module, used to acquire the business type of the front-end page at the current moment, and when the business type is a preset type to be inspected, acquire the page information of the front-end page, wherein the page information includes basic information, element path information and page screenshots; An element detection module, used to perform element anomaly detection on the front-end page based on the basic information and the element path information, and obtain an element detection result; A display detection module, used to perform display anomaly detection on the front-end page based on the page screenshot and predetermined standard page screenshots, and obtain a display detection result; The information display module is used to generate abnormal prompt information based on the element detection result or the display detection result when the element detection result or the display detection result is abnormal, and display the abnormal prompt information to the operation and maintenance personnel.

9. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the page exception detection method as described in any one of claims 1 to 6 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the page exception detection method as described in any one of claims 1 to 6 is implemented.

Citation Information

Cited By

  • Webpage automation task detection method and device and electronic equipment

    CN120804457A