Search

CN-121998066-A - Automatic OPC UA information model construction method based on knowledge graph and large language model

CN121998066ACN 121998066 ACN121998066 ACN 121998066ACN-121998066-A

Abstract

The invention provides an OPC UA information model automatic construction method based on a knowledge graph and a large language model, which comprises the steps of obtaining an unstructured industrial text, carrying out semantic analysis on the unstructured industrial text, extracting a main entity, an object entity, a method entity and attribute information thereof according to a predefined hierarchical tuple structure, carrying out semantic enhancement on an extraction result by calling the knowledge graph of the industrial field in real time, carrying out similarity calculation and evaluation on the enhanced result, obtaining an entity-attribute set based on similarity evaluation result information fusion and deduplication, generating a tree hierarchical structure frame by using the large language model, calling the knowledge graph to carry out structural integrity check, analyzing semantic association between the entity-attribute set and the tree structural frame, mapping the attribute and the method to corresponding structural nodes, outputting a mapping reasoning process in a natural language form, converting a model structure which completes mapping into an XML grammar format, and executing automatic compliance check and restoration, and constructing a complete understanding-enhancement-construction-verification automation system through a progressive task chain of design information extraction, semantic fusion, model construction, interpretable mapping and standardized output.

Inventors

  • PU CHENGGEN
  • SU CHENGWEN
  • WANG PING
  • WEI MIN

Assignees

  • 重庆邮电大学工业互联网研究院

Dates

Publication Date
20260508
Application Date
20260122

Claims (8)

  1. 1. An OPC UA information model automatic construction method based on a knowledge graph and a large language model is characterized by comprising the steps of obtaining an unstructured industrial text, conducting semantic analysis on the unstructured industrial text, extracting a main entity, an object entity, a method entity and attribute information of the main entity, the object entity and the method entity according to a predefined hierarchical tuple structure, conducting semantic enhancement on an extraction result by calling the knowledge graph of an industrial field in real time, conducting similarity calculation and evaluation on the enhanced result, conducting fusion and deduplication on the basis of similarity evaluation result information to obtain an entity-attribute set, generating a tree hierarchical structure frame by using the large language model, calling the knowledge graph to conduct structural integrity verification, analyzing semantic association between the entity-attribute set and the tree structural frame, mapping the attribute and the method to corresponding structural nodes, outputting a mapping reasoning process in a natural language mode, converting a mapped model structure into an XML grammar format, and executing automatic compliance verification and restoration.
  2. 2. The method for automatically constructing an OPC UA information model based on a knowledge graph and a large language model according to claim 1, wherein the knowledge graph comprises a device class ontology library, an attribute standardization mapping table, a data type inference rule library, and a component-attribute attribution relation matrix.
  3. 3. The method for automatically constructing an OPC UA information model based on a knowledge graph and a large language model according to claim 1, wherein the semantic enhancement of the extracted result comprises entity standardized linking based on a fuzzy matching algorithm, attribute definition complementation, and recommending data types conforming to the OPC UA standard based on attribute keywords and numerical characteristics.
  4. 4. The automatic construction method of OPC UA information model based on knowledge graph and large language model according to claim 1, wherein the similarity calculation and evaluation of the enhanced result comprises the steps of performing standard name matching and category attribution judgment on the entity based on the knowledge graph, performing keyword extraction and deactivated word filtering on the entity definition, and calculating the semantic similarity between the two entities by adopting Jaccard similarity, wherein the calculation formula is as follows: ; Wherein A and B respectively represent two entity definition keyword sets filtered by the deactivated words, |A n B| represents the number of intersection elements of the two sets, and|A n B| represents the number of union elements of the two sets.
  5. 5. The method for automatically constructing an OPC UA information model based on a knowledge graph and a large language model according to claim 1, wherein invoking the knowledge graph for structural integrity verification comprises the knowledge graph identifying missing parts of the current tree structure frame by matching a predefined device type model template or a component model library, and actively suggesting or automatically instantiating insertion of standardized component nodes, variable nodes or method nodes.
  6. 6. The method for automatically constructing the OPC UA information model based on the knowledge graph and the large language model according to claim 1, wherein mapping the attributes and the methods to the corresponding structure nodes comprises traversing all attribute entities and method entities in an entity-attribute set, analyzing semantic inclusion relations between definitions of each attribute or method and definitions of each node in a tree structure frame by using the large language model, determining attribution nodes of each attribute or method based on semantic relevance and filling the attribution nodes into a sub-node list of the corresponding structure nodes, and generating natural language interpretation reasons for each attribution decision to describe functional attribution basis between the attribute or method and the target node.
  7. 7. The automatic construction Method of an OPC UA information model based on a knowledge graph and a large language model according to claim 1, wherein converting the model structure of which mapping is completed into an XML grammar format comprises traversing all nodes in the JSON model structure of which mapping is completed, converting a meta-body entity into ObjectType elements, converting a component entity into Object elements, converting an attribute entity into Property elements, converting a Method entity into Method elements, respectively filling names, definitions, data values and data types of the entities into SymbolicName, description, defaultValue and DataType attributes of the XML elements, adding a namespace declaration and document header information conforming to OPC UA ModelDesign specifications, and outputting a complete node set XML document.
  8. 8. The automatic construction method of the OPC UA information model based on the knowledge graph and the large language model according to claim 1 is characterized in that automatic compliance verification and restoration comprises verifying SymbolicName global uniqueness of attributes in a model range, verifying consistency of DataType attributes and OPC UA namespaces of DefaultValue subelements, converting nonstandard naming into PASCALCASE standard format, detecting and removing attribute nodes or method nodes with repeated semantics, and outputting standardized XML model files.

Description

Automatic OPC UA information model construction method based on knowledge graph and large language model Technical Field The invention relates to the technical field of industrial Internet and artificial intelligence, in particular to an OPC UA information model automatic construction method based on a knowledge graph and a large language model. Background In the industrial 4.0 and intelligent manufacturing contexts, it is critical to achieve semantic interoperability between devices and systems. An open platform communication unified architecture (OPC UA) is used as a core standard, and its information model is a semantic basis for describing device capabilities, states and relationships. The current OPC UA information model construction is seriously dependent on manual completion of field experts, and the process is tedious and very prone to error. The expert needs to manually read the multi-source heterogeneous data such as the equipment manual, the protocol specification, the database table structure and the like, which is low in efficiency and high in cost, and further causes that the consistency and standardization of the model are difficult to maintain in terms of naming, data types and quotation relations. Existing partially automated tools generate models from structured data (databases, tag tables), but lack efficient processing power for large amounts of unstructured text (technical documents, maintenance logs) occupying the knowledge body, from which deep semantic information cannot be extracted. In recent years, knowledge-graph technology has been introduced into the industry to organize knowledge, but is mainly applied to verification after model construction or graph construction based on existing structured models, and fails to solve the problem of "cold start" from the original unstructured description to the initial model generation. Meanwhile, although the large language model shows strong natural language understanding and generating capability, when the large language model is directly applied to construction of a professional and strict industrial information model, the large language model has the problems of unstable output, lack of common field knowledge constraint, difficulty in ensuring compliance with industry standard specifications and the like. Therefore, how to deeply integrate the semantic understanding capability of the large language model and the domain standardability of the knowledge graph realizes the end-to-end automatic construction from unstructured text to a standardized OPC UA information model, and becomes a key technical bottleneck for improving industrial interoperability and accelerating digital transformation. Disclosure of Invention In order to solve the problems in the prior art, the invention provides an OPC UA information model automatic construction method based on a knowledge graph and a large language model, which comprises the steps of obtaining unstructured industrial text, carrying out semantic analysis on the unstructured industrial text, and extracting a main entity, an object entity, a method entity and attribute information thereof according to a predefined hierarchical tuple structure; the method comprises the steps of carrying out semantic enhancement on an extraction result by calling a knowledge graph in the industrial field in real time, carrying out similarity calculation and evaluation on the enhanced result, carrying out information fusion and deduplication on the result based on the similarity evaluation to obtain an entity-attribute set, generating a tree-shaped hierarchical structure frame by using a large language model, calling the knowledge graph to carry out structural integrity verification, analyzing semantic association between the entity-attribute set and the tree-shaped structure frame, mapping the attribute and the method to corresponding structure nodes, generating natural language interpretation reasons for each mapping decision, converting a model structure which completes mapping into an XML grammar format, and executing automatic compliance verification and restoration. The invention has the beneficial effects that: According to the invention, a real-time semantic enhancement and verification mechanism of a knowledge graph is innovatively introduced in a multi-stage reasoning process of a large language model, unstructured text description is automatically converted into a model component rich in standard semantics, and the core problem of conversion from natural language to a formalized information model is solved. Through the progressive task chain of design information extraction, semantic fusion, model construction, interpretable mapping and standardized output, a complete 'understanding-enhancing-constructing-verifying' automation system is constructed. The system ensures the completeness of information extraction through deep semantic understanding of a large language model, and fundamentally ensures that the gene