A method and apparatus for constructing event ontology patterns with the assistance of a large model
The event ontology pattern construction method assisted by a large model solves the problems of low efficiency and high cost in the construction of event ontology in the existing technology, realizes full-process automation and dynamic updates, and generates an event ontology with a clear structure that can meet the needs of high-frequency updates.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINESE PEOPLES LIBERATION ARMY INFORMATION SUPPORT CORPS ENGINEERING UNIVERSITY
- Filing Date
- 2025-10-17
- Publication Date
- 2026-07-31
AI Technical Summary
In existing technologies, event ontology construction relies on manual sorting, which is inefficient and costly, and cannot meet the needs of high-frequency updates and dynamic events. It also lacks a dynamic update mechanism. Traditional semi-automated methods still require a lot of manual intervention and cannot achieve fully automated construction.
We adopt a large-model-assisted event ontology pattern construction method. By building an event ontology modeling corpus, extracting event elements, performing deep semantic representation, and using a time-series-relationship aggregation module, we achieve fully automated generation. We use a large language model to generate the event ontology skeleton and map it to an OWL ontology file.
It achieves fully automated construction of event ontology, improving construction efficiency, reducing manual intervention costs, and generating event ontology with clear structure and distinct hierarchy, which can accurately express the evolutionary logic and relationships between events and supports dynamic updates.
Smart Images

Figure CN121436131B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of ontology construction and evolution technology, and more specifically, to a method and apparatus for constructing event ontology patterns with the assistance of a large model. Background Technology
[0002] Event ontology, as a core knowledge structure for depicting the dynamic behavior and relationships of events, plays an irreplaceable role in fields such as intelligent decision-making, public opinion analysis, and emergency response. Unlike static concept ontology, event ontology needs to accurately capture the core elements describing the relationships between events, such as event entities, temporal relationships, causal connections, and participating roles, providing structured support for upper-level dynamic knowledge applications. With the deepening of complex application scenarios, the demand for large-scale, high-timeliness event ontology has increased significantly, urgently requiring solutions to the problems of current event ontology construction methods that still rely heavily on manual analysis of event development logic and lack dynamic adaptability. To address the inefficiency and high cost of manual ontology construction, semi-automatic event ontology construction techniques have emerged. Through certain automated processes, these techniques significantly reduce manual intervention and improve construction speed. However, current event ontology construction techniques face three major bottlenecks: first, manual annotation of event elements is costly and struggles to handle high-frequency event streams; second, traditional semi-automatic construction methods still require significant manual intervention, making fully automated construction difficult and remaining a limitation; and third, the lack of a dynamic ontology update mechanism makes it difficult to adapt to event evolution and the emergence of new event types. Summary of the Invention This invention provides a method for constructing event ontology patterns with the assistance of a large model. To address the shortcomings of the prior art, this method constructs an event ontology modeling corpus generation module, an event element extraction module, a deep semantic representation module, a semantic-temporal-relational aggregation module, and an ontology generation module, and establishes a collaborative working mechanism to achieve fully automated generation of event ontology.
[0003] This invention provides a method for constructing an event ontology pattern with the assistance of a large model. The method includes: Obtain metadata of relevant corpora in the target domain and store it in the event ontology modeling corpus; For the text in the event ontology modeling corpus, event element extraction is performed using a large language model with prompting and fine-tuning to obtain event quintuples and relationships between events; The event quintuples are input into the deep semantic representation model to generate semantic vectors, temporal vectors, and relational vectors. Normalize and complete the dimensions of the semantic vector, temporal vector and relation vector of the same event. Then, taking the semantic vector as the main body, dynamically adjust the fusion weight of the temporal vector and relation vector based on the cosine similarity of the semantic vector of the event with all other events to generate a fused dynamic event vector. Using dynamic event vectors as initial leaf nodes, a time-series-relationship-enhanced hierarchical clustering algorithm is used for iterative merging to obtain a hierarchical clustering tree with parent-child relationships; For each non-leaf node in the hierarchical clustering tree, the large language model is invoked to generate a general Chinese class name based on the five-tuple of all events under that node, thus obtaining the event ontology skeleton with class name; The classes in the event ontology skeleton are mapped to OWL ontology classes, the event quintuples are mapped to OWL individuals, and the event relationship triples are mapped to OWL object properties, resulting in an ontology file that is serialized to conform to the RDF / OWL specification, thus realizing the construction of the event ontology pattern. Furthermore, the event quintuple includes event ID, trigger word, participant, time, and location; the relationship between events is an event relationship triple consisting of causal, sequential, associative, inclusive, similar, and contrastive relationships between any two events within the same text. Furthermore, the semantic vector is obtained by concatenating the event ID, trigger word, participant, and location and then encoding it through a pre-trained language model; the temporal vector is obtained by encoding time information through a temporal embedding network; and the relation vector is obtained by encoding event relation triples through a graph neural network.
[0004] Furthermore, the step of using dynamic event vectors as initial leaf nodes and iteratively merging them using a temporal-relational enhanced hierarchical clustering algorithm to obtain a hierarchical clustering tree with parent-child relationships includes: The dynamic event vector is used as the initial leaf node, and the hierarchical clustering algorithm with temporal-relational enhancement is used for iterative merging. At each merging, the temporal consistency score, relational consistency score and cosine similarity of the dynamic event vector are calculated for the node pair. The weights of temporal consistency score and relational consistency score are increased as the clustering depth increases, and the hierarchical clustering tree with parent-child relationships is output.
[0005] Furthermore, the temporal consistency score is obtained by calculating and normalizing the distance between all temporal subvector pairs within two nodes using Dynamic Time Warping (DTW), and the relation consistency score is obtained by measuring the difference in relation type distribution between two nodes using KL divergence and converting it into similarity.
[0006] Furthermore, the step of acquiring metadata of target domain-related corpora and storing it in the event ontology modeling corpus includes: Based on the target domain specified by the user, the AI agent crawls multi-source heterogeneous corpora in real time from open sources including at least arXiv, Google Scholar and general web pages; The large language model is called to calculate the relevance score between the crawled corpus and the target domain, and the corpus with a relevance score higher than a preset threshold is used as the target domain corpus. The metadata of the target domain corpus is stored in the event ontology modeling corpus. The metadata includes at least the source, title, author, year, and storage path. Furthermore, by continuously monitoring new publicly available corpora through an AI agent, the ontology file and text report are updated incrementally when the average similarity between the new corpora and the dynamic event vectors of the existing ontology is lower than a preset update threshold.
[0007] This invention also provides an event ontology pattern construction device assisted by a large model, comprising: The event ontology modeling corpus generation module is used to obtain metadata of relevant corpora in the target domain and store them in the event ontology modeling corpus; The event element extraction module is used to extract event elements from the text in the event ontology modeling corpus using a large language model with prompts and fine-tuning, to obtain event quintuples and relationships between events. The deep semantic representation module is used to input the event quintuples into the deep semantic representation model to generate semantic vectors, temporal vectors, and relational vectors. The semantic-temporal-relational aggregation module is used to normalize and complete the dimensions of the semantic vector, temporal vector and relational vector of the same event. Then, taking the semantic vector as the main body, it dynamically adjusts the fusion weight of the temporal vector and relational vector based on the cosine similarity of the semantic vector of the event with the semantic vectors of all other events to generate a fused dynamic event vector. The first processing module is used to take the dynamic event vector as the initial leaf node and iteratively merge it using a time-series-relationship-enhanced hierarchical clustering algorithm to obtain a hierarchical clustering tree with parent-child relationships. The second processing module is used to call the large language model to generate a general Chinese class name for each non-leaf node in the hierarchical clustering tree based on all event quintuples under that node, and obtain the event ontology skeleton with class name. The event ontology generation module is used to map the classes in the event ontology skeleton to OWL ontology classes, the event quintuples to OWL individuals, and the event relationship triples to OWL object properties, thereby obtaining an ontology file that is serialized to conform to the RDF / OWL specification and realizing the construction of the event ontology pattern. 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 event ontology pattern construction method assisted by any of the above-described large models.
[0008] 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 event ontology pattern construction method assisted by any of the above-described large model.
[0009] 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 a large-scale model-assisted event ontology construction method that automates the entire process from multi-source heterogeneous corpora to structured event ontology construction, significantly improving the efficiency of event ontology construction and reducing manual intervention costs. Utilizing a large language model for precise screening of corpus metadata and automatic extraction of event elements ensures high relevance between the corpus and the target domain, as well as the completeness of event information. A deep semantic representation model transforms event quintuples into semantic, temporal, and relational vectors, and dynamically integrates temporal and relational features with semantic vectors as the primary driver, generating dynamic event vectors that comprehensively reflect the multidimensional attributes of events, effectively solving the problems of one-sided event representation and information loss in traditional methods. A temporal-relational enhanced hierarchical clustering algorithm iteratively merges the dynamic event vectors, constructing a clustering tree with parent-child hierarchical relationships, resulting in a clear and hierarchical event ontology structure that accurately expresses the evolutionary logic and relationships between events. The large language model generates generalized Chinese class names for non-leaf nodes, forming an easily understandable event ontology skeleton, improving the readability and usability of the ontology. Finally, the ontology skeleton is mapped to OWL ontology classes, individuals, and object attributes conforming to the RDF / OWL specification, generating standardized ontology files. This achieves the automatic construction and output of event ontology schemas, overcoming the problems of low efficiency, high cost, and inconsistent structure in manual construction in existing technologies, and significantly improving the automation and standardization of event ontology construction. Attached Figure Description
[0010] 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.
[0011] Figure 1 One of the flowcharts illustrating an optional large-model-assisted event ontology pattern construction method provided in this application embodiment; Figure 2The illustration shows a second flowchart of an optional event ontology pattern construction method assisted by a large model according to an embodiment of this application; Figure 3 A schematic diagram illustrating the operation flow of an optional large-model-assisted event ontology pattern construction device 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
[0012] 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.
[0013] 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.
[0014] 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.
[0015] Figure 1 The illustration shows one of the flowcharts of an optional event ontology schema construction method assisted by a large model according to an embodiment of this application; such as Figure 1 As shown, the event ontology pattern construction method under the assistance of a large model according to an embodiment of this application includes: Step S101: Obtain metadata of relevant corpora in the target domain and store them in the event ontology modeling corpus; Step S102: For the text in the event ontology modeling corpus, perform event element extraction using a large language model with prompts and fine-tuning to obtain event quintuples and relationships between events; Step S103: Input the event quintuples into the deep semantic representation model to generate semantic vectors, temporal vectors, and relation vectors; Step S104: Normalize and complete the dimensions of the semantic vector, temporal vector and relation vector of the same event. Then, taking the semantic vector as the main body, dynamically adjust the fusion weight of the temporal vector and relation vector based on the cosine similarity of the semantic vectors of the event with all other events to generate the fused dynamic event vector. Step S105: Using the dynamic event vector as the initial leaf node, the hierarchical clustering algorithm with temporal-relational enhancement is used to iteratively merge the nodes to obtain a hierarchical clustering tree with parent-child relationships; Step S106: For each non-leaf node in the hierarchical clustering tree, call the large language model to generate a general Chinese class name based on all event quintuples under that node, and obtain the event ontology skeleton with class name; Step S107: Map the classes in the event ontology skeleton to OWL ontology classes, map the event quintuples to OWL individuals, and map the event relation triples to OWL object attributes to obtain an ontology file serialized to conform to the RDF / OWL specification, thereby realizing the construction of the event ontology schema. Regarding step S101: Obtain the metadata of the target domain-related corpus and store it in the event ontology modeling corpus.
[0016] The data stored in the corpus database includes structured data, semi-structured data, and unstructured data.
[0017] The event ontology modeling corpus is used to provide basic domain corpus data support. Its working logic is to design an AI agent according to user needs to search for domain-related corpus data, and then use a large language model to judge the relevance between the corpus data and the target domain, and select event corpus data that meets the target domain for ontology generation, so as to ensure that the generated event ontology pattern meets the ontology requirements.
[0018] In an optional embodiment, the method for constructing event ontology patterns with large model assistance in this embodiment, which involves obtaining metadata of target domain-related corpora and storing it in an event ontology modeling corpus, includes: Based on the target domain specified by the user, the AI agent crawls multi-source heterogeneous corpora in real time from open sources including at least arXiv, Google Scholar and general web pages; The large language model is called to calculate the relevance score between the crawled corpus and the target domain, and the corpus with a relevance score higher than a preset threshold is used as the target domain corpus. The metadata of the target domain corpus is stored in the event ontology modeling corpus. The metadata includes at least the source, title, author, year, and storage path. Here is a simplified process example: 1. User Interaction: The system prompts the user to enter a search term and asks if they need to retrieve the latest documents from the network; 2. Multi-source document crawling: Obtain documents from public sources using AI agents, including arXiv, Google Scholar, and general web pages.
[0019] 3. Document Screening and Storage: Based on the large model, the relevance of the corpus data to the target domain is determined according to the summary, outline, and other content. Each corpus data is assigned a relevance score, and the downloaded PDF files are renamed according to the relevance score and stored in the domain database. Document metadata (source, title, author, year, download path) is also recorded. Figure 2 The illustration shows a second flowchart of an optional event ontology pattern construction method assisted by a large model, according to an embodiment of this application; as shown... Figure 2 As shown, the collection of ontology data is used for subsequent retrieval.
[0020] Regarding step S102: For the text in the event ontology modeling corpus, perform event element extraction using a large language model with hints and fine-tuning to obtain event quintuples and relationships between events.
[0021] The event quintuple must include at least the event ID, trigger word, participants, time, and location. During event element extraction, considering the requirements of conciseness and comprehensive reflection of event attributes, an event quintuple is designed to reflect the event's attributes: (event ID, trigger word, participants, time, location). Based on a large language model combined with human feedback reinforcement learning, the core elements of the event are extracted from the text, and the extracted event quintuple (event ID, trigger word, participants, time, location) is output. The process employs a prompt-based fine-tuning guidance model for accurate extraction. Each event quintuple constitutes a relatively independent event. The prompt-based fine-tuning input for event element extraction can be as follows:
[0022] Based on the completion of event extraction, perform event relationship extraction to obtain the relationships between events. The input for event relationship extraction can be fine-tuned as follows:
[0023] Regarding step S103, the event quintuples are input into the deep semantic representation model to generate semantic vectors, temporal vectors, and relation vectors. The semantic vector is obtained by concatenating the event ID, trigger word, participants, and location, and then encoding it through a pre-trained language model. The temporal vector is obtained by encoding time information through a temporal embedding network; and the relation vector is obtained by encoding event relation triples through a graph neural network.
[0024] In deep semantic representation, the extracted event quintuples are converted into high-dimensional semantic vectors, which are then mapped to a semantic space to capture the multi-dimensional features of the events (including semantic features, temporal features, and relational features). Different semantic spaces are constructed for different event features. Below are examples of the different features designed to describe the events: Semantic features: reflecting the deeper meaning of the event content; Temporal characteristics: reflecting the timestamps and relative order in which events occur; Relationship characteristics: Reflecting the causal, inclusive, and accompanying relationships between events. This module converts different event features into computable vector representations, generating embedding vectors in three semantic spaces (semantic space, temporal space, and relational space) to simultaneously characterize event features, providing a mathematical foundation for subsequent clustering and matching. The semantic vectors corresponding to different event features include: Semantic vectors: generated based on event content (event ID, trigger words, participants, location), reflecting the core meaning of the event; Time-series vectors: integrate event time information to characterize the time attributes of events; Relationship vector: It combines the logical relationships between events with participant information to reflect the connections between events. After constructing the three spatial vectors, the discrete event texts are simultaneously converted into a quantifiable vector distribution in a continuous semantic vector space, so that the similarity between different events can be quantified by vector distance.
[0025] Regarding step S104, the semantic vector, temporal vector, and relational vector of the same event are normalized and dimension-completed. Then, taking the semantic vector as the main body, the fusion weights of the temporal vector and relational vector are dynamically adjusted based on the cosine similarity of the semantic vectors of the event with all other events, to generate the fused dynamic event vector.
[0026] In the process of semantic-temporal-relational aggregation, the three different vector sets formed as described above are used. As input, the system maps temporal and relational spaces to a semantic space, performs hierarchical clustering based on multi-dimensional vectors (description attached), and then automatically generates a hierarchical set of semantic clusters of ontology concepts. It outputs hierarchical semantic clustering results, grouping semantically similar events into one category, and generating a "class-subclass" hierarchical structure for the event ontology pattern.
[0027] Considering that the semantic vector distribution of different events varies greatly in the three event feature vector spaces, and that the semantic space integrates most of the information in the event quintuple and occupies a more important position in reflecting the semantics of the event, we consider mapping the relation space vector and temporal space vector to the semantic space vector before performing event clustering. This ensures that the mapped vector is dominated by semantic information, while reasonably incorporating temporal and relational features.
[0028] Regarding step S105, the dynamic event vector is used as the initial leaf node, and the hierarchical clustering algorithm with temporal-relational enhancement is used to iteratively merge them to obtain a hierarchical clustering tree with parent-child relationships.
[0029] Regarding step S106, for each non-leaf node in the hierarchical clustering tree, the large language model is invoked to generate a generalized Chinese class name based on all event quintuples under that node, thus obtaining the event ontology skeleton with class name.
[0030] In an optional embodiment, the event ontology pattern construction method with large model assistance provided in this embodiment, which uses dynamic event vectors as initial leaf nodes and iteratively merges them using a time-series-relationship-enhanced hierarchical clustering algorithm to obtain a hierarchical clustering tree with parent-child relationships, includes: The dynamic event vector is used as the initial leaf node, and the hierarchical clustering algorithm with temporal-relational enhancement is used for iterative merging. At each merging, the temporal consistency score, relational consistency score and cosine similarity of the dynamic event vector are calculated for the node pair. The weights of temporal consistency score and relational consistency score are increased as the clustering depth increases, and the hierarchical clustering tree with parent-child relationships is output.
[0031] Optionally, the temporal consistency score is obtained by calculating and normalizing the distance between all temporal subvector pairs within two nodes using Dynamic Time Warping (DTW), and the relational consistency score is obtained by measuring the difference in relational type distribution within two nodes using KL divergence and converting it into similarity.
[0032] Below is an example of a mapping step: 1. Vector normalization and completion preprocessing First, vector dimensions are aligned, and the semantic space vector, temporal space vector, and relational space vector are normalized separately to bring them to the same order of magnitude. Then, missing vectors are padded using zero vectors.
[0033] 2. Dynamic weighted fusion mapping The core of dynamic weighted fusion mapping is to generate a fused event space vector, which is based on a normalized semantic vector and incorporates effective information from temporal sequence and relationships. The fusion weights are dynamically adjusted according to semantic similarity. First, basic weights are assigned according to the semantic-dominated principle (in this example, the weights of the event space, temporal space, and relationship space are pre-assigned to 0.7, 0.15, and 0.15, respectively).
[0034] Static weights cannot handle scenarios where two events are "semantically similar but have large differences in temporal sequence and relationship" or "semantically different but have similar temporal sequence and relationship." Therefore, it is necessary to dynamically adjust the weights of temporal sequence and relationship vectors based on the semantic similarity between events. The core logic of dynamically adjusting weights is that the more semantically similar the events are, the greater the influence of temporal sequence relationship information on the mapping, thereby strengthening the algorithm's ability to identify the correlation between similar events; the more semantically different the events are, the smaller the influence of temporal sequence relationship information, thereby avoiding interference with semantic distinction.
[0035] 3. Dynamic weight update For any two events, calculate the cosine similarity of their normalized semantic vectors, and adjust the weights of the temporal space and relational space based on the cosine similarity. Generate the final event space vector after mapping by dynamically weighted summation, ensuring that semantic information dominates while incorporating temporal and relational features.
[0036] The pseudocode for mapping the temporal and relational spaces to the semantic space rules is shown below:
[0037] After obtaining the event vector space that integrates semantic, temporal, and relational features, the distribution of events in this vector space can objectively reflect the actual semantic distribution of events. Therefore, we consider designing a hierarchical clustering algorithm based on multi-dimensional vectors. This algorithm simulates the generation of ontology class hierarchies. Considering the significant event relationships and temporal relationships in the event ontology, the pseudocode of the hierarchical clustering algorithm based on multi-dimensional event vectors is shown below:
[0038] It is worth noting that, considering the special role of temporal sequence and relation vectors in hierarchical classification during event ontology construction, this application designs the above-mentioned hierarchical clustering based on multi-dimensional event vectors, which has the following effects: 1. Enhancement and integration of temporal relationship features: This application introduces a "Temporal Consistency Score": capturing non-rigid temporal patterns through Dynamic Time Warping (DTW); and a new "Relationship Consistency Score": measuring the similarity of relationship patterns between clusters through the KL divergence of relationship type distribution, reflecting the role of temporal and relationship features based on the fusion of event vectors. The two scores together constitute the "Temporal-Relationship Enhancement Factor," ensuring the impact of dynamic associations between events on clustering.
[0039] 2. Hierarchical adaptation of dynamic weights: The deeper the clustering level, the more detailed the events are. It can be assumed that the temporal and relational features of events play a more significant role in clustering. Therefore, the higher the weight of temporal and relational features, the more the lower the clustering level depends on the overall similarity of vectors, while the higher the clustering level depends on the commonality of temporal relational patterns.
[0040] After obtaining the hierarchical clustering results based on multi-dimensional event vectors, the various clusters are named to obtain cluster names represented in natural language, making them understandable to users.
[0041] Regarding step S107, the classes in the event ontology skeleton are mapped to OWL ontology classes, the event quintuples are mapped to OWL individuals, and the event relationship triples are mapped to OWL object attributes, resulting in an ontology file serialized to conform to the RDF / OWL specification, thus realizing the construction of the event ontology schema.
[0042] After obtaining the output including the cluster names, the event ontology is generated in a standardized format to obtain a reusable ontology file. The clustering results are mapped to OWL classes, event instances are mapped to individuals, and relations are mapped to object attributes, generating an ontology file that conforms to the RDF / OWL specification. Simultaneously, a dynamic update mechanism for the event ontology is designed: by monitoring new event data through an AI Agent, when the similarity between a new event and an existing ontology is lower than a threshold, an update process is triggered, which converts the clustering results and event relationships into ontology files that conform to the OWL specification and generates a text report, thus completing the process loop.
[0043] The following are the process steps for this stage: 1. Ontology class construction: Based on the clustering results, class names are generated for each cluster and the class hierarchy is defined.
[0044] 2. Attribute and Relationship Definition: Complete the definition of data attributes and extract the `sequential relationship` / `causal relationship`, etc. 3. Instance binding: Map each event to an instance of the corresponding class, associating it with time, participants, and relationship attributes; 4. Ontology serialization: Convert the ontology to OWL-Turtle format and conform to the Semantic Web naming and design guidelines; 5. Text Report Generation: Outputs the final ontology text report, which includes structured information such as event list, relationship list, and clustering results; 6. User Interaction: Prompt users to view ontology files, visualization results, and reports; support automatic opening of report files via the system.
[0045] In an optional embodiment, after obtaining the serialized ontology file conforming to the RDF / OWL specification in the event ontology pattern construction method with large model assistance in this embodiment, the method further includes: continuously monitoring new public source corpora through an AI agent, and updating the ontology file and text report incrementally when the average similarity between the dynamic event vectors of the new corpora and the existing ontology is lower than a preset update threshold.
[0046] It is worth noting that after obtaining the ontology file serialized to conform to the RDF / OWL specification, the ontology can be dynamically updated using event gap identification logic. This allows the constructed event ontology to continuously update itself, improving its usability. The ontology dynamic update mechanism is designed as follows: 1. Event Gap Identification: Through manual feedback or automatic ontology detection based on detection rules, event gap identification is performed on the generated event ontology to promptly detect defects in ontology construction (missing event items). 2. Targeted Data Supplementation: The AI Agent crawls corpora containing new event elements; 3. Incremental Update: Add new event data to the database, repeat the process of "event element extraction → association → clustering → ontology generation", and add the new event class to the existing ontology.
[0047] The following example illustrates the instantiation process of the event ontology pattern construction method assisted by the large model in this application in the field of "Wenchuan emergency rescue": 1. Select "Wenchuan Emergency Rescue" as the ontology domain to be generated. 2. In the event ontology modeling corpus generation module, the AI agent collects online resources and relevant academic papers to search for literature materials with high relevance to "Wenchuan earthquake rescue", and selects corpus materials with high relevance to form an event corpus database.
[0048] 3. In the event element extraction module, the event elements related to "Wenchuan earthquake rescue" are obtained by extracting literature data, including elements such as time, event subjects, and relationships between events.
[0049] 4. In the deep semantic representation module, the time, event semantics and the relationship between events in each event are semantically embedded and represented respectively, completing the mapping and representation of three different semantic spaces.
[0050] 5. The semantic-temporal-relational aggregation module integrates and maps the semantic vectors of the same event in the three different semantic spaces mentioned above, aggregates them to form a special event representation, and then performs hierarchical clustering, analysis and cluster naming of the event ontology to form the basic outline of the event ontology.
[0051] 6. In the event ontology generation module, the event ontology generation task is completed with the help of semantic web theory and basic concepts, resulting in a standardized ontology file that describes the event ontology of "Wenchuan earthquake rescue".
[0052] 7. Implement an automatic detection mechanism. When defects are detected in the automatically constructed event ontology (incomplete event elements, insufficient relationships, low clustering quality, incomplete concept structure), activate the automatic update mechanism.
[0053] In summary, this application presents an automatic event ontology pattern generation scheme driven by a large model, which can automatically construct event ontology patterns within a domain based on domain corpus data, reducing the complexity and specialized knowledge requirements of manually designing event ontology.
[0054] This application designs three different spatial vectors—event semantics, event relationships, and temporal relationships—to intuitively and objectively reflect the event ontology.
[0055] This application addresses the need to generate text prompts for the event ontology domain. This invention can automatically search for literature resources on academic websites, construct and complete the event ontology, and visualize different vector spaces in the event space. At the same time, it maintains the database for this specific domain and completes the construction and dynamic updating of the event ontology file.
[0056] According to another aspect of the embodiments of this application, a monitoring device for implementing the above-described event ontology schema construction method with large model assistance is also provided, the device may include: The event ontology modeling corpus generation module is used to obtain metadata of relevant corpora in the target domain and store them in the event ontology modeling corpus; The event element extraction module is used to extract event elements from the text in the event ontology modeling corpus using a large language model with prompts and fine-tuning, to obtain event quintuples and relationships between events. The deep semantic representation module is used to input the event quintuples into the deep semantic representation model to generate semantic vectors, temporal vectors, and relational vectors. The semantic-temporal-relational aggregation module is used to normalize and complete the dimensions of the semantic vector, temporal vector and relational vector of the same event. Then, taking the semantic vector as the main body, it dynamically adjusts the fusion weight of the temporal vector and relational vector based on the cosine similarity of the semantic vector of the event with the semantic vectors of all other events to generate a fused dynamic event vector. The first processing module is used to take the dynamic event vector as the initial leaf node and iteratively merge it using a time-series-relationship-enhanced hierarchical clustering algorithm to obtain a hierarchical clustering tree with parent-child relationships. The second processing module is used to call the large language model to generate a general Chinese class name for each non-leaf node in the hierarchical clustering tree based on all event quintuples under that node, and obtain the event ontology skeleton with class name. The event ontology generation module is used to map the classes in the event ontology skeleton to OWL ontology classes, the event quintuples to OWL individuals, and the event relationship triples to OWL object properties, thereby obtaining an ontology file that is serialized to conform to the RDF / OWL specification and realizing the construction of the event ontology pattern. It should be noted that, Figure 3 The illustration shows a flowchart of the operation of an event ontology pattern construction device with large model assistance according to an embodiment of this application. The event ontology pattern construction device with large model assistance provided in this embodiment can execute the event ontology pattern construction method with large model assistance described in any of the above embodiments during specific operation, which will not be described in detail in this embodiment.
[0057] 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 4 As 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, Obtain metadata of relevant corpora in the target domain and store it in the event ontology modeling corpus; S2, for the text in the event ontology modeling corpus, use a large language model with prompts and fine-tuning to perform event element extraction, and obtain event quintuples and relationships between events; S3, input the event quintuples into the deep semantic representation model to generate semantic vectors, temporal vectors and relational vectors; S4. Normalize and complete the dimensions of the semantic vector, temporal vector and relational vector of the same event. Then, based on the semantic vector as the main body, dynamically adjust the fusion weight of the temporal vector and relational vector according to the cosine similarity of the semantic vector of the event with all other events to generate the fused dynamic event vector. S5 uses the dynamic event vector as the initial leaf node and iteratively merges them using a time-relationship-enhanced hierarchical clustering algorithm to obtain a hierarchical clustering tree with parent-child relationships; S6. For each non-leaf node in the hierarchical clustering tree, call the large language model to generate a general Chinese class name based on all event quintuples under that node, and obtain the event ontology skeleton with class name. S7. Map the classes in the event ontology skeleton to OWL ontology classes, map the event quintuples to OWL individuals, and map the event relationship triples to OWL object attributes to obtain an ontology file that is serialized to conform to the RDF / OWL specification, thereby realizing the construction of the event ontology pattern.
[0058] 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.
[0059] 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.
[0060] 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.
[0061] 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 model-assisted event ontology schema construction method according to various embodiments of this application as described in the "Exemplary Methods" section above.
[0062] 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.
[0063] 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.
[0064] 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.
[0065] 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.
[0066] 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.
[0067] 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.
[0068] 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.
[0069] 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 constructing an event ontology pattern with the assistance of a large model, characterized in that, include: Obtain metadata of relevant corpora in the target domain and store it in the event ontology modeling corpus; For the text in the event ontology modeling corpus, event element extraction is performed using a large language model with prompting and fine-tuning to obtain event quintuples and relationships between events; The event quintuples are input into the deep semantic representation model to generate semantic vectors, temporal vectors, and relational vectors. Normalize and complete the dimensions of the semantic vector, temporal vector and relation vector of the same event. Then, taking the semantic vector as the main body, dynamically adjust the fusion weight of the temporal vector and relation vector based on the cosine similarity of the semantic vector of the event with all other events to generate a fused dynamic event vector. Using dynamic event vectors as initial leaf nodes, a time-series-relationship-enhanced hierarchical clustering algorithm is used for iterative merging to obtain a hierarchical clustering tree with parent-child relationships; For each non-leaf node in the hierarchical clustering tree, the large language model is invoked to generate a general Chinese class name based on the five-tuple of all events under that node, thus obtaining the event ontology skeleton with class name; The classes in the event ontology skeleton are mapped to OWL ontology classes, the event quintuples are mapped to OWL individuals, and the event relationship triples are mapped to OWL object properties, resulting in an ontology file that is serialized to conform to the RDF / OWL specification, thus realizing the construction of the event ontology pattern. 2.The method of claim 1, wherein, The event quintuple includes event ID, trigger word, participant, time, and location. 3.The method of claim 2, wherein, The semantic vector is obtained by concatenating the event ID, trigger word, participant, and location and then encoding it through a pre-trained language model; the temporal vector is obtained using methods including but not limited to temporal embedding network encoding and pre-trained model encoding; and the relation vector is obtained by using event relation triples using methods including but not limited to graph neural network encoding and pre-trained network. 4.The method of claim 1, wherein, The process of using dynamic event vectors as initial leaf nodes and iteratively merging them using a time-series-relationship-enhanced hierarchical clustering algorithm to obtain a hierarchical clustering tree with parent-child relationships includes: The dynamic event vector is used as the initial leaf node, and the hierarchical clustering algorithm with temporal-relational enhancement is used for iterative merging. At each merging, the temporal consistency score, relational consistency score and cosine similarity of the dynamic event vector are calculated for the node pair. The weights of temporal consistency score and relational consistency score are increased as the clustering depth increases, and the hierarchical clustering tree with parent-child relationships is output. 5.The method of claim 4, wherein, The temporal consistency score is obtained by calculating and normalizing the distance between all temporal subvector pairs within two nodes using Dynamic Time Warping (DTW). The relation consistency score is obtained by measuring the difference in relation type distribution between two nodes using KL divergence and converting it into similarity. 6.The method of claim 1, wherein, The step of acquiring metadata of target domain-related corpora and storing it in the event ontology modeling corpus includes: Based on the target domain specified by the user, the AI agent crawls multi-source heterogeneous corpora in real time from open sources including at least arXiv, Google Scholar and general web pages; The large language model is called to calculate the relevance score between the crawled corpus and the target domain, and the corpus with a relevance score higher than a preset threshold is used as the target domain corpus. The metadata of the target domain corpus is stored in the event ontology modeling corpus. The metadata includes at least the source, title, author, year, and storage path.
7. The method of claim 1, wherein the method further comprises: By continuously monitoring new publicly available corpora using an AI agent, and when the average similarity between the new corpora and the dynamic event vectors of existing ontologies is lower than a preset update threshold, the ontology file and text report are updated incrementally.
8. An event ontology schema construction apparatus assisted by a large model, characterized by, include: The event ontology modeling corpus generation module is used to obtain metadata of relevant corpora in the target domain and store them in the event ontology modeling corpus; The event element extraction module is used to extract event elements from the text in the event ontology modeling corpus using a large language model with prompts and fine-tuning, to obtain event quintuples and relationships between events. The deep semantic representation module is used to input the event quintuples into the deep semantic representation model to generate semantic vectors, temporal vectors, and relational vectors. The semantic-temporal-relational aggregation module is used to normalize and complete the dimensions of the semantic vector, temporal vector and relational vector of the same event. Then, taking the semantic vector as the main body, it dynamically adjusts the fusion weight of the temporal vector and relational vector based on the cosine similarity of the semantic vector of the event with the semantic vectors of all other events to generate a fused dynamic event vector. The first processing module is used to take the dynamic event vector as the initial leaf node and iteratively merge it using a time-series-relationship-enhanced hierarchical clustering algorithm to obtain a hierarchical clustering tree with parent-child relationships. The second processing module is used to call the large language model to generate a general Chinese class name for each non-leaf node in the hierarchical clustering tree based on all event quintuples under that node, and obtain the event ontology skeleton with class name. The event ontology generation module is used to map the classes in the event ontology skeleton to OWL ontology classes, the event quintuples to OWL individuals, and the event relationship triples to OWL object properties, thereby obtaining an ontology file that is serialized to conform to the RDF / OWL specification and realizing the construction of the event ontology pattern.
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 event ontology pattern construction method assisted by 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 event ontology schema construction method assisted by any one of claims 1-7.