Automatic OPC UA information model construction method based on knowledge graph and large language model

By combining knowledge graphs and large language models, the automation challenge in OPC UA information model construction was solved, realizing an efficient and interpretable automatic construction process from unstructured text to standardized models, thus improving modeling efficiency and result credibility.

CN121998066APending Publication Date: 2026-05-08INST OF IND INTERNET CHONGQING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 1 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
INST OF IND INTERNET CHONGQING UNIV OF POSTS & TELECOMM
Filing Date
2026-01-22
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing technologies rely on manual operations by domain experts when building OPC UA information models, which is inefficient and prone to errors. They are also difficult to handle unstructured text, and the output of large language models is unstable in industrial applications. They lack domain common sense constraints and cannot achieve end-to-end automatic construction from unstructured text to standardized models.

Method used

By combining knowledge graphs and large language models, semantic parsing, real-time semantic enhancement, similarity calculation and evaluation of unstructured industrial text are performed to generate a tree-like hierarchical framework. The structural integrity is then verified, and the model is finally converted into XML syntax format to achieve automated compliance verification and repair.

Benefits of technology

It enables end-to-end automated construction of standardized OPC UA information models from unstructured text, improving modeling efficiency by an order of magnitude and ensuring that the models conform to domain standards and industry best practices, with interpretability and high transparency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121998066A_ABST
    Figure CN121998066A_ABST
Patent Text Reader

Abstract

The invention provides an OPC UA information model automatic construction method based on a knowledge graph and a large language model. The method comprises the steps of obtaining an unstructured industrial text, performing semantic analysis on the unstructured industrial text, and extracting a main body entity, an object entity, a method entity and attribute information thereof according to a predefined hierarchical tuple structure; calling an industrial field knowledge graph in real time to perform semantic enhancement on an extraction result; performing similarity calculation and evaluation on an enhanced result, and performing information fusion and duplicate removal based on a similarity evaluation result to obtain an entity-attribute set; generating a tree-shaped hierarchical structure framework by using a large language model, and calling a knowledge graph to perform structural integrity verification; semantic association between the entity-attribute set and the tree structure framework is analyzed, attributes and methods are mapped to corresponding structure nodes, and a mapping reasoning process is output in a natural language form; converting the mapped model structure into a format of XML (Extensive Makeup Language) grammar, and executing automatic compliance check and repair; by designing a progressive task chain of information extraction, semantic fusion, model construction, interpretable mapping and standardized output, a set of complete understanding-enhancement-construction-verification automation system is constructed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of industrial internet and artificial intelligence technology, specifically to an automatic construction method for OPC UA information models based on knowledge graphs and large language models. Background Technology

[0002] In the context of Industry 4.0 and smart manufacturing, achieving semantic interoperability between equipment and systems is crucial. The Open Platform Communication Unified Architecture (OPC UA), as a core standard, provides the semantic foundation for describing equipment capabilities, states, and relationships through its information model. Currently, the construction of OPC UA information models heavily relies on manual work by domain experts, a tedious and error-prone process. Experts must manually interpret heterogeneous data from multiple sources, including equipment manuals, protocol specifications, and database table structures, which is not only inefficient and costly but also leads to inconsistencies and standardization in model naming, data types, and referencing relationships. While some existing automated tools generate models from structured data (databases, tag tables), they lack effective processing capabilities for the large amount of unstructured text (technical documents, maintenance logs) that constitute the majority of knowledge, failing to extract deep semantic information. In recent years, knowledge graph technology has been introduced into the industrial field to organize knowledge, but it is mainly used for post-model validation or graph construction based on existing structured models, failing to solve the "cold start" problem from raw unstructured descriptions to initial model generation. Meanwhile, while large language models demonstrate powerful natural language understanding and generation capabilities, their direct application in constructing rigorous industrial information models presents challenges such as unstable output, lack of domain-specific knowledge constraints, and difficulty in ensuring compliance with industry standards and specifications. Therefore, deeply integrating the semantic understanding capabilities of large language models with the domain-specific norms of knowledge graphs to achieve end-to-end automated construction from unstructured text to standardized OPC UA information models has become a key technological bottleneck for improving industrial interoperability and accelerating digital transformation. Summary of the Invention

[0003] To address the problems existing in the prior art, this invention proposes an automatic construction method for OPC UA information models based on knowledge graphs and large language models. This method includes: acquiring unstructured industrial text; performing semantic parsing on the unstructured industrial text; extracting main entities, object entities, method entities, and their attribute information according to a predefined hierarchical tuple structure; performing semantic enhancement on the extracted results by real-time invocation of an industrial domain knowledge graph; calculating and evaluating the similarity of the enhanced results; fusing and deduplicating information based on the similarity evaluation results to obtain an entity-attribute set; generating a tree-like hierarchical framework using a large language model; performing structural integrity verification by invoking the knowledge graph; analyzing the semantic relationships between the entity-attribute set and the tree-like framework; mapping attributes and methods to corresponding structural nodes; generating natural language explanations for each mapping decision; converting the mapped model structure into XML syntax format; and performing automated compliance verification and repair.

[0004] The beneficial effects of this invention are:

[0005] This invention innovatively introduces a real-time semantic enhancement and verification mechanism from knowledge graphs into the multi-stage reasoning process of a large language model, automatically transforming unstructured text descriptions into model components rich in standard semantics, thus overcoming the core challenge of converting natural language into formal information models. By designing a progressive task chain of information extraction, semantic fusion, model construction, interpretable mapping, and standardized output, a complete automated "understanding-enhancement-construction-verification" system is constructed. This system not only ensures the completeness of information extraction through deep semantic understanding of the large language model, but also fundamentally guarantees that the generated model strictly conforms to domain standards and industry best practices in entity naming, data types, and structural relationships through the full intervention of knowledge graphs. Particularly noteworthy is that this invention, by forcing the generation of natural language reasons for mapping decisions, makes the automated process interpretable and highly transparent, significantly improving the credibility and acceptability of the results. Ultimately, this invention achieves end-to-end one-click generation from text to standard models, improving modeling efficiency by an order of magnitude, and providing a reliable and efficient foundational tool for the rapid digitization and semantic interconnection of various industrial equipment with a general framework independent of specific domains. Attached Figure Description

[0006] Figure 1 This is a schematic diagram of the overall process of the OPC UA information model automatic construction method based on knowledge graph and large language model described in this invention;

[0007] Figure 2 This is a schematic diagram illustrating the real-time enhancement of semantic extraction results using a knowledge graph in this invention.

[0008] Figure 3This is a schematic diagram illustrating interpretability attribute mapping in this invention;

[0009] Figure 4 This is a schematic diagram of the data structure showing the morphological evolution of information during the construction process in this invention;

[0010] Figure 5 This is a schematic diagram illustrating the complete process of building an information model for a numerically controlled machine tool (CNC) in one embodiment of the present invention. Detailed Implementation

[0011] 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 embodiments of the present invention, and not all embodiments. 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.

[0012] An automatic construction method for OPC UA information models based on knowledge graphs and large language models includes: acquiring unstructured industrial text; performing semantic parsing on the unstructured industrial text; extracting main entities, object entities, method entities, and their attribute information according to a predefined hierarchical tuple structure; performing semantic enhancement on the extracted results by real-time invocation of an industrial domain knowledge graph; calculating and evaluating the similarity of the enhanced results; fusing and deduplicating information based on the similarity evaluation results to obtain an entity-attribute set; generating a tree-like hierarchical framework using a large language model; performing structural integrity verification by invoking the knowledge graph; analyzing the semantic association between the entity-attribute set and the tree-like framework; mapping attributes and methods to corresponding structural nodes; generating natural language explanations for each mapping decision; converting the mapped model structure into XML syntax format; and performing automated compliance verification and repair.

[0013] Figure 1This is a schematic diagram of the overall process of the OPC UA information model automatic construction method based on knowledge graphs and large language models described in this invention. As shown in the figure, the method includes: a semantic extraction and knowledge enhancement module, an iterative optimization and semantic fusion module, a structural modeling and verification module, an association tracing and interpretable mapping module, and a standardized coding and compliance repair module. The semantic extraction and knowledge enhancement module, as the starting point of the process, receives unstructured industrial text as input and extracts initial entities, attributes, and relation tuples through its built-in large language model reasoning unit. The core knowledge graph enhancement unit of the module, based on a predefined industrial domain knowledge graph, performs entity standardization linking, attribute definition completion, and data type recommendation on the extracted tuples to generate semantically enhanced standardized tuples. The iterative optimization and semantic fusion module receives the initial and re-extracted tuples, and through its internal multi-round comparison and fusion unit, calls the knowledge graph service to calculate semantic similarity, performs information deduplication and completion, and outputs a complete entity-attribute set. The structural modeling and verification module, based on the core entities in the entity-attribute set, constructs a preliminary OPC UA model tree framework using a large language model. Its integrated knowledge graph verification unit verifies the integrity of the framework based on the device type ontology and suggests adding typical component nodes, forming an enhanced model framework. The association tracing and interpretable mapping module receives the entity-attribute set and the enhanced model framework, analyzes semantic relationships using the large language model, precisely assigns each attribute to the corresponding node in the framework, and forces the generation of a traceable natural language explanation for each assignment decision, forming a fully mapped and interpretable model. The standardization coding and compliance repair module ultimately converts the complete model into a standard OPC UA node set XML format and automatically repairs the data type consistency, naming conventions, and structural integrity of the XML file using its built-in syntax and rule verification engine, outputting a final model file that can be directly deployed. The entire process, through the close collaboration between the serial reasoning of the large language model and the deep enhancement of the knowledge graph, achieves end-to-end automatic construction from unstructured text to a standardized information model.

[0014] The industrial knowledge graph described in this invention adopts a hierarchical structured design and includes the following four core components:

[0015] (1) Equipment Category Ontology: Defines a standard classification system for industrial equipment, including CNC machine tools (CNC_Machine), industrial robots (Industrial_Robot), programmable logic controllers (PLC), servo drive systems (Servo_Drive), sensors (Sensor), conveyor systems (Conveyor_System), injection molding machines (Injection_Molding_Machine), welding equipment (Welding_Equipment), etc. Each equipment category includes a standard name, semantic definition, a list of typical components, a set of standard attributes, and a set of commonly used methods. For example, the CNC Machine category defines its typical components, including the control system, spindle system, axis system, tool magazine, cooling system, safety system, and measurement system; its standard attribute set includes maximum machining diameter, maximum machining length, spindle speed, positioning accuracy, repeatability, tool capacity, rapid traverse speed, and spindle power; its commonly used methods include start program, stop program, tool change, zero point setting, and emergency stop.

[0016] (2) Attribute standardization mapping table: Establish a mapping relationship from non-standard attribute descriptions to OPC UA standard attribute names, and associate recommended data types with engineering units. For example, map the Chinese descriptions "Load capacity", "Bearing capacity", and "Load" to the standard attribute name "Load_Capacity", and associate the data type ua:Double with the unit kg.

[0017] (3) Data type inference rule base: Data type inference rules are defined based on keyword features of attribute names. For example, attributes containing keywords such as "precision", "speed", "range", and "power" are recommended to use the ua:Double type; attributes containing keywords such as "rotation speed", "quantity", and "capacity" are recommended to use the ua:UInt32 type; and attributes containing keywords such as "model", "system", and "name" are recommended to use the ua:String type.

[0018] (4) Component-Attribute Attribution Matrix: Defines the attribution relationships between equipment components and their typical attributes, used to guide decisions in the attribute mapping stage. For example, typical attributes of the spindle system include spindle speed, spindle power, and spindle torque; typical attributes of the axis system include number of axes, positioning accuracy, and repeatability.

[0019] This invention designs dedicated structured prompt templates for each processing stage, and each template follows a unified three-part structure:

[0020] (1) Entity extraction prompt template: Define the role of the large language model as "information extractor", which is required to extract and output a list of tuples in a specific JSON format from the input text. Each tuple contains a SubjectEntity entity and its subordinate ObjectEntity entities and MethodEntity entities. Each entity must contain fields such as Name, Definition, Type, Data, and DataType.

[0021] (2) Evaluation of fusion prompt word template: Define the role of the large language model as "evaluator", which is required to compare the entity similarity in two sets of tuples, merge dissimilar entities into the baseline tuple, and keep the original structure unchanged.

[0022] (3) Pattern generation prompt word template: Define the role of the large language model as "industrial automation expert", and require that based on the input core entity name, generate a tree-like hierarchical structure that conforms to the OPC UA information model specification, and output a JSON pattern structure containing the MetaSubjectEntity meta-subject and its Children child nodes.

[0023] (4) Synchronous reasoning prompt word template: Define the role of the large language model as "OPC UA advanced modeling expert", which requires analyzing the semantic relationship between the attributes and nodes in the pattern structure, determining the attribution node for each attribute, and forcing the generation of one or two natural language explanations for each attribution decision.

[0024] (5) Format conversion prompt template: Define the role of the large language model as "data conversion expert", requiring the conversion of the complete model structure in JSON format into XML format that conforms to the OPC UA standard, and outputting XML document fragments containing elements such as ObjectType, Object, Property, Method, etc.

[0025] In the model construction process of this invention, information undergoes the evolution of the following four data structure forms:

[0026] (1) Tuples: The output format of the entity extraction stage. It adopts a nested JSON structure with a top-level array of tuples. Each array element contains a SubjectEntity and its Children subarray. Children contains ObjectEntity and MethodEntity objects.

[0027] (2) Schema: The output format of the model framework construction phase. The top layer is the schema object, which contains the MetaSubjectEntity metabody. The Children array of the metabody contains SubjectEntity component objects, and each component can further contain MethodEntity method nodes.

[0028] (3) Reasons: The output format of the attribute mapping stage. The top layer is the reasons array. Each element records the mapping decision of an attribute or method, including Name (original name), Definition (definition), IsBelongTo (belonging node name), and Reason (natural language explanation).

[0029] (4) XML node set structure: The final output format conforms to the OPC UA ModelDesign XML Schema specification, including Namespaces namespace declaration, ObjectType object type definition, and nested Object, Property, and Method child elements. Each element is uniquely identified by the SymbolicName attribute.

[0030] This invention performs the following compliance checks and automatic repair operations during the model standardization phase:

[0031] (1) Data type consistency check: Check whether the namespace of the DataType attribute declaration matches the namespace of the DefaultValue sub-element. For example, when DataType is "ua:Double", DefaultValue must use the "uax:Double" tag instead of the "uax:UInt32" or "uax:String" tag. When a mismatch is detected, the default data format is automatically converted according to the DataType declaration and the tag is corrected.

[0032] (2) Symbol name uniqueness check: Traverse the SymbolicName attribute of all Property and Method elements in the model to check for duplicate names; when a duplicate is detected, retain the first element that appears, remove the subsequent duplicate elements, and record the removal operation in the log.

[0033] (3) Naming standardization: Convert all SymbolicName attribute values ​​to PascalCase naming convention, remove illegal characters such as spaces and underscores, and ensure that the first letter is capitalized and the first letter of each word is capitalized.

[0034] (4) Name conflict resolution: When it is detected that the SymbolicName of a child element is the same as that of the parent element (the Object is named "ControlSystem" and its Property is also named "ControlSystem"), the type suffix (changed to "ControlSystemModel") is automatically added to the SymbolicName of the child element to eliminate ambiguity.

[0035] (5) Empty node completion: When it is detected that the Object element does not contain any Children child elements, the default Property or Method child nodes are automatically suggested or supplemented based on the typical properties of the component in the knowledge graph.

[0036] This invention combines the deep semantic understanding capabilities of large language models, the domain-specific constraints of knowledge graphs, and hierarchical automatic reasoning processes to achieve end-to-end intelligent construction of industrial equipment descriptions from unstructured text to standardized, interoperable information models. It has advantages such as automatic conversion, semantic accuracy, and interpretable process, and is suitable for core industrial internet scenarios such as equipment digital archiving, rapid system integration, and intelligent operation and maintenance knowledge base construction.

[0037] like Figure 2 As shown, the knowledge graph enhancement process is performed according to the following steps:

[0038] Step 1: Receive preliminary semantic extraction results. The system receives initial tuples generated from the large language model after preliminary parsing of unstructured industrial text. These tuples contain entity names, attribute key-value pairs, and their original descriptions identified from the text, constituting the semantic material to be enhanced.

[0039] Step Two: Perform Entity Linking and Standardization. Based on the entity names and descriptions in the initial tuples, the system performs matching and querying within a pre-built industrial domain knowledge graph. Through the graph's entity library and thesaurus, common names, model numbers, or abbreviations in the text (such as "Siemens 840D SL") are linked and mapped to standard domain terms (such as "CNC_ControlSystem"), while also associating them with their parent concepts and core definitions.

[0040] Step 3: Perform attribute completion and semantic normalization. Based on the attribute keywords in the initial tuples, the system searches the attribute definition library of the knowledge graph. It completes the attributes with full and standardized technical definitions and normalizes any diverse expressions into a unified attribute name. For example, "maximum spindle speed" is normalized to the standard attribute name "MaxSpindleSpeed" and associated with its explicit definition.

[0041] Step 4: Inferring the relationship between data types and suggested structures. Based on the numerical context and unit corresponding to the attribute, and combined with the data type mapping rules in the knowledge graph, the system infers and labels the standardized OPC UA data type (ua:Double) that the attribute should adopt. Simultaneously, based on the inherent relationships between devices and components in the domain ontology, it proactively suggests relevant component nodes that should be added to the model framework (e.g., suggesting adding the "ToolMagazine" component for "CNC_Machine").

[0042] Through the above steps, this invention achieves automatic conversion and enhancement from vague and non-standard text descriptions to precise and standardized semantic modeling elements, fundamentally eliminating semantic ambiguity caused by inconsistent terminology, and providing a reliable and consistent knowledge foundation for the subsequent automated construction of high-quality OPC UA information models that conform to domain standards.

[0043] Figure 3 This is a schematic diagram illustrating interpretability attribute mapping in this invention. The method includes:

[0044] Step 1: Receive the data to be mapped and the model framework. The system simultaneously receives the standardized complete set of attributes (such as `SpindleSpeed: 12000rpm`) from the semantic fusion stage, and the enhanced model tree structure framework (containing nodes such as `CNC_Machine`, `Spindle`, and `ToolMagazine`) from the structure verification stage.

[0045] Step 2: Analyze semantic relationships and execute mapping decisions. For each attribute item, the large language model analyzes the semantic relationship between its definition and the definitions of each node in the model framework. Based on inclusion relationships or functional attribution, it makes inferences and judgments to accurately assign the attribute to the most matching parent node (e.g., mapping the "spindle speed" attribute to the "Spindle" object node).

[0046] Step 3: Generate an explanation for each mapping decision. For each mapping decision in Step 2, the large language model must generate a corresponding natural language explanation, stating the basis for the allocation (e.g., "`SpindleSpeed` is a key parameter describing the core performance of the `Spindle` component, therefore logically it belongs to this component"). This explanation is saved as metadata along with the mapping relationship.

[0047] Step 4: Complete and output an interpretable full model. Once all attributes have been mapped and justified, the system generates a complete information model structure with clearly defined node relationships and traceable explanations for each attribute attachment, which serves as input for the next stage of format conversion.

[0048] Through the above process, this invention transforms the traditional "black box" automated mapping into a transparent and auditable decision-making process. Each attribute's affiliation to a particular node is supported by clear technical justification, which greatly enhances the credibility and acceptability of the automated modeling results. This provides a solid foundation for manual review, model debugging, and knowledge traceability, and is a key innovative step in ensuring model quality and the reliability of the construction process.

[0049] like Figure 4 As shown, the evolution of the information form unfolds in the following four stages:

[0050] Phase 1: From Unstructured Text to Preliminary Structured Tuples. The system receives input unstructured industrial text and, through initial extraction by a large language model, transforms it into preliminary structured data tuples. These tuples are organized as lists or key-value pairs, containing the original entity names, attribute key-value pairs, and loose relationships identified from the text, completing the initial conversion of information from natural language description to a machine-readable format.

[0051] Phase Two: From Standardized Tuples to Knowledge-Enhanced Semantic Graphs. The system invokes the knowledge graph to enhance the initial tuples, generating a standardized semantic graph structure. In this form, entities are linked to standard terms, attributes are accompanied by precise definitions and recommended data types, and relationships between entities are clarified and expanded through the graph ontology. This form is represented in JSON-LD or attribute graph format, achieving an upgrade of information from "readable" to "semantically understandable."

[0052] Phase Three: From Semantic Graph to Hierarchical Model Framework. Based on the core entities in the semantic graph, the system constructs a tree-like hierarchical framework conforming to the OPC UA metamodel. This framework defines object types (ObjectType), objects (Object), and the containment (HasComponent) reference relationships between them, forming the skeleton structure of the information model. The domain ontology provided by the knowledge graph is integrated into this framework, ensuring its structural integrity and standardization.

[0053] Phase Four: From Complete Model to Standardized Coded File. The system converts the complete model, with all attributes and methods mounted and interpretable mappings completed, into a NodeSet document that fully conforms to the OPC UA XML Schema definition. This final form is a standard XML file containing complete namespace declarations, node definitions, and reference relationships, which can be directly loaded and used by the OPC UA server.

[0054] The output of information through the above four key stages demonstrates the complete transformation path of information from raw text to rigorous standard technical specification documents.

[0055] Figure 5 This is a schematic diagram illustrating the complete process of constructing an information model from a description text of a CNC machine tool, as shown in one embodiment of the present invention. The specific construction process is performed according to the following steps:

[0056] Step 1: Input Unstructured Technical Text. The system receives unstructured English technical description text about the "Siemens 840D SL CNC Machine" as input. This text includes technical parameters and functional descriptions such as the control system model, spindle speed, positioning accuracy, and tool magazine capacity.

[0057] Step Two: Perform semantic extraction and knowledge enhancement. The large language model parses the input text, initially extracting key entities and attributes such as "ControlSystem", "MaxMachiningDiameter", and "SpindleSpeed". Simultaneously, the knowledge graph service enhances the extraction results: it links "Siemens 840D SL" to the standard entity "CNC_ControlSystem"; it completes the definition for "MaxMachiningDiameter"; and based on the value "12000rpm", it recommends the data type of "SpindleSpeed" as `ua:Double`.

[0058] Step 3: Generate and validate the model structure framework. The large language model, centered on "CNC_Machine," generates a structural framework containing preliminary objects such as "ControlSystem," "Spindle," and "AxisSystem." The knowledge graph is then validated based on the domain ontology, and suggestions are made to add two typical component nodes, "ToolMagazine" and "CoolantSystem," to form a complete model structure framework.

[0059] Step 4: Perform interpretable attribute mapping. The large language model precisely maps the enhanced attribute set to the corresponding nodes in the structural framework. For example, it maps "SpindleSpeed: 12000rpm" to the "Spindle" node and "ToolMagazineCapacity: 24" to the "ToolMagazine" node. The system forces the generation of natural language explanations for each mapping, such as "spindle speed is the core performance parameter of the spindle" and "tool magazine capacity is a key attribute of the tool magazine."

[0060] Step 5: Output standardized OPC UA model file. The system converts the complete mapped model structure into a NodeSet file conforming to the OPC UA XML Schema. During this process, the system automatically performs compliance fixes to ensure data type matching, symbol name standardization, and generates the final `CNC_Machine_Model.xml` file containing all necessary namespace declarations.

[0061] Through a complete example from specific text input to specific model file output, the connection and collaboration of each core stage in the method described in this invention are demonstrated sequentially, proving the feasibility and effectiveness of the method in automatically generating standardized, deployable OPC UA information models end-to-end from unstructured text.

[0062] The above-described embodiments further illustrate the purpose, technical solution, and advantages of the present invention. It should be understood that the above-described embodiments are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made to the present invention within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for automatically constructing an OPC UA information model based on knowledge graphs and large language models, characterized in that, include: Obtain unstructured industrial text, perform semantic parsing on the unstructured industrial text, and extract the main entity, object entity, method entity and their attribute information according to the predefined hierarchical tuple structure; The system performs semantic enhancement on the extracted results by calling the knowledge graph of the industrial domain in real time; it calculates and evaluates the similarity of the enhanced results, and performs information fusion and deduplication based on the similarity evaluation results to obtain the entity-attribute set; it generates a tree-like hierarchical framework using a large language model, and calls the knowledge graph to verify the structural integrity; it analyzes the semantic relationship between the entity-attribute set and the tree-like framework, maps attributes and methods to corresponding structural nodes, and outputs the mapping reasoning process in natural language form. The mapped model structure is converted into XML syntax format, and automated compliance checks and remediation are performed.

2. The method for automatically constructing an OPC UA information model based on knowledge graphs and large language models according to claim 1, characterized in that, The knowledge graph includes a device category ontology, an attribute standardization mapping table, a data type inference rule base, and a component-attribute relationship matrix.

3. The method for automatically constructing an OPC UA information model based on knowledge graphs and large language models according to claim 1, characterized in that, Semantic enhancement of the extracted results includes: entity standardization linking based on fuzzy matching algorithm, attribute definition completion, and recommendation of data types conforming to OPC UA specification based on attribute keywords and numerical features.

4. The method for automatically constructing an OPC UA information model based on knowledge graphs and large language models according to claim 1, characterized in that, The similarity calculation and evaluation of the enhanced results include: standard name matching and category classification of entities based on the knowledge graph; keyword extraction and stop word filtering of entity definitions; and calculation of semantic similarity between two entities using Jaccard similarity, with the following formula: ; Where A and B represent the sets of keywords for two entity definitions after stop word filtering, |A ∩ B| represents the number of elements in the intersection of the two sets, and |A ∪ B| represents the number of elements in the union of the two sets.

5. The method for automatically constructing an OPC UA information model based on knowledge graphs and large language models according to claim 1, characterized in that, The structural integrity verification of the knowledge graph includes: the knowledge graph identifies the missing parts of the current tree structure framework by matching predefined device type model templates or component pattern libraries, and actively suggests or automatically instantiates and inserts standardized component nodes, variable nodes or method nodes.

6. The method for automatically constructing an OPC UA information model based on knowledge graphs and large language models according to claim 1, characterized in that, Mapping attributes and methods to corresponding structural nodes includes: traversing all attribute entities and method entities in the entity-attribute set; using a large language model to analyze the semantic inclusion relationship between the definition of each attribute or method and the definition of each node in the tree structure framework; determining the node to which each attribute or method belongs based on semantic relevance and filling it into the child node list of the corresponding structural node; generating a natural language explanation for each attribution decision to describe the basis for the functional attribution between the attribute or method and the target node.

7. The method for automatically constructing an OPC UA information model based on knowledge graphs and large language models according to claim 1, characterized in that, Converting the mapped model structure to XML syntax involves: traversing all nodes in the mapped JSON model structure; converting meta-entities to ObjectType elements, component entities to Object elements, property entities to Property elements, and method entities to Method elements; populating the name, definition, data value, and data type of each entity into the SymbolicName, Description, DefaultValue, and DataType attributes of the XML elements; adding namespace declarations and document header information conforming to the OPC UA ModelDesign specification; and outputting a complete node set XML document.

8. The method for automatically constructing an OPC UA information model based on knowledge graphs and large language models according to claim 1, characterized in that, Automated compliance checks and remediation include: verifying the global uniqueness of the SymbolicName attribute within the model scope; verifying the consistency of the OPC UA namespace between the DataType attribute and the DefaultValue child element; converting non-standard names to PascalCase specification format; detecting and removing semantically duplicated attribute or method nodes; and outputting a standardized XML model file.

Citation Information

Cited By

  • An Automatic Generation Method for OPC UA Information Models Based on LLM Knowledge Completion

    CN122332480A