Automatic test report generation method and system based on NLP and machine learning

By building a knowledge graph based on NLP and machine learning methods, and automatically generating test reports, solving the problem of inefficient management of traditional test reports, and achieving efficient and accurate test report generation and software quality improvement.

CN119829427APending Publication Date: 2025-04-15CHINESE PEOPLES LIBERATION ARMY UNIT 96901
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411788470.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

Traditional test report management methods are inefficient, difficult to detect vulnerabilities, and lack effective technical means to organize, retrieve and apply the cumulative test knowledge base of history, making it difficult for the testing team to quickly acquire, share and apply knowledge.

Method used

The automatic generation method of test report based on NLP and machine learning is adopted. By analyzing the structure and functions of the software system, building a knowledge graph, extracting test case data information, using the TransE model for training, generating test reports, and monitoring the test process in real time to deal with abnormal situations.

Benefits of technology

It realizes the rapid generation of test reports, improves the quality and efficiency of tests, and improves the acquisition and application accuracy of test information through the visual display and search functions of the knowledge graph, promptly discovers and solves software and test problems, and improves the quality of software and user satisfaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119829427A_ABST
    Figure CN119829427A_ABST
Patent Text Reader

Abstract

The invention relates to a test report automatic generation method and system based on NLP and machine learning, and belongs to the technical field of software testing. The method comprises the following steps: analyzing the structure and function of a software system, and determining a test type; acquiring data information of the test case according to the test type; constructing a knowledge graph structure, defining a relationship between entities in the knowledge graph structure, and establishing a tracking relationship in combination with the test case to obtain a knowledge graph; analyzing the knowledge graph and combining with the extracted test information to obtain a test entity, and generating a test report to obtain a test result; and constructing a tracking statistical model to query tracking statistical data, monitoring the test process in real time, and processing test abnormal conditions. According to the invention, manual intervention is reduced through automatic construction, and the automation degree of test management is improved; through high-efficiency and high-accuracy test report generation, the test problem can be quickly solved, and the efficiency of software test management is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of software testing, and in particular relates to a method and system for automatically generating a test report based on NLP and machine learning. Background Art

[0002] The full name of NLP is Natural Language Processing, which is an artificial intelligence technology that aims to enable computers to understand, interpret and generate text or voice data in human natural language; the goal of NLP is to enable computers to interact effectively with human language and perform various natural language-related tasks.

[0003] In the process of software development, software testing is a very important link; the traditional test report management method mainly relies on manual experience and judgment, which has problems such as low efficiency and difficulty in finding vulnerabilities. With the increasing complexity of software systems, the traditional test report management method can no longer meet actual needs. At present, the company is facing the problem of not being able to fully utilize the historical accumulated test knowledge base. Although the company has established a knowledge base to collect and store test technical documents, it lacks effective technical means to organize, retrieve and apply this knowledge. Testers and developers are not clear whether there are knowledge resources they need, nor can they accurately find and obtain relevant information. In addition, due to the existence of unstructured text data in software test report knowledge, it is difficult to deeply integrate and apply it, which limits the ability of the test team to quickly acquire, share and apply knowledge at work, hindering the growth of employees and improving work efficiency; therefore, it is urgent to solve these problems and improve the level of test report management and application, so as to better utilize test report knowledge to support software testing and quality improvement. Summary of the invention

[0004] 1. Technical issues to be resolved

[0005] The technical problem to be solved by the present invention is to provide a method and system for automatically generating a test report, so as to realize rapid generation of the test report and improve the quality and efficiency of the test.

[0006] (II) Technical solution

[0007] In order to solve the above technical problems, the present invention provides a method for automatically generating a test report based on NLP and machine learning, comprising the following steps:

[0008] Step S100: Analyze the structure and function of the software system and determine the test type;

[0009] Step S200: Acquire data information of test cases according to the test type, and use NLP technology to extract relationships from the test report description; construct a knowledge graph structure, define the relationships between entities in the knowledge graph structure, and establish a tracking relationship in combination with the test cases to obtain a knowledge graph;

[0010] Step S300: Analyze the knowledge graph, combine the extracted test case data information to obtain the test entity, use the TransE model to train and vectorize the knowledge graph, repeat the test entity content in the historical test report according to the entity vector similarity, merge the repeated test entities into the same test entity, generate the final test report, and obtain the test data from the test report;

[0011] Step S400: construct a tracking statistical model to query test data, monitor the test process in real time, and handle abnormal situations that occur.

[0012] The invention also provides a system for implementing the method.

[0013] The invention also provides an application of the method in the technical field of software testing.

[0014] (III) Beneficial effects

[0015] Compared with the prior art, the beneficial effects achieved by the present invention are:

[0016] 1. The present invention visualizes the test type, the tested object, and the tracking relationship information by constructing the test knowledge graph; in the process of constructing the knowledge graph, the test report information can be automatically extracted through the test results and software quality conditions, and organized into the form of a knowledge graph; by constructing the test knowledge graph, the test report can be quickly generated according to the tested object, thereby improving the quality and efficiency of the test;

[0017] 2. In the process of acquiring test report information, the present invention can quickly acquire test information by searching and filtering the knowledge graph, and provide a preview of the generation solution; by acquiring and generating test information, the accuracy of the test report and the efficiency of the test can be improved;

[0018] 3. In the process of tracking and counting test situations, the present invention can timely discover and solve software and testing problems by updating and analyzing the knowledge graph, thereby improving software quality and user satisfaction; by tracking and counting test situations, a comprehensive understanding of the test situation of the software system can be obtained, providing a reference for subsequent software development and testing;

[0019] 4. The present invention has the advantages of automation, high efficiency and high quality. It constructs and analyzes the knowledge graph of the test report in an automated way, reduces manual intervention and improves the degree of automation of test management. It can quickly solve test problems and improve the efficiency of software test management through efficient and accurate test report generation. It can timely discover and solve test problems through high-quality test tracking and statistics, and improve software quality and user satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 It is a schematic diagram of the steps of the method for automatically generating a test report based on NLP and machine learning of the present invention;

[0021] Figure 2 It is a schematic diagram of the structure of the test report automatic generation system based on NLP and machine learning of the present invention;

[0022] Figure 3 It is an abstract structural diagram of the semantic matching model. DETAILED DESCRIPTION

[0023] In order to make the purpose, content and advantages of the present invention more clear, the specific implementation methods of the present invention are further described in detail below in conjunction with the drawings and examples.

[0024] First, the meanings of the terms appearing in the present invention are explained as follows:

[0025] Knowledge graph: A knowledge graph is a topological structure consisting of entities and relationships;

[0026] Grammatical normalization: Standardize text data to eliminate irregular and redundant grammatical structures, making the text data more standardized and easier to process; common grammatical normalization methods include deleting stop words, stemming, word form restoration, removing special symbols, case conversion, removing duplicate information, and word segmentation;

[0027] Data normalization: To convert data into a new form, making it easier to compare and analyze. Common data normalization methods include Min-Max normalization, Z-Score normalization, decimal scaling normalization, logarithmic transformation, reciprocal transformation, and power coefficient method;

[0028] HITS algorithm: In a knowledge graph, if an entity or relationship points to another entity or relationship, and the pointed entity or relationship is pointed to by many other entities or relationships, then the pointed entity or relationship has a higher authority;

[0029] TextRank algorithm: It is a graph-based sorting algorithm for text. Its basic idea comes from Google's PageRank algorithm. It divides the text into several components (words, sentences) and builds a graph model, and uses a voting mechanism to sort the importance of the text.

[0030] See also Figures 1 to 3 The present invention provides a method for automatically generating a test report based on NLP and machine learning, comprising the following steps:

[0031] Step S100: Analyze the structure and function of the software system and determine the test type; this step intelligently identifies and analyzes the test data and test cases of the software system, thereby quickly determining the test type;

[0032] Step S200: Acquire data information of test cases according to the test type, and use NLP technology to extract relationships from the test report description; construct a knowledge graph structure, define the relationships between entities in the knowledge graph structure, and establish a tracking relationship in combination with the test cases to obtain a knowledge graph;

[0033] Step S300: Analyze the knowledge graph, combine the extracted test case data information to obtain the test entity, use the TransE model to train and vectorize the knowledge graph, identify the duplicate test entity content in the test report based on the entity vector similarity, merge the duplicate test entities into the same test entity, generate the final test report, and obtain the test data from the test report;

[0034] Step S400: construct a tracking statistical model to query test data, monitor the test process in real time, and handle abnormal situations that occur.

[0035] Furthermore, the step S100 includes the following steps:

[0036] Step S101: confirm the design ideas and implementation methods of each component in the software system, and analyze the interaction methods between each component; the interaction method of components is the key to the realization of system functions, and understanding these interaction methods helps to identify potential interaction failures or errors;

[0037] Step S102: Obtain the source, processing process and output of the data in the software system, and analyze the input, processing logic and output of each functional module in the software system in combination with several parameters; understand the function of each module, analyze its processing process and expected results, which is helpful to design test cases for each module;

[0038] Step S103: Use graphic tools to visualize the various components and functional modules in the software system; graphic tools can help to more intuitively understand the structure and function of the system, clearly show how the various components of the system interact with each other, how data flows, and how each functional module works; using these tools can improve analysis efficiency and help better understand and share test requirements;

[0039] Step S104: Determine the test type that needs to be tested based on the interaction mode between the various components and the input, processing logic and output of each functional module.

[0040] A deep understanding of the system structure and functions can help design comprehensive test cases that cover all aspects of the system; understanding data flow can help prevent and detect data-related problems; understanding the processing logic of functional modules can help design targeted test cases; using graphical tools can improve analysis efficiency and make communication more convenient.

[0041] Furthermore, the step S200 includes the following steps:

[0042] Step S201: Use multiple word segmentation algorithms to segment the sentences of the historical test report, obtain different word segmentation combinations, and identify and extract data information of several test cases from the historical test report. Algorithm 1 is the Jieba word segmentation algorithm, which generates a trie tree through its own dict.txt dictionary, generates all possible word formation situations in the sentence, and forms a directed acyclic graph DAG. Then, the dynamic programming method is used to find the maximum probability path, and the frequency of the word in the dictionary is used as the frequency of the word to find the maximum probability path, and finally obtain the word segmentation combination with the maximum probability. For words that do not appear in the dictionary, the HMM hidden Markov model based on the word formation ability of Chinese characters is used, and the Viterbi algorithm is used to implement the word segmentation operation for words that are not recorded in the dictionary; Algorithm 2 is the word segmentation algorithm implemented by the Ansj word segmenter, which is a java implementation of Chinese word segmentation based on the n-Gram language model, CRF random conditional field and HMM; Algorithm 3 is SmartChineseAnalyze, which calculates word statistics through a large amount of corpus in the HMM, and then the statistical results are used to calculate the best word segmentation combination of the text. If the results of the three algorithms are consistent, the calculation result (the best word segmentation combination of the text) will be kept unchanged; however, if there is a difference, an improved algorithm of DBpedia is used to identify and mark the key test entities in the test report by using a predefined dictionary covering a wide range of test-related entities, thereby selecting the most relevant word segmentation combination;

[0043] Step S202: using the Spacy natural language processing library to load the language models of the test cases, accurately locating and tracking the test cases through text descriptions, and identifying the logical relationships contained in the test cases;

[0044] Step S203: Through the object relationships defined in the structured APT report disclosed by STIX and the expert knowledge obtained from NVD (a vulnerability database), the logical relationship information extracted in the relationship extraction phase of step S202 is loaded into the graph database, and the relevant classification knowledge graph is introduced to complete the relationship. And for the entities extracted by word segmentation recognition and labeling in step S201, the external classification knowledge graph is introduced into the graph database to complete the entities and entity attributes, and the classification knowledge graph after the entities and entity attributes are completed is obtained. Among the Chinese concept knowledge graphs, CNProbase is currently the largest open-domain Chinese concept graph and concept classification system;

[0045] Step S204: defining entities in the knowledge graph structure, and linking the entities through certain relationships;

[0046] Step S205: Associating the plurality of test cases with entities and relationships in the knowledge graph structure, establishing a tracking relationship between the test cases and the knowledge graph structure, which is reflected as a relationship between entities in the knowledge graph;

[0047] The above steps can establish a tracking relationship between each test case and the knowledge graph, which helps to improve the accuracy and efficiency of software testing;

[0048] Step S206: constructing a knowledge graph using the data information of the test cases and the logical relationships contained in the test cases;

[0049] Step S207: using natural language processing technology to disambiguate entities in the knowledge graph structure, using a hierarchical clustering algorithm to aggregate ambiguous points of repeated test entities within the test report cluster, and merging the multiple repeated test entities formed after clustering;

[0050] Step S208: Visualize the knowledge graph in the form of a graph.

[0051] Furthermore, the step S300 includes the following steps:

[0052] Step S301: Collect historical test report data, perform data cleaning on the historical test report data, and standardize and formalize the historical test reports;

[0053] Step S302: Translate the entities and relationships in the knowledge graph into specific vectors, wherein the TransE algorithm is used to perform distributed vector representation of the entities and relationships in the knowledge graph, which regards the "relationship" in each triple information (head node, relationship, tail node) in the knowledge graph as a translation from the head node to the tail node. In the initial stage, the entity and relationship vectors will generate random values, and by continuously adjusting the values ​​of the entity and relationship vectors, after multiple iterations, the vector representation of the relationship and entity closest to the knowledge graph structure is obtained; the similarity between entity A and entity B is calculated according to the following formula:

[0054]

[0055] Among them, Sim(A,B) is the similarity function, A0 represents the type of concept to which entity A belongs in the knowledge graph, and B0 represents the type of concept to which entity B belongs in the knowledge graph; A r represents the value of the rth numerical attribute under the concept to which entity A belongs in the knowledge graph, B r A represents the value of the rth numerical attribute under the concept to which entity B belongs in the knowledge graph; j represents the value of the jth object attribute under the concept to which entity A belongs in the knowledge graph, B j represents the value of the jth object attribute under the concept to which entity B belongs in the knowledge graph; s represents the number of numerical attributes under the concept to which the entity belongs in the knowledge graph, and m represents the number of object attributes under the concept to which the entity belongs in the knowledge graph; u represents the weight of the type of the concept to which the entity belongs in the knowledge graph in the similarity calculation, v represents the weight of the numerical attribute under the concept to which the entity belongs in the knowledge graph in the similarity calculation, and w represents the weight of the object attribute under the concept to which the entity belongs in the knowledge graph in the similarity calculation, and u+v+w=1;

[0056] Calculate the similarity Sim(A,B) between entity A and entity B; when Sim(A,B)>0.5, it is judged that entity A and entity B are similar; when Sim(A,B)≤0.5, it is judged that entity A and entity B are not similar; according to the similarity between entities, duplicate identification is performed on the test entity content in the test report, and duplicate test entities are merged into the same test entity;

[0057] Step S303: Eliminate conflicts by using the knowledge graph structure and the relationships between entities in the knowledge graph; calculate the importance of entities in the knowledge graph by using the HITS or TextRank algorithm. In the word segmentation combination obtained in step S201, the window size is set to m', and [w1,w2,…,w m' ],[w2,w3,…,w m'+1 ],[w3,w4,…,w m'+2] and other windows. Treat each word in the text as a node. In the same window, there is an edge between any two word nodes. Then, using the principle of voting, treat the edge as a vote between words. After continuous iteration, the number of votes for each node will tend to be stable. By comparing the number of votes of the nodes, the importance of the words is judged, and the m' words with the most votes are taken as the keywords of the text, thus obtaining the keywords of the text. The importance of the node, that is, the importance of the entity, is as follows:

[0058]

[0059] Where d is the damping coefficient, which represents the probability that a node points to any node, and is generally taken as 0.85, ln(V i ) is pointing to node V i The node set of Out(V j ) represents the slave node V i The node set to which the departure points, s(V j ) represents node V j Importance score;

[0060] Step S304: Acquire test information extracted from software text, code or software test solution, and use semantic matching algorithm (such as Figure 3 As shown in the figure, the extracted test information is matched with the entities in the knowledge graph to obtain the test entities; matching based on entity importance can effectively mine the relationship between the entity and the test information, which is convenient for matching;

[0061] Step S305: traverse the knowledge graph using the relationships between entities in the knowledge graph, and find test information associated with the test entity based on the similarity between entities in step S302;

[0062] Step S306: extract information required for generating a test report based on the test entities obtained by the traversal and generate a test report.

[0063] Wherein, the step S400 includes the following steps:

[0064] Step S401: determine a tracking and statistical target, and obtain test data related to the target, including test process and result data;

[0065] Step S402: construct a tracking statistical model, map the processed test data into the tracking statistical model; and store the processed test data into the knowledge graph;

[0066] Step S403: querying the test data from the knowledge graph by using a query language or API, and visualizing the test data;

[0067] Step S404: collect test data in real time and update the data in the knowledge graph;

[0068] Step S405: Monitor abnormal situations that occur during the test. If an abnormal situation occurs, determine the specific location of the abnormality and the cause of the abnormality, evaluate the severity and scope of the problem, and repair it. This helps to determine the priority of the problem so that it can be repaired more effectively.

[0069] Through the knowledge graph, we can understand the functions, structure and other related information of the software, which helps to locate the problem more accurately and find the root cause of the problem; in addition, the knowledge graph can also provide information about software quality, performance and other related indicators, which can assist in risk assessment and repair planning.

[0070] Furthermore, in order to better implement the above method, a test report automatic generation system based on NLP and machine learning is proposed, and the generation system includes a test knowledge graph module, a test report automatic generation module and a test situation tracking and statistics module;

[0071] The test knowledge graph module is used to automatically generate a knowledge graph based on the knowledge graph and natural language processing technology;

[0072] The test report automatic generation module is used to automatically generate a test report based on the knowledge graph by identifying the test requirements and paths;

[0073] The test situation tracking and statistics module is used to track and count the test process and results to achieve tracking and statistics of the test situation.

[0074] The test knowledge graph module includes a test case extraction unit, a tracking relationship establishment unit and a knowledge graph construction unit;

[0075] The test case extraction unit is used to use natural language processing technology to identify and extract data information of several test cases from historical test reports; the tracking relationship establishment unit is used to: use the Spacy natural language processing library to load the language model of the several test cases, accurately locate and track the several test cases through text descriptions, and identify the logical relationships contained in the several test cases; the knowledge graph construction unit is used to construct a knowledge graph using the data information of the several test cases and the logical relationships contained in the several test cases.

[0076] Wherein, the test report automatic generation module includes a data processing unit, a similarity comparison unit, a test entity unit and a report generation unit;

[0077] The data processing unit is used to collect raw data and perform standardization and normalization on the raw data; the similarity comparison unit is used to obtain an attribute similarity vector by combining the similarity of each attribute in different entities, and obtain the similarity based on the attribute similarity vector; the test entity unit is used to use a text matching algorithm to match the extracted test information with the entities in the knowledge graph to obtain the test entity; the report generation unit is used to extract the information required to generate a test report and generate a test report solution.

[0078] Collect a dataset containing software testing information. This can be a software requirements specification, software design specification, software test plan, or software test solution. By adding a software testing domain dictionary, features that help identify test reports need to be extracted from the text, including the type of test report, tracking relationship, and tested object. By matching the existing entity pairs in the knowledge base with the entity pairs in the text, the matched entity pairs are used as training data, and the relationships in the knowledge base are used as labels.

[0079] Perform data cleaning on the original data, clean out irrelevant data, and correct erroneous data, such as removing duplicate data and correcting incorrect time and place; identify entities in the text, such as names of people, places, and organizations. Automatically identify entities in the text through natural language processing technology and machine learning algorithms; extract the relationship between entities from the text. For example, extract the relationship between entities from the text through natural language processing technology and machine learning algorithms, such as "work at" or "date of birth"; find the hidden relationship between specific entities by finding the path of them in the knowledge graph. For example, by finding the common friends between two people, it can be inferred that they know each other; pattern mining: discover patterns and trends in the knowledge graph through pattern mining algorithms. For example, by analyzing the relationship between multiple entities, hidden patterns and laws can be discovered. Association mining: discover the association relationship between entities through association rule mining algorithms. For example, by analyzing purchase behavior data, it can be found which products are often purchased together.

[0080] Standardize the raw data to eliminate irregular and redundant grammatical structures, making the text data more standardized and easier to process. Common grammatical normalization methods include deleting stop words, stemming, word form restoration, removing special symbols, case conversion, removing duplicate information, and word segmentation; then normalize the raw data. Common data normalization methods include Min-Max normalization, Z-Score normalization, decimal calibration normalization, logarithmic transformation, inverse transformation, and power coefficient method.

[0081] The embodiment of the present invention provides a semantic matching model based on the knowledge graph, which expresses the search term query and the content item to be matched into high-dimensional vectors through one-hot encoding, and then expresses the high-dimensional vectors into low-dimensional vectors through DNN, and then calculates the distance between the low-dimensional vectors of query and item through cos similarity to obtain a matching score, and determines which entity in the knowledge graph is a test entity according to the matching score; assuming that letter-tri-gams are used to segment words, 3 letters are grouped together, and # is used to represent the start and end symbols, the word boy will be segmented into three words #-bo, boy, oy-#, and the word boy needs to be represented by three position pointers; through letter-tri-gams segmentation, a 500,000-dimensional vector can be compressed into a 30,000-dimensional vector space. For Chinese input, the one-hot vector of the word segmentation or direct word can be used as input;

[0082] Suppose there is a word boy, and the start and end characters are represented by # respectively, then the input is (#boy#). Convert the word into the form of letter n-gram. If n is set to 3, then we can get three groups of data (#bo, boy, oy#), and represent these three groups of data with n-gram vectors.

[0083] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for automatically generating a test report based on NLP and machine learning, characterized in that: The following steps are involved: Step S100: Analyze the structure and function of the software system and determine the test type; Step S200: Acquire data information of test cases according to the test type, and use NLP technology to extract relationships from the test report description; Build a knowledge graph structure, define the relationships between entities in the knowledge graph structure, and establish tracking relationships based on test cases to obtain a knowledge graph; Step S300: Analyze the knowledge graph, combine the extracted test case data information to obtain the test entity, use the TransE model to train and vectorize the knowledge graph, repeat the test entity content in the historical test report according to the entity vector similarity, merge the repeated test entities into the same test entity, generate the final test report, and obtain the test data from the test report; Step S400: construct a tracking statistical model to query test data, monitor the test process in real time, and handle abnormal situations that occur.

2. The method according to claim 1, characterized in that Step S100 includes the following steps: Step S101: confirm the design ideas and implementation methods of each component in the software system, and analyze the interaction methods between each component; Step S102: Obtain the source, processing process and output of data in the software system, and analyze the input, processing logic and output of each functional module in the software system in combination with a number of parameters; Step S103: using a graphic tool to visualize various components and functional modules in the software system; Step S104: Determine the test type that needs to be tested based on the interaction mode between the various components and the input, processing logic and output of each functional module.

3. The method according to claim 1, characterized in that S200 includes the following steps: Step S201: Use multiple word segmentation algorithms to segment sentences in historical test reports, obtain different word segmentation combinations, and identify and extract data information of several test cases from historical test reports; Algorithm 1 is Jieba word segmentation algorithm, which generates a trie tree through its own dict.txt dictionary, generates all possible word formation situations in the sentence, and forms a directed acyclic graph DAG, and then uses the dynamic programming method to find the maximum probability path, taking the frequency of a word in the dictionary as the frequency of the word, find the maximum probability path, and finally obtain the word segmentation combination with the maximum probability; For words that do not appear in the dictionary, the HMM hidden Markov model based on the word formation ability of Chinese characters is used, and the Viterbi algorithm is used to implement word segmentation for words that are not recorded in the dictionary operation; Algorithm 2 is the word segmentation algorithm implemented by Ansj word segmenter, which is a Java implementation of Chinese word segmentation based on n-Gram language model, CRF random conditional field and HMM; Algorithm 3 is SmartChineseAnalyze, which uses the corpus in HMM to calculate word statistics, and then uses the statistical results to calculate the best word segmentation combination of the text; if the results of the three algorithms are consistent, then the calculation results, that is, the best word segmentation combination of the text, will be kept unchanged; if the results of the three algorithms are different, an algorithm designed based on DBpedia is used to identify and mark the key test entities in the test report by using a predefined dictionary covering multiple test-related entities, so as to select the most relevant word segmentation combination; Step S202: using the Spacy natural language processing library to load the language models of the test cases, locating and tracking the test cases through text descriptions, and identifying the logical relationships contained in the test cases; Step S203: Through the object relationships defined in the structured APT report disclosed by STIX and the expert knowledge obtained from the vulnerability database NVD, the logical relationship information extracted in the relationship extraction phase of step S202 is loaded into the graph database, and the relevant classification knowledge graph is introduced to complete the relationship; and for the entities extracted by word segmentation recognition and tagging in step S201, the external classification knowledge graph is introduced into the graph database to complete the entities and entity attributes, and the classification knowledge graph after the entities and entity attributes are completed is obtained; Step S204: defining entities in the knowledge graph structure, and linking the entities through certain relationships; Step S205: Associating the plurality of test cases with entities and relationships in the knowledge graph structure, and establishing a tracking relationship between the test cases and the knowledge graph structure; Step S206: constructing a knowledge graph using data information of a plurality of test cases and logical relationships contained in the plurality of test cases; Step S207: using natural language processing technology to disambiguate entities in the knowledge graph structure, using a hierarchical clustering algorithm to aggregate ambiguous points of repeated test entities within the test report cluster, and merging the multiple repeated test entities formed after clustering; Step S208: Visualize the knowledge graph in the form of a graph.

4. The method according to claim 3, characterized in that Step S300 includes the following steps: Step S301: Collect historical test report data, perform data cleaning on the historical test report data, and standardize and formalize the historical test reports; Step S302: Translate the entities and relationships in the knowledge graph into specific vectors, wherein the TransE algorithm is used to perform distributed vector representation of the entities and relationships in the knowledge graph, which regards the "relationship" in each triple information (head node, relationship, tail node) in the knowledge graph as a translation from the head node to the tail node; in the initial stage, the entity and relationship vectors will generate random values, and by continuously adjusting the values ​​of the entity and relationship vectors, after multiple iterations, the vector representation of the relationship and entity closest to the knowledge graph structure is obtained; the similarity between entity A and entity B is calculated according to the following formula: Among them, Sim(A, B) is the similarity function, A0 represents the type of concept to which entity A belongs in the knowledge graph, and B0 represents the type of concept to which entity B belongs in the knowledge graph; A r represents the value of the rth numerical attribute under the concept to which entity A belongs in the knowledge graph, B r A represents the value of the rth numerical attribute under the concept to which entity B belongs in the knowledge graph; j represents the value of the jth object attribute under the concept to which entity A belongs in the knowledge graph, B j represents the value of the jth object attribute under the concept to which entity B belongs in the knowledge graph; s represents the number of numerical attributes under the concept to which the entity belongs in the knowledge graph, and m represents the number of object attributes under the concept to which the entity belongs in the knowledge graph; u represents the weight of the type of the concept to which the entity belongs in the knowledge graph in the similarity calculation, v represents the weight of the numerical attribute under the concept to which the entity belongs in the knowledge graph in the similarity calculation, and w represents the weight of the object attribute under the concept to which the entity belongs in the knowledge graph in the similarity calculation, and u+v+w=1; Calculate the similarity Sim(A, B) between entity A and entity B; when Sim(A, B)>0.5, it is judged that entity A and entity B are similar; when Sim(A, B)≤0.5, it is judged that entity A and entity B are not similar; perform repeated identification of the test entity content in the historical test report according to the similarity between entities, and merge the repeated test entities into the same test entity; Step S303: Eliminate conflicts by using the knowledge graph structure and the relationships between entities in the knowledge graph; calculate the importance of entities in the knowledge graph by using the HITS or TextRank algorithm; in the word segmentation combination obtained in step S201, set the window size to m' and obtain [w1, w2, ..., w m′ ],[w2,w3,...,w m′+1 ],[w3,w4,...,w m′+2 ] window; regard each word in the text as a node. In the same window, there is an edge between any two word nodes; then use the principle of voting to regard the edge as mutual voting between words. After continuous iteration, the number of votes obtained by each node tends to be stable; by comparing the number of votes of the nodes, the importance of the words is judged, and the m' words with the most votes are taken as the keywords of the text, thereby obtaining the keywords of the text; the importance of the node, that is, the importance of the entity formula is as follows: Where d is the damping coefficient, which represents the probability that a node points to any node, ln(V i ) is pointing to node V i The node set of Out(V j ) represents the slave node V i The node set to which the departure points, s(V j ) represents node V j Importance score; Step S304: obtaining test information extracted from software text, code or software test solution, and matching the extracted test information with entities in the knowledge graph using a semantic matching algorithm based on a calculation formula of entity importance to obtain a test entity; Step S305: traverse the knowledge graph using the relationships between entities in the knowledge graph, and find test information associated with the test entity based on the similarity between entities in step S302; Step S306: extract information required for generating a test report based on the test entities obtained by the traversal and generate a test report.

5. The method according to claim 1, characterized in that Step S400 includes the following steps: Step S401: determine a tracking and statistical target, and obtain test data related to the target, including test process and result data; Step S402: construct a tracking statistical model, map the processed test data into the tracking statistical model; and store the processed test data into the knowledge graph; Step S403: querying the test data from the knowledge graph by using a query language or API, and visualizing the test data; Step S404: collect test data in real time and update the data in the knowledge graph; Step S405: Monitor abnormal situations that occur during the test. If an abnormal situation occurs, determine the specific location where the abnormal situation occurs and the cause of the abnormal situation, evaluate the severity and scope of the problem, and perform repairs.

6. A system for implementing the method according to any one of claims 1 to 5.

7. The system according to claim 6, characterized in that The system includes a test knowledge graph module, a test report automatic generation module and a test situation tracking and statistics module; The test knowledge graph module is used to automatically generate a knowledge graph based on the knowledge graph and natural language processing technology; The test report automatic generation module is used to automatically generate a test report based on the knowledge graph by identifying the test requirements and paths; The test situation tracking and statistics module is used to track and count the test process and results to achieve tracking and statistics of the test situation.

8. The system according to claim 7, characterized in that The test knowledge graph module includes a test case extraction unit, a tracking relationship establishment unit and a knowledge graph construction unit; The test case extraction unit is used to use natural language processing technology to identify and extract data information of several test cases from historical test reports; the tracking relationship establishment unit is used to: use the Spacy natural language processing library to load the language model of the several test cases, accurately locate and track the several test cases through text descriptions, and identify the logical relationships contained in the several test cases; the knowledge graph construction unit is used to construct a knowledge graph using the data information of the several test cases and the logical relationships contained in the several test cases.

9. The system according to claim 8, characterized in that The test report automatic generation module includes a data processing unit, a similarity comparison unit, a test entity unit and a report generation unit; The data processing unit is used to collect raw data and perform standardization and regularization on the raw data; the similarity comparison unit is used to obtain an attribute similarity vector by combining the similarity of each attribute in different entities, and obtain the similarity based on the attribute similarity vector; the test entity unit is used to use a text matching algorithm to match the extracted test information with the entities in the knowledge graph to obtain the test entity; the report generation unit is used to extract the information required to generate a test report and generate a test report.

10. Application of the method according to any one of claims 1 to 5 in the field of software testing technology.