Ontology construction method, apparatus, device and computer-readable storage medium

CN122570735APending Publication Date: 2026-08-14SHANDONG CVICSE MIDDLEWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-25
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

[0004]有鉴于此,本发明的目的在于提供一种本体构建方法、装置、设备及计算机可读存储介质,解决了现有技术中本体构建效率低和准确性差的问题

Benefits of technology

[0016]由上述技术方案可以看出,本发明通过对目标领域的文本数据进行词汇语义特征学习与编码,结合词汇在目标领域内的重要程度和上下文关联特征进行权重自适应计算,得到词汇语义相似度;通过对文本数据进行语法成分划分和词汇间语法关联关系挖掘,并结合目标领域的句式模板库得到词汇句法关系;利用领域知识图谱提供的先验知识,根据词汇语义相似度与词汇句法关系,对文本数据进行语境化语义消解,得到语用消解结果;将词汇语义相似度、词汇句法关系和语用消解结果进行融合,得到语义关联信息;基于语义关联信息,结合多源异构数据融合后的标准化格式数据,构建得到目标领域的知识图谱;以知识图谱为基础,生成目标领域的本体。本发明的有益效果在于:通过对领域文本开展词汇语义特征学习与自适应权重计算,能够显著提升领域词汇语义相似度的识别精度,避免通用模型对专业词汇表征不准的问题;结合领域句式模板库对句法分析结果进行校正,可有效解决领域特殊句式造成的成分划分、核心词定位及关系归属偏差,使句法关系更贴合专业表达习惯;基于语义相似度、句法关系与领域先验知识联合进行语境化语义消解,能够精准消除多义、歧义等语用冲突,大幅提升语义理解的可靠性;结合标准化多源数据构建知识图谱生成本体,使得最终构建的本体结构更完整、逻辑更严谨、领域适配性更强,同时有效提升知识融合效率与本体构建的自动化程度,降低对人工标注与专家干预的依赖。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122570735A_ABST
    Figure CN122570735A_ABST
Patent Text Reader

Abstract

This invention discloses an ontology construction method, apparatus, device, and computer-readable storage medium, applied in the field of computer technology. The method includes: learning and encoding lexical semantic features of text data; adaptively calculating lexical semantic similarity by combining importance and contextual features; segmenting text data into grammatical components and mining grammatical relationships between words, and obtaining lexical syntactic relations by combining sentence template libraries; using prior knowledge provided by a domain knowledge graph, performing contextualized semantic deconstruction of text data based on lexical semantic similarity and lexical syntactic relations to obtain pragmatic deconstruction results; fusing lexical semantic similarity, lexical syntactic relations, and pragmatic deconstruction results to obtain semantic association information; constructing a knowledge graph of the target domain by combining standardized format data after fusing multi-source heterogeneous data; and generating an ontology based on the knowledge graph. This invention improves the efficiency and accuracy of ontology model construction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to an ontology construction method, apparatus, device, and computer-readable storage medium. Background Technology

[0002] With the rapid development of information technology, knowledge management and intelligent applications are becoming increasingly important in various fields. Ontology modeling (i.e., the ontology construction process), as a key technology for knowledge representation and organization, plays a decisive role in improving the intelligence level of systems. Currently, both manual and semi-automatic ontology construction require a large amount of human intervention, resulting in a time-consuming and labor-intensive modeling process that cannot quickly respond to rapidly changing knowledge needs. Furthermore, manual construction is prone to subjective bias, while semi-automatic construction lacks the ability to handle complex semantic relationships, all of which affect the accuracy of ontology models.

[0003] Therefore, improving the efficiency and accuracy of ontology construction is a pressing technical problem that needs to be solved. Summary of the Invention

[0004] In view of this, the purpose of the present invention is to provide an ontology construction method, apparatus, device and computer-readable storage medium, which solves the problems of low efficiency and poor accuracy in ontology construction in the prior art.

[0005] To address the aforementioned technical problems, this invention provides an ontology construction method, comprising: By learning and encoding the semantic features of words in the target domain text data, and combining the importance of words in the target domain and contextual features for adaptive weight calculation, the semantic similarity of words is obtained. The text data is segmented into grammatical components and the grammatical relationships between words are mined. Lexical syntactic relationships are obtained by combining the sentence template library of the target domain. By utilizing the prior knowledge provided by the domain knowledge graph, and based on the semantic similarity of the words and the syntactic relationship of the words, the text data is subjected to contextualized semantic decomposition to obtain pragmatic decomposition results; The semantic similarity of the words, the syntactic relations of the words, and the pragmatic resolution results are fused to obtain semantic association information; Based on the semantic association information, and combined with standardized format data after the fusion of multi-source heterogeneous data, a knowledge graph of the target domain is constructed. Based on the knowledge graph, an ontology for the target domain is generated.

[0006] Optionally, by learning and encoding lexical semantic features of text data in the target domain, and combining the importance of words in the target domain with contextual features for adaptive weight calculation, lexical semantic similarity is obtained, including: The text data is processed using a domain-specific word vector model to learn and encode lexical semantic features, thereby extracting lexical semantic representations. The domain-specific word vector model is a model obtained by fine-tuning the trainable parameters of a pre-trained language model based on a domain-specific training set as model input. The domain-specific training set is a training set constructed by segmenting, deduplicating, and standardizing unlabeled corpora in the target domain. The basic weights corresponding to the semantic representations of the words are determined based on the lexical importance graph; the lexical importance graph is a graph constructed based on a concept set annotated by domain experts. Based on the contextual features, lexical and syntactic functional features, and lexical co-occurrence association strength features of the current text, dynamic correction coefficients are calculated in real time, and the basic weights and dynamic correction coefficients are fused to obtain comprehensive adaptive weights. Calculate the cosine similarity between words, and multiply the cosine similarity by the comprehensive adaptive weight to obtain the semantic similarity of the words.

[0007] Optionally, lexical and syntactic relationships are obtained by performing grammatical component segmentation and lexical syntactic relation mining on the text data, and combining it with the sentence template library of the target domain, including: The text data is decomposed into grammatical components and its logical relationships are mined to obtain initial syntactic analysis results that include text grammatical functions, text hierarchical relationships, grammatical dependencies between words, and collocation rules between words. By combining the sentence template library, the initial syntactic analysis results are corrected for deviations to obtain the lexical syntactic relations; the deviations include at least component deviations, keyword positioning deviations, and grammatical relation deviations; the domain sentence template library includes at least long and difficult sentence splitting templates, passive sentence conversion templates, and professional fixed sentence templates.

[0008] Optionally, utilizing prior knowledge provided by a domain knowledge graph, and based on the semantic similarity of the words and the syntactic relationship between the words, contextualized semantic decomposition is performed on the text data to obtain pragmatic decomposition results, including: Extract the context of the target sentence and construct a local context vector; the target sentence is any sentence in the text data. The pragmatic resolution result is obtained by combining the prior knowledge provided by the domain knowledge graph with the local context vector, and by performing ambiguity resolution on the text data based on the semantic similarity of the words and the syntactic relations of the words; the ambiguity resolution includes at least polysemy resolution, metaphor or metonymy resolution and implicit relation mining.

[0009] Optionally, the lexical semantic similarity, the lexical syntactic relations, and the pragmatic resolution results are fused to obtain semantic association information, including: The lexical semantic similarity, the lexical syntactic relations, and the pragmatic resolution results are uniformly converted into semantic feature vectors of the same dimension to obtain the conversion result. The transformation results are weighted and fused according to the domain semantic priority to obtain comprehensive semantic features; The comprehensive semantic features are subjected to semantic conflict verification. Based on the verified comprehensive semantic features, standardized semantic association triples between concepts are generated as the semantic association information.

[0010] Optionally, based on the knowledge graph, an ontology for the target domain is generated, including: The nodes of the knowledge graph are converted into concepts of the ontology, the edges of the knowledge graph are converted into object relations of the ontology, and the attributes and attribute values ​​of the knowledge graph are converted into data attributes and instance constraints of the ontology.

[0011] Optionally, based on the semantic association information and combined with standardized format data obtained from the fusion of multi-source heterogeneous data, a knowledge graph of the target domain is constructed, including: Receive heterogeneous knowledge data from different data sources, and convert the heterogeneous knowledge data into the standard format data through a custom unified data format conversion method; Based on semantic association features and ontology specifications, the standard format data is subjected to concept matching and relationship correspondence processing. Concepts and relationships from different sources are semantically aligned and uniformly mapped to the same semantic space. This data is then fused with the knowledge graph initially constructed based on the semantic association information to form a knowledge graph for the target domain.

[0012] The present invention also provides an apparatus for constructing an organism, comprising: The lexical semantic analysis module is used to learn and encode lexical semantic features from text data in the target domain, and to perform adaptive weight calculation by combining the importance of words in the target domain and contextual features to obtain lexical semantic similarity. The syntactic analysis module is used to perform grammatical component segmentation and grammatical relationship mining between words in the text data, and to obtain lexical syntactic relationships by combining the sentence template library of the target domain; The pragmatic analysis module is used to utilize the prior knowledge provided by the domain knowledge graph to perform contextualized semantic decomposition on the text data based on the semantic similarity of the words and the syntactic relationship of the words, so as to obtain the pragmatic decomposition result; The fusion module is used to fuse the lexical semantic similarity, the lexical syntactic relations, and the pragmatic resolution results to obtain semantic association information; The knowledge graph construction module is used to construct a knowledge graph of the target domain based on the semantic association information and combined with standardized format data after the fusion of multi-source heterogeneous data. The ontology generation module is used to generate an ontology for the target domain based on the knowledge graph.

[0013] The present invention also provides an ontology construction device, comprising: Memory, used to store computer programs; A processor for implementing the ontology construction method described above when executing the computer program.

[0014] The present invention also provides a computer-readable storage medium storing computer-executable instructions, which, when loaded and executed by a processor, implement the ontology construction method described above.

[0015] The present invention also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the ontology construction method described above.

[0016] As can be seen from the above technical solution, this invention learns and encodes the semantic features of words in the target domain text data, and performs adaptive weight calculation by combining the importance of words in the target domain and contextual features to obtain semantic similarity of words; it divides the text data into grammatical components and mines the grammatical relationships between words, and obtains grammatical relationships of words by combining the sentence template library of the target domain; it uses the prior knowledge provided by the domain knowledge graph to perform contextualized semantic deconstruction of the text data according to the semantic similarity of words and the grammatical relationships of words, and obtains pragmatic deconstruction results; it fuses the semantic similarity of words, the grammatical relationships of words and the pragmatic deconstruction results to obtain semantic association information; based on the semantic association information, it constructs a knowledge graph of the target domain by combining standardized format data after the fusion of multi-source heterogeneous data; and it generates an ontology of the target domain based on the knowledge graph. The beneficial effects of this invention are as follows: By performing lexical semantic feature learning and adaptive weight calculation on domain texts, the recognition accuracy of domain lexical semantic similarity can be significantly improved, avoiding the problem of inaccurate representation of professional vocabulary by general models; by combining domain sentence template library to correct syntactic analysis results, it can effectively solve the bias in component division, core word positioning and relation attribution caused by domain-specific sentence patterns, making syntactic relations more in line with professional expression habits; based on semantic similarity, syntactic relations and domain prior knowledge, contextualized semantic resolution can be jointly performed, which can accurately eliminate pragmatic conflicts such as polysemy and ambiguity, and greatly improve the reliability of semantic understanding; by combining standardized multi-source data to construct knowledge graphs to generate ontology, the final constructed ontology structure is more complete, logically more rigorous and domain-adaptable, while effectively improving the efficiency of knowledge fusion and the degree of automation of ontology construction, reducing the dependence on manual annotation and expert intervention.

[0017] In addition, the present invention also provides an apparatus for constructing an object, a device, and a computer-readable storage medium, which also have the above-mentioned beneficial effects. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0019] Figure 1 A flowchart of an ontology construction method provided in an embodiment of the present invention; Figure 2 A flowchart illustrating an ontology construction method provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of a body construction device provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of a body construction device provided in an embodiment of the present invention. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0021] First, several terms used in this invention will be explained: Ontology modeling: The process of constructing a domain ontology, which formally represents domain knowledge by clearly defining elements such as concepts, relationships, and attributes, making it easier for computers to understand and process.

[0022] Ontology (Ontology Model): An ontology is a standardized semantic model built for a specific domain. It defines unified representations and constraints of core concepts, relationships, and attributes within the domain, eliminates semantic ambiguities between different knowledge sources, and provides a unified logical framework for domain knowledge sharing, reasoning, and machine understanding. An ontology mainly includes: a set of core domain concepts, attribute and data constraints of concepts, semantic relationships between concepts, a hierarchical classification system of concepts, and common logical rules within the domain.

[0023] Semantic association: The semantic-level connection between different concepts and entities. Mining semantic associations can reveal the inherent logic between knowledge.

[0024] Knowledge graphs store and represent knowledge in a graphical structure, where nodes represent entities and edges represent relationships between entities, and are used to intuitively display and quickly retrieve knowledge.

[0025] With the rapid development of information technology, knowledge management and intelligent applications are becoming increasingly important in various fields. Ontology modeling, as a key technology for knowledge representation and organization, plays a decisive role in improving the intelligence level of systems. For example, in the medical field, accurate ontology models can help doctors quickly acquire and understand disease knowledge, supporting precise diagnostic decisions; in the financial field, they can assist in risk assessment and investment decisions. However, current ontology modeling technology faces many challenges, limiting its effectiveness in practical applications. This results in existing ontology models performing poorly in supporting intelligent applications and failing to adequately meet the needs of intelligent question answering, intelligent decision-making, and other applications for knowledge reasoning and semantic understanding. Specific reasons are as follows: both manual and semi-automatic ontology construction require significant human intervention, making the modeling process time-consuming and labor-intensive, unable to quickly respond to rapidly changing knowledge requirements; manual construction is prone to subjective bias, and semi-automatic construction lacks the ability to handle complex semantic relationships, both affecting the accuracy of ontology models.

[0026] Therefore, this invention optimizes the ontology modeling method, enabling the constructed ontology model to better support intelligent applications and improve the accuracy and efficiency of these applications. Please refer to [link / reference needed] for details. Figure 1 , Figure 1 A flowchart illustrating an ontology construction method provided in an embodiment of the present invention. The method may include: S101: By learning and encoding the semantic features of words in the target domain text data, and combining the importance of words in the target domain with contextual features, the semantic similarity of words is obtained through adaptive weight calculation.

[0027] Each step in this embodiment can be executed by a designated electronic device, which can be a server, a portable terminal, or other forms. It should be noted that constructing an ontology (ontology model) for the target domain using this method can provide core support for knowledge management and intelligent application systems in multiple domains. For example, in an intelligent question-answering system, the domain ontology constructed based on this embodiment can standardize and systematize domain knowledge, accurately analyze the semantic connotation of user questions, and then match optimal knowledge resources to provide more targeted, high-quality answers. In an information retrieval system, the ontology constructed in this embodiment can realize semantic association and structured organization of knowledge, breaking the keyword limitations of traditional retrieval, optimizing the relevance ranking of retrieval results, and significantly improving retrieval accuracy. In a semantic search engine, the concept association system built based on the ontology can deeply understand the user's retrieval intent, achieve intelligent cross-semantic matching, and achieve more efficient and intelligent semantic search. In an intelligent decision support system, the ontology constructed in this embodiment can systematically integrate and logically reason about domain knowledge, clearly present the relationships between knowledge, provide decision-makers with comprehensive and accurate knowledge support, and assist them in making more scientific decisions. This embodiment does not specifically limit the target domain. For example, it could be in the energy sector, such as power grid dispatching, energy consumption management, and photovoltaic power generation; or it could be in the manufacturing sector, such as equipment fault diagnosis and intelligent manufacturing.

[0028] It should be noted that the structured text in this embodiment refers to professional text data within the target domain that has fixed sentence patterns, standard grammar, and clear discourse structure. It requires processing steps such as semantic feature learning and syntactic analysis to extract lexical associations, grammatical relationships, and semantic logic, providing core semantic association basis for knowledge graph construction. This step transforms the words in the structured text of the target domain into feature vectors with domain semantic information through lexical semantic feature learning and encoding, achieving accurate expression of professional vocabulary semantics. Based on this, considering the professional importance of words in the target domain and the closeness of their association in the current text context, differentiated calculation weights are assigned to different words through dynamic adaptive methods, rather than using fixed weights or general calculation rules. This yields lexical semantic similarity that truly reflects the degree of semantic association between domain words, effectively improving the accuracy and adaptability of domain-specific vocabulary semantic similarity calculation.

[0029] Furthermore, the above-mentioned method learns and encodes lexical semantic features from text data in the target domain, and then performs adaptive weight calculation by combining the importance of words in the target domain with contextual features to obtain lexical semantic similarity. Specifically, this can include: Step 11: Use a domain-specific word vector model to learn and encode the lexical semantic features of the text data, and extract the lexical semantic representation.

[0030] It should be noted that the domain-specific word vector model is a model obtained by fine-tuning the trainable parameters of a pre-trained language model using a domain-specific training set as input. The domain-specific training set is a training set constructed by segmenting, deduplicating, and standardizing unlabeled corpora from the target domain. For example, based on a general BERT (Bidirectional Encoder Representations from Transformers) pre-trained model, the parameters of the bottom 10 Transformer layers are frozen, and only the top 2 layers are retained for domain-specific fine-tuning to avoid covering general semantic features and reduce training costs. A large-scale unlabeled corpus (industry standards, operation and maintenance reports, research papers, etc.) is collected from the target domain, segmented, deduplicated, and standardized to construct the domain-specific training set. Using a domain-specific training set as input, the top-level parameters are fine-tuned. The training objectives are a masked language model (MLM) and next sentence prediction (NSP), which enhances the model's ability to represent the semantics of domain-specific terms and sentence structures. This allows the model to fully consider the semantic characteristics and contextual information of domain-specific vocabulary and capture the semantic features of words in the domain more accurately.

[0031] Step 12: Determine the basic weights corresponding to the semantic representations of words based on the word importance graph.

[0032] The lexical importance graph in this step is constructed based on a concept set annotated by domain experts, and the lexical importance graph provides static base weights. For example, core terms (such as hot spots in photovoltaic modules and myocardial infarction in the medical field) are assigned base weight values ​​of 0.8-0.95, and common terms are assigned base weight values ​​of 0.5-0.7.

[0033] Step 13: Based on the contextual features, lexical and syntactic functional features, and lexical co-occurrence association strength features of the current text, calculate the dynamic correction coefficient in real time, and fuse the basic weight and the dynamic correction coefficient to obtain the comprehensive adaptive weight.

[0034] Specifically, semantic extraction can be performed on the sentence containing the current word and adjacent text fragments to determine the semantic environment, positional information, and semantic relationships between the word and its surrounding text, thereby obtaining contextual features. By performing grammatical component segmentation and syntactic structure analysis on the text, the grammatical role (such as subject, predicate, object, modifier, etc.) of the current word in the sentence can be identified to obtain lexical syntactic function features. By statistically analyzing the co-occurrence frequency, co-occurrence distance, and co-occurrence patterns of the target word and surrounding words within a set window, the co-occurrence association strength features of the words can be calculated.

[0035] Step 14: Calculate the cosine similarity between words and multiply the cosine similarity by the comprehensive adaptive weight to obtain the semantic similarity of words.

[0036] This allows the weights to dynamically adapt to the textual context, ensuring that similarity calculations conform to domain semantic logic. The final lexical semantic similarity = cosine similarity. Basic weights Dynamic adjustment coefficient. Specifically, the calculation process of cosine similarity may include: taking the semantic feature vectors corresponding to two words as the calculation objects, and extracting the feature values ​​of each dimension in the semantic feature vectors respectively; calculating the ratio of the inner product of the two semantic feature vectors to the product of the vector magnitudes according to the cosine similarity calculation formula; using this ratio to quantify the semantic closeness between words, thus obtaining the cosine similarity between words. This method can effectively characterize the directional difference of the semantics of two words in the vector space; the closer the value is to 1, the stronger the semantic relationship between the two words.

[0037] S102: By dividing text data into grammatical components and mining grammatical relationships between words, and combining this with a sentence template library of the target domain, lexical syntactic relationships are obtained.

[0038] This step involves syntactic analysis of the structured text. First, the text sentences are divided into grammatical components, identifying basic grammatical units such as subject, predicate, object, attributive, and adverbial, clarifying the structure and function of each unit. Simultaneously, the grammatical relationships between words in the text, such as modification, control, coordination, and subordination, are explored to form preliminary syntactic relation expressions. Based on this, a domain-specific sentence template library is introduced as a reference standard to correct and optimize the preliminary syntactic results. This corrects biases in component segmentation, core vocabulary location, and grammatical relation attribution caused by special or specialized sentence structures, ultimately forming accurate and regular lexical-syntactic relations that conform to domain-specific language norms.

[0039] Furthermore, the above-mentioned methods, through grammatical component segmentation and syntactic relationship mining of text data, combined with a sentence template library of the target domain, yield lexical and syntactic relationships, which may specifically include: Step 21: Decompose the text data into grammatical components and mine logical relationships to obtain initial syntactic analysis results that include text grammatical functions, text hierarchical relationships, grammatical dependencies between words, and collocation rules between words.

[0040] This step yields initial syntactic analysis results containing two aspects: first, the grammatical functions and hierarchical relationships at the overall text level, which reflect the role of each grammatical unit in the sentence and the order of its structure; and second, the grammatical dependencies and collocation rules between individual words, which clarify the constraints such as modification, domination, and parallelism between words.

[0041] Step 22: Combine the sentence template library to correct the bias of the initial syntactic analysis results and obtain the lexical syntactic relations.

[0042] It should be noted that a dedicated sentence template library is built for typical sentence structures in the target domain. This library includes at least three types of templates: long and complex sentence decomposition templates, passive sentence conversion templates, and professional fixed sentence templates. The long and complex sentence decomposition templates automatically break down long sentences with a subject-multiple modifier-predicate-object structure into core semantic units. The passive sentence conversion templates convert passive sentences in structured text (such as "hot spots were detected in the component") into active semantic triples. The professional fixed sentence templates are designed for domain-specific sentences (such as "photovoltaic power degradation is caused by hidden cracks in the component"), with pre-defined semantic extraction rules.

[0043] This step uses a domain-specific sentence template library as a reference standard to perform targeted deviation correction on the initial syntactic analysis results obtained above, ultimately yielding accurate and standardized lexical-syntactic relationships. The deviations requiring correction mainly fall into three categories: component deviation, referring to errors or unclear boundaries in the initial syntactic analysis of grammatical components such as subject, predicate, and object, such as misclassifying domain-specific phrases as attributives instead of core objects; keyword positioning deviation, referring to the failure to accurately identify keywords and professional terms carrying core domain information in sentences, or misclassifying non-core words as keywords; and grammatical relationship deviation, referring to errors in judging grammatical connections such as modification, dominance, coordination, and subordination between words, such as misclassifying coordination relationships as modification relationships. Therefore, this embodiment corrects these three types of deviations one by one by comparing the component composition, keyword positions, and grammatical relationship paradigms of domain-standard sentences in the sentence template library, ensuring that the final lexical-syntactic relationships conform to the language expression habits of the target domain and accurately reflect the grammatical connections between words.

[0044] S103: Utilizing prior knowledge provided by the domain knowledge graph, contextualized semantic decomposition is performed on text data based on lexical semantic similarity and lexical syntactic relationship to obtain pragmatic decomposition results.

[0045] It should be noted that the domain knowledge graph in this embodiment is a prior knowledge base / basic domain common sense base, which can be obtained through manual organization, public domain knowledge, existing dictionaries, standards and specifications, general domain ontology, etc. This step calls on the existing domain prior knowledge (including domain concept associations, terminology definitions, professional semantic rules, etc.) in the target domain knowledge graph as the core reference for semantic resolution. Secondly, combining the lexical semantic similarity (representing the degree of semantic association between words) and lexical syntactic relations (representing the grammatical constraint relations between words) obtained in steps S101 and S102, a comprehensive judgment is made on polysemous words, ambiguous phrases, etc. in the structured text from both semantic and syntactic levels to eliminate the semantic ambiguity of words in specific contexts, clarify their accurate domain semantic connotations, and obtain standardized and unambiguous pragmatic resolution results, providing a precise semantic foundation for subsequent semantic association information fusion and knowledge graph construction.

[0046] Furthermore, by utilizing prior knowledge provided by domain knowledge graphs, and based on lexical semantic similarity and lexical syntactic relationships, contextualized semantic deconstruction is performed on text data to obtain pragmatic deconstruction results, which may specifically include: Step 31: Extract the context of the target sentence and construct a local context vector; the target sentence is any sentence in the text data.

[0047] This step extracts the context of the target sentence (e.g., 3-5 sentences before and after it), constructs a local context vector, and captures the contextual information of the sentence.

[0048] Step 32: Combine the prior knowledge provided by the domain knowledge graph with the local context vector, and perform ambiguity resolution on the text data based on lexical semantic similarity and lexical syntactic relations to obtain pragmatic resolution results.

[0049] It should be noted that ambiguity resolution includes at least polysemous word resolution, metaphor or metonymic word resolution, and implicit relation mining. Polysemous word resolution: For example, "threshold" refers to entry standards in the financial field and building components in the construction field, which can be accurately determined through context and knowledge graphs; Metaphor / metonymic word resolution: For metaphorical expressions such as "time is money" and "hot spots on components," the true semantic meaning can be identified through the association relationships in the knowledge graph; Implicit relation mining: Based on knowledge graph reasoning, implicit semantic relationships (such as causality, hierarchical relationship) not directly expressed in the sentence are extracted.

[0050] S104: Integrate lexical semantic similarity, lexical syntactic relations, and pragmatic resolution results to obtain semantic association information.

[0051] In the process of integration, the results of pragmatic resolution can be used as a basis, combined with the semantic similarity of words to supplement the semantic association strength between words, and the logical rationality of semantic association can be based on the syntactic relationship of words. The three can mutually verify, complement and improve each other, and finally form a unified semantic association information that covers the semantics of words, grammatical association, and unambiguous semantic connotation, clearly presenting the inherent semantic connection between words, phrases and sentences in the structured text.

[0052] Furthermore, the above-mentioned fusion of lexical semantic similarity, lexical syntactic relations, and pragmatic resolution results yields semantic association information, which may specifically include: Step 41: Convert the lexical semantic similarity, lexical syntactic relations and pragmatic resolution results into semantic feature vectors of the same dimension to obtain the conversion results.

[0053] This step unifies the semantic similarity of words, syntactic relationships of words, and pragmatic resolution results into semantic feature vectors of the same dimension, eliminating the representational differences between different types of information. For example, the semantic similarity of words, syntactic relationships of words, and pragmatic resolution results are encoded separately and then uniformly converted into semantic feature vectors with consistent structure and the same dimension (i.e., semantic, syntactic, and pragmatic information are all converted into quantifiable and computable vector forms), ultimately obtaining a unified-dimensional conversion result, ensuring that different types of feature information can be effectively combined.

[0054] Step 42: Weight and fuse the transformation results according to the domain semantic priority to obtain comprehensive semantic features.

[0055] This step involves weighted fusion of lexical semantic similarity, lexical syntactic relations, and pragmatic resolution results according to domain semantic priority, resulting in comprehensive semantic features. It should be noted that the aforementioned domain semantic priority is not specifically limited and can be set according to the professional characteristics and application needs of the target domain.

[0056] Step 43: Perform semantic conflict verification on the comprehensive semantic features. Based on the verified comprehensive semantic features, map and generate standardized semantic association triples between concepts as semantic association information.

[0057] This step involves performing semantic conflict verification on the comprehensive semantic features, eliminating logically contradictory features (such as inconsistent semantic representations, logical conflicts, etc.), and retaining valid semantic information that conforms to the domain knowledge logic. Finally, based on the verified comprehensive semantic features, standardized semantic association triples between concepts are generated (i.e., a fixed format containing concept 1 + association relationship + concept 2).

[0058] S105: Based on semantic association information and combined with standardized format data after the fusion of multi-source heterogeneous data, a knowledge graph of the target domain is constructed.

[0059] This step addresses the problem that ontology built on a single data source cannot encompass the rich knowledge in multi-source data, thus preventing the ontology model from meeting comprehensive knowledge requirements in practical applications. It introduces multi-source heterogeneous data. It should be noted that in this embodiment, multi-source heterogeneous data refers to standardized data from different systems and formats that do not require deep semantic and syntactic analysis. This data already possesses clearly defined entities, attributes, and correspondences, and can be directly integrated with the aforementioned semantic association information to jointly participate in knowledge graph construction.

[0060] Furthermore, to ensure seamless integration of knowledge from different sources and improve the completeness of the ontology model, the aforementioned knowledge graph for the target domain is constructed based on semantic association information and standardized format data resulting from the fusion of multi-source heterogeneous data. Specifically, this may include: Step 51: Receive heterogeneous knowledge data from different data sources and convert the heterogeneous knowledge data into standard format data using a custom unified data format conversion method.

[0061] Specifically, the system receives heterogeneous knowledge data from different data sources (such as different systems, databases, and file formats). Due to their diverse origins, this data exhibits varying formats and specifications (e.g., some are in tabular form, some are structured documents, and some are standardized data entries). A custom, unified data format conversion method is employed, combining the knowledge specifications of the target domain with the needs of subsequent knowledge graph construction, to establish a unified data format standard. This standard is used to convert various heterogeneous knowledge data, align fields, and standardize content, eliminating format differences between different data sources. All heterogeneous knowledge data is then converted into a standardized, uniformly formatted data, providing a standardized data foundation for subsequent integration with semantic association information obtained from structured text analysis and joint participation in knowledge graph construction. This ensures efficient compatibility and collaborative utilization of multi-source data.

[0062] For example, for relational databases, specific mapping rules are designed to convert database table structures and data into RDF (Resource Description Frame Triple) triples; for text files, information extraction techniques are used to extract key information and convert it into RDF format. Regarding semantic mapping, a semantic mapping algorithm is designed based on semantic similarity calculation and ontology alignment techniques. This algorithm calculates the semantic similarity of concepts from different knowledge sources and, combined with ontology alignment techniques, maps concepts and relations from different knowledge sources to the same semantic space, effectively eliminating semantic ambiguity. For example, for the concept of "disease" from different medical databases, the semantic mapping algorithm accurately identifies their consistency and integrates related knowledge into the same knowledge graph, improving the accuracy and efficiency of knowledge fusion.

[0063] Step 52: Based on semantic association features and ontology specifications, perform concept matching and relationship correspondence processing on standard format data, semantically align concepts and relationships from different sources, map them uniformly to the same semantic space, and integrate them with the knowledge graph initially constructed based on semantic association information to form a knowledge graph of the target domain.

[0064] Concept matching unifies semantically consistent concepts from different data sources (e.g., equipment failure and equipment anomaly in different documents) to the same concept in the ontology specification, avoiding conceptual confusion. Relationship mapping organizes the relationships between concepts in different data (e.g., the relationship between equipment and fault detection), mapping scattered relational information to the relation specification of the ontology system. The purpose of semantic alignment is to eliminate differences in concept expression and relationship definition caused by different data sources; to map all concepts and relationships to the same semantic space (i.e., following the same set of ontology specifications and semantic standards), ensuring that knowledge from different sources is conflict-free, non-duplicative, and logically consistent. These aligned and matched concepts and relationships are then integrated with a knowledge graph initially constructed based on structured text analysis, supplementing the entities and relationships in the graph, removing duplicate information, and correcting conflicting content, ultimately forming a complete, standardized, and logically rigorous knowledge graph, achieving unified integration and standardized presentation of multi-source knowledge.

[0065] The above-mentioned preliminary knowledge graph construction based on semantic association information can refer to the following example: Taking the field of mechanical equipment fault diagnosis as an example, by performing semantic and syntactic analysis on the equipment technical text, semantic association triples such as (bearing wear, leading to abnormal vibration), (excessive speed, leading to abnormal vibration), and (abnormal vibration, causing a decrease in accuracy) are extracted. Based on these triples, an initial knowledge graph containing entity nodes and associated edges is constructed.

[0066] S106: Generate an ontology for the target domain based on a knowledge graph.

[0067] This step relies on the existing knowledge graph during the ontology construction process, which can directly reuse the integrated concepts, entity relationships and semantic structures, reducing the repetitive modeling work of building the ontology from scratch. At the same time, it ensures that the ontology is semantically consistent and structurally complete with multi-source knowledge. It can also improve the logical completeness and reasoning foundation of the ontology by leveraging the association relationships of the knowledge graph, making the ontology more in line with actual business scenarios and easier to update dynamically.

[0068] Furthermore, the above-mentioned generation of an ontology for the target domain based on the knowledge graph can specifically include: converting nodes of the knowledge graph into concepts of the ontology, converting edges of the knowledge graph into object relations of the ontology, and converting attributes and attribute values ​​of the knowledge graph into data attributes and instance constraints of the ontology. In this way, while retaining all entities and relations of the knowledge graph, a structured, reasonable, reusable, and scalable domain ontology model is further formed. This upgrades domain knowledge from a loosely connected graph form to a standardized ontology with strict logical rules, facilitating subsequent knowledge sharing, system integration, intelligent reasoning, and business applications.

[0069] For example, nodes in the knowledge graph (such as photovoltaic panels and inverters) can be converted into concepts in the ontology, and edges between nodes (such as connections and causes) can be converted into relationships in the ontology. Further, an inference engine can be used to check for contradictions in the ontology, such as obvious errors like "a photovoltaic panel is both equipment and software." Further, it can be used for completion and correction, adding missing relationships, such as correcting incorrect definitions like "a hot spot fault will cause a temperature increase." Furthermore, the ontology can be updated and iterated; for example, if new operation and maintenance data or industry standards are introduced, the concepts and relationships in the ontology can be automatically updated without manual rewriting.

[0070] The ontology construction method provided in this embodiment of the invention proceeds as follows: S101: Lexical semantic features are learned and encoded from text data in the target domain, and weights are adaptively calculated by combining the importance of words in the target domain and contextual features to obtain lexical semantic similarity; S102: Lexical components are divided into grammatical components and grammatical relationships between words are mined from text data, and lexical syntactic relationships are obtained by combining sentence template libraries in the target domain; S103: Contextualized semantic resolution of text data is performed using prior knowledge provided by the domain knowledge graph, based on lexical semantic similarity and lexical syntactic relationships, to obtain pragmatic resolution results; S104: Lexical semantic similarity, lexical syntactic relationships, and pragmatic resolution results are fused to obtain semantic association information; S105: Based on semantic association information, and combined with standardized format data after fusion of multi-source heterogeneous data, a knowledge graph of the target domain is constructed; S106: An ontology of the target domain is generated based on the knowledge graph. This method significantly improves the accuracy of semantic similarity recognition of domain-specific words by learning lexical semantic features and adaptive weight calculation on domain-specific texts, avoiding the problem of inaccurate representation of professional vocabulary by general models. By combining a domain-specific sentence template library to correct syntactic analysis results, it effectively solves the biases in component segmentation, core word location, and relation attribution caused by domain-specific sentence structures, making syntactic relations more aligned with professional expression habits. Contextualized semantic resolution based on semantic similarity, syntactic relations, and domain prior knowledge accurately eliminates pragmatic conflicts such as polysemy and ambiguity, greatly improving the reliability of semantic understanding. Finally, by constructing a knowledge graph using standardized multi-source data to generate an ontology, the final ontology structure is more complete, logically rigorous, and domain-adaptable, while effectively improving knowledge fusion efficiency and the automation level of ontology construction, reducing reliance on manual annotation and expert intervention.

[0071] For a clearer understanding of this invention, please refer to the following details. Figure 2 , Figure 2 A flowchart illustrating an ontology modeling method provided in this embodiment of the invention may specifically include: The semantic association mining stage uses text data as input and involves two parallel analysis paths: a lexical semantic analysis path, which performs lexical semantic analysis on the text to calculate lexical semantic similarity; and a syntactic analysis path, which performs syntactic analysis on the text to obtain lexical syntactic relations. The results from both paths are then aggregated and proceed to the pragmatic analysis stage to eliminate contextual ambiguity and ultimately generate semantic association information, serving as the core foundation for subsequent knowledge graph construction.

[0072] Knowledge Graph Construction Phase: Based on the semantic association information output from the previous phase, a preliminary knowledge graph is first constructed. Simultaneously, external multi-source heterogeneous data is received and fused with the preliminary knowledge graph. The fusion outputs two types of results: standardized RDF format data; and a fused knowledge graph integrating multi-source information.

[0073] Ontology model generation phase: Taking the fused knowledge graph as input, the nodes, edges, and attributes in the graph are mapped to ontology concepts, object relationships, and data attributes through ontology model transformation steps, generating an initial ontology model. Subsequently, the ontology model optimization phase begins. The optimization process incorporates user feedback and new knowledge input, and verifies the model's logical consistency and semantic completeness through reasoning verification, ultimately outputting the optimized ontology model.

[0074] In the field of photovoltaic power plants, ontology is mainly used to unify the semantic standards of knowledge related to equipment, faults, parameters, operation and maintenance, and benefits. It provides a unified semantic foundation for intelligent supervision, automatic fault diagnosis, operation and maintenance decision-making reasoning, and multi-source data fusion retrieval, supporting the system to achieve automated and intelligent business judgment and knowledge reasoning. The following uses the intelligent supervision of distributed photovoltaic power plant assets as a practical application scenario to illustrate the above ontology construction method: Semantic association mining of text data: For text data (non-structured / semi-structured knowledge-descriptive data) such as photovoltaic operation and maintenance reports, equipment manuals, and fault records, semantic feature learning and encoding of lexical terms are used. Combined with the importance of lexical terms and contextual association features in the photovoltaic field, the semantic similarity of terms such as components, hot spots, and inverter off-grid protection is adaptively calculated. Simultaneously, grammatical component segmentation and association mining are performed, and combined with a photovoltaic sentence template library, lexical syntactic relationships such as component-occurrence-hot spot and inverter-trigger-off-grid protection are obtained. Based on this, prior knowledge from a photovoltaic knowledge graph is used, combined with semantic similarity and syntactic relationships, to perform contextualized semantic dissolution of the text data, eliminating terminological ambiguity and obtaining unambiguous pragmatic dissolution results. Finally, the semantic similarity, syntactic relationships, and pragmatic dissolution results are integrated to form the semantic association information of the text.

[0075] Multi-source data standardization and knowledge graph construction: This involves receiving heterogeneous data from multiple sources, including photovoltaic equipment sensor data, financial revenue data, and local subsidy policies (structured / semi-structured fact and rule-based data). This data is then uniformly converted to the RDF standard format using custom rules, and a conflict-free fusion of cross-source data is achieved based on a two-layer semantic mapping to obtain standardized format data. Combined with semantic association information obtained through text mining, concepts are used as nodes and semantic relationships as edges to construct a preliminary knowledge graph for the distributed photovoltaic power station field. This graph is then integrated with the multi-source data to form a complete photovoltaic field knowledge graph.

[0076] Ontology Model Conversion and Optimization: Based on a photovoltaic (PV) knowledge graph, nodes in the graph (such as PV modules, inverters, and fault types) are converted into core concepts of the ontology. Edges in the graph (such as cause, association, and trigger) are converted into object relationships of the ontology. Attributes and attribute values ​​in the graph (such as temperature > 65℃ and power decay > 10%) are converted into data attributes and instance constraints of the ontology, automatically generating a dedicated ontology model for distributed PV power plants. Then, combined with user feedback and new O&M data input, the ontology model is inferred, verified, and iteratively optimized using PV-specific inference rules (such as a hot spot warning if PV panel temperature > 65℃ and power decay > 10%), forming a standardized PV ontology model that supports asset status assessment, fault warning, and revenue optimization decisions. This ontology model construction method is a fully automated closed-loop process, replacing traditional manual cross-source integration and analysis, greatly improving efficiency and solving the pain points of data fragmentation, semantic understanding bias, and decision lag in traditional PV monitoring systems, achieving intelligent management of the entire asset lifecycle.

[0077] The ontology construction apparatus provided in the embodiments of the present invention will be described below. The ontology construction apparatus described below and the ontology construction method described above can be referred to in correspondence.

[0078] Please refer to the details. Figure 3 , Figure 3 A schematic diagram of a body construction device provided in an embodiment of the present invention may include: The lexical semantic analysis module 100 is used to learn and encode lexical semantic features of text data in the target domain, and perform adaptive weight calculation by combining the importance of words in the target domain and contextual features to obtain lexical semantic similarity. The syntactic analysis module 200 is used to perform grammatical component segmentation and grammatical relationship mining between words on the text data, and to obtain lexical syntactic relationships by combining the sentence template library of the target domain; The pragmatic analysis module 300 is used to utilize the prior knowledge provided by the domain knowledge graph to perform contextualized semantic decomposition on the text data based on the semantic similarity of the words and the syntactic relationship of the words, so as to obtain the pragmatic decomposition result; The fusion module 400 is used to fuse the lexical semantic similarity, the lexical syntactic relations and the pragmatic resolution results to obtain semantic association information; The knowledge graph construction module 500 is used to construct a knowledge graph of the target domain based on the semantic association information and combined with standardized format data after the fusion of multi-source heterogeneous data. The ontology generation module 600 is used to generate an ontology for the target domain based on the knowledge graph.

[0079] Furthermore, based on the above embodiments, the lexical semantic analysis module 100 may include: The lexical semantic representation extraction unit is used to learn and encode lexical semantic features of the text data using a domain-specific word vector model, and extract lexical semantic representations; the domain-specific word vector model is a model obtained by fine-tuning the trainable parameters of a pre-trained language model based on a domain-specific training set as model input; the domain-specific training set is a training set constructed by segmenting, deduplicating, and standardizing the unlabeled corpus of the target domain. The basic weight determination unit is used to determine the basic weights corresponding to the semantic representation of the words based on the lexical importance graph; the lexical importance graph is a graph constructed based on a concept set annotated by domain experts; The dynamic correction coefficient calculation unit is used to calculate the dynamic correction coefficient in real time based on the contextual features, lexical and syntactic functional features and lexical co-occurrence association strength features of the current text, and to fuse the basic weight and the dynamic correction coefficient to obtain the comprehensive adaptive weight. The lexical semantic similarity calculation unit is used to calculate the cosine similarity between words and multiply the cosine similarity by the comprehensive adaptive weight to obtain the lexical semantic similarity.

[0080] Furthermore, based on the above embodiments, the syntactic analysis module 200 may include: The syntactic analysis unit is used to decompose the text data into grammatical components and mine logical relationships to obtain initial syntactic analysis results that include text grammatical functions, text hierarchical relationships, grammatical dependencies between words, and collocation rules between words. The deviation correction unit is used to correct the deviation of the initial syntactic analysis result in conjunction with the sentence template library to obtain the lexical syntactic relationship; the deviation includes at least component deviation, keyword positioning deviation and grammatical relationship deviation; the domain sentence template library includes at least long and difficult sentence splitting template, passive sentence conversion template and professional fixed sentence template.

[0081] Furthermore, based on the above embodiments, the pragmatic analysis module 300 may include: A local context vector construction unit is used to extract the context of the target sentence and construct a local context vector; the target sentence is any sentence in the text data; The ambiguity resolution unit is used to combine the prior knowledge provided by the domain knowledge graph with the local context vector, and to perform ambiguity resolution on the text data according to the lexical semantic similarity and the lexical syntactic relationship to obtain the pragmatic resolution result; the ambiguity resolution includes at least polysemy resolution, metaphor or metonymy resolution and implicit relation mining.

[0082] Furthermore, based on the above embodiments, the fusion module 400 may include: The transformation unit is used to uniformly convert the lexical semantic similarity, the lexical syntactic relationship, and the pragmatic resolution result into a semantic feature vector of the same dimension to obtain the transformation result. A weighting unit is used to perform weighted fusion of the transformation results according to the domain semantic priority to obtain comprehensive semantic features; The verification and mapping unit is used to perform semantic conflict verification on the comprehensive semantic features, and based on the verified comprehensive semantic features, to map and generate standardized inter-concept semantic association triples as the semantic association information.

[0083] Furthermore, based on the above embodiments, the ontology generation module 600 may include: The conversion unit is used to convert the nodes of the knowledge graph into concepts of the ontology, convert the edges of the knowledge graph into object relations of the ontology, and convert the attributes and attribute values ​​of the knowledge graph into data attributes and instance constraints of the ontology.

[0084] Furthermore, based on the above embodiments, the knowledge image construction module 500 may include: The format conversion unit is used to receive heterogeneous knowledge data from different data sources and convert the heterogeneous knowledge data into the standard format data through a custom unified data format conversion method. The mapping unit is used to perform concept matching and relationship correspondence processing on the standard format data according to semantic association features and ontology specifications, semantically align concepts and associations from different sources, map them uniformly to the same semantic space, and fuse them with the knowledge graph initially constructed based on the semantic association information to form a knowledge graph of the target domain.

[0085] It should be noted that the order of the modules and units in the above-mentioned body construction device can be changed without affecting the logic.

[0086] The ontology construction apparatus provided in this embodiment of the invention comprises: a lexical semantic analysis module 100, used to learn and encode lexical semantic features of text data in the target domain, and perform adaptive weight calculation by combining the importance of words in the target domain and contextual association features to obtain lexical semantic similarity; a syntactic analysis module 200, used to perform grammatical component segmentation and grammatical relationship mining between words in the text data, and obtain lexical syntactic relations by combining the sentence template library of the target domain; a pragmatic analysis module 300, used to utilize prior knowledge provided by the domain knowledge graph, and perform contextualized semantic resolution on the text data according to the lexical semantic similarity and the lexical syntactic relations to obtain pragmatic resolution results; a fusion module 400, used to fuse the lexical semantic similarity, the lexical syntactic relations and the pragmatic resolution results to obtain semantic association information; a knowledge image construction module 500, used to construct a knowledge graph of the target domain based on the semantic association information and combined with standardized format data after the fusion of multi-source heterogeneous data; and an ontology generation module 600, used to generate an ontology of the target domain based on the knowledge graph. This device significantly improves the accuracy of semantic similarity recognition of domain-specific words by learning lexical semantic features and adaptively calculating weights from domain-specific texts, avoiding the problem of inaccurate representation of professional vocabulary by general models. By combining a domain-specific sentence template library to correct syntactic analysis results, it effectively solves the biases in component segmentation, core word location, and relation attribution caused by domain-specific sentence structures, making syntactic relations more aligned with professional expression habits. Contextualized semantic resolution based on semantic similarity, syntactic relations, and domain prior knowledge accurately eliminates pragmatic conflicts such as polysemy and ambiguity, greatly improving the reliability of semantic understanding. Furthermore, by constructing a knowledge graph using standardized multi-source data to generate an ontology, the final ontology structure is more complete, logically rigorous, and domain-adaptable, while effectively improving knowledge fusion efficiency and the automation level of ontology construction, reducing reliance on manual annotation and expert intervention.

[0087] The ontology construction device provided in the embodiments of the present invention will be described below. The ontology construction device described below and the ontology construction method described above can be referred to in correspondence.

[0088] Please refer to Figure 4 , Figure 4 A schematic diagram of a body construction device provided in an embodiment of the present invention may include: Memory 10 is used to store computer programs; Processor 20 is used to execute computer programs to implement the ontology construction method described above.

[0089] The memory 10, processor 20, and communication interface 31 all communicate with each other through the communication bus 32.

[0090] In this embodiment of the invention, the memory 10 is used to store one or more programs. The programs may include program code, which includes computer operation instructions. In this embodiment of the invention, the memory 10 may store programs for implementing the following functions: By learning and encoding the semantic features of words in the target domain text data, and combining the importance of words in the target domain and contextual features for adaptive weight calculation, the semantic similarity of words is obtained. By segmenting text data into grammatical components and mining grammatical relationships between words, and combining this with a sentence template library for the target domain, lexical and syntactic relationships are obtained. By leveraging prior knowledge provided by domain knowledge graphs, contextualized semantic decomposition is performed on text data based on lexical semantic similarity and lexical syntactic relationships, resulting in pragmatic decomposition. By fusing lexical semantic similarity, lexical syntactic relations, and pragmatic resolution results, semantic association information is obtained; Based on semantic association information, and combined with standardized format data after the fusion of multi-source heterogeneous data, a knowledge graph of the target domain is constructed. Based on knowledge graphs, an ontology for the target domain is generated.

[0091] In one possible implementation, the memory 10 may include a program storage area and a data storage area, wherein the program storage area may store the operating system and applications required for at least one function; and the data storage area may store data created during use.

[0092] Furthermore, memory 10 may include read-only memory and random access memory, providing instructions and data to the processor. A portion of the memory may also include NVRAM. The memory stores operating systems and operating instructions, executable modules, or data structures, or subsets thereof, or extended sets thereof, wherein the operating instructions may include various operating instructions for implementing various operations. The operating system may include various system programs for implementing various basic tasks and handling hardware-based tasks.

[0093] Processor 20 can be a central processing unit (CPU), an application-specific integrated circuit, a digital signal processor, a field-programmable gate array, or other programmable logic device. Processor 20 can be a microprocessor or any conventional processor. Processor 20 can call programs stored in memory 10.

[0094] Communication interface 31 can be an interface for the communication module, used to connect with other devices or systems.

[0095] Of course, it should be noted that, Figure 4 The structure shown does not constitute a limitation on the ontology building device in the embodiments of the present invention. In practical applications, the ontology building device may include devices that are more advanced than those described above. Figure 4 More or fewer components as shown, or combinations of certain components.

[0096] It is understood that if the ontology construction method in the above embodiments is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the current technology, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and executes all or part of the steps of the methods in the various embodiments of the present invention. The aforementioned storage medium includes: USB flash drive, mobile hard drive, read-only memory (ROM), random access memory (RAM), electrically erasable programmable ROM, register, hard disk, removable disk, CD-ROM, magnetic disk or optical disk, and other media capable of storing program code.

[0097] Based on this, embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the ontology construction method described above.

[0098] The following describes a computer program product provided by an embodiment of this application. The computer program product described below can be referred to in conjunction with other embodiments described herein.

[0099] A computer program product includes a computer program / instructions that, when executed by a processor, implement the steps of the aforementioned disclosed ontology construction method.

[0100] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0101] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0102] Finally, it should be noted that in this document, relationships such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0103] The foregoing has provided a detailed description of an ontology construction method, apparatus, device, and computer-readable storage medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. An ontology construction method, characterized in that, include: By learning and encoding the semantic features of words in the target domain text data, and combining the importance of words in the target domain and contextual features for adaptive weight calculation, the semantic similarity of words is obtained. The text data is segmented into grammatical components and the grammatical relationships between words are mined. Lexical syntactic relationships are obtained by combining the sentence template library of the target domain. By utilizing the prior knowledge provided by the domain knowledge graph, and based on the semantic similarity of the words and the syntactic relationship of the words, the text data is subjected to contextualized semantic decomposition to obtain pragmatic decomposition results; The semantic similarity of the words, the syntactic relations of the words, and the pragmatic resolution results are fused to obtain semantic association information; Based on the semantic association information, and combined with standardized format data after the fusion of multi-source heterogeneous data, a knowledge graph of the target domain is constructed. Based on the knowledge graph, an ontology for the target domain is generated.

2. The ontology construction method according to claim 1, characterized in that, By learning and encoding lexical semantic features from text data in the target domain, and combining the importance of words within the target domain with contextual features for adaptive weight calculation, lexical semantic similarity is obtained, including: The text data is processed using a domain-specific word vector model to learn and encode lexical semantic features, thereby extracting lexical semantic representations. The domain-specific word vector model is a model obtained by fine-tuning the trainable parameters of a pre-trained language model based on a domain-specific training set as model input. The domain-specific training set is a training set constructed by segmenting, deduplicating, and standardizing unlabeled corpora in the target domain. The basic weights corresponding to the semantic representations of the words are determined based on the lexical importance graph; the lexical importance graph is a graph constructed based on a concept set annotated by domain experts. Based on the contextual features, lexical and syntactic functional features, and lexical co-occurrence association strength features of the current text, dynamic correction coefficients are calculated in real time, and the basic weights and dynamic correction coefficients are fused to obtain comprehensive adaptive weights. Calculate the cosine similarity between words, and multiply the cosine similarity by the comprehensive adaptive weight to obtain the semantic similarity of the words.

3. The ontology construction method according to claim 1, characterized in that, By performing grammatical component segmentation and lexical syntactic relationship mining on the text data, and combining it with the sentence template library of the target domain, lexical syntactic relationships are obtained, including: The text data is decomposed into grammatical components and its logical relationships are mined to obtain initial syntactic analysis results that include text grammatical functions, text hierarchical relationships, grammatical dependencies between words, and collocation rules between words. By combining the sentence template library, the initial syntactic analysis results are corrected for deviations to obtain the lexical syntactic relations; the deviations include at least component deviations, keyword positioning deviations, and grammatical relation deviations; the domain sentence template library includes at least long and difficult sentence splitting templates, passive sentence conversion templates, and professional fixed sentence templates.

4. The ontology construction method according to claim 1, characterized in that, Utilizing prior knowledge provided by a domain knowledge graph, and based on the semantic similarity of the words and the syntactic relationship between the words, contextualized semantic decomposition is performed on the text data to obtain pragmatic decomposition results, including: Extract the context of the target sentence and construct a local context vector; the target sentence is any sentence in the text data. The pragmatic resolution result is obtained by combining the prior knowledge provided by the domain knowledge graph with the local context vector, and by performing ambiguity resolution on the text data based on the semantic similarity of the words and the syntactic relations of the words; the ambiguity resolution includes at least polysemy resolution, metaphor or metonymy resolution and implicit relation mining.

5. The ontology construction method according to claim 1, characterized in that, The semantic similarity of the words, the syntactic relations of the words, and the pragmatic resolution results are fused to obtain semantic association information, including: The lexical semantic similarity, the lexical syntactic relations, and the pragmatic resolution results are uniformly converted into semantic feature vectors of the same dimension to obtain the conversion result. The transformation results are weighted and fused according to the domain semantic priority to obtain comprehensive semantic features; The comprehensive semantic features are subjected to semantic conflict verification. Based on the verified comprehensive semantic features, standardized semantic association triples between concepts are generated as the semantic association information.

6. The ontology construction method according to claim 1, characterized in that, Based on the knowledge graph, an ontology for the target domain is generated, including: The nodes of the knowledge graph are converted into concepts of the ontology, the edges of the knowledge graph are converted into object relations of the ontology, and the attributes and attribute values ​​of the knowledge graph are converted into data attributes and instance constraints of the ontology.

7. The ontology construction method according to claim 1, characterized in that, Based on the semantic association information, and combined with standardized format data obtained from the fusion of multi-source heterogeneous data, a knowledge graph for the target domain is constructed, including: Receive heterogeneous knowledge data from different data sources, and convert the heterogeneous knowledge data into the standard format data through a custom unified data format conversion method; Based on semantic association features and ontology specifications, the standard format data is subjected to concept matching and relationship correspondence processing. Concepts and relationships from different sources are semantically aligned and uniformly mapped to the same semantic space. This data is then fused with the knowledge graph initially constructed based on the semantic association information to form a knowledge graph for the target domain.

8. A body construction device, characterized in that, include: The lexical semantic analysis module is used to learn and encode lexical semantic features from text data in the target domain, and to perform adaptive weight calculation by combining the importance of words in the target domain and contextual features to obtain lexical semantic similarity. The syntactic analysis module is used to perform grammatical component segmentation and grammatical relationship mining between words in the text data, and to obtain lexical syntactic relationships by combining the sentence template library of the target domain; The pragmatic analysis module is used to utilize the prior knowledge provided by the domain knowledge graph to perform contextualized semantic decomposition on the text data based on the semantic similarity of the words and the syntactic relationship of the words, so as to obtain the pragmatic decomposition result; The fusion module is used to fuse the lexical semantic similarity, the lexical syntactic relations, and the pragmatic resolution results to obtain semantic association information; The knowledge graph construction module is used to construct a knowledge graph of the target domain based on the semantic association information and combined with standardized format data after the fusion of multi-source heterogeneous data. The ontology generation module is used to generate an ontology for the target domain based on the knowledge graph.

9. A body construction device, characterized in that, include: Memory, used to store computer programs; A processor for implementing the ontology construction method as described in any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when loaded and executed by a processor, implement the ontology construction method as described in any one of claims 1 to 7.