Page defect feature determination method and device and related equipment
By clustering dynamic behavior sequences to determine page defect characteristics, the problem of low positioning efficiency in the prior art is solved, and more efficient defect feature positioning and automation are achieved.
Patent Information
- Application Number
- CN202411857264.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-03-25
AI Technical Summary
In the prior art, the positioning efficiency of page defect features is low, resulting in slow page development progress.
By obtaining the page set and its corresponding dynamic behavior sequence, data clustering is performed to obtain multiple defect clusters, and target defect characteristics are determined based on these clusters.
It improves the positioning efficiency and automation of target defect characteristics, and reduces the dependence of manual positioning.
Smart Images

Figure CN119690804A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of electronic technology, and in particular, to a method and apparatus for determining page defect characteristics and related equipment. Background Art
[0002] During the development of a page, it is often easy for the page to have defective features. In order to solve the defective features, it is usually necessary to locate the defective features. Only after the defective features are solved can the page development continue, which easily leads to a slow development progress. In related technologies, manual user behavior tracking and playback are often used to locate defective features. It can be seen that the current defect feature location efficiency is low. Summary of the invention
[0003] The embodiments of the present application provide a method, apparatus and related equipment for determining page defect features to solve the problem of low efficiency in locating current defect features.
[0004] To solve the above problems, this application is implemented as follows:
[0005] In a first aspect, an embodiment of the present application provides a method for determining a page defect feature, comprising:
[0006] Acquire a page set, the page set including a plurality of pages, the plurality of pages being related to each other;
[0007] Acquire a dynamic behavior sequence corresponding to the page set, wherein the dynamic behavior sequence includes annotation information of candidate defect features, and the dynamic behavior sequence is used to characterize a trajectory of flow between different pages in the page set;
[0008] Performing data clustering on the candidate defect features in the dynamic behavior sequence to obtain a plurality of defect clusters, wherein the defect cluster includes at least one of the candidate defect features;
[0009] A target defect feature is determined based on the plurality of defect clusters.
[0010] In a second aspect, an embodiment of the present application provides a device for determining a page defect feature, comprising:
[0011] A first acquisition module is used to acquire a page set, wherein the page set includes a plurality of pages, and the plurality of pages are related to each other;
[0012] A second acquisition module is used to acquire a dynamic behavior sequence corresponding to the page set, wherein the dynamic behavior sequence includes annotation information of candidate defect features, and the dynamic behavior sequence is used to characterize a trajectory of flow between different pages in the page set;
[0013] A clustering module, used for performing data clustering on the candidate defect features in the dynamic behavior sequence to obtain a plurality of defect clusters, wherein the defect cluster includes at least one of the candidate defect features;
[0014] The first determination module is used to determine target defect features according to the multiple defect clusters.
[0015] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a memory, a processor, and a program stored in the memory and executable on the processor; the processor is used to read the program in the memory to implement the steps in the method described in the first aspect above.
[0016] In a fourth aspect, an embodiment of the present application further provides a readable storage medium for storing a program, which, when executed by a processor, implements the steps in the method described in the first aspect above.
[0017] In a fifth aspect, an embodiment of the present application further provides a computer program product, comprising computer instructions, which, when executed by a processor, implement the steps in the method described in the first aspect above.
[0018] In an embodiment of the present application, a page set is obtained, the page set includes multiple pages, and the multiple pages are related to each other; a dynamic behavior sequence corresponding to the page set is obtained, the dynamic behavior sequence includes candidate defect features, and the dynamic behavior sequence is used to characterize the trajectory of flow between different pages in the page set; data clustering is performed on the candidate defect features in the dynamic behavior sequence to obtain multiple defect clusters, and the defect cluster includes at least one of the candidate defect features; target defect features are determined based on the multiple defect clusters, so that the target defect features can be automatically determined, thereby improving the degree of automation of the target defect feature determination method and the positioning efficiency of the target defect feature. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0020] Figure 1 This is one of the flow charts of the method for determining page defect characteristics provided in the embodiment of the present application;
[0021] Figure 2 This is the second flow chart of the method for determining page defect characteristics provided in the embodiment of the present application;
[0022] Figure 3It is a schematic diagram showing components provided in an embodiment of the present application;
[0023] Figure 4 is a schematic diagram of the structure of a device for determining page defect characteristics provided in an embodiment of the present application;
[0024] Figure 5 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0025] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0026] The terms "first", "second" etc. in the embodiments of the present application are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. In addition, the terms "include" and "have" and any variation thereof are intended to cover non-exclusive inclusions, for example, the process, method, system, product or equipment comprising a series of steps or units need not be 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. In addition, "and / or" is used in the present application to represent at least one of connected objects, such as A and / or B and / or C, representing the inclusion of separate A, separate B, separate C, and A and B all exist, B and C all exist, A and C all exist, and 7 situations that A, B and C all exist.
[0027] See also Figure 1 , Figure 1 It is a flow chart of the page defect feature determination method provided in an embodiment of the present application.
[0028] like Figure 1 As shown, the page defect feature determination method may include the following steps:
[0029] Step 101: Obtain a page set, where the page set includes multiple pages, and the multiple pages are related to each other.
[0030] Among them, the page set can also be called a page component set, or a page system. When the above-mentioned multiple pages are interrelated, it can be understood that: multiple pages are connected together through navigation, links or logical jumps between pages, forming a complete and dynamic application interface system, and each page carries different functional modules or content displays.
[0031] Step 102: Acquire a dynamic behavior sequence corresponding to the page set, wherein the dynamic behavior sequence includes annotation information of candidate defect features, and the dynamic behavior sequence is used to characterize a trajectory of flow between different pages in the page set.
[0032] Among them, when users browse pages, they can quickly understand the functions of different modules in the page based on previous experience and information such as images, texts, and page structures in the current page. Therefore, according to the needs of users, when jumping between different pages, a behavior track of the flow between different pages can be formed, and the above behavior track can be understood as the above dynamic behavior sequence. The above different pages that flow can be understood as constituting a page set, that is, the dynamic behavior sequence can be used to characterize the track of the flow between different pages in the page set.
[0033] Among them, the dynamic behavior sequence includes annotation information of candidate defect features, which can be understood as: the embodiment of the present application can be applied to an electronic device, and the multiple pages included in the above-mentioned page set can be displayed on the electronic device, and when the above-mentioned annotation information jumps between different pages, the electronic device or the server connected to the electronic device for communication can automatically identify the location where the candidate defect feature exists and mark the candidate defect feature with annotation information.
[0034] The specific content of the annotation information is not limited here. Optionally, the annotation information can be numbers, texts, or pictures.
[0035] It should be noted that the specific method of obtaining the dynamic behavior sequence corresponding to the page set is not limited here. Optionally, the dynamic behavior sequence can be automatically generated by the electronic device.
[0036] As another optional implementation, the acquiring the dynamic behavior sequence corresponding to the page set includes:
[0037] Inputting the page set into the target model and outputting the dynamic behavior sequence;
[0038] The target model is a pre-trained model used to output a dynamic behavior sequence corresponding to a page set.
[0039] The specific type of the target model is not limited here. Optionally, the target model may be a forest model. Alternatively, the target model may also be a forest model with adjusted model parameters, and the specific type of the above model parameters is not limited here.
[0040] In the implementation manner of the present application, the dynamic behavior sequence corresponding to the page set is identified and output through the target model, so that the intelligence level of the dynamic behavior sequence identification method can be improved, and at the same time, the accuracy and efficiency of the dynamic behavior sequence identification result can be improved.
[0041] As an optional implementation manner, each page included in the page set includes multiple components, and before inputting the page set into the target model and outputting the dynamic behavior sequence, the method further includes:
[0042] Obtain a target component from among the multiple components included in each page;
[0043] Constructing a joint feature vector according to Document Object Model (DOM) features, screenshot features and context features corresponding to the target component;
[0044] Training a preset Random Forest (RF) model according to the joint feature vector;
[0045] When the trained random forest model converges, the trained random forest model is determined as the target model.
[0046] Among them, a component can be understood as a display module on a page. Each page can include multiple components, and the specific types of multiple components are not limited here. Optionally, see Figure 3 , the components may include at least one of the following: interactive components, display components, and the interactive components may include at least one of the following: commodity interactive components, specification interactive components, quantity interactive components, and the display components may include at least one of the following: price display components and related information display components, and the related information may include at least one of the following: name, precautions, service life, etc. The target component may refer to at least one component among the multiple components.
[0047] The screenshot feature may be understood as a screenshot feature of a component, and the context feature of a component may be understood as: surrounding color features and / or surrounding texture features of the component, etc.
[0048] It should be noted that the joint feature vector is constructed according to the DOM features, screenshot features and context features corresponding to the target component. Please refer to the following statement: Optionally, the DOM features, screenshot features and context features corresponding to the target component can be directly spliced to generate a joint feature vector; Optionally, the DOM features, screenshot features and context features can be multiplied with the corresponding feature weight coefficients respectively, and then the first product vector obtained by multiplying the DOM features with their feature weight coefficients, the second product vector obtained by multiplying the screenshot features with their feature weight coefficients, and the third product vector obtained by multiplying the context features with their feature weight coefficients are spliced to generate a joint feature vector. The specific construction method of the joint feature vector is not limited here.
[0049] Among them, the convergence of the trained random forest model can be understood as: when a certain page set is input into the trained random forest model, the difference between the output predicted dynamic behavior sequence and the actual dynamic behavior sequence of the above-mentioned page set is less than the preset difference, that is, the trained random forest model can be considered to converge.
[0050] In the implementation manner of the present application, the trained target model can achieve better recognition output effect on dynamic behavior sequences, and the training time for the target model is short and the training cost is low.
[0051] As an optional implementation manner, when the trained random forest model converges, determining the trained random forest model as the target model includes:
[0052] Correcting the feature correlation weight coefficient of the random forest model according to pre-acquired out-of-bag data and the Gini index;
[0053] When the feature correlation weight coefficient meets a preset condition and the trained random forest model converges, the trained random forest model is determined as the target model.
[0054] Among them, the out-of-bag data can be referred to as (Out-of-Bag, OOB) data. The out-of-bag data can be seen later. Figure 2 In the corresponding expression in the illustrated embodiment, the Gini Index may be referred to as the Gini Index or the Gini importance.
[0055] The Gini index can be calculated based on the Gini reduction of each feature in a single tree in the random forest model and the Gini importance of the tree corresponding to the entire model. For details, see the following Figure 2 The corresponding statements in the calculation method of Gini in the illustrated embodiment.
[0056] It should be noted that when correcting the feature correlation weight coefficient of the random forest model according to the Gini index, it can be applied to both the first stage and the second stage in the following text, that is, the feature correlation weight coefficient of the random forest model can be corrected according to the Gini index in both the first stage and the second stage in the following text, or the feature correlation weight coefficient of the random forest model can be corrected according to the Gini index in only one of the first stage and the second stage, and the specific details are not limited here.
[0057] The feature correlation weight coefficient meeting the preset condition can be understood as: the feature correlation weight coefficient is within a preset range, or the feature correlation weight coefficient meets the preset condition and is greater than the first preset coefficient, or the feature correlation weight coefficient meets the preset condition and is less than the second preset coefficient. No specific limitation is made here.
[0058] In the implementation manner of the present application, the accuracy of the dynamic behavior sequence output by the target model finally trained can be further improved.
[0059] The following is an example of a specific embodiment to illustrate the training process of the target model. Figure 2 Steps shown:
[0060] Step 1: Page scanning and encoding;
[0061] Collect the current page information in the page set and perform the first-level page-level encoding (P1, P2, ...), such as Px represents the page numbered x; take a screenshot of the current page to obtain the page image, flatten the DOM tree in the current page, and perform the second-level component-level encoding (Px-c1, Px-c2, ...) on the processed data according to the smallest granularity component rendering tree, such as Page x-component y (Page x-component y, Px-cy) represents page x component y.
[0062] After the component is encoded, it contains two types of features: basic features and structural features. The basic features include the current component element information, such as tag name, element identifier (Identity, ID), class name, attribute value; structural features include parent node components, child node components, sibling node components, etc. See Figure 2 As shown, the total number of components can be n.
[0063] Step 2: Combine the component classification model with the business;
[0064] Extract features from the encoded components and use the differentiated weighted random forest classification method to identify interactive components, display components, or business categories combined with actual scenarios.
[0065] Step 201: Data collection and preprocessing
[0066] Get the data processed in Step 1; collect the DOM tree information containing page components and the corresponding component screenshots; mark the classification of each component to form a labeled data set.
[0067] Step 202: Feature selection and grouping
[0068] 1) Extract DOM features and screenshot features of each component
[0069] 2) Feature fusion and feature grouping
[0070] Context feature extraction: The surrounding color features and surrounding texture features of each component are selected as context features.
[0071] Feature fusion: DOM features, screenshot features, and context features are concatenated into a joint feature vector. That is, the extracted features can form a joint feature vector to represent each component.
[0072] It should be noted that the features in 1) can be divided into two groups. Group A is the full set of DOM features, context features and a screenshot features, and Group B is b screenshot features. The screenshot features of Groups A and B are different from each other. The features of Group B can be used for the subsequent second-stage random forest training.
[0073] Step 203: Build a differentiated multi-stage random forest model
[0074] First, the random forest model is divided into several sub-classifiers, each of which focuses on specific complex data, and then they are merged into a strong classifier.
[0075] The specific steps of the algorithm can be as follows: first, sample t times in the sample set S, and then statistically learn these subsamples, thereby obtaining the hypothesis R i (i.e., sub-classifiers), and these hypotheses are combined together to form R f Finally, R f (i.e., the differentiated multi-stage random forest model) is used to handle specific classification tasks.
[0076] It should be noted that the specific construction steps of the differentiated multi-stage random forest model can be seen in the following two stages:
[0077] Phase 1: Random Forest Model (Preliminary Classification, Construction of Differentiated Features)
[0078] The first-layer random forest model is trained using the joint feature vector containing DOM features, screenshot features, and context features and the corresponding category labels to preliminarily distinguish between interactive components and display components. The feature weights are determined based on the Gini reduction, out-of-bag error rate, and feature correlation.
[0079] Step 1: Calculate the Gini importance of the feature
[0080] 1. Calculation of Gini reduction of a single tree: For each tree in the random forest, when a feature j is used to split a node, calculate the difference in Gini index before and after the split, i.e., the Gini reduction. Assume that the node has a total of N samples, of which the number of samples of category k is N k , then the Gini index before splitting is:
[0081]
[0082] The weighted Gini index of the two child nodes after splitting is:
[0083]
[0084] Among them, N left and N right are the number of samples of the left and right child nodes respectively, and G left and G right are the Gini indices of the corresponding child nodes.
[0085] 2. Gini importance of features in the entire forest: Accumulate the average Gini reduction of each feature j in all the trees in the forest model, and then standardize it to obtain the feature importance I j :
[0086]
[0087] Among them, T is the number of trees, F is the total number of features, and ΔG jt is the average Gini reduction of feature j in the t-th tree.
[0088] The second step: Optimize the feature weights using out-of-bag data (OOB) and the feature correlation matrix
[0089] 1. Construct the feature correlation matrix: Calculate the Pearson correlation coefficient between features based on the dataset for similarity measurement to form a square matrix, where each element of the matrix represents the correlation strength of a pair of features.
[0090] 2. Calculate the OOB error: For each sample, use the data that was not sampled when constructing the tree (i.e., OOB data) to make predictions, and compare the prediction results with the true labels to calculate the error rate.
[0091] 3. Feature selection: After sorting the feature importance obtained in the first step, remove the highly correlated redundant features according to the feature correlation matrix, filter out the features with higher rankings using the OOB error rate to enter the second-layer model, and optimize the feature screening through the OOB error rate and the feature correlation matrix to determine the final feature values.
[0092] The second stage: Construct a differential-weight random forest
[0093] According to the prediction probabilities of the training set samples by the random forest model in the first stage, optimize the features grouped in step 2, and then train two groups of random forests respectively, denoted as group X RF (XRF) and group Y RF (YRF). There are n mutually independent decision trees in each group of RF. The training data is processed in a sampling-with-replacement form, and for the b screenshot features in YRF, they are also sampled randomly, and N (0.5n < N < n) features are selected for training. In each decision tree, the Gini index (GiniIndex) is used as the entropy for threshold segmentation.
[0094] Custom feature weight assignment method
[0095] 1. Feature Importance Normalization: First, normalize the Gini importance of all features to range between 0 and 1. This can be done using min-max normalization:
[0096]
[0097] in, is the weight of feature j after normalization, I j is the original Gini importance, max(I) and min(I) are the minimum and maximum values of all feature importances, respectively.
[0098] 2. Adjust the weights based on OOB performance: In order to consider the contribution of features to the overall generalization ability of the model, an adjustment factor for OOB performance is introduced. OOB To adjust the weight of the feature, the lower the error rate, the better the model generalization, and the weight of the corresponding feature can be considered more reliable. Define an adjustment factor A:
[0099] A=1-E OOB ;
[0100] Then, the normalized importance and the adjustment factor are combined to calculate the final feature weight of the component feature (also called component weight):
[0101]
[0102] In the testing phase, the extracted feature vectors are input into all XRF and YRF random forests to obtain their respective classification results, and the final classification results are obtained by weighted voting. Fine-tune the component classification.
[0103] Step 4: Model evaluation and application
[0104] The test set that was not involved in the training was used to evaluate the overall performance of the multi-stage differentiated weight random forest model, including the accuracy, recall, F1 score, etc. of each category.
[0105] For page components to be classified, first extract their DOM features, screenshot features, and context features, and use the trained multi-stage differentiated weighted random forest model to classify them. Alternatively, classify components based on system business.
[0106] See Figure 3 In the business dimension of the database (Mobile Cloud Database MySQL) ordering page shown, the components can be divided into product interaction components, specification interaction components, quantity interaction components, price display components, etc.
[0107] For the interactive modules, proceed to Step 3; for the display component modules, proceed to Step 4;
[0108] Step 3: Verify the results of the interactive component module;
[0109] For interactive modules where users need to input, click, etc., they are processed according to pre-defined corresponding rules. The setting method of rules is defined in combination with specific business scenarios and methodologies such as boundary value testing. For example, if an input component needs to input a number in the range of [0-100], multiple values are set - 1, 0, 30, 100, 101.
[0110] After identifying the interactive module, use tools such as Selenium and Cypress to trigger the interactive events of the corresponding interactive components. Selenium and Cypress are open source automated testing tools, mainly used for end-to-end testing of Web applications. Here, such tools are used to trigger interactive events.
[0111] Starting from the system level, for each page, a weight mechanism for interactive components is set to ensure that the collection of dynamic behavior sequences can cover all aspects. For example, there are multiple interactive events in the mobile cloud database MySQL ordering page. When the dynamic sequence is collected for the first time, after the interaction A operation is executed. When the dynamic sequence is collected for the second time, other operations are randomly selected, and the priority of interaction A will be reduced.
[0112] After the interaction, check whether the page flow is triggered (determine the page route and whether the page is re-rendered), use the diff algorithm to compare the full component tree, record the Px-cy (x page y component) interaction operation in the component weight library and dynamic behavior sequence table, and determine whether the new page exceeds the current system boundary value (preset value, i.e. Figure 2 If the page does not flow, the subsequent interactive operations are performed according to the weight library.
[0113] Step 4: Display class component module result verification;
[0114] For display component modules, according to some rules defined by the user. General rules such as component display special keyword errors such as null, undefined, etc.; or combined with business related errors. For example, a component displays a result that is not a quantity component, etc. For the detected abnormal (Px-cy) components, defects are recorded (bug1, bug2, ...), such as bug-x means the xth bug.
[0115] Execute the above process until the collection requirement of threshold n is met. Collect n different dynamic behavior trajectories. Some page scenarios have events that must be triggered. For example, in the mobile cloud database MySQL ordering page, after selecting the specification information, order quantity information and other information on the ordering selection page, you must click to confirm the interaction event. In this scenario, the component weight mechanism can be adjusted to achieve the same purpose.
[0116] It should be noted that if Figure 2 As shown, when the electronic device verifies that a certain candidate defect feature does not conform to the rule, the candidate defect feature can be recorded as an abnormal point to obtain a dynamic behavior sequence.
[0117] Step 103 : performing data clustering on the candidate defect features in the dynamic behavior sequence to obtain a plurality of defect clusters, wherein the defect cluster includes at least one of the candidate defect features.
[0118] The position corresponding to the candidate defect feature can be referred to as (bug-x), that is, bug-x can also be referred to as a defect point, and the dynamic behavior sequence can include the annotation information of bug-x. Specifically, the features corresponding to bug-x can be extracted to obtain the candidate defect feature. The candidate defect features in the dynamic behavior sequence can also be understood as all dynamic behavior sequences with the annotation information of the defect point (bug-x).
[0119] The specific method of clustering the candidate defect features in the dynamic behavior sequence is not limited here. Optionally, the unsupervised learning k-means algorithm can be used to cluster the candidate defect features in the dynamic behavior sequence to obtain multiple defect clusters. For example, the defect points corresponding to the y component (cy) in the x page (Px) can be counted as a group, so a total of k groups of defects can be counted.
[0120] In addition, the silhouette coefficient formula can also be used to evaluate the results of the above data clustering, that is, multiple defect clusters, from which defect clusters whose silhouette coefficients are within a preset range can be screened out, and characteristic frequency statistical methods can be used for statistics to screen out target defect features, analyze the reasons for the generation of target defect features, and output technical solution information to avoid the recurrence of target defect features.
[0121] Step 104: Determine target defect features according to the multiple defect clusters.
[0122] It should be noted that the target defect feature may refer to an occasional feature, that is, a feature that appears by chance. Since the occurrence of an occasional feature lacks regularity, its location can usually only be located manually. In the embodiment of the present application, the above steps can significantly improve the efficiency of locating the occasional feature and the accuracy of the location result.
[0123] It should be noted that the specific method of determining the target defect feature based on multiple defect clusters is not limited here. Optionally, the candidate defect features included in the multiple defect clusters can be combined, and the combined feature obtained after the combination is determined as the target defect feature.
[0124] Alternatively, candidate defect features included in each defect cluster may be obtained, and a defect feature set consisting of the candidate defect features included in the plurality of defect clusters obtained above may be determined as a target defect feature.
[0125] As an optional implementation manner, determining target defect features according to the multiple defect clusters includes:
[0126] Calculate the silhouette coefficient of each defect cluster;
[0127] The candidate defect feature included in the defect cluster with the largest silhouette coefficient is determined as the target defect feature.
[0128] In the implementation manner of the present application, the candidate defect features included in the defect cluster with the largest silhouette coefficient are determined as target defect features. In this way, the accuracy of the determination result of the target defect features can be further improved, and at the same time, the diversity of the target defect feature determination methods is increased.
[0129] As an optional implementation manner, after determining the target defect features according to the multiple defect clusters, the method further includes:
[0130] Analyze the causes of the target defect characteristics;
[0131] Output prompt information, where the prompt information is used to indicate cause information of the target defect feature and solution information for preventing the target defect feature from recurring.
[0132] In the implementation mode of the present application, by outputting prompt information, the cause information of the occurrence of the target defect feature and the solution information for avoiding the recurrence of the target defect feature can be analyzed. In this way, when the target defect feature is an occasional defect, the recurrence of the occasional defect can be avoided, thereby improving the security of page use.
[0133] It should be noted that after accurately locating the target defect feature, the cause of the target defect feature can be analyzed and prompt information can be output. This can reduce the consumption of computing resources of the target defect feature and improve the output efficiency of the prompt information of the target defect feature.
[0134] In an embodiment of the present application, through steps 101 to 104, a page set is obtained, wherein the page set includes multiple pages, and the multiple pages are related to each other; a dynamic behavior sequence corresponding to the page set is obtained, wherein the dynamic behavior sequence includes candidate defect features, and the dynamic behavior sequence is used to characterize the trajectory of flow between different pages in the page set; data clustering is performed on the candidate defect features in the dynamic behavior sequence to obtain multiple defect clusters, wherein the defect cluster includes at least one of the candidate defect features; and a target defect feature is determined based on the multiple defect clusters. In this way, the target defect feature can be automatically determined, thereby improving the degree of automation of the target defect feature determination method and the efficiency of locating the target defect feature.
[0135] It should be noted that the following is an example of a specific embodiment to illustrate the difference between the embodiment of the present application and the embodiment in the related art:
[0136] In the related art, the normal ordering process of the mobile cloud database MYSQL is usually: order selection page (select multiple product attribute information) -> order confirmation page -> order success page
[0137] In the embodiment of the present application, the order process of the mobile cloud database MYSQL can be as follows:
[0138] Get n dynamic behavior sequences (interaction A->interaction B->...->interaction E)->bug;
[0139] By counting n dynamic behavior sequences, we found that the high-frequency characteristic events that lead to the bug are interaction A, interaction B, and interaction E. The side effects of these three interactive operations have a high probability of causing the bug to appear, so we can quickly locate the target defect features that may exist in interaction A, interaction B, and interaction E. In this way, the efficiency of determining the target defect features is improved, and the consumption of computing resources in the target defect feature positioning process can be reduced.
[0140] See also Figure 4 , Figure 4 is a structural diagram of a device for determining page defect characteristics provided in an embodiment of the present application, such as Figure 4 As shown, the page defect feature determination device 400 includes:
[0141] A first acquisition module 401 is used to acquire a page set, where the page set includes a plurality of pages, and the plurality of pages are related to each other;
[0142] A second acquisition module 402 is used to acquire a dynamic behavior sequence corresponding to the page set, wherein the dynamic behavior sequence includes annotation information of candidate defect features, and the dynamic behavior sequence is used to characterize the trajectory of the flow between different pages in the page set;
[0143] A clustering module 403 is used to perform data clustering on the candidate defect features in the dynamic behavior sequence to obtain a plurality of defect clusters, wherein the defect cluster includes at least one of the candidate defect features;
[0144] The first determination module 404 is configured to determine target defect features according to the multiple defect clusters.
[0145] As an optional implementation manner, the first determining module 404 includes:
[0146] A calculation submodule, used to calculate the silhouette coefficient of each defect cluster;
[0147] The first determination submodule is used to determine the candidate defect feature included in the defect cluster with the largest silhouette coefficient as the target defect feature.
[0148] As an optional implementation manner, the page defect feature determination device 400 further includes:
[0149] An analysis module, used to analyze the cause of the occurrence of the target defect feature;
[0150] The output module is used to output prompt information, where the prompt information is used to indicate the cause information of the target defect feature and the solution information for avoiding the target defect feature from recurring.
[0151] As an optional implementation manner, the second acquisition module 402 is further configured to:
[0152] Inputting the page set into the target model and outputting the dynamic behavior sequence;
[0153] The target model is a pre-trained model used to output a dynamic behavior sequence corresponding to a page set.
[0154] As an optional implementation manner, each page included in the page set includes multiple components, and the page defect feature determination device 400 further includes:
[0155] A third acquisition module is used to acquire a target component from among the multiple components included in each page;
[0156] A construction module, used to construct a joint feature vector according to the document object model DOM features, screenshot features and context features corresponding to the target component;
[0157] A training module, used for training a preset random forest model according to the joint feature vector;
[0158] The second determination module is used to determine the trained random forest model as the target model when the trained random forest model converges.
[0159] As an optional implementation manner, the second determining module includes:
[0160] A correction submodule, used to correct the feature correlation weight coefficient of the random forest model according to pre-acquired out-of-bag data and Gini index;
[0161] The second determination submodule is used to determine the trained random forest model as the target model when the feature correlation weight coefficient meets a preset condition and the trained random forest model converges.
[0162] The page defect feature determination device 400 can implement the embodiment of the present application Figure 1 The various processes of the method embodiment and the same beneficial effects are achieved, and will not be described again here to avoid repetition.
[0163] The present application also provides an electronic device. Figure 5 , the electronic device may include a processor 501, a memory 502, and a program 5021 stored in the memory 502 and executable on the processor 501. When the program 5021 is executed by the processor 501, Figure 1 Any steps in the corresponding method embodiments and achieving the same beneficial effects will not be repeated here.
[0164] A person skilled in the art can understand that all or part of the steps of implementing the above-mentioned embodiment method can be completed by hardware related to program instructions, and the program can be stored in a readable medium. The present application also provides a readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned Figure 1 Any steps in the corresponding method embodiments can achieve the same technical effect and will not be repeated here to avoid repetition.
[0165] The storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0166] The present application also provides a computer program product, including computer instructions, which can achieve the above-mentioned Figure 1 Any steps in the corresponding method embodiments can achieve the same technical effect and will not be repeated here to avoid repetition.
[0167] The above is a preferred implementation of the embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles described in the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for determining page defect characteristics, characterized in that: include: Acquire a page set, the page set including a plurality of pages, the plurality of pages being related to each other; Acquire a dynamic behavior sequence corresponding to the page set, wherein the dynamic behavior sequence includes annotation information of candidate defect features, and the dynamic behavior sequence is used to characterize a trajectory of flow between different pages in the page set; Performing data clustering on the candidate defect features in the dynamic behavior sequence to obtain a plurality of defect clusters, wherein the defect cluster includes at least one of the candidate defect features; A target defect feature is determined based on the plurality of defect clusters.
2. The method according to claim 1, characterized in that The determining of target defect features according to the plurality of defect clusters comprises: Calculate the silhouette coefficient of each defect cluster; The candidate defect feature included in the defect cluster with the largest silhouette coefficient is determined as the target defect feature.
3. The method according to claim 1, characterized in that After determining the target defect features according to the multiple defect clusters, the method further includes: Analyze the causes of the target defect characteristics; Output prompt information, where the prompt information is used to indicate cause information of the target defect feature and solution information for preventing the target defect feature from recurring.
4. The method according to any one of claims 1 to 3, characterized in that The obtaining of the dynamic behavior sequence corresponding to the page set includes: Inputting the page set into the target model and outputting the dynamic behavior sequence; The target model is a pre-trained model used to output a dynamic behavior sequence corresponding to a page set.
5. The method according to claim 4, characterized in that Each page included in the page set includes a plurality of components. Before inputting the page set into the target model and outputting the dynamic behavior sequence, the method further includes: Obtain a target component from among the multiple components included in each page; Constructing a joint feature vector according to the document object model DOM features, screenshot features and context features corresponding to the target component; Training a preset random forest model according to the joint feature vector; When the trained random forest model converges, the trained random forest model is determined as the target model.
6. The method according to claim 5, characterized in that When the trained random forest model converges, determining the trained random forest model as the target model includes: Correcting the feature correlation weight coefficient of the random forest model according to pre-acquired out-of-bag data and the Gini index; When the feature correlation weight coefficient meets a preset condition and the trained random forest model converges, the trained random forest model is determined as the target model.
7. A device for determining page defect characteristics, characterized in that: include: A first acquisition module is used to acquire a page set, wherein the page set includes a plurality of pages, and the plurality of pages are related to each other; A second acquisition module is used to acquire a dynamic behavior sequence corresponding to the page set, wherein the dynamic behavior sequence includes annotation information of candidate defect features, and the dynamic behavior sequence is used to characterize a trajectory of flow between different pages in the page set; A clustering module, used for performing data clustering on the candidate defect features in the dynamic behavior sequence to obtain a plurality of defect clusters, wherein the defect cluster includes at least one of the candidate defect features; The first determination module is used to determine target defect features according to the multiple defect clusters.
8. An electronic device, comprising: A memory, a processor, and a program stored in the memory and executable on the processor; wherein the processor is used to read the program in the memory to implement the steps in the page defect feature determination method as described in any one of claims 1 to 6.
9. A readable storage medium for storing a program, characterized in that: When the program is executed by a processor, the steps of the page defect feature determination method according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The method comprises computer instructions, which, when executed by a processor, implement the steps in the method for determining page defect characteristics as claimed in any one of claims 1 to 6.