CN114637490A - Method and device for judging ambiguity of demand statement - Google Patents
Method and device for judging ambiguity of demand statement Download PDFInfo
- Publication number
- CN114637490A CN114637490A CN202210286482.6A CN202210286482A CN114637490A CN 114637490 A CN114637490 A CN 114637490A CN 202210286482 A CN202210286482 A CN 202210286482A CN 114637490 A CN114637490 A CN 114637490A
- Authority
- CN
- China
- Prior art keywords
- ambiguity
- statement
- judgment
- requirement
- preset
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/10—Requirements analysis; Specification techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/084—Backpropagation, e.g. using gradient descent
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- Software Systems (AREA)
- Evolutionary Computation (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Computational Linguistics (AREA)
- Biophysics (AREA)
- Mathematical Physics (AREA)
- Biomedical Technology (AREA)
- Health & Medical Sciences (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Biology (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention provides a method and a device for judging ambiguity of a demand statement, relates to the technical field of statement identification, and can be used in the financial field or other technical fields. The method comprises the following steps: acquiring a requirement statement of ambiguity to be judged; performing statement ambiguity judgment on the required statement to be subjected to ambiguity judgment based on a preset statement ambiguity judgment model to obtain an ambiguity judgment result of the required statement to be subjected to ambiguity judgment; the preset statement ambiguity judging model is obtained by learning a two-classification model according to training features of a demand statement sample marked with a statement ambiguity mark. The device performs the above method. The method and the device for judging the ambiguity of the demand statement provided by the embodiment of the invention can realize the ambiguity judgment of the demand statement without depending on the working experience of related personnel, and are time-saving and labor-saving.
Description
Technical Field
The invention relates to the technical field of statement identification, in particular to a method and a device for judging ambiguity of a demand statement.
Background
The software requirement is a specific requirement on the aspects of the function, performance, reliability and the like of software, is usually written by a demanding person, described in a natural language statement form and exists in a requirement document form, specifies the development target of the software, and is a basis for the development personnel to design, develop and realize the software.
The requirement statement of the software expresses the determined content, so that the communication efficiency of the demand personnel and the research and development personnel, the understanding of the research and development personnel on the research and development target and the final delivery quality of the software are greatly improved. However, the lack of subject, multiple predicates, the inclusion of fuzzy words and other factors cause the ubiquitous presence of demand statements that represent fuzzy expressions. For example, the requirement statement "age attribute has default value and supports manual maintenance", and it cannot be determined whether the object of "manual maintenance" is "age attribute" or "default value", so that the requiring person and the developing person may have different understandings. It can be seen that the checking and judgment of the ambiguity of the requirement statement is important.
At present, the checking and the judgment of the fuzziness of the requirement statement are manually completed by related personnel after the requirement personnel complete the writing of the requirement document, depend on the working experience of the related personnel, and are time-consuming and labor-consuming.
Disclosure of Invention
For solving the problems in the prior art, embodiments of the present invention provide a method and an apparatus for determining ambiguity of a requirement statement, which can at least partially solve the problems in the prior art.
In one aspect, the present invention provides a method for determining ambiguity of a requirement statement, including:
acquiring a requirement statement of ambiguity to be judged;
performing statement ambiguity judgment on the required statement to be subjected to ambiguity judgment based on a preset statement ambiguity judgment model to obtain an ambiguity judgment result of the required statement to be subjected to ambiguity judgment;
the preset statement ambiguity judging model is obtained by learning a two-classification model according to training features of a demand statement sample marked with a statement ambiguity mark.
The method for judging the ambiguity of the demand statement to be judged based on the preset statement ambiguity judgment model to obtain the ambiguity judgment result of the demand statement to be judged with ambiguity includes:
calculating the requirement statement of the ambiguity to be judged based on a preset statement ambiguity judgment model to obtain an ambiguity probability value reflecting the ambiguity degree of the requirement statement;
and determining the ambiguity judgment result of the requirement statement to be judged for ambiguity according to the comparison result of the ambiguity probability value and a preset threshold value.
The determining the ambiguity judgment result of the requirement statement to be judged for ambiguity according to the comparison result of the ambiguity probability value and a preset threshold value comprises the following steps:
if the ambiguity probability value is greater than or equal to the preset threshold value, determining that the ambiguity judgment result is ambiguity;
and if the ambiguity probability value is smaller than the preset threshold value, determining that the ambiguity judgment result is not ambiguous.
The method for judging the ambiguity of the requirement statement further comprises the following steps:
carrying out fuzzy marking on the requirement statement sample to obtain a marked sample library; each labeled sample in the labeled sample library is labeled with a statement ambiguity mark;
calculating a demand statement sample in the labeling sample library to obtain a fuzziness probability value;
calculating a loss value according to the ambiguity probability value and the statement ambiguity label, training the feature learning binary model based on the loss value, and obtaining the preset statement ambiguity judgment model.
Wherein, the calculating the requirement statement sample in the labeling sample library to obtain the ambiguity probability value comprises:
performing characteristic coding on the demand statement sample in the labeled sample library to obtain a real number column vector;
and converting the real column vector into a real value, and converting the real value into an ambiguity probability value through a neural network activation function.
Wherein, the performing feature coding on the demand statement sample in the labeled sample library to obtain a real number column vector includes:
and performing feature coding on the demand statement sample in the marked sample library by using a deep neural network to obtain a real number column vector.
Wherein converting the real column vector to a real value comprises:
converting the real column vector into a real value using a fully-connected neural network.
In one aspect, the present invention provides a device for determining ambiguity of a requirement statement, including:
the acquiring unit is used for acquiring a requirement statement of the ambiguity to be judged;
the judging unit is used for carrying out statement ambiguity judgment on the required statement to be subjected to ambiguity judgment based on a preset statement ambiguity judgment model to obtain an ambiguity judgment result of the required statement to be subjected to ambiguity judgment;
the preset statement ambiguity judging model is obtained by learning a two-classification model according to training features of a demand statement sample marked with a statement ambiguity mark.
In another aspect, an embodiment of the present invention provides an electronic device, including: a processor, a memory, and a bus, wherein,
the processor and the memory are communicated with each other through the bus;
the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform a method comprising:
acquiring a requirement statement of ambiguity to be judged;
performing statement ambiguity judgment on the required statement to be subjected to ambiguity judgment based on a preset statement ambiguity judgment model to obtain an ambiguity judgment result of the required statement to be subjected to ambiguity judgment;
the preset statement ambiguity judging model is obtained by learning a two-classification model according to training features of a demand statement sample marked with a statement ambiguity mark.
An embodiment of the present invention provides a non-transitory computer-readable storage medium, including:
the non-transitory computer readable storage medium stores computer instructions that cause the computer to perform a method comprising:
acquiring a requirement statement of ambiguity to be judged;
performing statement ambiguity judgment on the required statement to be subjected to ambiguity judgment based on a preset statement ambiguity judgment model to obtain an ambiguity judgment result of the required statement to be subjected to ambiguity judgment;
the preset statement ambiguity judging model is obtained by learning a two-classification model according to training features of a demand statement sample marked with a statement ambiguity mark.
The method and the device for judging the ambiguity of the demand statement, provided by the embodiment of the invention, are used for acquiring the demand statement to be judged for ambiguity; performing statement ambiguity judgment on the required statement to be subjected to ambiguity judgment based on a preset statement ambiguity judgment model to obtain an ambiguity judgment result of the required statement to be subjected to ambiguity judgment; the preset statement ambiguity judging model is obtained by learning a binary classification model according to the training characteristics of the requirement statement sample marked with the statement ambiguity mark, the requirement statement ambiguity judgment can be realized without depending on the working experience of related personnel, and time and labor are saved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts. In the drawings:
fig. 1 is a flowchart illustrating a method for determining ambiguity of a requirement statement according to an embodiment of the present invention.
Fig. 2 is a flowchart illustrating a method for determining ambiguity of a requirement statement according to another embodiment of the present invention.
Fig. 3 is a flowchart illustrating a method for determining ambiguity of a requirement statement according to another embodiment of the present invention.
Fig. 4 is a schematic structural diagram of a device for determining ambiguity of a requirement statement according to an embodiment of the present invention.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings. The exemplary embodiments and descriptions of the present invention are provided to explain the present invention, but not to limit the present invention. It should be noted that the embodiments and features of the embodiments in the present application may be arbitrarily combined with each other without conflict.
The following description of related terms is presented to aid in the understanding of the methods of embodiments of the invention:
and (3) encoding: the natural language is converted into a real number matrix by using a deep learning network, for example, "Beijing is capital of China" is converted into an 8 × 100 real number matrix, 8 characters are contained in a sentence, and each character corresponds to a 100-dimensional real number vector.
And (5) Bert: a natural language understanding coder model inputs natural language sentences, and coding representation of each constituent unit in the sentences can be obtained through training.
Fully connecting the neural networks: and the most basic neural network transforms the input Di dimensional vector to obtain a Do dimensional vector.
Sigmoid: a neural network activation function maps a real value between 0 and 1.
Training: the ideal values of all weights and biases are learned (determined) by the labeled/correct samples.
Loss function/loss: the value of a random event or its associated random variable is mapped to a non-negative real number to represent a function of the "risk" or "loss" of the random event.
Cross entropy loss: the method is a loss function, is a mode for measuring the deviation between the predicted value and the true value of the neural network, and has a simple formula.
Gradient back propagation: a common method for training artificial neural networks calculates the gradient of the loss function for all weights in the neural network, which is used to update the weights to minimize the loss function.
Fig. 1 is a flowchart illustrating a method for determining ambiguity of a requirement statement according to an embodiment of the present invention, and as shown in fig. 1, the method for determining ambiguity of a requirement statement according to an embodiment of the present invention includes:
step S1: and acquiring a requirement statement of the ambiguity to be judged.
Step S2: performing statement ambiguity judgment on the required statement to be subjected to ambiguity judgment based on a preset statement ambiguity judgment model to obtain an ambiguity judgment result of the required statement to be subjected to ambiguity judgment;
the preset statement ambiguity judging model is obtained by learning a two-classification model according to training features of a demand statement sample marked with a statement ambiguity mark.
In the above step S1, the apparatus acquires a demand sentence for which ambiguity is to be determined. The apparatus may be a computer device performing the method, and may comprise, for example, a server. As shown in fig. 2, the requirement statement for obtaining the ambiguity to be determined corresponds to the requirement statement to be determined in fig. 2.
In the step S2, the apparatus performs statement ambiguity determination on the required statement to be ambiguity determined based on a preset statement ambiguity determination model, so as to obtain an ambiguity determination result of the required statement to be ambiguity determined;
the preset statement ambiguity judging model is obtained by learning a two-classification model according to training features of a demand statement sample marked with a statement ambiguity mark. The method can input the required statement with ambiguity to be judged to the preset statement ambiguity judgment model, and the output result of the preset statement ambiguity judgment model is used as the ambiguity judgment result of the required statement with ambiguity to be judged.
The statement ambiguity flag may be implemented by a numerical flag, for example, 1 indicates that the statement is ambiguous and 0 indicates that the statement is not ambiguous.
The feature learning binary classification model may include Logistic Regression (Logistic Regression), k-Nearest Neighbors (k-Nearest Neighbors), Decision Trees (Decision Trees), Support Vector Machine (Support Vector Machine), Naive Bayes (Naive Bayes), and the like, and is not particularly limited.
The method for judging the ambiguity of the required statement to be judged based on the preset statement ambiguity judgment model to obtain the ambiguity judgment result of the required statement to be judged with the ambiguity comprises the following steps:
calculating the requirement statement of the ambiguity to be judged based on a preset statement ambiguity judgment model to obtain an ambiguity probability value reflecting the ambiguity degree of the requirement statement; because the preset statement ambiguity judging model is trained in advance, the calculated ambiguity probability value can truly reflect the ambiguity degree of the required statement.
The determining the ambiguity decision result of the requirement statement to be ambiguity decided according to the comparison result of the ambiguity probability value and a preset threshold value comprises the following steps:
if the ambiguity probability value is greater than or equal to the preset threshold value, determining that the ambiguity judgment result is ambiguity;
and if the ambiguity probability value is smaller than the preset threshold value, determining that the ambiguity judgment result is not ambiguous. The preset threshold value can be set independently according to actual conditions. As shown in step S3 of fig. 2, the ambiguity automatic determination is specifically described as follows:
(1) inputting: and (5) a requirement statement s of which the ambiguity is to be determined.
(2) And (3) outputting: and the ambiguity judgment result of the requirement sentence s.
(3) And (3) judging: inputting a requirement statement s into a preset statement ambiguity judgment model, calculating an ambiguity probability value p(s), comparing the ambiguity probability value p(s) with a preset threshold value T, if p(s) is greater than or equal to T, judging the ambiguity judgment result of s to be ambiguous, otherwise, judging the ambiguity judgment result of s to be not ambiguous.
The method for judging the ambiguity of the demand statement provided by the embodiment of the invention obtains the demand statement to be judged with ambiguity; performing statement ambiguity judgment on the required statement to be subjected to ambiguity judgment based on a preset statement ambiguity judgment model to obtain an ambiguity judgment result of the required statement to be subjected to ambiguity judgment; the preset statement ambiguity judging model is obtained by learning a binary classification model according to the training characteristics of the requirement statement sample marked with the statement ambiguity mark, the requirement statement ambiguity judgment can be realized without depending on the working experience of related personnel, and time and labor are saved.
Further, the performing statement ambiguity resolution on the required statement to be ambiguity resolved based on a preset statement ambiguity resolution model to obtain an ambiguity resolution result of the required statement to be ambiguity resolved includes:
calculating the requirement statement of the ambiguity to be judged based on a preset statement ambiguity judgment model to obtain an ambiguity probability value reflecting the ambiguity degree of the requirement statement; reference is made to the above description and no further description is made.
And determining the ambiguity judgment result of the requirement statement to be judged for ambiguity according to the comparison result of the ambiguity probability value and a preset threshold value. Reference is made to the above description and no further description is made.
According to the method for judging the ambiguity of the requirement statement provided by the embodiment of the invention, the ambiguity judgment result can be accurately determined through the ambiguity probability value.
Further, the determining the ambiguity determination result of the requirement statement to be determined for ambiguity according to the comparison result of the ambiguity probability value and a preset threshold includes:
if the ambiguity probability value is greater than or equal to the preset threshold value, determining that the ambiguity judgment result is ambiguity; reference is made to the above description and no further description is made.
And if the ambiguity probability value is smaller than the preset threshold value, determining that the ambiguity judgment result is not ambiguous. Reference is made to the above description and no further description is made.
The method for judging the ambiguity of the requirement statement provided by the embodiment of the invention can further accurately determine the ambiguity judgment result.
Further, as shown in fig. 3, the method for determining ambiguity of a requirement statement further includes:
r1: carrying out fuzzy marking on the requirement statement sample to obtain a marked sample library; each labeled sample in the labeled sample library is labeled with a statement ambiguity mark; as shown in step S1 of fig. 2, the following is specifically explained:
(1) inputting: the inventory requirement document set comprises a requirement document set, wherein each requirement document in the requirement document set comprises a plurality of requirement sentences.
(2) And (3) outputting: a labeled sample library, wherein each labeled sample is a binary group (a requirement statement and a statement ambiguity mark), and when the content of the requirement statement expression is clear and definite, the corresponding statement ambiguity mark takes a non-ambiguous value, such as "0"; when the content of the expression of the requirement sentence is unclear or ambiguous, its corresponding sentence ambiguity flag takes a value representing ambiguity, for example, "1".
(3) And (3) labeling: for each storage demand document, sentence splitting can be carried out according to sentence termination punctuation marks such as sentence numbers, question marks, semicolons and the like, and for each demand sentence obtained by splitting, experts judge whether the statement content of the sentence is clear and definite, and determine the value of the corresponding sentence ambiguity mark.
For example, the document "user has name attribute, age attribute, and education attribute for a specific requirement. The age attribute has a default value and supports manual maintenance. "splitting the sentence according to the sentence number to obtain the required sentence" the user has name attribute, age attribute and education attribute "and" the age attribute contains default value, supports manual maintenance. ".
Judging whether the statement expression content is clear and definite by an expert according to the statement expression content, wherein the statement ambiguity mark value of the statement of 'the user has name attribute, age attribute and education attribute' is '0'; and judging that the age attribute of the statement contains a default value, and supporting manual maintenance. The statement ambiguity flag takes the value "1".
R2: calculating a demand statement sample in the labeling sample library to obtain a fuzziness probability value; as shown in step S2 of fig. 2, the following is specifically explained:
(1) inputting: the sample library of annotations, i.e. (requirement statements and statement ambiguity markup) binary sets.
(2) And (3) outputting: and training the obtained preset sentence ambiguity judgment model.
(3) The process is as follows:
1) establishing a feature learning two-classification model of a demand statement based on a deep neural network, specifically aiming at the demand statement i:
1a) performing feature coding on a demand statement i in a labeling sample library by using a deep neural network to obtain an h-dimensional real number column vector M, wherein h is an integer; for example, the process of using Bert to perform feature coding on the requirement statement i includes: splicing the requirement statement i into a character string: and the character string is input into a Bert for vector coding, and the output code of the [ CLS ] position is taken as the code of the requirement statement i, wherein the dimension is h, and h is usually 768 or 1024.
Wherein [ CLS ] represents a start character of a character string and [ SEP ] represents an end character of the character string.
1b) Calculating ambiguity probability p (i) and non-ambiguity probability 1-p (i) of a requirement statement i, specifically, converting a real number column vector M into a real number value through a fully-connected neural network, and converting the real number column vector M into the probability p (i) through a sigmoid function, wherein the fully-connected neural network can be a 1-layer fully-connected network W × M + b, wherein W and b are parameters, W is a 1 × h matrix, and b is a real number.
2) And performing model training by taking the input labeled sample library as a training set, specifically comprising the following steps of:
2a) calculating a loss value by using the calculated probability of 1b) and the value of the statement ambiguity mark t according to a requirement statement sample (a requirement statement i and a statement ambiguity mark t), wherein when the statement ambiguity mark t is a value representing ambiguity (for example, an integer of 1), the loss value is equal to p (i); otherwise the loss value is equal to 1-p (i); the above-mentioned loss value may specifically be a cross-entropy loss value.
2b) And (3) the loss values of all samples in the training set are equal to the sum of the loss values of all samples, gradient back propagation of the neural network is carried out based on the loss values, the training characteristic learning binary model is completed, and the preset statement ambiguity judgment model is obtained.
R3: calculating a loss value according to the ambiguity probability value and the statement ambiguity label, training the feature learning binary model based on the loss value, and obtaining the preset statement ambiguity judgment model. Reference is made to the above description and no further description is given.
According to the method for judging the ambiguity of the demand statement, the preset statement ambiguity judging model is obtained by training the feature learning two-classification model, and the preset statement ambiguity judging model can further output an accurate ambiguity judging result.
Further, the calculating the requirement statement sample in the labeled sample library to obtain the ambiguity probability value includes:
performing characteristic coding on the demand statement sample in the labeled sample library to obtain a real number column vector; reference is made to the above description and no further description is made.
And converting the real column vector into a real value, and converting the real value into an ambiguity probability value through a neural network activation function. Reference is made to the above description and no further description is made.
The method for judging the ambiguity of the requirement sentence provided by the embodiment of the invention is convenient to obtain the ambiguity probability value, thereby improving the model training efficiency.
Further, the performing feature coding on the demand statement sample in the labeled sample library to obtain a real column vector includes:
and performing feature coding on the demand statement sample in the marked sample library by using a deep neural network to obtain a real number column vector. Reference is made to the above description and no further description is made.
The method for judging the ambiguity of the requirement sentence provided by the embodiment of the invention is convenient to obtain a real number column vector, thereby improving the model training efficiency.
Further, the converting the real column vector into a real value includes:
converting the real column vector into a real value using a fully-connected neural network. Reference is made to the above description and no further description is made.
The method for judging the ambiguity of the requirement statement provided by the embodiment of the invention is convenient to obtain a real numerical value, thereby improving the model training efficiency.
It should be noted that the method for determining ambiguity of a requirement statement provided by the embodiment of the present invention can be used in the financial field, and can also be used in any technical field except the financial field.
Fig. 4 is a schematic structural diagram of a requirement statement ambiguity deciding apparatus according to an embodiment of the present invention, and as shown in fig. 4, the requirement statement ambiguity deciding apparatus according to the embodiment of the present invention includes an obtaining unit 401 and a deciding unit 402, where:
the obtaining unit 401 is configured to obtain a requirement statement of ambiguity to be determined; the judging unit 402 is configured to perform statement ambiguity judgment on the required statement to be subjected to ambiguity judgment based on a preset statement ambiguity judgment model to obtain an ambiguity judgment result of the required statement to be subjected to ambiguity judgment; the preset statement ambiguity judging model is obtained by learning a two-classification model according to training features of a demand statement sample marked with a statement ambiguity mark.
Specifically, an obtaining unit 401 in the apparatus is configured to obtain a requirement statement of ambiguity to be determined; the judging unit 402 is configured to perform statement ambiguity judgment on the required statement to be subjected to ambiguity judgment based on a preset statement ambiguity judgment model to obtain an ambiguity judgment result of the required statement to be subjected to ambiguity judgment; the preset statement ambiguity judging model is obtained by learning a two-classification model according to training features of a demand statement sample marked with a statement ambiguity mark.
The device for judging the ambiguity of the demand statement provided by the embodiment of the invention is used for acquiring the demand statement to be judged for ambiguity; performing statement ambiguity judgment on the required statement to be subjected to ambiguity judgment based on a preset statement ambiguity judgment model to obtain an ambiguity judgment result of the required statement to be subjected to ambiguity judgment; the preset statement ambiguity judging model is obtained by learning a binary classification model according to the training characteristics of the requirement statement sample marked with the statement ambiguity mark, the requirement statement ambiguity judgment can be realized without depending on the working experience of related personnel, and time and labor are saved.
The determining unit 402 is specifically configured to:
calculating the requirement statement of the ambiguity to be judged based on a preset statement ambiguity judgment model to obtain an ambiguity probability value reflecting the ambiguity degree of the requirement statement;
and determining the ambiguity judgment result of the requirement statement to be judged for ambiguity according to the comparison result of the ambiguity probability value and a preset threshold value.
The device for judging the ambiguity of the requirement statement provided by the embodiment of the invention can accurately determine the ambiguity judgment result through the ambiguity probability value.
The determining unit 402 is further specifically configured to:
if the ambiguity probability value is greater than or equal to the preset threshold value, determining that the ambiguity judgment result is ambiguity;
and if the ambiguity probability value is smaller than the preset threshold value, determining that the ambiguity judgment result is not ambiguous.
The device for judging the ambiguity of the requirement statement provided by the embodiment of the invention can further accurately determine the ambiguity judgment result.
The requirement statement ambiguity deciding device is further configured to:
carrying out fuzziness labeling on the requirement sentence sample to obtain a labeled sample library; each labeled sample in the labeled sample library is labeled with a statement ambiguity mark;
calculating a demand statement sample in the labeling sample library to obtain a fuzziness probability value;
calculating a loss value according to the ambiguity probability value and the statement ambiguity label, training the feature learning binary model based on the loss value, and obtaining the preset statement ambiguity judgment model.
The device for judging the ambiguity of the required sentence provided by the embodiment of the invention obtains the ambiguity judging model of the preset sentence by training the feature learning two-classification model, and further enables the ambiguity judging model of the preset sentence to output an accurate ambiguity judging result.
The requirement statement ambiguity determination apparatus is further specifically configured to:
performing characteristic coding on the demand statement sample in the labeled sample library to obtain a real number column vector;
and converting the real column vector into a real value, and converting the real value into an ambiguity probability value through a neural network activation function.
The device for judging the ambiguity of the requirement statement provided by the embodiment of the invention is convenient to obtain the ambiguity probability value, and further improves the model training efficiency.
The requirement statement ambiguity determination apparatus is further specifically configured to:
and performing feature coding on the demand statement sample in the marked sample library by using a deep neural network to obtain a real number column vector.
The device for judging the ambiguity of the requirement sentence provided by the embodiment of the invention is convenient to obtain a real number column vector, thereby improving the model training efficiency.
The requirement statement ambiguity deciding device is further specifically configured to:
converting the real column vector into a real value using a fully-connected neural network.
The device for judging the ambiguity of the requirement statement provided by the embodiment of the invention is convenient to obtain a real numerical value, and further improves the model training efficiency.
The embodiment of the apparatus for determining ambiguity of a requirement statement provided in the embodiment of the present invention may be specifically configured to execute the processing flows of the above method embodiments, and the functions thereof are not described herein again, and refer to the detailed description of the above method embodiments.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 5, the electronic device includes: a processor (processor)501, a memory (memory)502, and a bus 503;
the processor 501 and the memory 502 complete communication with each other through a bus 503;
the processor 501 is configured to call program instructions in the memory 502 to perform the methods provided by the above-mentioned method embodiments, for example, including:
acquiring a requirement statement of ambiguity to be judged;
performing statement ambiguity judgment on the required statement to be subjected to ambiguity judgment based on a preset statement ambiguity judgment model to obtain an ambiguity judgment result of the required statement to be subjected to ambiguity judgment;
the preset statement ambiguity judging model is obtained by learning a two-classification model according to training features of a demand statement sample marked with a statement ambiguity mark.
The present embodiment discloses a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the method provided by the above-mentioned method embodiments, for example, comprising:
acquiring a requirement statement of ambiguity to be judged;
performing statement ambiguity judgment on the requirement statement to be subjected to ambiguity judgment based on a preset statement ambiguity judgment model to obtain an ambiguity judgment result of the requirement statement to be subjected to ambiguity judgment;
the preset statement ambiguity judging model is obtained by learning a two-classification model according to training features of a demand statement sample marked with a statement ambiguity mark.
The present embodiment provides a computer-readable storage medium, which stores a computer program, where the computer program causes the computer to execute the method provided by the above method embodiments, for example, the method includes:
acquiring a requirement statement of ambiguity to be judged;
performing statement ambiguity judgment on the required statement to be subjected to ambiguity judgment based on a preset statement ambiguity judgment model to obtain an ambiguity judgment result of the required statement to be subjected to ambiguity judgment;
the preset sentence ambiguity judging model is obtained by learning a two-classification model according to training features of a demand sentence sample marked with a sentence ambiguity mark.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In the description herein, reference to the description of the terms "one embodiment," "a particular embodiment," "some embodiments," "for example," "an example," "a particular example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.
Claims (10)
1. A method for determining ambiguity of a requirement statement, comprising:
acquiring a requirement statement of ambiguity to be judged;
performing statement ambiguity judgment on the required statement to be subjected to ambiguity judgment based on a preset statement ambiguity judgment model to obtain an ambiguity judgment result of the required statement to be subjected to ambiguity judgment;
the preset statement ambiguity judging model is obtained by learning a two-classification model according to training features of a demand statement sample marked with a statement ambiguity mark.
2. The method for determining ambiguity of a required statement according to claim 1, wherein the performing statement ambiguity determination on the required statement to be ambiguity determined based on a preset statement ambiguity determination model to obtain an ambiguity determination result of the required statement to be ambiguity determined comprises:
calculating the requirement statement of the ambiguity to be judged based on a preset statement ambiguity judgment model to obtain an ambiguity probability value reflecting the ambiguity degree of the requirement statement;
and determining the ambiguity judgment result of the requirement statement to be judged for ambiguity according to the comparison result of the ambiguity probability value and a preset threshold value.
3. The method for determining ambiguity of a required sentence according to claim 2, wherein the determining the ambiguity determination result of the required sentence whose ambiguity is to be determined according to the comparison result of the ambiguity probability value and a preset threshold value comprises:
if the ambiguity probability value is greater than or equal to the preset threshold value, determining that the ambiguity judgment result is ambiguity;
and if the ambiguity probability value is smaller than the preset threshold value, determining that the ambiguity judgment result is not ambiguous.
4. The requirement statement ambiguity resolution method according to any one of claims 1 to 3, characterized in that the requirement statement ambiguity resolution method further comprises:
carrying out fuzzy marking on the requirement statement sample to obtain a marked sample library; each labeled sample in the labeled sample library is labeled with a statement ambiguity mark;
calculating a demand statement sample in the labeling sample library to obtain a fuzziness probability value;
calculating a loss value according to the ambiguity probability value and the sentence ambiguity marks, training the feature learning two-classification model based on the loss value, and obtaining the preset sentence ambiguity decision model.
5. The method for determining ambiguity of a requirement statement according to claim 4, wherein the calculating the requirement statement sample in the annotation sample library to obtain the ambiguity probability value comprises:
performing characteristic coding on the demand statement sample in the labeled sample library to obtain a real number column vector;
and converting the real column vector into a real value, and converting the real value into an ambiguity probability value through a neural network activation function.
6. The method for determining ambiguity of a requirement statement according to claim 5, wherein the performing feature coding on the requirement statement sample in the labeled sample library to obtain a real column vector comprises:
and performing feature coding on the demand statement sample in the marked sample library by using a deep neural network to obtain a real number column vector.
7. The method of claim 5, wherein the converting the real column vector into a real value comprises:
converting the real column vector into a real value using a fully-connected neural network.
8. A demand-sentence ambiguity determination device comprising:
the acquiring unit is used for acquiring a requirement statement of the ambiguity to be judged;
the judging unit is used for carrying out statement ambiguity judgment on the required statement to be subjected to ambiguity judgment based on a preset statement ambiguity judgment model to obtain an ambiguity judgment result of the required statement to be subjected to ambiguity judgment;
the preset statement ambiguity judging model is obtained by learning a two-classification model according to training features of a demand statement sample marked with a statement ambiguity mark.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210286482.6A CN114637490A (en) | 2022-03-23 | 2022-03-23 | Method and device for judging ambiguity of demand statement |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210286482.6A CN114637490A (en) | 2022-03-23 | 2022-03-23 | Method and device for judging ambiguity of demand statement |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114637490A true CN114637490A (en) | 2022-06-17 |
Family
ID=81950271
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210286482.6A Pending CN114637490A (en) | 2022-03-23 | 2022-03-23 | Method and device for judging ambiguity of demand statement |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114637490A (en) |
-
2022
- 2022-03-23 CN CN202210286482.6A patent/CN114637490A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111177326B (en) | Key information extraction method and device based on fine labeling text and storage medium | |
US11501182B2 (en) | Method and apparatus for generating model | |
CN110825875A (en) | Text entity type identification method and device, electronic equipment and storage medium | |
CN108287820A (en) | A kind of generation method and device of text representation | |
CN114580424B (en) | Labeling method and device for named entity identification of legal document | |
CN115357699A (en) | Text extraction method, device, equipment and storage medium | |
CN116070602B (en) | PDF document intelligent labeling and extracting method | |
CN114510570A (en) | Intention classification method and device based on small sample corpus and computer equipment | |
CN114691525A (en) | Test case selection method and device | |
CN109214642A (en) | A kind of the automatic of construction process constraint extracts and classification method and system | |
CN112035629B (en) | Method for implementing question-answer model based on symbolized knowledge and neural network | |
CN113326367A (en) | Task type dialogue method and system based on end-to-end text generation | |
CN117828024A (en) | Plug-in retrieval method, device, storage medium and equipment | |
CN111753554A (en) | Method and device for generating intention knowledge base | |
CN114637490A (en) | Method and device for judging ambiguity of demand statement | |
CN114139610B (en) | Deep learning-based traditional Chinese medicine clinical literature data structuring method and device | |
CN114969372A (en) | Relationship extraction method, system, device and storage medium | |
CN112036188A (en) | Method and device for recommending quality test example sentences | |
CN112949313A (en) | Information processing model training method, device, equipment and storage medium | |
CN112818099B (en) | Multi-granularity word segmentation-based application question solution processing method, system and storage medium | |
CN117635243B (en) | Intelligent software cost assessment method and system for enabling large language model | |
CN117540004B (en) | Industrial domain intelligent question-answering method and system based on knowledge graph and user behavior | |
CN116821712B (en) | Semantic matching method and device for unstructured text and knowledge graph | |
CN116028620B (en) | Method and system for generating patent abstract based on multi-task feature cooperation | |
CN117271553A (en) | Method for generating and operating supervision report data quality rule |
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 |