Text data intelligent generation system based on chart semantic understanding
Patent Information
- Application Number
- CN202610808224.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-05
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2046-06-05
AI Technical Summary
[0002]在现有企业制度管理与流程建模领域中,大量制度文本通常以自然语言形式存在,具有表达方式多样、句式结构复杂以及语义分散等特点,不同文本之间存在同义表达、跨段落描述甚至隐含逻辑关系,使得传统基于关键词匹配或规则抽取的流程生成方法难以准确还原真实业务流程
通过对制度文本进行语义向量化处理,引入执行主体、执行动作及执行条件的三元组建模机制,结合依存句法分析与条件表达模式识别,实现对复杂条件语义的精确提取,通过节点语义相似度计算构建流程关系矩阵,并结合节点合并、并行识别及拓扑检测机制,保证流程结构的完整性与逻辑一致性。通过流程路径反向生成文本并与原始制度文本进行语义匹配及覆盖度评估,实现流程生成结果的自动校验与反馈优化,从而有效解决现有技术中流程语义缺失、结构不完整以及缺乏一致性验证的问题,用以提升制度流程自动生成的准确性、可解释性及实用性。
Smart Images

Figure CN122334287B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and more specifically to a text data intelligent generation system based on chart semantic understanding. Background Technology
[0002] In the existing field of enterprise system management and process modeling, a large number of system texts usually exist in the form of natural language, with diverse expression methods, complex sentence structures and scattered semantics. There are synonymous expressions, cross-paragraph descriptions and even implicit logical relationships between different texts, making it difficult for traditional process generation methods based on keyword matching or rule extraction to accurately reproduce real business processes.
[0003] Existing technologies mostly focus on extracting action information while neglecting key semantic elements such as the executing subject and execution conditions. This results in generated process structures lacking complete business semantic support, failing to accurately reflect the division of responsibilities, condition constraints, and process control logic. During process generation, the lack of deep semantic modeling of the logical relationships between process nodes easily leads to structural problems such as isolated nodes, logical breaks, circular dependencies, or missing parallel relationships, thus affecting the correctness and executability of the flowchart. Furthermore, existing methods typically lack a semantic verification mechanism that maps the process structure back to the original policy text, making it difficult to verify the consistency between the generated process and the original policy. This results in low reliability of automated process generation results, still requiring significant manual revision. Summary of the Invention
[0004] To address the aforementioned shortcomings of existing technologies, this invention provides an intelligent text data generation system based on graph semantic understanding. This system effectively solves the problem of how to ensure the accurate extraction of institutional semantic triples, achieve the structured transformation of institutional text sets into flowcharts and generated text sets, and ensure the consistency and integrity between the generated text sets and institutional text sets through relational matrices and semantic coverage constraints.
[0005] To achieve the above objectives, the present invention provides the following technical solution: This invention provides a text data intelligent generation system based on chart semantic understanding, comprising at least: The data processing module acquires the policy text and converts it into a text semantic vector; The triple extraction module extracts the execution subject, execution action, and execution condition, constructs semantic triples, and identifies the execution condition by combining part-of-speech tagging and a predefined dictionary to filter candidate condition words. It obtains the dependency relationship between words based on dependency parsing, calculates the shortest path length between the condition word and the execution subject and execution action through path search, and characterizes the degree of structural association based on the dependency relationship type. It also filters condition words based on the condition expression pattern and semantic relevance to determine the final execution condition. The relation matrix building module generates a corresponding set of process nodes based on the triples, calculates the similarity of the execution actions and execution conditions between each node, constructs and optimizes the relation matrix between nodes, including merging semantically similar duplicate nodes and identifying parallel nodes under different execution subjects. The text matching module constructs a flowchart based on the relationship matrix and the execution entity information, traverses the flowchart path, extracts all process paths from the start node to the end node, converts the process paths into corresponding text, establishes a set of generated texts, and semantically matches the set of generated texts with the set of institutional texts to determine the institutional text corresponding to the generated text. The text verification module compares the generated text with the corresponding institutional text semantic units, calculates the semantic coverage, and verifies the generated result by combining semantic similarity.
[0006] Furthermore, the process of determining the shortest path length includes establishing a node connection network, as follows: Identify whether a dependency relationship exists between any two words and record it as follows: Which word serves as the head word or dependent word, and the type of dependency relationship between them, form a set of dependency relationships; Based on the set of dependencies, each word is treated as a node, and connections are established between two words with dependencies to form a tree structure. This tree structure is then converted into a connection structure for path search. The conversion method is as follows: For each pair of dependent words, establish a bidirectional connection so that any two dependent words can reach each other, thus obtaining a node connection network for path search.
[0007] Furthermore, in the node connection network, a starting word node and a target word node are determined. Starting from the starting word node, a layer-by-layer expansion search process is executed, including: Use the starting word node as the initial content of the current node set; In each round of expansion, each node in the current node set is used as an expansion node, and all its directly connected neighboring nodes are searched. These adjacent nodes are designated as nodes to be visited in the next layer. For each newly arrived node, record the number of connections from the starting word node to that node; Repeat the above expansion process until the target word node is reached for the first time; During the path search process, for each visited node, the number of connections from the starting node to that node is recorded, and the calculation method is as follows: The path length of the starting word node is set to zero; Each time a connection between nodes is traversed, the path length increases by one unit. When expanding from a visited node to its neighboring node, the path length of the neighboring node is equal to the path length of the current node plus one unit; the increase in path length is based on the direct connections between nodes, and each connection is considered as an increase of one count unit in path length. The path lengths from the starting word node to each node are obtained step by step; When the search process first reaches the target word node, it stops expanding and the path length recorded at that moment is taken as the shortest path length between the starting word and the target word.
[0008] Furthermore, the conditional expression pattern is specifically as follows: A set of condition expression patterns is pre-constructed. For candidate condition words, it is determined whether they are in the above condition expression patterns. When a condition word meets the condition expression pattern, it belongs to a typical condition expression structure and is assigned a high matching degree value; otherwise, it is assigned a low matching degree value. The first candidate condition word assigned a high matching degree value is recorded as the second candidate condition word.
[0009] Furthermore, the degree of semantic relevance includes: The second candidate condition words, execution subject, and execution action are processed through semantic representation and converted into vector form. After obtaining the semantics, the semantic similarity between the second candidate condition words and the execution subject and execution action is calculated based on cosine similarity. If the semantic similarity between the second candidate condition word and the execution action is higher than the preset action threshold, then it is determined that the second candidate condition word and the execution action have a semantic relationship. If the semantic similarity between the second candidate condition word and the executing entity is higher than the preset entity threshold, then it is determined that the second candidate condition word has a semantic relationship with the executing entity. When the semantic proximity of the second candidate condition word meets at least one of the above subject thresholds or action thresholds, and the other semantic proximity is not lower than its corresponding preset lower limit, the condition of semantic relevance is determined, and the second candidate condition word that is higher than the set threshold is retained as the final execution condition.
[0010] Furthermore, the method for determining the institutional text corresponding to the generated text is as follows: The natural language generation model generates node information into natural language text. The texts corresponding to multiple nodes in a path are concatenated in the order of execution. Logical connectors are added between nodes to complete the concatenation process of node text. The generated text of the entire process path is output, and the texts of all process paths in the new flowchart are obtained. A set of generated texts is then established. For each generated text, the most semantically similar original institutional text is searched sequentially within the institutional text set. The process is as follows: Select one generated text from the generated text set and perform semantic vectorization on the generated text to obtain a vector representation of the text's semantic features. Perform semantic vectorization on each institutional text separately to obtain a semantic vector representation. The semantic vector of the generated text is compared with the semantic vector of each institutional text unit to calculate the semantic similarity between the generated text and each institutional text unit. All the calculated similarity results are compared and the one with the largest similarity is selected as the optimal matching result between the generated text and the institutional text set. Once the policy text corresponding to the maximum similarity is determined, it is used as the original policy text corresponding to that generated text. The other generated texts in the generated text set are matched one by one in the same way until the matching relationship between all generated texts and the policy text set is determined, so as to realize the semantic correspondence between the flowchart generated text and the policy text.
[0011] The technical solution provided by this invention has the following advantages compared with the known prior art: By semantically vectorizing the institutional text and introducing a triplet modeling mechanism for the executing subject, executing action, and executing conditions, combined with dependency parsing and conditional expression pattern recognition, accurate extraction of complex conditional semantics is achieved. A process relationship matrix is constructed through node semantic similarity calculation, and node merging, parallel recognition, and topology detection mechanisms ensure the integrity and logical consistency of the process structure. Text is generated by reverse engineering the process path and semantically matched with the original institutional text for coverage evaluation, enabling automatic verification and feedback optimization of the generated process results. This effectively solves the problems of missing process semantics, incomplete structure, and lack of consistency verification in existing technologies, thereby improving the accuracy, interpretability, and practicality of automatically generated institutional processes. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.
[0013] Figure 1 This is a schematic diagram of the overall system of the present invention. Detailed Implementation
[0014] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0015] The present invention will be further described below with reference to embodiments.
[0016] Example 1 (see Figure 1 A text data intelligent generation system based on graph semantic understanding, comprising at least: Step 1: In corporate policy documents, process descriptions are usually in natural language, with complex sentence structures and diverse expressions. For example, the same business operation may be expressed using different words, or the same process steps may be scattered across multiple policy documents. Therefore, obtaining a set of policy documents is necessary. It contains multiple policy documents. Let represent the i-th policy text, which is the original data source. Each policy text possesses complete semantics, such as a department head's approval and signature confirmation of a report. Each policy text is treated as an independent text unit for semantic parsing (followed by preprocessing, i.e., text cleaning). The system vectorizes each policy text using a semantic vector mapping function, converting it into a semantic vector of the text. This establishes a set of semantic vectors for multiple policy texts. A unified semantic encoding process is applied to the policy texts, converting different sentence structures into computable semantic vectors. This ensures that texts with similar semantics remain close in the vector space, providing semantic analysis for subsequent process action recognition, subject recognition, and logical relationship extraction.
[0017] Step Two: In the process of system and process modeling, simply identifying actions while ignoring the executing subject and conditions often results in a process structure that lacks organizational semantics. For example, it cannot distinguish the responsibilities of different departments, nor can it reflect constraints such as time limits or approval conditions. Although such a flowchart contains basic steps, it is difficult to use for responsibility division or process control in actual management systems. Therefore, triple extraction and node modeling are performed: Extract the policy text sentence by sentence from the policy text collection, and combine it with the corresponding semantic vector to perform semantic role recognition, and construct policy behavior triplets (describing who does what under what conditions, such as the finance department submitting approval materials within 3 days): ; in, This represents the i-th institutional semantic triple. This indicates the entity ("department / role") responsible for implementing the system's actions. This refers to the actions required to execute the procedures stipulated in the regulations (such as "approval, filing, and submission"). This represents the set of execution conditions (constraints identified from the policy text, including time, amount, and conditional statements). For the implementing entity : On the institutional text Use Chinese or English natural language processing tools to perform part-of-speech tagging and select candidate words for nouns, proper nouns, and organization names as candidate subjects; The candidate words (i.e., candidate executive entities) are classified using a pre-trained NER model to identify the organizational structure (departments, such as "finance department, business department"), job position ("auditor, approver"), and role name ("Zhang San, Li Si") in the text, and the selected words are used to re-establish candidate entities; Retrieve a predefined dictionary of institutional roles From the newly established candidate entities, the candidate implementing entities that best fit the institutional domain role dictionary are selected, that is, semantic vector matching is performed on the most suitable candidate implementing entities: ; in, Indicates candidate execution entity Candidate words in the text.
[0018] For the execution of actions : On the institutional text Use Chinese or English natural language processing tools to perform part-of-speech tagging, filter verbs and verb + object combinations (such as "submit report, approve application"), and establish candidate action words; Predefined action dictionary The candidate action words, including phrases such as "approval," "submission," and "filing," are classified using a pre-trained NER model. Candidate action words that match the action dictionary are added to the candidate action list. ; From candidate actions The final candidate action words that best fit the action dictionary are selected from the following: ; in, Indicates candidate actions Candidate words in This represents a semantic vector mapping function (usually...). , The input text represents words or phrases, and d is the vector dimension, usually 768 or 512. The model often uses BERT.
[0019] For execution conditions : On the institutional text Use Chinese or English natural language processing tools to perform part-of-speech tagging, filter time words (e.g., "within 3 days, today", etc.), numerical or threshold words ("exceeding", "reaching", "not less than", etc.), and logical conjunction words ("if...then", "when...") to establish candidate condition words G; A predefined condition dictionary contains commonly used condition keywords in institutional texts ("must," "otherwise," "meet the condition," etc.). Condition words that meet the condition dictionary are added to the candidate condition word G. Dependency parsing is used to determine whether the condition words in candidate condition words G have a grammatical dependency relationship with the subject or action in the syntactic structure, such as: time adverbs of action, conditional clauses of action, and modifiers of subject or action. After the structure screening is completed, in order to avoid the error caused by a single judgment method, each candidate condition word is evaluated by multiple factors to finally determine whether it should be used as an execution condition: Structural relevance: This determines whether the conditional word has a clear syntactic dependency relationship with the executing subject or action (based on syntactic dependency analysis). If a dependency relationship exists, the word is considered to have high structural relevance; if not, the structural relevance is low. The formula for calculating the degree of structural relevance is: ; in, Conditional words The structural correlation degree represents the strength of the association between the word and the executing subject or action in the dependency syntax structure. The larger the value, the stronger the correlation. This represents the shortest path length in the dependency syntax tree for the action performed by the conditional statement. This indicates the strength of the dependency relationship between the actions performed by conditional terms. Values are assigned based on the type of dependency relationship: subject-verb, verb-object, and adverbial-head, decreasing in that order, with a maximum of 1 and a minimum of 0.5-0.6. This reflects the degree to which different dependency relationship types affect structural coherence. This represents the structural adjustment coefficient, a preset value. This indicates the shortest path length of the conditional statement's execution subject in the dependency syntax tree. Indicates the strength of the dependency relationship between the executing entities of the conditional terms. (Filtering) Condition words that exceed the structural relevance threshold are selected as the first candidate condition words.
[0020] The shortest path length of the action performed by the conditional statement in the dependency syntax tree (the same logic applies to the shortest path length of the subject performing the conditional statement in the dependency syntax tree): Identify whether a dependency relationship exists between any two words and record it as follows: The process involves identifying which word serves as the head word, which word as a dependent word, and the type of dependency relationship between them. This forms a dependency relationship set, where each relationship indicates a direct association between two words. Based on this dependency relationship set, each word is treated as a node, and connections are established between words with dependencies, forming a tree structure. This tree structure is then converted into a connection structure for path search. The conversion method is as follows: for each pair of words with dependencies, a bidirectional connection is established, allowing any two words with dependencies to reach each other. This results in a node connection network for path search. In this node connection network, a starting word node (i.e., the starting point of the path to be calculated) and a target word node (i.e., the ending point of the path to be calculated) are determined. Starting from the starting word node, a layer-by-layer expansion search process is executed, specifically including: 1. Use the starting word node as the initial content of the current node set; 2. In each round of expansion, each node in the current node set is used as an expansion node, and all its directly connected neighboring nodes are searched. 3. Treat these adjacent nodes as nodes to be visited in the next layer; 4. For each newly arrived node, record the number of connections from the starting word node to that node; 5. Repeat the above expansion process until the target word node is reached for the first time; During the path search process, for each visited node, the number of connections from the starting node to that node is recorded, and the calculation method is as follows: The path length of the starting word node is set to zero; Each time a connection between nodes is traversed, the path length increases by one unit. When expanding from a visited node to its neighboring node, the path length of the neighboring node is equal to the path length of the current node plus one unit; the increase in path length is based on the direct connections between nodes, and each connection is considered as an increase of one count unit in path length. Using the above method, the path length from the starting word node to each node can be obtained step by step; When the search process reaches the target word node for the first time, it stops expanding and the path length recorded at that moment is taken as the shortest path length between the starting word and the target word (the shorter the path length, the greater its contribution to the degree of structural association; as the path length increases, its influence gradually weakens).
[0021] 2) Pattern Matching Degree: Determine whether the first candidate condition word belongs to a predefined condition expression pattern. Condition expression patterns are pre-constructed, such as "if...then...", "when...", "within...", "exceeding...then...", and "not...then..." structures. For candidate condition words, determine whether they are in the above condition expression patterns. When a condition word meets the condition expression pattern, it belongs to a typical condition expression structure and is assigned a higher matching degree, such as a value of 1; otherwise, the matching degree is lower and a value of 0 is assigned. The first candidate condition word assigned a value of 1 is recorded as the second candidate condition word.
[0022] 3) Semantic relevance: The second candidate condition words, execution subject, and execution action are processed through semantic representation and converted into vector form in a unified semantic space. After obtaining the semantics, the semantic similarity between the second candidate condition words, execution subject, and execution action is calculated based on cosine similarity. If the semantic proximity between the second candidate condition word and the execution action is higher than the preset action threshold, then the second candidate condition word is determined to have a semantic relationship with the execution action. If the semantic proximity between the second candidate condition word and the execution subject is higher than the preset subject threshold, then the second candidate condition word is determined to have a semantic relationship with the execution subject. When the semantic proximity of the second candidate condition word satisfies at least one of the above subject thresholds or action thresholds, and the other semantic proximity is not lower than its corresponding preset lower limit, the system recognizes it as a condition element with semantic relevance and retains the second candidate condition word that is higher than the set threshold as the final execution condition.
[0023] To perform semantic computation, the elements of the triplet need to be represented as semantic vectors using a semantic vector mapping function: ; in, A semantic vector representing the executing entity, describing the numerical characteristics of the executing entity in the semantic space. A semantic vector representing the action performed. A semantic vector representing the execution condition; Since process modeling requires process nodes, process nodes are constructed using text semantic units: ; in, This represents the process node for the k-th implementation of the system, describing the actions performed by the implementing entity under the given conditions. Policy documents typically contain multiple execution steps, each step corresponding to a node, resulting in a process node set A: m represents the total number of process nodes in the policy document; Extract the set of executing entities to determine the entities participating in the process: ; in, This represents the set of entities responsible for implementing the system and procedures. This indicates the executing entity in different process nodes, such as the procurement department and the finance department.
[0024] In the semantic parsing stage, triples are extracted from the institutional text, and the subject, action, and execution (constraint) conditions are structured and modeled so that each process node not only contains action semantics, but also information on the executing subject and execution conditions, providing semantic data for the subsequent automatic generation of flowcharts.
[0025] Step 3: During the automatic generation of institutional processes, directly connecting process nodes based solely on semantic order may result in structural defects, such as isolated process nodes, missing return paths, or incomplete logical loops. Furthermore, some institutional texts contain conditional branches or duplicate submission mechanisms. If these structures are not correctly represented in the flowchart, inconsistencies between the process logic and the institutional description will arise. Therefore, it is necessary to construct an institutional execution flowchart and perform topology detection on the flowchart to identify structural anomalies in the institutional process. S3.1. For each node in the process node set A, establish an action semantic vector for the execution action text using a semantic vector mapping function. Construct a set of action vectors ; S3.2. For any two nodes (nodes) ,node Semantic similarity of actions is calculated based on cosine similarity or vector dot product. ; Calculate the conditional semantic similarity between the execution conditions of any two nodes. The semantic vectors established by the semantic vector mapping function for the node conditional text are used to calculate the conditional semantic similarity using cosine similarity or vector dot product. The system weights and combines action semantic similarity and conditional semantic similarity (the weights can be set according to the characteristics of the institutional text, for example, action similarity has a higher weight and conditional similarity has a lower weight to ensure that the logical order of nodes takes precedence) to obtain the node semantic similarity of each pair of nodes. S3.3. The system traverses each pair of nodes in the process node set, judging whether there is a logical relationship or sequential dependency based on the semantic similarity of the nodes. If the semantic similarity of the nodes exceeds a preset threshold, it is considered that the two nodes have a potential sequential relationship, and the system marks it as 1 in the relationship matrix. If the semantic similarity of the nodes is lower than the threshold, it is considered that there is no direct relationship between the nodes, and it is marked as 0. By traversing all node combinations, the system forms a relationship matrix, where each row represents the preceding node, each column represents the following node, and the matrix elements record whether there is a logical relationship between two nodes. After generating the matrix, the following optimization operations are performed: To prevent duplicate nodes from appearing in the system's documentation, the system merges nodes containing synonymous or duplicate action nodes. For example, if a safety officer submits an equipment inspection report and an auditor submits the report after receiving it, both actions can semantically be interpreted as submitting the report. Treating them as different nodes in the flowchart would result in duplicate nodes and redundant connections, causing visual clutter and potentially hindering process analysis. The system calculates the semantic similarity between the action and condition texts of nodes (step S3.2) to determine which node actions are highly similar or equivalent. For highly similar nodes, they are merged into a single node, integrating the relationships between the original node's predecessor and successor nodes into this merged node. The merged node retains only one record in the relationship matrix, preventing duplicate connections. Parallel node identification (In a process flow, some steps can be executed simultaneously, meaning there is no strict dependency between them. For example, a safety officer inspecting equipment and a shift worker patrolling the workshop can both be performed concurrently and are independent of each other. In a flowchart, this situation needs to be represented as a parallel path, rather than one node following another). For nodes that may occur simultaneously, such as actions in different role swimlanes (horizontal or vertical areas in a flowchart divided by the executing entity or position, each area corresponding to a role, the purpose being to clearly show the operational steps that different roles are responsible for in the process. For example, in a flowchart, all operations of the safety officer are displayed in the safety officer swimlane, and the operations of the shift worker are displayed in the other swimlane). All are displayed in the on-duty personnel swimlane. That is, the role swimlane is divided according to the execution subject. The corresponding swimlane is determined according to the execution subject, and the subject is responsible for which operation steps. If they are executed simultaneously, the system will mark them as parallelizable in the relationship matrix to ensure that the subsequent flowchart generation supports parallel execution paths (there is no conditional triggering dependency between nodes, that is, one node does not depend on another node to complete, and the execution subjects of the nodes are different, such as belonging to different roles. The system will determine that they can be executed in parallel. In the relationship matrix, these nodes are marked as parallelizable, indicating that they are at the same execution level. When generating the flowchart, these nodes will be arranged horizontally or displayed at the same level in the diagram. Arrows will not indicate sequential dependencies).
[0026] S3.4. After obtaining the set of process nodes, the relationship matrix, and the role information, generate the complete flowchart F. The steps are as follows: Each node is grouped according to its role and lane, with each role corresponding to one lane.
[0027] The nodes are arranged in front-to-back order within the lane to ensure the correct logical sequence of actions; Simultaneously considering the conditional triggering logic between nodes, the node preceding the condition is placed before the current node to maintain logic. Dependency relationships.
[0028] Node connection relationships are drawn: Based on the relationship matrix, establish flow connection lines between nodes: If the corresponding element in the relationship matrix is 1, then an arrow is drawn between the preceding node (the node that must be completed first in the process. That is, the operation of the current node depends on the completion of the preceding node before it can begin) and the subsequent node (the node that will be executed after the current node in the process, and it is relative to the preceding node) to indicate the process order. At the same time, the execution condition constraint information of each connection line will be recorded, such as executing the connection only when a specific condition is met.
[0029] For nodes with conditional branches or parallel execution, branch logic is generated in flowchart F: Conditional branch nodes will form branch arrows in the graph, marking the triggering conditions; Parallel nodes are arranged at the same level, and arrows indicate simultaneous execution, ensuring that the flowchart accurately reflects the actual process.
[0030] During the generation of flowchart F, topology detection is performed: Detect whether there are circular dependencies, such as nodes that are predecessors of each other leading to an infinite loop; detect whether there are isolated nodes (not connected to other nodes); record and mark the detected anomalies for easy manual correction.
[0031] The flowchart is ultimately saved in structured data format, including: Node list and node attributes: execution action, execution condition, execution subject.
[0032] The connection relationships and triggering conditions between nodes.
[0033] Information about the lane to which the node belongs.
[0034] Topological conflict flag: such as the presence of cycles or isolated nodes.
[0035] Step 4: After generating flowchart F, users are allowed to revise flowchart F. Users can adjust flowchart F through the graphical interface or the editing interface, mainly including the following operations: Node adjustment: Users can add nodes, delete nodes, or modify node names and node descriptions.
[0036] Adjustments to process connections: Users can modify the connection relationships between nodes, such as adding connection paths, deleting incorrect connection paths, or adjusting connection directions; Node order adjustment: Users can change the execution order of certain nodes, such as moving a node to a new execution location.
[0037] After the user completes the above operations, a new flowchart will be regenerated based on the user's modified set of process nodes and connection relationships. .
[0038] Therefore, after making structural adjustments, it is necessary to analyze the structural changes: Compare the two process structure diagrams F and F one by one. The set of nodes in: If the new flowchart If a node exists that is not present in the original flowchart F, it is considered a newly added node. If a new flowchart exists in the original flowchart F If a node does not exist in the table, it is determined to be a deleted node; If a node exists but its attribute information changes, it is determined that the node attribute has been modified. Next, compare the connections between the two process structures: If a new connection path is added between nodes, it is determined to be a new process relationship; if an existing connection path is deleted, it is determined to be a deleted process relationship; if the connection direction changes, it is determined to be a connection direction adjustment. Through this comparison process, the process structure change information can be obtained, which may record the addition of nodes, deletion of nodes, and changes in connection relationships.
[0039] Step 5: After obtaining the new flowchart Then, in order to make the new flowchart To convert it to a text description, a new flowchart needs to be extracted. Execution path in: From the flowchart The system identifies a node as its starting node (the entry point of the process, which is independent of any other node, i.e., has no preceding nodes; this can be determined by the following method: no node points to it, meaning the corresponding column in the relation matrix has no preceding relationships). The system then begins the flowchart from this starting node. Perform a traversal search, during which: Each time a path moves from the current node to the next, that node is added to the current path sequence. When the final node is reached, a complete process path is formed. Continue searching for other possible paths until all paths have been traversed, and finally you will get a complete set of process paths P, where each path consists of multiple process nodes in the order of execution.
[0040] Step Six: Convert each process path in the process path set into its corresponding text: Because of the node Then the text semantics of this node can be: , This can be either a concatenation operation or a natural language generation operation. Natural language generation refers to using a natural language generation model to process node information. The process generates natural language text while preserving semantic integrity. It concatenates the text corresponding to multiple nodes in a path according to their execution order, using logical connectors (first, then, next, finally) between nodes. The resulting text is then output as the overall generated text of the entire process path, thus yielding a new flowchart. The text of all process paths is collected and compiled into a collection of generated text.
[0041] The system then performs a similarity analysis on the semantic vectors between the generated text set and the institutional text set: After obtaining the generated text set, it is necessary to compare each generated text with the original institutional text (the original institutional text set). within To determine the semantic correspondence between the generated text and the original institutional text, for each generated text, the most semantically similar original institutional text is sequentially searched in the original institutional text set. The specific process is as follows: First, select one generated text from the generated text set and perform semantic vectorization on it, converting it into a vector representation that can represent the semantic features of the text (this can be achieved using a semantic vector mapping function). Simultaneously, perform the same semantic vectorization on each institutional text in the institutional text set, ensuring that each institutional text has a corresponding semantic vector representation. The semantic vector of the currently generated text is compared with the semantic vector of each institutional text unit to calculate the similarity (cosine similarity can be used) to obtain the semantic similarity between the generated text and each institutional text unit. The system compares all the calculated similarity results and selects the one with the largest similarity as the optimal matching result between the generated text and the institutional text set. Once the institutional text corresponding to the maximum similarity is determined, it can be considered that the institutional text and the currently generated text are similar in linguistic terms. The system selects the text that is semantically closest to the generated text and uses it as the original policy text corresponding to that text. It then processes all other generated texts in the same way until the matching relationship between all generated texts and the policy text set is determined. This achieves semantic correspondence between the flowchart-generated text and the policy text. Different process paths may have unclear correspondences with specific clauses in the policy text. If the policy clause corresponding to the generated text cannot be accurately located, it is difficult to effectively verify the semantics of the process. Therefore, this step calculates the semantic similarity between the generated text and the policy text item by item and selects the policy text with the highest similarity as the matching result, achieving accurate correspondence between the generated text and the policy text.
[0042] Step 7: After determining the optimal matching relationship between each generated text and the institutional text, it is necessary to further evaluate the extent to which the generated text covers the semantic content of the institutional text in order to determine whether the generated text fully expresses the key semantic information in the institutional text. The specific steps are as follows: First, semantic unit extraction is performed on the policy text. During this process, key information expressing the process semantics is identified and extracted from the policy text, such as execution actions, execution subjects, and execution conditions. These elements are then broken down and extracted. The policy text has already undergone triplet processing to obtain... Let represent the i-th institutional semantic triple. Therefore, we can directly extract the execution action, execution subject, and execution condition elements based on the institutional semantic triple. We can then summarize the various semantic elements obtained from the decomposition (each category is the same semantic element, such as the same execution subject) to establish the execution subject set, execution action set, and execution condition set respectively. The sum of multiple sets forms the semantic unit set corresponding to the original institutional text.
[0043] Subsequently, the generated text that matches it is subjected to the same semantic unit extraction process (the same method as the institutional text), extracting the corresponding action words, subject information and process logic words and other semantic information from the generated text, and constructing a set of semantic units for the generated text.
[0044] After obtaining two sets of semantic units, the system compares each semantic unit in the two sets to determine whether the semantic units in the generated text appear in the semantic unit sets of the institutional text. If a semantic unit exists in both sets, it is considered that the semantic information has been successfully expressed in the generated text.
[0045] Subsequently, the number of semantic units shared between the generated text and the institutional text is counted, and this number is compared with the total number of semantic units in the original institutional text to obtain the degree of coverage of the semantic information of the institutional text by the generated text. This degree of coverage is used to reflect the completeness of the semantic expression of the generated text.
[0046] The system calculates a comprehensive verification score by weighting the previously calculated maximum semantic similarity score and the degree to which the generated text covers the semantic information of the original institutional text, using a unified unit of measurement. When the verification score exceeds a set threshold, it is determined that the generated text and the original institutional text are semantically consistent; otherwise, there is semantic deviation or insufficient semantic information coverage, indicating inconsistency. Therefore, when the verification result indicates semantic deviation or insufficient semantic information coverage, the system will generate a corresponding revision prompt. This prompt will identify the text locations with significant semantic differences or missing semantic information, and will return the prompt to the flowchart editor or manual revision, allowing users to adjust the flowchart structure or node semantics.
[0047] Intelligent methods for generating text data include: Obtain the policy text and convert it into a text semantic vector; Extract the execution subject, execution action, and execution conditions, construct semantic triples, and generate a corresponding set of process nodes based on the triples; When identifying the execution conditions, candidate condition words are selected by combining part-of-speech tagging and a predefined dictionary. The dependency relationships between words are obtained based on dependency parsing. The shortest path length between the condition words and the execution subject and execution action is calculated through path search. The structural correlation is represented according to the dependency relationship type. The condition words are selected by combining the condition expression pattern and the degree of semantic relevance to determine the final execution conditions. Based on the set of process nodes, the similarity of the execution actions and execution conditions between each node is calculated, and the relationship matrix between nodes is constructed and optimized, including merging semantically similar duplicate nodes and identifying parallel nodes under different execution subjects. A flowchart is constructed based on the relationship matrix and the information of the executing entity. The flowchart path is traversed, and all process paths from the start node to the end node are extracted. The process paths are converted into corresponding texts, and a set of generated texts is established. The generated text set is semantically matched with the set of institutional texts to determine the institutional text corresponding to the generated text. The generated text is compared with the corresponding institutional text semantic units to calculate the semantic coverage, and the generated result is verified by combining semantic similarity.
[0048] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the system.
[0049] Furthermore, if the aforementioned function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0050] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-including system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0051] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0052] Furthermore, in order to provide a concise description of exemplary embodiments, not all features of actual embodiments (i.e., those features that are not relevant to the best mode of carrying out the invention as currently considered, or those features that are not relevant to implementing the invention) may be omitted.
[0053] It should be understood that numerous specific implementation decisions can be made during the development of any practical implementation, such as in any engineering or design project. Such development efforts may be complex and time-consuming, but for those skilled in the art who benefit from this disclosure, the development effort will be a routine work of design, manufacturing, and production without requiring much experimentation.
[0054] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions will not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of the present invention.
Claims
1. A text data intelligent generation system based on chart semantic understanding, including: The data processing module acquires the institutional text and converts it into a text semantic vector, characterized by: The triple extraction module extracts the execution subject, execution action, and execution condition, constructs semantic triples, and identifies the execution condition by combining part-of-speech tagging and dictionary filtering to select candidate condition words. Dependency parsing is used to obtain the dependency relationship between words. The shortest path length between the condition word and the execution subject and execution action is calculated through path search. The dependency relationship type between the candidate condition word and the execution subject and execution action is combined to characterize the degree of structural association and determine the first candidate condition word. Condition words are filtered by combining the condition expression pattern and semantic relevance to determine the final execution condition. Select condition words whose structural relevance is greater than the structural relevance threshold as the first candidate condition words; Determine whether the first candidate condition word belongs to the predefined condition expression pattern. When the condition word satisfies the condition expression pattern, the first candidate condition word is recorded as the second candidate condition word. The semantic relevance is determined by calculating the semantic closeness between the second candidate condition word and the executing subject and the executing action based on cosine similarity. The relation matrix building module calculates the semantic similarity of the execution actions and conditions between nodes, constructs and optimizes the relation matrix between nodes, including merging semantically similar duplicate nodes and identifying parallel nodes under different execution subjects; The text matching module constructs a flowchart based on the relationship matrix and the execution entity information, traverses the flowchart path, extracts all process paths from the start node to the end node, converts the process paths into corresponding text, establishes a set of generated texts, and semantically matches the set of generated texts with the set of institutional texts to determine the institutional text corresponding to the generated text. The text verification module compares the generated text with the corresponding institutional text semantic units, calculates the semantic coverage, and verifies the generated result by combining semantic similarity.
2. The system according to claim 1, characterized in that, The extraction of the execution entity includes: The policy text is tagged with parts of speech using natural language processing to select candidate words such as nouns, proper nouns, and organization names as the implementing entities; A pre-trained identification model is used to identify candidate executive entities to obtain information on organizational structure, position, or role. The selected words are then used to re-establish candidate entities. By combining a predefined dictionary of roles in the institutional domain, candidate implementing entities are screened and semantic vector matching is performed to determine the implementing entity.
3. The system according to claim 1, characterized in that, The extraction of the execution action includes: The institutional text is tagged with parts of speech using natural language processing to filter verbs and verb + object combinations, and to establish candidate action words; A predefined action dictionary is used to classify candidate action words using a pre-trained recognition model, and candidate action words that match the action dictionary are added to the candidate action list. The candidate words that best match the action dictionary are selected from the candidate actions, and semantic vector matching is performed to determine the final candidate action to be executed.
4. The system according to claim 1, characterized in that, The process of determining the shortest path length includes establishing a node connection network, as follows: Identify whether a dependency relationship exists between any two words and record it as follows: Which word serves as the head word or dependent word, and the type of dependency relationship between them, form a set of dependency relationships; Based on the set of dependencies, each word is treated as a node, and connections are established between two words with dependencies to form a tree structure. This tree structure is then converted into a connection structure for path search. The conversion method is as follows: For each pair of dependent words, establish a bidirectional connection so that any two dependent words can reach each other, thus obtaining a node connection network for path search.
5. The system according to claim 4, characterized in that, In the node connection network, the starting word node and the target word node are determined. Starting from the starting word node, a layer-by-layer expansion search process is performed, including: Use the starting word node as the initial content of the current node set; In each round of expansion, each node in the current node set is used as an expansion node, and all its directly connected neighboring nodes are searched. These adjacent nodes are designated as nodes to be visited in the next layer. For each newly arrived node, record the number of connections from the starting word node to that node; Repeat the above expansion process until the target word node is reached for the first time; During the path search process, for each visited node, the number of connections from the starting node to that node is recorded, and the calculation method is as follows: The path length of the starting word node is set to zero; Each time a connection between nodes is traversed, the path length increases by one unit. When expanding from a visited node to its neighboring node, the path length of the neighboring node is equal to the path length of the current node plus one unit; the increase in path length is based on the direct connections between nodes, and each connection is considered as an increase of one count unit in path length. The path lengths from the starting word node to each node are obtained step by step; When the search process first reaches the target word node, it stops expanding and the path length recorded at that moment is taken as the shortest path length between the starting word and the target word.
6. The system according to claim 1, characterized in that, The specific conditional expression pattern is as follows: A set of condition expression patterns is pre-constructed. For the first candidate condition word, it is determined whether it is in the above condition expression pattern. When the condition word meets the condition expression pattern, it belongs to the typical condition expression structure and is assigned a high matching degree value. Otherwise, assign a low matching degree value, and select the first candidate condition word with a high matching degree value as the second candidate condition word.
7. The system according to claim 6, characterized in that, The degree of semantic relevance includes: The second candidate condition words, execution subject, and execution action are processed through semantic representation and converted into vector form. After obtaining the semantics, the semantic similarity between the second candidate condition words and the execution subject and execution action is calculated based on cosine similarity. If the semantic similarity between the second candidate condition word and the execution action is higher than the preset action threshold, then it is determined that the second candidate condition word and the execution action have a semantic relationship. If the semantic similarity between the second candidate condition word and the executing entity is higher than the preset entity threshold, then it is determined that the second candidate condition word has a semantic relationship with the executing entity. When the semantic proximity of the second candidate condition word meets at least one of the above subject thresholds or action thresholds, and the other semantic proximity is not lower than its corresponding preset lower limit, the condition of semantic relevance is determined, and the second candidate condition word that is higher than the set threshold is retained as the final execution condition.
8. The system according to claim 1, characterized in that, The method for determining the institutional text corresponding to the generated text is as follows: The node information is generated as natural language text. The texts corresponding to multiple nodes in a path are concatenated in the order of execution. Logical connectors are added between the nodes to complete the concatenation of the node texts. The generated text of the entire process path is output, and the texts of all process paths are obtained and a set of generated texts is established. Select one generated text from the generated text set and semantically vectorize the generated text to obtain a vector representation of the text's semantic features. Semantically vectorize each institutional text separately to obtain a semantic vector representation. The semantic vector of the currently generated text is compared with the semantic vector of each institutional text unit to calculate the semantic similarity between the generated text and the institutional text units. The highest similarity is selected as the optimal matching result between the generated text and the institutional text set. Once the policy text corresponding to the highest similarity is determined, it is used as the original policy text corresponding to that generated text. Other generated texts are matched one by one until the matching relationship between all generated texts and the set of policy texts is determined, thereby realizing the semantic correspondence between generated texts and policy texts.
9. A method for intelligently generating text data, applied to the system according to any one of claims 1 to 8, characterized in that, include: Obtain the policy text and convert it into a text semantic vector; Extract the executing entity, executing action, and executing conditions, construct semantic triples, and generate the corresponding set of process nodes; When identifying the execution conditions, candidate condition words are selected by combining part-of-speech tagging and a predefined dictionary. The dependency relationships between words are obtained based on dependency parsing. The shortest path length between the condition words and the execution subject and execution action is calculated through path search. The structural correlation is represented by the dependency relationship type. Condition words are selected by combining the condition expression pattern and the degree of semantic relevance to determine the final execution conditions. The semantic similarity of the execution actions and conditions between each node is calculated, and the relationship matrix between nodes is constructed and optimized, including merging semantically similar duplicate nodes and identifying parallel nodes under different execution subjects; A flowchart is constructed based on the relationship matrix and the information of the executing entity. The flowchart path is traversed, and all process paths from the start node to the end node are extracted. The process paths are converted into corresponding texts, and a set of generated texts is established. The generated text set is semantically matched with the set of institutional texts to determine the institutional text corresponding to the generated text. The generated text is compared with the corresponding institutional text semantic units to calculate the semantic coverage, and the generated result is verified by combining semantic similarity.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the system according to any one of claims 1 to 8.
Citation Information
Patent Citations
Method for automatically generating natural language text by structured process model
CN107526717A
Automatic label labeling and classifying method and system for unstructured system documents
CN121301571A