CN111522750B - Method and system for processing function test problem - Google Patents
Method and system for processing function test problem Download PDFInfo
- Publication number
- CN111522750B CN111522750B CN202010341538.4A CN202010341538A CN111522750B CN 111522750 B CN111522750 B CN 111522750B CN 202010341538 A CN202010341538 A CN 202010341538A CN 111522750 B CN111522750 B CN 111522750B
- Authority
- CN
- China
- Prior art keywords
- text
- processed
- sample
- training
- functional test
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000012545 processing Methods 0.000 title claims abstract description 70
- 238000012360 testing method Methods 0.000 title claims abstract description 57
- 238000000034 method Methods 0.000 title claims abstract description 46
- 238000011990 functional testing Methods 0.000 claims abstract description 122
- 239000013598 vector Substances 0.000 claims abstract description 88
- 238000013145 classification model Methods 0.000 claims abstract description 55
- 238000007781 pre-processing Methods 0.000 claims abstract description 27
- 238000012549 training Methods 0.000 claims description 122
- 238000007635 classification algorithm Methods 0.000 claims description 29
- 238000012706 support-vector machine Methods 0.000 claims description 29
- 230000011218 segmentation Effects 0.000 claims description 16
- 238000004422 calculation algorithm Methods 0.000 claims description 11
- 238000002372 labelling Methods 0.000 claims description 10
- 238000010606 normalization Methods 0.000 claims description 8
- 238000006243 chemical reaction Methods 0.000 claims description 7
- 238000010276 construction Methods 0.000 claims description 4
- 238000000605 extraction Methods 0.000 claims description 4
- 238000010586 diagram Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/35—Clustering; Classification
- G06F16/355—Class or cluster creation or modification
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/205—Parsing
- G06F40/216—Parsing using statistical methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/279—Recognition of textual entities
- G06F40/289—Phrasal analysis, e.g. finite state techniques or chunking
Abstract
The invention provides a method and a system for processing a function test problem, wherein the method comprises the following steps: preprocessing a first text to be processed including problem data of a functional test problem to be processed to obtain a second text to be processed; converting the second text to be processed into a feature vector; and inputting the feature vector corresponding to the second text to be processed into a preset classification model to classify the problem, and obtaining problem category information corresponding to the functional test problem to be processed. In the scheme, the problem data of the functional test problem to be processed is classified by utilizing the pre-trained classification model, so that the problem category information corresponding to the functional test problem to be processed is obtained, a developer can locate the problem of the functional test problem to be processed according to the problem category information, a large amount of analysis time is saved, and the efficiency of processing the functional test problem is improved.
Description
Technical Field
The invention relates to the technical field of data processing, in particular to a method and a system for processing a function test problem.
Background
With the development of the internet, various application systems have been developed, and before the application systems are on line, the application systems need to be subjected to functional test and solve the functional test problem occurring during the test.
At present, when an application system is subjected to functional test, a tester determines functional test problems, and then a developer analyzes and solves the functional test problems determined by the tester. However, various functional testing problems usually occur when the application system is tested, so that a developer needs a lot of time to analyze and solve the functional testing problems one by one, and the efficiency of processing the functional testing problems is low.
Disclosure of Invention
In view of the above, embodiments of the present invention provide a method and a system for processing a functional test problem, so as to solve the problems of long processing time and low efficiency existing in the current method for processing the functional test problem.
In order to achieve the above object, the embodiment of the present invention provides the following technical solutions:
the first aspect of the embodiment of the invention discloses a method for processing a function test problem, which comprises the following steps:
preprocessing a first text to be processed including problem data of a functional test problem to be processed to obtain a second text to be processed;
converting the second text to be processed into a feature vector;
inputting the feature vector corresponding to the second text to be processed into a preset classification model for problem classification to obtain problem category information corresponding to the functional test problem to be processed, wherein the classification model is obtained by training a sample data set according to a support vector machine classification algorithm, and the sample data set is composed of problem data of a plurality of historical functional test problems.
Preferably, the preprocessing the first text to be processed including the problem data of the functional test problem to be processed to obtain a second text to be processed includes:
and performing word segmentation on a first text to be processed including the problem data of the functional test problem to be processed, and removing stop word processing on the first text to be processed after the word segmentation to obtain a second text to be processed.
Preferably, the converting the second text to be processed into a feature vector includes:
performing feature processing on the second text to be processed to obtain features corresponding to the second text to be processed;
and carrying out normalization processing and vectorization processing on the features corresponding to the second text to be processed to obtain feature vectors corresponding to the second text to be processed.
Preferably, the process of constructing the sample dataset comprises:
for each historical functional test problem, performing category labeling on a first text sample comprising problem data of the historical functional test problem to obtain a second sample text;
preprocessing the second sample text aiming at each second sample text to obtain a third sample text;
and converting each third sample text into a feature vector, and constructing a sample data set based on the feature vector of each third sample text.
Preferably, the process of training a sample data set according to a support vector machine classification algorithm to obtain the classification model includes:
extracting a seed dataset and a test dataset from the sample dataset;
training the seed data set according to a support vector machine classification algorithm to obtain a training model;
classifying and predicting the feature vector of each third sample text in the test data set by using the training model to obtain a class probability value corresponding to the feature vector of each third sample text;
if the training model is determined to not meet the preset model training requirement according to the class probability value corresponding to the feature vector of each third sample text, adding the feature vector of the third sample text with the class probability value lower than the probability threshold value into the seed data set, and returning to execute the step of training the seed data set according to the support vector machine classification algorithm until the training model meets the model training requirement, and determining the training model meeting the model training requirement as a classification model.
A second aspect of an embodiment of the present invention discloses a system for processing a functional test problem, the system including:
the preprocessing unit is used for preprocessing a first text to be processed comprising problem data of a functional test problem to be processed to obtain a second text to be processed;
the conversion unit is used for converting the second text to be processed into a feature vector;
the processing unit is used for inputting the feature vector corresponding to the second text to be processed into a preset classification model to classify the problem, so as to obtain problem category information corresponding to the functional test problem to be processed, wherein the classification model is obtained by training a sample data set according to a support vector machine classification algorithm, and the sample data set is composed of problem data of a plurality of historical functional test problems.
Preferably, the pretreatment unit is specifically configured to: and performing word segmentation on a first text to be processed including the problem data of the functional test problem to be processed, and removing stop word processing on the first text to be processed after the word segmentation to obtain a second text to be processed.
Preferably, the conversion unit is specifically configured to: and carrying out feature processing on the second text to be processed to obtain features corresponding to the second text to be processed, and carrying out normalization processing and vectorization processing on the features corresponding to the second text to be processed to obtain feature vectors corresponding to the second text to be processed.
Preferably, the processing unit for constructing a sample data set comprises:
the marking module is used for marking the first text sample of the problem data comprising the historical functional test problems according to the category of each historical functional test problem to obtain a second sample text;
the preprocessing module is used for preprocessing the second sample text aiming at each second sample text to obtain a third sample text;
and the construction module is used for converting each third sample text into a feature vector and constructing a sample data set based on the feature vector of each third sample text.
Preferably, the processing unit for training a sample data set according to a support vector machine classification algorithm to obtain the classification model includes:
an extraction module for extracting a seed dataset and a test dataset from the sample dataset;
the training module is used for training the seed data set according to a support vector machine classification algorithm to obtain a training model;
the prediction module is used for carrying out classification prediction on the feature vector of each third sample text in the test data set by utilizing the training model, and obtaining a class probability value corresponding to the feature vector of each third sample text;
and the processing module is used for adding the feature vector of the third sample text with the category probability value lower than a probability threshold value into the seed data set, and returning to execute the training module until the training model meets the preset model training requirement, and determining the training model meeting the model training requirement as a classification model if the training model does not meet the preset model training requirement according to the category probability value corresponding to the feature vector of each third sample text.
Based on the method and the system for processing the function test problem provided by the embodiment of the invention, the method comprises the following steps: preprocessing a first text to be processed including problem data of a functional test problem to be processed to obtain a second text to be processed; converting the second text to be processed into a feature vector; and inputting the feature vector corresponding to the second text to be processed into a preset classification model to classify the problem, and obtaining problem category information corresponding to the functional test problem to be processed. In the scheme, the problem data of the functional test problem to be processed is classified by utilizing the pre-trained classification model, so that the problem category information corresponding to the functional test problem to be processed is obtained, a developer can locate the problem of the functional test problem to be processed according to the problem category information, a large amount of analysis time is saved, and the efficiency of processing the functional test problem is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for processing a functional test problem according to an embodiment of the present invention;
FIG. 2 is a flow chart of constructing a sample dataset provided by an embodiment of the present invention;
FIG. 3 is a flowchart of a classification model construction provided in an embodiment of the present invention;
fig. 4 is a block diagram of a functional test problem processing system according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In this application, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As known from the background art, when the application system is tested for function, the tester determines the function test problem, and then the tester analyzes and solves the function test problem. However, various functional testing problems usually occur when the application system is subjected to functional testing, a developer needs a lot of time to analyze and solve the functional testing problems one by one, and the efficiency of processing the functional testing problems is low.
Therefore, the embodiment of the invention provides a method and a system for processing a functional test problem, which are used for classifying problems of problem data of the functional test problem to be processed by utilizing a pre-trained classification model to obtain problem category information corresponding to the functional test problem to be processed, so that a developer can perform problem positioning on the functional test problem to be processed according to the problem category information, thereby saving a large amount of analysis time and improving the efficiency of processing the functional test problem.
Referring to fig. 1, a flowchart of a method for processing a functional test problem according to an embodiment of the present invention is shown, where the method includes the following steps:
step S101: and preprocessing the first text to be processed including the problem data of the functional test problem to be processed to obtain a second text to be processed.
It can be understood that in the process of testing the application system, problem data of each functional test problem to be processed determined in the test process is obtained. The problem data of each functional test problem to be processed is formed into a first problem to be processed, that is, a first text to be processed includes the problem data (one-to-one correspondence) of the functional test problem to be processed.
In the specific implementation of step S101, for each first text to be processed including the question data of the functional test question to be processed, word segmentation is performed on the first text to be processed, for example, word segmentation is performed on the first text to be processed by a chinese word segmentation tool.
And removing stop words from the first text to be processed after word segmentation, and removing punctuation, numbers, nonsensical words and the like in the first text to be processed after word segmentation to obtain a second text to be processed.
Step S102: and converting the second text to be processed into a feature vector.
In the specific implementation process of step S102, feature processing is performed on the second text to be processed by using a word vector algorithm (such as TF-IDF algorithm), so as to obtain features corresponding to the second text to be processed.
And carrying out normalization processing and vectorization processing on the features corresponding to the second text to be processed to obtain feature vectors corresponding to the second text to be processed. That is, the feature of the second text to be processed is normalized, and the result obtained by the normalization is converted into a vector form, so as to obtain the feature vector corresponding to the second text to be processed.
Step S103: and inputting the feature vector corresponding to the second text to be processed into a preset classification model to classify the problem, and obtaining problem category information corresponding to the functional test problem to be processed.
It should be noted that, the problem data of a plurality of historical functional test problems corresponding to the test application system are collected in advance, and the historical functional test problems are the functional test problems which have been analyzed and solved.
The problem data for each historical functional test problem includes, but is not limited to: the problem sheet number, the task number, the function code, the project name, the product information, the department to which the problem belongs, the problem solving group, the error reason, the modified program name, whether or not the problem is a public problem, the problem analysis information, and the problem solving method.
It is understood that a problem-solving group refers to a product where a problem occurs, such as: the problem of function test occurs in the front-end system of the counter of the bank, namely the domestic (BOCTS-PLT), and the problem solving group is the BOCTS-PLT.
And constructing a sample data set by utilizing the problem data of the plurality of historical functional test problems, and training the sample data set according to a support vector machine classification algorithm to obtain a corresponding classification model.
In the process of constructing the sample data set, the category label (label problem category) needs to be performed on the problem data of each historical functional test problem, and the problem category includes, but is not limited to: demand analysis problems, coding problems, environmental problems, document errors, parameter configuration errors, and the like.
In the specific implementation step S103, the feature vector corresponding to the second text to be processed is input into a preset classification model to perform problem classification, so as to obtain problem category information corresponding to the functional test problem to be processed.
It can be understood that, according to the content of the category labeling for the problem data of each historical functional test problem, the classification model is used to determine the functional test problem to be processed for problem classification, the classification model outputs the problem category information of the functional test problem to be processed, and the problem category of the functional test problem to be processed can be determined according to the problem category information.
It should be noted that, the problem category information output by the classification model may be a category probability value (confidence) of each problem category for the functional test problem to be processed, and the problem category with the largest category probability value is the problem category for the functional test problem to be processed.
Such as: assuming that the problem types are a, b, c and d, the problem type information of the to-be-processed functional test problem output by the classification model is [ a=90%, b=20%, c=10% and d=5% ], that is, the problem type probability value of the to-be-processed functional test problem is 90% for the problem type a, 20% for the problem type b, 10% for the problem type c and 5% for the problem type d.
Similarly, the problem category information output by the classification model may be the maximum category probability value in the category probability values of the to-be-processed functional test problem as each problem category, that is, the problem category corresponding to the maximum category probability value is the problem category of the to-be-processed functional test problem.
Such as: assuming that the problem types are a, b, c and d, wherein the probability that the function test problem to be processed is a problem type is the largest (90%), and the problem type information of the function test problem to be processed output by the classification model is a=90%.
It should be noted that, the specific content of the problem category information about the to-be-processed functional test problem outputted by the classification model is only for illustration, and is not limited herein.
It can be understood that, the feature vector corresponding to the second to-be-processed text corresponding to each to-be-processed functional test problem is input into the classification model, so that the problem category information corresponding to each to-be-processed functional test problem can be obtained. And the developer can determine and position the problem category of each functional test problem to be processed according to the problem category information corresponding to each functional test problem to be processed, so that the time for analyzing the functional test problem to be processed is shortened.
In the embodiment of the invention, the problem data of a plurality of historical functional test problems are collected in advance, a sample data set is constructed, and the sample data set is trained by using a support vector machine classification algorithm to obtain a classification model. After problem data of the functional test problem to be processed are converted into feature vectors, the feature vectors are input into a classification model to classify the problem, so that problem category information corresponding to the functional test problem to be processed is obtained, a developer can locate the problem of the functional test problem to be processed according to the problem category information, a large amount of analysis time is saved, and the efficiency of processing the functional test problem is improved.
Referring to fig. 2, a flowchart of a process for constructing a sample data set according to an embodiment of the present invention is shown, where the process includes the following steps:
step S201: and for each historical functional test problem, performing category labeling on a first text sample comprising problem data of the historical functional test problem to obtain a second sample text.
It will be understood that, according to the content of the question data regarding the history function test questions in step S103 described above, a plurality of pieces of information are included in the question data of each history function test question, and therefore, the question data of each history function test question is formed into one piece of text (first sample text), that is, one first sample text includes the question data of one history function test question (one-to-one correspondence).
It should be noted that, before training the sample data set by using the support vector machine classification algorithm, it is necessary to perform class labeling on the data in the sample data set. Therefore, in the process of implementing step S201 specifically, for the first sample of each historical functional test question, according to the question data of the historical functional test question, the first sample is labeled by category to obtain the second sample text, and the content of the category label can be referred to the content in step S103 in the above embodiment of the present invention, which is not described herein again.
Step S202: and preprocessing the second sample text for each second sample text to obtain a third sample text.
In the specific implementation process of step S202, for each second sample text, the second sample text is segmented, and the second sample text after segmentation is subjected to the processing of removing the stop word, so as to obtain a corresponding third sample text.
Step S203: each third sample text is converted into a feature vector and a sample dataset is constructed based on the feature vector of each third sample text.
In the specific implementation process of step S203, for each third sample text, feature processing (TF-IDF algorithm) is performed on the third sample text by using a word vector algorithm, so as to obtain features corresponding to the third sample text, and normalization processing and vectorization processing are performed on the features of the third sample text, so as to obtain feature vectors corresponding to the third text to be processed.
And combining the feature vectors of each third sample text to construct a sample data set, namely, the sample data set comprises the feature vectors of the third sample text corresponding to each historical functional test problem.
In the embodiment of the invention, category labeling and preprocessing are carried out on the problem data of a plurality of history function test problems collected in advance, the problem data are converted into feature vectors, and a sample data set is constructed based on the feature vectors corresponding to the plurality of history function test problems. Training a sample data set according to a support vector machine classification algorithm to obtain a classification model, and determining problem category information corresponding to the functional test problem to be processed by utilizing the classification model, so that a developer can perform problem positioning on the functional test problem to be processed according to the problem category information, a large amount of analysis time is saved, and the efficiency of processing the functional test problem is improved.
The process of constructing a classification model according to step S103 of fig. 1 in the above embodiment of the present invention, referring to fig. 3, shows a flowchart of constructing a classification model according to an embodiment of the present invention, including the following steps:
step S301: seed data sets and test data sets are extracted from the sample data sets.
In the process of embodying step S301, a seed data set (equivalent to training data) for performing model training is extracted from the sample data set, and a test data set for performing testing is extracted from the sample data set.
It should be noted that, when the seed data set is first (initially) constructed, the size of the seed data set may be set according to actual situations.
Step S302: training the seed data set according to the support vector machine classification algorithm to obtain a training model.
In the specific implementation process of step S302, model training is performed on the seed dataset by using a support vector machine classification algorithm, so as to obtain each parameter of the model, and a corresponding training model can be formed according to each obtained parameter.
Step S303: and carrying out classification prediction on the feature vector of each third sample text in the test data set by using the training model, and obtaining a class probability value corresponding to the feature vector of each third sample text.
In the specific implementation process of step S304, the training model is tested by using the test data set, and the specific manner is as follows: and classifying and predicting the feature vector of each third sample text in the test data set by using the training model to obtain a class probability value (confidence) of the feature vector of each third sample text in the test data set, namely obtaining a class probability value of the historical functional test problem corresponding to the feature vector of each third sample text in the test data set.
Step S304: and determining whether the training model meets the preset model training requirement according to the class probability value corresponding to the feature vector of each third sample text, executing step S306 if the training model meets the preset model training requirement, and executing step S305 if the training model does not meet the preset model training requirement.
It will be appreciated that, for the training model obtained in step S302, corresponding model training requirements are set according to actual requirements, that is, the training model obtained in step S302 needs to meet the model training requirements.
In the specific implementation step S304, the result of testing the training model by using the test data set (the execution result of step S303) is used to determine whether the training model meets the preset model training requirement, and if the training model meets the preset model training requirement, the training model meeting the model training requirement is determined to be the classification model.
If the training model does not meet the preset model training requirement, step S305 is performed.
Step S305: and adding the feature vector of the third sample text with the category probability value lower than the probability threshold value to the seed data set, and returning to the step S302.
In the specific implementation step S305, a probability threshold is preset, the feature vector of the third sample text whose class probability value is lower than the probability threshold in the test data set is added to the seed data set, and the step S302 is executed again, and the training of the seed data set by using the support vector machine classification algorithm is continued until the training model meets the preset model training requirement.
By the mode, the training scale of model training is increased, so that the problem that training data of a few categories is sparse is solved, and the classifier decision space range of a support vector machine classification algorithm is enlarged.
Step S306: and determining a training model meeting the model training requirements as a classification model.
In the embodiment of the invention, a seed data set is trained by using a support vector machine classification algorithm to obtain a training model. And testing the training model by using the test data set, if the training model is determined to not meet the preset model training requirement according to the test result, adding the feature vector of the third sample text with the category probability value lower than the probability threshold value into the seed data set, and returning to the step of training the seed data set until the training model meets the model training requirement, determining the training model meeting the model training requirement as a classification model, and improving the classification accuracy of the classification model.
Corresponding to the method for processing a functional test problem provided in the above embodiment of the present invention, referring to fig. 4, an embodiment of the present invention further provides a structural block diagram of a system for processing a functional test problem, where the processing system includes: a pretreatment unit 401, a conversion unit 402, and a processing unit 403;
the preprocessing unit 401 is configured to preprocess a first text to be processed including problem data of a functional test problem to be processed, to obtain a second text to be processed.
In a specific implementation, the preprocessing unit 401 is specifically configured to: and performing word segmentation on the first text to be processed including the problem data of the functional test problem to be processed, and removing stop word processing on the first text to be processed after the word segmentation to obtain a second text to be processed.
A conversion unit 402, configured to convert the second text to be processed into a feature vector.
In a specific implementation, the conversion unit 402 is specifically configured to: and carrying out feature processing on the second text to be processed to obtain features corresponding to the second text to be processed, and carrying out normalization processing and vectorization processing on the features corresponding to the second text to be processed to obtain feature vectors corresponding to the second text to be processed.
The processing unit 403 is configured to input a feature vector corresponding to the second text to be processed into a preset classification model to perform problem classification, obtain problem category information corresponding to the functional test problem to be processed, where the classification model is obtained by training a sample data set according to a support vector machine classification algorithm, and the sample data set is composed of problem data of a plurality of historical functional test problems.
In the embodiment of the invention, the problem data of a plurality of historical functional test problems are collected in advance, a sample data set is constructed, and the sample data set is trained by using a support vector machine classification algorithm to obtain a classification model. After problem data of the functional test problem to be processed are converted into feature vectors, the feature vectors are input into a classification model to classify the problem, so that problem category information corresponding to the functional test problem to be processed is obtained, a developer can locate the problem of the functional test problem to be processed according to the problem category information, a large amount of analysis time is saved, and the efficiency of processing the functional test problem is improved.
Preferably, in conjunction with the content in fig. 4, the processing unit 403 for constructing a sample data set includes a labeling module, a preprocessing module and a constructing module, and the execution principle of each module is as follows:
the labeling module is used for labeling the first text sample of the problem data comprising the historical functional test problems according to each historical functional test problem in a category mode to obtain a second sample text.
And the preprocessing module is used for preprocessing the second sample text aiming at each second sample text to obtain a third sample text.
And the construction module is used for converting each third sample text into a feature vector and constructing a sample data set based on the feature vector of each third sample text.
In the embodiment of the invention, category labeling and preprocessing are carried out on the problem data of a plurality of history function test problems collected in advance, the problem data are converted into feature vectors, and a sample data set is constructed based on the feature vectors corresponding to the plurality of history function test problems. Training a sample data set according to a support vector machine classification algorithm to obtain a classification model, and determining problem category information corresponding to the functional test problem to be processed by utilizing the classification model, so that a developer can perform problem positioning on the functional test problem to be processed according to the problem category information, a large amount of analysis time is saved, and the efficiency of processing the functional test problem is improved.
Preferably, in connection with fig. 4, the processing unit 403 for training the sample dataset according to the support vector machine classification algorithm to obtain the classification model comprises: the system comprises an extraction module, a training module, a prediction module and a processing module, wherein the execution principle of each module is as follows:
an extraction module for extracting a seed dataset and a test dataset from the sample dataset.
And the training module is used for training the seed data set according to the support vector machine classification algorithm to obtain a training model.
And the prediction module is used for carrying out classification prediction on the feature vector of each third sample text in the test data set by using the training model, and obtaining a class probability value corresponding to the feature vector of each third sample text.
And the processing module is used for adding the feature vector of the third sample text with the class probability value lower than the probability threshold value into the seed data set if the training model does not meet the preset model training requirement, and returning to the execution training module until the training model meets the preset model training requirement, and determining the training model meeting the model training requirement as a classification model.
In the embodiment of the invention, a seed data set is trained by using a support vector machine classification algorithm to obtain a training model. And testing the training model by using the test data set, if the training model is determined to not meet the preset model training requirement according to the test result, adding the feature vector of the third sample text with the category probability value lower than the probability threshold value into the seed data set, and returning to the step of training the seed data set until the training model meets the model training requirement, determining the training model meeting the model training requirement as a classification model, and improving the classification accuracy of the classification model.
In summary, the embodiment of the invention provides a method and a system for processing a functional test problem, wherein the method comprises the following steps: preprocessing a first text to be processed including problem data of a functional test problem to be processed to obtain a second text to be processed; converting the second text to be processed into a feature vector; and inputting the feature vector corresponding to the second text to be processed into a preset classification model to classify the problem, and obtaining problem category information corresponding to the functional test problem to be processed. In the scheme, the problem data of the functional test problem to be processed is classified by utilizing the pre-trained classification model, so that the problem category information corresponding to the functional test problem to be processed is obtained, a developer can locate the problem of the functional test problem to be processed according to the problem category information, a large amount of analysis time is saved, and the efficiency of processing the functional test problem is improved.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for a system or system embodiment, since it is substantially similar to a method embodiment, the description is relatively simple, with reference to the description of the method embodiment being made in part. The systems and system embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (6)
1. A method of handling functional test problems, the method comprising:
preprocessing a first text to be processed including problem data of a functional test problem to be processed to obtain a second text to be processed;
converting the second text to be processed into a feature vector;
inputting the feature vector corresponding to the second text to be processed into a preset classification model for problem classification to obtain problem category information corresponding to the functional test problem to be processed, wherein the classification model is obtained by training a sample data set according to a support vector machine classification algorithm, and the sample data set is composed of problem data of a plurality of historical functional test problems;
the converting the second text to be processed into a feature vector includes:
performing feature processing on the second text to be processed by using a Li Yongci vector algorithm to obtain features corresponding to the second text to be processed, wherein the word vector algorithm is a TF-IDF algorithm;
carrying out normalization processing and vectorization processing on the features corresponding to the second text to be processed to obtain feature vectors corresponding to the second text to be processed;
the process of constructing a sample dataset includes:
for each historical functional test problem, performing category labeling on a first text sample comprising problem data of the historical functional test problem to obtain a second sample text;
preprocessing the second sample text aiming at each second sample text to obtain a third sample text;
and converting each third sample text into a feature vector, and constructing a sample data set based on the feature vector of each third sample text.
2. The method according to claim 1, wherein preprocessing the first text to be processed including the question data of the functional test question to be processed to obtain the second text to be processed includes:
and performing word segmentation on a first text to be processed including the problem data of the functional test problem to be processed, and removing stop word processing on the first text to be processed after the word segmentation to obtain a second text to be processed.
3. The method of claim 1, wherein training the sample dataset according to a support vector machine classification algorithm to obtain the classification model comprises:
extracting a seed dataset and a test dataset from the sample dataset;
training the seed data set according to a support vector machine classification algorithm to obtain a training model;
classifying and predicting the feature vector of each third sample text in the test data set by using the training model to obtain a class probability value corresponding to the feature vector of each third sample text;
if the training model is determined to not meet the preset model training requirement according to the class probability value corresponding to the feature vector of each third sample text, adding the feature vector of the third sample text with the class probability value lower than the probability threshold value into the seed data set, and returning to execute the step of training the seed data set according to the support vector machine classification algorithm until the training model meets the model training requirement, and determining the training model meeting the model training requirement as a classification model.
4. A system for handling functional test problems, the system comprising:
the preprocessing unit is used for preprocessing a first text to be processed comprising problem data of a functional test problem to be processed to obtain a second text to be processed;
the conversion unit is used for converting the second text to be processed into a feature vector;
the processing unit is used for inputting the feature vector corresponding to the second text to be processed into a preset classification model to classify the problem, so as to obtain problem category information corresponding to the functional test problem to be processed, wherein the classification model is obtained by training a sample data set according to a support vector machine classification algorithm, and the sample data set is composed of problem data of a plurality of historical functional test problems;
wherein, the conversion unit is specifically used for: performing feature processing on a second text to be processed by using a word vector algorithm to obtain features corresponding to the second text to be processed, and performing normalization processing and vectorization processing on the features corresponding to the second text to be processed to obtain feature vectors corresponding to the second text to be processed, wherein the word vector algorithm is a TF-IDF algorithm;
the processing unit for constructing a sample dataset comprises:
the marking module is used for marking the first text sample of the problem data comprising the historical functional test problems according to the category of each historical functional test problem to obtain a second sample text;
the preprocessing module is used for preprocessing the second sample text aiming at each second sample text to obtain a third sample text;
and the construction module is used for converting each third sample text into a feature vector and constructing a sample data set based on the feature vector of each third sample text.
5. The system according to claim 4, wherein the preprocessing unit is specifically configured to: and performing word segmentation on a first text to be processed including the problem data of the functional test problem to be processed, and removing stop word processing on the first text to be processed after the word segmentation to obtain a second text to be processed.
6. The system of claim 4, wherein the processing unit for training a sample dataset according to a support vector machine classification algorithm to obtain the classification model comprises:
an extraction module for extracting a seed dataset and a test dataset from the sample dataset;
the training module is used for training the seed data set according to a support vector machine classification algorithm to obtain a training model;
the prediction module is used for carrying out classification prediction on the feature vector of each third sample text in the test data set by utilizing the training model, and obtaining a class probability value corresponding to the feature vector of each third sample text;
and the processing module is used for adding the feature vector of the third sample text with the category probability value lower than a probability threshold value into the seed data set, and returning to execute the training module until the training model meets the preset model training requirement, and determining the training model meeting the model training requirement as a classification model if the training model does not meet the preset model training requirement according to the category probability value corresponding to the feature vector of each third sample text.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010341538.4A CN111522750B (en) | 2020-04-27 | 2020-04-27 | Method and system for processing function test problem |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010341538.4A CN111522750B (en) | 2020-04-27 | 2020-04-27 | Method and system for processing function test problem |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111522750A CN111522750A (en) | 2020-08-11 |
CN111522750B true CN111522750B (en) | 2024-03-22 |
Family
ID=71902885
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010341538.4A Active CN111522750B (en) | 2020-04-27 | 2020-04-27 | Method and system for processing function test problem |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111522750B (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019037197A1 (en) * | 2017-08-25 | 2019-02-28 | 平安科技(深圳)有限公司 | Method and device for training topic classifier, and computer-readable storage medium |
-
2020
- 2020-04-27 CN CN202010341538.4A patent/CN111522750B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019037197A1 (en) * | 2017-08-25 | 2019-02-28 | 平安科技(深圳)有限公司 | Method and device for training topic classifier, and computer-readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN111522750A (en) | 2020-08-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3582150A1 (en) | Method of knowledge transferring, information processing apparatus and storage medium | |
CN109872162B (en) | Wind control classification and identification method and system for processing user complaint information | |
CN107423278B (en) | Evaluation element identification method, device and system | |
CN112036168B (en) | Event main body recognition model optimization method, device, equipment and readable storage medium | |
CN111198948A (en) | Text classification correction method, device and equipment and computer readable storage medium | |
CN112231431B (en) | Abnormal address identification method and device and computer readable storage medium | |
CN112364133A (en) | Post portrait generation method, device, equipment and storage medium | |
CN112070138A (en) | Multi-label mixed classification model construction method, news classification method and system | |
CN110580308A (en) | information auditing method and device, electronic equipment and storage medium | |
CN113778894B (en) | Method, device, equipment and storage medium for constructing test cases | |
CN113742733B (en) | Method and device for extracting trigger words of reading and understanding vulnerability event and identifying vulnerability type | |
CN116361147A (en) | Method for positioning root cause of test case, device, equipment, medium and product thereof | |
CN111190973A (en) | Method, device, equipment and storage medium for classifying statement forms | |
CN112036169B (en) | Event recognition model optimization method, device, equipment and readable storage medium | |
CN112464927B (en) | Information extraction method, device and system | |
CN116402630B (en) | Financial risk prediction method and system based on characterization learning | |
JP2014085948A (en) | Misclassification detection apparatus, method, and program | |
CN111522750B (en) | Method and system for processing function test problem | |
EP4227855A1 (en) | Graph explainable artificial intelligence correlation | |
CN110910905A (en) | Mute point detection method and device, storage medium and electronic equipment | |
CN115169490A (en) | Log classification method, device and equipment and computer readable storage medium | |
CN115618355A (en) | Injection attack result judgment method, device, equipment and storage medium | |
CN115373982A (en) | Test report analysis method, device, equipment and medium based on artificial intelligence | |
CN112035668A (en) | Event subject recognition model optimization method, device and equipment and readable storage medium | |
CN117643036A (en) | Cognitive test script generation based on artificial intelligence |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |