Report intelligent generation method, device and equipment based on knowledge graph constraint
Patent Information
- Application Number
- CN202611026022.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-10
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2046-07-10
AI Technical Summary
[0004]本申请提供一种基于知识图谱约束的报告智能生成方法、装置及设备,其解决了当前报告文档编制过程中存在的内容生成事实一致性差、逻辑关系不完整、文本格式规范性不足的技术问题,达到了在保证报告内容事实准确、逻辑严谨、格式规范的基础上,实现报告自动化生成与自动化质量校验的技术效果
确定所述修正操作对应的修复代价惩罚项,并基于所述修复代价惩罚项和所述问题类型的严重程度对各个所述候选修正版本进行评分;其中,所述修复代价惩罚项根据所述修正操作的次数以及文本改写幅度确定;
Smart Images

Figure CN122528862B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a method, apparatus and device for intelligent report generation based on knowledge graph constraints. Background Technology
[0002] With the rapid development of Large Language Model (LLM), in the application scenarios of compiling scientific and technological documents such as scientific and technological consulting reports, scientific research analysis reports, and technical roadmap reports, related technologies have attempted to apply LLM to the automatic generation of report content in order to improve the efficiency of report compilation.
[0003] However, large language models are mainly trained on general corpora, and the long text content they generate is prone to producing content that does not conform to the facts, resulting in problems such as factual errors, inconsistent terminology, and logical conflicts between chapters and paragraphs, which seriously affect the quality of report generation. Summary of the Invention
[0004] This application provides a method, apparatus, and device for intelligent report generation based on knowledge graph constraints. It solves the technical problems of poor consistency of facts in the content generation, incomplete logical relationships, and insufficient text format standardization in the current report document compilation process. It achieves the technical effect of automated report generation and automated quality verification while ensuring the accuracy of facts, rigor of logic, and standardization of format in the report content.
[0005] To achieve the above objectives, the main technical solutions adopted in this application include: Firstly, this application provides a method for intelligent report generation based on knowledge graph constraints, the method comprising: The system acquires user input and performs structured parsing on the user input to obtain structured parameters, which include report type, industry attributes, and original data. Triple data is generated based on the original data and the preset knowledge database, and a knowledge graph is constructed based on the triple data; A matching preset report template is determined based on the report type and the industry attribute, and the initial report text is generated based on the preset report template and the knowledge graph; Semantic parsing is performed on the initial text of the report to extract propositional units, and propositional subgraphs are generated based on the propositional units. Problem detection is then performed on the propositional subgraphs based on the knowledge graph. The initial report text is iteratively corrected based on the detection results of the problem detection to obtain the corrected text, until the corrected text meets the preset conditions, and the target report text is determined based on the corrected text of the last iteration.
[0006] The intelligent report generation method proposed in this application first performs structured parsing of user input, transforming unstructured user needs into structured parameters that can be directly invoked by downstream processes. This provides a standardized data foundation for subsequent template matching, knowledge retrieval, and report generation. Second, a knowledge graph is constructed based on original data and a pre-set knowledge database. This integrates entities, attributes, and relationships scattered across multiple knowledge sources into a structured knowledge network, ensuring that the report generation process has clear factual basis and knowledge source constraints, reducing the risk of factual deviations in the generated content from the outset. Simultaneously, by semantically parsing the initial report text to generate propositional subgraphs and performing problem detection on these subgraphs based on the knowledge graph, the logical relationships in the report can be transformed into a computable and verifiable graph structure. This enables automated identification of logical problems. The initial report text is then iteratively corrected based on the detection results, with repeated problem detection until the corrected text meets preset conditions. This ensures that the final output report text meets requirements in terms of factual accuracy, logical coherence, and format standardization, achieving fully automated generation and quality assurance of scientific and technological reports throughout the entire process.
[0007] Optionally, the preset knowledge database includes a text corpus constructed based on multi-source knowledge sources associated with the structured parameters; The step of generating triplet data based on the original data and a preset knowledge database, and constructing a knowledge graph based on the triplet data, includes: Entity recognition and relation extraction are performed on the original data and the text corpus to obtain entities, attributes, and the corresponding relations between the entities and the attributes; The triplet data is generated based on the entity, the attribute, and the relationship between the entity and the attribute, and the entity node, attribute node, and relation edge of the knowledge graph are generated based on the triplet data.
[0008] Optionally, the step of extracting propositional units by semantic parsing the initial text of the report, and generating a propositional subgraph based on the propositional units, includes: The initial text of the report is segmented into sentences, and semantic role labeling is performed on each segmented sentence to extract the propositional unit from each sentence based on the labeling results. The propositional unit includes a technical object, a judgment conclusion, and the logical relationship between the technical object and the judgment conclusion. Based on the technical object, propositional entity nodes are generated; based on the judgment conclusion, propositional attribute nodes are generated; and based on the logical relationship, propositional relationship edges between the propositional entity nodes and the propositional attribute nodes are determined. The propositional subgraph is generated based on the propositional entity nodes, the propositional attribute nodes, and the propositional relation edges.
[0009] By segmenting the initial report text into sentences and labeling semantic roles, propositional units containing technical objects, judgments, and their logical relationships are extracted from each sentence, enabling the extraction of structured information from unstructured natural language text. Based on this, the logical relationships in the text are transformed into propositional subgraphs composed of nodes and edges using propositional units, allowing the detection of logical and normative issues in the initial report text to be performed efficiently at the structured graph data level.
[0010] Optionally, the step of performing problem detection on the propositional subgraph based on the knowledge graph includes: The propositional relation edges in the propositional subgraph are mapped to the knowledge graph to perform logic problem detection based on the path mapping. The proposition entity nodes and proposition attribute nodes in the proposition subgraph are mapped to the knowledge graph to perform standardization problem detection based on the node mapping. The results of the logical problem detection and the results of the specification problem detection are used as the detection results of the problem detection.
[0011] By performing logical verification based on path mapping and standard verification based on node mapping on the propositional subgraphs, the correctness of deep reasoning during report text generation is ensured, as well as the standardization of terminology and indicators. This achieves multi-dimensional quality inspection and is conducive to accurately identifying illusions that occur in large models during report generation.
[0012] Optionally, the step of mapping the propositional relation edges in the propositional subgraph to the knowledge graph to perform logic problem detection based on the path mapping includes: Extract the node pairs and relation types corresponding to the propositional relation edges, and search for the mapping paths corresponding to the node pairs and relation types in the knowledge graph; If the mapping path does not exist, or if the mapping path exists but does not conform to the preset logical rules, then the propositional relationship edge corresponding to the mapping path is marked as a detected logical problem.
[0013] By searching for mapping paths in the knowledge graph and performing logical-level verification in conjunction with preset logical rules, it can not only detect whether the generated text has logical conflicts with the facts in the knowledge graph, but also accurately identify erroneous statements that cannot be traced back to a clear node in the knowledge graph, thus improving the comprehensiveness and accuracy of logical problem detection.
[0014] Optionally, the step of mapping the propositional entity nodes and propositional attribute nodes in the propositional subgraph to the knowledge graph, and then performing canonical problem detection based on the node mapping, includes: In the knowledge graph, find the mapping nodes that match each proposition entity node and each proposition attribute node respectively; The terminology or indicator standardization issues in the initial text of the report are detected based on the degree of matching between the proposition entity nodes and each proposition attribute node and the corresponding mapping node.
[0015] By aligning entities and attributes in the initial report text using the standard definition of graph nodes, it is possible to effectively detect issues such as the misuse of terminology aliases and inconsistent indicator definitions in the generated text, thereby further improving the comprehensiveness of text problem detection.
[0016] Optionally, the step of iteratively correcting the initial report text based on the detection results of the problem detection to obtain the corrected text includes: The problem type is determined based on the problem detection results, and the corresponding correction strategy library is invoked according to the problem type. The correction strategy library includes a correction strategy mapping table that is pre-built according to report writing specifications and expert experience, which maps problem types to correction operations. Based on the correction strategy mapping table, the correction operation corresponding to the problem type is performed on the initial text of the report, and multiple candidate correction versions are generated; Determine the repair cost penalty item corresponding to the correction operation, and score each candidate correction version based on the repair cost penalty item and the severity of the problem type; wherein, the repair cost penalty item is determined according to the number of correction operations and the extent of text rewriting; The candidate revised version with the highest score is selected as the revised text.
[0017] By utilizing problem detection results to determine problem types and calling corresponding correction strategy libraries, differentiated and precise automatic correction for different error types is achieved, significantly reducing manual modification costs and improving the automation and reliability of report generation. Simultaneously, by generating multiple candidate correction versions and introducing a penalty item for repair costs and a score based on the severity of the problem type, the optimal output is selected from multiple candidate versions. This ensures that problems are effectively corrected while minimizing changes to the original text, avoiding excessive correction that could negatively impact text correction or introduce new expression biases. Thus, while improving report quality, the efficiency of text correction is maintained.
[0018] Optionally, after obtaining the corrected text in each iteration, the method further includes: The problem is re-detected in the corrected text, and the updated detection results are obtained. The corrected text is scored based on the updated detection results. If the score is higher than a preset threshold, the corrected text is determined to meet the preset conditions.
[0019] By re-detecting problems in the corrected text after each iteration, a closed-loop verification of the correction effect is achieved, avoiding reliance on human experience or endless invalid corrections, thereby significantly improving the efficiency and accuracy of report generation.
[0020] Secondly, this application provides a report intelligent generation device based on knowledge graph constraints, the device comprising: The structured parsing module is used to acquire user input content and perform structured parsing on the user input content to obtain structured parameters, which include report type, industry attributes and original data; The knowledge graph construction module is used to generate triple data based on the original data and the preset knowledge database, so as to construct a knowledge graph based on the triple data; The text generation module is used to determine a matching preset report template based on the report type and the industry attribute, and to generate the initial report text based on the preset report template and the knowledge graph; The text verification module is used to extract propositional units by performing semantic parsing on the initial text of the report, generate propositional subgraphs based on the propositional units, and perform problem detection on the propositional subgraphs based on the knowledge graph; The text correction module is used to iteratively correct the initial text of the report based on the detection results of the problem detection to obtain the corrected text, until the corrected text meets the preset conditions, and to determine the target text of the report based on the corrected text of the last iteration.
[0021] Thirdly, this application provides a computer device comprising: The system includes a memory and a processor, which are interconnected. The memory stores computer instructions, and the processor executes these computer instructions to perform the aforementioned intelligent report generation method based on knowledge graph constraints.
[0022] Fourthly, this application provides a computer-readable storage medium storing computer instructions, which are used to cause a computer to execute the above-described intelligent report generation method based on knowledge graph constraints. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the specific embodiments of this application or the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0024] Figure 1 One of the flowcharts for a knowledge graph-based intelligent report generation method provided in this application embodiment; Figure 2 A second schematic flowchart illustrating a knowledge graph-based intelligent report generation method provided in this application embodiment; Figure 3 This is a schematic diagram of the structure of a knowledge graph in an embodiment of this application; Figure 4 The third flowchart illustrates a knowledge graph-based intelligent report generation method provided in this application embodiment. Figure 5 The fourth flowchart illustrates a knowledge graph-based intelligent report generation method provided in this application embodiment. Figure 6 The fifth flowchart illustrates a knowledge graph-based intelligent report generation method provided in this application embodiment. Figure 7 A schematic diagram of the structure of a knowledge graph-based intelligent report generation device provided in this application embodiment; Figure 8 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, 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.
[0026] Currently, science and technology consulting reports mainly rely on manual research, expert analysis, and manual writing, requiring a significant amount of time for data collection, organization, analysis, and drafting. This is especially true for complex reports such as technology roadmap research reports and science and technology strategy research reports, which typically require multiple rounds of expert discussion and repeated revisions, resulting in a lengthy overall report writing cycle. In recent years, large language models have made rapid progress in text generation, enabling the automatic generation of text content based on prompts, leading to their widespread application in report generation.
[0027] In related technologies, general large models are mainly trained based on publicly available corpus data from the general Internet. They lack professional knowledge systems in areas such as scientific research consulting, new power, and smart grids. The generated reports are prone to deviating from actual business scenarios. Especially when the reports are long and the chapter structure is complex, the entire report may contain multiple types of large model illusion problems, such as factual errors, logical conflicts, and format deviations. It is difficult to have a global grasp of factual consistency, logical relationships, and text format standardization, and it is impossible to guarantee the reliability and accuracy of the generated content, thus seriously affecting the quality of science and technology project reports.
[0028] Therefore, there is an urgent need for a report intelligent generation solution that can automatically detect and correct the quality of report content.
[0029] This application provides an embodiment of a report intelligent generation method based on knowledge graph constraints. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0030] This application provides a knowledge graph-based intelligent report generation method, which can be used in the server, server cluster, or terminal device of a report generation platform. Figure 1 This is a flowchart of a report intelligent generation method according to an embodiment of this application, such as... Figure 1 As shown, the process includes the following steps: Step S1: Obtain user input content and perform structured parsing on the user input content to obtain structured parameters, including report type, industry attributes, and original data.
[0031] Specifically, user input refers to the project topic, industry category, research direction, key technical terms, and original data entered by the user through the interactive interface. The system uses natural language understanding technology to standardize, clean, and map these heterogeneous information fields, transforming them into machine-recognizable structured parameters. For example, when a user inputs "write an industry analysis report on photovoltaic energy storage technology" and related research documents as original data, the system parses the report type as "industry analysis report," the industry attribute as "photovoltaic energy storage," and the original data as the user-uploaded research documents.
[0032] It should be noted that, in some embodiments of this application, the structured parameters may also include report-related information such as report topic, project type, research direction, application scenario, target object, time range, geographical range, key technical terms, and constraint indicators, and be converted into a structured task sheet that can be recognized by the task scheduling mechanism according to preset field mapping rules, so as to be called by the subsequent template matching, knowledge retrieval and generation verification stages.
[0033] Step S3: Generate triplet data based on the original data and the preset knowledge database, and construct a knowledge graph based on the triplet data.
[0034] Furthermore, in some embodiments of this application, the preset knowledge database includes a text corpus constructed based on multi-source knowledge sources associated with structured parameters.
[0035] Specifically, this multi-source knowledge includes general knowledge, standards and specifications, technical documents, research papers, and industry data within the domain. This information can be automatically retrieved from intranet patent databases, standards databases, paper databases, industry statistics databases, and project case databases, and may also include similar materials uploaded by users when necessary. The original data provides the specific context for the current report generation task. The system integrates both, using information extraction technology to generate triple data containing entities, relationships, and attributes. Based on this triple data, a knowledge graph is constructed for the current report generation task. This allows the structured knowledge in the knowledge graph to serve as factual constraints and source evidence when generating the initial report text, ensuring that the generated content does not deviate from the boundaries of domain knowledge.
[0036] Step S5: Determine a matching preset report template based on the report type and industry attributes, and generate the initial report text based on the preset report template and knowledge graph.
[0037] Specifically, a preset report template is a standardized report framework pre-configured based on report type and industry attributes, including chapter structure, heading levels, formatting specifications, and content placeholder rules. Based on this, the report type and industry attributes in the structured parameters are stored as indexes of the preset report template in the report template management database. For example, the system first retrieves the chapter structure, heading levels, formatting specifications, and content placeholder rules that match "Industry Analysis Report" and "Photovoltaic Energy Storage" from the template library to determine the preset report template.
[0038] Subsequently, by utilizing a large language model combined with entity nodes and relationship paths related to the topic in the knowledge graph, the specific content elements of each chapter are filled in according to the requirements of the preset report template, and paragraphs, charts, and chapter order are automatically organized to form the initial report text. For example, the large language model generates content such as technical analysis, development status, risk analysis, investment suggestions, and implementation paths for "photovoltaic energy storage" based on the constraints of the knowledge graph.
[0039] Step S7: Extract propositional units by semantic parsing the initial text of the report, generate propositional subgraphs based on the propositional units, and perform problem detection on the propositional subgraphs based on the knowledge graph.
[0040] Specifically, keyword matching or grammar checking commonly used in related technologies are insufficient to detect deep logical problems such as causal contradictions, temporal discrepancies, or state conflicts across paragraphs in long texts. This application's embodiments perform semantic parsing on the initial report text, including but not limited to sentence segmentation and semantic role labeling, to extract propositional units containing technical objects, judgment conclusions, and logical relationships, and map these units to propositional subgraphs on a knowledge graph.
[0041] The system then compares the propositional subgraph with the knowledge graph to detect factual errors, logical conflicts, or deviations from standards in the initial report text. Specifically, the system searches the knowledge graph for paths corresponding to the propositional subgraph, verifying their logical connectivity and rule compliance. For example, if the text claims "a certain technology has been fully commercialized," but the technology node in the knowledge graph only connects to the "laboratory stage" attribute node and there is no valid path to "commercialization," the system can accurately determine that the initial report text contains a logical conflict. Furthermore, the system compares the nodes of the propositional subgraph with the corresponding nodes in the knowledge graph to detect any inconsistencies in aliases, abbreviations, and standard names, as well as inconsistencies in indicator units, statistical definitions, value ranges, and time stamps in the initial report text.
[0042] Step S9: Based on the detection results of the problem detection, iteratively correct the initial text of the report to obtain the corrected text until the corrected text meets the preset conditions. Then, determine the target text of the report based on the corrected text of the last iteration.
[0043] Specifically, when the problem detection detects logical conflicts, terminological inconsistencies, data contradictions, or formatting deviations in the initial report text, the system will automatically trigger corresponding correction strategies. Each correction produces the corrected text for the current iteration. The corrected text is then re-detected using the aforementioned problem detection. If the detection results still show problems, the correction continues, and this process is repeated until the corrected text meets preset conditions. For example, if the first correction resolves a logical conflict but introduces a new terminological inconsistency, the system will continue with the next round of corrections until all problem dimensions meet the standards. This iterative correction mechanism effectively avoids excessive rewriting or invalid oscillations that may occur during automatic correction, ensuring the logical rigor, factual accuracy, and standardized expression of the final output report text.
[0044] The intelligent report generation method provided in this application first performs structured parsing of user input, transforming unstructured user needs into structured parameters that can be directly invoked by downstream processes. This provides a standardized data foundation for subsequent template matching, knowledge retrieval, and report generation. Second, a knowledge graph is constructed based on original data and a pre-set knowledge database. This integrates entities, attributes, and relationships scattered across multiple knowledge sources into a structured knowledge network, ensuring that the report generation process has clear factual basis and knowledge source constraints, reducing the risk of factual deviations in the generated content from the outset. Simultaneously, by semantically parsing the initial report text to generate propositional subgraphs and performing problem detection on these subgraphs based on the knowledge graph, the logical relationships in the report can be transformed into a computable and verifiable graph structure. This enables automated identification of logical problems. The initial report text is then iteratively corrected based on the detection results, with repeated problem detection until the corrected text meets preset conditions. This ensures that the final output report text meets requirements in terms of factual accuracy, logical coherence, and format standardization, achieving fully automated generation and quality assurance of scientific and technological reports.
[0045] Figure 2 A flowchart of step S3 in an embodiment of this application is shown, as follows: Figure 2 Step S3 above may include the following steps: Step S31: Entity recognition and relation extraction are performed on the original data and text corpus to obtain entities, attributes, and the corresponding relations between entities and attributes.
[0046] Step S33: Generate triplet data based on entities, attributes, and the relationships between entities and attributes, and generate entity nodes, attribute nodes, and relation edges of the knowledge graph based on the triplet data.
[0047] Specifically, when performing entity recognition and relation extraction on raw data and text corpora, natural language processing methods are used to identify technical entities, indicator parameters, project names, and key relationships in the raw data and text corpora. Among them, technical entities and project names are the aforementioned entities, indicator parameters are the attributes corresponding to the entities, and key relationships represent the technical paths, upstream and downstream relationships, and causal relationships between at least two entities. Then, based on the entities and attributes, entity nodes and attribute nodes are constructed in the knowledge graph, and relationship edges between nodes are constructed based on their corresponding relationships.
[0048] Figure 3 This diagram illustrates one structural feature of the knowledge graph, such as... Figure 3As shown, entity nodes include technology field nodes, research project nodes, standard and specification nodes, expert nodes, and technical route nodes. Attribute nodes include indicator parameter nodes. Nodes are connected through relationships such as "belongs to," "related to," "dependent on," "supports," "constraints," and "causes." Specifically, technology field nodes refer to the specific technical direction or discipline involved in the scientific and technological consulting report; research project nodes refer to implemented or ongoing research projects and their related results; standard and specification nodes refer to standards and specifications related to a specific technical direction or discipline; expert nodes refer to expert opinions and experiences within a specific technical direction or discipline; technical route nodes refer to the technical path, method, or solution adopted to achieve a certain technical direction; and indicator parameter nodes refer to specific values, specifications, or evaluation standards used to measure technical performance or project effectiveness.
[0049] Figure 4 A flowchart of step S7 in an embodiment of this application is shown, as follows: Figure 4 Step S7 above may include the following steps: Step S711: Segment the initial text of the report and perform semantic role labeling on each segmented sentence to extract propositional units from each sentence based on the labeling results. The propositional units include technical objects, judgment conclusions, and the logical relationship between technical objects and judgment conclusions.
[0050] Specifically, the initial text of the report is segmented into independent sentence units according to sentence boundaries. Then, each sentence is semantically labeled to identify the components that act as the technical object, the judgment conclusion, and the logical relationship between the two. For example, for the sentence "Given that the reliability of photovoltaic power generation systems has been fully verified, photovoltaic energy storage integrated projects are ready for large-scale promotion," semantic role labeling extracts propositional units, where the technical object is "photovoltaic energy storage integrated projects," the judgment conclusion is "ready for large-scale promotion," and the logical relationship is "causal relationship." Through this method, several propositional units are extracted from all sentences in the initial text of the report, each representing a complete semantic logical relationship in the original text in a structured form.
[0051] Step S713: Generate propositional entity nodes based on technical objects, generate propositional attribute nodes based on judgment conclusions, and determine propositional relationship edges between propositional entity nodes and propositional attribute nodes according to logical relationships.
[0052] Step S715: Generate a propositional subgraph based on propositional entity nodes, propositional attribute nodes, and propositional relation edges.
[0053] Specifically, the extracted technical objects and judgment conclusions from the propositional units are transformed into nodes in a graph structure. Technical objects correspond to propositional entity nodes, serving as the main body of semantic logic. Judgment conclusions correspond to propositional attribute nodes, providing a qualitative or quantitative description of the technical objects. Logical relationships correspond to propositional relationship edges, used to determine the type and direction of the edges connecting propositional entity nodes and propositional attribute nodes. Based on this, the propositional entity nodes, propositional attribute nodes, and propositional relationship edges corresponding to each propositional unit in the initial report text are organized according to their source chapters, thus forming propositional subgraphs corresponding to each chapter of the initial report text.
[0054] This application embodiment extracts structured information from unstructured natural language text by segmenting the initial report text into sentences and labeling it with semantic roles. It then extracts propositional units containing technical objects, judgment conclusions, and their logical relationships from each sentence. Based on this, the logical relationships in the text are transformed into propositional subgraphs composed of nodes and edges using propositional units, enabling efficient detection of logical and normative issues in the initial report text at the structured graph data level.
[0055] Figure 5 A flowchart of step S7 in an embodiment of this application is shown, as follows: Figure 5 Step S7 above may also include the following steps: Step S721: Map the propositional relationship edges in the propositional subgraph to the knowledge graph to perform logic problem detection based on the path mapping.
[0056] In this embodiment, path mapping focuses on logical inference verification based on knowledge graph relation edges and rule paths. Specifically, for each proposition relation edge in the proposition subgraph, the technical object and judgment conclusion connected to the proposition relation edge, as well as the logical relation type corresponding to the proposition relation edge, are extracted to form a node-relation type triple information. Subsequently, a path matching the triple information is searched in the knowledge graph. It should be noted that the path matching the triple information refers to the path that maps the technical object pair in the triple information to the relevant node in the knowledge graph, that is, a reachable path starting from the knowledge graph node corresponding to the technical object, passing through several relation edges, and finally reaching the knowledge graph node corresponding to the judgment conclusion. If a mapping path cannot be found in the knowledge graph or the found mapping path is inconsistent with the path in the proposition subgraph, it indicates that the logical relation stated by the proposition unit in the initial report text lacks verifiable reasoning chain support in the domain knowledge system, and thus it is determined that the proposition unit has a logical problem.
[0057] For example, taking the statement "The photovoltaic energy storage integrated project has met the conditions for large-scale promotion" as an example, the system extracts the propositional relationship edge, which connects to the technical object "photovoltaic energy storage integrated project," and the judgment conclusion is "it has met the conditions for large-scale promotion," with the relationship type being "causal relationship." The system searches for a path matching this information in the knowledge graph. If the technical route node corresponding to the "photovoltaic energy storage integrated project" node in the knowledge graph indicates that the technology is still in the demonstration and verification stage, and the expert node with the related relationship to the technical route node indicates that it does not match the judgment conclusion of "large-scale promotion," then it can be seen that the mapping path is inconsistent with the path of the propositional subgraph. This means that the report text corresponding to the propositional subgraph cannot establish a logical chain consistent with the facts, and the system determines that there is a logical problem with the propositional unit. As another example, when the initial report text describes a technology as being in the "pilot stage" in the "Current Status of Technology Development" section, but gives a "full commercial promotion" suggestion in the subsequent "Industry Promotion Suggestions" section, the system will map these two judgment conclusions to relevant nodes in the knowledge graph for path searching. If there is no direct evolution path between the "pilot phase" node and the "full commercialization" node in the knowledge graph, the path mapping is deemed to have failed, thereby accurately identifying deep logical conflicts across chapters.
[0058] Step S723: Map the proposition entity nodes and proposition attribute nodes in the proposition subgraph to the knowledge graph to perform standardization problem detection based on the node mapping.
[0059] In this embodiment, node mapping focuses on element consistency detection based on knowledge graph node ontology, attribute standards, and template constraints. Specifically, the system aligns and matches entity nodes and attribute nodes in the propositional subgraph with standard term nodes and standard indicator nodes in the knowledge graph, respectively, and calculates the semantic similarity between them.
[0060] For example, when the initial text of a report uses the non-standard abbreviation "deep network," the system treats it as a propositional entity node and matches it against standard terminology nodes in the knowledge graph. If the match between this node and the standard node "deep learning neural network" is below a preset threshold, it is marked as non-standard terminology. Similarly, when the text mentions "power generation" without specifying the time period, the system treats it as a propositional attribute node and compares it against indicator parameter nodes "annual power generation" or "monthly power generation." The lack of a key limiting attribute leads to a failed match, thus determining the indicator definition as non-standard.
[0061] Step S725: The results of logic problem detection and specification problem detection are used as the detection results of problem detection.
[0062] Specifically, all logical problems detected in step S721 and all normative problems detected in step S723 are summarized to form a unified detection result. This detection result includes a list of problems and information such as the type, location, and severity of each problem, which is used as the basis for determining correction strategies and operations during subsequent iterative correction processes. The format of the detection result may include a problem type label (logical problem or normative problem), a problem subtype (such as causal contradiction, terminological inconsistency, or deviation in indicator definitions), the chapter and statement where the problem is located, and the corresponding proposition unit identifier, so that subsequent accurate location and execution of correction operations can be achieved.
[0063] This application embodiment ensures the correctness of deep reasoning during report text generation and the standardization of terminology and indicators by performing logical verification based on path mapping and standardization verification based on node mapping on the propositional subgraphs. This achieves multi-dimensional quality detection and is conducive to accurately identifying the illusion phenomenon that occurs in the large model during report generation.
[0064] Furthermore, step S721 above may include the following steps: Extract the node pairs and relation types corresponding to the propositional relation edges. Search for the mapping paths corresponding to the node pairs and relation types in the knowledge graph. If no mapping path exists, or if a mapping path exists but does not conform to the preset logical rules, mark the propositional relation edges corresponding to the mapping path as having detected logical problems.
[0065] Specifically, each propositional relationship edge contains two endpoints and a relationship type. The two endpoints are the propositional entity node corresponding to the technical object and the propositional attribute node corresponding to the judgment conclusion, respectively. The relationship type represents the logical relationship between the two. After extracting the above node pairs and relationship types from the propositional relationship edges, the system performs path lookup in the knowledge graph, using the two nodes in the node pair as the start and end points. If there is no mapping path connecting the node pair in the knowledge graph, it indicates that the logical relationship stated by the propositional unit in the initial report text lacks domain knowledge support, and the propositional relationship edge is marked as a logical problem. If a mapping path exists, it is further compared with preset logical rules. In some embodiments of this application, the preset logical rules include at least one of the following: causal consistency rules, chronological order rules, maturity and investment advice matching rules, risk level and implementation path matching rules, and upstream and downstream dependency integrity rules.
[0066] Among them, the causal consistency rule is used to verify whether the direction of action between the cause node and the result node is consistent with the definition of the graph. For example, if the text is "lower temperature leads to increased battery capacity", while the standard knowledge corresponding to the expert node stored in the knowledge graph is "low temperature environment leads to battery capacity decay", although there is a correlation path between "temperature" and "battery capacity", the polarity of the action is opposite. The system can determine that a logical problem has been detected based on the causal consistency rule.
[0067] The chronological order rule is used to verify whether the order of events or state evolution conforms to objective laws. For example, when the propositional relationship edge is "a scientific research project is developed before the market promotion of a certain technology", if the path matched in the knowledge graph shows that the market promotion time of the technology is earlier than the research project's development time, then the chronological order rule is violated, and the system marks the propositional relationship edge as having detected a logical problem.
[0068] The maturity level and investment recommendation matching rules are used to verify whether the matching relationship between technology maturity level and investment recommendation action is consistent with the domain knowledge system. For example, if the maturity node of a technology object in the propositional subgraph is "demonstration and verification stage", while the corresponding investment recommendation node is "large-scale commercialization", and the path matched by the system in the knowledge graph shows that the rule constraint corresponding to "demonstration and verification stage" is "prohibit large-scale commercialization, recommend pilot testing", then the two do not match, and the system marks the propositional relationship edge as a detected logical problem.
[0069] The risk level and implementation path matching rules are used to verify whether the matching relationship between the risk assessment level and the implementation path plan is consistent with the domain knowledge system. For example, if the risk level node of a certain technical object in the propositional subgraph is "high risk", while the implementation path node corresponding to its judgment conclusion is "comprehensive promotion and construction", and the path matched by the system in the knowledge graph shows that the rule constraint corresponding to the high risk level is "prohibit promotion and construction", then the two do not match, and the system marks the propositional relationship edge as a logical problem detected.
[0070] Upstream and downstream dependency integrity rules are used to verify whether the pre- and post-dependent dependencies between nodes in a technical route or industrial chain are complete and whether there are any broken chains. For example, if a technical route in a propositional subgraph contains a "raw material supply node" and a "system integration node," but lacks a "key component manufacturing node" between them, and the standard path matched by the system in the knowledge graph contains a complete upstream and downstream chain, it can be determined that the technical route in the propositional subgraph has a missing dependency, and the system will mark the corresponding propositional relationship edge as a detected logical problem.
[0071] It should be understood that the matching paths described above in this application embodiment are not limited to direct edges between two nodes, but also include indirect reasoning paths through one or more intermediate nodes. For example, when a propositional relationship edge is represented as "technology A → leads to → result B", the system will not only search in the knowledge graph for a direct "leads to" relationship edge between A and B, but also explore whether there are connected paths such as "A → intermediate factor C → B" or "A → precondition D → intermediate state E → B" through breadth-first search (BFS) or depth-first search (DFS) algorithms, so that the system can verify logical connections that are not explicitly stated in the text but objectively exist in the domain knowledge system.
[0072] This application embodiment, by searching for mapping paths in the knowledge graph and combining them with preset logical rules for logical-level verification, can not only detect whether the generated text has logical conflicts with the facts in the knowledge graph, but also accurately identify erroneous statements that cannot be traced back to a clear node in the knowledge graph, thereby improving the comprehensiveness and accuracy of logical problem detection.
[0073] Step S723 above may include the following steps: In the knowledge graph, find the mapping nodes that match each proposition entity node and each proposition attribute node. Based on the degree of matching between the proposition entity node and each proposition attribute node and the corresponding mapping node, detect the terminology standardization problem or indicator standardization problem in the initial text of the report.
[0074] Specifically, the process involves searching the knowledge graph for mapping nodes that match propositional entity nodes or propositional attribute nodes. Optionally, the matching degree between propositional entity nodes or propositional attribute nodes and their corresponding mapping nodes can be calculated based on semantic vector models such as cosine similarity. This matching degree is then used to check the terminology and indicator standardization of the initial text in the report. Terminology standardization checks focus on verifying whether the terms used in the text conform to the standard names, aliases, and abbreviations defined by the domain standard. Indicator standardization checks focus on verifying whether the units, statistical definitions, value ranges, or time stamps of indicator values in the text are consistent.
[0075] This application embodiment utilizes the standard definition of graph nodes to align entities and attributes in the initial report text, which can effectively detect standardization issues such as the misuse of terminology aliases and inconsistent indicator definitions in the generated text, further improving the comprehensiveness of text problem detection.
[0076] In addition, in some embodiments of this application, the system will also compare the chapter titles, required paragraphs, figure and table numbers, cross-references and layout parameters of the initial text with the preset report template to detect formatting issues such as missing chapters, abnormal references and format deviations, and output the formatting issue results.
[0077] Figure 6 A flowchart of step S9 in an embodiment of this application is shown, as follows: Figure 6 Step S9 above may include the following steps: Step S91: Determine the problem type based on the problem detection results, and call the corresponding correction strategy library according to the problem type. The correction strategy library includes a correction strategy mapping table that is pre-built according to the report writing specifications and expert experience, which maps problem types to correction operations.
[0078] Specifically, the problem detection results include a list of problems, with each problem recording its corresponding problem type, location, and severity. After obtaining the problem detection results, the problem type for each problem is first extracted from the results. Problem types include at least logic problems, terminology problems, and standardization problems.
[0079] The correction strategy library is a pre-built rule resource library. Its construction process includes: pre-setting correction operations corresponding to different problem types based on report writing standards and expert experience; for example, mapping "terminology mismatch" to operations such as "terminology replacement" and "missing field completion"; mapping "inconsistent indicator units" to operations such as "unit conversion"; and mapping "logical contradictions" to operations such as "inserting logical constraint statements" or "fact rewriting based on knowledge sources." Simultaneously, it summarizes common repair templates by combining historical report correction records and generates executable repair rules using standard terms, attribute nodes, and relational constraints in the knowledge graph. These common repair templates and rules constrain the aforementioned correction operations. After determining the problem type, the system calls the correction strategy library to retrieve the correction strategy mapping table matching the current problem type and obtain the corresponding correction operation.
[0080] Step S93: Based on the correction strategy mapping table, perform the correction operation corresponding to the problem type on the initial text of the report, and generate multiple candidate correction versions.
[0081] Specifically, it can be understood that the same problem type can correspond to multiple different correction operations, that is, different correction strategies can be used for the same problem. To ensure the effectiveness of the correction, the system generates multiple candidate correction versions when performing each correction operation. The different candidate versions differ in correction methods or correction content. For example, different synonyms are selected when replacing terms, or different statements are rewritten using different expressions when adjusting logic.
[0082] Step S95: Determine the repair cost penalty item corresponding to the correction operation, and score each candidate correction version based on the severity of the repair cost penalty item and the problem type; wherein, the repair cost penalty item is determined according to the number of correction operations and the extent of text rewriting.
[0083] Specifically, the system assigns a multi-dimensional score to each candidate revision, which can be determined by the following formula: Score = αL + βT + γM + δF + εS - λC In the formula, Score represents the scoring result, L represents the number of text locations with logical conflicts in the logical problem detection result, T represents the number of text locations with inconsistent terminology in the terminology standardization problem detection result, M represents the number of text locations with inconsistent indicator definitions in the indicator standardization problem detection result, F represents the number of text locations with formatting errors in the format standardization problem detection result, S represents the proportion of propositional units traceable to the knowledge graph out of all propositional units, and C represents the repair cost penalty term, which represents the number of repairs, the extent of rewriting, or the number of residual errors. α, β, γ, δ, ε, and λ are the preset weight coefficients corresponding to L, T, M, F, and S, respectively.
[0084] It is understood that the embodiments of this application use L, T, M, F and S to characterize the severity of the problem type.
[0085] Furthermore, the repair cost penalty is determined based on the number of correction operations and the extent of text rewriting. More correction operations indicate a greater degree of intervention in the original text, resulting in a higher repair cost. Simultaneously, the extent of text rewriting refers to the percentage change in text length and the percentage of word substitution before and after correction; a larger rewriting extent results in a higher repair cost. The purpose of the repair cost penalty is to prioritize the correction scheme that minimizes changes to the original text while ensuring the effectiveness of the problem correction.
[0086] Step S97: Select the candidate revised version with the highest score as the revised text.
[0087] Specifically, the system assigns a comprehensive score to each candidate revised version. A higher score indicates better overall performance in terms of problem correction effectiveness and cost-effectiveness in text modification. Therefore, the system selects the candidate revised version with the highest score in step S95 as the revised text for this iteration.
[0088] Furthermore, after obtaining the corrected text in each iteration, this embodiment of the application further includes the following steps: The corrected text is re-detected for issues, and updated detection results are obtained. The corrected text is then scored based on the updated detection results. If the score is higher than a preset threshold, the corrected text is determined to meet the preset conditions.
[0089] Specifically, the system takes the revised text obtained after each iteration as input and re-executes the problem detection process in step S7. This involves re-segmenting the revised text, semantic role labeling, propositional unit extraction, and propositional subgraph generation. The propositional subgraph is then re-mapped to the knowledge graph via paths and nodes to re-detect whether logical and normative issues still exist in the revised text. Because the revision operation may change the original text's expression, terminology, or logical statements, parts that were originally problem-free may develop new issues after revision. Therefore, the complete problem detection process must be re-executed after each iteration to ensure the accuracy and completeness of the detection results. The re-detection yields updated detection results, reflecting the current problem status of the revised text.
[0090] Subsequently, based on the updated detection results, the current corrected text is scored according to the formula in step S95. This score is calculated based on the updated detection results for logical problems, terminology problems, indicator problems, and formatting problems. If the score is higher than a preset threshold, it indicates that the quality of the current corrected text has reached an acceptable standard and meets the preset conditions. The system then terminates the iteration and determines the current corrected text as the target text for the final output report. If the score is not higher than the preset threshold, it indicates that the current corrected text still has quality problems. The system will continue to perform the next iteration correction based on the updated detection results, that is, repeat steps S91 to S97 and this step until the score is higher than the preset threshold.
[0091] This application's embodiments utilize problem detection results to determine problem types and invoke corresponding correction strategy libraries, achieving differentiated and precise automatic correction for different error types. This significantly reduces manual modification costs and improves the automation and reliability of report generation. Simultaneously, by generating multiple candidate correction versions and introducing a penalty item for repair costs and a score based on the severity of the problem type, the optimal output is selected from multiple candidate versions. This ensures that problems are effectively corrected while minimizing changes to the original text, avoiding excessive correction that could negatively impact text correction or introduce new expression biases. Thus, it maintains high efficiency in text correction while improving report quality.
[0092] Furthermore, this application embodiment achieves closed-loop verification of the correction effect by re-detecting the problem in the corrected text obtained after each iteration, avoiding reliance on human experience judgment or infinite invalid corrections, thereby significantly improving the efficiency and accuracy of report generation.
[0093] Accordingly, please refer to Figure 7 This application provides a report intelligent generation device based on knowledge graph constraints, the device comprising: The structured parsing module 100 is used to acquire user input content and perform structured parsing on the user input content to obtain structured parameters. The structured parameters include report type, industry attributes and original data. For details, please refer to step S1. The knowledge graph construction module 200 is used to generate triple data based on the original data and the preset knowledge database, so as to construct a knowledge graph based on the triple data. For details, please refer to step S3. The text generation module 300 is used to determine a matching preset report template based on the report type and industry attributes, and to generate the initial report text based on the preset report template and knowledge graph. For details, please refer to step S5. The text verification module 400 is used to extract propositional units by semantic parsing the initial text of the report, generate propositional subgraphs based on the propositional units, and perform problem detection on the propositional subgraphs based on the knowledge graph. For details, please refer to step S7. The text correction module 500 is used to iteratively correct the initial text of the report based on the detection results of the problem detection to obtain the corrected text until the corrected text meets the preset conditions. The target text of the report is determined based on the corrected text of the last iteration. For details, please refer to step S9.
[0094] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.
[0095] In this embodiment, the report intelligent generation device is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0096] Please see Figure 8 , Figure 8 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application, such as... Figure 8As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 8 Take a processor 10 as an example.
[0097] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.
[0098] The memory 20 stores instructions executable by at least one processor 10 to cause the at least one processor 10 to perform the method shown in the above embodiments.
[0099] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0100] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0101] The computer device also includes a communication interface 30 for communicating with other devices or communication networks.
[0102] This application also provides a computer-readable storage medium. The methods described in this application can be implemented in hardware or firmware, or implemented as recordable on a storage medium, or implemented as computer code downloaded over a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and subsequently stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the methods shown in the above embodiments are implemented.
[0103] This application provides a computer program product including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the method of any embodiment of this application.
[0104] Although embodiments of this application have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of this application, and all such modifications and variations fall within the scope defined by the appended claims.
[0105] For ease of description, the above devices are described separately by function as various units. Of course, in implementing this application, the functions of each unit can be implemented in one or more software and / or hardware.
[0106] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0107] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0108] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0109] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0110] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0111] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0112] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
[0113] Although embodiments of this application have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of this application, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A method for intelligent report generation based on knowledge graph constraints, characterized in that, The method includes: The system acquires user input and performs structured parsing on the user input to obtain structured parameters, which include report type, industry attributes, and original data. Triple data is generated based on the original data and the preset knowledge database, and a knowledge graph is constructed based on the triple data. A matching preset report template is determined based on the report type and the industry attribute, and the initial report text is generated based on the preset report template and the knowledge graph; Semantic parsing of the initial report text extracts propositional units, generating propositional subgraphs based on these units, and problem detection is performed on the propositional subgraphs using the knowledge graph. The extraction of propositional units from the initial report text, and the generation of propositional subgraphs based on these units, includes: segmenting the initial report text into sentences and semantically labeling each segmented sentence with a semantic role; extracting propositional units from each sentence based on the labeling results; wherein each propositional unit includes a technical object, a judgment conclusion, and the logical relationship between the technical object and the judgment conclusion; generating propositional entity nodes based on the technical object, generating propositional attribute nodes based on the judgment conclusion, and determining propositional relationship edges between the propositional entity nodes and the propositional attribute nodes based on the logical relationship; and organizing the propositional entity nodes, propositional attribute nodes, and propositional relationship edges corresponding to each propositional unit in the initial report text according to the source chapters to generate propositional subgraphs corresponding to each chapter of the initial report text. The step of detecting problems in the propositional subgraph based on the knowledge graph includes: mapping the propositional relation edges in the propositional subgraph to the knowledge graph to perform logical problem detection based on the path mapping; mapping the propositional entity nodes and propositional attribute nodes in the propositional subgraph to the knowledge graph to perform normative problem detection based on the node mapping; and using the results of the logical problem detection and the results of the normative problem detection as the detection results of the problem detection. The initial report text is iteratively corrected based on the detection results of the problem detection to obtain the corrected text, until the corrected text meets the preset conditions, and the target report text is determined based on the corrected text of the last iteration.
2. The method according to claim 1, characterized in that, The preset knowledge database includes a text corpus constructed based on multi-source knowledge sources associated with the structured parameters; The step of generating triplet data based on the original data and a preset knowledge database, and constructing a knowledge graph based on the triplet data, includes: Entity recognition and relation extraction are performed on the original data and the text corpus to obtain entities, attributes, and the corresponding relations between the entities and the attributes; The triplet data is generated based on the entity, the attribute, and the relationship between the entity and the attribute, and the entity node, attribute node, and relation edge of the knowledge graph are generated based on the triplet data.
3. The method according to claim 1, characterized in that, The step of mapping the propositional relation edges in the propositional subgraph to the knowledge graph, and then performing logic problem detection based on the path mapping, includes: Extract the node pairs and relation types corresponding to the propositional relation edges, and search for the mapping paths corresponding to the node pairs and relation types in the knowledge graph; If the mapping path does not exist, or if the mapping path exists but does not conform to the preset logical rules, then the propositional relationship edge corresponding to the mapping path is marked as a detected logical problem.
4. The method according to claim 1, characterized in that, The step of mapping proposition entity nodes and proposition attribute nodes in the proposition subgraph to the knowledge graph, and then performing standardization problem detection based on the node mapping, includes: In the knowledge graph, find the mapping nodes that match each proposition entity node and each proposition attribute node respectively; The terminology or indicator standardization issues in the initial text of the report are detected based on the degree of matching between the proposition entity nodes and each proposition attribute node and the corresponding mapping node.
5. The method according to claim 1, characterized in that, The process of iteratively correcting the initial report text based on the detection results of the problem detection to obtain the corrected text includes: The problem type is determined based on the problem detection results, and the corresponding correction strategy library is invoked according to the problem type. The correction strategy library includes a correction strategy mapping table that is pre-built according to report writing specifications and expert experience, which maps problem types to correction operations. Based on the correction strategy mapping table, the correction operation corresponding to the problem type is performed on the initial text of the report, and multiple candidate correction versions are generated; Determine the repair cost penalty item corresponding to the correction operation, and score each candidate correction version based on the repair cost penalty item and the severity of the problem type; wherein, the repair cost penalty item is determined according to the number of correction operations and the extent of text rewriting; The candidate revised version with the highest score is selected as the revised text.
6. The method according to claim 1, characterized in that, After obtaining the corrected text in each iteration, the method further includes: The problem is re-detected in the corrected text, and the updated detection results are obtained. The corrected text is scored based on the updated detection results. If the score is higher than a preset threshold, the corrected text is determined to meet the preset conditions.
7. A report intelligent generation device based on knowledge graph constraints, characterized in that, The apparatus is adapted to apply the knowledge graph-constrained intelligent report generation method as described in any one of claims 1 to 6, the apparatus comprising: The structured parsing module is used to acquire user input content and perform structured parsing on the user input content to obtain structured parameters, which include report type, industry attributes and original data; The knowledge graph construction module is used to generate triple data based on the original data and the preset knowledge database, so as to construct a knowledge graph based on the triple data; The text generation module is used to determine a matching preset report template based on the report type and the industry attribute, and to generate the initial report text based on the preset report template and the knowledge graph; The text verification module is used to extract propositional units by performing semantic parsing on the initial text of the report, generate propositional subgraphs based on the propositional units, and perform problem detection on the propositional subgraphs based on the knowledge graph; The text correction module is used to iteratively correct the initial text of the report based on the detection results of the problem detection to obtain the corrected text, until the corrected text meets the preset conditions, and to determine the target text of the report based on the corrected text of the last iteration.
8. A computer device, characterized in that, include: A memory and a processor are interconnected, the memory stores computer instructions, and the processor executes the computer instructions to perform the report intelligent generation method based on knowledge graph constraints as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Knowledge proposition error correction method and system based on knowledge graph
CN118709695A
Knowledge proposition error correction method and system based on knowledge graph optimization and upgrading
CN120373298A
Knowledge graph and large model fused feasibility research report automatic generation method
CN121301812A
OCR (Optical Character Recognition) result correction method and system based on large model driving
CN121904782A