CN112101557A - Demand change prediction method based on CRF-LSTM algorithm - Google Patents

Demand change prediction method based on CRF-LSTM algorithm Download PDF

Info

Publication number
CN112101557A
CN112101557A CN202010828693.9A CN202010828693A CN112101557A CN 112101557 A CN112101557 A CN 112101557A CN 202010828693 A CN202010828693 A CN 202010828693A CN 112101557 A CN112101557 A CN 112101557A
Authority
CN
China
Prior art keywords
user
prediction
target
crf
predicted
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.)
Pending
Application number
CN202010828693.9A
Other languages
Chinese (zh)
Inventor
殷茗
王一博
许卓
田嘉毅
王生泽
任卓力
邓子凡
黄仲臻
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Northwestern Polytechnical University
Original Assignee
Northwestern Polytechnical University
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Northwestern Polytechnical University filed Critical Northwestern Polytechnical University
Priority to CN202010828693.9A priority Critical patent/CN112101557A/en
Publication of CN112101557A publication Critical patent/CN112101557A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/04Inference or reasoning models
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/049Temporal neural networks, e.g. delay elements, oscillating neurons or pulsed inputs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • Molecular Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Health & Medical Sciences (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention relates to a demand change prediction method based on a CRF-LSTM algorithm, which is used for extracting data context information of user demands, observing behavior and background values of users, simulating and capturing states set during system operation, and learning and deducing current and continuously developed targets of system participants.

Description

Demand change prediction method based on CRF-LSTM algorithm
Technical Field
The invention belongs to the technical field of software development, and relates to a demand change prediction method based on a CRF-LSTM algorithm.
Background
The document "A statistical analysis approach to prediction user's changing requirements for Software service evolution, Journal of Systems and Software 132(2017) 147-. The method is used to encode known relationships between observations and construct consistent interpretations, is a mathematical model for constructing target inferences that infer a user's target based on runtime observations of actions and environmental context values. Firstly, in order to accurately infer a predefined user target in a domain knowledge base and detect emerging or special intentions of a user, constructing a linear chain CRF model for coding a known behavior pattern of the user to realize the target as a measurement for abnormal value detection; secondly, observing the operation and related context values of a real user when operating on the system, and generating < o11, > o1n >, < o21, > o2m >,. and deducing the target of the user at each observation time point in a CRF model obtained by a prepared observation sequence; and finally, detecting emerging intentions, wherein the emerging intentions are a situation sequence mode and are not predefined in a domain knowledge base, so that the newly-appeared requirements are formulated based on the detection results of the emerging intentions. However, the method cannot consider long-term context information, more consideration is given to linear weighted combination of local features of the whole sentence, and the neural network fitting nonlinearity cannot be carried out, so that agile development requirement change cannot be predicted more accurately to meet user requirements.
The traditional LSTM model is powerful in sequence modeling, can capture long-distance context information, and has the capability of fitting nonlinearity of a neural network, but for the time t, an output layer is influenced by a hidden layer containing the context information and a current input layer, the output layer and the output layers at other times are independent, if strong dependency exists between the output layers, for example, a general noun is followed by an adjective, which is a constraint, the LSTM cannot model the constraints, and the performance of the LSTM model is limited. The LSTM network processing is equivalent to obtaining a better representation method of input data, the vector finally output by the LSTM unit can be regarded as a representation form of the input data, the CRF-LSTM model is a method for combining the existing linear statistical model with a neural network structure, namely combining the CRF with the output end, solving the problem of extracting sequence characteristics by using the LSTM, and effectively utilizing sentence-level marking information by using the CRF. Under the CRF-LSTM model, the output will not be the independent tags, but the optimal tag sequence.
Disclosure of Invention
Technical problem to be solved
The method aims to solve the problem that only conditional random fields are used for sequentially marking and analyzing data in the agile development demand change prediction process, and long-term context information of collected data is ignored. The method takes the characteristics of high efficiency and accuracy of the agile development demand change into consideration, and provides more accurate prediction for the agile development demand change by adopting a CRF-LSTM (cross-domain similarity-least squares) combined algorithm.
Technical scheme
A demand change prediction method based on a CRF-LSTM algorithm is characterized by comprising the following steps:
step 1: user behavior data collection
Adding a JavaScript event monitor in an area where user behaviors need to be collected, and recording the user behaviors to a local log in a parameter mode on a corresponding label; inserting the record into a database after obtaining a piece of user behavior data; then, taking out the data in the database at regular time and uploading the data to a server at one time in a JSON array form; the server side responds to the user behavior through the @ RequestMapping annotation, outputs the user behavior to a local Log file user operation. xlsx through the Log4j configuration, and newly establishes a Java class LogRecord which is used for adding a user id, the action generation time and a target to the Log file;
step 2: xlsx, classifying data according to user id, embedding a buried point code in a file management system for collecting user operation behavior information, determining a user behavior tag and a user target tag, and making a corresponding tag dictionary;
and step 3: selecting a Keras-based neural network framework to construct a CRF-LSTM demand prediction model;
inputting the data obtained in the step 2 as a CRF-LSTM demand prediction model, and obtaining the prediction model through N rounds of iterative learning; predicting a target corresponding to the user behavior by using the prediction model to obtain a prediction result; the prediction probability and the prediction precision are included; the prediction probability is the probability of the user to perform the operation, and the prediction precision is the prediction accuracy;
and 4, step 4: statistical prediction results for inferring user intent
Statistically calculating the prediction probability and the prediction precision Acc, wherein the calculation formula is shown as formula (1), wherein TP is the number of samples which are actually the target x and are predicted as x, FP is the number of samples which are not actually the target x but are predicted as x, FN is the number of samples which are actually the target x but are not predicted as x, and TN is the number of samples which are not actually the target x but are not predicted as x;
Figure BDA0002637139050000031
the higher the prediction probability is, the more possible the user is to perform the operation, and the higher the prediction precision is, the more accurate the prediction is proved;
the following reference criteria were used for reasoning:
1) if the prediction accuracy of the label is lower than 0.9, the reason is that the key setting of the system interface is unreasonable; since there are problems with key locations, names, or function settings, which do not match the user's habits, the user cannot quickly understand and use the system;
2) if the prediction of a certain label is accurate, but the prediction probability is lower than 0.99, the system function is divided poorly or the key setting is unreasonable; because one button in the system bears the multifunctional requirement or the button is unreasonable in arrangement, the function of the button is misunderstood by a user, and therefore the target requirement of the user cannot be stably predicted by the prediction model;
3) continuous errors occur in a certain operation process, which are caused by unreasonable function-related key settings or incapability of displaying prompt information by a system; the setting of the function keys and the understanding of the user have great problems, or the system cannot display error prompt information, so that the user is difficult to find errors through continuous operation.
And 5: verifying the result of intent reasoning, summarizing the change of user requirements: inviting part of the users to participate in the survey and feedback, confirming the real intentions of the users, from which the new or potential needs of the users can be derived.
The user behavior and the corresponding label in the step 1:
user behavior Corresponding label
Creating a folder createfolder
Downloading files downloadfile
Editing files editfile
Mobile file movefile
Mobile folder movefolder
Opening file folder openfolder
Deleting files removefile
Deleting file folder removefolder
Renaming files renamefile
Renaming folder renamefolder
Changing language switchlanguage
Switching list views switchlistview
Updating files uploadfile
Viewing documents viewfile
In the step 3, N is 30.
Advantageous effects
The demand change prediction method based on the CRF-LSTM algorithm, provided by the invention, is used for extracting data context information of user demands, observing behaviors and background values of users, simulating and capturing states set during system operation, and learning and deducing current and continuously developed targets of system participants.
Drawings
FIG. 1 CRF-LSTM model structure for entity recognition
Detailed Description
The invention will now be further described with reference to the following examples and drawings:
as shown in FIG. 1, under the CRF-LSTM model, the output will not be mutually independent tags, but the optimal tag sequence.
For the input: x ═ X1,x2,…xn) An output probability matrix Pn k for LSTM may be defined where k is the number of output labels. Pi, j refers to the probability that the ith word is marked as the jth tag.
For the tag sequence to be predicted Y ═ Y1,y2,…yn) The following definitions may be given:
Figure BDA0002637139050000051
wherein A is a state transition matrix, Ai,jRepresenting the probability of transitioning from the ith tag to the jth tag.
By finding the maximum s (X, y), the optimal output tag sequence can be obtained. The CRF introduced here is only to model the output label binary group, then to calculate by using dynamic programming, and finally to label according to the obtained optimal path.
A demand change prediction method based on a CRF-LSTM algorithm specifically comprises the following steps:
step 1: user behavior data collection
Adding a JavaScript event monitor in an area where user behaviors need to be collected, and recording the user behaviors to a local log in a parameter mode on a corresponding label; inserting the record into a database after obtaining a piece of user behavior data; then, taking out the data in the database at regular time and uploading the data to a server at one time in a JSON array form; the server side responds to the user behavior through the @ RequestMapping annotation, outputs the user behavior to a local Log file user operation. xlsx through the Log4j configuration, and newly establishes a Java class LogRecord which is used for adding a user id, the action generation time and a target to the Log file;
user behavior and its corresponding tags:
Figure BDA0002637139050000052
Figure BDA0002637139050000061
TABLE 1 user behavior object tags
Step 2: xlsx, classifying data according to user id, embedding a buried point code in a file management system for collecting user operation behavior information, determining a user behavior tag and a user target tag, and making a corresponding tag dictionary;
and step 3: selecting a Keras-based neural network framework to construct a CRF-LSTM demand prediction model;
inputting the data obtained in the step 2 as a CRF-LSTM demand prediction model, and obtaining the prediction model through 30 rounds of iterative learning; predicting a target corresponding to the user behavior by using the prediction model to obtain a prediction result; the prediction probability and the prediction precision are included; the prediction probability is the probability of the user to perform the operation, and the prediction precision is the prediction accuracy;
movement of Self-reporting target Predicting an objective Prediction probability
clickswitchlistview movefile movefile 0.99206614
clickupload movefile movefile 0.99971896
clickviewfile movefile movefile 0.9998857
clickviewimage movefile movefile 0.9996197
Table 2 partial prediction results
The method comprises the following specific steps:
(1) and (4) introducing. Introducing keras, pandas and numpy libraries and modules and models contained therein, including Sequential, Dense, LSTM, InputLayer, Bidirectional, TimeDistributed, Embedding, Activation, GRU, Adam, CRF, as required.
(2) And reading the data. And reading the txt file which is obtained and processed before.
(3) And setting parameters. The embedded layer SIZE EMBED _ SIZE 128, the HIDDEN layer unit number HIDDEN _ SIZE 128, and the sample number batt _ SIZE 2 selected in one training.
(4) A data set is constructed. The data is sliced and a dataset is created.
(5) And constructing a model and training. And (3) constructing a CRF-LSTM neural network model, training the model and storing. The model is divided into an input layer, an embedding layer, a bidirectional RNN packaging layer, a GRU layer, a TimeDistributed packaging layer and a CRF layer. The collected user behavior data is used as a training set to be input, and the model can predict the behavior target on the basis of learning of a large amount of actual data to obtain a behavior target prediction result.
(6) And (5) predicting, setting a training set for predicting, drawing and displaying.
And 4, step 4: statistical prediction results for inferring user intent
Statistically calculating the prediction probability and the prediction precision Acc, wherein the calculation formula is shown as formula (1), wherein TP is the number of samples which are actually the target x and are predicted as x, FP is the number of samples which are not actually the target x but are predicted as x, FN is the number of samples which are actually the target x but are not predicted as x, and TN is the number of samples which are not actually the target x but are not predicted as x;
Figure BDA0002637139050000071
the higher the prediction probability is, the more possible the user is to perform the operation, and the higher the prediction precision is, the more accurate the prediction is proved;
the following reference criteria were used for reasoning:
1) if the prediction accuracy of the label is lower than 0.9, the reason is that the key setting of the system interface is unreasonable; since there are problems with key locations, names, or function settings, which do not match the user's habits, the user cannot quickly understand and use the system;
2) if the prediction of a certain label is accurate, but the prediction probability is lower than 0.99, the system function is divided poorly or the key setting is unreasonable; because one button in the system bears the multifunctional requirement or the button is unreasonable in arrangement, the function of the button is misunderstood by a user, and therefore the target requirement of the user cannot be stably predicted by the prediction model;
3) continuous errors occur in a certain operation process, which are caused by unreasonable function-related key settings or incapability of displaying prompt information by a system; the setting of the function keys and the understanding of the user have great problems, or the system cannot display error prompt information, so that the user is difficult to find errors through continuous operation.
And 5: and verifying the result of the intention reasoning and summarizing the change of the user requirement. Inviting part of the users to participate in the survey and feedback, confirming the real intentions of the users, from which the new or potential needs of the users can be derived.
And taking the change of the user requirement as a new iteration variable to participate in the next iteration development work, and feeding the change back to the developer. According to the requirements of agile software development, reasonable development tasks are formulated to be helped, so that the requirements of users are met better. Inviting project-related principals or industry experts in the field to further analyze the reasonableness of user intent inferences based on their understanding and expertise of the project to determine whether emerging intents, intent changes, or system deficiencies exist. If validation is indeed an emerging intent or system deficiency, it can be used to summarize and analyze changes in user demand, thereby enabling prediction of changes in user demand. In the process of agile software development, the method is applied between two iteration cycles, changes of user requirements are predicted, and the changes are used as new iteration variables to participate in a new round of iteration development work.

Claims (3)

1. A demand change prediction method based on a CRF-LSTM algorithm is characterized by comprising the following steps:
step 1: user behavior data collection
Adding a JavaScript event monitor in an area where user behaviors need to be collected, and recording the user behaviors to a local log in a parameter mode on a corresponding label; inserting the record into a database after obtaining a piece of user behavior data; then, taking out the data in the database at regular time and uploading the data to a server at one time in a JSON array form; the server side responds to the user behavior through the @ RequestMapping annotation, outputs the user behavior to a local Log file user operation. xlsx through the Log4j configuration, and newly establishes a Java class LogRecord which is used for adding a user id, the action generation time and a target to the Log file;
step 2: xlsx, classifying data according to user id, embedding a buried point code in a file management system for collecting user operation behavior information, determining a user behavior tag and a user target tag, and making a corresponding tag dictionary;
and step 3: selecting a Keras-based neural network framework to construct a CRF-LSTM demand prediction model;
inputting the data obtained in the step 2 as a CRF-LSTM demand prediction model, and obtaining the prediction model through N rounds of iterative learning; predicting a target corresponding to the user behavior by using the prediction model to obtain a prediction result; the prediction probability and the prediction precision are included; the prediction probability is the probability of the user to perform the operation, and the prediction precision is the prediction accuracy;
and 4, step 4: statistical prediction results for inferring user intent
Statistically calculating the prediction probability and the prediction precision Acc, wherein the calculation formula is shown as formula (1), wherein TP is the number of samples which are actually the target x and are predicted as x, FP is the number of samples which are not actually the target x but are predicted as x, FN is the number of samples which are actually the target x but are not predicted as x, and TN is the number of samples which are not actually the target x but are not predicted as x;
Figure FDA0002637139040000011
the higher the prediction probability is, the more possible the user is to perform the operation, and the higher the prediction precision is, the more accurate the prediction is proved;
the following reference criteria were used for reasoning:
1) if the prediction accuracy of the label is lower than 0.9, the reason is that the key setting of the system interface is unreasonable; since there are problems with key locations, names, or function settings, which do not match the user's habits, the user cannot quickly understand and use the system;
2) if the prediction of a certain label is accurate, but the prediction probability is lower than 0.99, the system function is divided poorly or the key setting is unreasonable; because one button in the system bears the multifunctional requirement or the button is unreasonable in arrangement, the function of the button is misunderstood by a user, and therefore the target requirement of the user cannot be stably predicted by the prediction model;
3) continuous errors occur in a certain operation process, which are caused by unreasonable function-related key settings or incapability of displaying prompt information by a system; the setting of the function keys and the understanding of the user have great problems, or the system cannot display error prompt information, so that the user is difficult to find errors through continuous operation;
and 5: verifying the result of intent reasoning, summarizing the change of user requirements: inviting part of the users to participate in the survey and feedback, confirming the real intentions of the users, from which the new or potential needs of the users can be derived.
2. The method of claim 1, wherein the user behavior and corresponding label in step 1:
user behavior Corresponding label Creating a folder createfolder Downloading files downloadfile Editing files editfile Mobile file movefile Mobile folder movefolder Opening file folder openfolder Deleting files removefile Deleting file folder removefolder Renaming files renamefile Renaming folder renamefolder Changing language switchlanguage Switching list views switchlistview Updating files uploadfile Viewing documents viewfile
3. The method of claim 1, wherein N in step 3 is 30.
CN202010828693.9A 2020-08-18 2020-08-18 Demand change prediction method based on CRF-LSTM algorithm Pending CN112101557A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010828693.9A CN112101557A (en) 2020-08-18 2020-08-18 Demand change prediction method based on CRF-LSTM algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010828693.9A CN112101557A (en) 2020-08-18 2020-08-18 Demand change prediction method based on CRF-LSTM algorithm

Publications (1)

Publication Number Publication Date
CN112101557A true CN112101557A (en) 2020-12-18

Family

ID=73754451

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010828693.9A Pending CN112101557A (en) 2020-08-18 2020-08-18 Demand change prediction method based on CRF-LSTM algorithm

Country Status (1)

Country Link
CN (1) CN112101557A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110569591A (en) * 2019-09-03 2019-12-13 西北工业大学 agile development demand change prediction method based on Bi-LSTM
CN110956309A (en) * 2019-10-30 2020-04-03 南京大学 Flow activity prediction method based on CRF and LSTM
CN111274817A (en) * 2020-01-16 2020-06-12 北京航空航天大学 Intelligent software cost measurement method based on natural language processing technology

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110569591A (en) * 2019-09-03 2019-12-13 西北工业大学 agile development demand change prediction method based on Bi-LSTM
CN110956309A (en) * 2019-10-30 2020-04-03 南京大学 Flow activity prediction method based on CRF and LSTM
CN111274817A (en) * 2020-01-16 2020-06-12 北京航空航天大学 Intelligent software cost measurement method based on natural language processing technology

Similar Documents

Publication Publication Date Title
Malhotra Empirical research in software engineering: concepts, analysis, and applications
Ampatzoglou et al. The effect of GoF design patterns on stability: a case study
Arisholm et al. A systematic and comprehensive investigation of methods to build and evaluate fault prediction models
Lee A review of data analytics in technological forecasting
Kaur et al. An empirical study of software entropy based bug prediction using machine learning
Saini et al. Automated, interactive, and traceable domain modelling empowered by artificial intelligence
Padhy et al. Threshold estimation from software metrics by using evolutionary techniques and its proposed algorithms, models
Emam et al. Inferring extended probabilistic finite-state automaton models from software executions
Grenyer et al. A systematic review of multivariate uncertainty quantification for engineering systems
Troost et al. How to keep it adequate: A protocol for ensuring validity in agent-based simulation
Pugelj et al. Predicting structured outputs k-nearest neighbours method
Naeem et al. Semantic-based process mining technique for annotation and modelling of domain processes
Huang et al. HEDF: a method for early forecasting software defects based on human error mechanisms
Cheng et al. HINNPerf: Hierarchical interaction neural network for performance prediction of configurable systems
CN117216419B (en) Data analysis method based on AI technology
Ha et al. A unified comparison of user modeling techniques for predicting data interaction and detecting exploration bias
Okoye et al. Semantic fuzzy mining: Enhancement of process models and event logs analysis from syntactic to conceptual level
Jubair et al. A multi‐agent K‐means with case‐based reasoning for an automated quality assessment of software requirement specification
CN112101557A (en) Demand change prediction method based on CRF-LSTM algorithm
Alsalemi et al. A systematic literature review of requirements volatility prediction
Nicoletti et al. Towards software architecture documents matching stakeholders’ interests
Gaur et al. A fuzzy traceability vector model for requirements validation
CN110569591B (en) Agile development demand change prediction method based on Bi-LSTM
CN114547231A (en) Data tracing method and system
Chawla et al. Improving bug report quality by predicting correct component in bug reports

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
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20201218

WD01 Invention patent application deemed withdrawn after publication