Non-atomic defect detection method, electronic device and storage medium
By using pre-trained transfer learning models and convolutional neural networks, combined with preprocessing steps, non-atomic defects in natural language requirements documents are solved, and the problem of low accuracy in the prior art is achieved. Non-atomic defect detection.
Patent Information
- Application Number
- CN202110312017.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-24
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2041-03-24
AI Technical Summary
The existing requirements defect detection methods are not very accurate, especially when dealing with natural language requirements documents, it is difficult to effectively identify non-atomic defects.
Using a pre-trained transfer learning model and a convolutional neural network model, combined with pre-processing steps such as removing numbers and punctuation marks, it is used to detect whether there are non-atomic defects in the demand statement, and extract features through the BERT model to classify non-atomic defects. type.
The accuracy of non-atomic defect detection is significantly improved. Compared with the rule-based detection method, the detection results are more accurate, reaching a 90% accuracy rate, which is higher than the traditional method.
Smart Images

Figure CN112966489B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of data processing, and in particular to a method for detecting non-atomic defects, an electronic device and a storage medium. Background Art
[0002] During the requirements analysis phase, improving the quality of requirements is of great significance, including: reducing defects, discovering errors earlier, reducing the costs associated with changes and standardization, and providing or requesting technical expertise to stakeholders that will be involved in the development process. Compared with structured requirements documents in a specified format, natural language requirements are often easier to understand and use, but this also makes it more difficult to improve the quality of requirements than structured requirements. There are many methods for detecting requirements defects and assisting humans in improving the quality of requirements documents.
[0003] At present, common demand defect detection modes are mainly divided into two categories: one is based on a given demand document template or demand statement specification; the other is to detect the self-defined demand defect type (or a specific defect) based on predefined rules. However, the accuracy of current detection methods is not high. Summary of the invention
[0004] The purpose of the embodiments of the present invention is to provide a non-atomic defect detection method, electronic device and storage medium, which improve the accuracy of non-atomic defect detection.
[0005] To solve the above technical problems, an embodiment of the present invention provides a method for detecting non-atomic defects, comprising the following steps: inputting a requirement statement into a detection module; wherein the detection module is a model pre-trained to convergence for determining whether a requirement statement has a non-atomic defect, and the detection module includes a transfer learning model and a convolutional neural network model; based on the output data of the detection module, determining whether the requirement statement has a non-atomic defect.
[0006] An embodiment of the present invention also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the non-atomic defect detection method mentioned in the above embodiment.
[0007] An embodiment of the present invention further provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the non-atomic defect detection method mentioned in the above embodiment.
[0008] The non-atomic defect detection method, electronic device, and storage medium provided in the embodiments of the present invention can be used to extract the features of the requirement statement because the transfer learning model is a pre-trained model. The convolutional neural network based on deep learning determines whether the requirement statement has non-atomic defects based on the extracted features. Compared with the rule-based detection method for non-atomic defect detection, the detection result is more accurate.
[0009] In addition, before inputting the requirement statement into the detection model, the detection method of non-atomic defects further includes: performing a preprocessing operation on the initial requirement statement to obtain the requirement statement; the preprocessing operation includes: removing numbers in the initial requirement statement and / or removing punctuation marks in the initial requirement statement. In this example, removing numbers, punctuation marks and other information irrelevant to non-atomic defects in the requirement statement can improve the detection effect of the detection module.
[0010] In addition, the preprocessing operation further includes: removing a single character in the initial requirement statement and / or removing consecutive spaces in the initial requirement statement.
[0011] In addition, the output data of the detection module indicates the type of non-atomic defects of the requirement statement, and the types of non-atomic defects of the requirement statement include non-atomic defects caused by conjunctions and non-atomic defects caused by clause nesting. In this example, the non-atomic defects of the requirement statement are classified, which is conducive to subsequent research and resolution of the non-atomic defects of the requirement statement.
[0012] In addition, before inputting the requirement statement into the detection module, the detection method of non-atomic defects also includes: obtaining the requirement document; screening the original requirement document according to the predefined inclusion rule; the inclusion rule indicates that the retained requirement document meets the preset requirements, and the preset requirements include: the number of requirement statements after the requirement document is converted into a text format is greater than a first preset value and / or the number of spelling errors in the requirement document is less than a second preset value; based on the screened requirement document, the detection module is trained. In this example, the requirement document is screened so that the screened requirement document is more in line with the training requirements and the training speed is improved.
[0013] In addition, the transfer learning model is the transformer-based bidirectional encoder representation technology BERT model. In this example, the BERT model is a bidirectional encoding that takes context into consideration, which has a better effect when performing feature extraction.
[0014] In addition, based on the screened requirement documents, the detection module is trained, including: inputting the screened requirement documents into the BERT model; feeding the output of the BERT model back to the convolutional neural network model, and training the convolutional neural network model.
[0015] In addition, the activation function of the convolutional neural network model includes a rectified linear unit ReLU function, the function of the classification layer of the convolutional neural network model includes a Sigmoid function, the loss function of the training process of the convolutional neural network model is a cross entropy loss function, and the optimization algorithm of the convolutional neural network model is an adaptive moment estimation Adam algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplifications do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0017] Figure 1 is a flow chart of a method for detecting non-atomic defects according to the first embodiment of the present application;
[0018] Figure 2 is a flow chart of a method for detecting non-atomic defects according to the second embodiment of the present application;
[0019] Figure 3 It is a schematic structural diagram of an electronic device mentioned in the third embodiment of the present application. DETAILED DESCRIPTION
[0020] In order to make the purpose, technical scheme and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, it will be appreciated by those skilled in the art that in the embodiments of the present invention, many technical details are provided to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can be implemented.
[0021] The division of the following embodiments is for the convenience of description and shall not constitute any limitation on the specific implementation of the present invention. The various embodiments may be combined and referenced with each other without contradiction.
[0022] The first embodiment of the present invention relates to a method for detecting non-atomic defects, comprising the following steps: inputting a requirement statement into a detection module; wherein the detection module is a model pre-trained to convergence for determining whether a requirement statement has a non-atomic defect, and the detection module includes a transfer learning model and a convolutional neural network model; and determining whether the requirement statement has a non-atomic defect based on the output data of the detection module. In this embodiment, since the transfer learning model is a pre-trained model, it can be used to extract features of the requirement statement. The convolutional neural network based on deep learning determines whether the requirement statement has a non-atomic defect based on the extracted features, and the detection result has a higher accuracy than the rule-based detection method for non-atomic defect detection.
[0023] The following is an example of the implementation details of the non-atomic defect detection method of this embodiment. The following content is only provided for the convenience of understanding and is not necessary for the implementation of this solution.
[0024] The non-atomic defect detection method in this embodiment is applied to electronic devices. The electronic devices may be terminals, servers, cloud servers, etc. Figure 1 As shown, the detection method of non-atomic defects specifically includes the following steps:
[0025] Step 101: Input the requirement statement into the detection module.
[0026] Specifically, the detection module is a model that is pre-trained to convergence and is used to determine whether a requirement statement has a non-atomic defect. The detection module includes a transfer learning model and a convolutional neural network model. Among them, the presence of a non-atomic defect in a requirement statement means that the requirement statement expresses multiple requirements and does not meet the atomicity requirements of the requirement statement.
[0027] Step 102: Based on the output data of the detection module, determine whether the requirement statement has a non-atomic defect.
[0028] Specifically, the electronic device determines whether the requirement statement has a non-atomic defect based on the output data of the detection module.
[0029] In one example, the output data of the detection module indicates whether the requirement statement has a non-atomic defect. For example, if the requirement statement has a non-atomic defect, the output data of the detection module is a specified first string, and if the requirement statement does not have a non-atomic defect, the output data of the detection module is a specified second string. The first string can be "yes", "1", "exists", etc., and the second string can be "no", "0", "does not exist", etc.
[0030] In another example, the output data of the detection module indicates the type of non-atomic defects of the requirement statement, and the types of non-atomic defects of the requirement statement include non-atomic defects caused by conjunctions and non-atomic defects caused by clause nesting. Many requirement designs can benefit from the concept of atomicity, because the single concept of atomicity helps to analyze software requirements hidden in actions or components composed of multiple steps. Conversely, when defects cause failures during system development, non-atomicity makes it difficult for developers to detect which statement in the requirement specification caused the failure. In this embodiment, in order to better study and solve the non-atomic defects of requirement statements in the future, the non-atomic defects of requirement statements are divided into two categories: non-atomic defects caused by conjunctions and non-atomic defects caused by clause nesting. When a requirement statement uses unnecessary conjunctions to connect two or more complete sentences, it is considered that there is non-atomicity caused by conjunctions (Non-Atomicity from Conjunction). When the nested use of clauses causes non-atomic defects, it is considered that there is a non-atomic defect caused by clause nesting (Non-Atomicity from Clause). For example, in the requirement statement "The system shall confirm the train who says it has sent a message containing acknowledgesigns", the use of nested clauses makes the requirement statement lengthy and confusing, and it is difficult to understand the requirement. Therefore, it is considered that the requirement statement has a non-atomic defect caused by nested clauses. If the requirement statement has a non-atomic defect caused by conjunctions, the output data of the detection module is the specified third string; if the requirement statement has a non-atomic defect caused by nested clauses, the output data of the detection module is the specified fourth string; if the requirement statement does not have a non-atomic defect, the output data of the detection module is the specified fifth string. Among them, the third string can be "non-atomic defect caused by conjunction", "first type defect", "Non-Atomicity from Conjunction", "1", etc., the fourth string can be "non-atomic defect caused by nested clauses", "second type defect", "Non-Atomicity from Clause", "2", etc., and the fifth string can be "non-atomic defect does not exist", "0", etc.
[0031] It is worth mentioning that, in this implementation, the non-atomic defects of the requirement statements are classified from the perspective of the causes of the non-atomic defects in the requirement statements, which is conducive to subsequent research and resolution of the non-atomic defects of the requirement statements.
[0032] It should be noted that those skilled in the art can understand that in practical applications, non-atomic defects can also be classified from other perspectives, and this embodiment does not limit the classification method of non-atomic defects.
[0033] It should be noted that those skilled in the art will appreciate that in actual applications, specific characters or strings of the output data of the detection module may be set as needed, and this implementation is only for illustration and does not limit the specific form of the output data of the detection module.
[0034] In one example, the transfer learning model is a Bidirectional Encoder Representations from Transformers (BERT) model.
[0035] It should be noted that in this embodiment, a suitable BERT model can be selected according to the usage scenario of the BERT model and the project requirements. For example, the BERT model includes a case-sensitive BERT model and a case-insensitive BERT model. In this embodiment, after verifying the effects of the two models, the case-sensitive BERT model is selected.
[0036] It is worth mentioning that since the BERT model is a pre-trained language model, the purpose of pre-training is to train the underlying and common models of its downstream tasks in advance, and then use the sample data of the downstream tasks to train their respective models, which greatly speeds up the convergence speed. In addition, the BERT model is a bidirectional encoding that takes context into account, which has a better effect when performing feature extraction.
[0037] In one example, before inputting the requirement statement into the detection module, the detection method of non-atomic defects further includes: obtaining the requirement document; screening the original requirement document according to the predefined inclusion rule; the inclusion rule indicates that the retained requirement document meets the preset requirements, and the preset requirements include: the number of requirement statements after the requirement document is converted into a text format is greater than a first preset value and / or the number of spelling errors in the requirement document is less than a second preset value; based on the screened requirement document, the detection module is trained. The first preset value and the second preset value can be set as needed, and are not limited here.
[0038] It is worth mentioning that screening the requirement documents makes the screened requirement documents more in line with training requirements and improves the training speed.
[0039] In one example, based on the screened requirement document, before training the detection module, the screened requirement document is preprocessed, and the preprocessing operation includes: removing numbers in the screened requirement document, removing punctuation marks in the screened requirement document, removing single characters in the screened requirement document, and removing continuous spaces in the screened requirement document, or any combination thereof. The single character refers to a single word article (such as "a") that appears alone in a sentence.
[0040] It is worth mentioning that since the cause of non-atomic defects mainly lies in the sentence structure or grammar of the requirement statement, during the training process, removing information irrelevant to non-atomic defects such as numbers and punctuation marks can improve the detection effect of the detection module.
[0041] In one example, based on the screened requirement document, the detection module is trained, including: inputting the screened requirement document into the BERT model; feeding back the output of the BERT model to the convolutional neural network model, and training the convolutional neural network model. Specifically, the natural language-based requirement statements in the screened requirement document are converted into a format suitable for the BERT model, and the features of the converted requirement statements are extracted using the BERT model. The output of the BERT model is fed back to the convolutional neural network model, and the hyperparameters of the convolutional neural network model are fine-tuned. When fine-tuning hyperparameters, such as the number of training set traversals, a larger number of traversals can enable the model to obtain better results on the training set, but there is a risk of overfitting. Therefore, those skilled in the art can set the number of traversals as needed.
[0042] In one example, in order to enable the trained convolutional neural network model to distinguish the types of non-atomic defects in requirement statements, the requirement statements in the screened requirement documents are annotated. The annotations of requirement statements are divided into annotations indicating that the requirement statements do not have non-atomic defects, annotations indicating that the requirement statements have non-atomic defects caused by conjunctions, and annotations indicating that the requirement statements have non-atomic defects caused by nested clauses. The convolutional neural network model trains the parameters of the convolutional neural network model based on the screened requirement documents and annotations, so that the trained convolutional neural network model can distinguish whether the requirement statements have non-atomic defects, and when the requirement statements have non-atomic defects, the types of non-atomic defects.
[0043] It should be noted that, those skilled in the art can understand that in actual applications, other annotations can be established to train the detection module. For example, the annotations of the requirement statements are divided into annotations indicating that the requirement statements do not have non-atomic defects and annotations indicating that the requirement statements have non-atomic defects. This implementation is only for illustrative purposes.
[0044] In one example, the activation function of the convolutional neural network model includes a rectified linear unit (RectifiedLinear Unit, ReLU) function, and the function of the classification layer of the convolutional neural network model includes a Sigmoid function. Specifically, on top of the pre-trained model, the output of the BERT model is fed into the structure of the convolutional neural network. For the output of the hidden layer neurons of the convolutional neural network, the activation function of ReLU is used. For determining whether a requirement statement contains non-atomic defects, or determining what type of non-atomic defects a requirement statement contains, the Sigmoid function is used to obtain the probability distribution and the final judgment result.
[0045] It should be noted that those skilled in the art can understand that in practical applications, other activation functions or classification functions can also be used, and this implementation is only for illustration.
[0046] In one example, the loss function of the training process of the convolutional neural network model is a cross entropy loss function. Specifically, the cross entropy loss function is used in the training process to quantify the closeness of the predicted distribution to the true distribution. The cross entropy loss function can characterize the difference between the true sample label and the predicted probability, thereby "punishing" wrong predictions and "rewarding" correct predictions.
[0047] In one example, the optimization algorithm of the convolutional neural network model is the Adaptive moment estimation (Adam) algorithm. Specifically, the Adam algorithm is used for the optimization algorithm for updating the weights of each part in the neural network. The Adam algorithm designs independent adaptive learning rates for different parameters by calculating the first-order moment estimation and the second-order moment estimation of the gradient.
[0048] It should be noted that those skilled in the art can understand that in practical applications, other loss functions or other optimization algorithms can also be used, and this implementation is only for illustration.
[0049] It should be noted that those skilled in the art can understand that in practical applications, other transfer learning models can also be used, and this embodiment does not limit the specific model type used.
[0050] In one example, a natural language processing framework (GATE framework) and a computer programming language (Python) are used to implement the non-atomic defect detection method based on a transfer learning model and a convolutional neural network model mentioned in this embodiment.
[0051] In this embodiment, in the process of testing the accuracy of the detection module, in order to make the experimental results more realistic, real demand data was used for experiments. Specifically, public real demand documents were collected from the following three data sources as experimental data: other publicly available demand data sets, available demand documents or specifications on the Internet, and demand documents mentioned in existing literature and research papers. Finally, a total of 160 public demand documents were collected, ranging from 1994 to 2019. Subsequently, inclusion / exclusion criteria were established for these demand documents to screen for subsequent annotation work. Inclusion criteria include: no large number of demand statements are lost after the demand documents are converted into text format using automated tools; the format in the document is unified and clear, and there are no large number of spelling errors; the system or system components described are relatively complete. Exclusion criteria include: the document is too long, the text content is too vague to obtain sufficiently accurate results through automated tools; it is written in a fully structured or formalized way and does not fall within the scope of natural language requirements. In the process of screening the requirement documents according to the inclusion / exclusion rules, the non-plain text requirement documents are batch converted into text format through a Python PDF parser (pdfminer) and a command line tool (pdftotext) for converting PDF files into text files. The converted plain text requirement documents are evaluated based on the predefined inclusion / exclusion criteria. The requirement documents that meet less than half of the inclusion criteria or meet more than half of the exclusion marks will be classified into the "exclusion" category, otherwise they will be classified into the "inclusion" category. Experiments were conducted on the "inclusion" category requirement documents, and it was finally found that the accuracy of the detection method for non-atomic defects mentioned in this embodiment reached 90%, which is significantly higher than the 70% accuracy of the existing rule-based detection method.
[0052] It should be noted that the above is only an example and does not limit the technical solution of the present invention.
[0053] Compared with the prior art, the non-atomic defect detection method provided in this embodiment can be used to extract the features of the requirement statement because the transfer learning model is a pre-trained model. The convolutional neural network based on deep learning determines whether the requirement statement has non-atomic defects based on the extracted features. Compared with the rule-based detection method for non-atomic defect detection, the detection result is more accurate.
[0054] The second embodiment of the present invention relates to a method for detecting non-atomic defects. This embodiment is further improved on the basis of the first embodiment, and the specific improvement is: before the requirement statement is input into the detection model, a step of preprocessing the requirement statement is added.
[0055] Specifically, Figure 2As shown, in this embodiment, steps 201 to 203 are included, wherein steps 202 and 203 are substantially the same as steps 101 to 102 in the first embodiment, and are not described in detail here. The following mainly introduces the differences:
[0056] Step 201: preprocessing the initial requirement statement to obtain a requirement statement.
[0057] Specifically, the preprocessing operation includes: removing numbers in the initial requirement statement and / or removing punctuation marks in the initial requirement statement.
[0058] In one example, the pre-processing operation further includes: removing a single character in the initial requirement statement and / or removing consecutive spaces in the initial requirement statement.
[0059] It is worth mentioning that since the cause of non-atomic defects mainly lies in the sentence structure or grammar of the requirement statement, in the process of detecting non-atomic defects, removing numbers, punctuation marks and other information irrelevant to non-atomic defects in the initial requirement statement can improve the detection effect of the detection module.
[0060] Step 202: Input the requirement statement into the detection module.
[0061] Step 203: Determine whether the requirement statement has a non-atomic defect based on the output data of the detection module.
[0062] It should be noted that the above is only an example and does not limit the technical solution of the present invention.
[0063] Compared with the prior art, the non-atomic defect detection method provided in this embodiment can be used to extract the features of the requirement statement because the transfer learning model is a pre-trained model. The convolutional neural network based on deep learning determines whether the requirement statement has non-atomic defects based on the extracted features. Compared with the rule-based detection method for non-atomic defect detection, the detection result is more accurate. In addition, since the cause of non-atomic defects mainly lies in the sentence structure or grammar of the requirement statement, in the process of detecting non-atomic defects, removing numbers, punctuation marks and other information that are not related to non-atomic defects in the initial requirement statement can improve the detection effect of the detection module.
[0064] The step division of the above methods is only for the purpose of clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this patent; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the scope of protection of this patent.
[0065] A third embodiment of the present invention relates to an electronic device, such as Figure 3 As shown, it includes: at least one processor 301; and a memory 302 that is communicatively connected to the at least one processor 301; wherein the memory 302 stores instructions that can be executed by the at least one processor 301, and the instructions are executed by the at least one processor 301 so that the at least one processor 301 can execute the non-atomic defect detection method mentioned in the above embodiment.
[0066] The electronic device includes: one or more processors 301 and a memory 302, Figure 3 A processor 301 is taken as an example. The processor 301 and the memory 302 may be connected via a bus or other means. Figure 3 In the example, the bus connection is used. The memory 302 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The processor 301 executes various functional applications and data processing of the device by running the non-volatile software programs, instructions and modules stored in the memory 302, that is, the above-mentioned non-atomic defect detection method is realized.
[0067] The memory 302 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store a list of options, etc. In addition, the memory 302 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 302 may optionally include a memory remotely arranged relative to the processor 301, and these remote memories may be connected to an external device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0068] One or more modules are stored in the memory 302 , and when executed by one or more processors 301 , the non-atomic defect detection method in any of the above method implementations is executed.
[0069] The above-mentioned product can execute the method provided in the implementation mode of this application, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not fully described in this implementation mode, please refer to the method provided in the implementation mode of this application.
[0070] A fourth embodiment of the present invention relates to a computer-readable storage medium storing a computer program, which implements the above method embodiment when executed by a processor.
[0071] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned implementation method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including a number of instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each implementation of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0072] Those skilled in the art will appreciate that the above-mentioned embodiments are specific embodiments for implementing the present invention, and in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present invention.
Claims
1. A method for detecting non-atomic defects, characterized in that: include: Inputting the requirement statement into a detection module; wherein the detection module is a model pre-trained to convergence for determining whether the requirement statement has a non-atomic defect, and the detection module includes a transfer learning model and a convolutional neural network model; According to the output data of the detection module, determining whether the requirement statement has a non-atomic defect; The output data of the detection module indicates the type of the non-atomic defect of the requirement statement, and the type of the non-atomic defect of the requirement statement includes the non-atomic defect caused by conjunctions and the non-atomic defect caused by clause nesting.
2. The method for detecting non-atomic defects according to claim 1, characterized in that: Before inputting the requirement statement into the detection module, the non-atomic defect detection method further includes: The initial requirement statement is preprocessed to obtain the requirement statement; the preprocessing operation includes: removing numbers in the initial requirement statement and / or removing punctuation marks in the initial requirement statement.
3. The method for detecting non-atomic defects according to claim 2, characterized in that: The preprocessing operation further includes: removing single characters in the initial requirement statement and / or removing consecutive spaces in the initial requirement statement.
4. The method for detecting non-atomic defects according to any one of claims 1 to 3, characterized in that: Before inputting the requirement statement into the detection module, the non-atomic defect detection method further includes: Obtain requirements documents; The original requirement document is screened according to a predefined inclusion rule; the inclusion rule indicates that the retained requirement document meets a preset requirement, wherein the preset requirement includes: the number of requirement statements after the requirement document is converted into a text format is greater than a first preset value and / or the number of spelling errors in the requirement document is less than a second preset value; The detection module is trained based on the screened requirement documents.
5. The method for detecting non-atomic defects according to claim 4, characterized in that: The transfer learning model is a transformer-based bidirectional encoder representation technology BERT model.
6. The method for detecting non-atomic defects according to claim 5, characterized in that: The step of training the detection module based on the screened requirement document includes: Inputting the screened requirement document into the BERT model; The output of the BERT model is fed back to the convolutional neural network model to train the convolutional neural network model.
7. The method for detecting non-atomic defects according to any one of claims 1 to 3, characterized in that: The activation function of the convolutional neural network model includes a rectified linear unit ReLU function, the function of the classification layer of the convolutional neural network model includes a Sigmoid function, the loss function of the training process of the convolutional neural network model is a cross entropy loss function, and the optimization algorithm of the convolutional neural network model is an adaptive moment estimation Adam algorithm.
8. An electronic device, characterized in that: include: at least one processor; as well as, A memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor so that the at least one processor can execute the non-atomic defect detection method as described in any one of claims 1 to 7.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for detecting non-atomic defects according to any one of claims 1 to 7 is implemented.
