Test result analysis method and device, computer equipment and readable storage medium
By obtaining the page picture and terminal application type of the test page of the virtual data processing module, using the semantic classification model to identify text information and automatically determine the category of failure reasons, the problem of human resource waste required to manually determine the cause of test failure is solved, and efficient and accurate automated classification is achieved.
Patent Information
- Application Number
- CN202410538946.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-30
- Publication Date
- 2025-05-30
AI Technical Summary
During the automated testing of the module function of the virtual data processing module, the cause of failure needs to be manually determined when the test fails, resulting in waste of human resources.
By obtaining the page picture and terminal application type of the test failure page, the text information in the page picture is identified using the semantic classification model, and the category of failure reasons for the test failure page is automatically determined based on the recognition results.
Automatic classification of the reasons for the failure of the test page is realized, saving human resources and improving efficiency and accuracy.
Smart Images

Figure CN120066946A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular, to a test result analysis method, apparatus, computer device, computer-readable storage medium, and computer program product. Background Art
[0002] With the rapid development of the industry, the security requirements for virtual data processing modules are getting higher and higher, and it becomes increasingly important to automate the testing of the module functions of virtual data processing modules.
[0003] During the process of automating the testing of the module functions of virtual data processing modules, it is inevitable that test failures will occur. At this time, it is necessary to analyze and process the test failure results to determine the reasons for the test failures. However, in the existing solutions, by manually determining the reasons for test failures, a large amount of human resources are required throughout the process, resulting in a waste of human resources. Summary of the Invention
[0004] Based on this, in view of the above technical problems, it is necessary to provide a test result analysis method, apparatus, computer device, computer-readable storage medium, and computer program product that can save human resources when determining the reasons for the failure of the module function test of the virtual data processing module.
[0005] In a first aspect, this application provides a test result analysis method, including:
[0006] Obtain a page image of the test failure page and the application program type of the second terminal; the test failure page is a page generated after the second terminal tests the module function of the processing module in the second terminal, and the processing module is a module for processing virtual resource data;
[0007] Based on the application program type of the second terminal, extract a target image from the page image according to the page extraction method corresponding to the application program type;
[0008] Identify the text information in the target image, input the text information into a semantic classification model for semantic recognition, and determine the failure reason category corresponding to the test failure page based on the recognition result.
[0009] In one of the embodiments, the extracting a target image from the page image according to the page extraction method corresponding to the application program type based on the application program type of the second terminal includes:
[0010] When the application program type is a client, blur the page image;
[0011] Convert the blurred page image into a color image;
[0012] Denoise the color image, and perform contour detection on the denoised color image to obtain contour information;
[0013] Extract the target picture from the denoised color image based on the contour information.
[0014] In one embodiment, the extracting the target picture from the page picture according to the page extraction method corresponding to the application type of the second terminal includes:
[0015] When the application type is a browser, preprocess the page picture to obtain a processed picture;
[0016] Calculate the picture blank rate of the processed picture;
[0017] Determine the central area from the processed picture, and calculate the central blank rate of the central area;
[0018] When the central blank rate is greater than the corresponding threshold and the picture blank rate is not greater than the corresponding threshold, extract the target picture from the processed picture.
[0019] In one embodiment, after determining the central area from the processed picture and calculating the central blank rate of the central area, the method further includes:
[0020] When the central blank rate is greater than the corresponding threshold and the picture blank rate is greater than the corresponding threshold, determine that the processed picture is a blank picture, and the failure reason category of the test failure page is the running environment problem category.
[0021] In one embodiment, the determining the failure reason category corresponding to the test failure page based on the recognition result includes:
[0022] Determine the semantic information of the text information included in the recognition result;
[0023] Based on the semantic information, determine the target keywords included in the text information;
[0024] Determine the preset failure reason category corresponding to the target keyword, and use the preset failure reason category as the failure reason category corresponding to the test failure page.
[0025] In one embodiment, the determining the preset failure reason category corresponding to the target keyword includes:
[0026] When the target keyword is an environmental keyword, determine that the preset failure reason category corresponding to the target keyword is the operating environment problem category;
[0027] When the target keyword is a keyword of a virtual data name, determine that the preset failure reason category corresponding to the target keyword is the system data problem category;
[0028] When the target keyword is a biometric keyword, determine that the preset failure reason category corresponding to the target keyword is the tool problem category;
[0029] When the target keyword is a script keyword, determine that the preset failure reason category corresponding to the target keyword is the script problem category.
[0030] In one embodiment, the training process of the semantic classification model includes:
[0031] Obtain a page picture sample of a test failure page, a failure reason category label corresponding to each page picture sample, and the application type of the second terminal;
[0032] For each page picture sample, based on the application type of the second terminal, extract a target picture sample from the page picture sample according to the page extraction method corresponding to the application type; identify the text information in the target picture sample, input the text information in the target picture sample into the semantic classification model for semantic recognition, and determine the failure reason category corresponding to the page picture sample based on the recognition result;
[0033] Based on the failure reason category corresponding to each page picture sample and the corresponding failure reason category label, adjust the parameters of the initial classification model, and continue training based on the initial classification model after parameter adjustment until the stop condition is reached and then stop to obtain the trained semantic classification model.
[0034] In a second aspect, the present application further provides a test result analysis device, and the device includes:
[0035] An acquisition module, configured to acquire a page picture of a test failure page and the application type of the second terminal; the test failure page is a page generated after the second terminal tests the module function of a processing module in the second terminal, and the processing module is a module for processing virtual resource data;
[0036] An extraction module, configured to extract a target picture from the page picture according to the page extraction method corresponding to the application type of the second terminal;
[0037] An identification module, configured to identify the text information in the target picture, input the text information into a semantic classification model for semantic recognition, and determine the failure reason category corresponding to the test failure page based on the recognition result.
[0038] In a third aspect, the present application further provides a computer device, including a memory and a processor, where the memory stores a computer program, and when the processor executes the computer program, the steps of the methods in the embodiments are implemented.
[0039] In a fourth aspect, the present application further 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 methods in the embodiments are implemented.
[0040] In a fifth aspect, the present application further provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of the methods in the embodiments are implemented.
[0041] For the above test result analysis method, device, computer device, computer-readable storage medium, and computer program product, the present application can obtain the page picture of the test failure page, where the test failure page is the page generated after the second terminal tests the system functions of the virtual resource data processing system. Then, based on the terminal type of the second terminal, the target picture is extracted from the page picture according to the page extraction method corresponding to the terminal type. After identifying the text information in the target picture, the text information is input into the semantic classification model for semantic recognition, and the failure reason category corresponding to the test failure page is determined based on the recognition result. Through the semantic classification model, the automatic classification of the failure reasons of the test failure page is realized, without the need for manual participation, saving human resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required for the description of the embodiments of the present application or related technologies. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.
[0043] Figure 1 It is a schematic flowchart of the test result analysis method in an embodiment;
[0044] Figure 2 It is a schematic flowchart of the test result analysis method in an embodiment;
[0045] Figure 3 It is a schematic flowchart of the test result analysis method in an embodiment;
[0046] Figure 4 The structural block diagram of the test result analysis device in an embodiment;
[0047] Figure 5 The internal structure diagram of a computer device in an embodiment. Specific implementation manners
[0048] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0049] In one embodiment, as Figure 1 shown, a test result analysis method is provided. In this embodiment, the application of this method to the first terminal is taken as an example for illustration. In this embodiment, the method includes the following steps:
[0050] Step 102: Obtain the page image of the test failure page and the application program type of the second terminal; the test failure page is a page generated after the second terminal tests the module functions of the processing module in the second terminal, and the processing module is a module for processing virtual resource data;
[0051] The processing module can implement multiple module functions to process virtual resource data. During the process of testing the module functions of the processing module, test errors may occur. After a test error occurs, a test failure page will be generated, and the present application can automatically analyze the reasons for the test failure.
[0052] The first terminal and the second terminal may be the same terminal. For example, both the first terminal and the second terminal are clients. Then, obtaining the page image of the test failure page and the application program type of the second terminal specifically includes: the first terminal obtains the page image of the test failure page generated by itself and its own application program type;
[0053] The first terminal and the second terminal may be different terminals. For example, the first terminal is a client and the second terminal is a browser. Then, obtaining the page image of the test failure page and the application program type of the second terminal specifically includes: the first terminal receives the page image of the test failure page sent by the second terminal and the application program type of the second terminal sent by the second terminal.
[0054] The application program type of the second terminal includes a client or a browser;
[0055] The page image of the test failure page may be obtained by the second terminal collecting an image of the generated test failure page.
[0056] Step 104: Based on the application type of the second terminal, extract the target image from the page image according to the page extraction method corresponding to the application type;
[0057] In this embodiment, the page extraction methods corresponding to different application types of the second terminal are different;
[0058] The target image is a part of the page image.
[0059] Step 106: Identify the text information in the target image, input the text information into the semantic classification model for semantic recognition, and determine the failure reason category corresponding to the test failure page based on the recognition result.
[0060] The first terminal uses optical character recognition (OCR) to identify the text information in the target image, inputs the recognized text information into the semantic classification model for semantic recognition, obtains the semantic information, and then determines the failure reason category corresponding to the test failure page based on the recognized semantic information.
[0061] In this embodiment, the semantic classification model can perform semantic recognition and classify the recognition results. The semantic classification model can be a large language model. The way the semantic classification model performs semantic recognition on the text information is as follows: perform preprocessing such as word segmentation, stop word removal, and part-of-speech tagging on the text information, and perform semantic recognition on the preprocessed text to learn the semantic relationships between different words.
[0062] The failure reason categories include: operating environment problem category, system data problem category, tool problem category, script problem category, and other categories.
[0063] This application obtains the page image of the test failure page and the application type of the second terminal. The test failure page is the page generated after the second terminal tests the module functions of the processing module in the second terminal. The processing module is a module for processing virtual resource data. Then, based on the application type of the second terminal, extract the target image from the page image according to the page extraction method corresponding to the application type. After identifying the text information in the target image, input the text information into the semantic classification model for semantic recognition, and determine the failure reason category corresponding to the test failure page based on the recognition result. Through the semantic classification model, automatic classification of the failure reasons for the test failure page is achieved, without the need for manual participation, saving human resources.
[0064] In this embodiment, for the page generated after testing the module functions of the local client processing module by internal employees, and for the page generated after testing the module functions of the processing module by non-internal employees using a browser, the present application can adopt different methods for extracting the target image from the page image. Specifically:
[0065] In one embodiment, based on the application type of the second terminal, according to the page extraction method corresponding to the application type, extract the target image from the page image, including: when the application type is a client, perform blurring processing on the page image; convert the blurred page image into a color image; perform denoising processing on the color image, and perform contour detection on the denoised color image to obtain contour information; based on the contour information, extract the target image from the denoised color image.
[0066] Blur the page using the Gaussian processing method, and convert the blurred image into a color image. Since the test failure page has an obvious blue prompt box, converting it into a color image helps to extract the blue prompt box area in the subsequent process;
[0067] Use the image erosion function to erode and remove the boundary noise to refine the image; use the find contour function to detect the contours of all blue areas and return the contour information;
[0068] Based on the contour information, among all the extracted contours, find the largest rectangular contour, and crop the page image to obtain the image corresponding to the largest rectangular contour as the target image.
[0069] It can be seen that the present application can extract the target image from the page image of the test failure page generated by internal employees by operating the client, so as to automatically classify the failure reason categories of the test failure page based on the target image, without the need for manual determination of the failure reason categories, saving human resources, and having better efficiency and higher accuracy in determining the failure reason categories compared to manual determination.
[0070] In one embodiment, the extracting the target image from the page image according to the page extraction method corresponding to the application type based on the application type of the second terminal includes: when the application type is a browser, perform preprocessing on the page image to obtain a processed image; calculate the image blank space ratio of the processed image; determine the central area from the processed image and calculate the central blank space ratio of the central area; when the central blank space ratio is greater than the corresponding threshold and the image blank space ratio is not greater than the corresponding threshold, extract the target image from the processed image.
[0071] Preprocessing includes: watermark removal processing and masking processing. The process of preprocessing the page image specifically includes:
[0072] In the case where the page image has a web watermark, the sum of the red (R), green (G), and blue (B) components of the pixels of the current page image can be calculated. If the sum is greater than a preset threshold, that is, if it is greater than the preset threshold, the three components of the pixel are all set to 255, and the pixel is set to white (255, 255, 255) to remove some noise and obtain a denoised page image. In this embodiment, the preset threshold can be 719.
[0073] Since the system menu bar will affect the recognition pop-up rate, to focus on the central area, masking processing is added to the page image. The ratio range of the length and width is set, and the area is selected from the denoised page image according to this ratio range. The other areas outside this area in the denoised page image are set to black or white to obtain a processed image.
[0074] In this embodiment, the ratio range can be set freely by the user to facilitate dynamic adjustment for different systems.
[0075] Error image categories with a large blank area can be divided into two categories. One category is: the page goes blank due to browser lag, which is category 1; the other category is: errors caused by reasons such as the server or the operating environment of the system under test. The obvious feature of this type of error is that there are large areas of blank in the picture and a small amount of text, which is called category 2. This application distinguishes category 1 and category 2 by calculating the blank rate.
[0076] The first terminal calculates the proportion of the white area in the processed image in the overall image to obtain the image blank rate. The first terminal defines the central area from the processed image according to the preset central area definition method, and calculates the proportion of the white area in the central area in the overall image to obtain the central blank rate of the central area.
[0077] If the central blank rate is greater than the corresponding threshold, it means that the processed image is very likely to be a blank image. To further distinguish category 1 and category 2, it is necessary to judge whether the image blank rate is greater than the corresponding threshold. If the image blank rate is not greater than the corresponding threshold, it is considered category 2, that is, the processed image is a non-blank image, and the target image is extracted from the processed image.
[0078] Among them, extracting the target image from the processed image specifically includes: performing median filtering, binarization, edge detection, contour outlining, contour screening, and rectangle fitting on the processed image in sequence to obtain the target image. Specifically:
[0079] The processed image is enhanced at the edges using median filtering. The filtered image is binarized. For the binarized image, edge detection is performed using an edge detection method, and the contours are outlined using a contour function. Contour screening is also required. Contour screening means discarding linear contours and contours with relatively small areas. Rectangle fitting is also required. Rectangle fitting is used to select the contour with the largest area among the contours, and a rectangle fitting function is used for rectangle fitting.
[0080] It can be seen that the present application can extract a target image from the page image of a test failure page generated by a non-internal employee operating a browser, so as to automatically classify the failure reason category of the test failure page based on the target image, without the need for manual determination of the failure reason category, saving human resources, and having better efficiency and higher accuracy in determining the failure reason category compared with manual determination.
[0081] In one embodiment, after determining the central region from the processed image and calculating the central blank rate of the central region, the method further includes: when the central blank rate is greater than the corresponding threshold and the blank rate of the image is greater than the corresponding threshold, determining that the processed image is a blank image, and the failure reason category of the test failure page is the operating environment problem category.
[0082] When the central blank rate is greater than the corresponding threshold and the blank rate of the image is greater than the corresponding threshold, it is considered to be Category 1, that is, the processed image is a blank image, and the failure reason category of the test failure page is directly set as the operating environment problem category;
[0083] For example, an error message can be directly returned as: Error message: The page is blank; Failure reason category: Operating environment problem category.
[0084] It can be seen that for a blank page, the present application can directly classify it as the operating environment problem category, without the need to classify it through a semantic classification model after extracting the target image, further improving the classification efficiency.
[0085] In one embodiment, determining the failure reason category corresponding to the test failure page based on the recognition result includes: determining the semantic information of the text information included in the recognition result; based on the semantic information, determining the target keywords included in the text information; determining the preset failure reason category corresponding to the target keywords, and using the preset failure reason category as the failure reason category corresponding to the test failure page.
[0086] Correct the text information included in the recognition result. Specifically: Based on the keyword tolerance table, correct the text information. Since the text extracted by OCR technology may have typos, etc., for example, "debt" is recognized as "performance", so the incorrect words can be replaced through the keyword tolerance table.
[0087] Based on the semantic information, the first terminal can determine the target keyword included in the text information, determine the preset failure reason category corresponding to the target keyword based on the correspondence list between the keyword and the preset failure reason category, and then use the preset failure reason category as the failure reason category corresponding to the test failure page.
[0088] In one embodiment, determining the preset failure reason category corresponding to the target keyword includes: when the target keyword is an environment keyword, determining that the preset failure reason category corresponding to the target keyword is the running environment problem category; when the target keyword is a keyword of virtual data name, determining that the preset failure reason category corresponding to the target keyword is the system data problem category; when the target keyword is a biometric keyword, determining that the preset failure reason category corresponding to the target keyword is the tool problem category; when the target keyword is a script keyword, determining that the preset failure reason category corresponding to the target keyword is the script problem category.
[0089] In this embodiment, the environment keyword can be "Sorry, please try again later"; the keyword of virtual data name can be "card number", "account", etc. For example, when the text information is "The card number does not exist", the preset failure reason category is the system data problem category; the biometric keyword can be "fingerprint recognition". For example, when the text information is "Fingerprint recognition failed", the preset failure reason category is the tool problem category; the script keyword can be "subscript". For example, when the text information is "Subscript out of bounds", the preset failure reason category is the script problem category.
[0090] If the target keyword does not belong to the environment keyword, the keyword of virtual data name, the biometric keyword, and the script keyword, the preset failure reason category corresponding to the target keyword is the other problem category. For example, the text information is "The order cancellation data was not found", and the preset failure reason category is the other problem category. In this embodiment, the other problem category refers to the category other than the running environment problem category, the system data problem category, the tool problem category, and the script problem category.
[0091] Professional technical personnel are responsible for troubleshooting running environment problems, business personnel for system data problems, and R & D personnel in charge of tools for tool problems. Similarly, the first terminal can automatically classify the page images of the test failure pages during the whole process, which helps to quickly identify the root cause of the problems and solve them, thus safeguarding the version quality.
[0092] In this embodiment, it is possible to automatically detect the page images of the test failure pages and extract text information, and classify the description of the text information into running environment problem categories, system data problem categories, tool problem categories, and script problem categories through a text classification model. This application is beneficial to discovering problems in the module functions of the discovery processing module and locating different types of personnel for troubleshooting to improve test efficiency and accuracy.
[0093] In one of the embodiments, after determining the preset failure reason category corresponding to the target keyword, the method of this application further includes: generating a test failure report based on the page image of the test failure page, the extracted text information, and the failure reason category corresponding to the test failure page, and the first terminal can display the test failure report to the user.
[0094] Refer to Figure 2 , in the embodiment of this application, the semantic classification model is obtained by training a large amount of data. Specifically, the training process of the semantic classification model includes:
[0095] Step 202: Obtain the page image samples of the test failure pages, the failure reason category labels corresponding to each page image sample, and the application program type of the second terminal;
[0096] Step 204: For each page image sample, based on the application program type of the second terminal, extract the target image sample from the page image sample according to the page extraction method corresponding to the application program type;
[0097] Step 206: Identify the text information in the target image sample, input the text information in the target image sample into the semantic classification model for semantic recognition, and determine the failure reason category corresponding to the page image sample based on the recognition result;
[0098] Step 208: Based on the failure reason category corresponding to each page image sample and the corresponding failure reason category label, adjust the initial classification model, and continue to train based on the initial classification model after parameter adjustment until the stop condition is reached and then stop to obtain the trained semantic classification model.
[0099] In this embodiment, the specific implementation processes of steps 202 to 206 are similar to the specific implementation processes of the above steps 202 to 106, and will not be elaborated here.
[0100] Among them, the failure reason category labels corresponding to each page image sample are manually labeled.
[0101] The first terminal obtains a page image sample from all the page image samples, determines the difference information between the failure reason category corresponding to the page image sample and the corresponding failure reason category label, adjusts the parameters of the initial classification model based on the difference information, and uses the initial classification model with adjusted parameters as the initial classification model for the new round of loop. After deleting the obtained page image sample from all the page image samples, it returns to the step of obtaining a page image sample from all the page image samples, determining the difference information between the failure reason category corresponding to the page image sample and the corresponding failure reason category label, and adjusting the parameters of the initial classification model based on the difference information, and stops until the stop condition is reached. The stop condition can be that the difference between the failure reason category classified by the semantic classification model and the failure reason category labels corresponding to each page image sample is within the preset accuracy range, and a trained semantic classification model is obtained.
[0102] It can be seen that this application can obtain a semantic classification model through training, improve the accuracy of model training, and thus improve the accuracy of failure reason category classification.
[0103] In summary, referring to Figure 3 , the overall solution of this application is as follows:
[0104] For the error reporting picture (i.e., the page picture of the above-mentioned test failure page), if the error reporting picture is generated due to a terminal transaction, then for the error reporting picture of the internal terminal transaction for employees, the test failure category is located. Specifically, as described above: when the application type is a client, based on the application type of the second terminal, in the manner of extracting the target picture from the page picture according to the page extraction method corresponding to the application type, the target picture is extracted;
[0105] If the error reporting picture is generated by a browser transaction, then for the web page type error reporting picture of the browser, the test failure category is located. Specifically, as described above: when the application type is a browser, based on the application type of the second terminal, in the manner of extracting the target picture from the page picture according to the page extraction method corresponding to the application type, the target picture is extracted.
[0106] Description of extraction failure problem: Identify the text information in the target picture, and then perform data fault tolerance and failure reason classification. The failure reason classification is to input the text information after data fault tolerance into the semantic classification model for semantic recognition, and determine the failure reason category corresponding to the test failure page based on the recognition result.
[0107] Data collection can also be performed, that is, obtaining page image samples of test failure pages, and data annotation, that is, after marking the failure reason categories corresponding to each page image sample, based on the collected page image samples of test failure pages and the failure reason category marks corresponding to each page image sample, training and fine-tuning the semantic classification model.
[0108] Finally, based on the page images of test failure pages, the extracted text information, and the failure reason categories corresponding to the test failure pages, a test failure report is generated.
[0109] For example, Example 1: Failure problem description: Sorry, please try again later! Failure reason category: Running environment problem category;
[0110] Example 2: Failure problem description: The card number does not exist; Failure reason category: System data problem category;
[0111] Example 3: Failure problem description: Fingerprint recognition failed; Failure reason category: Tool problem category;
[0112] Example 4: Failure problem description: Subscript out of bounds; Failure reason category: Script problem category;
[0113] Example 5: Failure problem description: Withdrawal data not found; Failure reason category: Other problem category.
[0114] This application can be used in the financial field. The module functions of the processing module can be transfer functions, user information entry functions, virtual currency distribution functions, or user loan approval functions, etc. When different functions fail the test, test failure pages may be generated. Through the solution of this application, the reasons for the test failure of the test failure pages can be classified to determine whether they belong to running environment problems, or system data problems, or tool problems, or script problems.
[0115] This application has the following beneficial effects:
[0116] 1. Full-process automation: Automatically classify the page images of test failure pages to determine the failure reason categories. The entire process is fully automated, greatly saving the labor maintenance time cost. By determining the failure reason categories corresponding to the test failure pages, professionals can quickly conduct problem troubleshooting without multiple transfers.
[0117] 2. Locating the failure reason categories for test failure pages generated by browsers makes the solution of this application more generalizable: No matter which business field or the operating system under test, this method can be used for problem location.
[0118] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are shown in sequence according to the indications of the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this document, the execution of these steps has no strict order limitation, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same moment, but can be executed at different moments. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.
[0119] Based on the same inventive concept, an embodiment of the present application also provides a test result analysis device for implementing the above-mentioned test result analysis method. The solution provided by this device for solving problems is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the test result analysis device provided below can refer to the limitations on the test result analysis method in the above text, and will not be repeated here.
[0120] In an exemplary embodiment, as Figure 4 shown, a test result analysis device 400 is provided, including:
[0121] An acquisition module 401, configured to acquire a page image of a test failure page and the application type of a second terminal; the test failure page is a page generated after the second terminal tests the module function of a processing module in the second terminal, and the processing module is a module for processing virtual resource data;
[0122] An extraction module 402, configured to extract a target image from the page image according to a page extraction method corresponding to the application type based on the application type of the second terminal;
[0123] An identification module 403, configured to identify the text information in the target image, input the text information into a semantic classification model for semantic identification, and determine the failure reason category corresponding to the test failure page based on the identification result.
[0124] In one of the embodiments, the extraction module 402 is specifically configured to:
[0125] When the application type is a client, perform blurring processing on the page image;
[0126] Convert the blurred page image into a color image;
[0127] Denoise the color image and perform contour detection on the denoised color image to obtain contour information;
[0128] Extract the target picture from the denoised color image based on the contour information.
[0129] In one embodiment, the extraction module 402 is specifically configured to:
[0130] Preprocess the page picture when the application type is a browser to obtain a processed picture;
[0131] Calculate the picture blank rate of the processed picture;
[0132] Determine the central area from the processed picture and calculate the central blank rate of the central area;
[0133] Extract the target picture from the processed picture when the central blank rate is greater than the corresponding threshold and the picture blank rate is not greater than the corresponding threshold.
[0134] In one embodiment, the device includes a determination module; after the extraction module 402 determines the central area from the processed picture and calculates the central blank rate of the central area;
[0135] The determination module is specifically configured to determine that the processed picture is a blank picture and the failure reason category of the test failure page is the running environment problem category when the central blank rate is greater than the corresponding threshold and the picture blank rate is greater than the corresponding threshold.
[0136] In one embodiment, the recognition module 403 is specifically configured to:
[0137] Determine the semantic information of the text information included in the recognition result;
[0138] Based on the semantic information, determine the target keywords included in the text information;
[0139] Determine the preset failure reason category corresponding to the target keyword and use the preset failure reason category as the failure reason category corresponding to the test failure page.
[0140] In one embodiment, when the recognition module 403 determines the preset failure reason category corresponding to the target keyword, it is specifically configured to:
[0141] When the target keyword is an environment keyword, determine that the preset failure reason category corresponding to the target keyword is the running environment problem category;
[0142] When the target keyword is a keyword of a virtual data name, determine that the preset failure reason category corresponding to the target keyword is a system data problem category;
[0143] When the target keyword is a biometric keyword, determine that the preset failure reason category corresponding to the target keyword is a tool problem category;
[0144] When the target keyword is a script keyword, determine that the preset failure reason category corresponding to the target keyword is a script problem category.
[0145] In one embodiment, the training process of the semantic classification model includes:
[0146] Obtain a page picture sample of a test failure page, a failure reason category label corresponding to each page picture sample, and the application type of the second terminal;
[0147] For each page picture sample, based on the application type of the second terminal, extract a target picture sample from the page picture sample according to a page extraction method corresponding to the application type; identify the text information in the target picture sample, input the text information in the target picture sample into the semantic classification model for semantic recognition, and determine the failure reason category corresponding to the page picture sample based on the recognition result;
[0148] Based on the failure reason category corresponding to each page picture sample and the corresponding failure reason category label, adjust the parameters of the initial classification model, and continue training based on the initial classification model after parameter adjustment until the stop condition is reached and then stop, to obtain the trained semantic classification model.
[0149] Each module in the above test result analysis device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0150] In an exemplary embodiment, a computer device is provided. The computer device can be a terminal, and its internal structure diagram can be as Figure 5As shown in the figure. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface, the display unit, and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, near field communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a test result analysis method. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the computer device housing, or an external keyboard, touchpad, or mouse, etc.
[0151] Those skilled in the art can understand that Figure 5 the structure shown in the figure is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0152] In an exemplary embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, it implements the steps in the above method embodiments.
[0153] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by the processor, it implements the steps in the above method embodiments.
[0154] In one embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by the processor, it implements the steps in the above method embodiments.
[0155] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant regulations.
[0156] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in this application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in this application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logic devices, data processing logics based on quantum computing, artificial intelligence (AI) processors, etc., without limitation.
[0157] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this application.
[0158] The above-described embodiments merely represent several implementation manners of this application. The description is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of this application. It should be noted that for those of ordinary skill in the art, without departing from the concept of this application, several modifications and improvements can still be made, and these all belong to the protection scope of this application. Therefore, the protection scope of this application shall be subject to the appended claims.
Claims
1. A test result analysis method, characterized in that: The method is applied to a first terminal, and the method includes: Obtaining a page image of a test failure page and an application type of the second terminal; the test failure page is a page generated by the second terminal after testing a module function of a processing module in the second terminal, and the processing module is a module for processing virtual resource data; Based on the application type of the second terminal, extracting the target image from the page image in a page extraction method corresponding to the application type; The text information in the target image is identified, the text information is input into a semantic classification model for semantic recognition, and the failure reason category corresponding to the test failure page is determined based on the recognition result.
2. The method according to claim 1, characterized in that The extracting the target image from the page image based on the application type of the second terminal and in a page extraction mode corresponding to the application type includes: When the application type is a client, blurring the page image; Convert the blurred page image into a color image; Performing denoising on the color image, and performing contour detection on the denoised color image to obtain contour information; Based on the contour information, a target image is extracted from the denoised color image.
3. The method according to claim 1, characterized in that The step of extracting the target image from the page image based on the application type of the second terminal and in accordance with a page extraction method corresponding to the application type includes: When the application type is a browser, preprocessing the page image to obtain a processed image; Calculating the image blank rate of the processed image; Determine a central area from the processed image, and calculate a central blank rate of the central area; When the center blank rate is greater than the corresponding threshold and the picture blank rate is not greater than the corresponding threshold, the target picture is extracted from the processed picture.
4. The method according to claim 3, characterized in that After determining the central area from the processed image and calculating the central blank rate of the central area, the method further includes: When the center blank rate is greater than the corresponding threshold and the picture blank rate is greater than the corresponding threshold, it is determined that the processed picture is a blank picture, and the failure reason category of the test failure page is an operating environment problem category.
5. The method according to any one of claims 1 to 4, characterized in that The determining, based on the recognition result, the failure cause category corresponding to the test failure page includes: Determining semantic information of the text information contained in the recognition result; Based on the semantic information, determining target keywords included in the text information; A preset failure reason category corresponding to the target keyword is determined, and the preset failure reason category is used as the failure reason category corresponding to the test failure page.
6. The method according to claim 5, characterized in that The determining of the preset failure reason category corresponding to the target keyword includes: In the case where the target keyword is an environment keyword, determining that the preset failure cause category corresponding to the target keyword is an operating environment problem category; In the case where the target keyword is a keyword of a virtual data name, determining that the preset failure cause category corresponding to the target keyword is a system data problem category; In the case where the target keyword is a biometric keyword, determining that the preset failure reason category corresponding to the target keyword is a tool problem category; In the case where the target keyword is a script keyword, it is determined that the preset failure reason category corresponding to the target keyword is a script problem category.
7. The method according to claims 1 to 4, characterized in that The training process of the semantic classification model includes: Obtaining page image samples of test failure pages, failure reason category labels corresponding to each page image sample, and an application type of the second terminal; For each page image sample, based on the application type of the second terminal, a target image sample is extracted from the page image sample in a page extraction method corresponding to the application type; text information in the target image sample is identified, the text information in the target image sample is input into a semantic classification model for semantic identification, and a failure reason category corresponding to the page image sample is determined based on the identification result; Based on the failure reason categories and corresponding failure reason category labels corresponding to each page image sample, the parameters of the initial classification model are adjusted, and training is continued based on the initial classification model after parameter adjustment until the stopping condition is reached, thereby obtaining the trained semantic classification model.
8. A test result analysis device, characterized in that: The device comprises: an acquisition module, used to acquire a page image of a test failure page and an application type of the second terminal; the test failure page is a page generated by the second terminal after the module function of the processing module in the second terminal is tested, and the processing module is a module for processing virtual resource data; An extraction module, configured to extract a target image from the page image based on an application type of the second terminal and in a page extraction mode corresponding to the application type; The recognition module is used to recognize the text information in the target image, input the text information into the semantic classification model for semantic recognition, and determine the failure reason category corresponding to the test failure page based on the recognition result.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.