CN112069069A - Defect automatic positioning analysis method, device and readable storage medium - Google Patents

Defect automatic positioning analysis method, device and readable storage medium Download PDF

Info

Publication number
CN112069069A
CN112069069A CN202010920498.9A CN202010920498A CN112069069A CN 112069069 A CN112069069 A CN 112069069A CN 202010920498 A CN202010920498 A CN 202010920498A CN 112069069 A CN112069069 A CN 112069069A
Authority
CN
China
Prior art keywords
defect
data
analyzed
knowledge base
matching
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
CN202010920498.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.)
Ping An Trust Co Ltd
Original Assignee
Ping An Trust Co Ltd
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 Ping An Trust Co Ltd filed Critical Ping An Trust Co Ltd
Priority to CN202010920498.9A priority Critical patent/CN112069069A/en
Publication of CN112069069A publication Critical patent/CN112069069A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3604Software analysis for verifying properties of programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2468Fuzzy queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/248Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • G06F16/285Clustering or classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • G06F16/288Entity relationship models
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • G06F40/216Parsing using statistical methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • G06F40/295Named entity recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • 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

Abstract

The invention relates to an automatic test tool, and provides a method, equipment and medium for automatically positioning and analyzing defects. The method comprises the steps of accurately matching defect data to be analyzed based on a text similarity algorithm, so that defect reasons and repair schemes can be quickly matched when common defect problems existing in a defect knowledge base are faced; when the current defect data to be analyzed is invalid in an accurate matching mode, further fuzzy matching is carried out, so that when an accurate result cannot be found, a most matched result which can be found in a current knowledge base is given out; by updating the knowledge base and calibrating the defect data to be verified based on the obtained accurate reason and the repair scheme of the defect data to be verified, the defect analysis result of the defect data only passing through fuzzy matching can be perfected, and the knowledge base is subjected to self-adaptive optimization so as to further improve the defect positioning analysis efficiency. In addition, the invention also relates to a block chain technology, and the defect data to be verified can be stored in the block chain.

Description

Defect automatic positioning analysis method, device and readable storage medium
Technical Field
The invention relates to the technical field of software testing, in particular to a method and equipment for automatically positioning and analyzing defects and a computer readable storage medium.
Background
Whether software developers or software testers, daily work is closely related to software defects. The tester needs to find program defects or functional problems as much as possible before the program project is formally online, and the program project is repaired one by developers, so that the program project is guaranteed to be delivered and used stably with high quality according to the actual requirements of users, and the process usually needs a large amount of time, so that how to quickly and accurately find and locate the causes of the defects and effectively repair the defects in a targeted manner are difficult problems faced by the developers and the testers for a long time.
At present, software defects are inspected and positioned manually by methods of log query, packet capture analysis and the like in the industry, the efficiency of inspection and positioning depends on personal experiences of testing and developers, the positioning process is blind and difficult, and the defects cannot be repaired in time after being discovered, so that the development and testing progress is blocked, and the technical problem of low efficiency of the conventional software defect positioning analysis mode is caused.
Disclosure of Invention
The invention mainly aims to provide a method, equipment and a computer readable storage medium for automatically positioning and analyzing defects, and aims to solve the technical problem that the existing software defect positioning and analyzing mode is low in efficiency.
In order to achieve the above object, the present invention provides an automatic defect positioning and analyzing method, which comprises the following steps:
acquiring defect data to be analyzed, extracting keywords in the defect data to be analyzed, and accurately matching the keywords in a preset defect knowledge base based on a preset text similarity algorithm, wherein the defect knowledge base comprises multi-class defect sample data, and defect reasons and repair schemes corresponding to the multi-class defect sample data;
when the current accurate matching is detected to fail, identifying the defect type to which the defect data to be analyzed belongs, and searching a target defect reason and a target repair scheme corresponding to the defect type in the defect knowledge base to complete fuzzy matching of the defect data to be analyzed;
and taking the fuzzy-matched defect data to be analyzed as defect data to be verified, and updating the accurate defect reason and the accurate repair scheme into the defect knowledge base when the accurate defect reason and the accurate repair scheme of the defect data to be verified are obtained so as to calibrate the defect data to be calibrated.
Optionally, when it is detected that the current precise matching fails, the step of identifying the defect type to which the defect data to be analyzed belongs, and searching a target defect cause and a target repair scheme corresponding to the defect type in the defect knowledge base to complete fuzzy matching of the defect data to be analyzed includes:
when the current accurate matching is detected to fail, recognizing entity information of the defect data to be analyzed by using a preset entity recognition model, and obtaining the problem template based on the entity information;
performing multi-level semantic analysis on the defect data to be analyzed to obtain multi-level semantics of the defect data to be analyzed;
predicting the defect category of the defect data to be analyzed corresponding to the defect knowledge base by using a preset probability map model and combining the problem template and the multi-level semantics;
and converting the defect data to be analyzed into structured query of the defect knowledge base according to the defect category and the entity information, and querying to obtain the target defect reason and a target repair scheme so as to complete fuzzy matching of the defect data to be analyzed.
Optionally, after the step of taking the fuzzy-matched defect data to be analyzed as defect data to be verified, and when obtaining an accurate defect reason and an accurate repair scheme of the defect data to be verified, updating the accurate defect reason and the accurate repair scheme into the defect knowledge base to calibrate the defect data to be calibrated, the method further includes:
performing characteristic marking on the calibrated defect data to be calibrated to serve as characteristic defect data;
and when the fuzzy matching is detected to be currently performed, preferentially selecting the characteristic defect data for matching.
Optionally, before the step of obtaining the defect data to be analyzed and extracting the keyword in the defect data to be analyzed, the method further includes:
acquiring defect sample data, and performing pre-screening and format conversion on the defect sample data to obtain target sample data;
classifying the target sample data based on a preset classification algorithm to obtain multi-class defect sample data corresponding to a plurality of defect classes;
extracting and screening the multi-class defect sample data to obtain defect reasons and repair schemes corresponding to the defect classes, and establishing a mapping relation among the defect classes, the defect reasons and the repair scheme information;
and when the data volume of the multi-class defect sample data is detected to reach a preset data volume threshold value, constructing the defect knowledge base so as to perform automatic defect positioning analysis based on the defect knowledge base.
Optionally, the text similarity algorithm comprises a cosine distance algorithm,
the step of obtaining the defect data to be analyzed, extracting the keywords in the defect data to be analyzed, and accurately matching the keywords in a preset defect knowledge base based on a preset text similarity algorithm comprises the following steps:
performing word segmentation processing on the to-be-analyzed defect data by using a natural language processing technology to extract keywords in the to-be-analyzed defect data;
generating a first word frequency vector set of the keywords in the defect data to be analyzed and a second word frequency vector set of the keywords in the defect knowledge base;
and a cosine distance algorithm is used for obtaining a cosine similarity set between the first word frequency vector and the second word frequency vector, so that the keywords are accurately matched in the defect knowledge base based on the cosine similarity set.
Optionally, after the step of obtaining a cosine similarity set between the first word frequency vector and the second word frequency vector by using a cosine distance algorithm to accurately match the keyword in the defect knowledge base based on the cosine similarity set, the method further includes:
judging whether a target cosine similarity exceeding a preset similarity threshold exists in the cosine similarity set or not;
if so, judging that the current accurate matching is successful;
if not, judging that the current accurate matching fails.
Optionally, after the step of obtaining the defect data to be analyzed and extracting the keywords in the defect data to be analyzed to perform the precise matching of the keywords in the preset defect knowledge base based on a preset text similarity algorithm, the method further includes:
when the cosine similarity set is detected to have target cosine similarity exceeding a preset similarity threshold, acquiring matched defect sample data corresponding to the target cosine similarity in the defect knowledge base;
and acquiring a matching problem reason and a matching repair scheme corresponding to the matching defect sample data, and displaying the matching problem reason and the matching repair scheme in a correlation manner.
Optionally, after the step of taking the fuzzy-matched defect data to be analyzed as defect data to be verified, and when obtaining an accurate defect reason and an accurate repair scheme of the defect data to be verified, updating the accurate defect reason and the accurate repair scheme into the defect knowledge base to calibrate the defect data to be calibrated, the method further includes:
and regularly screening common defect data with the actual reproduction times exceeding a preset time threshold from the defect knowledge base according to a preset time interval, and determining common defect types, common defect reasons and common repair schemes corresponding to the common defect data to generate a visual common defect statistical table.
In addition, in order to achieve the above object, the present invention provides an automatic defect positioning and analyzing apparatus, including:
the accurate matching module is used for acquiring defect data to be analyzed, extracting key words in the defect data to be analyzed and accurately matching the key words in a preset defect knowledge base based on a preset text similarity algorithm, wherein the defect knowledge base comprises multi-class defect sample data and defect reasons and repair schemes corresponding to the multi-class defect sample data;
the fuzzy matching module is used for identifying the defect type to which the defect data to be analyzed belongs when the current precise matching is detected to be failed, and searching a target defect reason and a target repairing scheme corresponding to the defect type in the defect knowledge base so as to complete fuzzy matching of the defect data to be analyzed;
and the defect calibration module is used for taking the fuzzy-matched defect data to be analyzed as the defect data to be verified, and updating the accurate defect reason and the accurate repair scheme into the defect knowledge base when the accurate defect reason and the accurate repair scheme of the defect data to be verified are obtained so as to calibrate the defect data to be calibrated.
Optionally, the fuzzy matching module comprises:
the problem module acquisition unit is used for identifying entity information of the defect data to be analyzed by using a preset entity identification model when the current accurate matching is detected to fail, and obtaining the problem template based on the entity information;
the multilayer semantic analysis unit is used for carrying out multilayer semantic analysis on the defect data to be analyzed to obtain multilayer semantics of the defect data to be analyzed;
the defect type prediction unit is used for predicting the defect type of the defect data to be analyzed corresponding to the defect knowledge base by using a preset probability map model and combining the problem template and the multi-level semantics;
and the fuzzy matching completion unit is used for converting the defect data to be analyzed into structured query of the defect knowledge base according to the defect type and the entity information, and querying to obtain the target defect reason and a target repair scheme so as to complete fuzzy matching of the defect data to be analyzed.
Optionally, the apparatus for automatically positioning and analyzing defects further includes:
the characteristic marking module is used for carrying out characteristic marking on the calibrated defect data to be calibrated to serve as characteristic defect data;
and the priority matching module is used for preferentially selecting the characteristic defect data for matching when the fuzzy matching is detected to be currently performed.
Optionally, the apparatus for automatically positioning and analyzing defects further includes:
the screening conversion module is used for acquiring defect sample data, and performing pre-screening and format conversion on the defect sample data to obtain target sample data;
the data classification module is used for classifying the target sample data based on a preset classification algorithm to obtain multi-class defect sample data corresponding to a plurality of defect classes;
the mapping establishing module is used for extracting and screening the multi-class defect sample data to obtain defect reasons and repair schemes corresponding to the defect classes and establishing mapping relations among the defect classes, the defect reasons and the repair scheme information;
and the knowledge base construction module is used for constructing the defect knowledge base when the data volume of the multi-class defect sample data is detected to reach a preset data volume threshold value so as to perform automatic defect positioning analysis based on the defect knowledge base.
Optionally, the text similarity algorithm comprises a cosine distance algorithm,
the exact match module includes:
the key extraction unit is used for performing word segmentation processing on the to-be-analyzed defect data by using a natural language processing technology so as to extract key words in the to-be-analyzed defect data;
the word frequency generating unit is used for generating a first word frequency vector set of the keywords in the defect data to be analyzed and a second word frequency vector set of the keywords in the defect knowledge base;
and the precise matching unit is used for acquiring a cosine similarity set between the first word frequency vector and the second word frequency vector by using a cosine distance algorithm so as to precisely match the keywords in the defect knowledge base based on the cosine similarity set.
Optionally, the apparatus for automatically positioning and analyzing defects further includes:
the accurate matching judgment module is used for judging whether the target cosine similarity exceeding a preset similarity threshold exists in the cosine similarity set or not;
if so, judging that the current accurate matching is successful;
if not, judging that the current accurate matching fails.
Optionally, the apparatus for automatically positioning and analyzing defects further includes:
a matching sample acquisition module, configured to acquire matching defect sample data corresponding to a target cosine similarity in the defect knowledge base when it is detected that the target cosine similarity exceeding a preset similarity threshold exists in the cosine similarity set;
and the result correlation display module is used for acquiring the matching problem reason and the matching repair scheme corresponding to the matching defect sample data and performing correlation display on the matching problem reason and the matching repair scheme.
Optionally, the apparatus for automatically positioning and analyzing defects further includes:
and the regular statistic module is used for regularly screening common defect data of which the actual reproduction times exceed a preset time threshold from the defect knowledge base according to a preset time interval, and determining common defect types, common defect reasons and common repair schemes corresponding to the common defect data so as to generate a visual common defect statistical table.
In addition, in order to achieve the above object, the present invention further provides a defect automatic positioning and analyzing apparatus, which includes a processor, a memory, and a defect automatic positioning and analyzing program stored on the memory and executable by the processor, wherein when the defect automatic positioning and analyzing program is executed by the processor, the steps of the defect automatic positioning and analyzing method as described above are implemented.
In addition, to achieve the above object, the present invention further provides a computer readable storage medium, on which a defect automatic location analysis program is stored, wherein when the defect automatic location analysis program is executed by a processor, the steps of the defect automatic location analysis method are implemented as described above.
The invention provides a method, equipment and a computer-readable storage medium for automatically positioning and analyzing defects, wherein the method for automatically positioning and analyzing the defects accurately matches defect data to be analyzed based on a text similarity algorithm, so that the defect reasons and repair schemes can be quickly matched and obtained when the common defect problems existing in a defect knowledge base are faced; when the current defect data to be analyzed is invalid in an accurate matching mode, fuzzy matching is further carried out, a large class matched with the defect data in a knowledge base is searched, namely the defect type, and then the reason and the repair scheme corresponding to the defect type are correspondingly found to serve as the result of the fuzzy matching, so that when the accurate result cannot be found, the most similar result which can be found in the current knowledge base is given out firstly; by updating the knowledge base and calibrating the defect data to be verified based on the accurate reason and the repair scheme of the defect data to be verified, the defect analysis result of the defect data only passing through fuzzy matching can be perfected, and the knowledge base is subjected to self-adaptive optimization to further improve the defect positioning analysis efficiency, so that the technical problem of low efficiency of the existing software defect positioning analysis mode is solved. In addition, compared with the traditional manual defect positioning methods such as log query, packet capture analysis and the like, the automatic defect positioning analysis method can realize self-calibration of positioning results through a self-adaptive optimization process, can well help development and testers to quickly position program defects when being applied to a software development test flow, provides reliable and effective repair suggestions, and realizes quick repair of the defects. Especially, the program project scale is large, the service scene is complex, and when multi-user collaborative development and testing are involved, the defect troubleshooting and positioning time can be obviously shortened, the development and testing efficiency is improved, and the high quality and reliability of the software program are ensured.
Drawings
Fig. 1 is a schematic diagram of a hardware structure of an automatic defect location and analysis device according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart illustrating a method for automatically locating and analyzing defects according to a first embodiment of the present invention;
FIG. 3 is a functional block diagram of the automatic defect location and analysis apparatus of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The automatic defect positioning and analyzing method is mainly applied to automatic defect positioning and analyzing equipment, wherein the automatic defect positioning and analyzing equipment can be equipment with display and processing functions, such as a PC (personal computer), a portable computer, a mobile terminal and the like.
Referring to fig. 1, fig. 1 is a schematic diagram of a hardware structure of an automatic defect location and analysis apparatus according to an embodiment of the present invention. In the embodiment of the present invention, the automatic defect location and analysis device may include a processor 1001 (e.g., a CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used for realizing connection communication among the components; the user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard); the network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface); the memory 1005 may be a high-speed RAM memory, or may be a non-volatile memory (e.g., a magnetic disk memory), and optionally, the memory 1005 may be a storage device independent of the processor 1001.
Those skilled in the art will appreciate that the hardware configuration shown in fig. 1 does not constitute a limitation of the automatic defect localization analysis apparatus, and may include more or fewer components than those shown, or some components in combination, or a different arrangement of components.
With continued reference to FIG. 1, the memory 1005 of FIG. 1, which is one type of computer-readable storage medium, may include an operating system, a network communication module, and a defect auto-location analysis program.
In fig. 1, the network communication module is mainly used for connecting to a server and performing data communication with the server; the processor 1001 may call the automatic defect location analysis program stored in the memory 1005, and execute the automatic defect location analysis method provided by the embodiment of the present invention.
Based on the hardware structure, the invention provides various embodiments of the automatic defect positioning and analyzing method.
Whether software developers or software testers, daily work is closely related to software defects. The tester needs to find program defects or functional problems as much as possible before the program project is formally online, and the program project is repaired one by developers, so that the program project is guaranteed to be delivered and used stably with high quality according to the actual requirements of users, and the process usually needs a large amount of time, so that how to quickly and accurately find and locate the causes of the defects and effectively repair the defects in a targeted manner are difficult problems faced by the developers and the testers for a long time.
At present, software defects are inspected and positioned manually by methods of log query, packet capture analysis and the like in the industry, the efficiency of inspection and positioning depends on personal experiences of testing and developers, the positioning process is blind and difficult, and the defects cannot be repaired in time after being discovered, so that the development and testing progress is blocked, and the technical problem of low efficiency of the conventional software defect positioning analysis mode is caused.
In order to solve the problems, the invention provides a defect automatic positioning analysis method, namely, the defect data to be analyzed is accurately matched based on a text similarity algorithm, so that the defect reason and the repair scheme can be quickly matched when the existing common defect problems in a defect knowledge base are faced; when the current defect data to be analyzed is invalid in an accurate matching mode, fuzzy matching is further carried out, a large class matched with the defect data in a knowledge base is searched, namely the defect type, and then the reason and the repair scheme corresponding to the defect type are correspondingly found to serve as the result of the fuzzy matching, so that when the accurate result cannot be found, the most similar result which can be found in the current knowledge base is given out firstly; by updating the knowledge base and calibrating the defect data to be verified based on the accurate reason and the repair scheme of the defect data to be verified, the defect analysis result of the defect data only passing through fuzzy matching can be perfected, and the knowledge base is subjected to self-adaptive optimization to further improve the defect positioning analysis efficiency, so that the technical problem of low efficiency of the existing software defect positioning analysis mode is solved. In addition, compared with the traditional manual defect positioning methods such as log query, packet capture analysis and the like, the automatic defect positioning analysis method can realize self-calibration of positioning results through a self-adaptive optimization process, can well help development and testers to quickly position program defects when being applied to a software development test flow, provides reliable and effective repair suggestions, and realizes quick repair of the defects. Especially, the program project scale is large, the service scene is complex, and when multi-user collaborative development and testing are involved, the defect troubleshooting and positioning time can be obviously shortened, the development and testing efficiency is improved, and the high quality and reliability of the software program are ensured.
Referring to fig. 2, fig. 2 is a schematic flow chart of a first embodiment of the method for automatically positioning and analyzing defects of the present invention.
The first embodiment of the present invention provides a method for automatically positioning and analyzing defects, which includes the following steps:
step S10, acquiring defect data to be analyzed, extracting keywords in the defect data to be analyzed, and accurately matching the keywords in a preset defect knowledge base based on a preset text similarity algorithm, wherein the defect knowledge base comprises multi-class defect sample data, defect reasons and repair schemes corresponding to the multi-class defect sample data;
in this embodiment, the defect data to be analyzed is usually defect data encountered by a software developer or a software tester in daily work, and can be obtained from a defect management platform, an automation test platform, a security vulnerability scanning tool, and the like. The keywords are words which can represent actual meanings in the defect data to be analyzed, and specifically, invalid words without actual meanings such as tone words and pause words can be firstly screened from the defect data to be analyzed, so that the extraction efficiency of the keywords is improved conveniently. The preset text similarity algorithm may specifically be an euclidean distance, a cosine similarity, a jaccard distance, an edit distance, a hamiltonian distance, and the like, and this embodiment is not specifically limited. The multi-class defect sample data is defect sample data belonging to multiple defect classes, and the defect classes can be UI display abnormity, interface error reporting and data writing table errors. Security holes, and the like.
The method applies and loads a defect automatic positioning analysis system (hereinafter referred to as system) of a defect automatic positioning analysis program. When a user submits new defect data to the defect management platform, the system receives the current defect data to be analyzed reported by the defect management platform and triggers automatic comparison with a defect knowledge base preset in the system. The system firstly extracts keywords according to the phenomenon description of the defect to be analyzed, which is submitted currently, and the specific extraction means is usually natural language processing. After the system provides the keywords for describing the phenomenon of the defect to be analyzed, the keywords are utilized to be accurately matched with defect sample data in a defect knowledge base. The specific precise matching method generally includes obtaining similarity between the keyword and each defect sample data, and comparing the similarity with a preset similarity threshold. If the similarity exceeds the threshold value, the system can judge that the data is matched with the defect data to be analyzed accurately and successfully; if the similarity does not exceed the threshold, the system can determine that the accurate matching with the defect data to be analyzed fails. And if the similarity between a plurality of keywords of the defect data to be analyzed and the keywords exceeds a threshold value, selecting the defect sample data with the highest similarity as an accurate matching object.
Step S20, when the current precise matching is detected to fail, identifying the defect type to which the defect data to be analyzed belongs, and searching a target defect reason and a target repair scheme corresponding to the defect type in the defect knowledge base to complete fuzzy matching of the defect data to be analyzed;
in this embodiment, when the system fails to accurately analyze the defect data to be analyzed (specifically, there is no multi-class defect sample data with similarity exceeding a preset threshold with the keyword in the knowledge base), the system continues to perform fuzzy matching on the defect data. The system takes the defect data to be analyzed as the input of a preset classification algorithm to obtain the defect category of the defect data to be analyzed. The system finds the defect type in the defect knowledge base, and the target defect reason and the target repair scheme corresponding to the defect type as the result of the fuzzy matching. The system can directly display the target defect reason and the target repair scheme at the front end for the user to directly obtain. It should be noted that, in practical applications, the identification mode of the defect category may be a classification algorithm-based mode, or a structured query mode that converts the defect data to be identified into a defect knowledge base. The classification algorithm may be a Support Vector Machine (SVM), a random forest, a decision tree, a nearest neighbor algorithm (K-NN, K-nearest neighbor), etc., and the present embodiment is not particularly limited,
step S30, the fuzzy-matched defect data to be analyzed is used as the defect data to be verified, and when the accurate defect reason and the accurate repair scheme of the defect data to be verified are obtained, the accurate defect reason and the accurate repair scheme are updated to the defect knowledge base, so that the defect data to be calibrated is calibrated.
In this embodiment, the defect data to be verified is defect data whose result is obtained by performing fuzzy matching after the precise matching fails.
And the system marks the mark to be verified on the fuzzy matched defect data to be analyzed to be used as the defect data to be verified. When the defects are received, the accurate defect reasons and the accurate repair schemes of the defect data to be verified of the system mobile phone are associated with the defect data to be verified and updated into a defect knowledge base so as to verify the defect data to be verified. And comparing the characteristic defects in the knowledge base in priority in the next fuzzy matching so as to realize self-adaptive positioning result calibration. The system can also take the defect data which is already checked and the defect reason, the repair scheme and the defect category which correspond to the defect data as a new training data set to carry out optimization training on the classification algorithm so as to improve the identification accuracy of the classification algorithm. Meanwhile, the system carries out diff positioning on the codes, analyzes the latest submitted codes with defects, marks the changed code segments with red, and developers can quickly finish the defect repair by referring to the analysis results and the repair suggestions.
As a specific embodiment, the automatic defect positioning and analyzing system firstly collects data, collects BUG data found in daily tests, and forms a quality closed loop according to the reason and the repairing scheme of the mobile phone problems after repairing; then, establishing mapping relations among the problem representation, the problem reasons and the problem repair scheme, rapidly positioning the reasons according to the problem representation and classification, and giving repair suggestions; then, a knowledge base is constructed, a common problem set of the system is maintained, statistics and analysis are carried out periodically, potential quality hazards are identified, and coding experience is shared; and finally, performing self-adaptive optimization, calibrating an automatic positioning result, and continuously optimizing the positioning accuracy through a self-adaptive process.
In the embodiment, the method comprises the steps of obtaining defect data to be analyzed, extracting keywords in the defect data to be analyzed, and accurately matching the keywords in a preset defect knowledge base based on a preset text similarity algorithm, wherein the defect knowledge base comprises multi-class defect sample data, defect reasons corresponding to the multi-class defect sample data and a repair scheme; when the current accurate matching is detected to fail, identifying the defect type to which the defect data to be analyzed belongs, and searching a target defect reason and a target repair scheme corresponding to the defect type in the defect knowledge base to complete fuzzy matching of the defect data to be analyzed; and taking the fuzzy-matched defect data to be analyzed as defect data to be verified, and updating the accurate defect reason and the accurate repair scheme into the defect knowledge base when the accurate defect reason and the accurate repair scheme of the defect data to be verified are obtained so as to calibrate the defect data to be calibrated. By the method, the defect data to be analyzed is accurately matched based on the text similarity algorithm, so that the defect reason and the repair scheme can be quickly matched when the common defect problems existing in the defect knowledge base are faced; when the current defect data to be analyzed is invalid in an accurate matching mode, fuzzy matching is further carried out, a large class matched with the defect data in a knowledge base is searched, namely the defect type, and then the reason and the repair scheme corresponding to the defect type are correspondingly found to serve as the result of the fuzzy matching, so that when the accurate result cannot be found, the most similar result which can be found in the current knowledge base is given out firstly; by updating the knowledge base and calibrating the defect data to be verified based on the accurate reason and the repair scheme of the defect data to be verified, the defect analysis result of the defect data only passing through fuzzy matching can be perfected, and the knowledge base is subjected to self-adaptive optimization to further improve the defect positioning analysis efficiency, so that the technical problem of low efficiency of the existing software defect positioning analysis mode is solved. In addition, compared with the traditional manual defect positioning methods such as log query, packet capture analysis and the like, the automatic defect positioning analysis method can realize self-calibration of positioning results through a self-adaptive optimization process, can well help development and testers to quickly position program defects when being applied to a software development test flow, provides reliable and effective repair suggestions, and realizes quick repair of the defects. Especially, the program project scale is large, the service scene is complex, and when multi-user collaborative development and testing are involved, the defect troubleshooting and positioning time can be obviously shortened, the development and testing efficiency is improved, and the high quality and reliability of the software program are ensured.
Further, based on the first embodiment shown in fig. 2, a second embodiment of the method for automatically positioning and analyzing defects of the present invention is provided. In this embodiment, step S20 includes:
when the current accurate matching is detected to fail, recognizing entity information of the defect data to be analyzed by using a preset entity recognition model, and obtaining the problem template based on the entity information;
performing multi-level semantic analysis on the defect data to be analyzed to obtain multi-level semantics of the defect data to be analyzed;
predicting the defect category of the defect data to be analyzed corresponding to the defect knowledge base by using a preset probability map model and combining the problem template and the multi-level semantics;
and converting the defect data to be analyzed into structured query of the defect knowledge base according to the defect category and the entity information, and querying to obtain the target defect reason and a target repair scheme so as to complete fuzzy matching of the defect data to be analyzed.
In this embodiment, when the system detects that the current exact match fails (for example, the highest value of the cosine similarity is lower than the preset similarity threshold), an entity recognition model based on Long Short-Term Memory (LSTM) -Conditional Random Field (CRF) may be used to recognize an entity part from a natural language part of the defect data to be analyzed, and may map entities in the natural sentence to corresponding concepts, and conceptualization of the natural language may assist the model in learning more accurate semantic information. The system can convert the defect knowledge base into the knowledge graph, and attribute expansion is carried out through attributes (relationship types) in the knowledge graph to obtain more relationship expressions. And obtaining a high-quality problem template by mapping the entity concept and expanding the attribute of the knowledge base map.
The system firstly carries out multi-level semantic analysis on defect data to be identified, then comprehensively uses semantic analysis results of problems by using a preset probability map model, predicts attribute types of the defect data to be identified corresponding to a knowledge graph through an obtained problem template, finally converts the defect data to be identified into structured query of the knowledge graph according to the obtained attribute types and information such as entities in the defect data to be identified, and queries a defect knowledge base to obtain a target defect reason and a target repair scheme of a current best-matched character with the defect data to be identified so as to complete fuzzy matching of the defect data to be analyzed.
Further, after step S30, the method further includes:
performing characteristic marking on the calibrated defect data to be calibrated to serve as characteristic defect data;
and when the fuzzy matching is detected to be currently performed, preferentially selecting the characteristic defect data for matching.
In this embodiment, the system marks the feature identifier on the defect of the calibrated defect data to be calibrated as feature defect data, and preferentially compares the feature defect data with the feature defect data in the knowledge base in the next fuzzy matching, thereby realizing the calibration of the self-adaptive positioning result. Meanwhile, the system carries out diff positioning on the codes, analyzes the latest submitted codes with defects, marks the changed code segments with red, and development colleagues can quickly finish defect repair by referring to the analysis results and repair suggestions.
It is emphasized that the characteristic defect data may also be stored in a node of a block chain in order to further ensure privacy and security of the characteristic defect data.
Further, before step S10, the method further includes:
acquiring defect sample data, and performing pre-screening and format conversion on the defect sample data to obtain target sample data;
classifying the target sample data based on a preset classification algorithm to obtain multi-class defect sample data corresponding to a plurality of defect classes;
extracting and screening the multi-class defect sample data to obtain defect reasons and repair schemes corresponding to the defect classes, and establishing a mapping relation among the defect classes, the defect reasons and the repair scheme information;
and when the data volume of the multi-class defect sample data is detected to reach a preset data volume threshold value, constructing the defect knowledge base so as to perform automatic defect positioning analysis based on the defect knowledge base.
In this embodiment, the defect sample data may be acquired from a defect management platform, an automatic test platform, and a security vulnerability scanning tool. The purpose of the format conversion operation is to convert defect sample data, which may be of different types, into a unified format. The pre-screening mode can be specifically screening according to specific marks in the sample defect cards. The unified format after conversion may specifically be a JSON format, a string format, or the like. The predetermined classification algorithm may be a Support Vector Machine (SVM), a random forest, a decision tree, a nearest neighbor algorithm (K-NN, K-nearest neighbor), and the like.
Specifically, when a defect knowledge base is constructed in the early stage, the system firstly collects defect sample data from a defect management platform, an automatic test platform and a security vulnerability scanning tool, and maintains basic defect information including defect phenomenon description, causes of problem generation and a problem repairing method, wherein the problem causes and the repairing method need manual maintenance in the initial stage of defect card acceptance; after data acquisition is finished, the data enters a processing layer, firstly, invalid data such as false test report or actual invalid data which is not a defect is screened out through preprocessing, then, the defect data acquired by different platforms are converted into a uniform format, and then, the defect screening is divided into a plurality of categories such as UI display abnormity, interface error report, data writing table error, security loophole and the like through KNN classification algorithm processing; after the data processing is finished, the data reaches an analysis layer, the acquired defect data is analyzed, the appearance and the cause of each defect are established, the mapping relation among the three methods is solved, and meanwhile, the mapping relation is maintained in a knowledge base; when the defect sample data in the knowledge base is maintained to a certain scale, the knowledge base at the moment can be used as a defect knowledge base which can be directly used, and an automatic positioning analysis process is executed.
Further, after step S30, the method further includes:
and regularly screening common defect data with the actual reproduction times exceeding a preset time threshold from the defect knowledge base according to a preset time interval, and determining common defect types, common defect reasons and common repair schemes corresponding to the common defect data to generate a visual common defect statistical table.
In this embodiment, the preset time interval is a duration for periodically counting the common defects, and the preset time threshold is a critical value for determining whether the defects are common or not, and can be flexibly set and changed according to actual requirements, for example, a week, a half month, and the like can be taken. The system is installed for a preset time interval, such as one month, a visual report of common defects is generated every month, classification, problem reasons, recurrence times and repair suggestions of the common defects can be regularly counted and analyzed, quality hidden dangers of software projects can be better identified, measures are taken in a targeted mode to solve the problem, and important marks are marked on the defects of the same type which repeatedly appear for many times.
Furthermore, by fusing the problem template and a multi-level semantic analysis technology, the complexity of the model can be effectively reduced, the defect data to be analyzed can be deeply understood, and the precision of the model is improved; the characteristic mark is marked on the defect data subjected to fuzzy matching, and the characteristic defects in the knowledge base are preferentially compared in the next fuzzy matching, so that the self-adaptive positioning result calibration is realized; by constructing a defect knowledge base in advance and continuously supplementing and optimizing the defect knowledge base in the using process, the accumulation of defect repairing experience can be realized, closed-loop management is formed, and the efficiency of automatic defect positioning analysis based on the defect knowledge base is continuously improved; through the statistical table of regularly generating common defect problems, the representative result in the automatic defect positioning process can be regularly displayed, the targeted measures can be conveniently taken for solving, and the common problems are gradually avoided.
Further, based on the first embodiment shown in fig. 2, a third embodiment of the method for automatically positioning and analyzing defects of the present invention is provided. In this embodiment, the text similarity algorithm includes a cosine distance algorithm, and step S10 includes:
performing word segmentation processing on the to-be-analyzed defect data by using a natural language processing technology to extract keywords in the to-be-analyzed defect data;
in the present embodiment, based on natural language processing technology, a given text (a text portion in defect data to be analyzed) is first segmented according to a complete sentence, that is: for each sentence, performing word segmentation and part-of-speech tagging, filtering out stop words, only reserving words with specified part-of-speech, such as nouns, verbs and the like, and constructing a candidate keyword graph G (V, E), wherein V is a node set and consists of candidate keywords; and then, according to a formula of TextRank (a keyword extraction algorithm), which is inspired by Google's PageRank, the text is divided into a plurality of composition units (words and sentences) and a graph model is established, important components in the text are sequenced by using a voting mechanism, keyword extraction can be realized only by using the information of a single document, and the weights of all nodes are propagated in an iterative manner until convergence. And finally, carrying out reverse ordering on the node weights, thereby obtaining the most important T words as candidate keywords.
Generating a first word frequency vector set of the keywords in the defect data to be analyzed and a second word frequency vector set of the keywords in the defect knowledge base;
and a cosine distance algorithm is used for obtaining a cosine similarity set between the first word frequency vector and the second word frequency vector, so that the keywords are accurately matched in the defect knowledge base based on the cosine similarity set.
In this embodiment, the first word frequency vector set is a set of word frequency vectors of the currently extracted keywords in the defect data to be analyzed, and the second word frequency vector is a set of word frequency vectors of the currently extracted keywords in the defect knowledge base. The system is based on a cosine distance calculation principle, the currently extracted keywords are used as a keyword set, the word frequency of the keywords in the keyword set by two parties is respectively calculated, and respective word frequency vectors (a first word frequency vector and a second word frequency vector) of the two parties are generated; and finally, calculating the cosine similarity of the two vector sets, combining the cosine similarity values of the vectors into one set, wherein the cosine similarity is more similar when the cosine similarity is larger. The system can take the problem reason and the repair scheme corresponding to the defect sample data with the highest similarity (higher than a preset similarity threshold) in the knowledge base as the current accurate matching result.
Further, after the step of obtaining a cosine similarity set between the first word frequency vector and the second word frequency vector by using a cosine distance algorithm to accurately match the keyword in the defect knowledge base based on the cosine similarity set, the method further includes:
judging whether a target cosine similarity exceeding a preset similarity threshold exists in the cosine similarity set or not;
if so, judging that the current accurate matching is successful;
if not, judging that the current accurate matching fails.
In this embodiment, the preset similarity threshold may be flexibly set according to actual requirements, and this embodiment is not particularly limited. The system judges whether a target cosine similarity exceeding a preset similarity threshold exists in the cosine similarity set, and if the target cosine similarity exceeding the preset similarity threshold exists in the cosine similarity set, the system judges that the current accurate matching is successful; if the target cosine similarity exceeding the preset similarity threshold does not exist in the cosine similarity set, namely the cosine similarity of each word frequency vector is lower than the preset similarity threshold, the current accurate matching is judged to fail, and then the fuzzy matching can be turned.
Further, after step S10, the method further includes:
when the cosine similarity set is detected to have target cosine similarity exceeding a preset similarity threshold, acquiring matched defect sample data corresponding to the target cosine similarity in the defect knowledge base;
and acquiring a matching problem reason and a matching repair scheme corresponding to the matching defect sample data, and displaying the matching problem reason and the matching repair scheme in a correlation manner.
In this embodiment, when the system detects that the target cosine similarity exceeding the preset similarity threshold exists in the cosine similarity set, the system directly obtains matching defect sample data corresponding to the target cosine similarity in the defect knowledge base, obtains a matching problem reason and a matching repair scheme corresponding to the matching defect sample data in the knowledge base, and directly displays the matching problem reason and the matching repair scheme in a front-end association manner, so that a user can directly view the matching problem sample data.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
Furthermore, the precise matching is carried out by adopting a natural language processing technology and a cosine distance principle, so that the precise matching process is more accurate and efficient; whether the precise matching is successful or not is judged by setting a similarity threshold value, so that the judgment of the precise matching result is simpler and easier; by carrying out the correlated display on the matching result when the accurate matching is successful, the user can directly check the matching result, and the user experience is improved.
In addition, as shown in fig. 3, in order to achieve the above object, the present invention further provides an automatic defect localization analysis device, including:
the accurate matching module 10 is configured to obtain defect data to be analyzed, extract a keyword in the defect data to be analyzed, and perform accurate matching on the keyword in a preset defect knowledge base based on a preset text similarity algorithm, where the defect knowledge base includes multi-class defect sample data, and a defect cause and a repair scheme corresponding to the multi-class defect sample data;
the fuzzy matching module 20 is configured to, when it is detected that the current precise matching fails, identify a defect type to which the defect data to be analyzed belongs, and search a target defect reason and a target repair scheme corresponding to the defect type in the defect knowledge base, so as to complete fuzzy matching on the defect data to be analyzed;
the defect calibration module 30 is configured to use the fuzzy-matched defect data to be analyzed as defect data to be verified, and update the accurate defect reason and the accurate repair scheme to the defect knowledge base when the accurate defect reason and the accurate repair scheme of the defect data to be verified are obtained, so as to calibrate the defect data to be calibrated.
Optionally, the fuzzy matching module 10 includes:
the problem module acquisition unit is used for identifying entity information of the defect data to be analyzed by using a preset entity identification model when the current accurate matching is detected to fail, and obtaining the problem template based on the entity information;
the multilayer semantic analysis unit is used for carrying out multilayer semantic analysis on the defect data to be analyzed to obtain multilayer semantics of the defect data to be analyzed;
the defect type prediction unit is used for predicting the defect type of the defect data to be analyzed corresponding to the defect knowledge base by using a preset probability map model and combining the problem template and the multi-level semantics;
and the fuzzy matching completion unit is used for converting the defect data to be analyzed into structured query of the defect knowledge base according to the defect type and the entity information, and querying to obtain the target defect reason and a target repair scheme so as to complete fuzzy matching of the defect data to be analyzed.
Optionally, the apparatus for automatically positioning and analyzing defects further includes:
the characteristic marking module is used for carrying out characteristic marking on the calibrated defect data to be calibrated to serve as characteristic defect data;
and the priority matching module is used for preferentially selecting the characteristic defect data for matching when the fuzzy matching is detected to be currently performed.
Optionally, the apparatus for automatically positioning and analyzing defects further includes:
the screening conversion module is used for acquiring defect sample data, and performing pre-screening and format conversion on the defect sample data to obtain target sample data;
the data classification module is used for classifying the target sample data based on a preset classification algorithm to obtain multi-class defect sample data corresponding to a plurality of defect classes;
the mapping establishing module is used for extracting and screening the multi-class defect sample data to obtain defect reasons and repair schemes corresponding to the defect classes and establishing mapping relations among the defect classes, the defect reasons and the repair scheme information;
and the knowledge base construction module is used for constructing the defect knowledge base when the data volume of the multi-class defect sample data is detected to reach a preset data volume threshold value so as to perform automatic defect positioning analysis based on the defect knowledge base.
Optionally, the text similarity algorithm comprises a cosine distance algorithm,
the exact match module 20 includes:
the key extraction unit is used for performing word segmentation processing on the to-be-analyzed defect data by using a natural language processing technology so as to extract key words in the to-be-analyzed defect data;
the word frequency generating unit is used for generating a first word frequency vector set of the keywords in the defect data to be analyzed and a second word frequency vector set of the keywords in the defect knowledge base;
and the precise matching unit is used for acquiring a cosine similarity set between the first word frequency vector and the second word frequency vector by using a cosine distance algorithm so as to precisely match the keywords in the defect knowledge base based on the cosine similarity set.
Optionally, the apparatus for automatically positioning and analyzing defects further includes:
the accurate matching judgment module is used for judging whether the target cosine similarity exceeding a preset similarity threshold exists in the cosine similarity set or not;
if so, judging that the current accurate matching is successful;
if not, judging that the current accurate matching fails.
Optionally, the apparatus for automatically positioning and analyzing defects further includes:
a matching sample acquisition module, configured to acquire matching defect sample data corresponding to a target cosine similarity in the defect knowledge base when it is detected that the target cosine similarity exceeding a preset similarity threshold exists in the cosine similarity set;
and the result correlation display module is used for acquiring the matching problem reason and the matching repair scheme corresponding to the matching defect sample data and performing correlation display on the matching problem reason and the matching repair scheme.
Optionally, the apparatus for automatically positioning and analyzing defects further includes:
and the regular statistic module is used for regularly screening common defect data of which the actual reproduction times exceed a preset time threshold from the defect knowledge base according to a preset time interval, and determining common defect types, common defect reasons and common repair schemes corresponding to the common defect data so as to generate a visual common defect statistical table.
The invention also provides a device for automatically positioning and analyzing the defects.
The automatic defect positioning and analyzing device comprises a processor, a memory and an automatic defect positioning and analyzing program which is stored on the memory and can run on the processor, wherein when the automatic defect positioning and analyzing program is executed by the processor, the steps of the automatic defect positioning and analyzing method are realized.
The method for implementing the automatic defect location analysis program when executed may refer to various embodiments of the automatic defect location analysis method of the present invention, and will not be described herein again.
In addition, the embodiment of the invention also provides a computer readable storage medium.
The computer readable storage medium of the present invention stores a defect automatic positioning analysis program, wherein when the defect automatic positioning analysis program is executed by a processor, the steps of the defect automatic positioning analysis method are implemented as described above.
The method for implementing the automatic defect location analysis program when executed may refer to various embodiments of the automatic defect location analysis method of the present invention, and will not be described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. An automatic defect positioning and analyzing method is characterized by comprising the following steps:
acquiring defect data to be analyzed, extracting keywords in the defect data to be analyzed, and accurately matching the keywords in a preset defect knowledge base based on a preset text similarity algorithm, wherein the defect knowledge base comprises multi-class defect sample data, and defect reasons and repair schemes corresponding to the multi-class defect sample data;
when the current accurate matching is detected to fail, identifying the defect type to which the defect data to be analyzed belongs, and searching a target defect reason and a target repair scheme corresponding to the defect type in the defect knowledge base to complete fuzzy matching of the defect data to be analyzed;
and taking the fuzzy-matched defect data to be analyzed as defect data to be verified, and updating the accurate defect reason and the accurate repair scheme into the defect knowledge base when the accurate defect reason and the accurate repair scheme of the defect data to be verified are obtained so as to calibrate the defect data to be calibrated.
2. The method according to claim 1, wherein the step of identifying the defect type to which the defect data to be analyzed belongs when detecting that the current exact match fails, and searching the defect knowledge base for a target defect cause and a target repair solution corresponding to the defect type to complete the fuzzy match of the defect data to be analyzed comprises:
when the current accurate matching is detected to fail, recognizing entity information of the defect data to be analyzed by using a preset entity recognition model, and obtaining the problem template based on the entity information;
performing multi-level semantic analysis on the defect data to be analyzed to obtain multi-level semantics of the defect data to be analyzed;
predicting the defect category of the defect data to be analyzed corresponding to the defect knowledge base by using a preset probability map model and combining the problem template and the multi-level semantics;
and converting the defect data to be analyzed into structured query of the defect knowledge base according to the defect category and the entity information, and querying to obtain the target defect reason and a target repair scheme so as to complete fuzzy matching of the defect data to be analyzed.
3. The method according to claim 1, wherein the step of using the fuzzy-matched defect data to be analyzed as defect data to be verified, and updating the accurate defect reason and the accurate repair plan into the defect knowledge base when acquiring the accurate defect reason and the accurate repair plan of the defect data to be verified, so as to calibrate the defect data to be calibrated further comprises:
performing characteristic marking on the calibrated defect data to be calibrated to serve as characteristic defect data;
and when the fuzzy matching is detected to be currently performed, preferentially selecting the characteristic defect data for matching.
4. The method for automatically locating and analyzing the defects according to claim 1, wherein before the step of obtaining the defect data to be analyzed and extracting the keywords from the defect data to be analyzed, the method further comprises:
acquiring defect sample data, and performing pre-screening and format conversion on the defect sample data to obtain target sample data;
classifying the target sample data based on a preset classification algorithm to obtain multi-class defect sample data corresponding to a plurality of defect classes;
extracting and screening the multi-class defect sample data to obtain defect reasons and repair schemes corresponding to the defect classes, and establishing a mapping relation among the defect classes, the defect reasons and the repair scheme information;
and when the data volume of the multi-class defect sample data is detected to reach a preset data volume threshold value, constructing the defect knowledge base so as to perform automatic defect positioning analysis based on the defect knowledge base.
5. The method of automatic defect localization analysis according to claim 1, wherein said text similarity algorithm comprises a cosine distance algorithm,
the step of obtaining the defect data to be analyzed, extracting the keywords in the defect data to be analyzed, and accurately matching the keywords in a preset defect knowledge base based on a preset text similarity algorithm comprises the following steps:
performing word segmentation processing on the to-be-analyzed defect data by using a natural language processing technology to extract keywords in the to-be-analyzed defect data;
generating a first word frequency vector set of the keywords in the defect data to be analyzed and a second word frequency vector set of the keywords in the defect knowledge base;
and a cosine distance algorithm is used for obtaining a cosine similarity set between the first word frequency vector and the second word frequency vector, so that the keywords are accurately matched in the defect knowledge base based on the cosine similarity set.
6. The method of claim 5, wherein after the step of obtaining the cosine similarity set between the first word frequency vector and the second word frequency vector by using a cosine distance algorithm to precisely match the keyword in the defect knowledge base based on the cosine similarity set, the method further comprises:
judging whether a target cosine similarity exceeding a preset similarity threshold exists in the cosine similarity set or not;
if so, judging that the current accurate matching is successful;
if not, judging that the current accurate matching fails.
7. The method for automatically locating and analyzing defects according to claim 6, wherein after the steps of obtaining the data of the defects to be analyzed and extracting the keywords from the data of the defects to be analyzed to precisely match the keywords in a preset defect knowledge base based on a preset text similarity algorithm, the method further comprises:
when the cosine similarity set is detected to have target cosine similarity exceeding a preset similarity threshold, acquiring matched defect sample data corresponding to the target cosine similarity in the defect knowledge base;
and acquiring a matching problem reason and a matching repair scheme corresponding to the matching defect sample data, and displaying the matching problem reason and the matching repair scheme in a correlation manner.
8. The method according to any one of claims 1 to 7, wherein the step of using the fuzzy-matched defect data to be analyzed as defect data to be verified, and updating the accurate defect reason and the accurate repair solution into the defect knowledge base when acquiring the accurate defect reason and the accurate repair solution of the defect data to be verified so as to calibrate the defect data to be calibrated further comprises:
and regularly screening common defect data with the actual reproduction times exceeding a preset time threshold from the defect knowledge base according to a preset time interval, and determining common defect types, common defect reasons and common repair schemes corresponding to the common defect data to generate a visual common defect statistical table.
9. A defect automatic localization analysis device, characterized in that the defect automatic localization analysis device comprises a processor, a memory, and a defect automatic localization analysis program stored on the memory and executable by the processor, wherein the defect automatic localization analysis program when executed by the processor implements the steps of the defect automatic localization analysis method according to any one of claims 1 to 8.
10. A computer-readable storage medium, wherein a defect automatic location analysis program is stored on the computer-readable storage medium, wherein the defect automatic location analysis program, when executed by a processor, implements the steps of the defect automatic location analysis method according to any one of claims 1 to 8.
CN202010920498.9A 2020-09-03 2020-09-03 Defect automatic positioning analysis method, device and readable storage medium Pending CN112069069A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010920498.9A CN112069069A (en) 2020-09-03 2020-09-03 Defect automatic positioning analysis method, device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010920498.9A CN112069069A (en) 2020-09-03 2020-09-03 Defect automatic positioning analysis method, device and readable storage medium

Publications (1)

Publication Number Publication Date
CN112069069A true CN112069069A (en) 2020-12-11

Family

ID=73665498

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010920498.9A Pending CN112069069A (en) 2020-09-03 2020-09-03 Defect automatic positioning analysis method, device and readable storage medium

Country Status (1)

Country Link
CN (1) CN112069069A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112579471A (en) * 2020-12-30 2021-03-30 锐捷网络股份有限公司 Method and device for processing software test information
CN113077462A (en) * 2021-04-30 2021-07-06 上海众壹云计算科技有限公司 Wafer defect classification method, device, system, electronic equipment and storage medium
CN113239365A (en) * 2021-07-12 2021-08-10 深圳市永达电子信息股份有限公司 Vulnerability repairing method based on knowledge graph
CN114238502A (en) * 2021-12-13 2022-03-25 北京质云数据科技有限公司 Defect automobile information analysis platform based on block chain technology
CN115508366A (en) * 2022-10-20 2022-12-23 南京鹤梦信息技术有限公司 Intelligent product defect detection system and method based on multispectral imaging

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105653444A (en) * 2015-12-23 2016-06-08 北京大学 Internet log data-based software defect failure recognition method and system
CN109376092A (en) * 2018-11-26 2019-02-22 扬州大学 A kind of software defect reason automatic analysis method of facing defects patch code
CN110109835A (en) * 2019-05-05 2019-08-09 重庆大学 A kind of software defect positioning method based on deep neural network
CN111611172A (en) * 2020-05-26 2020-09-01 深圳壹账通智能科技有限公司 Project test defect analysis method, device, equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105653444A (en) * 2015-12-23 2016-06-08 北京大学 Internet log data-based software defect failure recognition method and system
CN109376092A (en) * 2018-11-26 2019-02-22 扬州大学 A kind of software defect reason automatic analysis method of facing defects patch code
CN110109835A (en) * 2019-05-05 2019-08-09 重庆大学 A kind of software defect positioning method based on deep neural network
CN111611172A (en) * 2020-05-26 2020-09-01 深圳壹账通智能科技有限公司 Project test defect analysis method, device, equipment and storage medium

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112579471A (en) * 2020-12-30 2021-03-30 锐捷网络股份有限公司 Method and device for processing software test information
CN113077462A (en) * 2021-04-30 2021-07-06 上海众壹云计算科技有限公司 Wafer defect classification method, device, system, electronic equipment and storage medium
CN113239365A (en) * 2021-07-12 2021-08-10 深圳市永达电子信息股份有限公司 Vulnerability repairing method based on knowledge graph
CN113239365B (en) * 2021-07-12 2021-10-26 深圳市永达电子信息股份有限公司 Vulnerability repairing method based on knowledge graph
CN114238502A (en) * 2021-12-13 2022-03-25 北京质云数据科技有限公司 Defect automobile information analysis platform based on block chain technology
CN115508366A (en) * 2022-10-20 2022-12-23 南京鹤梦信息技术有限公司 Intelligent product defect detection system and method based on multispectral imaging
CN115508366B (en) * 2022-10-20 2023-09-22 南京鹤梦信息技术有限公司 Product defect intelligent detection system and method based on multispectral imaging

Similar Documents

Publication Publication Date Title
CN109697162B (en) Software defect automatic detection method based on open source code library
CN112069069A (en) Defect automatic positioning analysis method, device and readable storage medium
CN110334241B (en) Quality inspection method, device and equipment for customer service record and computer readable storage medium
WO2021253904A1 (en) Test case set generation method, apparatus and device, and computer readable storage medium
CN111198948A (en) Text classification correction method, device and equipment and computer readable storage medium
CN107862327B (en) Security defect identification system and method based on multiple features
WO2021174812A1 (en) Data cleaning method and apparatus for profile, and medium and electronic device
CN112416778A (en) Test case recommendation method and device and electronic equipment
CN112036168B (en) Event main body recognition model optimization method, device, equipment and readable storage medium
US20200005089A1 (en) System and method for enrichment of ocr-extracted data
CN112579414B (en) Log abnormality detection method and device
CN112926045B (en) Group control equipment identification method based on logistic regression model
CN111767382A (en) Method and device for generating feedback information and terminal equipment
CN106485261A (en) A kind of method and apparatus of image recognition
CN110781673B (en) Document acceptance method and device, computer equipment and storage medium
CN113728321A (en) Using a set of training tables to accurately predict errors in various tables
CN113434418A (en) Knowledge-driven software defect detection and analysis method and system
CN116611074A (en) Security information auditing method, device, storage medium and apparatus
CN117056834A (en) Big data analysis method based on decision tree
CN112671614B (en) Method, system, device and storage medium for testing connectivity of association system
CN114416573A (en) Defect analysis method, device, equipment and medium for application program
CN113312258A (en) Interface testing method, device, equipment and storage medium
CN111723182B (en) Key information extraction method and device for vulnerability text
CN112925874B (en) Similar code searching method and system based on case marks
CN115455407A (en) Machine learning-based GitHub sensitive information leakage monitoring method

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