Page risk prediction method and device, computer equipment and storage medium

Automatically identify page and component anomalies through the page detection model and component detection model, and use the structural similarity index to compare page compatibility, which solves the problems of high cost of page testing and inability to predict page risks in the existing technology, and achieves efficient page risk management Prediction and compatibility detection.

CN118535912APending Publication Date: 2024-08-23CHINA CITIC BANK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410500742.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-24
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

In the existing technology, page testing mainly focuses on interface responses and data errors, and pays less attention to page problems, resulting in high cost and time for manual verification, and the inability to effectively predict page risks.

Method used

The page detection model and component detection model are used to train the initial detection model through sample page features and component features, automatically identify page and component anomalies, use the structural similarity index to compare page compatibility, and predict page risks.

Benefits of technology

It can automatically identify page anomalies and component anomalies without manual intervention, improve testing efficiency and quality, reduce labor costs, quickly discover page risks, and assist design and development to locate problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118535912A
    Figure CN118535912A
Patent Text Reader

Abstract

The invention relates to the technical field of computers, in particular to a page risk prediction method and device, computer equipment and a storage medium. The method comprises the steps of determining a to-be-detected page according to a page operation type; the to-be-detected page is input into a page detection model, whether the to-be-detected page is abnormal or not is judged according to output of the page detection model, and the page detection model is obtained by training an initial detection model through sample page features and sample pages; the to-be-detected page is input to a component detection model, whether an abnormal component exists in the to-be-detected page or not is judged according to output of the component detection model, and the component detection model is obtained by sample page component features and a sample page training initial detection model; and predicting the page risk according to the page anomaly detection result and the component anomaly detection result. According to the scheme, the front-end page experience risk problem of the tested system can be automatically checked, the checking efficiency and accuracy are improved, manual maintenance is reduced, and the labor cost is saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of computer technology, and in particular to page risk prediction methods, devices, computer equipment, and storage media. Background Art

[0002] In the prior art, testers mainly focus on interface response problems, data error problems, event response problems, business logic problems, etc. during routine testing, and rarely pay special attention to problems existing in the page unless there are very obvious problems in the page (such as: large blank areas on the page, garbled characters in the core part, etc.).

[0003] Moreover, even if the page display problem is tested intentionally, it is tested through manual verification. This consumes a lot of manpower and time costs for the standardization of page components and interface compatibility, because testers need to repeat operations in multiple types of browsers. Although there is a way to run the same case in multiple browsers concurrently, it is still impossible to predict page risks by only focusing on whether the case can run successfully without paying attention to its page. Summary of the invention

[0004] In order to solve the problem that manual verification for page testing in the above-mentioned prior art consumes a lot of manpower and time costs, the embodiments of this specification provide a page risk prediction method, apparatus, computer equipment and storage medium.

[0005] An embodiment of the present specification provides a page risk prediction method, the method comprising: determining a page to be detected according to a page operation type; inputting the page to be detected into a page detection model, and judging whether the page to be detected has an abnormality according to an output of the page detection model, wherein the page detection model is obtained by sample page features and an initial detection model trained with sample pages; inputting the page to be detected into a component detection model, and judging whether the page to be detected has an abnormal component according to an output of the component detection model, wherein the component detection model is obtained by sample page component features and an initial detection model trained with sample pages; and predicting page risk according to page anomaly detection results and component anomaly detection results.

[0006] According to one aspect of an embodiment of the present specification, the page detection model is obtained in the following manner: obtaining sample page features and sample pages; inputting the sample pages into an initial detection model to obtain page results output by the initial detection model; calculating a loss value between the page results output by the initial detection model and the sample page features, and iteratively updating model parameters of the initial detection model based on the loss value to obtain the page detection model.

[0007] According to one aspect of an embodiment of the present specification, the component detection model is obtained in the following manner: obtaining sample page component features and a sample page; inputting the sample page into an initial detection model to obtain a page component result of the initial detection model; calculating a loss value between the page component result output by the initial detection model and the sample page component features, and iteratively updating the model parameters of the initial detection model based on the loss value to obtain the component detection model.

[0008] According to one aspect of an embodiment of the present specification, judging whether a page to be detected has an abnormal component based on the output of a component detection model includes: determining the component type and component position based on the output of the component detection model; determining the position attribute of the component in the page to be detected based on the component position; determining the display attribute of the component in the detection page based on the component type; and comparing the position attribute and display attribute of the component with the component specification value respectively to judge whether the component has an abnormality.

[0009] According to one aspect of an embodiment of the present specification, the method further includes: obtaining a verified page as a reference page; comparing the page to be detected with the reference page using a structural similarity index; and determining whether the compatibility of the page to be detected is abnormal based on the comparison result.

[0010] According to one aspect of an embodiment of the present specification, using a structural similarity index to compare the page to be detected with the reference page includes: using a structural similarity function to calculate the brightness difference, contrast difference and structural difference between the page to be detected and the reference page, the brightness difference, contrast difference and structural difference being the comparison results.

[0011] According to one aspect of an embodiment of the present specification, determining the page to be tested based on the page operation type includes: recording an automated test case and identifying the page operation type in the automated test case; when the page operation type is a button type and the page operation does not belong to any of login, return, refresh, import or previous step, obtaining the page to be tested; when the page operation type is any of an input box or a link, obtaining the page to be tested.

[0012] The embodiments of the present specification also provide a page risk prediction device, which includes: a page to be detected determination unit, which is used to determine the page to be detected according to the page operation type; a first judgment unit, which is used to input the page to be detected into a page detection model, and judge whether the page to be detected has an abnormality according to the output of the page detection model, wherein the page detection model is obtained by sample page features and an initial detection model trained with sample pages; a second judgment unit, which is used to input the page to be detected into a component detection model, and judge whether the page to be detected has an abnormal component according to the output of the component detection model, wherein the component detection model is obtained by sample page component features and an initial detection model trained with sample pages; and a risk prediction unit, which is used to predict page risks according to page anomaly detection results and component anomaly detection results.

[0013] An embodiment of the present specification provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the terminal security problem rectification method is implemented when the processor executes the computer program.

[0014] The embodiment of the present specification also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the terminal security problem rectification method is implemented.

[0015] This manual is intended to automatically identify page anomalies, component anomalies, and compatibility anomalies without manual intervention, effectively improving the efficiency and quality of manual inspection. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0017] Figure 1 Shown is a flow chart of a page risk prediction method according to an embodiment of this specification;

[0018] Figure 2 The figure is a flow chart of a method for training a component detection model according to an embodiment of the present specification;

[0019] Figure 3 The figure is a flow chart of a method for training a component detection model according to an embodiment of the present specification;

[0020] Figure 4 The figure is a flow chart of a method for determining an abnormal component according to an embodiment of the present specification;

[0021] Figure 5 The figure is a flow chart of a method for detecting page compatibility according to an embodiment of the present specification;

[0022] Figure 6 The figure shows a schematic diagram of the structure of a page risk prediction device according to an embodiment of the present specification;

[0023] Figure 7 Shown is a schematic diagram of the specific structure of the risk prediction device of the embodiment page of this specification;

[0024] Figure 8 The figure shows a schematic diagram of the structure of a computer device according to an embodiment of the present specification.

[0025] Description of the accompanying symbols:

[0026] 601, a unit for determining a page to be detected;

[0027] 602, first judging unit;

[0028] 603, second judging unit;

[0029] 604. Risk prediction unit;

[0030] 802. Computer equipment;

[0031] 804, processor;

[0032] 806. Memory;

[0033] 808, driving mechanism;

[0034] 810, input / output module;

[0035] 812. Input device;

[0036] 814. Output device;

[0037] 816. Presentation equipment;

[0038] 818. Graphical user interface;

[0039] 820, network interface;

[0040] 822, communication link;

[0041] 824. Communication bus. DETAILED DESCRIPTION

[0042] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.

[0043] It should be noted that the terms "first", "second", etc. in the description and claims of this specification and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of this specification described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, device, product or equipment that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment.

[0044] This specification provides method operation steps as described in the embodiments or flow charts, but more or fewer operation steps may be included based on routine or non-creative work. The order of steps listed in the embodiments is only one way of executing the order of many steps and does not represent the only execution order. When the system or device product is executed in practice, it can be executed in the order of the method shown in the embodiments or the drawings or in parallel.

[0045] At present, UI interface testing is used to analyze whether the design of the software user interface meets user requirements, whether the text is correct, whether the operation is friendly, etc. UI interface testing needs to ensure that the user interface meets the company or industry standards, including user friendliness, humanization, and ease of operation testing. It should be noted that the page risk prediction method of this specification can be used in the computer field and the financial field. This specification does not limit the application field of the page risk prediction method and device.

[0046] Figure 1 The flowchart of a page risk prediction method according to an embodiment of the present specification is shown, which specifically includes the following steps:

[0047] Step 101, determining the page to be detected according to the page operation type. This step specifically includes:

[0048] Record automated test cases and identify page operation types in automated test cases.

[0049] When the page operation type is button type, and the page operation does not belong to login, return, refresh, import or any of the previous steps, obtain the page to be detected.

[0050] When the page operation type is any of the input box and link, the page to be detected is obtained.

[0051] Specifically, according to the test requirements, the automated test cases are automatically recorded. In the process of recording the automated test cases, a lot of page operation data will be recorded. Therefore, it is necessary to identify the page operation type in the automated test case. The embodiment of this specification identifies the page operation type and detects the page where a new page may appear after the operation. Therefore, when the page operation type is a button type (that is, a button type), and the button type excludes operation types such as login, return, previous step, refresh, and import, the test page that meets this condition can be used as a page to be detected.

[0052] In addition, when the page operation type is an input box or a link, the page to be detected is obtained. Thus, unnecessary page detection is reduced. For example, when there are a large number of input boxes on the page, it is not necessary to take a page screenshot after each input operation.

[0053] Step 102, input the page to be detected into the page detection model, and determine whether the page to be detected has an abnormality based on the output of the page detection model. The page detection model is obtained by training the initial detection model based on the sample page features and the sample page. In this step, the page detection model is obtained by training the initial detection model based on the sample page features and the sample page. This step is applicable to the model application stage, and the page to be detected is input into the page detection model. The page detection model can directly output the result, wherein the output result is a detection image that marks the page abnormality, including but not limited to: a detection image that has marked garbled characters, a detection image that has marked blanks, and a detection image that has marked overlapping characters.

[0054] Step 103, input the page to be detected into the component detection model, and determine whether there is an abnormal component in the page to be detected according to the output of the component detection model. The component detection model is obtained by the sample page component features and the sample page training initial detection model.

[0055] In this step, the component detection model is used to identify components or controls in the page to be detected, wherein the components or controls include but are not limited to: input boxes, buttons, etc.

[0056] Step 104: predicting the page risk based on the page anomaly detection result and the component anomaly detection result. If a page anomaly detection result or a component anomaly detection result is obtained according to the above steps, it is determined that the page has a risk.

[0057] The present invention can quickly discover page anomalies, and can assist the design team in verifying whether page components comply with design specifications, assist in development and locate problems, improve development efficiency, unify front-end development specifications, and solve display problems in different browser interfaces.

[0058] Figure 2 The flowchart of a method for training a component detection model according to an embodiment of the present specification is shown, which specifically includes the following steps:

[0059] Step 201, obtain sample page features and sample pages. In the embodiment of this specification, the sample page features and sample pages are sample data sets for training page detection models. Among them, the sample pages can be various different types of web pages, including: sample pages that display normally, sample pages with large blank areas, sample pages with garbled characters, sample pages with overlapping characters or sample pages with overlapping screens, etc. This specification does not limit the types of sample pages. Furthermore, the sample page features are specific features for marking sample pages, including but not limited to: blank features, garbled features, character overlapping features or screen overlapping features, etc.

[0060] Step 202: Input the sample page into the initial detection model to obtain the page result output by the initial detection model. In the embodiment of this specification, supervised training is performed on the initial detection model based on the sample page features and the sample page. The sample page is input into the initial detection model, and the initial detection model outputs the initial predicted page result. The prediction accuracy of the page result may have a certain deviation.

[0061] Step 203, calculating the loss value between the page result output by the initial detection model and the sample page feature, iteratively updating the model parameters of the initial detection model based on the loss value, and obtaining the page detection model.

[0062] Based on the fact that the page result output by the initial detection model in step 202 may be inaccurate, the loss value or difference between the page result output by the initial detection model and the sample page feature is calculated using the sample page feature. If the loss value or difference does not meet the preset conditions, the model parameters of the initial detection model are adjusted and the initial detection model is continuously trained. The model training is completed and the page detection model is obtained until the loss value or difference between the page result output by the initial detection model and the sample page feature meets the preset conditions, or the number of training times of the initial detection model reaches the preset number.

[0063] Figure 3 The flowchart of a method for training a component detection model according to an embodiment of the present specification is shown, which specifically includes the following steps:

[0064] Step 301, obtain sample page component features and sample pages. In this step, the sample pages can be various types of web pages. Sample page component features are specific features for marking components or controls in the sample pages, including but not limited to: input box features, button features, menu features, etc.

[0065] Step 302, input the sample page into the initial detection model to obtain the page component result of the initial detection model. In the embodiment of this specification, the initial detection model is supervisedly trained according to the sample page component features and the sample page. Specifically, the sample page is input into the initial detection model, and the initial detection model outputs the result of the component in the initial prediction page. The prediction accuracy of the component result in the page may have a certain deviation.

[0066] Step 303, calculate the loss value between the page component result output by the initial detection model and the sample page component feature, iteratively update the model parameters of the initial detection model based on the loss value, and obtain the component detection model. Based on the situation that the result of the page component output by the initial detection model in step 302 may be inaccurate, use the sample page component feature to calculate the loss value or difference between the page component result output by the initial detection model and the sample page component feature. If the loss value or difference does not meet the preset conditions, adjust the model parameters of the initial detection model and continue to train the initial detection model. Until the calculated loss value or difference between the page result output by the initial detection model and the sample page component feature meets the preset conditions, or the number of iterations of the initial detection model reaches a preset number, the model training is completed and the component detection model is obtained.

[0067] Figure 4 The flowchart of a method for determining an abnormal component according to an embodiment of the present specification is shown, which specifically includes the following steps:

[0068] Step 401, determine the component type and component position according to the output of the component detection model. This step is based on the process of inputting the page to be detected into the component detection model in step 103, and the component detection model outputs the component type and component position in the page to be detected. In the embodiment of this specification, the component type includes but is not limited to: button, drop-down box, selection box, etc. The component position is the position of the component in the page to be detected, specifically the specific coordinates of the component in the page to be detected.

[0069] Step 402, determine the position attributes of the component in the page to be detected according to the component position. In this step, the specific coordinate position of the component in the page to be detected can be determined according to the component position, so the position attributes including the component height, the upper and lower margins of the component to the page to be detected can be determined.

[0070] Step 403, according to the component type, determine the display properties of the component in the detection page. In the embodiment of this specification, according to the component type, the display properties of the component are automatically obtained. For example, if the component type is a button component, the display properties of the button component such as background color, text font, and text font size are obtained.

[0071] Step 404, compare the position attribute and display attribute of the component with the component specification value respectively to determine whether the component is abnormal. Specifically, compare each position attribute and each display attribute of the component with the specification value corresponding to each attribute to obtain the attribute difference value. Further, record the difference value in the test report, and mark the components with differences in the page to be tested. Furthermore, add a text description to the components with differences to explain the specific description of the differences.

[0072] For example, the standard value of a button is: height 36, background color #c5f5f5; while the actual value of the button is: height 40, background color #c5f5e1. Then the properties of the button are abnormal.

[0073] Figure 5 The flowchart of a method for detecting page compatibility according to an embodiment of the present specification is shown, which specifically includes the following steps:

[0074] Step 501, obtain a verified page as a reference page. In the embodiment of this specification, when the compatibility test is initially performed, the page to be tested is manually verified, and the page that passes the verification is used as the reference page. The reference page is subsequently used as a reference page for compatibility testing of the page to be tested.

[0075] Step 502, using the structural similarity index, compare the page to be detected with the reference page. In this step, the structural similarity index (SSIM) can be used to compare the page to be detected with the reference page, and the brightness difference, contrast difference and structural difference between the page to be detected and the reference page are calculated, and the brightness difference, contrast difference and structural difference are the comparison results.

[0076] Among them, the structural similarity index is used to measure the similarity between two images. The structural similarity index considers the differences in brightness, contrast and structure between the page to be tested and the reference page. After comparison, a score between -1 and 1 is generated, which is the structural similarity index.

[0077] Step 503, based on the comparison result, determine whether the compatibility of the page to be detected is abnormal. In the embodiment of this specification, it can be determined whether the page to be detected is compatible based on the value of the structural similarity index. For example, if the value of the structural similarity is 0, it can be determined that the similarity between the page to be detected and the reference page is high, and the page compatibility of the page to be detected is normal. If the value of the structural similarity is -1, it can be determined that the similarity between the page to be detected and the reference page is low, and the page compatibility of the page to be detected is poor. The embodiment of this specification combines the target detection algorithm and the automated testing technology to automatically identify the specified page and the component attributes within the page, and automatically identify or compare the attribute values, and display the specific differences to the user, thereby eliminating the heavy workload of manual inspection, and quickly discovering the experience type problems such as garbled characters, excessive component height, and some browser display errors.

[0078] like Figure 6 The figure shows a schematic diagram of the structure of a page risk prediction device according to an embodiment of the present specification. The basic structure of the device is described in this figure. The functional units and modules therein can be implemented in software, or a general chip or a specific chip can be used to implement page risk prediction. The device specifically includes:

[0079] A to-be-detected page determining unit 601 is used to determine a to-be-detected page according to a page operation type;

[0080] The first judgment unit 602 is used to input the page to be detected into the page detection model, and judge whether the page to be detected has an abnormality according to the output of the page detection model, wherein the page detection model is obtained by training an initial detection model with sample page features and sample pages;

[0081] The second judgment unit 603 is used to input the page to be detected into the component detection model, and judge whether there is an abnormal component in the page to be detected according to the output of the component detection model, wherein the component detection model is obtained by the component features of the sample page and the initial detection model trained by the sample page;

[0082] The risk prediction unit 604 is used to predict the page risk according to the page anomaly detection result and the component anomaly detection result.

[0083] This solution can automatically check the front-end page experience risk issues of the system under test, improve inspection efficiency and accuracy, reduce manual maintenance, and save labor costs.

[0084] As an example of this specification, please refer to Figure 7 Shown is a schematic diagram of the specific structure of the page risk prediction device of this embodiment.

[0085] As an embodiment of the present specification, the to-be-detected page determination unit 601 further includes: a page operation type identification module 6011, which is used to record an automated test case and identify the page operation type in the automated test case.

[0086] like Figure 8 As shown, a computer device provided by an embodiment of this specification is provided, and the page risk prediction method described in this specification can be executed by the computer device 802. The computer device 802 may include one or more processors 804, such as one or more central processing units (CPUs), and each processing unit may implement one or more hardware threads. The computer device 802 may also include any memory 806, which is used to store any kind of information such as code, settings, data, etc. Non-limitingly, for example, the memory 806 may include any one or more combinations of the following: any type of RAM, any type of ROM, flash memory device, hard disk, optical disk, etc. More generally, any memory can use any technology to store information. Further, any memory can provide volatile or non-volatile retention of information. Further, any memory can represent a fixed or removable component of the computer device 802. In one case, when the processor 804 executes an associated instruction stored in any memory or a combination of memories, the computer device 802 can perform any operation of the associated instruction. The computer device 802 also includes one or more drive mechanisms 808 for interacting with any memory, such as a hard disk drive mechanism, an optical disk drive mechanism, etc.

[0087] The computer device 802 may also include an input / output module 810 (I / O) for receiving various inputs (via input devices 812) and for providing various outputs (via output devices 814). A specific output mechanism may include a presentation device 816 and an associated graphical user interface (GUI) 818. In other embodiments, the input / output module 810 (I / O), the input device 812, and the output device 814 may not be included, and the computer device 802 may be used as a computer device in a network. The computer device 802 may also include one or more network interfaces 820 for exchanging data with other devices via one or more communication links 822. One or more communication buses 824 couple the components described above together.

[0088] The communication link 822 may be implemented in any manner, for example, through a local area network, a wide area network (e.g., the Internet), a point-to-point connection, etc., or any combination thereof. The communication link 822 may include any combination of hardwired links, wireless links, routers, gateway functions, name servers, etc. governed by any protocol or combination of protocols.

[0089] Corresponds to Figures 1 to 5The method in the embodiment of the present specification also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above method are executed.

[0090] The embodiment of the present specification also provides a computer-readable instruction, wherein when the processor executes the instruction, the program therein causes the processor to execute the following Figures 1 to 5 The method shown.

[0091] It should be understood that in the various embodiments of this specification, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this specification.

[0092] It should also be understood that in the embodiments of this specification, the term "and / or" is only a description of the association relationship of the associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this specification generally indicates that the associated objects before and after are in an "or" relationship.

[0093] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in this specification can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this specification.

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

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

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

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

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

[0099] Specific embodiments are used in this specification to illustrate the principles and implementation methods of this specification. The description of the above embodiments is only used to help understand the methods and core ideas of this specification. At the same time, for those skilled in the art, according to the ideas of this specification, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on this specification.

Claims

1. A page risk prediction method, It is characterized in that The method comprises: Determine the page to be detected according to the page operation type; Input the page to be detected into the page detection model, and determine whether the page to be detected has an abnormality according to the output of the page detection model, wherein the page detection model is obtained by training an initial detection model based on sample page features and sample pages; Input the page to be detected into the component detection model, and determine whether there is an abnormal component on the page to be detected according to the output of the component detection model, wherein the component detection model is obtained by training the initial detection model based on the component features of the sample page and the sample page; Predict page risks based on page anomaly detection results and component anomaly detection results.

2. The page risk prediction method according to claim 1, It is characterized in that The page detection model is obtained in the following way: Get sample page features and sample pages; Inputting the sample page into the initial detection model to obtain a page result output by the initial detection model; The loss value between the page result output by the initial detection model and the sample page feature is calculated, and the model parameters of the initial detection model are iteratively updated based on the loss value to obtain the page detection model.

3. The page risk prediction method according to claim 1, It is characterized in that The component detection model is obtained in the following way: Get sample page component features and sample pages; Inputting the sample page into the initial detection model to obtain a page component result of the initial detection model; The loss value between the page component result output by the initial detection model and the sample page component feature is calculated, and the model parameters of the initial detection model are iteratively updated based on the loss value to obtain the component detection model.

4. The page risk prediction method according to claim 1, It is characterized in that Judging whether there are abnormal components on the page to be detected based on the output of the component detection model includes: Determine the component type and component location based on the output of the component detection model; According to the component position, determine the position attribute of the component in the page to be detected; Determine the display properties of the component in the detection page according to the component type; Compare the position attributes and display attributes of the component with the component specification values ​​to determine whether there is any abnormality in the component.

5. The page risk prediction method according to claim 1, It is characterized in that The method further comprises: Get verified pages as benchmark pages; Using a structural similarity index, the page to be detected is compared with the benchmark page; Based on the comparison result, determine whether the compatibility of the page to be tested is abnormal.

6. The page risk prediction method according to claim 1, It is characterized in that The use of the structural similarity index to compare the page to be detected with the reference page includes: The structural similarity function is used to calculate the brightness difference, contrast difference and structural difference between the page to be detected and the reference page, and the brightness difference, contrast difference and structural difference are the comparison results.

7. The page risk prediction method according to claim 1, It is characterized in that Determining the page to be detected according to the page operation type includes: Record automated test cases and identify page operation types in automated test cases; When the page operation type is button type, and the page operation does not belong to login, return, refresh, import or any of the previous steps, obtain the page to be detected; When the page operation type is any of the input box and link, the page to be detected is obtained.

8. A page risk prediction device, It is characterized in that The device comprises: A to-be-detected page determination unit, used to determine the to-be-detected page according to the page operation type; A first judgment unit is used to input the page to be detected into a page detection model, and judge whether the page to be detected has an abnormality according to the output of the page detection model, wherein the page detection model is obtained by training an initial detection model with sample page features and sample pages; A second judgment unit is used to input the page to be detected into a component detection model, and judge whether there is an abnormal component in the page to be detected according to the output of the component detection model, wherein the component detection model is obtained by the component features of the sample page and the initial detection model trained by the sample page; The risk prediction unit is used to predict the page risk based on the page anomaly detection results and component anomaly detection results.

9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.