Page anomaly detection method and device, program product and storage medium
Through the dual detection mechanism, combined with basic abnormality detection and business abnormality detection, the problem that the existing technology cannot fully and timely discover potential abnormalities on the front-end page is solved, and more efficient page abnormality detection is achieved, improving the stability and user experience of the business system.
Patent Information
- Application Number
- CN202411928241.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-04-18
AI Technical Summary
The existing page abnormality detection methods cannot fully and promptly detect potential abnormal problems in the front-end page, resulting in the impact of user experience and the stability of the business system is difficult to ensure.
The dual detection mechanism is adopted, and the front-end page is first subjected to preliminary inspection through basic abnormality detection. If there is no abnormality, the page analysis model is used to detect business abnormalities to generate page detection and display information.
It improves the comprehensiveness and reliability of page abnormality detection, can more accurately judge whether there are various abnormalities on the front-end page, and improves the robustness and user experience of the business system.
Smart Images

Figure CN119847868A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of artificial intelligence, and in particular to a page anomaly detection method, device, program product and storage medium. Background Art
[0002] With the rapid development of Internet technology, the complexity of various business systems is increasing day by day. Business systems are usually composed of multiple components and services that call each other and work together, and are finally presented to users through front-end pages to provide users with various business services. However, this complexity also brings a higher risk of failure. In actual use, users often encounter abnormal problems with the front-end pages of various business systems, such as display abnormalities or incorrect display content. These problems not only affect the user experience, but also affect the normal operation of the business system. When users use the front-end page, page anomaly detection on the front-end page has become an important means to ensure the stability of the business system and improve the user experience.
[0003] The current page anomaly detection method can capture a screenshot of the front-end page actually displayed to the user, perform image processing on the page screenshot, determine the color distribution of the front-end page based on the pixel points of the page screenshot, and determine whether the page has abnormal conditions such as a white screen, a blank screen, or a loading error based on its color distribution. This method can detect the abnormal conditions of the front-end page to a certain extent, but this method can only detect the abnormality of the page when the page has obvious abnormalities and seriously affects the user's use, and the abnormality detection of the page is not comprehensive enough. For some pages that include complex page layouts or dynamically loaded content, simple image color analysis cannot identify potential abnormal conditions of the front-end page, such as business data loading errors. As a result, users cannot receive correct information, which affects the interactive experience between users and business systems and cannot well guarantee the stability of business system operation. Summary of the invention
[0004] The embodiments of the present invention provide a page anomaly detection method, device, program product and storage medium, which can comprehensively and timely discover potential problems existing in the page, improve the robustness and stability of the business system, and further improve the interaction experience between the user and the business system.
[0005] In a first aspect, an embodiment of the present invention provides a page anomaly detection method, comprising:
[0006] Obtaining page information of a front-end page currently displayed to the first user, wherein the page information includes a page identifier, a page screenshot, and a page business type to which the front-end page belongs;
[0007] Performing basic anomaly detection on the front-end page based on the page identifier and the page screenshot to obtain a basic anomaly detection result;
[0008] When the basic anomaly detection result is no anomaly, performing business anomaly detection on the front-end page based on the page business type, the page screenshot and a predetermined page analysis model to obtain a business anomaly detection result;
[0009] Generate page detection display information based on the basic anomaly detection result and the business anomaly detection result, and display the page detection display information to the second user.
[0010] In a second aspect, an embodiment of the present invention provides a page anomaly detection device, the device comprising:
[0011] An information acquisition module, used to acquire page information of a front-end page currently displayed to the first user, wherein the page information includes a page identifier, a page screenshot, and a page business type to which the front-end page belongs;
[0012] A first anomaly detection module, configured to perform basic anomaly detection on the front-end page based on the page identifier and the page screenshot, and obtain a basic anomaly detection result;
[0013] A second anomaly detection module is used to perform business anomaly detection on the front-end page based on the page business type, the page screenshot and a predetermined page analysis model to obtain a business anomaly detection result when the basic anomaly detection result is no anomaly;
[0014] An information display module is used to generate page detection display information based on the basic anomaly detection result and the business anomaly detection result, and display the page detection display information to the second user.
[0015] 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 in 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.
[0016] 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 a page anomaly detection method as described in any one of the embodiments of the present invention.
[0017] 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 a page anomaly detection method as described in any one of the embodiments of the present invention.
[0018] In an embodiment of the present invention, the page information of the front-end page displayed to the first user at the current moment is obtained, wherein the page information includes a page identifier, a page screenshot, and a page business type to which the front-end page belongs; a basic anomaly detection is performed on the front-end page based on the page identifier and the page screenshot to obtain a basic anomaly detection result; when the basic anomaly detection result is no anomaly, a business anomaly detection is performed on the front-end page based on the page business type, the page screenshot, and a predetermined page analysis model to obtain a business anomaly detection result; based on the basic anomaly detection result and the business anomaly detection result, page detection display information is generated, and the page detection display information is displayed to the second user. The method of the embodiment of the present invention can not only perform basic anomaly detection such as white screen, loading error, or insufficient clarity on the front-end page through page information, but also perform more in-depth business anomaly detection on the front-end page according to the business type of the page through the page analysis model. The dual detection mechanism adopted in the embodiment of the present invention can improve the comprehensiveness of page anomaly detection, more accurately judge whether there are various anomalies on the front-end page, and improve the reliability of page anomaly detection. The robustness and stability of the business system are further improved, thereby improving the interactive experience between the user and the business system. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0020] Figure 1 A flow chart of a page anomaly detection method provided by an embodiment of the present invention;
[0021] Figure 2 A flow chart of detecting business anomalies on front-end pages using a page analysis model provided in an embodiment of the present invention;
[0022] Figure 3 A schematic diagram of the structure of a page anomaly detection device provided by an embodiment of the present invention;
[0023] Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0024] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0025] Figure 1 A flow chart of a page anomaly detection method provided in an embodiment of the present invention. The method in 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 further improve the interactive experience between the user and the business system. The information collected in the method in 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 in an embodiment of the present invention, and the device 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 a computer device, etc., with reference to Figure 1 , the method may specifically include the following steps:
[0026] Step 101: Obtain page information of a front-end page currently displayed to a first user.
[0027] Among them, the first user is a user who uses the front-end page to interact with the business system. The page information includes a page identifier, a page screenshot, and a page business type to which the front-end page belongs. The page identifier is used to mark different front-end pages, and one front-end page corresponds to a page identifier. For example, the page identifier can be the uniform resource locator of the front-end page. The page business type is the business type of the business system to which the front-end page belongs. For example, if the business system is a system that provides transportation services to users, then the page business type to which the front-end page provided by the business system to the user belongs is the transportation service type. Specifically, when the first user uses the front-end page to interact with the business system, the server can use a pre-set screenshot tool to automatically obtain a page screenshot of the front-end page displayed to the first user at the current moment. At the same time, the page business type of the front-end page is obtained according to the business system to which the front-end page belongs, and the page information is obtained according to the page identifier, the page screenshot, and the page business type to which the front-end page belongs.
[0028] Step 102: Perform basic anomaly detection on the front-end page based on the page identifier and the page screenshot to obtain a basic anomaly detection result.
[0029] Among them, basic anomaly detection is the process of performing preliminary anomaly checks on the front-end page without involving complex business logic. Basic anomaly detection is used to quickly identify whether there are obvious anomalies in the page loading speed, display quality, and content display. Specifically, after obtaining the page information of the front-end page, you can quickly perform various basic anomaly detections on the front-end page to screen out obvious anomalies that seriously affect the user experience. When the basic anomaly detection result is no abnormality, the front-end page is further tested for anomalies in the business logic. The page information in this solution also includes the page loading speed, and the basic anomaly detection results include speed detection results, display quality detection results, and display content detection results. Optionally, basic anomaly detection is performed on the front-end page based on the page identifier and page screenshot to obtain a basic anomaly detection result, including the following steps A1-step A2:
[0030] Step A1: Perform image quality analysis on the page screenshot to obtain the image quality level of the front-end page.
[0031] Among them, the image quality level is used to indicate the clarity of the page screenshot. The higher the image quality level, the higher the clarity of the page screenshot. In an optional implementation, after obtaining the page screenshot, the server can use a pre-set image clarity analysis tool to analyze the color contrast, brightness and saturation of the page screenshot to obtain the clarity of the page screenshot. According to the clarity of the page screenshot and the pre-set image quality levels corresponding to each clarity, the image quality level to which the page screenshot belongs is determined. After obtaining the page screenshot, the server can also detect the edge information in the image through an edge detection algorithm. If the edge is clear and continuous, it is determined that the image is relatively clear, that is, the image quality level of the page screenshot is high; if the edge is blurred or broken, it is determined that the page screenshot may be distorted or blurred, that is, the image level of the page screenshot is low.
[0032] Step A2: based on the page identifier, obtain the standard page screenshot, page similarity threshold and standard image quality level of the front-end page; obtain the basic anomaly detection result according to the page display size, page loading speed, image quality level, standard image quality level and standard page screenshot.
[0033] Among them, the page information of the front-end page also includes the page display size. The page display size includes the width data, height data and pixel data when the front-end page is displayed on the display screen. Different front-end screen resolutions, browser window sizes and different page layout designs correspond to different page display sizes. The standard page screenshot is a page screenshot obtained in advance when there is no abnormality in the front-end page. The page similarity threshold is pre-set according to the business requirements of the business system and domain big data, and is used to measure the value of the similarity between the page screenshot of the front-end page at the current moment and the standard page screenshot. The standard image quality level is used to evaluate whether the image quality of the page screenshot meets the standard. The standard page screenshots, page similarity thresholds and standard image quality levels corresponding to different front-end pages are all different. For example, in a business system of architectural design, its front-end page is often used to display design drawings for staff, and its corresponding standard image quality level and page similarity threshold will be higher. Therefore, after obtaining the page identifier, the server obtains the standard page screenshot, page similarity threshold and standard image quality level corresponding to the front-end page at the current moment from the business system to which the front-end page belongs according to the page identifier, so as to accurately obtain the basic abnormality detection results of the front-end page later.
[0034] The basic anomaly detection results include speed detection results, display quality detection results, and display content detection results. Specifically, different page display sizes correspond to different page loading speeds. When a page is displayed on screens of different sizes, its content and layout may need to be adjusted to adapt to the screen size, which will affect the loading time of the page. For example, on a small-screen device, only some key content may need to be loaded, and the corresponding page loading speed is faster, while on a large-screen device, more resources need to be loaded to provide a richer user experience, and the corresponding page loading speed is slower. In order to more accurately judge whether the page loading speed of the front-end page is normal, in this solution, after obtaining the page loading speed of the front-end page, the loading speed threshold of the front-end page is determined based on the page display size. When the page loading speed is greater than the loading speed threshold, it is determined that the speed detection result is normal.
[0035] Among them, different page display sizes correspond to different loading speed thresholds, and the loading speed threshold is used to determine whether the loading speed of the front-end page is normal. Each business system stores the loading speed threshold corresponding to each page display size. After obtaining the page display size of the front-end page at the current moment, the corresponding loading speed threshold is determined according to the page display size. Compare the page loading speed in the page information with its corresponding loading speed threshold. If the page loading speed is greater than the loading speed threshold, it means that the page loading speed is normal, and then the speed detection result of the front-end page is determined to be normal. If the page loading speed is less than or equal to the loading speed threshold, it means that the page loading speed is too slow, and then the speed detection result of the front-end page is determined to be abnormal. By comparing the page loading speed with the corresponding speed threshold, it is possible to flexibly and accurately determine whether the page loading speed is normal, which is convenient for subsequent optimization of the front-end page.
[0036] After obtaining the image quality level of the page screenshot, compare the standard image quality level with the image quality level of the page screenshot, and determine whether the clarity of the front-end page at the current moment meets the standard based on the comparison result. Specifically, the higher the image quality level of the page screenshot, the clearer the front-end page is displayed. When the image quality level is greater than the standard image quality level, it means that the clarity of the front-end page meets the standard, and it is further determined that the display quality detection result is normal. When the image quality level is less than or equal to the standard image quality level, it means that the clarity of the front-end page does not meet the standard, and it is further determined that the display quality detection result is abnormal. Comparing the image quality level of the page screenshot with the standard image quality level can determine whether the display quality of the page meets the standard, which helps to discover problems that may occur in the rendering process of the front-end page.
[0037] After obtaining the standard page screenshot, the specific image content of the standard page screenshot and the page screenshot of the front-end page at the current moment can be compared, and whether the content displayed on the front-end page is normal can be determined based on the comparison result. Specifically, after obtaining the standard page screenshot, the image similarity between the page screenshot and the standard page screenshot is calculated. When the image similarity is greater than the page similarity threshold, it is determined that the display content detection result is normal. When the image similarity is less than or equal to the page similarity threshold, it is determined that the display content detection result is abnormal.
[0038] In an optional embodiment, after obtaining the standard page screenshot corresponding to the front-end page, the server can use the cosine similarity algorithm, etc. to calculate the image similarity between the standard page screenshot and the page screenshot of the front-end page. Image similarity can indicate whether the display content of the front-end page is consistent with expectations. For example, the image similarity between the standard page screenshot and the page screenshot of the front-end page is <10%, indicating that the front-end page may have a blank screen, a white screen, or a page loading error. The image similarity between the standard page screenshot and the page screenshot of the front-end page is <50%, indicating that there is a situation where the display content of the front-end page is missing. Assuming that the page similarity threshold is 90%, when the image similarity between the standard page screenshot and the page screenshot of the front-end page is >90%, it is determined that the display content detection result of the content displayed on the front-end page is normal. By calculating the image similarity between the page screenshot and the standard page screenshot, it is possible to accurately determine whether the content displayed on the front-end page is normal, thereby detecting whether there are problems such as white screen, blank screen, missing content or incorrect display on the front-end page.
[0039] Further, after obtaining the speed detection result, display quality detection result and display content detection result of the front-end page, if any one of the detection results is abnormal, the basic detection result of the front-end page is determined to be abnormal. If the speed detection result, display quality detection result and display content detection result are all normal, the basic detection result of the front-end page is determined to be abnormal.
[0040] In the above steps, by performing basic anomaly detection on the front-end page in three dimensions: speed, quality, and content, it is possible to comprehensively evaluate whether the front-end page has any obvious abnormal state, thereby improving the efficiency and accuracy of basic anomaly detection of the page.
[0041] Step 103: When the basic anomaly detection result is no anomaly, a business anomaly detection is performed on the front-end page based on the page business type, the page screenshot and a predetermined page analysis model to obtain a business anomaly detection result.
[0042] Among them, the page analysis model is a model pre-determined by the server, which is used to perform anomaly detection on the specific business content displayed on the front-end page in combination with the business logic and historical data of the business system. In this solution, the page analysis model can be a neural network model trained based on the historical data of the business system, or it can be a large model combined with the historical data of the business system. The large model contains a huge data and parameter scale, has a stronger learning and expression ability, and can handle tasks and data with complex business logic. Specifically, when the basic anomaly detection result is abnormal, it means that the front-end page has an obvious error that seriously affects the use of the first user, and there is no need to waste computer resources to perform business anomaly detection on it. When the basic anomaly detection result is normal, the page analysis model is used to perform business logic data analysis on the front-end page according to information such as the page business type and page screenshots, and whether the business data displayed in the front-end page is normal is determined according to the data analysis situation, thereby obtaining the business anomaly detection result of the front-end page. In this solution, optionally, based on the page business type, page screenshots and a predetermined page analysis model, the front-end page is subjected to business anomaly detection to obtain the business anomaly detection result, including the following steps B1-B4:
[0043] Step B1: Obtain key elements of the front-end page based on the page identifier.
[0044] Among them, elements are the basic units that constitute a page, such as components such as text, images, buttons, forms and links in the page. Key elements are elements in the front-end page that include dynamically loaded business data, such as the population heat map in the front-end page of the government system, and the garden information in the front-end page of the forestry system. Specifically, after determining that the basic anomaly detection result of the front-end page is no anomaly, the page development information of the front-end page can be obtained, and the elements that constitute the front-end page can be extracted according to the page development information, and the key elements of the front-end page can be further obtained according to the elements. In this scheme, optionally, image recognition is performed on the page screenshot to obtain the key elements of the front-end page, including: obtaining the page development information of the front-end page based on the page identifier, extracting elements from the page development information, and obtaining the constituent elements of the front-end page; obtaining the content type of each constituent element according to the page development information; and screening out each key element from all constituent elements based on the content type of each constituent element.
[0045] Among them, the constituent elements are the elements of the front-end page at the current moment. The content type of the constituent elements includes business content type or non-business content type, and the business content type indicates that the constituent elements include specific business data. The non-business content type indicates that the constituent elements do not include specific business data, such as the menu bar and other fixed style elements in the front-end page. The page development information includes the architecture information, style information and business logic information of the front-end page. In an optional implementation, after obtaining the page information, the page development information of the front-end page can be obtained in the development information database of the business system according to the page identifier in the page information. According to the architecture information, style information and business logic information of the front-end page, all elements constituting the front-end page, i.e., the constituent elements of the front-end page, are identified. After obtaining each constituent element, the content type of each constituent element is determined according to the architecture information and style information, for example, whether the constituent element is a fixed style element (an element of non-business content type) or an element that needs to load business data (an element of business content type). After obtaining the content type of each constituent element, the constituent elements of all business content types in the front-end page are determined as key elements.
[0046] Step B2: Perform element anomaly detection on each key element based on the page analysis model to obtain element detection results for each key element.
[0047] Among them, the page analysis model is a model predetermined by the server, which is used to perform anomaly detection on the specific business content displayed on the front-end page in combination with the business logic of the business system. The page analysis model in this solution can be a large model that integrates the business data of the business system. After determining the key elements of the front-end page, the page analysis model is used to perform element anomaly detection on each key element to obtain the element detection results of each key element. In an optional implementation, element anomaly detection is performed on each key element based on the page analysis model to obtain the element detection results of each key element, including: for each key element of the front-end page, the element display type of the current key element is determined according to the page development information of the front-end page; the first prompt word of the current key element is determined according to the page business type, a predetermined prompt word database and an element display type, and the first prompt word is input into the page analysis model to obtain the element business attribute of the current key element.
[0048] Among them, the element display type represents the display form of each key element, such as a bar chart, pie chart, line chart, single table, multi-table table, matrix table and various types of text. The first prompt word is used to indicate how the page analysis model specifically analyzes the key element, so as to obtain the element business attribute of the key element. The element business attribute is the business item to which the key element specifically belongs. For example, if the page business type is the transportation service type, and the key element is a table that records the types of vehicles that can travel on a certain road, then the element business attribute of the key element is the data of the type of vehicles that can travel. The business system includes a prompt word database for recording the display types of each element of the front-end page of each business type.
[0049] Specifically, after obtaining the key element, a prompt word matching the element display type of the key element is found in the prompt word database of the business system corresponding to the business type of the page, and the prompt word is determined as the first prompt word. Exemplarily, the business type of the page is the transportation service type, and the element display type of the key element is a line graph. The prompt word corresponding to the line graph is found in the prompt word database of the business system as "the line graph is a line graph of the transportation service category, and data analysis is performed on the line graph". Further, the prompt word is determined as the first prompt word. In this solution, after obtaining the first prompt word, the first prompt word can be optimized according to the page screenshot. For example, if the page screenshot includes 3 line graphs, the first prompt word can be optimized to "the 3 line graphs are line graphs of the transportation service category, and data analysis is performed on the line graph".
[0050] Furthermore, the first prompt word and the page screenshot are input into the page analysis model, and the element business attributes of the key elements are obtained through the page analysis model. Exemplarily, the first prompt word and the page screenshot are input into the page analysis model, and the page analysis model can analyze the horizontal axis coordinates, vertical axis coordinates and table headers of the three line graphs based on the keywords such as "transportation service category", "3", "line graph" and "data analysis" in the first prompt word, combined with the general business data of the transportation service category and the business data of the business system of this solution, to determine the information such as the representation content of the horizontal axis coordinates and vertical axis coordinates of the three line graphs, and the business attributes of the three discount graphs obtained based on the analyzed information are: line graphs Figure 1 The temperature change of Road A in January; Figure 2 The temperature change of Road B in January; Figure 3 This is the temperature change of Road C in January.
[0051] Accurately identifying the key elements of the page that contain dynamically loaded business data through the development information of the front-end page helps to focus resources and energy on the parts that have the greatest impact on the business and improve the pertinence of business anomaly detection. Using the prompt word database, the first prompt word of the key elements of different display types can be accurately determined, which helps the page analysis model to accurately and efficiently analyze the key elements and accurately obtain the business attributes of the key elements.
[0052] Step B3: Determine the second prompt word of the current key element based on the element business attribute; input the second prompt word into the page analysis model, perform data content detection on the current key element through the page analysis model, and obtain the element detection result of the current key element.
[0053] Among them, the second prompt word is used to instruct the page analysis model how to perform data content detection on the business data in the key element to obtain the element detection result, and the element detection result is the presence of anomalies or no anomalies. Specifically, the prompt word database of the business system also includes prompt words corresponding to the business attributes of each element. After obtaining the element business attributes of the key element, the second prompt word is constructed according to its business attributes and the prompt word database of the business system. The second prompt word is input into the page analysis model, and the page analysis model can search for specific business data corresponding to the key element in the business database based on the second prompt word and the key element, compare the business data in the business database with the business data displayed by the key element, and obtain the element detection result of the key element based on the comparison.
[0054] Exemplarily, the element business attribute is "temperature changes on Road A in January". Based on the keywords "January", "Road A" and "temperature changes" in the element business attribute, the prompt word corresponding to the element business attribute is found in the prompt word database of the business system: "Check whether there are obvious abnormalities in the temperature of Road A in January". Further, the second prompt word is input into the page analysis model. The page analysis model searches for the specific data of the temperature of Road A in January in the business database of the business system based on "the temperature of Road A in January". The temperature changes in the line graph are compared and analyzed with the specific data of the temperature of Road A in January in the business database. If it is found that the data in the line graph is inconsistent with the data in the business database, it is determined that the data content detection result of the line graph is abnormal. If it is found that the data in the line graph is consistent with the data in the business database, it is determined that the data content detection result of the line graph is normal. For example, if the temperature in the line graph is between 0 degrees Celsius and 10 degrees Celsius, and the temperature of Road A in the business database in January is between 32 degrees Celsius and 38 degrees Celsius, it can be determined that the data content detection result of the key element is abnormal, and it can be further determined that the front-end page may have a data loading error.
[0055] The second prompt word can be accurately determined through the element business attributes and prompt word database, so that the page analysis model can more accurately detect the business data in the key elements. By combining the business logic and business data of the business system with the page analysis model, anomaly detection is performed on the specific business content displayed on the front-end page, which can accurately identify and determine whether there are anomalies in the business data of key elements.
[0056] For example, Figure 2 The flow chart of using the page analysis model to detect business anomalies on the front-end page is provided in the embodiment of the present invention. Figure 2 As shown, after determining that the basic anomaly detection result of the page is normal, the key elements of the front-end page are obtained. The first prompt word is determined according to the page information, and the page screenshot and the first prompt word are input into the page analysis model. The page analysis model is called for the first time to obtain the element business attributes of the key elements. The second prompt word is determined according to the element business attributes of the key elements, and the page analysis model is called for the second time. The data content of the key elements is detected by the page analysis model to obtain the element detection results of the key elements. Further, the business anomaly detection results of the front-end page are determined according to the element detection results of the key elements.
[0057] Step B4: Determine the business anomaly detection result based on all key element detection results.
[0058] After obtaining the element detection results of all key elements, if at least one key element has a detection result that shows an abnormality, the business anomaly detection result of the front-end page is determined to be abnormal. If all key elements have a detection result that shows no abnormality, the business anomaly detection result of the front-end page is determined to be abnormal.
[0059] Step 104: Generate page detection display information based on the basic anomaly detection result and the business anomaly detection result, and display the page detection display information to the second user.
[0060] Among them, the second user is a staff member who needs to optimize or maintain the front-end page according to the page detection display information. The page detection display information includes basic anomaly detection results and business anomaly detection results. When there is an anomaly in the basic anomaly detection result or the business anomaly detection result, the page detection display information also includes information such as the cause of the anomaly, the type of anomaly, and the severity of the anomaly. After obtaining the basic anomaly detection results and the business anomaly detection results, the server can summarize and organize the basic anomaly detection results and the business anomaly detection results to generate page detection display information. The page detection display information is displayed to the second user so that the second user can repair or optimize the front-end page in time based on the page detection display information. In this solution, if the second user finds that the business anomaly detection result output by the page analysis model is incorrect during the process of anomaly repair or optimization, the page analysis model can be optimized and adjusted according to the front-end page and the business anomaly detection results to obtain a more intelligent and accurate page analysis model.
[0061] The technical solution of this embodiment obtains the page information of the front-end page displayed to the first user at the current moment, wherein the page information includes the page identifier, the page screenshot and the page business type to which the front-end page belongs; performs basic anomaly detection on the front-end page based on the page identifier and the page screenshot to obtain the basic anomaly detection result; when the basic anomaly detection result is no anomaly, performs business anomaly detection on the front-end page based on the page business type, the page screenshot and the predetermined page analysis model to obtain the business anomaly detection result; generates page detection display information based on the basic anomaly detection result and the business anomaly detection result, and displays the page detection display information to the second user. The technical solution of this embodiment can not only perform basic anomaly detection such as white screen, loading error or insufficient clarity on the front-end page through page information, but also perform more in-depth business anomaly detection on the front-end page according to the business type of the page through the page analysis model. The dual detection mechanism adopted in the embodiment of the present invention can improve the comprehensiveness of page anomaly detection, more accurately judge whether there are various anomalies on the front-end page, and improve the reliability of page anomaly detection. The robustness and stability of the business system are further improved, thereby improving the interactive experience between users and the business system.
[0062] Figure 3 The following 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 3 As shown, the device may specifically include:
[0063] The information acquisition module 301 is used to acquire the page information of the front-end page currently displayed to the first user, wherein the page information includes a page identifier, a page screenshot, and a page business type to which the front-end page belongs;
[0064] A first anomaly detection module 302, configured to perform basic anomaly detection on the front-end page based on the page identifier and the page screenshot to obtain a basic anomaly detection result;
[0065] The second anomaly detection module 303 is used to perform business anomaly detection on the front-end page based on the page business type, the page screenshot and a predetermined page analysis model to obtain a business anomaly detection result when the basic anomaly detection result is no anomaly;
[0066] The information display module 304 is used to generate page detection display information based on the basic anomaly detection result and the business anomaly detection result, and display the page detection display information to the second user.
[0067] Optionally, the page information also includes page loading speed and page display size; the first abnormality detection module 302 is specifically used to: perform image quality analysis on the page screenshot to obtain the image quality level of the front-end page;
[0068] Acquire a standard page screenshot, a page similarity threshold, and a standard image quality level of the front-end page based on the page identifier;
[0069] The basic anomaly detection result is obtained according to the page display size, the page loading speed, the image quality level, the standard image quality level, the page similarity threshold and the standard page screenshot.
[0070] Optionally, the basic abnormality detection result includes a speed detection result, a display quality detection result and a display content detection result; the first abnormality detection module 302 is further used to: determine a loading speed threshold of the front-end page based on the page display size, and when the page loading speed is greater than the loading speed threshold, determine that the speed detection result is normal;
[0071] When the image quality level is greater than the standard image quality level, determining that the display quality detection result is normal;
[0072] The image similarity between the page screenshot and the standard page screenshot is calculated, and when the image similarity is greater than the page similarity threshold, it is determined that the display content detection result is normal.
[0073] Optionally, the second anomaly detection module 303 is specifically configured to: obtain each key element of the front-end page based on the page identifier;
[0074] Performing element anomaly detection on each key element based on the page analysis model to obtain element detection results of each key element;
[0075] The business anomaly detection result is determined based on all key element detection results.
[0076] Optionally, the second anomaly detection module 303 is further used to: obtain page development information of the front-end page based on the page identifier, and extract elements from the page development information to obtain various constituent elements of the front-end page;
[0077] The content type of each component element is acquired according to the page development information; and each key element is screened out from all the component elements based on the content type of each component element.
[0078] Optionally, the second anomaly detection module 303 is further used to: for each key element of the front-end page, determine the element display type of the current key element according to the page development information of the front-end page;
[0079] Determine a first prompt word of the current key element according to the page business type, a predetermined prompt word database and the element display type, and input the first prompt word into the page analysis model to obtain the element business attribute of the current key element;
[0080] An element detection result of the current key element is obtained based on the element business attribute and the page analysis model.
[0081] Optionally, the second anomaly detection module 303 is further configured to: determine a second prompt word of the current key element based on the element business attribute and the prompt word database;
[0082] The second prompt word is input into the page analysis model, and data content detection of the current key element is performed through the page analysis model to obtain an element detection result of the current key element.
[0083] 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 described in detail in this embodiment, reference can be made to the description in any method embodiment of the present invention.
[0084] An embodiment of the present invention also provides a computer program product.
[0085] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load 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, which 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, which 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.
[0086] Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention, referring to Figure 4 , Figure 4 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 4 As shown, the electronic device 12 is in the form of a general purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that connects various system components (including the system memory 28 and the processing unit 16).
[0087] 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. By way of example, 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.
[0088] 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.
[0089] 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 used to read and write non-removable, non-volatile magnetic media ( Figure 4 not shown, usually called a "hard drive"). Although Figure 4 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, a DVD-ROM, or other optical medium) 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 that are configured to perform the functions of the various embodiments of the present application.
[0090] A program / utility 40 having a set (at least one) of program modules 46 may be stored, for example, in the memory 28, such program modules 46 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 46 generally perform the functions and / or methods of the embodiments described herein.
[0091] The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), may communicate with one or more devices that enable a user to interact with the electronic device 12, and / or may communicate with 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 via 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) via a network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 via the bus 18. It should be understood that although Figure 4 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.
[0092] The processing unit 16 executes various functional applications and data processing by running the program stored in the system memory 28, for example, implementing a page anomaly detection method provided in an embodiment of the present invention: obtaining page information of a front-end page displayed to a first user at a current moment, wherein the page information includes a page identifier, a page screenshot, and a page business type to which the front-end page belongs; performing basic anomaly detection on the front-end page based on the page identifier and the page screenshot to obtain a basic anomaly detection result; when the basic anomaly detection result is no anomaly, performing business anomaly detection on the front-end page based on the page business type, the page screenshot, and a predetermined page analysis model to obtain a business anomaly detection result; generating page detection display information based on the basic anomaly detection result and the business anomaly detection result, and displaying the page detection display information to the second user.
[0093] The embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, a page anomaly detection method provided by all the embodiments of the present invention is implemented: obtaining page information of a front-end page displayed to a first user at the current moment, wherein the page information includes a page identifier, a page screenshot, and a page business type to which the front-end page belongs; performing basic anomaly detection on the front-end page based on the page identifier and the page screenshot to obtain a basic anomaly detection result; when the basic anomaly detection result is no anomaly, performing business anomaly detection on the front-end page based on the page business type, the page screenshot, and a predetermined page analysis model to obtain a business anomaly detection result; generating page detection display information based on the basic anomaly detection result and the business anomaly detection result, and displaying the page detection display information to a second user. 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 device of electrical, magnetic, optical, electromagnetic, infrared, or semiconductor, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with 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), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can 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.
[0094] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction-executing electronic device, apparatus, or device.
[0095] The program code embodied on the 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.
[0096] Computer program code for performing the operations of the present invention may 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 may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may 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 may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0097] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by 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 more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and 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: Obtaining page information of a front-end page currently displayed to the first user, wherein the page information includes a page identifier, a page screenshot, and a page business type to which the front-end page belongs; Performing basic anomaly detection on the front-end page based on the page identifier and the page screenshot to obtain a basic anomaly detection result; When the basic anomaly detection result is no anomaly, performing business anomaly detection on the front-end page based on the page business type, the page screenshot and a predetermined page analysis model to obtain a business anomaly detection result; Page detection display information is generated based on the basic anomaly detection result and the business anomaly detection result, and the page detection display information is displayed to the second user.
2. The method according to claim 1, characterized in that The page information also includes page loading speed and page display size; performing basic anomaly detection on the front-end page based on the page identifier and the page screenshot to obtain basic anomaly detection results, including: Performing image quality analysis on the page screenshot to obtain the image quality grade of the front-end page; Acquire a standard page screenshot, a page similarity threshold, and a standard image quality level of the front-end page based on the page identifier; The basic anomaly detection result is obtained according to the page display size, the page loading speed, the image quality level, the standard image quality level, the page similarity threshold and the standard page screenshot.
3. The method according to claim 2, characterized in that The basic abnormality detection result includes a speed detection result, a display quality detection result and a display content detection result; the basic abnormality detection result is obtained according to the page display size, the page loading speed, the image quality level, the standard image quality level and the standard page screenshot, including: Determining a loading speed threshold of the front-end page based on the page display size, and determining that the speed detection result is normal when the page loading speed is greater than the loading speed threshold; When the image quality level is greater than the standard image quality level, determining that the display quality detection result is normal; The image similarity between the page screenshot and the standard page screenshot is calculated, and when the image similarity is greater than the page similarity threshold, it is determined that the display content detection result is normal.
4. The method according to claim 1, characterized in that: Based on the page business type, the page screenshot and a predetermined page analysis model, business anomaly detection is performed on the front-end page to obtain a business anomaly detection result, including: Acquire key elements of the front-end page based on the page identifier; Performing element anomaly detection on each key element based on the page analysis model to obtain element detection results of each key element; The business anomaly detection result is determined based on all key element detection results.
5. The method according to claim 4, characterized in that Acquiring key elements of the front-end page based on the page identifier includes: Acquire page development information of the front-end page based on the page identifier, and extract elements from the page development information to obtain various constituent elements of the front-end page; The content type of each component element is acquired according to the page development information; and each key element is screened out from all the component elements based on the content type of each component element.
6. The method according to claim 4, characterized in that Based on the page analysis model, element anomaly detection is performed on each key element to obtain element detection results of each key element, including: For each key element of the front-end page, determine the element display type of the current key element according to the page development information of the front-end page; Determine a first prompt word of the current key element according to the page business type, a predetermined prompt word database and the element display type, and input the first prompt word into the page analysis model to obtain the element business attribute of the current key element; An element detection result of the current key element is obtained based on the element business attribute and the page analysis model.
7. The method according to claim 6, characterized in that Obtaining an element detection result of the current key element based on the element business attribute and the page analysis model includes: Determine a second prompt word for the current key element based on the element business attribute and the prompt word database; The second prompt word is input into the page analysis model, and data content detection is performed on the current key element through the page analysis model to obtain an element detection result of the current key element.
8. 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 7.
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, a page exception detection method as described in any one of claims 1 to 7 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, a page exception detection method as described in any one of claims 1 to 7 is implemented.