Software requirement classification method and system based on user feedback
By using the RoBERTa pre-trained model and the Adapter low-parameter fine-tuning method, the problem of high resource consumption in model training in existing technologies is solved, achieving efficient classification on different applications and datasets, and improving accuracy and efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING NO CODE TECH CO LTD
- Filing Date
- 2023-12-19
- Publication Date
- 2026-04-21
AI Technical Summary
Existing methods require significant time and computational resources for parameter tuning and model selection during model training, and are difficult to adapt to changes in different applications and datasets.
We initialized the model using a RoBERTa pre-trained language model and built a target classification model using the Adapter low-parameter fine-tuning method. We then made adaptive adjustments using user feedback text datasets and the target classification space to reduce the dependence on labeled data and improve the model's generalization ability.
It reduces the computational resource requirements for model training, improves classification accuracy and efficiency, adapts to the needs of different applications and datasets, and reduces the risk of overfitting.
Smart Images

Figure CN121901416A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of natural language processing, machine learning, and software engineering, and in particular to a method and system for classifying software requirements based on user feedback. Background Technology
[0002] Currently, methods for user feedback classification in the field of natural language processing mainly include rule-based methods, machine learning-based methods, and deep learning-based methods. Rule-based methods rely primarily on manually defined rules for classification, which can be limited by the coverage and complexity of these rules. Machine learning-based methods require feature engineering and model selection, demanding a large amount of data. While simple to implement, they lack flexibility and struggle to adapt to different applications and datasets. Deep learning-based methods possess powerful representation capabilities, but require numerous model parameters and lengthy training times. They offer high accuracy, but require extensive labeled data for training and often perform poorly in cross-application, cross-dataset scenarios.
[0003] Based on the above, the existing technology has the following drawbacks:
[0004] Existing methods train models for specific applications and datasets, making it difficult to adapt to the needs of different scenarios.
[0005] Some methods rely on a large amount of labeled data for training, but in practical applications, labeled data is often difficult to obtain and costly.
[0006] Existing methods require significant time and computational resources for parameter tuning and model selection during model training. Summary of the Invention
[0007] This application provides a software requirement classification method and system based on user feedback, aiming to solve the problem that existing methods require a lot of time and computing resources for parameter tuning and model selection during model training.
[0008] Firstly, a software requirement classification method based on user feedback, the method comprising:
[0009] Receive user feedback text data, preprocess the data, and obtain preprocessed user feedback text;
[0010] The preprocessed user feedback text is input into the RoBERTa model, and the initial model is obtained through pre-training techniques.
[0011] The preprocessed text is input into the initial model, and the classification result is obtained through forward propagation of the model. The classification result includes specific category labels or classification probabilities.
[0012] The classification result is used as the input to the Adapter, and the target classification space is used as the output of the Adapter to construct the Adapter;
[0013] The target classification model was obtained by fine-tuning the low-parameter parameters using the Adapter method.
[0014] Use a target classification model to classify user feedback and output the classification results.
[0015] Optionally, the data preprocessing in the above scheme may include: segmenting the user feedback text into words: using a third-party word segmentation tool to divide the user feedback text into a sequence of words or sub-words;
[0016] Remove stop words: Remove common words that have no real meaning;
[0017] Part-of-speech tagging: Add corresponding part-of-speech tags to each word.
[0018] In the above scheme, optionally, the Adapter is a neural network module used to map the output of the initial model to the target classification space. The Adapter is constructed using fully connected layers or linear transformations. The parameters required to construct the Adapter include: user feedback text dataset, target classification space, user feedback text dataset, and target classification space. The user feedback text dataset is used as the sample data for training the Adapter; the target classification space is used to define the output space of the Adapter; the user feedback text dataset is used as the sample data for training the Adapter; and the target classification space is used to define the output space of the Adapter.
[0019] Optionally, in the above scheme, the step of using the Adapter low-parameter fine-tuning method to adjust and obtain the target classification model includes:
[0020] The training data is input into the initial model to obtain the prediction result. The prediction result is used as the input of the Adapter, and the target classification space is used as the output of the Adapter. The Adapter is fine-tuned, which specifically includes updating the parameters of the Adapter through the backpropagation algorithm and the optimizer. The fine-tuned Adapter is combined with the initial model to obtain the target classification model.
[0021] Optionally, in the above scheme, classifying user feedback using a target classification model and outputting the classification result includes:
[0022] Input user feedback text into the target model and obtain the output of the target model;
[0023] Depending on user needs, the classification results can be output directly, or the output of the target model can be converted into classification probabilities and output.
[0024] Secondly, a software requirements classification system based on user feedback, the system comprising:
[0025] Preprocessing module: used to receive user feedback text data, preprocess the data, and obtain preprocessed user feedback text;
[0026] Training module: Used to input preprocessed user feedback text into the RoBERTa model, and learn the initial model through pre-training techniques;
[0027] The classification module is used to input the preprocessed text into the initial model and obtain the classification result through forward propagation of the model. The classification result includes specific category labels or classification probabilities.
[0028] Builder module: Used to construct the Adapter by taking the classification result as input and the target classification space as output;
[0029] Adjustment module: Used to adjust the target classification model using the Adapter low-parameter fine-tuning method;
[0030] Output module: Used to classify user feedback using the target classification model and output the classification results.
[0031] Optionally, the data preprocessing in the above scheme may include: segmenting the user feedback text into words: using a third-party word segmentation tool to divide the user feedback text into a sequence of words or sub-words;
[0032] Remove stop words: Remove common words that have no real meaning;
[0033] Part-of-speech tagging: Add corresponding part-of-speech tags to each word.
[0034] In the above scheme, optionally, the Adapter is a neural network module used to map the output of the initial model to the target classification space. The Adapter is constructed using fully connected layers or linear transformations. The parameters required to construct the Adapter include: user feedback text dataset, target classification space, user feedback text dataset, and target classification space. The user feedback text dataset is used as the sample data for training the Adapter; the target classification space is used to define the output space of the Adapter; the user feedback text dataset is used as the sample data for training the Adapter; and the target classification space is used to define the output space of the Adapter.
[0035] Optionally, in the above scheme, the step of using the Adapter low-parameter fine-tuning method to adjust and obtain the target classification model includes:
[0036] The training data is input into the initial model to obtain the prediction result. The prediction result is used as the input of the Adapter, and the target classification space is used as the output of the Adapter. The Adapter is fine-tuned, which specifically includes updating the parameters of the Adapter through the backpropagation algorithm and the optimizer. The fine-tuned Adapter is combined with the initial model to obtain the target classification model.
[0037] Optionally, in the above scheme, classifying user feedback using a target classification model and outputting the classification result includes:
[0038] Input user feedback text into the target model and obtain the output of the target model;
[0039] Depending on user needs, the classification results can be output directly, or the output of the target model can be converted into classification probabilities and output.
[0040] Compared with the prior art, this application has at least the following beneficial effects:
[0041] Based on further analysis and research of existing technical problems, this application recognizes that existing methods require significant time and computational resources for parameter tuning and model selection during model training. This application addresses this issue by receiving user feedback text data, preprocessing the data to obtain preprocessed user feedback text, inputting the preprocessed user feedback text into a RoBERTa model, and learning an initial model through pre-training techniques. The preprocessed text is then input into the initial model, and a classification result is obtained through forward propagation, including specific category labels or classification probabilities. This classification result is used as input to an adapter, and the target classification space is used as the adapter's output to construct an adapter. The adapter is then fine-tuned using a low-parameter fine-tuning method to obtain the target classification model. Finally, the target classification model is used to classify the user feedback and output the classification result.
[0042] This application uses a RoBERTa pre-trained language model for initialization, reducing reliance on labeled data and improving the model's generalization ability. Simultaneously, it introduces an Adapter low-parameter fine-tuning method to add downstream task-specific parameters to the pre-trained model, enabling adaptive adjustments for different applications and datasets. By inserting downstream task-specific parameters into each layer of the pre-trained model, the main body of the model is frozen during fine-tuning, training only task-specific parameters, reducing computational overhead during training, and improving classification accuracy and efficiency. Attached Figure Description
[0043] Figure 1 A flowchart illustrating a software requirement classification method based on user feedback provided in one embodiment of this application;
[0044] Figure 2 A schematic diagram illustrating the overall framework and effects of a software requirement classification method based on user feedback provided in one embodiment of this application;
[0045] Figure 3 A schematic diagram illustrating the interaction flow of various modules in a software requirement classification method based on user feedback provided in one embodiment of this application;
[0046] Figure 4 This is a schematic diagram of an implementation page for a software requirement classification method based on user feedback provided in one embodiment of this application. Detailed Implementation
[0047] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0048] In one embodiment, such as Figure 1 As shown, a software requirement classification method based on user feedback is provided, including the following steps:
[0049] Receive user feedback text data, preprocess the data, and obtain preprocessed user feedback text;
[0050] The preprocessed user feedback text is input into the RoBERTa model, and the initial model is obtained through pre-training techniques.
[0051] The preprocessed text is input into the initial model, and the classification result is obtained through forward propagation of the model. The classification result includes specific category labels or classification probabilities.
[0052] The classification result is used as the input to the Adapter, and the target classification space is used as the output of the Adapter to construct the Adapter;
[0053] The target classification model was obtained by fine-tuning the low-parameter parameters using the Adapter method.
[0054] Use a target classification model to classify user feedback and output the classification results.
[0055] In this embodiment, the data preprocessing specifically includes: segmenting the user feedback text into words: using a third-party word segmentation tool to divide the user feedback text into a sequence of words or sub-words;
[0056] Remove stop words: Remove common words that have no real meaning;
[0057] Part-of-speech tagging: Add corresponding part-of-speech tags to each word.
[0058] In this embodiment, the Adapter is a neural network module used to map the output of the initial model to the target classification space. The Adapter is constructed using fully connected layers or linear transformations. The parameters required to construct the Adapter include: user feedback text dataset, target classification space, user feedback text dataset, and target classification space. The user feedback text dataset is used as the sample data for training the Adapter; the target classification space is used to define the output space of the Adapter; the user feedback text dataset is used as the sample data for training the Adapter; and the target classification space is used to define the output space of the Adapter.
[0059] In this embodiment, the adjustment using the Adapter low-parameter fine-tuning method to obtain the target classification model includes:
[0060] The training data is input into the initial model to obtain the prediction result. The prediction result is used as the input of the Adapter, and the target classification space is used as the output of the Adapter. The Adapter is fine-tuned, which specifically includes updating the parameters of the Adapter through the backpropagation algorithm and the optimizer. The fine-tuned Adapter is combined with the initial model to obtain the target classification model.
[0061] In this embodiment, classifying user feedback using a target classification model and outputting the classification result includes:
[0062] Input user feedback text into the target model and obtain the output of the target model;
[0063] Depending on user needs, the classification results can be output directly, or the output of the target model can be converted into classification probabilities and output.
[0064] In one embodiment, such as Figure 2-4 As shown, a cross-application, cross-dataset user feedback classification method based on low-parameter fine-tuning of the adapter is proposed. Its main technical means and measures include the following:
[0065] The initial model was trained using a RoBERTa pre-trained language model on user feedback text. This step endowed the model with powerful text representation capabilities, improving classification accuracy.
[0066] An adapter is built for different applications and datasets. This is a small neural network that maps the output of the initial model to the target classification space. This step allows the model to adaptively adjust for different applications and datasets, enhancing its generalization ability.
[0067] Input a dataset of user feedback text, including requirements, tasks, defects, stories, bugs, etc., targeting a classification space. Output an Adapter. The steps are as follows:
[0068] Preprocessing of user feedback text datasets includes word segmentation, stop word removal, and part-of-speech tagging.
[0069] The initial model is obtained by initializing the pre-processed user feedback text using the RoBERTa pre-trained language model.
[0070] The initial model was used to classify user feedback text, and the classification results were obtained.
[0071] The Adapter is constructed by taking the classification result as input and the target classification space as output.
[0072] The parameters required to build an Adapter include:
[0073] User feedback text dataset: Sample data used to train the Adapter.
[0074] Target classification space: Used to define the output space of the Adapter.
[0075] The specific processing steps for building the Adapter are as follows:
[0076] The user feedback text dataset is preprocessed by word segmentation, stop word removal, and part-of-speech tagging to facilitate subsequent processing.
[0077] The initial model is obtained by initializing the pre-processed user feedback text using the RoBERTa pre-trained language model.
[0078] The initial model was used to classify user feedback text, and the classification results were obtained.
[0079] The Adapter is constructed by taking the classification result as input and the target classification space as output.
[0080] A concrete implementation example uses PyTorch to build the Adapter:
[0081]
[0082]
[0083] A low-parameter fine-tuning method using an adapter is employed to adaptively adjust the settings for different applications and datasets. This step reduces the risk of overfitting and improves classification accuracy and efficiency.
[0084] Input: Initial model Adapter training data
[0085] Output: The fine-tuned model
[0086] Steps: Use the initial model to make predictions on the training data.
[0087] The prediction results are used as input to the Adapter, and the target classification space is used as the Adapter's output to fine-tune the Adapter. The fine-tuned Adapter is then combined with the initial model to obtain the fine-tuned model.
[0088] The parameters required for low-parameter fine-tuning include:
[0089] Initial model: Used to initialize the classifier.
[0090] Adapter: Used to map the output of a classifier to the target classification space.
[0091] Training data: Used to train the Adapter.
[0092] The specific steps for low-parameter fine-tuning are as follows:
[0093] The initial model is used to make predictions on the training data to obtain the prediction results.
[0094] The prediction results are used as input to the Adapter, and the target classification space is used as the output of the Adapter to fine-tune the Adapter.
[0095] The fine-tuned Adapter is combined with the initial model to obtain the fine-tuned model. Below is an example of low-parameter fine-tuning using PyTorch:
[0096]
[0097]
[0098]
[0099] The fine-tuned model is used to classify user feedback, and the classification results are output. This step achieves effective classification of user feedback and improves classification efficiency. This step is presented in the following way:
[0100] Output classification results:
[0101] The user feedback text is input into the fine-tuned model to obtain the model's output.
[0102] The model's output is compared with the target classification space to obtain the classification result.
[0103] Output the classification results.
[0104] Output classification probability:
[0105] The user feedback text is input into the fine-tuned model to obtain the model's output.
[0106] Convert the model's output into classification probabilities.
[0107] Output the classification probability.
[0108] In this embodiment, taking the requirements of government public management software as an example, for instance, in the classification of requirements feedback for government public management software, user feedback text is input into a fine-tuned model to obtain the model's output. The model's output is both a classification result and a classification probability. If the model's output is a classification result, then the classification result is output as: Classification result: Functional requirements; if the model's output is a classification probability, then the classification probability is output as:
[0109] Functional requirement: 0.8
[0110] Performance requirement: 0.1
[0111] Usability requirement: 0.1
[0112] The information content, which is the classification result or classification probability output by the user feedback classification steps, includes the following information:
[0113] The category to which the user feedback text belongs. The similarity between the user feedback text and the category.
[0114] This information helps developers of government public administration software better understand user needs, thereby improving software development quality and user satisfaction.
[0115] This embodiment has significant advantages, effectively improving classification accuracy and reducing costs. To improve classification accuracy, this embodiment uses the Adapter low-parameter fine-tuning method, which can effectively utilize the generalization ability of the pre-trained language model and make adaptive adjustments for different applications and datasets, thereby improving classification accuracy.
[0116] Reduce the risk of overfitting: The low-parameter fine-tuning method for the Adapter only requires fine-tuning the parameters of the Adapter, rather than fine-tuning the entire model, thus reducing the risk of overfitting.
[0117] Improved classification efficiency: The Adapter low-parameter fine-tuning method uses the GPU for acceleration, thus improving classification efficiency.
[0118] Specifically, in government applications, this embodiment can be used in the following scenarios:
[0119] User feedback classification: helps government departments better understand user needs, thereby improving software development quality and user satisfaction.
[0120] Complaint and suggestion handling: Helping government departments handle complaints and suggestions more efficiently, thereby improving the level of government services.
[0121] Public opinion analysis: Helping government departments analyze public opinion more accurately, thereby making more scientific decisions.
[0122] Before using this embodiment, government departments faced the following problems in classifying user feedback, handling complaints and suggestions, and analyzing public opinion:
[0123] Low classification accuracy: Traditional methods have low classification accuracy and are prone to misclassification.
[0124] High labor costs: Manual sorting requires a large amount of labor and is inefficient.
[0125] These problems are effectively solved after using this invention:
[0126] High classification accuracy: This invention improves classification accuracy and reduces the false positive rate. According to experimental results, in user feedback classification tasks across applications and datasets, this invention improves accuracy by 5%-10% compared to traditional methods. For example, on a dataset of user feedback classification from a government department, the classification accuracy of this invention is 95%, while the classification accuracy of traditional methods is 90%.
[0127] Low labor costs: This invention automates classification, reducing labor costs and improving efficiency. It reduces labor costs by 50%-70%. For example, on a dataset of complaints and suggestions processed by a government department, manual classification using traditional methods would require 10 staff members working 8 hours a day at a cost of 100 yuan per hour. Using this invention for automated classification, only 5 staff members are needed, working 4 hours a day at a cost of 80 yuan per hour. Therefore, this invention reduces labor costs by 50%-70%.
[0128] Specifically, this invention manifests in the following ways: User feedback classification: Using this invention, government departments can more accurately identify the types of user needs, thereby better meeting those needs. Complaint and suggestion handling: Using this invention, government departments can handle complaints and suggestions more efficiently, thereby improving user satisfaction. Public opinion analysis: Using this invention, government departments can more accurately analyze public opinion, thereby making more scientific decisions. This invention has broad application prospects in the government sector, effectively improving the work efficiency and service level of government departments.
[0129] In one embodiment, a software requirements classification system based on user feedback is provided, comprising the following program modules:
[0130] Preprocessing module: used to receive user feedback text data, preprocess the data, and obtain preprocessed user feedback text;
[0131] Training module: Used to input preprocessed user feedback text into the RoBERTa model, and learn the initial model through pre-training techniques;
[0132] The classification module is used to input the preprocessed text into the initial model and obtain the classification result through forward propagation of the model. The classification result includes specific category labels or classification probabilities.
[0133] Builder module: Used to construct the Adapter by taking the classification result as input and the target classification space as output;
[0134] Adjustment module: Used to adjust the target classification model using the Adapter low-parameter fine-tuning method;
[0135] Output module: Used to classify user feedback using the target classification model and output the classification results.
[0136] In this embodiment, the data preprocessing specifically includes: segmenting the user feedback text into words: using a third-party word segmentation tool to divide the user feedback text into a sequence of words or sub-words;
[0137] Remove stop words: Remove common words that have no real meaning;
[0138] Part-of-speech tagging: Add corresponding part-of-speech tags to each word.
[0139] In this embodiment, the Adapter is a neural network module used to map the output of the initial model to the target classification space. The Adapter is constructed using fully connected layers or linear transformations. The parameters required to construct the Adapter include: user feedback text dataset, target classification space, user feedback text dataset, and target classification space. The user feedback text dataset is used as the sample data for training the Adapter; the target classification space is used to define the output space of the Adapter; the user feedback text dataset is used as the sample data for training the Adapter; and the target classification space is used to define the output space of the Adapter.
[0140] In this embodiment, the adjustment using the Adapter low-parameter fine-tuning method to obtain the target classification model includes:
[0141] The training data is input into the initial model to obtain the prediction result. The prediction result is used as the input of the Adapter, and the target classification space is used as the output of the Adapter. The Adapter is fine-tuned, which specifically includes updating the parameters of the Adapter through the backpropagation algorithm and the optimizer. The fine-tuned Adapter is combined with the initial model to obtain the target classification model.
[0142] In this embodiment, classifying user feedback using a target classification model and outputting the classification results includes:
[0143] Input user feedback text into the target model and obtain the output of the target model;
[0144] Depending on user needs, the classification results can be output directly, or the output of the target model can be converted into classification probabilities and output.
[0145] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
Claims
1. A software requirement classification method based on user feedback, characterized in that, The method includes: Receive user feedback text data, preprocess the data, and obtain preprocessed user feedback text; The preprocessed user feedback text is input into the RoBERTa model, and the initial model is obtained through pre-training techniques. The preprocessed text is input into the initial model, and the classification result is obtained through forward propagation of the model. The classification result includes specific category labels or classification probabilities. The classification result is used as the input to the Adapter, and the target classification space is used as the output of the Adapter to construct the Adapter; The target classification model was obtained by fine-tuning the low-parameter parameters using the Adapter method. Use a target classification model to classify user feedback and output the classification results.
2. The method according to claim 1, characterized in that, The data preprocessing specifically includes: segmenting the user feedback text into words: using a third-party word segmentation tool to divide the user feedback text into a sequence of words or sub-words; Remove stop words: Remove common words that have no real meaning; Part-of-speech tagging: Add corresponding part-of-speech tags to each word.
3. The method according to claim 1, characterized in that, The Adapter is a neural network module used to map the output of the initial model to the target classification space. The Adapter is constructed using fully connected layers or linear transformations. The parameters required to construct the Adapter include: a user feedback text dataset, a target classification space, and the user feedback text dataset itself. The user feedback text dataset is used as the sample data for training the Adapter; the target classification space is used to define the Adapter's output space.
4. The method according to claim 1, characterized in that, The target classification model is obtained by adjusting the parameters using the Adapter low-parameter fine-tuning method, including: The training data is input into the initial model to obtain the prediction result. The prediction result is used as the input of the Adapter, and the target classification space is used as the output of the Adapter. The Adapter is fine-tuned, which specifically includes updating the parameters of the Adapter through the backpropagation algorithm and the optimizer. The fine-tuned Adapter is combined with the initial model to obtain the target classification model.
5. The method according to claim 1, characterized in that, The process of classifying user feedback using a target classification model and outputting classification results includes: Input user feedback text into the target model and obtain the output of the target model; Depending on user needs, the classification results can be output directly, or the output of the target model can be converted into classification probabilities and output.
6. A software requirement classification system based on user feedback, characterized in that, The system includes: Preprocessing module: used to receive user feedback text data, preprocess the data, and obtain preprocessed user feedback text; Training module: Used to input preprocessed user feedback text into the RoBERTa model, and learn the initial model through pre-training techniques; The classification module is used to input the preprocessed text into the initial model and obtain the classification result through forward propagation of the model. The classification result includes specific category labels or classification probabilities. Module: Used to construct the Adapter by taking the classification result as input and the target classification space as output. Adjustment module: Used to adjust the target classification model using the Adapter low-parameter fine-tuning method; Output module: Used to classify user feedback using the target classification model and output the classification results.
7. The system according to claim 6, characterized in that, The data preprocessing specifically includes: segmenting the user feedback text into words: using a third-party word segmentation tool to divide the user feedback text into a sequence of words or sub-words; Remove stop words: Remove common words that have no real meaning; Part-of-speech tagging: Add corresponding part-of-speech tags to each word.
8. The system according to claim 6, characterized in that, The Adapter is a neural network module used to map the output of the initial model to the target classification space. The Adapter is constructed using fully connected layers or linear transformations. The parameters required to construct the Adapter include: a user feedback text dataset, a target classification space, and the user feedback text dataset itself. The user feedback text dataset is used as the sample data for training the Adapter; the target classification space is used to define the Adapter's output space.
9. The system according to claim 6, characterized in that, The target classification model is obtained by adjusting the parameters using the Adapter low-parameter fine-tuning method, including: The training data is input into the initial model to obtain the prediction result. The prediction result is used as the input of the Adapter, and the target classification space is used as the output of the Adapter. The Adapter is fine-tuned, which specifically includes updating the parameters of the Adapter through the backpropagation algorithm and the optimizer. The fine-tuned Adapter is combined with the initial model to obtain the target classification model.
10. The system according to claim 6, characterized in that, The process of classifying user feedback using a target classification model and outputting classification results includes: Input user feedback text into the target model and obtain the output of the target model; Depending on user needs, the classification results can be output directly, or the output of the target model can be converted into classification probabilities and output.