A test document detection method and device, electronic equipment and storage medium

By parsing test documents using a large language model and constructing a knowledge graph, the problem of shallow review levels in existing technologies is solved, enabling multi-dimensional logical verification and improving the depth and transparency of test document review.

CN122111840APending Publication Date: 2026-05-29ZHONGKE FANGDE SOFTWARE CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHONGKE FANGDE SOFTWARE CO LTD
Filing Date
2026-01-09
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

In existing technologies, the test document review mode is relatively fixed and singular, resulting in a shallow review level and weak logical review capabilities, which affects the overall review quality.

Method used

By parsing test documents using a large language model to obtain semantic information, constructing a knowledge graph, and determining the detection results based on a preset set of rules and semantic information, multi-dimensional logical verification is achieved.

Benefits of technology

It deepened the review process, improved logical review capabilities, and enabled efficient, transparent, and explainable review of test documents, thereby enhancing the overall review quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122111840A_ABST
    Figure CN122111840A_ABST
Patent Text Reader

Abstract

The application provides a test document detection method and device, electronic equipment and a computer readable storage medium. The method comprises: obtaining a document to be detected; analyzing the document by a large language model to obtain semantic information of the document; constructing a knowledge graph according to the semantic information; and determining a detection result of the document based on a preset rule set, the semantic information and the knowledge graph. The application deepens the examination level and improves the logical examination ability. Furthermore, the application can realize multi-dimensional document examination based on the rule set, finally realizes an efficient, transparent and interpretable test document examination scheme, and improves the overall examination quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, electronic device, and computer-readable storage medium for testing documents. Background Technology

[0002] With the widespread application of artificial intelligence technology in document processing, various automated document generation, review, and approval systems have emerged. These systems aim to improve the automation and accuracy of document processing, but they still have many limitations in the specific scenario of testing document review.

[0003] Currently, test documentation focuses on testing software functions and execution processes. The review of test documentation can be facilitated by introducing a large model. This large model-based review system can output the review results of the test documentation by comparing the differences between the test documentation and a specific template.

[0004] However, the current review model is relatively fixed and singular, resulting in a shallow review level and weak logical review capabilities, which affects the overall review quality. Summary of the Invention

[0005] This application provides a method and apparatus for testing documents to address the problem that the existing review mode is relatively fixed and singular, resulting in a shallow review level and weak logical review capability, thereby affecting the overall review quality.

[0006] In a first aspect, embodiments of this application provide a method for detecting test documents, the method comprising: Obtain the document to be tested; the document includes the software's test document; The document is parsed using a large language model to obtain its semantic information; Based on the semantic information, a knowledge graph is constructed, which includes the relationships between multiple entities in the semantic information; the entities include the objects to be tested in the software. Based on the preset set of rules, the semantic information, and the knowledge graph, the detection result of the document is determined.

[0007] Secondly, embodiments of this application provide a testing document detection device, the device comprising: The acquisition module is used to acquire the document to be detected; the document includes the software's test document. The parsing module is used to parse the document using a large language model to obtain the semantic information of the document; A construction module is used to construct a knowledge graph based on the semantic information, wherein the knowledge graph includes the relationships between multiple entities in the semantic information; the entities include the objects to be tested in the software. The detection module is used to determine the detection result of the document based on a preset set of rules, the semantic information and the knowledge graph.

[0008] Thirdly, embodiments of this application also provide an electronic device, including a processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the method of the first aspect.

[0009] Fourthly, embodiments of this application also provide a computer-readable storage medium that, when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, enables the electronic device to perform the method of the first aspect.

[0010] This application embodiment can parse documents using a large language model to obtain semantic information, and construct a knowledge graph based on the semantic information. Subsequently, based on a preset set of rules, semantic information, and knowledge graph, the detection result of the document is determined. This application embodiment accurately captures key entities and their relationships in the document through deep semantic analysis and logical relationship extraction of the test document. Thus, by integrating the semantic understanding ability of the large language model and the structured representation ability of the knowledge graph, the review level is deepened and the logical review capability is improved. Furthermore, this application embodiment can achieve multi-dimensional document review based on the rule set, ultimately realizing an efficient, transparent, and interpretable test document review scheme, improving the overall review quality.

[0011] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description

[0012] Figure 1 This is a flowchart illustrating the steps of a document detection method provided in an embodiment of this application; Figure 2 This is a flowchart illustrating the specific steps of a document detection method provided in an embodiment of this application. Figure 3 This is a schematic diagram of a knowledge graph provided in an embodiment of this application; Figure 4 This is another knowledge graph schematic diagram provided in an embodiment of this application; Figure 5 This is a framework diagram of a document detection method provided in an embodiment of this application; Figure 6 This application provides an implementation framework for a test document detection method based on a hierarchical structure design. Figure 7 This is a flowchart illustrating the implementation of a document detection method provided in an embodiment of this application. Figure 8 This is a block diagram of a test document detection device provided in an embodiment of this application; Figure 9 This is a block diagram of an apparatus according to this application; Figure 10 This is a schematic diagram of the server structure in some embodiments of this application. Detailed Implementation

[0013] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0014] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and are not limited in number; for example, a first object can be one or more. Furthermore, the term "and / or" in the specification and claims is used to describe the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. In the embodiments of this application, the term "multiple" refers to two or more, and other quantifiers are similar.

[0015] Figure 1 This is a flowchart illustrating the steps of a document detection method provided in an embodiment of this application. Figure 1 As shown, the method may include: Step 101: Obtain the document to be tested; the document includes the software's test document.

[0016] In this application embodiment, a document is a file containing text content. Specifically, a test document refers to one or more structured or semi-structured texts generated during the software development process to describe, record, and evaluate testing activities and their results. Test documents include, but are not limited to, software test reports, test cases, test plans, and defect reports. The content of test documents has strong logic, structure, and relevance, such as including elements like test objectives, preconditions, operating procedures, expected results, actual results, and test conclusions. Furthermore, there are complex references, verifications, and causal relationships between these elements and between them and external requirements and design documents. The review of test documents aims to identify various dimensions of problems, such as logical contradictions, omissions, irrationalities, and violations.

[0017] Due to the inherent logical complexity of test documents, manual review or keyword-based review tools in related technologies struggle to systematically identify logical inconsistencies, coverage gaps, and semantic contradictions. Therefore, this application utilizes a large language model for deep semantic understanding of test documents and combines it with knowledge graphs for structured reasoning to achieve accurate and comprehensive review of test documents.

[0018] Step 102: Parse the document using a large language model to obtain the semantic information of the document.

[0019] In this application embodiment, "large language model" specifically refers to a basic artificial intelligence model that has been pre-trained on massive amounts of text data and possesses powerful deep semantic understanding and generation capabilities for natural language. For the application scenarios of this application embodiment, the large language model aims to leverage its language analysis capabilities to perform semantic parsing on documents, thereby obtaining the semantic information of the documents. Semantic information encompasses the technical terms, contextual relationships, and implicit logic within the document's text content. The semantic information output by the large language model is structured data that can be processed and reasoned about by machines, thus facilitating automated machine execution. Furthermore, as the output of the large language model, the semantic information is more standardized than the original document's text content, making it easier for the machine to perform unified processing and adjustments.

[0020] In some embodiments, semantic information can take the form of logical expressions. Logical expressions are structured data units generated by a large language model after semantically parsing the text content of a document, used to formally represent the core semantic assertions in the document. Logical expressions are typically represented as normalized statements similar to predicate logic, such as Support(Software, Windows) and Contradicts(Statement_A, Requirement_B). A logical expression usually contains a relation (predicate) and several entities (software objects), precisely describing which entities (entities) have what kind of relationship with which other entities (entities).

[0021] Step 103: Construct a knowledge graph based on the semantic information. The knowledge graph includes the relationships between multiple entities in the semantic information. The entities include the test objects in the software.

[0022] In this embodiment, the knowledge graph is a graph-structured formalized data content built based on semantic information. Specifically, it is a dynamic knowledge base used to represent all logical semantics and entity relationships of a test document. The knowledge graph consists of nodes and edges. A node represents an entity, which includes basic software functions or characteristics, such as "login function," "Windows system," and "response time ≤ 2 seconds." Edges represent relationships, describing the logical connections between entities, such as verification, cause, violation, and predecessor. Semantic information is the intermediate representation connecting unstructured text and the structured knowledge graph. Semantic information can be used as input for constructing the knowledge graph and is the direct basis for generating nodes and edges in the knowledge graph.

[0023] Specifically, in the scenarios of this application embodiment, the relationships represented by edges in the knowledge graph include: ConsistentWith: Connects functional points / characteristic points, indicating that the source entity and the target entity are similar in function / characteristics.

[0024] Contradictions: Connecting functional / characteristic points, indicating that there is a conflict between the source entity and the target entity in terms of function / characteristics.

[0025] Covers: Connects function points / feature points, indicating that the source entity covers the function or component of the target entity.

[0026] Missing: Connects function points / feature points, indicating that the source entity is missing the function or component required by the target entity.

[0027] CompliesWith: Connects function points / feature points, indicating that the source entity conforms to the specifications or standards defined by the target entity.

[0028] Violates: Connect function points / feature points to indicate that the source entity violates the specifications or standards defined by the target entity.

[0029] Support: Connects function points / feature points, indicating that the source entity supports the target entity.

[0030] NotSupport: Connects function points / feature points, indicating that the source entity excludes the target entity.

[0031] Causes: Connects function points / feature points, indicating that the source entity is the cause of the target entity's occurrence or generation.

[0032] NotTheCause: Connects function points / characteristic points, indicating that the source entity is not the cause of the target entity's occurrence.

[0033] Precedes: Connecting function points / feature points, indicating that the source entity occurs before the target entity in time or process.

[0034] Followers: Connect function points / feature points, indicating that the source entity occurs after the target entity in time or process.

[0035] Knowledge graphs integrate the scattered logical relationships within documents into a unified, interconnected graph network. Furthermore, knowledge graphs are a data structure that can be processed by machines, supporting algorithms such as graph traversal, subgraph matching, and path discovery, providing a direct reasoning basis for logical review. Additionally, within the system's feedback loop, knowledge graphs can be dynamically adjusted by adding nodes, deleting edges, or modifying attributes to more accurately reflect the system's understanding of the documents.

[0036] In related technologies, the document review process is often a black box, lacking a traceable chain of evidence for the review results. Users find it difficult to understand the specific basis for the review conclusions, reducing the credibility and acceptability of the review results. In this application embodiment, knowledge graphs can serve as a benchmark for logical review. They make implicit logical relationships in documents explicit, providing a visualized and traceable chain of evidence for the review conclusions, and are a key technology for solving the problem of a black box review process.

[0037] Step 104: Based on the preset rule set, the semantic information, and the knowledge graph, determine the detection result of the document.

[0038] In this embodiment, document review involves multi-dimensional and in-depth logical verification of the test document based on logical rules and semantic standards to ensure that its content is logically consistent, complete, and conforms to established specifications. The review process mainly covers multiple dimensions, including consistency, completeness, compliance, semantic rationality, causality, and sequence / process. This embodiment can set corresponding rules for each dimension to form a rule set, and then use this rule set to analyze and detect semantic information and knowledge graphs to obtain the document detection results. These detection results cover the problems existing in the document under each of the above dimensions, the location of the problems, and the solutions to the problems.

[0039] For example, during the semantic reasonableness review process, the rule defines that the test document covers all major operating systems. However, by comparing semantic information with the knowledge graph, it is found that the semantics of "IOS and Android" in the test document statement are not supported by evidence in the test document and do not meet the semantic reasonableness requirements. Therefore, a detection result including relevant conclusions is generated.

[0040] In summary, this application embodiment can parse documents using a large language model to obtain semantic information, and construct a knowledge graph based on this semantic information. Subsequently, based on a preset set of rules, semantic information, and the knowledge graph, the detection result of the document is determined. This application embodiment accurately captures key entities and their relationships in test documents through deep semantic analysis and logical relationship extraction. By integrating the semantic understanding capabilities of a large language model with the structured representation capabilities of a knowledge graph, it deepens the review level and improves logical review capabilities. Furthermore, this application embodiment can achieve multi-dimensional document review based on the rule set, ultimately realizing an efficient, transparent, and explainable test document review scheme, improving the overall review quality.

[0041] Figure 2 This is a flowchart illustrating the specific steps of a document detection method provided in an embodiment of this application. Figure 2 As shown, the method may include: Step 201: Obtain the document to be tested; the document includes the software test document.

[0042] For details, please refer to step 101 above; it will not be repeated here.

[0043] Step 202: Extract the entities in the document and the relationships between them using a large language model.

[0044] Step 203: Construct a logical expression based on the entity and the relationship, and use the logical expression as the semantic information.

[0045] In this embodiment, for steps 202-203, entities and their relationships within a document can be extracted using a large language model. Based on the extracted entities and relationships, logical expressions can be constructed, which serve as the semantic information. Logical expressions are structured data units used to formally represent core semantic assertions in a document; they typically resemble standardized statements similar to predicate logic.

[0046] For example, suppose the test documentation includes a test file whose text content is divided into a declaration section and a test content section. The declaration section includes a statement regarding the review task of verifying the cross-platform compatibility of a certain software, specifically stating: "This software supports all major operating systems, including Windows, macOS, Linux, iOS, and Android." The test content section indicates that the software only supports Windows, macOS, and Linux.

[0047] The large language model can extract entities from the document: software, operating system, and the relationship between software and operating system: support. This allows us to generate logical expression 1: Support(Software, {Windows,macOS, Linux, IOS, Android}) and logical expression 2: Support(Software, {Windows,macOS, Linux}).

[0048] For example, the document states: "After upgrading the server memory from 16GB to 32GB, the system's concurrent processing capability improved. Test results showed that the average response time decreased from 200ms to 50ms." Using a large language model, the entities in the document can be extracted: server memory, concurrent processing capability, and average response time; the relationships are: improved and decreased. The generated logical expressions include: Improve(MemoryUpgrade,ConcurrentProcessingCapability); / / Reflects a server memory upgrade event; Decrease(AverageResponseTime, 200ms, 50ms); / / This reflects the reduction of the average response time from 200ms to 50ms.

[0049] Step 204: Using the entities as nodes and the relationships between the entities as edges between the nodes, obtain the knowledge graph.

[0050] In this embodiment, entities in logical expressions can be used as nodes, and the relationships between these entities can be used as edges between these nodes to construct a knowledge graph. The knowledge graph can visually represent the relationships between entities. It integrates the scattered logical relationships within a document into a unified, interconnected graph network. Furthermore, a knowledge graph is a data structure that can be processed by machine computation. It supports algorithms such as graph traversal, subgraph matching, and path discovery, providing a direct reasoning basis for logical review. Additionally, in the system's feedback loop, the knowledge graph can be dynamically adjusted by adding nodes, deleting edges, or modifying attributes to more accurately reflect the system's understanding of the document.

[0051] For example, suppose the test documentation includes a test file whose text content is divided into a declaration section and a test content section. The declaration section includes a statement regarding the review task of verifying the cross-platform compatibility of a certain software, specifically stating: "This software supports all major operating systems, including Windows, macOS, Linux, iOS, and Android." The test content section indicates that the software only supports Windows, macOS, and Linux.

[0052] The large language model can extract entities from the document: software, operating system, and the relationship between software and operating system: support. This allows us to generate logical expression 1: Support(Software, {Windows,macOS, Linux, IOS, Android}) and logical expression 2: Support(Software, {Windows,macOS, Linux}).

[0053] Based on logical expression 1: Support(Software, {Windows, macOS, Linux, IOS, Android}, we can analyze and obtain the entities {Software, Windows, macOS, Linux, IOS, Android}; and the relationships: Support(Software, Windows), Support(Software, macOS), Support(Software, Linux), Support(Software, IOS), Support(Software, Android). Based on this, we can construct... Figure 3 The knowledge graph shown indicates that the software supports Linux, macOS, Windows, iOS, and Android operating systems.

[0054] Based on logical expression 2: Support(Software, {Windows, macOS, Linux}, we can analyze and obtain the entities {Software, Windows, macOS, Linux}; and the relations: Support(Software, Windows), Support(Software, macOS), Support(Software, Linux). Based on this, we can construct... Figure 4 The knowledge graph shown indicates that the software supports Linux, macOS, and Windows operating systems.

[0055] The contradiction can be found by comparing logical expression 1 and logical expression 2, or by comparing two knowledge graphs: there is an inconsistency between the declaration part and the test content part in the test file, and the contradiction is specifically the operating system supported by the software.

[0056] Additionally, assuming the detection rules define the test content section of the test document as the accurate section, a more precise contradiction warning can be output: "The contradiction is caused by an error in the declaration section of the test file. The declaration needs to be modified to: The software supports Windows, macOS, and Linux."

[0057] Step 205: Based on various types of detection rules, analyze the logical expression and the knowledge graph respectively to obtain the analysis results corresponding to each type of detection rule.

[0058] In this embodiment, semantic information can be in the form of logical expressions, and the rule set can include various types of detection rules. Multi-dimensional and in-depth logical verification is performed on the test document to ensure that its content is logically consistent, complete, and conforms to established specifications. The review process mainly covers multiple dimensions, including: consistency, completeness, compliance, semantic rationality, causal relationships, and sequence / process. This embodiment can set corresponding rules for each dimension and, based on various types of detection rules, analyze the logical expressions and knowledge graphs separately to obtain the analysis results corresponding to each type of detection rule.

[0059] This application embodiment, through deep semantic analysis and logical relationship extraction of test documents, can accurately capture key entities and their relationships in the documents, thereby improving the depth of review. Combined with multi-dimensional rule review, it can comprehensively review the completeness of shallow and deep content in test documents, reduce the probability of review omissions, and improve logical review capabilities.

[0060] Step 206: Construct all the analysis results into the detection results.

[0061] By combining the analysis results from various dimensions, the detection results can be obtained. These results can be visualized graphically to improve the transparency and intuitiveness of the review process.

[0062] Optionally, the rule set includes consistency detection rules; the test document includes at least one test file; step 205 may specifically include: Sub-step 2051: According to the consistency detection rules, compare the logical expression with the association relationship between entities in the knowledge graph to obtain the consistency analysis result; the consistency analysis result includes: contradiction points between different test contents in the same test file, contradiction points between the test contents of different test files in the test document, contradiction type and severity.

[0063] In this embodiment, consistency detection is primarily used to check for contradictions between different test contents within the same test file, between individual test contents within different test files in a test document, and between the test document and external knowledge sources (such as requirements specifications and design documents). For example, the declaration section of a test file states, "The software supports all major operating systems," while the test content section of the test file shows, "The software only supports Windows, macOS, and Linux." Specifically, consistency detection can identify inconsistencies by comparing existing factual relationships between different logical expressions, different knowledge graphs, and between logical expressions and knowledge graphs. For instance, if the operating systems supported by the software in the declaration differ from those supported by the software in the test content, this is considered inconsistent.

[0064] The input to consistency checking is a logical expression and a knowledge graph. The processing logic includes: 1. Comparing the statements in the logical expression with existing relationships in the knowledge graph; 2. Checking for semantic conflicts or logical contradictions; 3. Verifying the logical consistency between statements within the document and between the document and external knowledge sources; 4. Identifying contradictory or incompatible statements. The output of consistency checking includes: the location of contradictions, the type of conflict, and its severity.

[0065] Consistency checks can include: internal consistency checks, external consistency checks, and statements and evidence consistency checks. Internal consistency check: Used to traverse the edges in the knowledge graph and check for directly contradictory pairs of relationships. For example, the same pair of entities may have both support and exclusion relationships, or both consistent and contradictory relationships.

[0066] External consistency check: When an external benchmark graph (such as a requirements document graph) is provided, the knowledge graph to be reviewed is compared with the external benchmark graph to check whether the relationships between corresponding entities are consistent. For example, if "software" in the benchmark graph supports "Windows", but "software" in the knowledge graph to be reviewed does not support "Windows", it is marked as inconsistent.

[0067] Consistency between claims and evidence: This involves comparing logical expressions with evidence nodes in a knowledge graph (such as test result data). For example, if a logical expression claims "excellent performance," but the associated performance data nodes in the knowledge graph show a long response time, then there is inconsistency.

[0068] For example, the declaration section of the test file claims that "the software supports all major operating systems" (assuming that the predefined major operating systems are {Windows, Linux, macOS, iOS, Android}), but the test content section of the test file shows that the software supports Windows, Linux, and macOS.

[0069] This generates logical expression 1: Support(Software, {Windows, macOS, Linux, IOS, Android}) and logical expression 2: Support(Software, {Windows, macOS, Linux}). The corresponding logical expression 1 is then constructed. Figure 3 The knowledge graph shown, and the corresponding logical expression 2. Figure 4 The knowledge graph shown.

[0070] In one implementation, consistency checking can be performed... Figure 4 Search the knowledge graph shown to find all "Operating System" nodes connected to the "Software" node through the "Support" relationship. By comparing the logical expression 1 Support(Software,{Windows, macOS, Linux, IOS, Android}, we find... Figure 4 The knowledge graph shown is missing edges between the "iOS" and "Android" nodes and the "Software" node. The final consistency analysis results indicate an inconsistency: the statement "Software supports all major operating systems" is inconsistent with the actual support list recorded in the test content; the test content lacks support for iOS and Android.

[0071] In another implementation, consistency checking can compare... Figure 4 The knowledge graph shown and Figure 3The knowledge graph shown can also output inconsistencies: the statement that "the software supports all major operating systems" is inconsistent with the actual list of supported systems recorded in the test content, and the test content lacks support for iOS and Android.

[0072] In another implementation, consistency checks can be performed by comparing logical expression 1 and logical expression 2, and can also output inconsistency issues: the statement "the software supports all major operating systems" is inconsistent with the actual support list recorded in the test content, and the test content lacks software support for iOS and Android.

[0073] Optionally, the rule set includes integrity detection rules; step 205 may specifically include: Sub-step 2052: According to the integrity detection rules, determine the missing content in the logical expression through the preset integrity checklist.

[0074] Sub-step 2053: According to the integrity detection rules, compare the relationship between the logical expression and the entities in the knowledge graph, and combine the missing content to obtain the integrity analysis result; the integrity analysis result includes the missing content, the missing relationship, and the missing entity in the relationship.

[0075] In this embodiment, integrity checking is used to verify whether the test documentation covers all necessary components, such as test objectives, environment configuration, test case steps, expected results, actual results, and conclusions. It also identifies any missing critical information.

[0076] The input to integrity checks includes integrity rules (in graph form or integrity checklist) and a knowledge graph. The processing logic includes: 1. Verifying that the document contains all required components against the integrity checklist; 2. Checking for missing or incomplete key information; 3. Verifying that the document structure meets predefined requirements; 4. Identifying missing test elements or uncovered functionalities. The output of integrity checks includes missing content, missing relationships, and missing entities within those relationships.

[0077] Integrity checks can include: structural integrity checks, logical coverage integrity checks, and information integrity checks. Structural integrity check: This function searches for nodes of the corresponding document type in the knowledge graph based on document type templates (e.g., a test report must include sections such as "Test Objectives," "Test Environment," "Test Procedures," "Test Results," and "Conclusion"). If a node of a required type is missing, the structure is considered incomplete.

[0078] Logical coverage integrity check: This is used to perform subgraph matching between the graph to be reviewed and the baseline graph. For example, each "functional requirement" node in the baseline graph should be connected to at least one "test case" node in the graph to be reviewed through a "verification" relationship. Otherwise, it is considered incomplete coverage.

[0079] Information completeness check: Used to check whether key attributes are missing. For example, each "Test Case" node should have an "Execution Result" attribute; if it is empty, it is considered that the information is incomplete.

[0080] For example, the pre-defined integrity checklist defines: (Requirement 1: User Login) - [:Include] -> (Function A: Password Encryption); (Requirement 1) - [:Include] -> (Function B: Two-Factor Authentication); The knowledge graph to be reviewed includes: (Test Case 1: Login Test) - [:Verification] -> (Requirement 1: User Login), but it is not explicitly associated with Functions A and B.

[0081] When performing integrity checks, you can first search the knowledge graph for all nodes of type "function". It was found that although functions A (password encryption) and B (two-factor authentication) belong to requirement 1, there are no test steps or verification point nodes connected to them in the knowledge graph. Therefore, the final integrity analysis result is: "The document is incomplete in logical coverage. The test cases cover the 'user login' requirement, but specific test steps or verification items are not clearly designed for its two key functional points, 'password encryption' and 'two-factor authentication'. Supplementation is recommended." Optionally, the rule set includes compliance detection rules; step 205 may specifically include: Sub-step 2054: According to the compliance detection rules, search the knowledge graph for subgraphs that do not conform to the compliance detection rules to obtain compliance analysis results; the compliance analysis results include the content reflected by the subgraphs that do not conform to the compliance detection rules.

[0082] In this embodiment of the application, compliance testing is used to verify whether the format, content, and conclusions of the test document conform to industry standards, company internal testing specifications, or project-specific quality requirements.

[0083] The inputs to compliance testing include compliance rules (either graphed or used as a rule engine) and a knowledge graph. The processing logic includes: 1. Matching document content against the standards in the compliance rules; 2. Verifying whether the document format, content, and conclusions conform to established specifications; 3. Checking whether industry standards or project-specific quality requirements are met; 4. Identifying document sections that violate compliance requirements. The outputs of compliance testing include the content reflected in the subgraph that does not conform to the compliance testing rules.

[0084] Compliance checks may include: rule matching and attribute constraint checks. Rule matching: Used to pre-compile compliance rules into executable graph query patterns. During review, this pattern is searched in the knowledge graph to be reviewed; if no matching subgraph is found, a violation is considered.

[0085] Attribute constraint detection: Used to check whether the attributes of nodes in a knowledge graph conform to the specifications.

[0086] For example, when reviewing whether a test report for medical software complies with industry standards (such as ISO 62304), one of the rules of the review process is: "Software change testing must include regression test cases."

[0087] The system then searches for the "Change Test" node in the knowledge graph under review, and then searches for "Test Case" nodes connected by "Containment" relationships, checking whether the type attribute of these nodes is "Regression Test". If no test case node of type "Regression Test" is found, a violation is determined.

[0088] Optionally, the rule set includes semantic detection rules; step 205 may specifically include: Sub-step 2055: Obtain the semantic analysis result based on the semantic detection rules and the logical expression; the semantic analysis result includes: logical expressions that do not conform to the semantic detection rules.

[0089] In this embodiment of the application, semantic detection is used to utilize the deep semantic understanding capabilities of a large language model to check whether the semantic descriptions in the test document reasonably support each other.

[0090] The input to semantic detection includes logical expressions and semantic detection rules. The processing logic includes: 1. Analyzing the rationality and coherence of the semantic description using a large language model; 2. Checking for logical jumps or conceptual confusion in the semantic expression; 3. Verifying the semantic support relationships between different parts; 4. Identifying semantically ambiguous or inappropriately expressed content. The output of semantic detection includes logical expressions that do not conform to the semantic detection rules.

[0091] Semantic detection can include: context extraction, large language model inference, and result parsing. Context extraction: Used to extract local subgraphs of focal nodes / relationships from a knowledge graph and convert them into natural language descriptions.

[0092] Large language model reasoning: used to judge the rationality through a large language model.

[0093] Results Analysis: Used to analyze responses from large language models and extract reasonableness judgments (yes / no) and reasons.

[0094] For example, the test documentation includes "the system performs excellently", but the associated performance data nodes in the knowledge graph show that the average response time is 1500ms and the CPU utilization is 95% under 1000 concurrent users.

[0095] Semantic detection can first locate the "excellent performance" node, extract its associated performance data subgraph, and convert the subgraph information into text: "Test environment: 1000 concurrent users; Result: Average response time 1500ms, CPU utilization 95%."

[0096] Then, using a large language model analysis: "With 1000 concurrent users, the average response time is 1500ms and the CPU utilization is 95%. Can we conclude that the system performance is excellent?" The large language model replied: "According to common performance standards, an average response time of 1500ms under 1000 concurrency is considered slow, and a CPU utilization of 95% indicates that resources are close to saturation. Therefore, the claim of excellent performance is unreasonable." The semantic analysis results output by the semantic detection are as follows: The semantics are unreasonable: The conclusion "the system performs excellently" does not match the test data. It is recommended to revise the conclusion or re-evaluate the performance standard.

[0097] Optionally, the rule set includes causal relationship and time series detection rules; step 205 may specifically include: Sub-step 2056: Using the logical expression, search the knowledge graph for subgraphs that do not conform to the causal relationship and time series detection rules to obtain causal relationship and time series analysis results; the causal relationship and time series analysis results include the content reflected by the subgraphs that do not conform to the causal relationship and time series detection rules.

[0098] In the embodiments of this application, causal relationship and timing detection are used to analyze whether the causal relationship between the test results and the test operation and environment configuration is valid, to verify whether the order of steps in the verification test process is reasonable, and to verify whether time-related statements (such as response time and concurrent processing sequence) are logically consistent.

[0099] The inputs for causal relationship and time-series detection include causal relationship and time-series detection rules and a knowledge graph. The processing logic includes: 1. Extracting causal relationship claims described in the documents; 2. Verifying the logical conditions and supporting evidence for the causal relationships; 3. Checking for false causal relationships or causal inversions; 4. Analyzing the completeness and rationality of the causal chain; 5. Extracting the time sequence and process steps described in the documents; 6. Verifying whether the step sequence conforms to the logical flow requirements; 7. Checking the consistency of time-related claims; 8. Identifying circular dependencies or deadlocks in the process logic. The outputs of causal relationship and time-series detection include the content reflected in subgraphs that do not conform to the stated causal relationship and time-series detection rules.

[0100] Causality detection can include: causal chain extraction, loop detection, and causal inversion detection. Causal chain extraction: Used to find all edges in a knowledge graph that are of the type "cause", "lead", "result", etc., and to construct causal chains.

[0101] Loop detection: Used to detect the existence of loops in a causal graph using graph algorithms. For example, if A leads to B, and B leads to A, this is a logical error.

[0102] Causal inversion detection: Used to check for causal relationships where the time sequence or logical order is reversed. For example, the common sense understanding might be that "system crash" leads to "memory leak".

[0103] In addition, timing inspection can include: process extraction, sequence verification, deadlock / loop detection, and timing consistency checks. Process extraction: Used to extract all temporal relationship edges such as "predecessor", "successor", and "next step" from the knowledge graph and construct a directed process graph.

[0104] Sequence verification: Used to check for edges in a flowchart that violate the basic order. For example, "Log in" must precede "Access personal information," and if a reverse edge exists in the graph, it is a violation.

[0105] Deadlock / cycle detection: Used to detect whether there are unreachable nodes or circular dependencies in the flowchart. If so, it may cause the process to fail to complete.

[0106] Time consistency check: Used for nodes with timestamp attributes to check if the time sequence is consistent with the relation edges. For example, the "Test Start Time" node should be earlier than the "Test End Time" node.

[0107] For causal relationship detection, for example, if the test document states, "The database connection pool was exhausted because the user clicked the submit button," the causal relationship detection process can detect an edge in the knowledge graph: (user clicks the submit button) - [:leads to] -> (database connection pool exhausted). Furthermore, it detects an anomaly in this causal relationship because a single click operation usually does not directly exhaust the connection pool; there may be a missing link in the middle. Therefore, the output for causal relationship detection is: The evidence for the causal relationship "user clicks the submit button, causing the database connection pool to be exhausted" is insufficient; there may be a missing intermediate cause, and further analysis is recommended.

[0108] For timing detection, for example, a test flow description in a test document states: "First perform stress testing, then functional testing, and finally environment setup." Timing detection can extract the flow edges from the graph: (stress testing) - [:predecessor] -> (functional testing), (functional testing) - [:predecessor] -> (environment setup). Since "environment setup" should precede all tests, the "environment setup" node is detected at the end of the flow, violating the basic order. Timing detection can output: The "environment setup" step in the flow should not be after the tests; it is recommended to adjust the order so that "environment setup" precedes "stress testing."

[0109] Optionally, after step 206, the following steps are also included: Step 207: Based on the detection results, update the semantic information and the knowledge graph respectively, so as to modify the parts of the semantic information and the knowledge graph that do not conform to the rules in the rule set to conform to the rules.

[0110] Step 208: Based on the updated semantic information and the knowledge graph, proceed to step 205.

[0111] In this embodiment of the application, for steps 207-208, this embodiment of the application provides a feedback mechanism that dynamically adjusts semantic information and knowledge graph based on the detection results of the test document. The core objective of the feedback mechanism is to actively correct the internal, intermediate representations of the logical expression and knowledge graph when there are contradictions between the logical expression, knowledge graph, and review rules. This helps to automatically adjust the logical expression or knowledge graph when inconsistencies or contradictions are found during the review process, and repeat the review steps until the preset conditions are met, thereby generating a more accurate review result.

[0112] The feedback mechanism includes: 1. Generating adjustment instructions when inconsistencies or contradictions are found during the review; 2. Adjusting the logical expressions and / or knowledge graph based on the adjustment instructions; 3. Triggering a new round of parsing, construction, and review processes; 4. Repeating the iteration until the preset review termination conditions are met.

[0113] For example, the declaration section of the test file claims that "the software supports Windows, Linux, macOS, iOS, and Android," but the test content section of the test file shows that "the software supports Windows, Linux, and macOS."

[0114] This generates logical expression 1: Support(Software, {Windows, macOS, Linux, IOS, Android}) and logical expression 2: Support(Software, {Windows, macOS, Linux}). The corresponding logical expression 1 is then constructed. Figure 3 The knowledge graph shown, and the corresponding logical expression 2. Figure 4 The knowledge graph shown.

[0115] Assuming the detection rules define the test content portion of the test document as the accurate portion, this embodiment of the application can update logical expression 1 through a dynamic feedback mechanism, removing "IOS and Android" from the original logical expression 1, generating a new logical expression 1': Support(Software, {Windows, macOS, Linux}), and updating based on the new logical expression 1'. Figure 3 The knowledge graph shown was reviewed again, and the logical expression was confirmed to be consistent with the knowledge graph, so the iteration was terminated. The final detection result output: "Review result: The original statement is incorrect; the software does not support iOS and Android." Correction suggestion: "The statement should be corrected to 'The software supports Windows, macOS, and Linux'."

[0116] In summary, referring to Figure 5 The diagram illustrates the implementation architecture of a test document detection method provided in this application, including: a document input module, a semantic parsing module, a graph construction module, a logic review module, and a result output module.

[0117] The document input module receives user-uploaded documents for review (such as technical reports and test documents). The module is implemented as a RESTful API, supporting various document formats and providing text parsing capabilities.

[0118] Semantic parsing module: Utilizing the deep semantic understanding capabilities of a large language model, this module parses the semantic information of the input document and transforms it into structured logical expressions to accurately capture key entities and relationships within the document. The semantic parsing module is specifically implemented as a large language model, which can be fine-tuned to adapt to the test document domain.

[0119] The graph construction module is used to build a structured knowledge graph based on the logical expressions output by the semantic parsing module. This graph clearly presents the logical framework of a document through nodes (entities) and edges (relationships). The specific software implementation of the graph construction module is the Neo4j graph database, which can convert logical expressions into graph structures.

[0120] The logic review module is used to compare logical expressions with the knowledge graph through integrated processing and to perform verification based on the rule set in order to identify contradictions, inconsistencies or omissions in documents.

[0121] The results output module integrates the verification results from the logic review module to generate a final structured review report. The report typically includes the review conclusion (pass / fail), specific issues identified, and suggested corrective actions.

[0122] Reference Figure 6 This paper presents a framework for a test document detection method based on a layered structure design, including: a user interface diagram, a functional layer, a development layer, a data layer, and a model layer.

[0123] The user interface layer provides a front-end interactive interface, allowing users to upload documents, configure processing parameters, and view processing results.

[0124] The functional layer includes: a document input module that receives user-uploaded documents and supports multiple formats; a semantic parsing module that performs semantic analysis and entity recognition on the document content; a knowledge graph construction module that constructs a knowledge graph based on the parsing results and stores entities and their relationships; a logic review module that performs logical checks on the relationships and facts in the knowledge graph; and a result output module that returns the review results to the user in a structured form.

[0125] The development layer is used for related interfaces, supporting modular calls to system functions and external integration.

[0126] The data layer uses a database to store intermediate data and system operating status; it uses Neo4j to store knowledge graph data, supporting graph structure querying and reasoning.

[0127] The model layer is used to provide reasoning services for large language models, supporting learning tasks in semantic parsing and graph construction.

[0128] The hardware environment for the document detection method implemented in this embodiment includes: a server cluster equipped with a graphics processor for large language model inference and ≥16GB of memory for storing document and graph data. The front-end interacts with the back-end via a communication protocol, and the back-end module achieves asynchronous communication through a message queue.

[0129] In summary, referring to Figure 7 The diagram illustrates a flowchart of a document detection method provided in this application. Step S1: Receive the uploaded test document.

[0130] Step S2: Extract entities and relationships through the document input domain semantic parsing module.

[0131] Step S3: Generate a structured logical expression through the document input domain semantic parsing module.

[0132] Step S4: Construct / update the knowledge graph based on logical expressions using the knowledge graph construction module.

[0133] After passing through the logic review module, which sequentially performs consistency review, integrity review, compliance review, semantic review, causal relationship review, and timing review, step S5 is executed to generate the review results.

[0134] Step S6: Is there any inconsistency / contradiction and has the termination condition not been met?

[0135] If no, proceed to step S7, review passed, and output a report. If yes, proceed to step S8, generate adjustment instructions. Adjustment instructions are used to adjust logical expressions and / or knowledge graphs.

[0136] In summary, this application embodiment can parse documents using a large language model to obtain semantic information, and construct a knowledge graph based on the semantic information. Subsequently, based on a preset set of rules, semantic information, and knowledge graph, the detection result of the document is determined. This application embodiment accurately captures key entities and their relationships in the document through deep semantic analysis and logical relationship extraction of the test document. Thus, by integrating the semantic understanding capability of the large language model and the structured representation capability of the knowledge graph, the review level is deepened and the logical review capability is improved. Furthermore, this application embodiment can achieve multi-dimensional document review based on the rule set, ultimately realizing an efficient, transparent, and explainable test document review scheme, improving the overall review quality.

[0137] Figure 8 This is a block diagram of a document testing device provided in an embodiment of this application. The device includes: The acquisition module 301 is used to acquire the document to be detected; the document includes the software's test document; Parsing module 302 is used to parse the document using a large language model to obtain the semantic information of the document; The construction module 303 is used to construct a knowledge graph based on the semantic information, wherein the knowledge graph includes the association relationships between multiple entities in the semantic information; the entities include the test objects in the software. The detection module 304 is used to determine the detection result of the document based on a preset set of rules, the semantic information and the knowledge graph.

[0138] Optionally, the parsing module 302 includes: The extraction submodule is used to extract entities and relationships between entities from the document using a large language model. The first construction submodule is used to construct a logical expression based on the entity and the association relationship, and to use the logical expression as the semantic information; The construction module 303 includes: The second construction submodule is used to obtain the knowledge graph by treating the entities as nodes and the relationships between the entities as edges between the nodes.

[0139] Optionally, the semantic information is in the form of a logical expression; the rule set includes various different types of detection rules; The detection module 304 includes: The analysis submodule is used to analyze the logical expression and the knowledge graph based on various types of detection rules, and obtain the analysis results corresponding to each of the various types of detection rules. The third construction submodule is used to construct the detection results from all the analysis results.

[0140] Optionally, the rule set includes consistency detection rules; the test document includes at least one test file; The analysis submodule includes: The first analysis unit is used to compare the logical expression with the association relationship between entities in the knowledge graph according to the consistency detection rules, and obtain the consistency analysis result. The consistency analysis result includes: contradiction points between different test contents in the same test file, contradiction points between the test contents of different test files in the test document, contradiction type, and severity.

[0141] Optionally, the rule set includes integrity detection rules; The analysis submodule includes: The second analysis unit is used to determine the missing content in the logical expression according to the integrity detection rules and a preset integrity checklist; The third analysis unit is used to compare the logical expression with the entity in the knowledge graph according to the integrity detection rules, and combine the missing content to obtain the integrity analysis result; the integrity analysis result includes the missing content, the missing relationship, and the missing entity in the relationship.

[0142] Optionally, the rule set includes compliance detection rules; The analysis submodule includes: The fourth analysis unit is used to search for subgraphs in the knowledge graph that do not conform to the compliance detection rules, in accordance with the compliance detection rules, and to obtain compliance analysis results; the compliance analysis results include the content reflected by the subgraphs that do not conform to the compliance detection rules.

[0143] Optionally, the rule set includes semantic detection rules; The analysis submodule includes: The sixth analysis unit is used to obtain semantic analysis results based on the semantic detection rules and the logical expressions; the semantic analysis results include: logical expressions that do not conform to the semantic detection rules.

[0144] Optionally, the rule set includes causal relationship and time sequence detection rules; The analysis submodule includes: The seventh analysis unit is used to search for subgraphs in the knowledge graph that do not conform to the causal relationship and time series detection rules through the logical expression, and obtain causal relationship and time series analysis results; the causal relationship and time series analysis results include the content reflected by the subgraphs that do not conform to the causal relationship and time series detection rules.

[0145] Optionally, the device further includes: An update module is used to update the semantic information and the knowledge graph based on the detection results, so as to modify the parts of the semantic information and the knowledge graph that do not conform to the rules in the rule set to conform to the rules; The adjustment module is used to determine the detection result of the document based on the updated semantic information and the knowledge graph, by entering the preset rule set, the semantic information and the knowledge graph.

[0146] In summary, this application embodiment can parse documents using a large language model to obtain semantic information, and construct a knowledge graph based on the semantic information. Subsequently, based on a preset set of rules, semantic information, and knowledge graph, the detection result of the document is determined. This application embodiment accurately captures key entities and their relationships in the document through deep semantic analysis and logical relationship extraction of the test document. Thus, by integrating the semantic understanding capability of the large language model and the structured representation capability of the knowledge graph, the review level is deepened and the logical review capability is improved. Furthermore, this application embodiment can achieve multi-dimensional document review based on the rule set, ultimately realizing an efficient, transparent, and explainable test document review scheme, improving the overall review quality.

[0147] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0148] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0149] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0150] This application provides a test document detection device, including a memory and one or more programs, wherein one or more programs are stored in the memory and configured to be executed by one or more processors, the one or more programs including methods described in one or more of the above embodiments.

[0151] Figure 9 This is a block diagram illustrating a document testing device 800 according to an exemplary embodiment. For example, device 800 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.

[0152] Reference Figure 9 The device 800 may include one or more of the following components: a processing component 802, a memory 804, a power supply component 806, a multimedia component 808, an audio component 810, an input / output (I / O) interface 812, a sensor component 814, and a communication component 816.

[0153] Processing component 802 typically controls the overall operation of device 800, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 802 may include one or more processors 820 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 802 may include one or more modules to facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.

[0154] Memory 804 is configured to store various types of data to support the operation of device 800. Examples of this data include instructions for any application or method operating on device 800, contact data, phonebook data, messages, pictures, videos, etc. Memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0155] Power supply component 806 provides power to various components of device 800. Power supply component 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to device 800.

[0156] Multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 808 includes a front-facing camera and / or a rear-facing camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0157] Audio component 810 is configured to output and / or input audio signals. For example, audio component 810 includes a microphone (MIC) configured to receive external audio signals when device 800 is in an operating mode, such as call mode, recording mode, and voice information processing mode. The received audio signals may be further stored in memory 804 or transmitted via communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.

[0158] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.

[0159] Sensor assembly 814 includes one or more sensors for providing status assessments of various aspects of device 800. For example, sensor assembly 814 can detect the on / off state of device 800, the relative positioning of components such as the display and keypad of device 800, and can also detect changes in the position of device 800 or a component of device 800, the presence or absence of user contact with device 800, the orientation or acceleration / deceleration of device 800, and temperature changes of device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 814 may also include an accelerometer, a gyroscope, a magnetometer, a pressure sensor, or a temperature sensor.

[0160] Communication component 816 is configured to facilitate wired or wireless communication between device 800 and other devices. Device 800 can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, communication component 816 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 816 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency information processing (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0161] In an exemplary embodiment, the apparatus 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.

[0162] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, which can be executed by a processor 820 of the device 800 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0163] Figure 10This is a schematic diagram of the server structure in some embodiments of this application. The server 1900 can vary significantly due to different configurations or performance, and may include one or more central processing units (CPUs) 1922 (e.g., one or more processors) and memory 1932, and one or more storage media 1930 (e.g., one or more mass storage devices) for storing application programs 1942 or data 1944. The memory 1932 and storage media 1930 can be temporary or persistent storage. The program stored in the storage media 1930 may include one or more modules (…). Figure 10 (Not shown), each module may include a series of instruction operations on the server. Furthermore, the central processing unit 1922 may be configured to communicate with the storage medium 1930 and execute the series of instruction operations on the storage medium 1930 on the server 1900.

[0164] The server 1900 may also include one or more power supplies 1926, one or more wired or wireless network interfaces 1950, one or more input / output interfaces 1958, one or more keyboards 1956, and / or one or more operating systems 1941, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0165] A non-transitory computer-readable storage medium, wherein instructions in the storage medium, when executed by a processor of a device (server or terminal), enable the device to perform the methods of the embodiments described above.

[0166] A non-transitory computer-readable storage medium is provided, which, when the instructions in the storage medium are executed by the processor of a device (server or terminal), enables the device to perform the methods described in the above embodiments; therefore, further details will not be repeated here. Additionally, the beneficial effects of employing the same method will also not be repeated. For technical details not disclosed in the computer program products or computer program embodiments related to this application, please refer to the description of the method embodiments of this application.

[0167] Furthermore, it should be noted that this application also provides a computer program product or computer program, which may include computer instructions, which may be stored in a computer-readable storage medium. The processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor can execute the computer instructions to cause the computer device to perform the methods described in the above embodiments; therefore, these will not be repeated here. Additionally, the beneficial effects of using the same method will also not be repeated. For technical details not disclosed in the embodiments of the computer program product or computer program involved in this application, please refer to the description of the method embodiments of this application.

[0168] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.

[0169] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

[0170] The above description is only a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

[0171] The above provides a detailed description of a test document detection method, apparatus, electronic device, and computer-readable storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for detecting test documents, characterized in that, The method includes: Obtain the document to be tested; the document includes the software's test document; The document is parsed using a large language model to obtain its semantic information; Based on the semantic information, a knowledge graph is constructed, which includes the relationships between multiple entities in the semantic information; the entities include the objects to be tested in the software. Based on the preset set of rules, the semantic information, and the knowledge graph, the detection result of the document is determined.

2. The method for detecting test documents according to claim 1, characterized in that, The semantic information is in the form of a logical expression; the rule set includes various different types of detection rules. The determination of the detection result for the document based on the preset rule set, the semantic information, and the knowledge graph includes: Based on various types of detection rules, the logical expression and the knowledge graph are analyzed respectively to obtain the analysis results corresponding to each type of detection rule; All analysis results are used to construct the detection results.

3. The method for detecting test documents according to claim 2, characterized in that, The rule set includes consistency detection rules; the test document includes at least one test file. The logical expression and the knowledge graph are analyzed based on various types of detection rules to obtain analysis results corresponding to each type of detection rule, including: According to the consistency detection rules, the logical expression is compared with the association between entities in the knowledge graph to obtain the consistency analysis results. The consistency analysis results include: contradictions between different test contents in the same test file, contradictions between the test contents of different test files in the test document, contradiction types, and severity.

4. The method for detecting test documents according to claim 2, characterized in that, The rule set includes integrity detection rules; The logical expression and the knowledge graph are analyzed based on various types of detection rules to obtain analysis results corresponding to each type of detection rule, including: According to the integrity detection rules, the missing content in the logical expression is determined through a preset integrity checklist; According to the integrity detection rules, the logical expression is compared with the association between entities in the knowledge graph, and the missing content is combined to obtain the integrity analysis result; the integrity analysis result includes the missing content, the missing association, and the missing entity in the association.

5. The method for detecting test documents according to claim 2, characterized in that, The rule set includes compliance detection rules; The logical expression and the knowledge graph are analyzed based on various types of detection rules to obtain analysis results corresponding to each type of detection rule, including: According to the compliance detection rules, the knowledge graph is searched for subgraphs that do not conform to the compliance detection rules to obtain compliance analysis results; the compliance analysis results include the content reflected by the subgraphs that do not conform to the compliance detection rules.

6. The method for detecting test documents according to claim 2, characterized in that, The rule set includes semantic detection rules; The logical expression and the knowledge graph are analyzed based on various types of detection rules to obtain analysis results corresponding to each type of detection rule, including: Based on the semantic detection rules and the logical expressions, a semantic analysis result is obtained; the semantic analysis result includes: logical expressions that do not conform to the semantic detection rules.

7. The method for detecting test documents according to claim 2, characterized in that, The rule set includes causal relationship and time sequence detection rules; The logical expression and the knowledge graph are analyzed based on various types of detection rules to obtain analysis results corresponding to each type of detection rule, including: Using the logical expression, subgraphs that do not conform to the causal relationship and time series detection rules are searched in the knowledge graph to obtain causal relationship and time series analysis results; the causal relationship and time series analysis results include the content reflected by the subgraphs that do not conform to the causal relationship and time series detection rules.

8. The method for detecting test documents according to claim 1, characterized in that, The method further includes: Based on the detection results, the semantic information and the knowledge graph are updated respectively, so as to modify the parts of the semantic information and the knowledge graph that do not conform to the rules in the rule set to conform to the rules; Based on the updated semantic information and the knowledge graph, the step of determining the detection result of the document based on the preset rule set, the semantic information, and the knowledge graph is then performed.

9. The method for detecting test documents according to claim 1, characterized in that, The step of parsing the document using a large language model to obtain the semantic information of the document includes: Entities and relationships between entities are extracted from the document using a large language model. Based on the entity and the relationship, construct a logical expression and use the logical expression as the semantic information; The step of constructing a knowledge graph based on the semantic information includes: The knowledge graph is obtained by treating the entities as nodes and the relationships between the entities as edges between the nodes.

10. A testing device for test documents, characterized in that, The device includes: The acquisition module is used to acquire the document to be detected; the document includes the software's test document. The parsing module is used to parse the document using a large language model to obtain the semantic information of the document; A construction module is used to construct a knowledge graph based on the semantic information, wherein the knowledge graph includes the relationships between multiple entities in the semantic information; the entities include the objects to be tested in the software. The detection module is used to determine the detection result of the document based on a preset set of rules, the semantic information and the knowledge graph.

11. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the method as described in any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device is enabled to perform the method as described in any one of claims 1 to 9.