A user demand labeling process management method based on active learning

CN112560410BActive Publication Date: 2026-09-15NANJING UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110045602.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-14
Publication Date
2026-09-15
Estimated Expiration
2041-01-14

AI Technical Summary

Benefits of technology

[0006]This invention is a user requirement annotation process management method based on active learning. It includes feature extraction of user requirements, ranking user requirements according to keyword frequency features and text similarity, and providing the top-ranked user requirements for annotation. Next, a classification model based on a convolutional neural network is trained using the annotated user requirements. Then, the unannotated user requirements are re-ranked based on the model's uncertainty and the differences between unannotated and annotated data. This method can effectively select the model's training set based on domain knowledge of user requirements, reducing the cost of manual annotation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112560410B_ABST
    Figure CN112560410B_ABST
Patent Text Reader

Abstract

The application discloses a user demand labeling process management method based on active learning, which comprises the following steps: user demand feature extraction, including keyword frequency vector extraction, heuristic attribute vector extraction and TF-IDF vector calculation; user demand sorting, including user demand sorting, text preprocessing, text similarity adjustment and clustering result sorting; training a classification model, including embedding vector, processing a user demand text matrix by using a convolutional neural network, user demand feature integration and neural network prediction classification; and user demand re-sorting, including difference calculation, user demand preprocessing, uncertainty calculation and user demand re-sorting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a method for annotating user requirements, specifically a method for managing the user requirement annotation process based on active learning, belonging to the fields of requirements engineering and natural language processing technology. Background Technology

[0002] In recent years, with the continuous growth of software scale, coupled with the diversity of software requirements, the complexity of digital environments, and the influence of factors such as consistency, volatility, and invisibility, software development efficiency and quality still cannot meet the objective needs of the software industry's development. Therefore, software technology is constantly being updated, and the reuse of user requirements has received considerable attention. Requirements engineering is the earliest stage in the software development process; reusing user requirements can save time in requirements analysis and help quickly locate other reusable software assets.

[0003] To better reuse user requirements, informal and unstructured user requirements need to be rewritten into well-structured requirement specifications, and these requirements need to be categorized into different types. Given the large number of user requirements, manually classifying them all is impractical. Extensive research has been conducted on automated requirement classification, especially using natural language processing techniques. With the rapid development of machine learning, supervised learning algorithms have been widely applied and have achieved excellent performance in text classification problems. Building on this, classification algorithms based on machine learning and deep learning have been widely applied to user requirement classification problems, achieving good classification performance. To ensure good performance of these supervised learning-based classification systems, a large number of user requirement instances must be manually labeled and used to train the model. However, manually labeling user requirement types consumes significant manpower and time, and is prone to errors, especially in large software projects. Therefore, to reduce the workload of manual labeling and decrease software development costs, effectively selecting training sets and avoiding wasted labeling costs is essential.

[0004] Active learning is a well-known machine learning algorithm that uses a query strategy to select from unlabeled data instances, thereby reducing labeling costs and overcoming labeling bottlenecks. In this way, supervised learning algorithms can achieve models with high accuracy using as few labeled data instances as possible.

[0005] Among different active learning models, pooling-based active learning is widely used in text classification problems, where the query strategy is mainly based on uncertainty sampling. This active learning model is also widely used in demand classification problems. This algorithm mainly predicts collected but unlabeled user demands based on existing classification models, and selects several demands from all candidate user demands with the lowest model confidence in their type for labeling, based on different strategies, such as the minimum confidence strategy. This effectively improves the model's accuracy and saves the labeling costs required for supervised learning-based models. However, for the automated classification of user demands, existing active learning algorithms have limitations in two aspects: seed selection strategy and query strategy. Regarding seed selection, most existing active learning algorithms randomly select several unlabeled data instances to form the initial seed dataset. For user demand classification problems, due to the large number of types and their imbalanced distribution, this random selection may result in some data instances of lower-proportion types not appearing in the seed dataset. Such a seed dataset may cause subsequent query strategies to completely ignore data instances of missing types, thus significantly reducing the classifier's performance in these missing types and slowing down active learning—a phenomenon known as the missing-class effect. For query strategies, uncertainty-based sampling is an exploratory strategy that selects based on the model's uncertainty about unlabeled data. This can lead the active learner to overconfidently identify data instances belonging to missing types—a phenomenon known as sampling bias. After each software update iteration, a large number of user requests belonging to new types are proposed. Uncertainty-based sampling struggles to select data instances belonging to these "new classes," resulting in poor classifier performance. Even if a well-designed seed selection strategy can construct a seed dataset containing instances of all existing types, a query strategy is still needed to select new user requests after each iteration, especially identifying data instances belonging to these "new classes." Because the distribution of user request types is highly imbalanced, these two problems are exacerbated in active learning algorithms applied to user request classification. Therefore, in this invention, we propose a seed selection strategy based on user request domain knowledge and a query strategy based on differences and uncertainty to optimize the process management of user request type labeling. Summary of the Invention

[0006] This invention is a user requirement annotation process management method based on active learning. It includes feature extraction of user requirements, ranking user requirements according to keyword frequency features and text similarity, and providing the top-ranked user requirements for annotation. Next, a classification model based on a convolutional neural network is trained using the annotated user requirements. Then, the unannotated user requirements are re-ranked based on the model's uncertainty and the differences between unannotated and annotated data. This method can effectively select the model's training set based on domain knowledge of user requirements, reducing the cost of manual annotation.

[0007] A user requirement annotation and management method based on active learning includes: obtaining user requirement descriptions and extracting word-level feature vectors for each requirement description; sorting user requirements by type based on clustering algorithms using the requirement feature vectors and text content; selecting a portion of user requirements, manually annotating them, and training a classification model based on the feature vectors; using the classification model to predict the type of all remaining unannotated data, obtaining the type probability distribution, re-sorting the unannotated requirements, and repeating the previous step until the model performance reaches the expected level.

[0008] The process involves obtaining user requirement descriptions and extracting word-level feature vectors for each description. This includes: providing seven categories of non-project-specific keywords based on existing user requirement classification criteria; selecting project-specific keywords from the user requirement dataset for each software project using word similarity; summarizing these two sets of keywords into keywords for each category; counting the number of keywords for each category in each user requirement; and concatenating these seven values ​​into a 1×7 vector as the keyword frequency vector for the requirement text. Eleven questions helpful for classification are defined for each user requirement, and general expressions are provided for each question. Based on the matching between the user requirement text and the general expressions, each requirement is assigned a 1×11 heuristic attribute vector. Finally, TF-IDF feature vectors are calculated for each user requirement.

[0009] The process involves selecting a subset of user needs, manually labeling them, and training a classification model based on feature vectors. This includes: selecting a certain amount of user needs based on the ranking results and manually labeling their types; using the Word2Vec method to represent all words appearing in the need text as vectors, i.e., each need text is represented by a len×emb matrix, where len is the number of words in the need text and emb is the Word2Vec embedding dimension, resulting in a matrix for each need; training the classification model using a convolutional neural network, including convolution operations on the matrix using multiple convolution kernels to obtain a smaller matrix, followed by pooling to obtain an even smaller matrix, and finally folding to reduce the matrix to a one-dimensional vector; concatenating the Word2Vec matrix processed by the convolutional neural network with the keyword frequency vector, heuristic attribute vector, and TF-IDF feature vector to obtain the complete feature vector of the user need text; inputting the obtained feature vector into the neural network, processing it through hidden layers, and then using the Softmax function to output the probability vector of the need's category, thereby training the classification model.

[0010] The process involves using a classification model to predict the type of all remaining unlabeled data, obtaining the type probability distribution, re-sorting the unlabeled needs, and repeating the previous step until the model performance reaches the expected level. This includes: calculating the keyword frequency vector, heuristic attribute vector, and TF-IDF feature vector of unclassified user needs; calculating the difference between each unlabeled user need and the labeled user needs based on the first two features; preprocessing the unlabeled user needs to meet the input of the classification model; predicting the unlabeled user needs based on the existing classification model and calculating the uncertainty of the model for each user need, i.e., the difference between the highest and second-highest probabilities of the predicted type represents the uncertainty; sorting all unlabeled user needs based on the difference and uncertainty, and repeating the steps of training the classification model until the performance of the classification model reaches the preset conditions.

[0011] Based on the demand feature vector and text content, a clustering algorithm is applied to sort user demands by type. This includes: using a Gaussian mixture model to cluster unlabeled user demands and recording the clustering probability results; the input to the clustering model is the keyword frequency vector of the user demands; preprocessing all unlabeled user demands, including removing misspelled words and stop words, and calculating the frequency of all words appearing in each cluster; using the word frequencies calculated in the previous step, calculating the text similarity between each user demand and each cluster, adjusting the clustering results based on the text similarity, and repeating this process several times until the clustering results remain unchanged; and finally, sorting all unlabeled user demands according to the following rules: sorting by the number of user demands contained in each cluster from smallest to largest, and sorting by the posterior probability of the clustering of user demands in each cluster and the text similarity. Attached Figure Description

[0012] Figure 1 Flowchart of User Requirement Annotation Process Management Method Based on Active Learning

[0013] Figure 2 Non-project-specific keyword list

[0014] Figure 3 Example image of project-specific keywords

[0015] Figure 4 List of 11 questions corresponding to heuristic attributes

[0016] Figure 5 User demand classification model based on convolutional neural network Detailed Implementation

[0017] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0018] This invention is a user requirement annotation process management method based on active learning. It includes feature extraction of user requirements, ranking user requirements according to keyword frequency features and text similarity, and providing the top-ranked user requirements for annotation. Next, a classification model based on a convolutional neural network is trained using the annotated user requirements. Then, the unannotated user requirements are re-ranked based on the model's uncertainty and the differences between unannotated and annotated data. This method can effectively select the model's training set based on domain knowledge of user requirements, reducing the cost of manual annotation. In summary, this invention mainly includes the following steps:

[0019] Step (1) Extracting user demand features;

[0020] Step (2) Sorting user needs;

[0021] Step (3) Train the classification model;

[0022] Step (4) Reorder user needs;

[0023] The detailed workflow of the above-mentioned user requirement annotation process management method based on active learning is as follows: Figure 1 As shown in the diagram. The steps described above will be explained in detail here.

[0024] 1. To transform user requirements into a computer-understandable form, the requirement text must first be converted into vector form. This involves extracting features from the requirement text that aid in classification and vectorizing these features. This invention primarily utilizes two types of feature vectors: feature vectors closely related to the category and vectorized versions of each word in the requirement text. The first type of feature vector is further divided into keyword frequency vectors and heuristic attribute vectors. The second type of feature vector is a TF-IDF vector. Specific steps include:

[0025] Step (1.1) extracts the keyword frequency vector of user needs. The keywords of user needs consist of two parts: non-project-specific keywords and project-specific keywords. By analyzing the definitions of various types of user needs, this invention defines the following for each type: Figure 2 The provided list shows non-project-specific keywords. Based on this, the present invention selects keywords from the user requirement dataset for each software project using word similarity. Figure 3 The keywords shown are specific to each project. The keyword frequency vector for each user request is a zero-initialized 1×7 vector, where each item represents the number of times that type of keyword appears in the user's request. Iterate through all words in the user's request; if a word belongs to a certain type of keyword, the value corresponding to that type is incremented by 1.

[0026] Step (1.2) extracts the heuristic attribute vector of user requirements. Each requirement text can be divided into different parts, and some parts strongly suggest the potential category to which the requirement belongs. This invention names the different parts of the user requirement as heuristic attributes (HP). Since user requirements may have multiple HPs with different request types, and a single HP may mean more than one request type, the relationship between HP and requirement category is used as a feature of the requirement text. First, the definitions of some concepts related to heuristic attributes are given:

[0027] System Capability: The core functions of the system that the requester hopes to achieve.

[0028] Rationale: The benefits of fulfilling this requirement, or the unexpected or negative consequences that would result from not fulfilling it.

[0029] Related Existing Capabilities: Existing functions or components that are relevant to this requirement.

[0030] Expected or Unexpected Behavior: The behavior that the system should or should not exhibit based on this requirement.

[0031] Context: The conditions under which expected or unexpected behavior should or should not occur.

[0032] Implementation Instructions: These describe how to implement the requested functionality, for example, the steps developers should follow to develop the requested functionality.

[0033] Example: An example used to illustrate anything proposed in the requirements.

[0034] Based on the above concepts, seven heuristic properties are artificially defined, and the problems corresponding to these seven heuristic properties (such as...) Figure 4 (As shown in questions 1-7). The answer to each of these seven questions is either "yes" or "no". Answer the above seven questions according to the requirements text. If the answer is "yes", then this heuristic attribute vector is set to '1'; otherwise, it is set to '0'. In addition to the above seven questions, we have added four more questions (such as...). Figure 4(Questions 8-11). Question 8 concerns the description of system performance in the requirement text: if there is no similar sentence in the requirement, the value of this heuristic attribute is set to '0'; if the first sentence in the requirement text is a sentence describing system performance, the value of this heuristic attribute is set to '1'; otherwise, the value is set to '2'. Question 9 concerns personal pronouns: the value of this heuristic attribute is equal to the number of personal pronouns (e.g., I, you, we, user) in the requirement text, which is equal to the answer to question 9. Question 10 concerns the system and its components: the value of this heuristic attribute is equal to the number of words related to the system or system components (e.g., system name, UI components, etc.) in the requirement text, which is equal to the answer to question 10. Question 11 is a summary question: the value of this heuristic attribute is equal to the number of sentences in the requirement text that do not correspond to any of the previous heuristic attributes, which is equal to the answer to question 11. Concatenate the values ​​of these 11 heuristic attributes to form a 1×11 vector, meaning each requirement corresponds to a 1×11 heuristic attribute vector. In addition to the HP value, we also calculate four other values ​​as features of the requirement: the index of a word or sentence in the requirement text and the number of sentences used as features in the requirement text. These four values ​​complement the heuristic attributes and, together with the previous seven heuristic attribute values, constitute the complete heuristic attributes of the requirement text.

[0035] Step (1.3) Calculate the TF-IDF vector. The TF-IDF value of each word is typically obtained by multiplying two terms: the first term is the normalized word frequency (TF), which is the number of times a word appears in the request text. Normalization is achieved by dividing the number of times the word appears in the request by the total number of words in the request text. The second term is the inverse document frequency (IDF), which measures the importance of a term. This is calculated by dividing the total number of requests by the number of requests containing the word (usually adding 1 to the denominator to avoid a denominator of 0), and then taking the logarithm to base 10 of the quotient. Therefore, the formula for calculating the TF-IDF value of a word w in request r is:

[0036] TF-IDF = TF(w, r) × IDF(w)

[0037] in,

[0038] TF(w, r) = Number of times w appears in r / Total number of words in r

[0039] IDF(w) = log e (Total demand / Number of demands including w)

[0040] In this way, every word appearing in the document has a TF-IDF value in each requirement text, and the TF-IDF vector of each requirement text is a vector formed by concatenating the TF-IDF values ​​of each word in that requirement.

[0041] 2. During the software design phase, a large number of user requirements collected lack type labeling, necessitating prioritization of labeling. To construct a seed dataset encompassing all data instances of all types, unsupervised clustering algorithms are required. This invention uses a Gaussian mixture model to cluster unlabeled user requirements. To achieve better clustering results, keyword vectors are used to represent user requirements. After inputting the keyword frequency vectors into the Gaussian mixture model, clustering results are obtained, and the clusters are ranked according to the number of data instances in each cluster and the posterior probability of the data instances within each cluster. The specific steps are as follows:

[0042] Step (2.1) User Requirement Clustering. Since the keyword frequency vector of user requirements contains 7 items, each of which can be approximated as a Gaussian distribution, the Gaussian mixture model should consist of seven Gaussian single models, corresponding to the seven clusters in the clustering results. Based on the clustering results of the Gaussian mixture model, the UR for each user requirement can be obtained. i The probability vector belonging to one of the seven clusters, i.e., p(UR) i )=(p i1 p i2 , ..., p i7 Ultimately, UR i The clustering results are as follows:

[0043]

[0044] Step (2.2) Text Similarity Adjustment. The goal of the adjustment is to cluster user requests into clusters that contain a large number of user requests of the same type. Since it is necessary to calculate the word frequency of each word in the user request within each cluster, the user request text needs to be preprocessed. The preprocessing steps include: cleaning (removing punctuation and stop words) and standardization.

[0045] (Stemming and Lexical Reduction). Original user requests often contain punctuation marks, which are meaningless in calculating text similarity. Stop words are words that are unnecessary in the sentence, especially articles like "a" and "the," which are meaningless and only increase computational overhead during text similarity adjustment. Stemming and lexical reduction are key components of this process.

[0046] (Immatization) aims to find the original form of a word.

[0047] To globally adjust the distribution of all user needs within each cluster based on text similarity, the adjustment is performed according to the following steps.

[0048] (1) A word frequency table will be built for each cluster, and a word table will be built for each user requirement, i.e., user requirement This is indicated. The text similarity between the text and each cluster is calculated using the following formula:

[0049]

[0050] User requirements and text similarity between clusters are expressed using TS(UR). i cluster j ) indicates that the frequency of each word in the user's request within the cluster is determined by f(w) ik cluster j The term is represented as (). To avoid underflow during word frequency multiplication, the logarithm of the word frequencies is taken. Since user requests vary in length (i.e., the number of words contained in each request), the logarithms of the word frequencies are normalized by dividing the sum of the logarithms by the length of the user request. When calculating the text similarity between a user request and each cluster, it is necessary to remove the request from its respective cluster and update the word frequency table for that cluster.

[0051] (2) Adjust the clustering results based on text similarity, that is, adjust URi to the cluster with the highest text similarity:

[0052]

[0053] (3) For all user requirements in the user requirement dataset, perform step (2) and repeat the adjustment for all user requirements k times. In this invention, a better clustering effect can be obtained when k=5.

[0054] Step (2.3) Sort according to clustering results. The sorting is based on a combination of the posterior probability of the Gaussian mixture model and text similarity. The specific steps are as follows:

[0055] (1) Based on the clustering results adjusted by text similarity, the seven clusters are sorted in ascending order of the user needs contained in each cluster.

[0056] (2) Traverse each cluster in the order of step (1) and select the most representative user needs from this cluster. The representativeness of user needs is obtained by multiplying the posterior probability of the cluster by the text similarity. Before selecting user needs from each cluster, in order to eliminate the influence of the units between the posterior probability and the text similarity, it is necessary to normalize these two data to make them comparable, that is, to unify the two data into the same value space. First, calculate the cluster posterior probability and text similarity between all unlabeled user needs and their respective clusters, and normalize these two features in all user needs. This invention uses linear function normalization (Min-Max Scaling), which performs a linear transformation on the original data to map the result to the range [0, 1], achieving proportional scaling. Finally, delete the selected user needs from the cluster.

[0057] (3) Repeat step (2), skipping if a cluster is empty during this process, until all clusters become empty sets.

[0058] 3. After selecting user needs and completing manual annotation, the classifier can be trained using all user needs with type labels. This invention uses a user need classification model based on a convolutional neural network, the model framework of which is as follows: Figure 5 As shown, the specific sub-steps include:

[0059] Step (3.1) Embedding Vectors. All the requirement texts are segmented (since they are English texts, we directly use spaces for segmentation). The Word2Vec function in the gensim library of Python is used to represent each word as a one-dimensional vector (the length of which is the embedding dimension). In order to facilitate the input of the model and ensure accuracy, the mode of the number of words in the requirement text is calculated. This mode is used as the length of each requirement text. Each requirement text can be represented by a len×emb matrix, where len is the number of words in the requirement text and emb is the embedding dimension of Word2Vec.

[0060] Step (3.2) uses a convolutional neural network to process the Word2Vec matrix of the required text. 128 convolutional kernels of sizes 2, 3, and 4 are used to perform convolution operations on the Word2Vec matrix to obtain a three-dimensional vector; then, pooling with a window size of 3 and a stride of 3 is performed to obtain a smaller matrix; finally, a flattening operation is performed to obtain a one-dimensional vector. The size of the convolutional kernels in the convolutional layer can be seen as a method similar to N-gram, which better utilizes the features of word order. The subsequent pooling and flattening operations reduce the parameters in the model, greatly improving the model's efficiency without affecting classification accuracy.

[0061] Step (3.3) Feature integration of user needs. First, the Word2Vec matrix processed by the convolutional neural network is concatenated with the keyword vector, heuristic attribute vector and TF-IDF vector obtained in steps (1.1), (1.2) and (1.3) to obtain the complete feature vector of the user need text;

[0062] Step (3.4) Neural Network Prediction and Classification. The input to the neural network includes the feature vector extracted by the convolutional neural network and the feature vector based on user demand domain knowledge, i.e., the input vector of the support vector machine classification model: keyword frequency, heuristic attributes, and TF-IDF. These four vectors are concatenated and input into the fully connected layer. The fully connected layer consists of two layers. The first layer fully connects the feature vector with 128 neurons, and the activation function of each neuron is the ReLU function, with a dropout rate of 0.5. The output of this layer is passed to the output layer, which is called the softmax layer. Since there are 7 types of user demands, the softmax layer has 7 neurons, and the activation function of each neuron is the softmax function. The category to which the demand belongs is output using the "softmax" function, where the "softmax" function is a normalization function. Suppose we have an array V, where Vi represents the i-th element in V, then the softmax value of this element is:

[0063]

[0064] In this invention, the requirements will be divided into 7 categories, and the "softmax" function will be used to calculate 7 values. The index corresponding to the largest value among these 7 values ​​is the category to which the requirement belongs.

[0065] 4. After the user describes the case, we also need to preprocess the text entered by the user.

[0066] Step (4.1) Calculate the variance. For any unlabeled user request, extract all keywords. Construct a window of length 3 around the keywords in the user request, defined as a "keyword block". The keyword block will select one word from the left and right sides adjacent to the keyword. If the keyword appears at the beginning or end of the user request, only one word is added next to it, making the window length 2. The query strategy then uses the keyword block to define the variance. For any keyword in the user request, the variance of its corresponding keyword block is:

[0067]

[0068] in

[0069]

[0070] Since KC has different lengths, we need to normalize the length of the keyword blocks. To avoid backflow after multiplying word frequencies, we take the logarithm of the word frequencies. Where f(w) ij ) represents the word w ij The frequency of occurrence of keywords in the labeled user demand dataset. The frequency of keywords is defined as follows:

[0071]

[0072] Combining the above three formulas, we can calculate the difference in each keyword block within a user's needs. The keyword difference in a user's needs is the sum of the differences in all its keyword blocks:

[0073]

[0074] Similar to the definition of keyword vectors for user needs, the difference in heuristic attributes for unannotated user needs is defined as follows:

[0075]

[0076] The query strategy based on keywords and heuristic attributes will combine the two features to measure differences:

[0077] div(UR i =div(kw) i )·div(hp i )

[0078] Similarly, in order to eliminate the influence of dimensions between the two, they need to be normalized to linear functions before calculation.

[0079] Step (4.2) User requirement preprocessing. Preprocess unlabeled user requirements to make them suitable for the input of the classification model.

[0080] Step (4.3) Calculate uncertainty. Based on the existing classification model, predict unlabeled user needs and calculate the uncertainty of the model for each user need. Using the output of the softmax function of the user need classification model, the probabilistic classifier will classify user need r into the type corresponding to the highest posterior probability, i.e.:

[0081]

[0082] Based on the uncertainty sampling strategy, the uncertainty of the classification model for user demand r is defined as:

[0083]

[0084] Step (4.4) reorders user needs. A difference-based query strategy ensures the diversity of user needs in the training set; therefore, it is an exploitative strategy, meaning it searches the sample space as much as possible. A suitable query strategy should strike a balance between exploration and exploitation. Uncertainty sampling effectively addresses the exploration problem; therefore, a difference-based query strategy should be combined with uncertainty sampling to simultaneously address both exploration and exploitation. The combined query strategy assigns a score to each unlabeled user need based on both difference and uncertainty:

[0085] score(UR i )=γ·div(UR i )+(1-Y)·p US

[0086] In the initial phase of the query strategy, the classification model should focus on searching the overall sample space to obtain a coarse decision boundary for the classifier. As the amount of data in the training set increases, the query strategy should shift its focus to obtaining a more precise decision boundary for the classifier. To achieve this, let γ be a parameter that decreases linearly from 1 to 0 as data selection progresses. At the beginning of the selection phase, γ is 1. For each user request selected using the query strategy, γ is reduced by 1 / k. When the annotation cost is exhausted, γ decreases to 0.

[0087] The above description, with reference to the accompanying drawings, details a user requirement annotation process management method based on active learning according to the present invention. The present invention has the following advantages: it proposes a seed selection strategy during the software design phase, which can select all types of user requirements and avoid missing class effects; it extends uncertain sampling by utilizing domain knowledge of user requirements, enabling the acquisition of a classification model with higher accuracy at a lower annotation cost.

[0088] It should be clarified that the present invention is not limited to the specific configurations and processes described above and shown in the figures. Furthermore, for the sake of brevity, detailed descriptions of known methods and techniques are omitted here. The present embodiments are to be considered exemplary rather than limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description, and all modifications falling within the meaning and scope of the claims and their equivalents are thus included within the scope of the invention.

Claims

1. A user requirement annotation management method based on active learning, characterized in that, include: Obtain user requirement descriptions and extract word-level feature vectors for each requirement description; Based on the demand feature vector and text content, a clustering algorithm is applied to sort user demands according to type; A subset of user needs is selected, manually labeled, and a classification model is trained based on the feature vectors. Use a classification model to predict the type of all remaining unlabeled data, obtain the type probability distribution, sort the unlabeled data again, and repeat the previous step until the model performance reaches the expected level. This includes obtaining user demand descriptions and extracting word-level feature vectors for each demand description, including: Based on the existing user demand classification criteria, seven categories of non-project-specific keywords are given. Then, project-specific keywords are selected from the user demand dataset of each software project using word similarity. These two parts of keywords are summarized into keywords for each category. The number of keywords in each category is counted in each user demand. These seven values ​​are concatenated into a 1×7 vector as the keyword frequency vector of the demand text. Eleven questions that are helpful for classification are defined based on user needs, and a general expression for each question is given. Based on the matching of user need text with the general expression, each need is mapped to a 1×11 heuristic attribute vector. Calculate TF-IDF feature vectors based on user requirements; Among these, a subset of user needs were selected, manually labeled, and a classification model was trained based on the feature vectors, including: Based on the sorting results, a certain amount of user needs are selected, and their types are manually labeled. Using the Word2Vec method, all words appearing in the requirement text are represented as vectors. That is, each requirement text is represented by a len×emb matrix, where len is the number of words in the requirement text and emb is the embedding dimension of Word2Vec. Finally, each requirement is represented as a matrix. The classification model is trained using a convolutional neural network, which involves performing convolution operations on the matrix using multiple convolutional kernels to obtain a smaller matrix, then performing pooling operations on the matrix to obtain an even smaller matrix, and finally performing a folding operation to reduce the dimension of the matrix to a one-dimensional vector. The Word2Vec matrix processed by the convolutional neural network is concatenated with the keyword frequency vector, heuristic attribute vector and TF-IDF feature vector to obtain the complete feature vector of the user's request text. The obtained feature vector is input into the neural network. After processing by the hidden layer, the probability vector of the required category is output using the Softmax function, thereby training the classification model. The process involves using a classification model to predict the type of all remaining unlabeled data, obtaining the type probability distribution, re-sorting the unlabeled data, and repeating the previous step until the model performance reaches the expected level. Calculate the keyword frequency vector, heuristic attribute vector, and TF-IDF feature vector of unclassified user needs, and calculate the difference between each unlabeled user need and labeled user needs based on the first two features; Preprocess unlabeled user requirements to make them suitable for the input of the classification model; Based on the existing classification model, predict the unlabeled user needs and calculate the uncertainty of the model for each user need, that is, the difference between the highest probability and the second highest probability of the predicted type represents the uncertainty. Based on differences and uncertainties, all unlabeled user needs are sorted, and the steps of training the classification model are repeated until the performance of the classification model reaches the preset conditions.

2. The method according to claim 1, characterized in that, Based on demand feature vectors and text content, a clustering algorithm is applied to sort user demands by type, including: The Gaussian mixture model is used to cluster unlabeled user needs, and the probability results of the clustering are recorded. The input of the clustering model is the keyword frequency vector of user needs. All unlabeled user requests are preprocessed, including removing misspelled words and stop words, and counting the frequency of all words appearing in each cluster in the cluster results. Using the word frequency statistics from the previous step, calculate the text similarity between each user request and each cluster, adjust the clustering results based on the text similarity, and repeat this process several times until the clustering results remain unchanged. Based on the final clustering results, all unlabeled user requirements are sorted according to the following rules: sorted from smallest to largest according to the user requirements contained in each cluster, and sorted according to the cluster posterior probability of the user requirements in each cluster and the text similarity.

Citation Information

Patent Citations

  • Incremental clustering based news topic mining method and apparatus thereof

    CN105320646A

  • Convolutional neural network based cross-domain semantic information retrieval method

    CN107895000A