Electronic regulation system implementation method and device based on large language model
Through large language model parsing and enhancement algorithms, the uranium enrichment plant procedures have achieved automated conversion from paper documents to structured data, improving recognition accuracy and visualization of logic diagrams, reducing the risk of human error, and realizing real-time integration of procedures and production control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 中核第七研究设计院有限公司
- Filing Date
- 2025-12-24
- Publication Date
- 2026-04-24
AI Technical Summary
The existing operating procedures of uranium enrichment plants exist in the form of paper or unstructured electronic documents, which leads to difficulties in structuring, high risk of human error, lack of real-time verification and ambiguity in logical relationships. Furthermore, large language models have not been applied to automatic structuring and human error prevention control.
A large language model is used to parse procedure documents. Pre-training enhances the recognition of structured data, constructs an executable logic graph, and associates it with the DCS system to verify step conditions in real time, preventing human error. Dedicated mapping algorithms and enhanced graph layout algorithms are used to achieve automated and intelligent processing.
It has achieved full-process automation of procedures, improved the accuracy of structured identification, ensured a high success rate of association between equipment tag numbers and DCS systems, reduced the risk of human error, and achieved deep real-time integration of procedures and production control and clear visualization of logic diagrams.
Smart Images

Figure CN121920349A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of document data processing technology, specifically to a method and equipment for implementing an electronic procedure system for uranium enrichment plants based on a large language model. Background Technology
[0002] Uranium enrichment plant operating procedures are crucial technical documents guiding operators. They play a vital role in process operation, handling abnormal events, and emergency procedures, serving as operational guidelines, preventing human error, and facilitating emergency response. Currently, they are mostly in paper or unstructured static electronic document (such as Word or PDF) format. This traditional method presents the following technical problems: (1) Difficulty in structuring regulations: Converting paper regulations into structured electronic regulations requires manual review of each item, which is labor-intensive, prone to errors, and difficult to maintain and update. (2) High risk of human error (prevention of human error): Operators frequently switch between procedures and distributed control systems (DCS), which can easily lead to misreading, missing steps, misjudgment, etc., especially in complex working conditions and high-pressure environments; (3) Lack of real-time verification: Traditional methods cannot automatically associate procedures with real-time DCS data, and cannot verify in real time whether the execution conditions of the steps are met; (4) Ambiguous logical relationships: The logical relationships such as conditional branches and loops in complex procedures rely on manual identification, which can easily lead to misunderstandings.
[0003] In the existing technology, although there are electronic procedure systems for corresponding operations, they usually require manual creation of procedure templates, cannot automatically extract structured information from the original procedure documents, and lack intelligent anti-misjudgment and real-time verification mechanisms.
[0004] The main task in establishing electronic procedure templates is to structure the procedures. Currently, there are generally two methods for manually structuring these procedures: First, convert the Word version of the procedure into an intermediate Excel file, check and configure the Excel file, and then import the configured intermediate file into a database using software. Second, modify and manually annotate the Word version of the procedure. Manual annotation involves setting a clear step sequence number before each step to distinguish different steps. When encountering steps that jump based on conditions, they are uniformly modified to the form of "if, then, otherwise" to facilitate computer recognition of the jump logic. However, regardless of whether a manual or semi-automatic structuring method is used, each procedure needs to be processed individually, which consumes manpower and time.
[0005] Furthermore, although large language models (LLMs) have made progress in text understanding in recent years, there are still no concrete solutions for their application in the automatic structuring of uranium enrichment engineering procedures and the prevention of human error control.
[0006] Therefore, this application proposes an implementation method for an electronic procedure system based on a large language model to solve the above-mentioned technical problems. Summary of the Invention
[0007] The main objective of this invention is to provide a method for implementing an electronic procedure system based on a large language model, which is used to automate the processing of procedures, prevent errors caused by human factors, and ultimately achieve full-process automation from automatic parsing of procedure documents to intelligent execution, thereby solving the technical problems mentioned in the background art.
[0008] The present invention solves the above-mentioned technical problems by adopting the following technical solutions: A method for implementing an electronic procedure system based on a large language model, for uranium enrichment plant electronic procedures, involves the following steps executed via computer equipment: S1. Use industry domain knowledge to pre-train and enhance a set of large language models, and use the enhanced large language models to parse the procedure documents in order to identify and extract structured procedure data, including step information, equipment tag number, logical relationship, execution conditions and safety constraints. S2. Based on the extracted structured procedure data, construct an executable electronic procedure logic diagram, wherein the logic diagram includes step nodes, conditional branch edges, and execution paths; S3. Associate and map the equipment tag number in the structured procedure data with the DCS system, and obtain the measurement value of the equipment tag number in real time through industrial communication protocol. The goal is to establish an accurate and reliable connection between the equipment tag number extracted from the procedure and the actual control system (DCS) and provide real-time data support for the system. S4. During the execution of electronic procedures, a human error prevention verification is performed based on the execution conditions of the current step and real-time DCS data. The next step is only allowed to be executed if the verification passes.
[0009] Preferably, the specific operation process for pre-training and enhancing the large language model in S1 includes: S11. Construct, train, and validate datasets to build a set of step jump instances for each sample representing a procedure, including input and output information. The datasets take the current step description, historical step description, and procedure context information as input information and output the target step number or jump instruction. S12. To improve the accuracy of the large model in recognizing procedure jump logic, supervised fine-tuning is performed using the industrial procedure data in S11. The goal of the fine-tuning is to adapt the general large model to a procedure parsing model for the vertical domain, so that it can predict the next step based on the current step and context. S13. Based on the scenario of parsing the new condensed engineering procedures, a set of dedicated instructions is constructed. This instruction set is constructed according to the business logic of "procedure step parsing → operation semantic analysis → DCS tag number identification → comparison operator identification (such as >, ≥) → execution logic sequence analysis → condition jump judgment → cross-procedure association". It is used to guide the large model step by step to complete the specified operations of the new procedure, including structured decomposition, operation semantic analysis, accurate extraction of tag number information, logical relationship sorting, jump rule judgment and multi-procedure association matching, and output the final standardized structured data that can be directly connected to the downstream system. S14. Since there are often differences between the device tag number descriptions in the specification documents and the actual tag number naming in the distributed control system (DCS), and the accuracy of traditional methods based on string exact matching or simple similarity calculation is insufficient, resulting in a high automatic mapping error rate and seriously affecting system reliability, an external tag number mapping algorithm is set to calculate the similarity between the Chinese names in the specification and the Chinese names in the DCS, and a two-layer semantic matching algorithm with keyword constraints is used to improve the accuracy of similarity calculation. Preferably, the sample structure of the dataset in S11 is set as follows: enter: 1) Description of the current step: The text content of the current step in the procedure document, such as "Confirm main pressure (corresponding tag number PRSA_1n01.PV)"; 2) Historical steps: The text or number of the preceding steps, used to provide context, such as "Step 1: Start pump A"; 3) Contextual information of the procedure: including the current chapter name (e.g., “Accident Handling Procedure”), a list of relevant equipment or system background (e.g., “Lean Material Dry Pipe System”), to help the model understand the global logic; Output: 1) The number or description of the next step: for example, "Step 5" or "Perform a sealing check"; 2) Jump decision: If the step contains a conditional branch (such as "if the pressure is greater than 36 torr, then jump to step 8"), the output is the target step number or the jump instruction (such as "jump to step 8").
[0010] Preferably, the dataset construction, training, and validation operations in S11 specifically include: A) Data Acquisition: Extract step pairs from the existing procedure system, use their inherent step numbers and jump relationships as annotation data, manually annotate by domain experts, experts read the procedure document (such as WORD or PDF), manually divide the steps, assign numbers, and record the jump logic to ensure accuracy; B) Step segmentation: Use rule-based methods (such as based on punctuation, keywords such as "step" or "if") or sequence models (such as BERT) to segment the procedure document into independent step units. For example, segment a text "7 Confirm mains pressure... 8 If closed section..." into step 7 and step 8; C) Step numbering: Assign a unique number to each step (such as an incrementing number), and construct a step relationship diagram to record the linear order and conditional jumps (such as step 8 jumping to step 10 or step 12). D) Text cleaning: Remove irrelevant formatting (such as headers and footers in PDFs), symbols (such as extra spaces or line breaks), and standardize terminology (such as standardizing "DCS system" to "distributed control system") to improve the model's generalization ability. E) The final data augmentation is as follows: Dataset 1 (Expert-Annotated Data): Logical relationship data annotated by the aforementioned domain experts, including step pairs and jump conditions, ensuring high quality and reliability. For example, 100 procedure samples are annotated, covering common procedure descriptions. Prompt Design: The Prompt needs to clearly define the task instructions, reference samples, and constraints to guide the generalization process of the large model and generate new samples that meet the requirements. Dataset 2 (Large Model Augmentation): Using Dataset 1 as a seed, data augmentation is performed through a large model to expand the size of the dataset and increase its diversity.
[0011] Preferably, in the supervised fine-tuning process using industrial procedure data in S12, a parameter-efficient fine-tuning technique is employed to adapt the pre-trained large language model to the domain. Specifically, the Low-Rank Adaptive (LoRA) method is used, training only a small number of low-rank matrices introduced into the model. This efficiently utilizes computational resources while injecting domain knowledge. In addition to the standard instruction fine-tuning loss function, a set of differentiable loss functions targeting the logical constraints of industrial operating procedures are introduced, collectively forming a joint optimization objective. These loss functions serve as "supervisory signals," forcing the model to learn the strict logical constraints in the industrial text. The operation process here includes: (1) Consistency loss of jump relationship The loss formula is:
[0012] This is a logical indicator function used to indicate whether the currently analyzed text segment t (such as a sentence) contains predefined logical keywords such as "then", "otherwise", or "jump to". , Otherwise, it is 0; It is the probability predicted by the model, which is used to represent the model's predicted probability that any "condition → step" entity pair in the current text segment has a jump relationship. It can be obtained by aggregating (e.g., taking the maximum) the probability values output by the relationship classification module. This represents the summation over all training samples (or text fragments); This loss function aims to ensure that when explicit logical indicators (such as "then" or "jump to") appear in the text, the model must predict the corresponding jump relationship; conversely, if there are no indicators, jumps should not be predicted arbitrarily. Essentially, this function is a reinforced binary cross-entropy loss, which utilizes the deterministic signal provided by the sign rule. As the "gold standard," it directly supervises and amplifies the model's ability to identify key logical relationships. When the text has obvious logical words but the model fails to predict the jump, or when the text does not have logical words but predicts the jump, it will be severely penalized. (2) Conditional Mutual Exclusion Loss The loss formula is:
[0013] and These are the vector representations (encodings) of the model for condition A and its inferred negation condition, which is not A. It is a cosine similarity function, used to ensure that mutually exclusive conditions are as far apart as possible in the semantic vector space. Therefore, when their similarity exceeds a small threshold... When that happens, punishment should be imposed; and These are the probabilities predicted by the model for jumping to step B under condition A and jumping to step C under condition C other than A. This is a threshold close to 2.0. Ideally, the sum of the probabilities of two mutually exclusive paths should be 2.0 (because each should be close to 1.0). If the sum is less than this value, it indicates that the model lacks confidence in predicting at least one of the paths. In this case, [further action is needed]. The function (i.e., ReLU) imposes a penalty; This loss aims to teach the model that in structures like "if A then B, otherwise C", condition A and its implicit negation condition not A are mutually exclusive, and their corresponding jump paths should also be different. This loss imposes constraints on both representation learning and path prediction, forcing the model to understand the mutual exclusivity between conditions and the resulting path bifurcation, which is key to learning complex branching logic. (3) Loss of sequence consistency The loss formula is:
[0014] and These are two steps arranged in the order of their appearance in the text, and < ; The steps of model prediction As a condition, jump directly or indirectly to the step The probability is obtained by inferring the logical relationship between the steps through the model; It is a distance decay factor, adjacent steps ( Smaller (smaller) sequence prediction errors are penalized more severely, while the sequence constraints of more distant steps are weaker, which is consistent with the local coherence of operation steps. This loss aims to use the natural order in which steps appear in the text as a weak supervision signal to encourage the model to predict the execution order between steps in accordance with it; (4) The total loss function is calculated as follows:
[0015] This is the typical loss of a large language model during the instruction fine-tuning stage; , and These are all weighting coefficients used to control the importance of logical loss; , and Both belong to the defined logical loss function; Through the backpropagation algorithm, the aforementioned logical loss and instruction loss are used together to update the LoRA adapter parameters, thereby driving the large model to not only learn domain terminology and output format, but also deeply internalize the rigorous causal, branching and sequential logic in the operating procedures. Ultimately, the fine-tuned large model can stably and accurately extract the logic graph that can be directly used to drive electronic procedures from the natural language description.
[0016] Preferably, the dedicated instruction set in S13 is used to construct the procedural operation logic meta-model parsing framework, serving as the semantic foundation for all output JSONS chemas. This meta-model not only defines the data structure but also establishes a semantic system oriented towards procedural operations, thereby ensuring that dynamically generated templates can accurately express the true intent and logical relationships of industrial operations. Within this model parsing framework: Systematic design of semantic types: In the metamodel, we clearly define a unified "semantic type" for each operation node. For example, the category (@type) of the step is systematically divided into Action (execution type operation, such as "start pump"), Condition (judgment type condition, such as "pressure > set value"), Wait (waiting type operation, such as "delay for 5 minutes"), Monitor (check pressure within the normal range of 5-10 psi), etc., which fully covers the typical operation modes in industrial procedures. Semantic guidance for output content: Under the guidance of the instruction set, the large model not only performs text information extraction, but also automatically assigns precise semantic type labels to each operation node according to the above classification system. For example, the system parses "open valve V-101" as Action type and "when pressure > 0.8MPa" as Condition type, thereby ensuring that the output data structure directly carries the industrial operation intention. Through this design, the final output JSON data surpasses the traditional template filling result and is transformed into a digital logical model rich in standardized industrial semantics. This provides a high-level data foundation with strict semantic consistency for subsequent automatic generation of process flowcharts, logic verification, process simulation and direct system execution, forming the core technical support from parsing to application.
[0017] Preferably, the calculation process for the combined use of the external mount number mapping algorithm and the two-layer semantic matching algorithm in S14 includes: Export the tag code and corresponding Chinese terminology from the DCS system to form a CSV file, for example: tag code, Chinese terminology (such as PRSA_1n01.PV, main pipe pressure). Extract the device tag number and Chinese name from the structured data output by S13; To calculate the similarity between the specification tag number code and the DCS tag number code, first convert all codes to uppercase, remove spaces, suffixes, and special characters, then use the edit distance (Levenshtein distance) to calculate the similarity, normalizing it to a score of 0-1. The calculation formula is as follows:
[0018] This refers to the device tag number code in the specification document. This represents the tag number encoding in the DCS system. Levenstein distance (edit distance) is the minimum number of single-character edits (insertion, deletion, replacement) required to convert between two strings. Indicates the string length and the final score. After normalization, the value range is [0,1]. In the process of calculating the similarity between the Chinese names in the procedure and the Chinese names in DCS, a two-layer semantic matching algorithm with keyword constraints (KCTSM) is further used. This algorithm includes two processing stages: a rule layer (keyword detection) and a semantic layer (BERT model, calculating cosine similarity to assess the semantic closeness of the two names). Finally, the score is normalized to 0-1. Keyword constraints significantly reduce the number of BERT calculations required, improving the system's response speed. (1) Rule layer: Using a predefined domain dictionary (such as “segment one”, “refined material”, “poor material”, “pressure”, “temperature”, etc.) and part-of-speech tagging, the core keywords in the text are identified, and key components representing physical location (such as “segment one”), equipment type (such as “feeding”), and measurement parameters (such as “pressure”) are extracted. The keywords extracted from the two names are compared, and keyword pairs that belong to the same category but have different content (such as “segment one” and “segment two”) are identified. The similarity function is called to evaluate their differences. If the difference value of any keyword pair exceeds the preset threshold, the algorithm directly determines that the matching score is 0 and the process is terminated. Semantic layer: If the conflict detection in step two passes (i.e., there is no key information conflict), then semantic vector generation is performed. The preprocessed Chinese name is input into the pre-trained BERT model, and the average value of all word vectors in the sequence is calculated to obtain the semantic vector. and Calculate the cosine similarity between two semantic vectors, and normalize the similarity as follows:
[0019] If both the coding score and the noun score are higher than the threshold, the procedure test point and the DCS test point will be automatically linked. If either score is lower than the threshold, a manual inspection mechanism will be triggered: the system will mark the mismatched item, and the operator will confirm or correct the link.
[0020] Preferably, the electronic procedure logic diagram in step S2 includes: Step nodes represent basic operational units in the procedure, and each node has a unique identifier (ID), type, description, associated device tag number, execution conditions, security constraints and other specified attributes. The type of the node inherits from the semantic type system defined by the dedicated instruction set in S13, and mainly includes action nodes, condition nodes, wait nodes and monitor nodes. Its specific attributes include node ID, node type, text description, input parameters, expected output, list of associated DCS tag numbers, preconditions, post-actions, etc. The directed edge of the execution path is a directed line segment used to connect two step nodes to represent the default, unconditional sequential execution relationship. That is, after the source node finishes execution, the control flow will automatically pass to the target node along the edge. Therefore, it can represent the most basic "next step" relationship in the procedure. Conditional branch edges are a special type of directed edge used specifically to originate from the condition node. Each edge is bound to an explicit Boolean expression as a transition condition, which defines the different paths that the control flow should choose when the evaluation result of the condition node is true or false. At this point, the Boolean expression on the side directly encodes the key decision logic in the procedure, which is the core of realizing intelligent jump.
[0021] Preferably, the construction process of the electronic procedure logic diagram in step S2 includes: Element instantiation: The system traverses the input structured data and performs initialization construction. In node creation, for each identified operation unit, a corresponding step node object is instantiated based on its attributes (such as Action, Condition). At the same time, all attributes such as node ID, text description, and associated DCS location are fully populated. When connecting edges, directed connections between nodes are initially created based on the next step relationship clearly defined in the data. For sequential relationships, directed edges of execution paths are created. For branches starting from Condition and type nodes, two conditional branch edges are created and bound to Boolean conditional expressions parsed from the data. Loop structure identification and closure: Detect the existence of semantics such as "return to step X" or "repeat execution until condition Y is satisfied". When such intentions are identified, the system will create a back edge from the current node to the target step node in the graph, forming a directed loop. The transition condition of this edge is set as the maintenance condition of the loop. Parallel structure standardization: When creating a parallel starting point, the system generates a virtual "parallel start" node to establish parallel branches. Two or more connections are simultaneously drawn from the "parallel start" node, pointing to the starting node of each parallel task. At this time, a synchronization mechanism is set so that after each parallel task is completed, its final node points to the same "parallel end" node. Automatic layout optimization based on enhanced Dagre algorithm: In order to achieve a clear and visual presentation of the logic diagram of electronic procedures, the system needs to use an efficient graph layout algorithm to intelligently arrange the node positions during the graph generation process, so as to generate a visual flowchart with a clear structure and clear logic. The traditional Dagre algorithm is a hierarchical graph layout algorithm. Through three stages of hierarchical, sorting and coordinate allocation, it can effectively reduce the intersection of lines and improve the readability of the graph. Finally, the verified complete logical diagram model containing optimized layout information is serialized into a system-readable JSON format for persistent storage.
[0022] Preferably, in the process of intelligently arranging node positions in the graph layout algorithm, since the standard Dagre algorithm is only applicable to directed acyclic graphs (DAGs) and cannot directly handle graphs containing cyclic structures, and considering that industrial electronic procedures commonly contain cyclic logic such as "repeated execution until the condition is met," these cycles are represented in the logic graph as backtracking edges starting from the condition node and pointing to the upstream node, forming directed cycles. If the standard Dagre algorithm is directly applied, it will fail because the node hierarchical order cannot be determined due to the cycle. Therefore, a Dagre enhanced layout algorithm based on domain semantics is further used to innovatively achieve high-quality automatic layout of cyclic procedure logic graphs. The implementation steps of this algorithm are as follows: Domain knowledge-guided ring decomposition strategy: Based on the analysis of step semantic types, execution order and jump logic stored in the S13 dedicated instruction set, and utilizing the specific semantic pattern of loop structure in industrial procedures—loops always originate from specific branches of condition nodes and eventually point to an upstream node—the system can accurately identify the "loop backflow edges" that constitute the loop. The identification condition is that "the target node number is less than the source node number and there is a condition jump." During the layout calculation stage, these backflow edges are temporarily removed, and the original cyclic graph is converted into a temporary acyclic graph, thereby adapting to the application premise of the Dagre algorithm. Phased processing mechanism: In the first phase, the standard Dagre algorithm is applied to the converted acyclic backbone to make full use of its hierarchical optimization capabilities and generate a backbone structure with a clear layout. In the second phase, the cyclic edges are restored and differentiated visual encoding and local routing optimization are adopted to present the cyclic logic completely while maintaining the overall layout cleanliness. This enhancement method not only breaks through the application limitations of the standard Dagre algorithm, but also creatively integrates domain semantic knowledge into the graph layout process. This enables complex industrial procedure logic graphs rich in cycles to achieve professional-grade automatic layout effects while fully and accurately expressing all business logic. It realizes the organic combination of algorithm versatility and domain adaptability, and provides an innovative solution for the visualization of electronic procedure systems.
[0023] Preferably, the segmented execution in the phased processing mechanism includes the following steps: The first phase involves the following steps: Step 1: Node layering: Use the longest path layering method to distribute nodes to multiple layers. Specifically, place nodes without incoming edges in the first layer, and then place subsequent nodes in the layer below the layer of their predecessor nodes. If a node has multiple predecessors, place it in the layer with the maximum layer number plus one. Step 2: Node sorting within the same layer: Adjust the node order within the same layer to minimize edge crossings. In this case, the median method or the greedy swap method can be used. Step 3: Coordinate Assignment: Calculate the precise coordinates (x, y) of each node based on its level and order within the level. The second phase involves the following steps: Step 1: Restore edges: Add the previously temporarily removed loop backflow edges back to the graph; Step 2 Curve Routing: For each loop backflow edge, instead of using straight lines, a Bézier curve is used for drawing. The control points of the Bézier curve are dynamically calculated based on the positions of the source and target nodes to form a smooth arc, avoiding intersections with other nodes and edges.
[0024] Preferably, during the association mapping process in S3, a procedure-DCS tag number mapping table is automatically generated and maintained as the core configuration using the algorithm calculation results of the external tag number mapping algorithm in S14. This ensures that each logical operation point in the procedure can accurately correspond to the actual physical measurement point in the DCS system. The measured value of the device tag number is obtained in real time through the industrial communication protocol. At this time, in order to achieve secure and efficient data exchange with the DCS, the system adopts the standard OPC UA (Open Platform Unified Architecture) protocol as the real-time data channel, wherein: Secure connection: The OPC UA protocol, as an OPC UA client, is used to establish a secure session with the DCS server; Subscription Acquisition: The OPC UA protocol also subscribes to the DCS for real-time data of relevant measurement points based on the tag mapping table. At this time, the system sets the optimized acquisition cycle and triggering conditions. Data services: The real-time values, timestamps and quality status collected are cached in the system's real-time data pool, providing timely and reliable data for the intelligent execution of each subsequent procedure and verification against human error (S4).
[0025] Preferably, in the human error prevention verification process of S4, the traditional "paper procedure review" that relies on human self-awareness is transformed into an intelligent verification system that is automatically executed by the system, based on real-time data, and embedded throughout the entire process. This is an important technical means to reduce the risk of human error and improve the level of inherent safety. The specific implementation methods at this time include: Condition parsing: Before executing any step, the system first parses the structured execution conditions defined in the current step node. The structured execution conditions are all parsed into a standardized format by the large model in S1, and finally the DCS bit number, comparison operator (such as >) and threshold are automatically extracted from the conditions. Real-time data acquisition: Through the real-time data channel established by S3 based on OPC UA, the system instantly acquires the current measurement value, timestamp, and data quality status of the extracted device tag number; The data obtained above was validated using a multi-level validation framework. The system automatically records the complete digital footprint of the procedure execution, including the execution time of each step, the operator, the real-time data snapshot used during verification, the verification result, the final execution result, and any alarm and intervention records, forming an tamper-proof and traceable electronic operation ticket.
[0026] Preferably, the specific verification method for data verification in the multi-level verification framework includes: Pre-execution condition verification: Before a step is allowed to be executed, the system automatically checks all the preconditions of the node. These preconditions are usually logical expressions based on real-time DCS data. The system only unlocks the permission to execute the subsequent steps when all preconditions are true at the same time. Parameter verification during execution: For operations that require setting parameters, the system will verify the parameter values entered by the operator to determine whether they are within the allowed range, in order to prevent exceeding the limit settings; Post-execution result verification: After the operation command is issued, the system does not immediately proceed to the next step, but continuously monitors the feedback of the relevant DCS tag number. The system will compare the actual feedback value with the expected output defined in the step node, and confirm whether they match within a preset time. Only when the operation effect is confirmed to have met expectations will the system record the completion of this step and allow the process to proceed.
[0027] In another aspect, the present invention also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the method described above.
[0028] In another aspect, the present invention also discloses a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the method described above.
[0029] As can be seen from the above technical solution, the present invention provides a method for implementing an electronic procedure system based on a large language model. Compared with the prior art, the present invention has the following advantages: 1. This invention achieves full automation of the process of structuring, which can replace the traditional heavy and error-prone manual sorting and efficiently transform paper or static electronic documents into maintainable and executable structured data.
[0030] 2. This invention improves the accuracy of procedure logic recognition to over 94% through domain-enhanced fine-tuning, and also achieves high-success-rate automatic association between equipment tag numbers and DCS systems through a dedicated mapping algorithm, ultimately significantly improving the parsing and mapping accuracy of complex industrial texts.
[0031] 3. This invention can automatically convert extracted structured data into an executable logic diagram containing steps, branches, and loops, and uses an enhanced graph layout algorithm to present a clear and standardized visualization, which greatly improves the logical readability and execution guidance of the procedure, thereby realizing the automatic conversion of structured text procedures into intelligent visual logic diagrams.
[0032] 4. This invention enables the generated electronic procedure logic diagram to be linked with the DCS system, allowing the procedure steps to be automatically judged and advanced based on real-time data, upgrading from a static document to a dynamic execution program, thereby achieving deep real-time integration of procedures and production control.
[0033] 5. This invention constructs an embedded intelligent anti-misoperation system. Through multi-level real-time verification before, during, and after execution, it can effectively intercept human errors such as misreading, missing steps, and misoperation, and can significantly improve the inherent safety of operation.
[0034] It should be understood that the descriptions in this section are not intended to identify key or essential features of embodiments of the invention, nor are they intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Of course, implementing any product of the invention does not necessarily require achieving all of the advantages described above simultaneously. Attached Figure Description
[0035] The accompanying drawings, which form part of this application, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings: Figure 1 This is a schematic diagram of the overall system architecture and method operation flow of the present invention; Figure 2 This is a schematic diagram illustrating the implementation process of the visual electronic procedure logic diagram of the present invention; Figure 3 This is a schematic diagram of the operation flow of the enhanced Dagre algorithm of the present invention. Detailed Implementation
[0036] 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 a part of the embodiments of the present invention, and not all of them. Unless otherwise specified, the embodiments and features in the embodiments of this application can be combined with each other. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0037] For details in the embodiments, please refer to Figures 1 to 3 .
[0038] To overcome the following three problems that arise when the general large model is used for the automated processing of condensed domain procedures: (1) When the large model parses complex procedure logic, the accuracy of judging jump logic such as conditional branches, loops, and parallelism is usually only 70-80%, especially in scenarios with implicit conditions (conditions not explicitly written in the step description but implied based on professional knowledge) and complex logic (multiple nested conditions, compound logic judgments). Superimposing the specific description method of the condensed domain leads to a low accuracy of step execution order and jump logic recognition; (2) There are some deviations between the tag code and name in the procedure description and the tag code and name in the DCS control system, which leads to deviations in the association mapping between the equipment tag extracted by S3 from the procedure and the DCS system. For example, the procedure tag number: PRSA_1n01 (code), the pressure of the second section main pipe (noun); the DCS tag number: PRSA-1N01.PV (code, different in case and suffix), the pressure value of the second section main pipe (noun); (3) The general large model lacks a domain knowledge system, making it difficult to accurately distinguish the operational essence of different steps in the procedure text (such as execution, judgment, waiting, monitoring), and it is difficult to spontaneously generate high-quality structured data that meets the requirements of industrial system integration.
[0039] The implementation method of the electronic procedure system for uranium enrichment plants based on a large language model proposed in this invention, taking the "Procedure for Handling Abnormal Pressure in Lean Feed Main Pipeline" as an example, constructs a set of automatic processing environments for electronic procedures as follows: Qwen-7B-Chat was selected as the initial base large language model. The input was a Word document named "Procedure for Handling Pressure Anomalies in Lean Material Main Pipe.docx" as the procedure document. This document contains natural language descriptions of steps, conditional judgments and equipment tag numbers. For example, it contains descriptions such as "If the pressure of several pipes (PRSA_1n01) > 36 torr, then jump to step 8 to perform pressure relief operation". The DCS system interface is constructed as follows: the DCS system is simulated by a simulator and provides real-time data services through the OPC UA protocol, including measuring points such as tag number PRSA-1N01.PV (corresponding to "zone two main pipe pressure value"); At this point, the domain knowledge base uses the existing petrochemical equipment tag number database and Chinese terminology database (CSV format), which includes the correspondence between codes and names.
[0040] At this time, as Figure 1 As shown, the technical method adopted in this application includes the following steps in actual use: S1. Automated parsing and structuring of procedural documents.
[0041] Collect 100 manually annotated operation procedures (with clear steps and jump relationships) as seed datasets.
[0042] The Qwen-7B-Chat model was fine-tuned using a supervised fine-tuning domain augmentation method (combining LoRA and a logistic constraint loss function). After fine-tuning, the model's accuracy in recognizing complex logic such as conditional branches and loops on the test set improved from 78% for the general model to 94%.
[0043] Next, perform the new procedure analysis: (a1) Input “Procedure for Handling Abnormal Pressure in Lean Material Main Pipeline.docx” into the fine-tuned large model.
[0044] (a2) The model automatically executes the following parsing based on the domain-specific instruction set designed in S13: Step segmentation and numbering: The document content is divided into 12 independent step units (Step1-Step12).
[0045] Operational semantic analysis: Labeling each step with its semantic type. For example: Step 2: “Confirm mains pressure (PRSA_1n01) < 10 torr” -> Type: Condition (Judgment) Step 5: “Start the standby booster pump P-102A” -> Type: Action Step 7: “Wait 5 minutes and observe the pressure trend” -> Type: Wait Logical relationship extraction: Identify the conditional jump logic in Step 2, Step 8, etc. For example, parse out the rule "If the pressure > 36 torr, then jump to Step 8".
[0046] Device tag number extraction: Extract device tag number codes such as PRSA_1n01 and P-102A and their context names.
[0047] (a3) The output is a structured JSON data that conforms to the “Procedure Operation Logic Meta-Model”, which clearly defines the steps, types, descriptions, associated tag numbers and jump conditions.
[0048] S2. Automatic construction of electronic procedure logic diagrams, such as Figure 2 As shown.
[0049] (b1) The system reads the above JSON data and automatically instantiates step nodes (such as Condition Node, ActionNode) and execution edges.
[0050] (b2) Identify the description in the procedure that “if the pressure is not restored, repeat steps 5 to 7” and automatically construct a loop structure from Step 7 to Step 5.
[0051] (b3) Invoke the enhanced Dagre automatic layout algorithm to optimize the layout of the directed graph containing this loop, generating a clear visual logic flowchart. The operation process is as follows: Figure 3 As shown in the diagram, the final flowchart visually displays the execution order of all steps, branch decision points (diamond nodes), and loop recursion paths.
[0052] (b4) Serialize the final logical diagram model into JSON format for storage.
[0053] At this point, the extracted structured data can be automatically converted into an executable logic diagram containing steps, branches, and loops, and an enhanced graph layout algorithm is used to present a clear and standardized visualization, which greatly improves the logical readability and execution guidance of the procedure, thereby realizing the automatic conversion of structured text procedures into intelligent visual logic diagrams.
[0054] S3. Precise mapping of equipment tag numbers and real-time data integration.
[0055] First, perform the bit mapping as follows: (c1) For the tag number PRSA_1n01 (encoding) and “Second Zone Main Pipe Pressure” (name) extracted from the procedure, call the external tag number mapping algorithm of S14.
[0056] (c2) Encoding matching: Calculate the edit distance similarity between PRSA_1n01 and DCS position number PRSA-1N01.PV, with a score of 0.92 (high score).
[0057] (c3) Name matching: The semantic similarity between "zone 2 main pipe pressure" and "zone 2 main pipe pressure value" was calculated using the KCTSM algorithm. No core keyword conflicts were found at the rule layer, and the cosine similarity calculated by BERT at the semantic layer was 0.97.
[0058] The overall scores were all higher than the threshold (0.85), and the system automatically established a precise mapping and recorded it in the "Procedure-DCS Tag Mapping Table".
[0059] Then, perform real-time data connection operations: (d1) The system, acting as an OPC UA client, establishes a secure connection with the DCS server.
[0060] (d2) Subscribe to the real-time data of bit number PRSA-1N01.PV according to the mapping table, and set the collection period to 1 second.
[0061] (d3) Real-time data is cached in the system data pool.
[0062] At this point, the generated electronic procedure logic diagram can be linked with the DCS system, enabling the procedure steps to be automatically judged and advanced based on real-time data, upgrading from a static document to a dynamic execution program. This achieves deep real-time integration of procedures and production control. Furthermore, through domain-enhanced fine-tuning, the accuracy of procedure logic recognition has been improved to over 94%. Moreover, through a dedicated mapping algorithm, a high success rate of automatic association between equipment tag numbers and the DCS system has been achieved, ultimately significantly improving the parsing and mapping accuracy of complex industrial texts.
[0063] S4. Intelligent execution of procedures and verification against human error.
[0064] Simulate a procedure execution process where the operator handles pressure anomalies under system guidance: L1. Execute Step 1 (Preparation Phase): After the system verifies that there are no preconditions, the operator is allowed to confirm and execute.
[0065] L2. Execute Step 2 (conditional judgment): The system automatically reads the real-time value (38.5 torr) of PRSA-1N01.PV from the data pool.
[0066] (e1) False judgment verification: The system analyzes the Step2 condition "pressure < 10 torr", compares the real-time value of 38.5 with the threshold of 10, and the result is False.
[0067] (e2) The system prevents the operator from incorrectly executing subsequent steps under this branch and highlights the message "Condition not met".
[0068] (e3) At the same time, the system automatically recommends and navigates to the branch where the condition is true—Step8 (pressure relief operation) based on the parsed jump logic.
[0069] L3. Execute Step 8 (Execution-type operation): (f1) Pre-execution verification: The system checks all safety prerequisites of Step 8 (such as the status of relevant valves and interlock protection). Once all conditions are met, the "execute" button is unlocked.
[0070] (f2) Execution verification: The operator needs to input the pressure relief valve opening value. The system verifies whether the input value is within the design allowable range (e.g., 0%-100%) to prevent over-limit settings.
[0071] (f3) Post-execution verification: After the operator confirms the execution, the system immediately obtains the opening feedback value of the pressure relief valve in real time through the DCS, and continuously monitors whether the feedback value reaches the set opening required by the instruction and remains stable within a preset time. After the system confirms that the valve has acted accurately and reliably, it determines that this step has been executed effectively, automatically records the completion, and proceeds to the next step.
[0072] L4. Full Process Recording: The system generates an unalterable electronic operation ticket, which fully records the executor, time, real-time data snapshots used, verification results, and final status of each step.
[0073] In summary, the above operations construct an embedded intelligent error prevention system. Through multi-level real-time verification before, during, and after execution, it can effectively intercept human errors such as misreading, missing steps, and misoperation, significantly improving the inherent safety of the operation. It also achieves full automation of the structured procedures, replacing the traditional cumbersome and error-prone manual sorting, and efficiently transforming paper or static electronic documents into maintainable and executable structured data.
[0074] In another aspect, the present invention also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the method described above.
[0075] In another aspect, the present invention also discloses a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the method described above.
[0076] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the electronic procedure system implementation methods based on a large language model in the above embodiments.
[0077] It is understood that the system provided in the embodiments of the present invention corresponds to the method provided in the embodiments of the present invention, and the explanation, examples and beneficial effects of the relevant content can be referred to the corresponding parts of the above methods.
[0078] This application also provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, communication interface, and memory communicate with each other via the communication bus. Memory, used to store computer programs; When the processor executes the program stored in the memory, it implements the above-mentioned method for implementing an electronic procedure system based on a large language model.
[0079] The communication bus mentioned in the above-mentioned electronic devices can be a standard bus for interconnecting peripheral components or an extended industrial standard structure bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc.
[0080] The communication interface is used for communication between the aforementioned electronic devices and other devices.
[0081] The memory may include random access memory or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0082] The processors mentioned above can be general-purpose processors, including central processing units, network processors, etc.; they can also be digital signal processors, application-specific integrated circuits, field-programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0083] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium, an optical medium, or a semiconductor medium, etc.
[0084] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
[0085] Furthermore, it should be noted that if any directional indication (such as up, down, left, right, front, back, etc.) is involved in the embodiments of the present invention, the directional indication is only used to explain the relative positional relationship and movement of each component in a specific posture. If the specific posture changes, the directional indication will also change accordingly.
[0086] Furthermore, if the embodiments of this invention involve descriptions such as "first" or "second," these descriptions are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the meaning of "and / or" throughout the text includes three parallel solutions; for example, "A and / or B" includes solution A, solution B, or a solution where both A and B are satisfied simultaneously. Furthermore, in the embodiments of this invention, "multiple" refers to two or more. Moreover, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by this invention.
Claims
1. A method for implementing an electronic procedure system based on a large language model, characterized in that, include: S1. Use industry domain knowledge to pre-train and enhance a set of large language models, and use the enhanced large language models to parse the procedure documents in order to identify and extract structured procedure data, including step information, equipment tag number, logical relationship, execution conditions and safety constraints. S2. Based on the extracted structured procedure data, construct an executable electronic procedure logic diagram, wherein the logic diagram includes step nodes, conditional branch edges, and execution paths; S3. Associate and map the equipment tag number in the structured procedure data with the DCS system, and obtain the measured value of the equipment tag number in real time through the industrial communication protocol; S4. During the execution of electronic procedures, a human error prevention verification is performed based on the execution conditions of the current step and real-time DCS data. The next step is only allowed to be executed if the verification passes.
2. The method for implementing an electronic procedure system based on a large language model as described in claim 1, characterized in that, The specific operational procedures for pre-training and enhancing the large language model in S1 include: S11. Construct, train, and validate datasets to build a set of step jump instances for each sample representing a procedure, including input and output information. The datasets take the current step description, historical step description, and procedure context information as input information and output the target step number or jump instruction. S12. Supervised fine-tuning using industry procedure data is used to adapt a general large model to a procedure parsing model for a vertical domain, enabling it to predict the next step based on the current step and context. S13. Based on the scenario of parsing the new engineering procedure, a set of dedicated instructions is constructed to guide the large model step by step to complete the specified operations of the new procedure and output the final structured data. S14. The similarity between the Chinese terms in the procedure and the Chinese terms in the DCS is calculated by setting an external tag number mapping algorithm, and the accuracy of similarity calculation is improved by using a two-layer semantic matching algorithm with keyword constraints.
3. The method for implementing an electronic procedure system based on a large language model as described in claim 1, characterized in that, The electronic procedure logic diagram in step S2 includes: Step nodes are used to represent the basic operation units in the procedure, and each node has a unique attribute. The type of the node is inherited from the semantic type system defined by the dedicated instruction set in S13, including execution nodes, judgment nodes, waiting nodes, and monitoring nodes. Execution path directed edges are directed line segments used to connect two step nodes to represent the default, unconditional sequential execution relationship; Conditional branch edges are set as a special type of directed edge, used to derive from the decision node. Each edge is bound to an explicit Boolean expression as a transition condition. The Boolean expressions on the edges directly encode the key decision logic in the procedure.
4. The method for implementing an electronic procedure system based on a large language model as described in claim 2, characterized in that, The construction process of the electronic procedure logic diagram in step S2 includes: Traverse the input structured data and perform initialization. In node creation, for each identified operation unit, instantiate a corresponding step node object based on its attributes and fully populate its node attributes. When connecting edges, create a preliminary directed connection between nodes based on the next step relationship clearly defined in the data. For sequential relationships, create directed edges for execution paths. For branches originating from Condition type nodes, create two conditional branch edges and bind them to Boolean conditional expressions parsed from the data. Detect the existence of semantics such as "return to step X" or "repeat execution until condition Y is satisfied". When such intents are identified, create a back edge in the graph from the current node to the target step node, forming a directed cycle. The transition condition of this edge is set as the maintenance condition of the cycle. Create a parallel start point and generate a virtual "parallel start" node to establish parallel branches. Draw two or more connections from the "parallel start" node, which point to the start node of each parallel task. At this time, set up a synchronization mechanism so that after each parallel task is completed, its final node points to the same "parallel end" node. An efficient graph layout algorithm is used to intelligently arrange the node positions during the graph generation process; Finally, the verified complete logical diagram model containing optimized layout information is serialized into a system-readable JSON format for persistent storage.
5. The method for implementing an electronic procedure system based on a large language model as described in claim 4, characterized in that, In the process of intelligently arranging node positions in the graph layout algorithm, the Dagre enhanced layout algorithm based on domain semantics is used. The implementation steps of this algorithm are as follows: Domain knowledge-guided ring decomposition strategy: Based on the analysis of step semantic types, execution order and jump logic stored in the S13 dedicated instruction set, the specific semantic patterns of loop structures in industrial procedures can accurately identify the "loop backflow edges" that constitute the loop. During the layout calculation stage, these backflow edges are temporarily removed, and the original cyclic graph is converted into a temporary acyclic graph, thereby adapting to the application premise of the Dagre algorithm. Phased processing mechanism: In the first phase, the standard Dagre algorithm is applied to the transformed acyclic backbone to make full use of its hierarchical optimization capabilities and generate a backbone structure with a clear layout. In the second phase, the cyclic edges are restored and differentiated visual encoding and local routing optimization are adopted to present the cyclic logic completely while maintaining the overall layout cleanliness.
6. The method for implementing an electronic procedure system based on a large language model as described in claim 5, characterized in that, The segmented processing mechanism involves the following steps during segmented execution: The first phase involves the following steps: Step 1: Node layering: Use the longest path layering method to distribute nodes to multiple layers. Specifically, place nodes without incoming edges in the first layer, and then place subsequent nodes in the layer below the layer of their predecessor nodes. If a node has multiple predecessors, place it in the layer with the maximum layer number plus one. Step 2: Node sorting within the same layer: Adjust the node order within the same layer to minimize edge crossings. In this case, the median method or the greedy swap method can be used. Step 3: Coordinate Assignment: Calculate the precise coordinates (x, y) of each node based on its level and order within the level. The second phase involves the following steps: Step 1: Restore edges: Add the previously temporarily removed loop backflow edges back to the graph; Step 2 Curve Routing: For each loop backflow edge, instead of using straight lines, a Bézier curve is used for drawing. The control points of the Bézier curve are dynamically calculated based on the positions of the source and target nodes to form a smooth arc, avoiding intersections with other nodes and edges.
7. The method for implementing an electronic procedure system based on a large language model as described in claim 2, characterized in that, In the process of association mapping in S3, a procedure-DCS tag mapping table is generated and maintained using the algorithm calculation results of the external tag mapping algorithm in S14 as the core configuration. The standard OPC UA protocol is used as the real-time data channel, wherein: The OPC UA protocol, as an OPC UA client, is used to establish a secure session with the DCS server; The OPC UA protocol also subscribes to real-time data of relevant measurement points from the DCS based on the tag mapping table; The collected real-time values, timestamps, and quality status are all cached in the system's real-time data pool, providing data support for each subsequent step of the procedure.
8. The method for implementing an electronic procedure system based on a large language model as described in claim 7, characterized in that, The specific implementation methods of the human error prevention verification process in S4 include: Before executing any step, first parse the structured execution conditions defined in the current step node, and extract the DCS bit number, comparison operator (such as >) and threshold from the conditions; The real-time data channel based on OPC UA established through S3 can instantly obtain the current measurement value, timestamp, and data quality status of the extracted device tag number. The data obtained above was validated using a multi-level validation framework. The system automatically records the complete digital footprint of the procedure execution, forming an unalterable and traceable electronic operation ticket.
9. The method for implementing an electronic procedure system based on a large language model as described in claim 8, characterized in that, The specific verification methods used by the multi-level verification framework for data verification include: Before a step is allowed to be executed, all preconditions of the node are automatically checked. The preconditions are logical expressions based on real-time DCS data. Only when all preconditions are "true" at the same time will the permission to execute the subsequent steps be unlocked. During execution, for operations that require setting parameters, the parameter values entered by the operator are verified to determine whether they are within the allowed range, in order to prevent setting limits beyond the limit; After the operation command is issued, the feedback of the relevant DCS tag number is continuously monitored, the actual feedback value is compared with the expected output defined in the step node, and it is confirmed within a preset time whether they are consistent. Only when the operation effect is confirmed to meet the expectations will the step be recorded as completed and the process be allowed to proceed.
10. A computer device, characterized in that, It includes a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method as described in any one of claims 1 to 9.