Method and device for automatically generating ontology schema under assistance of large language model

The automatic ontology schema generation method assisted by a large language model utilizes data collection and hierarchical semantic clustering techniques to generate ontology schemas that conform to the OWL/RDF specification. This solves the problems of low efficiency and insufficient accuracy in existing technologies, and enables efficient and flexible ontology construction and updating.

CN122489775APending Publication Date: 2026-07-31SCHOOL OF INFORMATION & COMM TECH NAT UNIV OF DEFENSE TECH OF THE CHINESE PEOPLES LIBERATION ARMY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SCHOOL OF INFORMATION & COMM TECH NAT UNIV OF DEFENSE TECH OF THE CHINESE PEOPLES LIBERATION ARMY
Filing Date
2025-08-05
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing technologies are inefficient and inaccurate in building ontology in large-scale and complex domains, and are difficult to adapt flexibly to dynamic application needs and knowledge updates.

Method used

An automatic ontology pattern generation method assisted by a large language model is adopted. By collecting and storing structured, semi-structured and unstructured data, a large language model trained by reinforcement learning based on human feedback is used to extract entity relations, generate high-dimensional semantic vectors, perform hierarchical semantic clustering, dynamically adjust the clustering radius, and finally convert it into an ontology pattern that conforms to the OWL/RDF specification. The pattern is then dynamically updated through an AI Agent.

Benefits of technology

It significantly improves the efficiency of ontology construction, generates logically consistent and semantically accurate ontology structures, can adapt to dynamic changes in complex domains, reduces human intervention, and improves the timeliness and accuracy of knowledge modeling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122489775A_ABST
    Figure CN122489775A_ABST
Patent Text Reader

Abstract

This application discloses a method and apparatus for automatic ontology pattern generation assisted by a large language model, belonging to the field of automated ontology construction and evolution technology. The method includes: constructing a basic corpus by collecting and storing structured, semi-structured, and unstructured data from the domain to be processed; efficiently extracting entity relations using a large language model trained with human feedback reinforcement learning to form structured triplet data; subsequently, converting the data into high-dimensional semantic vectors through word embedding processing; performing hierarchical semantic clustering operations; dynamically adjusting the clustering radius to generate hierarchical concept semantic clusters; and finally converting the clustering results into standard ontology patterns according to preset mapping rules. This process not only significantly improves ontology construction efficiency and reduces human intervention, but also leverages the deep semantic understanding capabilities of the large model to accurately parse complex text and generate logically consistent and semantically accurate ontology structures, providing a high-quality and efficient ontology construction solution for knowledge-intensive applications such as intelligent search and the Semantic Web.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of automated ontology construction and evolution technology, and more specifically, to a method and apparatus for automatic ontology pattern generation assisted by a large language model. Background Technology

[0002] Ontologies, as the core technological foundation of knowledge representation and reasoning, play an increasingly crucial role in fields such as intelligent search, the semantic web, and intelligent healthcare. In practical applications, ontology needs to accurately characterize the conceptual system, attribute relationships, and constraint rules of a specific domain, providing structured knowledge support for upper-level intelligent applications. With the widespread adoption of knowledge-intensive applications and the continuous increase in domain complexity, the demand for large-scale, high-quality ontology has grown dramatically. Current ontology construction methods still require significant human intervention and rely on specialized human experience and knowledge.

[0003] To address the inefficiency and high cost of manual ontology construction, automated or semi-automated ontology construction techniques have emerged. Automated processes significantly reduce human intervention and increase construction speed. However, traditional automated ontology construction methods, such as rule-based templates or shallow statistical learning, have encountered performance bottlenecks due to their difficulty in deeply understanding the semantics and implicit logic of domain text. The widespread application of cross-domain, multimodal knowledge sources necessitates efficient automated construction while ensuring the accuracy and consistency of the ontology.

[0004] With the development of artificial intelligence and large-scale pre-trained models, advanced technologies such as Large Language Models (LLM) have acquired the ability to deeply understand natural language text, identify complex semantic relationships, and uncover implicit knowledge. By analyzing massive amounts of unstructured data such as domain literature and reports, large models can automatically extract conceptual entities, accurately identify semantic relationships (such as classification, attributes, and part-whole relationships), infer logical constraints between concepts, and generate a structured ontology framework accordingly. This automatic ontology construction based on deep semantic understanding effectively ensures the logical consistency and task adaptability of the generated ontology, laying a solid foundation for subsequent knowledge reasoning and applications. Therefore, it has the potential to solve the efficiency and accuracy problems faced by the field of knowledge engineering when dealing with large-scale, complex domain knowledge modeling.

[0005] In recent years, researchers have explored a series of automatic ontology construction schemes based on large language model prompting engineering, fine-tuning, and the combination of neural symbols, achieving significant improvements in construction efficiency by leveraging the deep semantic knowledge of the models. Although current large model-based ontology construction methods have shown great potential and can generate initially usable ontology structures, their practical application still faces many challenges. For example, the specific requirements of the target application scenario may dynamically adjust with business development or knowledge evolution, and the goal of ontology construction may be dynamically changing, potentially leading to ontology generated by existing automatic construction schemes being unable to flexibly adapt to new application requirements or knowledge updates. Summary of the Invention

[0006] This invention provides an automatic ontology pattern generation method assisted by a large language model. To address the shortcomings of the prior art, this method designs an automated ontology construction and evolution algorithm for specific domains and with the assistance of a large model, specifically for ontology construction scenarios with specific application goals. It also supplements this by establishing an ontology adaptive update mechanism, effectively solving the problems of low efficiency and insufficient accuracy of traditional methods when modeling large-scale and complex domain knowledge.

[0007] This invention provides a method for automatic ontology pattern generation assisted by a large language model, the method comprising: Step 1: Collect and store structured, semi-structured, and unstructured data of the domain to be processed to construct a domain database, which constitutes the basic corpus for ontology construction; Step 2: Input the basic corpus into a large language model trained by human feedback reinforcement learning, and output structured entity relation data in the form of subject-verb-object triples; Step 3: Perform word embedding processing on each entity in the structured entity relationship data to generate a corresponding high-dimensional semantic vector. The high-dimensional semantic vector is used to express the distribution characteristics of the entity in the semantic space. Step 4: Based on the high-dimensional semantic vector, perform hierarchical semantic clustering operation to generate concept semantic clusters with hierarchical relationships. The clustering radius is dynamically adjusted with the cluster density. Step 5: Based on the conceptual semantic clusters, convert the conceptual semantic clusters and their hierarchical relationships into ontology schemas that conform to the OWL / RDF specification according to the preset semantic web mapping rules, thereby realizing the automatic generation of ontology schemas.

[0008] Furthermore, before performing entity relation extraction, the large language model loads a prompt template designed for the ontology construction task through prompt fine-tuning technology to improve the accuracy of entity relation extraction.

[0009] Furthermore, based on the high-dimensional semantic vector, hierarchical semantic clustering operations are performed to generate concept semantic clusters with hierarchical relationships, including: Calculate the semantic distance between any two clusters in the high-dimensional semantic vector, whereby the semantic distance is obtained by combining the Euclidean distance of the cluster center vector with the cluster radius adjustment factor; When the semantic distance is less than a preset dynamic threshold, the corresponding clusters are merged, and the center vector and radius of the merged cluster are updated. This process is repeated iteratively until the termination condition is met to generate a tree-like hierarchical conceptual semantic cluster.

[0010] Furthermore, it also includes: The AI ​​Agent automatically supplements or updates the domain database and repeats steps 2 to 5 to achieve dynamic updates of the ontology model.

[0011] Furthermore, when performing dynamic updates, the AI ​​Agent first identifies the domain event that triggers the update, then determines other affected domains based on cross-domain association rules, and simultaneously executes steps 2 to 5 in multiple related domains to complete multi-dimensional collaborative updates.

[0012] Furthermore, the cross-domain association rules are stored in the form of an event-impact mapping table, which is read in real time by the AI ​​Agent during the update process to determine the update scope.

[0013] Furthermore, independent knowledge graphs are constructed for different domains to be processed, and a cross-domain association rule base is established to define the logic of event chain reactions; When a single domain update is triggered in the cross-domain association rule base, the associated domain is automatically identified and a collaborative update is initiated, and a version snapshot is used to record the multi-dimensional ontology evolution path.

[0014] This invention also provides an automatic ontology pattern generation device assisted by a large language model, comprising: The domain database construction module is used to collect and store structured, semi-structured, and unstructured data of the domain to be processed in order to construct a domain database, which constitutes the basic corpus for ontology construction. The entity relation extraction module is used to input the basic corpus into a large language model trained by human feedback reinforcement learning, and output structured entity relation data in the form of subject-verb-object triples. The deep semantic representation module is used to perform word embedding processing on each entity in the structured entity relationship data to generate a corresponding high-dimensional semantic vector, which is used to express the distribution characteristics of the entity in the semantic space. The hierarchical semantic clustering module is used to perform hierarchical semantic clustering operations based on the high-dimensional semantic vector to generate conceptual semantic clusters with hierarchical relationships, wherein the clustering radius is dynamically adjusted with the cluster density; The ontology schema generation module is used to convert the concept semantic clusters and their hierarchical relationships into ontology schemas that conform to the OWL / RDF specification based on the concept semantic clusters and according to preset semantic web mapping rules, thereby realizing automatic generation of ontology schemas.

[0015] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the ontology pattern automatic generation method assisted by any of the above-described large language models.

[0016] The present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the ontology pattern automatic generation method assisted by any of the above-described large language models.

[0017] In summary, compared with the prior art, the above-described technical solutions conceived by this invention can achieve the following beneficial effects: This invention presents an automatic ontology pattern generation method assisted by a large language model. It constructs a basic corpus by collecting and storing structured, semi-structured, and unstructured data from the target domain. A large language model trained with human feedback reinforcement learning is then used to efficiently extract entity relations, forming structured triplet data. Subsequently, word embeddings are used to transform the data into high-dimensional semantic vectors. Hierarchical semantic clustering operations are then performed, dynamically adjusting the clustering radius to generate hierarchical concept semantic clusters. Finally, the clustering results are converted into standard ontology patterns according to preset mapping rules. This process not only significantly improves ontology construction efficiency and reduces human intervention but also leverages the deep semantic understanding capabilities of the large model to accurately parse complex text, generating logically consistent and semantically accurate ontology structures. This effectively solves the problems of low efficiency and insufficient accuracy of traditional methods in large-scale, complex domain knowledge modeling, providing a high-quality, high-efficiency ontology construction solution for knowledge-intensive applications such as intelligent search and the Semantic Web. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1One of the flowcharts for an optional large language model-assisted automatic ontology pattern generation method provided in this application embodiment; Figure 2 A schematic diagram of an optional reinforcement learning training process for a large language model provided in an embodiment of this application; Figure 3 A second flowchart illustrating an optional large language model-assisted automatic ontology pattern generation method provided in this application embodiment; Figure 4 This is a schematic diagram of an optional electronic device provided in an embodiment of this application. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.

[0021] The terms "first," "second," "third," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.

[0022] Hereinafter, exemplary embodiments according to this application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this application, and not all embodiments of this application. It should be understood that this application is not limited to the exemplary embodiments described herein.

[0023] Figure 1 The illustration shows a flowchart of an optional ontology pattern automatic generation method assisted by a large language model according to an embodiment of this application; as shown... Figure 1 As shown, the ontology pattern automatic generation method assisted by a large language model according to an embodiment of this application includes: Step 1: Collect and store structured, semi-structured, and unstructured data of the domain to be processed to construct a domain database, which constitutes the basic corpus for ontology construction; Step 2: Input the basic corpus into a large language model trained by human feedback reinforcement learning, and output structured entity relation data in the form of subject-verb-object triples; Step 3: Perform word embedding processing on each entity in the structured entity relationship data to generate a corresponding high-dimensional semantic vector. The high-dimensional semantic vector is used to express the distribution characteristics of the entity in the semantic space. Step 4: Based on the high-dimensional semantic vector, perform hierarchical semantic clustering operation to generate concept semantic clusters with hierarchical relationships. The clustering radius is dynamically adjusted with the cluster density. Step 5: Based on the conceptual semantic clusters, convert the conceptual semantic clusters and their hierarchical relationships into ontology schemas that conform to the OWL / RDF specification according to the preset semantic web mapping rules, thereby realizing the automatic generation of ontology schemas.

[0024] Regarding step 1, structured data, semi-structured data and unstructured data of the domain to be processed are collected and stored to construct a domain database, which constitutes the basic corpus for ontology construction.

[0025] The domain database refers to the corpus database used for automatic ontology pattern generation, containing structured, semi-structured, and unstructured data. This database provides basic domain corpus data for the entity relation extraction module, and the larger model judges and filters data that matches the target domain for ontology generation, ensuring that the generated ontology patterns meet domain requirements. For example, the data filtering prompts for fine-tuning the input are as follows:

[0026] In this embodiment, the server cluster continuously crawls structured tables and unstructured text from public websites, industry reports, academic papers, and internal business systems to form a domain database. For example, when constructing the "Urban Transportation Planning Ontology", PDF, Excel, and CSV files such as the "Urban Transportation Annual Report", road engineering data, and bus and subway operation records are uniformly stored in a distributed file system, and the source and update time of each document are described with JSON metadata, thus forming the "basic corpus".

[0027] Regarding step 2: Input the basic corpus into a large language model trained by human feedback reinforcement learning, and output structured entity relation data in the form of subject-verb-object triples.

[0028] In an alternative embodiment, a thought chain cues combined with RLHF (Human Feedback Reinforcement Learning) are used to fine-tune the large model in this stage.

[0029] Analyzing the input corpus using LLM Entity relations are extracted from the data in the corpus in the form of subject-verb-object triples, and the output is the entity-relation triples extracted from the input corpus. This serves as the input to the deep semantic representation module. A prompt-based fine-tuning approach is used to implement the entity relation extraction module's task using a large model. The prompt-based fine-tuning input is shown below.

[0030]

[0031] Subsequently, a reinforcement learning approach combining thought chain prompts with human feedback was adopted. Figure 2 The illustration shows a flowchart of an optional reinforcement learning training large language model according to an embodiment of this application, such as... Figure 2 As shown, this stage involves further fine-tuning the large model using instructions. The specific process includes: 1) Based on the ontology construction requirements, the basic features of the extracted triples are specified and used as examples for extracting prompt words in the large model. Small sample extraction case prompts are designed.

[0032] 2) Based on the logical characteristics of the large model, the prompts are given in the form of a thought chain.

[0033] 3) Employ reinforcement learning with human feedback to conduct multiple rounds of interactive feedback with the large model to improve the extraction effect of the large model and point out erroneous extraction examples.

[0034] In this embodiment, a prompt template can be used—"Please extract entity relations from the text and return the results strictly according to the following JSON format: triples:subject: relation: object:"—to parse paragraphs such as "Urban transportation systems mainly include road networks, public transportation systems, and traffic management," and output a set of subject-verb-object triples in the form of (urban transportation systems, including, road networks), thus obtaining structured entity relation data.

[0035] Regarding step 3: perform word embedding processing on each entity in the structured entity relationship data to generate a corresponding high-dimensional semantic vector, which is used to express the distribution characteristics of the entity in the semantic space.

[0036] In the semantic vector transformation process, the extracted entity set Transformed into a high-dimensional semantic vector set through word embedding. They aggregate in vector space, providing a computable semantic foundation for hierarchical semantic clustering.

[0037] In this embodiment, a Sentence-BERT encoder can be invoked to map each entity into a 768-dimensional high-dimensional semantic vector, making "public transportation system" and "subway line" close in cosine distance, while being far from "traffic management".

[0038] Regarding step 4: Based on the high-dimensional semantic vector, perform hierarchical semantic clustering operation to generate conceptual semantic clusters with hierarchical relationships, and the clustering radius is dynamically adjusted with the cluster density.

[0039] In the hierarchical semantic clustering process, semantic vector sets are used as the basis for the clustering process. As input, the hierarchical semantic clustering algorithm (description attached) is used to dynamically adjust the cluster radius and automatically generate a hierarchical set of conceptual semantic clusters. It outputs hierarchical semantic clustering results, providing direct guidance for ontology pattern generation. The cluster naming generation hints and input fine-tuning are shown below.

[0040]

[0041] The pseudocode for the hierarchical semantic clustering algorithm designed in this module is shown below.

[0042] In an optional embodiment, the ontology pattern automatic generation method assisted by a large language model provided in this application generates concept semantic clusters with hierarchical relationships by performing hierarchical semantic clustering operations on the high-dimensional semantic vectors, including: Calculate the semantic distance between any two clusters in the high-dimensional semantic vector, whereby the semantic distance is obtained by combining the Euclidean distance of the cluster center vector with the cluster radius adjustment factor; When the semantic distance is less than a preset dynamic threshold, the corresponding clusters are merged, and the center vector and radius of the merged cluster are updated. This process is repeated iteratively until the termination condition is met to generate a tree-like hierarchical conceptual semantic cluster.

[0043] In this embodiment, during the hierarchical semantic clustering stage, the algorithm can use ε=0.15 as the minimum radius threshold to first calculate the inter-cluster clustering. When the distance is less than the dynamic threshold of 0.3, the clusters are merged and iterated to generate a tree-like hierarchy: for example, the root node is "urban transportation system", and its child nodes are "road network", "public transportation system" and "traffic management" in sequence. Among them, "public transportation system" is further subdivided into "subway line" and "bus line", thus generating a conceptual semantic cluster with hierarchical relationship.

[0044] Regarding step 5: Based on the conceptual semantic clusters, the conceptual semantic clusters and their hierarchical relationships are converted into ontology schemas conforming to the OWL / RDF specification according to the preset semantic web mapping rules, thereby realizing the automatic generation of ontology schemas.

[0045] In the ontology schema generation process, based on clustering results Using the semantic web's mapping rules, it automatically generates ontology schema outputs in OWL / RDF format. The process steps include: 1) Define the concept hierarchy; use, for example, the Semantic Web specification: https: / / www.w3.org / 2000 / 01 / rdf-schema#, to complete the mapping between the concept hierarchy and entities; 2) Binding relationship constraints; map the extracted relationships to the entities in 1).

[0046] 3) Add logical reasoning axioms and rules to supplement and improve the final ontology structure.

[0047] In this embodiment, based on and The specification maps the above levels to and Declare and generate a standard OWL file.

[0048] In an optional embodiment, the ontology pattern automatic generation method assisted by the large language model of this application further includes: automatically supplementing or updating the domain database by an AI Agent, and repeatedly executing steps 2 to 5 to achieve dynamic updating of the ontology pattern.

[0049] Figure 3 The illustration shows a flowchart of a second optional method for automatic ontology pattern generation assisted by a large language model, according to an embodiment of this application; as shown... Figure 3 As shown, after the ontology schema is generated, update suggestions are provided by the ontology user or domain expert based on usage requirements. These suggestions are then promptly fed back to the large model. An AI agent automatically supplements and updates the domain database, and the supplemented data is used to repeat the ontology schema construction process and add it to the final generated ontology, thus completing the dynamic update of the ontology schema. The design of the domain data supplementation AI agent and the input for dynamic ontology update prompts are shown below.

[0050]

[0051] Example of ontology generation process: Step 1: Algorithm Initialization A domain is generated based on the target ontology, and the domain database is loaded.

[0052] Step 2: Joint Extraction of Entity Relationships The domain database content is provided to the large model through the API interface. Using prompting and fine-tuning techniques, the large model is guided to complete the task of extracting subject-verb-object triples of domain data entity relationships, and obtain a set of entity triples.

[0053] Step 3: Deep Semantic Representation The set of triples obtained by extracting entity relations is represented by deep semantics. Using a word embedding model, each entity in the set of triples is embedded to obtain the representation of each entity in the vector space.

[0054] Step 4: Hierarchical Clustering of Entities The extracted entities are clustered using a hierarchical clustering algorithm to obtain ontology classes in the ontology schema construction process, and the extracted entities are assigned to each class.

[0055] Step 5: Automatic generation of the ontology model The hierarchical clustering results are mapped to different ontology classes in the ontology file; the extracted entities are mapped to different entity elements under different ontology classes in the ontology file according to their different clusters; and the extracted relations are mapped to the relations between different entity elements in the ontology file.

[0056] Step 6: Ontology Mode Dynamic Update Mechanism By introducing an AI Agent, the knowledge gaps and missing ontology issues in the current ontology model are addressed. Domain knowledge is introduced in a targeted manner through human feedback, and the generated ontology model is updated by updating the domain database, thereby continuously optimizing the ontology model structure and functionality.

[0057] Furthermore, independent knowledge graphs can be constructed for different domains to be processed, and a cross-domain association rule base that defines the logic of event chain reactions can be established. When a single domain update is triggered in the cross-domain association rule base, the associated domain is automatically identified and a collaborative update is initiated, and a version snapshot is used to record the multi-dimensional ontology evolution path.

[0058] In this embodiment, a domain expert points out through a web interface that "the current ontology lacks content related to shared bicycles." The AIAgent immediately triggers an update process: First, based on the cross-domain association rule base (stored in the form of an event-impact mapping table, including rules such as "adding a travel mode → affecting traffic flow model → associating with road planning"), it identifies that "shared bicycles" will simultaneously affect the two subdomains of "public transportation system" and "road planning." Then, the Agent uses the Scrapy framework to download 200 documents, including standards from the Ministry of Housing and Urban-Rural Development and reports from the Bicycle Industry Association, and incrementally writes them into the domain database. Then, steps 2-5 are repeated to extract new triples such as (shared bicycles, belong to, public transportation system). After clustering, "shared bicycles" is attached to the original level to form an updated OWL file. A version snapshot v1.2 is generated through Git to realize dynamic updates and version snapshot records of the multi-dimensional ontology evolution path.

[0059] Optionally, if a semantic conflict is found between "shared bicycle parking area" and "bus stop area" during the update process, the conflict marker can be pushed to the expert review queue. After manual confirmation, it can be merged into the main version to ensure consistency of the ontology.

[0060] In summary, this invention uses a large language model with prompts for fine-tuning as its core, supplemented by an adaptive hierarchical clustering algorithm and a cross-domain event-driven AI Agent update mechanism. It can automatically generate and continuously evolve high-quality ontology for complex fields such as military, government affairs, and smart cities, significantly reducing manual workload and improving the timeliness and accuracy of knowledge modeling.

[0061] According to another aspect of the embodiments of this application, a monitoring device for implementing the above-described large language model-assisted automatic ontology pattern generation method is also provided, the device may include: The domain database construction module is used to collect and store structured, semi-structured and unstructured data of the domain to be processed in order to construct a domain database, which constitutes the basic corpus for ontology construction. The entity relation extraction module is used to input the basic corpus into a large language model trained by human feedback reinforcement learning, and output structured entity relation data in the form of subject-verb-object triples. The deep semantic representation module is used to perform word embedding processing on each entity in the structured entity relationship data to generate a corresponding high-dimensional semantic vector, which is used to express the distribution characteristics of the entity in the semantic space. The hierarchical semantic clustering module is used to perform hierarchical semantic clustering operations based on the high-dimensional semantic vector to generate conceptual semantic clusters with hierarchical relationships, wherein the clustering radius is dynamically adjusted with the cluster density; The ontology schema generation module is used to convert the concept semantic clusters and their hierarchical relationships into ontology schemas that conform to the OWL / RDF specification based on the concept semantic clusters and according to preset semantic web mapping rules, thereby realizing automatic generation of ontology schemas.

[0062] It should be noted that the ontology pattern automatic generation device with the assistance of a large language model provided in this embodiment of the invention can execute the ontology pattern automatic generation method with the assistance of a large language model described in any of the above embodiments during specific operation, which will not be elaborated in this embodiment.

[0063] Exemplary electronic devices Figure 4 This is a schematic diagram of an optional electronic target device according to an embodiment of this application, such as... Figure 4As shown, it includes a processor 402, a communication interface 404, a memory 406, and a communication bus 408. The processor 402, communication interface 404, and memory 406 communicate with each other via the communication bus 408. Memory 406 is used to store computer programs; When processor 402 executes a computer program stored in memory 406, it performs the following steps: S1. Collect and store structured data, semi-structured data and unstructured data of the domain to be processed to construct a domain database, which constitutes the basic corpus for ontology construction; S2, input the basic corpus into a large language model trained by human feedback reinforcement learning, and output structured entity relation data in the form of subject-verb-object triples; S3, perform word embedding processing on each entity in the structured entity relationship data to generate a corresponding high-dimensional semantic vector, which is used to express the distribution characteristics of the entity in the semantic space; S4. Based on the high-dimensional semantic vector, perform hierarchical semantic clustering operation to generate conceptual semantic clusters with hierarchical relationships. The clustering radius is dynamically adjusted with the cluster density. S5. Based on the conceptual semantic clusters, the conceptual semantic clusters and their hierarchical relationships are converted into ontology schemas conforming to the OWL / RDF specification according to preset semantic web mapping rules, thereby realizing automatic generation of ontology schemas.

[0064] Optionally, the communication bus can be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 The symbol is represented by a single thick line, but this does not indicate that there is only one bus or one type of bus. The communication interface is used for communication between the aforementioned electronic target device and other devices.

[0065] The memory may include RAM, or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage target device located remotely from the aforementioned processor.

[0066] The processors mentioned above can be general-purpose processors, including but not limited to: CPU (Central Processing Unit), NP (Network Processor), etc.; they can also be DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0067] Exemplary computer program products and computer-readable storage media In addition to the methods and devices described above, embodiments of this application may also be computer program products, which include computer program instructions that, when executed by a processor, cause the processor to perform the steps in the large language model-assisted automatic ontology pattern generation method described in the "Exemplary Methods" section of this specification according to various embodiments of this application.

[0068] The computer program product can be written in any combination of one or more programming languages ​​to perform the operations of the embodiments of this application. The programming languages ​​include object-oriented programming languages ​​such as Java and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0069] Furthermore, embodiments of this application may also be computer-readable storage media storing computer program instructions that, when executed by a processor, cause the processor to perform the steps in the moving object tracking methods according to various embodiments of this application described in the "Exemplary Methods" section of this specification.

[0070] The computer-readable storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, target device, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.

[0071] The basic principles of this application have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this application are merely examples and not limitations, and should not be considered as essential features of each embodiment of this application. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the application to the necessity of employing the aforementioned specific details for implementation.

[0072] The block diagrams of devices, target apparatuses, devices, and systems involved in this application are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, target apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.

[0073] It should also be noted that in the target apparatus, equipment, and method of this application, each component or step can be disassembled and / or recombined. These disassemblies and / or recombinations should be considered as equivalent solutions of this application.

[0074] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of this application. Therefore, this application is not intended to be limited to the aspects shown herein, but rather to be accorded the widest scope consistent with the principles and novel features disclosed herein.

[0075] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this application to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations thereof.

Claims

1. A method for automatically generating an ontology schema with the assistance of a large language model, characterized in that, include: Step 1: Collect and store structured data, semi-structured data, and unstructured data of the domain to be processed to construct a domain database, which constitutes the basic corpus for ontology construction; Step 2: Input the basic corpus into a large language model trained by human feedback reinforcement learning, and output structured entity relation data in the form of subject-verb-object triples; Step 3: Perform word embedding processing on each entity in the structured entity relationship data to generate a corresponding high-dimensional semantic vector. The high-dimensional semantic vector is used to express the distribution characteristics of the entity in the semantic space. Step 4: Based on the high-dimensional semantic vector, perform hierarchical semantic clustering operation to generate concept semantic clusters with hierarchical relationships. The clustering radius is dynamically adjusted with the cluster density. Step 5: Based on the conceptual semantic clusters, convert the conceptual semantic clusters and their hierarchical relationships into ontology schemas that conform to the OWL / RDF specification according to the preset semantic web mapping rules, thereby realizing the automatic generation of ontology schemas.

2. The method for automatic ontology pattern generation assisted by a large language model as described in claim 1, characterized in that, Before performing entity relation extraction, the large language model loads a prompt template designed for the ontology construction task through prompt fine-tuning technology to improve the accuracy of entity relation extraction.

3. The method for automatic ontology pattern generation assisted by a large language model as described in claim 1, characterized in that, Based on the high-dimensional semantic vector, hierarchical semantic clustering operations are performed to generate concept semantic clusters with hierarchical relationships, including: Calculate the semantic distance between any two clusters in the high-dimensional semantic vector, whereby the semantic distance is obtained by combining the Euclidean distance of the cluster center vector with the cluster radius adjustment factor; When the semantic distance is less than a preset dynamic threshold, the corresponding clusters are merged, and the center vector and radius of the merged cluster are updated. This process is repeated iteratively until the termination condition is met to generate a tree-like hierarchical conceptual semantic cluster.

4. The method for automatic ontology pattern generation assisted by a large language model as described in claim 1, characterized in that, Also includes: The AI ​​Agent automatically supplements or updates the domain database and repeats steps 2 to 5 to achieve dynamic updates of the ontology model.

5. The method for automatic ontology pattern generation assisted by a large language model as described in claim 4, characterized in that, When performing dynamic updates, the AI ​​Agent first identifies the domain event that triggers the update, then determines other affected domains based on cross-domain association rules, and simultaneously executes steps 2 to 5 in multiple related domains to complete multi-dimensional collaborative updates.

6. The method for automatic ontology pattern generation assisted by a large language model as described in claim 4, characterized in that, The cross-domain association rules are stored in the form of an event-impact mapping table, and are read in real time by the AI ​​Agent during the update process to determine the update scope.

7. The method for automatic ontology pattern generation assisted by a large language model as described in claims 1-6, characterized in that, Independent knowledge graphs are constructed for different domains to be processed, and a cross-domain association rule base is established to define the logic of event chain reactions. When a single domain update is triggered in the cross-domain association rule base, the associated domain is automatically identified and a collaborative update is initiated, and a version snapshot is used to record the multi-dimensional ontology evolution path.

8. An automatic ontology pattern generation device assisted by a large language model, characterized in that, include: The domain database construction module is used to collect and store structured, semi-structured, and unstructured data of the domain to be processed in order to construct a domain database, which constitutes the basic corpus for ontology construction. The entity relation extraction module is used to input the basic corpus into a large language model trained by human feedback reinforcement learning, and output structured entity relation data in the form of subject-verb-object triples. The deep semantic representation module is used to perform word embedding processing on each entity in the structured entity relationship data to generate a corresponding high-dimensional semantic vector, which is used to express the distribution characteristics of the entity in the semantic space. The hierarchical semantic clustering module is used to perform hierarchical semantic clustering operations based on the high-dimensional semantic vector to generate conceptual semantic clusters with hierarchical relationships, wherein the clustering radius is dynamically adjusted with the cluster density; The ontology schema generation module is used to convert the concept semantic clusters and their hierarchical relationships into ontology schemas that conform to the OWL / RDF specification based on the concept semantic clusters and according to preset semantic web mapping rules, thereby realizing automatic generation of ontology schemas.

9. An electronic device, comprising: processor; And a memory storing computer program instructions that, when executed by the processor, cause the processor to perform the ontology pattern automatic generation method assisted by a large language model as described in any one of claims 1-7.

10. A non-temporary computer-readable storage medium storing computer program instructions thereon, which, when executed by a processor, cause the processor to perform the ontology pattern automatic generation method assisted by a large language model as described in any one of claims 1-7.