Knowledge graph-based cultural database construction method and related device

CN122925339APending Publication Date: 2026-10-16GUIZHOU MINZU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611092286.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-22
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

然而,不同来源的文化数据在格式、语言、粒度和语义表达上存在显著差异,导致实体识别不一致、关系抽取不完整,进而影响知识图谱的整体质量与覆盖广度

Benefits of technology

通过获取并对多源异构文化数据进行预处理生成标准化的中间数据,消除了不同来源文化数据在格式、语言、粒度和语义表达上的显著差异,为后续知识抽取提供了统一规范的输入基础。通过基于预设的本体模型并采用经文化领域语料微调的预训练语言模型进行实体识别,将识别出的文化领域实体链接至预设的本体模型得到本体映射后的实体,解决了文化领域专有实体识别不一致以及对模糊表述和历史术语变迁适应能力不足的问题。通过基于标准化的中间数据以及本体映射后的实体在知识图谱中的局部结构信息,采用图神经网络模型进行关系抽取,抽取本体映射后的实体之间的语义关系生成知识三元组,充分利用了实体在已有知识图谱中的局部结构信息来辅助关系判断,提升了对隐含关系和复杂语义关系的抽取准确率。通过将知识三元组按照预设的本体模型实例化并存储至图数据库中构建文化知识图谱,为文化知识提供了统一的可扩展框架和持久化存储基础,克服了传统文化数据库难以表达复杂语义关联以及缺乏统一本体框架和动态更新机制的缺陷,从而实现了对多源异构文化数据的高效整合与深度语义化,显著提升了文化数据的组织效率与智能化服务水平。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122925339A_ABST
    Figure CN122925339A_ABST
Patent Text Reader

Abstract

The application discloses a culture database construction method based on a knowledge graph and related equipment, relates to the technical field of knowledge graphs and cultural digitization, and comprises the following steps: obtaining and preprocessing multi-source heterogeneous culture data to generate standardized intermediate data; based on a preset ontology model, performing entity recognition by using a pre-training language model fine-tuned by culture field corpus, recognizing culture field entities, and linking the recognized culture field entities to the preset ontology model; based on the standardized intermediate data and the local structure information of the ontology-mapped entities in the knowledge graph, performing relation extraction by using a graph neural network model, extracting the semantic relations between the ontology-mapped entities, and generating knowledge triples; instantiating the knowledge triples according to the preset ontology model, storing the knowledge triples into a graph database, and constructing a cultural knowledge graph. The application realizes efficient integration and deep semanticization of multi-source heterogeneous culture data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of knowledge graph and cultural digitization technology, and in particular to a method and related equipment for constructing a cultural database based on knowledge graph. Background Technology

[0002] With the rapid development of digital humanities and cultural big data, building structured and semantic cultural databases has become a key foundation for promoting the protection, dissemination, and intelligent application of cultural heritage. Traditional cultural data management often employs relational databases or simple tagging methods, which struggle to effectively express the complex semantic relationships between cultural elements. This flattened storage model limits the ability to deeply mine and integrate cultural knowledge across disciplines, failing to meet the demands of advanced application scenarios such as intelligent recommendation, cultural origin tracing, and cross-modal retrieval.

[0003] Existing methods for constructing cultural databases typically rely on manual annotation or rule extraction, which is inefficient, costly, and ill-suited for integrating heterogeneous data from multiple sources (such as ancient texts, intangible cultural heritage videos, folklore records, and artifact information). Some methods introduce natural language processing techniques for entity recognition and relation extraction from cultural texts, using pre-trained language models to generate semantic vector representations of the text and identifying semantic relationships between entities by calculating the similarity between semantic vectors. However, cultural data from different sources exhibit significant differences in format, language, granularity, and semantic expression, leading to inconsistencies in entity recognition and incomplete relation extraction, thus affecting the overall quality and coverage of the knowledge graph. Furthermore, the lack of a unified ontology framework and dynamic update mechanism hinders the continuous evolution and expansion of cultural knowledge.

[0004] While knowledge graph technology has seen initial applications in some cultural fields, most systems remain in the static construction stage, failing to effectively integrate contextual semantics and domain expert knowledge. Especially when dealing with ambiguous expressions, historical terminology changes, or regional cultural concepts, general knowledge graph models often perform poorly, easily leading to semantic biases or knowledge gaps. Furthermore, existing methods rarely consider the temporal dimension and evolutionary path of cultural data, making it difficult to support dynamic modeling and reasoning about the development of cultural phenomena. In entity recognition, existing methods lack fine-grained entity recognition capabilities in the cultural domain, failing to accurately link identified entities to a unified ontology framework. In relation extraction, existing methods typically focus only on local grammatical structures within sentences, failing to fully utilize the local structural information of entities in existing knowledge graphs to assist in relation judgment, resulting in low accuracy in extracting implicit and complex semantic relations. In knowledge storage and updating, existing methods lack a sustainably evolving ontology architecture and feedback-based model optimization mechanisms, failing to incrementally train the knowledge extraction model based on corrections from domain experts to achieve dynamic updates of the knowledge graph. Summary of the Invention

[0005] This invention aims to address the shortcomings of existing technologies, specifically providing a method and related equipment for constructing a cultural database based on knowledge graphs, as detailed below: 1) In a first aspect, the present invention provides a method for constructing a cultural database based on knowledge graphs, the specific technical solution of which is as follows: Acquire and preprocess multi-source heterogeneous cultural data to generate standardized intermediate data; Based on a pre-set ontology model, a pre-trained language model fine-tuned by a corpus in the cultural domain is used for entity recognition. Cultural domain entities are identified and linked to the pre-set ontology model to obtain entities after ontology mapping. Based on standardized intermediate data and the local structural information of entities mapped from the ontology in the knowledge graph, a graph neural network model is used to extract relations, extract the semantic relations between entities mapped from the ontology, and generate knowledge triples. The knowledge triples are instantiated according to the preset ontology model and stored in the graph database to construct a cultural knowledge graph.

[0006] The beneficial effects of the knowledge graph-based cultural database construction method provided by this invention are as follows: By acquiring and preprocessing multi-source heterogeneous cultural data to generate standardized intermediate data, significant differences in format, language, granularity, and semantic expression among cultural data from different sources are eliminated, providing a unified and standardized input foundation for subsequent knowledge extraction. Entity recognition is performed using a pre-trained language model fine-tuned with a cultural domain corpus based on a pre-defined ontology model. The identified cultural domain entities are linked to the pre-defined ontology model to obtain ontology-mapped entities, resolving inconsistencies in the recognition of cultural domain-specific entities and insufficient adaptability to fuzzy expressions and historical terminology changes. Based on the standardized intermediate data and the local structural information of ontology-mapped entities in the knowledge graph, a graph neural network model is used for relation extraction. Semantic relationships between ontology-mapped entities are extracted to generate knowledge triples, fully utilizing the local structural information of entities in the existing knowledge graph to assist in relation judgment and improving the accuracy of extracting implicit and complex semantic relationships. By instantiating knowledge triples according to a preset ontology model and storing them in a graph database to construct a cultural knowledge graph, a unified and scalable framework and persistent storage foundation for cultural knowledge are provided. This overcomes the shortcomings of traditional cultural databases, such as difficulty in expressing complex semantic relationships and lack of a unified ontology framework and dynamic update mechanism. As a result, efficient integration and deep semanticization of multi-source heterogeneous cultural data are achieved, significantly improving the organizational efficiency and intelligent service level of cultural data.

[0007] 2) Secondly, the present invention also provides a knowledge graph-based cultural database construction system, the specific technical solution of which is as follows: It includes a data preprocessing module, an entity recognition and mapping module, a knowledge triple generation module, and a cultural knowledge graph construction module; The data preprocessing module is used to: acquire and preprocess multi-source heterogeneous cultural data to generate standardized intermediate data; The entity recognition and mapping module is used to: perform entity recognition based on a preset ontology model and a pre-trained language model fine-tuned by a cultural domain corpus, identify cultural domain entities, and link the identified cultural domain entities to the preset ontology model to obtain the entities after ontology mapping. The knowledge triple generation module is used to: extract semantic relationships between entities after ontology mapping based on standardized intermediate data and the local structural information of entities in the knowledge graph using a graph neural network model, and generate knowledge triples. The cultural knowledge graph construction module is used to: instantiate knowledge triples according to a preset ontology model, store them in a graph database, and construct a cultural knowledge graph.

[0008] 3) In a third aspect, the present invention also provides an electronic device, the electronic device including a processor coupled to a memory, the memory storing at least one computer program, the at least one computer program being loaded and executed by the processor, so as to enable the electronic device to implement any of the above-mentioned methods for constructing a cultural database based on a knowledge graph.

[0009] 4) In a fourth aspect, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements any of the above-mentioned methods for constructing a cultural database based on a knowledge graph.

[0010] It should be noted that the beneficial effects of the technical solutions of the second to fourth aspects of the present invention and their corresponding possible implementations can be found in the above description of the technical effects of the first aspect and its corresponding possible implementations, and will not be repeated here. Attached Figure Description

[0011] Figure 1 This is a flowchart illustrating a knowledge graph-based cultural database construction method according to an embodiment of the present invention. Figure 2 This is a schematic diagram of a knowledge graph-based cultural database construction method according to an embodiment of the present invention. Detailed Implementation

[0012] like Figure 1As shown in the figure, an embodiment of the present invention provides a method for constructing a cultural database based on a knowledge graph, which includes the following steps: S1. Acquire and preprocess multi-source heterogeneous cultural data to generate standardized intermediate data, including: S10. Obtain multi-source heterogeneous cultural data, which includes at least one of the following: digitized ancient texts, intangible cultural heritage project archives, 3D models of cultural relics, academic literature, maps, and audio-visual materials. Specifically: For digitized ancient texts, the application programming interface (API) of the ancient text digitization platform can be connected, or the completed OCR recognition result file can be directly read to obtain the ancient text content stored in text form. For intangible cultural heritage project archives, documents such as intangible cultural heritage application forms and project records can be read through file import. For 3D models of cultural relics, model files generated from 3D scanning of cultural relics can be obtained through data import interfaces. For academic literature, electronic versions of academic achievements such as papers and research reports can be obtained from academic databases or document management systems. For maps, digitized scanned image files of ancient or modern maps can be obtained. For audio-visual materials, audio and video files recording cultural activities, folk performances, and other content can be obtained through multimedia data interfaces.

[0013] S11. Based on the respective data formats of the multi-source heterogeneous cultural data, the corresponding adaptive parser is invoked for parsing. The adaptive parser has a dedicated parsing process for PDF, XML, JSON, image, and video formats. The specific implementation process is as follows: S110. After receiving various types of raw data, the format type of each data item is first identified. The format type identification is accomplished by checking the file extension and file header identification information. For example, a file with the extension .pdf is identified as PDF format, a file with the extension .xml is identified as XML format, a file with the extension .json is identified as JSON format, a file with the extensions .jpg and .png is identified as image format, and a file with the extensions .mp4 and .avi is identified as video format.

[0014] S111. After format type recognition is completed, the corresponding adaptive parser is selected from the preset parser mapping table based on the recognition result. The parser mapping table pre-configures the mapping relationship between each data format type and the corresponding parser. When the data format type is PDF, the PDF parser is called to parse the document. The PDF parser extracts the text flow and layout structure information in the document, organizes the text content in the PDF document into continuous text output according to the reading order, and retains layout information such as paragraph structure and chapter titles. When the data format type is XML, the XML parser is called to parse the document. The XML parser reads the tag structure and hierarchical relationship of the XML file, extracts the text content and attribute values ​​of each node according to the tag path, and organizes the extracted results into structured data in key-value pair form. When the data format type is JSON, the JSON parser is called to parse the document. The JSON parser reads the key-value structure of the JSON object and extracts the specific values ​​and text content in each field according to the preset field mapping rules.

[0015] S112. When the data format is an image or video format, a quality check is performed on the data before calling the corresponding adaptive parser. The quality check includes two steps: resolution check and sharpness check. Resolution check determines whether the pixel width and height values ​​of the image or video frame meet the minimum resolution requirements for subsequent analysis by reading them. Sharpness check evaluates the image sharpness by calculating edge strength indicators such as the Laplacian variance of the image or video frame. Data with a resolution lower than a preset resolution threshold or a sharpness lower than a preset sharpness threshold is marked as unqualified and discarded, and will not proceed to the subsequent parsing process.

[0016] S113. Image data that passes quality inspection is sent to an image decoder for processing. The image decoder decodes the image file into a pixel matrix, extracts basic image attribute information such as size and color mode, and passes the image content to subsequent computer vision analysis processes. Video data that passes quality inspection is sent to a video decoder for processing. The video decoder decodes the video file, extracts keyframe images from the video stream according to a preset sampling interval, decomposes the video into a series of static image sequences that can be analyzed, and extracts metadata information of the video such as duration, frame rate, and encoding format.

[0017] S12. Perform noise cleaning and format standardization on the parsed data, converting data from different sources into a unified encoding format and data structure. Specifically: S120. For text data, noise cleaning includes removing garbled characters introduced during parsing, deleting headers, footers, and annotations from the document, merging redundant spaces and line breaks, and correcting common OCR recognition errors. For structured data, noise cleaning includes removing null values ​​and invalid fields, correcting incorrectly formatted dates and numbers, and deleting duplicate records. For image and video data, noise cleaning includes removing noise and artifacts generated during acquisition and cropping irrelevant edge areas.

[0018] S121. After noise removal, the system performs data format standardization. Format standardization converts data from different sources into a unified encoding format and data structure. Regarding encoding, all text characters are uniformly converted to UTF-8 encoding to ensure consistent representation of Chinese characters and special symbols across different systems. For date and time formats, various date expressions from different sources are uniformly converted to the ISO 8601 standard format; for example, different ways of writing "March 15, 2024", "2024-3-15", and "15 / 03 / 2024" are uniformly converted to the format "2024-03-15". Regarding geographic coordinate formats, various coordinate representations from different sources are uniformly converted to latitude and longitude values ​​in the WGS84 coordinate system. Regarding numerical formats, various numerical representations from different sources are uniformly converted to standard decimal numerical representations.

[0019] S13. For unstructured text data, a large language model fine-tuned with a cultural domain corpus is used for preliminary semantic understanding and summary generation to extract key descriptive fragments from the text. The specific implementation process is as follows: S130. After parsing, noise cleaning, and format standardization, unstructured text data is identified from the processed data. Unstructured text data refers to free text content without a fixed format and field structure, such as the main text of ancient books, project descriptions in intangible cultural heritage archives, and abstracts and main texts of academic literature.

[0020] S131. Unstructured text data is input into a large language model fine-tuned from a cultural domain corpus for processing. This large language model uses a general pre-trained language model as its base model, such as an encoder-decoder model based on the Transformer architecture. This model has been pre-trained on a large-scale general corpus and possesses basic language understanding and generation capabilities. Based on this base model, fine-tuning training is performed using a cultural domain-specific corpus. The cultural domain corpus includes various textual materials related to culture, such as organized ancient texts, descriptions of intangible cultural heritage projects, explanatory texts of cultural relics, and folk custom records. Through fine-tuning training, the model parameters are adjusted to enable it to more accurately understand professional terminology, historical background knowledge, and specific semantic expressions in the cultural domain.

[0021] S132. The large language model, fine-tuned with cultural domain corpus, performs preliminary semantic understanding on the input unstructured text. Semantic understanding refers to the model identifying the core content, main characters, key events, and time and place elements described in the text by analyzing lexical, syntactic, and semantic information. The model uses its attention mechanism to assign weights to different parts of the text, identifying the paragraphs and sentences with the highest information density.

[0022] S133. Based on semantic understanding, the model performs a text summarization operation. Summarization refers to the model extracting the most representative and informative key descriptive segments from the text based on its overall understanding of the text, and organizing these segments into a concise summary text output. The summary generation is implemented by the model converting the input text into a semantic vector representation through an encoder, and then generating summary content word by word through a decoder. During the generation process, the model uses an attention mechanism to focus on the parts of the input text most relevant to the currently generated content, thereby ensuring that the summary content accurately reflects the core information of the original text.

[0023] S14. For image and video data, computer vision technology is used for content recognition to generate corresponding text descriptions. The specific implementation process is as follows: Image data is input into a computer vision model for processing. This model employs a deep learning-based image understanding architecture, which extracts features from images through multi-layered convolutional neural networks, abstracting layer by layer from low-level edge and texture features to high-level object components and scene semantic features. The model was trained on a large dataset of images labeled with object categories, scene types, and content descriptions, and is capable of recognizing various culturally relevant elements in images.

[0024] For each input image, the computer vision model first identifies various objects in the image through an object detection subnetwork. This subnetwork generates multiple candidate regions in the image, classifies and regresses the location of each region, and outputs the category name of the object in the image and its position coordinates. Simultaneously, the model identifies the overall scene type of the image through a scene classification subnetwork, determining whether the image belongs to a photograph of a cultural relic, an image of an ancient book, an exterior of a building, a scene of folk activities, or other types of cultural scenes. The model also extracts text information from the image through an optical character recognition subnetwork, detecting and recognizing inscriptions on cultural relics, text on pages of ancient books, and other content.

[0025] For video data, it is input into a video understanding model for processing. This model adds temporal analysis capabilities to the image understanding model. The model first samples keyframes from the video, extracting several frames from the video stream at fixed time intervals. For each keyframe, the model performs the same operations as image content recognition, identifying objects, scenes, and text information within that frame. Based on this, the model performs temporal correlation analysis on the recognition results of each frame, determining whether the same object appearing in different frames represents the same entity at different times, and identifying the dynamic processes and behavioral sequences presented in the video. By combining the recognition results of each frame and the temporal correlation analysis results, the model generates a comprehensive textual description of the video, including the main cultural elements presented in the video, the dynamic processes that occur, and their changes over time.

[0026] S15. All data that has undergone parsing, noise cleaning, format standardization, semantic understanding and summary generation, and content recognition are mapped and restructured according to a pre-defined unified data model to generate standardized intermediate data containing a fixed set of fields. The fixed set of fields includes at least the data source identifier, the original data format identifier, the content text field, the time tag field, the geographic tag field, and the entity pre-labeling field. The specific implementation process is as follows: All the data that has undergone the above-mentioned parsing, noise cleaning, format standardization, semantic understanding and summary generation, and content recognition are gathered together, and field mapping and data structure reorganization are performed according to the preset unified data model.

[0027] The predefined unified data model is a set of predefined standardized data structure specifications that stipulate a fixed set of fields that all intermediate data must contain. Field mapping refers to mapping raw fields from different data sources and formats to standardized fields defined in the unified data model according to semantic correspondences. For example, the "volume number" field from ancient book data sources and the "number" field from cultural relic data sources both semantically correspond to a portion of the information in the "data source identifier" field in the unified data model. This correspondence is established through predefined mapping rules. For fields where no corresponding mapping relationship can be found in the raw data, they are left blank or filled with default values.

[0028] Data structure reorganization refers to organizing mapped field values ​​into standardized data records according to the data structure specified by a unified data model. Each standardized intermediate data record contains the following fixed fields: Data Source Identifier field, used to record the data source and specific data file name; Original Data Format Identifier field, used to record the original format type of the data before preprocessing, such as PDF, XML, JSON, image, or video; Content Text field, used to store the extracted and organized text content. For original text, the processed text is stored directly; for original image or video, a text description generated by computer vision technology is stored; Time Tag field, used to store time information extracted or inferred from the data, recorded in a unified format after format standardization; Geographic Tag field, used to store geographic location information extracted or inferred from the data, recorded in a unified coordinate system after format standardization; Entity Pre-label field, used to store a list of candidate entity names initially identified by the large language model, fine-tuned by the cultural domain corpus, during semantic understanding.

[0029] S2. Based on the preset ontology model, a pre-trained language model fine-tuned by the cultural domain corpus is used to perform entity recognition, identify cultural domain entities, and link the identified cultural domain entities to the preset ontology model to obtain the entities after ontology mapping. Specifically, based on a pre-defined ontology model, a pre-trained language model fine-tuned with cultural domain corpus is used for entity recognition, identifying cultural domain entities. The specific implementation process is as follows: 1) Load a pre-trained language model from a pre-trained model library on a general corpus as the base model. The base model adopts a Transformer encoder-based architecture, which encodes the input text through a multi-layer self-attention mechanism, capturing the semantic relationship between each word and its context. During the pre-training phase, the base model learns general language representation capabilities through self-supervised tasks such as masked language modeling.

[0030] Building upon this foundation, the base model was fine-tuned using a cultural domain corpus. This cultural domain corpus was extracted from the content text fields of standardized intermediate data, including the main text of digitized ancient books, project descriptions from intangible cultural heritage archives, abstracts and main texts of academic literature, and textual descriptions of artifacts and images generated using computer vision technology. High-quality text samples were selected from this cultural domain corpus to construct a fine-tuned cultural domain corpus.

[0031] The fine-tuning training employs a supervised learning approach. First, entity annotation is performed on the text in the cultural domain fine-tuning corpus, identifying various cultural domain entities and their corresponding entity categories, generating labeled training data. After annotation, the labeled training data is input into the base model for fine-tuning. During fine-tuning, all parameters of the base model are updated. The model calculates the loss function by comparing its predicted entity labels with the manually annotated true labels, and adjusts the model parameters layer by layer using backpropagation, gradually improving the model's ability to determine entity boundaries and classify entity categories in cultural domain texts. Fine-tuning continues until the model's recognition performance on the validation set no longer shows significant improvement. After fine-tuning with the cultural domain corpus, the pre-trained language model possesses the ability to accurately identify various cultural domain entities in cultural domain texts.

[0032] 2) Extract content text fields from standardized intermediate data as input for entity recognition. Standardized intermediate data consists of preprocessed, uniformly structured data records, each containing a fixed set of fields. Iterate through all standardized intermediate data records, reading the text content stored in the content text field of each record. For original text-type data, the content text field directly stores the parsed, noise-cleaning, and format-standardized text content. For original image or video-type data, it stores a text description generated by computer vision techniques.

[0033] The extracted text content is organized and indexed according to its source data records, ensuring that each text fragment can be traced back to its corresponding original data source, data format identifier, and metadata information such as time tags and geographic tags. Appropriate processing is performed based on the length of the text content. For long texts exceeding the maximum input length of the pre-trained language model, they are segmented into multiple appropriately sized text fragments according to sentence or paragraph boundaries, ensuring that each fragment can be fully processed by the pre-trained language model.

[0034] 3) The extracted text fields are input into a pre-trained language model fine-tuned with cultural domain corpus. The pre-trained language model first performs word segmentation on the input text, dividing the continuous sequence of Chinese characters into independent word sequence. For Chinese text, the model adopts a word segmentation strategy combining dictionary and statistical methods, mapping each Chinese character in the text to a corresponding word identifier. After word segmentation, the model converts each word into a corresponding word embedding vector. The word embedding vector is a numerical vector in high-dimensional space used to represent the semantic information of the word.

[0035] After obtaining the word embedding vectors, the pre-trained language model encodes the word sequence using a multi-layer Transformer encoder. Each Transformer encoder layer contains two sub-layers: a multi-head self-attention mechanism and a feedforward neural network. The multi-head self-attention mechanism captures long-distance dependencies and contextual semantic information between words by calculating the attention weights between each word in the sequence and all other words. The feedforward neural network performs a non-linear transformation on the output of the self-attention mechanism to further extract higher-level semantic features. After layer-by-layer processing by the multi-layer Transformer encoder, the model generates a semantic encoding vector that incorporates contextual information for each word in the input text.

[0036] Based on the semantic encoding vector of each word, the pre-trained language model predicts the entity category for each word through a top-level linear classification layer. The linear classification layer maps the semantic encoding vector to an entity category space, outputting the probability distribution of the word belonging to each predefined entity category. These predefined entity categories are determined by the concept system in the pre-defined ontology model and include categories such as historical figures, geographical names, dynasties, cultural relics, and cultural concepts. The model selects the category with the highest probability as the entity category prediction result for that word based on the probability distribution. For words that do not belong to any predefined entity category, the model labels them as non-entities.

[0037] 4) The entity category prediction result output by the pre-trained language model for each word is an independent word-level classification result. These word-level classification results need to be combined into a complete entity recognition result. A sequence labeling decoding strategy is adopted, reading the entity category prediction result of each word sequentially according to the original order of words in the input text.

[0038] Multiple consecutive lexical units predicted to belong to the same entity category are merged into a single entity. During the merging process, the starting and ending positions of the lexical unit, as well as the entity's category, are recorded. For example, if three consecutive lexical units in the text are predicted to be the beginning, middle, and end of a geographical name category, these three units are merged into a single geographical name entity, and the specific textual content of this entity in the original text is recorded. This process is repeated for all lexical units in the entire text, merging all entities to generate a complete list of cultural domain entities. Each identified cultural domain entity includes its name, category, and location information in the original text.

[0039] 5) The list of cultural domain entities obtained after sequence labeling decoding is used as the output of entity recognition. Each recognized cultural domain entity contains the following information: the entity name field records the specific text content of the entity, the entity category field records the category to which the entity belongs, the location information field records the start and end positions of the entity in the original content text, and the source data identifier field records the unique identifier of the standardized intermediate data record from which the entity originated.

[0040] All identified cultural domain entities are organized according to their source data records, establishing associations between entities and source data. For multiple entities identified in the same content text, the order in which they appear in the original text is maintained. The entity identification results are then passed to the subsequent entity linking step to link the identified cultural domain entities to a predefined ontology model.

[0041] The pre-defined ontology model comprises a core layer and an extension layer. The core layer defines universal concepts and relationships across cultural domains, while the extension layer dynamically adds sub-concepts and attributes specific to a particular cultural subdomain. When cultural entities are linked to the pre-defined ontology model, they are preferentially matched against universal concepts in the core layer. If a cultural entity cannot be matched against any universal concept in the core layer, matching or adding a sub-concept is performed in the extension layer. The identified cultural entities are then linked to the pre-defined ontology model to obtain the ontology-mapped entities, including: The process involves: acquiring the entity names of cultural domain entities and their contextual information in standardized intermediate data; generating semantic feature vectors for cultural domain entities based on the entity names and contextual information; performing a first similarity calculation between the semantic feature vectors and the feature vectors of various general concepts in the core layer; determining whether a general concept matching the cultural domain entity exists in the core layer based on the first ranking result of the first similarity calculation; linking the cultural domain entity to the general concept in the core layer and recording the mapping result of the general concept as the cultural domain entity when a general concept matching the cultural domain entity exists in the core layer; and performing a second similarity calculation between the semantic feature vectors and the feature vectors of various sub-concepts in the extended layer. The second similarity calculation, based on the second ranking result, determines whether there is a sub-concept matching the cultural domain entity in the extension layer. When a sub-concept matching the cultural domain entity exists in the extension layer, the cultural domain entity is linked to the sub-concept, and the sub-concept is recorded as the mapping result of the cultural domain entity. When no sub-concept matching the cultural domain entity exists in the extension layer, a new ontology concept and corresponding attribute definition are created for the cultural domain entity in the extension layer, and the cultural domain entity is linked to the newly created ontology concept, and the newly created ontology concept is recorded as the mapping result of the cultural domain entity. The cultural domain entity is then bound to the recorded mapping result to generate the entity after ontology mapping. The specific implementation process is as follows: 1) The ontology model file is stored in a resource description framework format, containing all general concept definitions and general relationship definitions of the core layer, as well as all sub-concept definitions and sub-attribute definitions of the existing extension layers. After reading the ontology model file, an ontology concept index structure is built in memory. For each general concept in the core layer, the concept name, description text, and hierarchical position of the concept in the core layer are extracted, and this information is organized into a core layer concept list. For each sub-concept in the extension layer, the concept name, description text, subdomain label to which the concept belongs, and parent concept information inherited from the core layer are extracted, and this information is organized into an extension layer concept list.

[0042] While loading the ontology model, semantic feature vectors for all concepts are pre-computed. The full name and description of each concept are combined into a concept text input, which is then fed into a pre-trained language model fine-tuned with cultural domain corpora for encoding. After word segmentation, the pre-trained language model generates the semantic feature vector for each concept through a multi-layer Transformer encoder. The semantic feature vectors of each general concept in the core layer are stored in the core layer vector index, and the semantic feature vectors of each sub-concept in the extension layer are stored in the extension layer vector index. The vector index supports fast vector similarity retrieval operations.

[0043] 2) Read the complete information of each cultural domain entity from the output of the entity recognition step. For each cultural domain entity to be processed, obtain the specific text content in the entity name field. At the same time, obtain the start and end positions recorded in the entity's location information field, and return the original standardized intermediate data record where the entity is located based on this location information.

[0044] Contextual information is extracted from this standardized intermediate data record. The extraction method involves locating the specific position of the entity within the content text field, extracting pre-defined lengths of text content forward and backward from that position as the entity's local context, and simultaneously retrieving the candidate entity list information from the entity's pre-labeled fields stored in the record. The content of the time tag and geographic tag fields in the record is also incorporated into the contextual information; these fields provide potential temporal and geographic constraints related to the entity. The entity name and all contextual information are then integrated into a single contextual text fragment to prepare for subsequent semantic feature vector generation.

[0045] 3) Combine the entity names of the obtained cultural domain entities with the context information to generate a complete semantic description text for the entity. The complete semantic description text is constructed by placing the entity name at the beginning of the text, followed by concatenating the text of the sentence containing the entity extracted from the context information, a portion of the paragraph containing the entity, and key content from the time and geographic tags.

[0046] The constructed complete semantic description text is input into a pre-trained language model fine-tuned with cultural domain corpus. The pre-trained language model first performs word segmentation on the input text, converting each character into a corresponding word unit. Then, the model maps each word unit to a word unit embedding vector and encodes the word unit sequence through a multi-layer Transformer encoder. The multi-head self-attention mechanism in the Transformer encoder calculates the semantic association weights between each word unit and all other word units, passing and fusing contextual information layer by layer. After processing through all encoding layers, the model performs pooling on the semantic encoding vectors of all word units output from the last encoding layer. Pooling generates a fixed-dimensional vector by averaging the vectors of all word units. This fixed-dimensional vector is the semantic feature vector of the entity in that cultural domain, comprehensively expressing all semantic content from the entity name and contextual information.

[0047] 4) Perform a first similarity calculation between the generated semantic feature vectors of cultural domain entities and the semantic feature vectors of each general concept stored in the core layer vector index. The first similarity calculation uses cosine similarity. For each general concept in the core layer, calculate the dot product of the entity's semantic feature vector and the concept's semantic feature vector, then divide by the product of the magnitudes of the two vectors to obtain a similarity score between -1 and +1. The closer the similarity score is to +1, the more semantically similar the entity is to the general concept.

[0048] The similarity scores of all general concepts in the core layer are sorted from highest to lowest to generate a first ranking result. The highest similarity score in the first ranking result is checked against a preset core layer matching threshold. If the highest similarity score is greater than or equal to the core layer matching threshold, it is determined that a general concept in the core layer matches the entity in that cultural domain, and the general concept corresponding to the highest similarity score is selected as the matching result. At this point, the identifier information of the general concept is recorded as the mapping result of the entity in that cultural domain, and the similarity score used for matching is recorded as confidence information.

[0049] When the highest similarity score in the first ranking result is less than the core layer matching threshold, it is determined that there is no general concept in the core layer that matches the entity in that cultural domain. At this point, the extended layer matching process begins.

[0050] 5) After determining that no matching general concept exists in the core layer, a second similarity calculation is performed between the semantic feature vector of the cultural domain entity and the semantic feature vector of each sub-concept stored in the vector index of the extension layer. The second similarity calculation also uses cosine similarity; for each sub-concept in the extension layer, the cosine similarity score between the entity's semantic feature vector and the semantic feature vector of that sub-concept is calculated. The similarity scores of all sub-concepts in the extension layer are then sorted from highest to lowest to generate a second ranking result.

[0051] Check if the highest similarity score in the second ranking results is greater than the preset expansion layer matching threshold. When the highest similarity score is greater than or equal to the expansion layer matching threshold, it is determined that there is a sub-concept in the expansion layer that matches the entity in the cultural domain, and the sub-concept corresponding to the highest similarity score is selected as the matching result. At this time, the identification information of the sub-concept is recorded as the mapping result of the entity in the cultural domain, and the similarity score used for matching is recorded as confidence information.

[0052] When the highest similarity score in the second ranking result is less than the matching threshold of the extended layer, it is determined that there is no sub-concept matching the entity in the extended layer. In this case, a new ontology concept is created for the entity in the extended layer. The process of creating a new ontology concept involves determining the inheriting parent concept of the new concept in the extended layer based on the entity category information of the entity in the cultural domain, using the entity name as the name of the new concept, using the descriptive content in the entity's context information as the descriptive text of the new concept, and defining corresponding attribute constraints for the new concept based on the time tag and geographic tag information in the standardized intermediate data record where the entity is located. The newly created ontology concept is added to the concept list of the extended layer, and its semantic feature vector is generated and stored in the extended layer vector index. The identification information of the newly created ontology concept is recorded as the mapping result for the entity in the cultural domain.

[0053] 6) Obtain the mapping results of the cultural domain entities recorded in step four or five. The mapping results contain the identification information of the ontology concept matched by the entity and the hierarchical position of the concept. This ontology concept may come from a general concept in the core layer, an existing sub-concept in the extension layer, or a newly created sub-concept in the extension layer.

[0054] The process involves binding the complete information of entities in the cultural domain with the mapping results. This binding operation associates the entity's name, category, location information, and source data identifier with the ontology concept identifier, concept name, and concept hierarchy position in the mapping results, forming a complete mapping record. A unique mapping identifier is generated for each mapping record for subsequent tracing and verification. After the binding operation is complete, the ontology-mapped entity is output. This entity contains all the information of the original entity as well as standardized semantic annotation information in the ontology model. The ontology-mapped entity serves as a standardized node, ready to enter the subsequent relation extraction step to generate knowledge triples.

[0055] S3. Based on standardized intermediate data and the local structural information of entities mapped from the ontology in the knowledge graph, a graph neural network model is used to extract relations, extracting semantic relations between entities mapped from the ontology, and generating knowledge triples; including: The process involves: acquiring text paragraphs associated with entities mapped from the ontology from standardized intermediate data; inputting these text paragraphs into a graph neural network model to generate semantic encoding features; acquiring local structural information of entities mapped from the ontology within a cultural knowledge graph, where local structural information is a subgraph structure extending outwards within a predetermined number of hops from the entities mapped from the ontology as the central node, and the subgraph structure includes the types of adjacent entities and the types of adjacent relationships of the entities mapped from the ontology in the cultural knowledge graph; when the cultural knowledge graph does not contain entities mapped from the ontology, setting the local structural information to null values ​​and using the semantic encoding features as the joint feature representation of the entities mapped from the ontology; when the cultural knowledge graph already contains entities mapped from the ontology, fusing the semantic encoding features with the graph embedding features of the local structural information to generate a joint feature representation of the entities mapped from the ontology; predicting the semantic relationship types between entities mapped from the ontology based on the joint feature representation, where semantic relationship types include at least one of spatiotemporal relationships, causal relationships, influence relationships, and inheritance relationships; and generating knowledge triples containing a head entity, a relationship type, and a tail entity based on the predicted semantic relationship types. The specific implementation process is as follows: S30. Read each data record from the standardized intermediate data. Each data record contains a content text field, which stores the preprocessed complete text content. At the same time, obtain a list of all identified and ontology-mapped entities in the data record. Each ontology-mapped entity in the list contains its specific position information in the content text field, which records the start and end character positions of the entity.

[0056] Iterate through each entity mapped from the ontology in the data record. For the currently processed entity, locate it in the content text field based on its start and end positions. Centered on the entity, extract a text segment from the content text field that includes the entity. The text segment is extracted by extending a predetermined number of characters forward from the entity's start position and a predetermined number of characters backward from the entity's end position, forming a complete text fragment with boundaries at natural sentence breaks. Ensure that the extracted text segment contains the entity itself and sufficient surrounding context text to provide a adequate linguistic environment for subsequent semantic encoding.

[0057] S31. The obtained text paragraphs associated with the entities mapped from the ontology are input into the text encoding sub-network of the graph neural network model. The text encoding sub-network adopts a Transformer-based encoder architecture. The text encoding sub-network first performs word segmentation on the input text paragraphs, dividing the continuous sequence of Chinese characters into independent word sequences. For Chinese text, the word segmentation process is performed according to common word boundaries. After word segmentation, the text encoding sub-network converts each word into a word embedding vector.

[0058] The text encoding subnetwork superimposes the embedding vector of each word with its positional encoding vector to generate an input representation with positional information. The positional encoding vector marks the sequential position of each word in the sequence, compensating for the lack of sequence order awareness inherent in the Transformer architecture. After generating the positional encoding, the text encoding subnetwork encodes the word sequence with superimposed positional encoding through a multi-layer Transformer encoder. The multi-head self-attention mechanism in each encoder layer calculates the semantic association weights of each word in the sequence with all other words, and a feedforward neural network performs a non-linear transformation on the output of the self-attention mechanism. After processing by all encoding layers, the text encoding subnetwork extracts the semantic encoding vectors of the words corresponding to the entity positions in the output sequence, using them as the representation of the entity mapped by the ontology in the text paragraph. When the text paragraph contains multiple entities mapped by the ontology, the text encoding subnetwork extracts the semantic encoding vectors of the words corresponding to each entity position. The text encoding subnetwork combines the semantic encoding vectors of the words corresponding to all entities to generate the semantic encoding features of the entire text paragraph.

[0059] S32. Check whether the entity mapped from the current ontology already exists in the cultural knowledge graph. Query the ontology concept identifier of the entity in the node index of the cultural knowledge graph. If the query result returns a valid node identifier, it is determined that the cultural knowledge graph already contains the entity mapped from the ontology. If the query result is empty, it is determined that the cultural knowledge graph does not contain the entity mapped from the ontology.

[0060] When the cultural knowledge graph already contains the entity mapped from the ontology, the node corresponding to that entity is located within the cultural knowledge graph. Using this node as the central node, the graph expands outwards according to a preset hop count. The preset hop count is two hops, meaning two steps are taken outwards from the central node along the edge direction. During the expansion process, all traversed nodes and edges are collected, forming a subgraph structure. The entity type label for each node and the adjacency relationship type label for each edge are extracted from this subgraph structure. The extracted adjacency entity types and adjacency relationship types are used as the local structural information of the entity mapped from the ontology.

[0061] S33. Based on the determination result of step three, generate the joint feature representation of the entity after ontology mapping in two different ways.

[0062] When the cultural knowledge graph does not contain entities mapped from the ontology, effective local structural information cannot be obtained. Therefore, the local structural information of the entity is set to null. The semantic encoding features of the text paragraph generated in step two are directly used as the joint feature representation of the entities mapped from the ontology. At this point, the joint feature representation only contains textual semantic information and does not contain graph structural information.

[0063] When the cultural knowledge graph already contains the entities mapped from the ontology, the local structural information extracted in step three is obtained. This local structural information is then input into the graph encoding sub-network of the graph neural network model for graph embedding encoding. The graph encoding sub-network first converts each node and edge in the subgraph structure into a node embedding and an edge embedding, respectively. The node embedding contains the entity type information of the node, and the edge embedding contains the adjacency relationship type information of the edge. The graph encoding sub-network updates the node and edge embeddings through multiple graph attention layers. In each graph attention layer, each node aggregates the information of its neighboring nodes through an attention mechanism, updating its own node embedding representation. After processing by all graph attention layers, the graph encoding sub-network outputs the final node embedding representation of the central node as the graph embedding feature of this local structural information. The semantic encoding features of the text paragraph generated in step two are then fused with this graph embedding feature. The fusion method involves weighted summation of the two fixed-dimensional feature vectors according to their element positions to generate a joint feature representation of the entities mapped from the ontology. This joint feature representation simultaneously contains the semantic information from the text paragraph and the structural information from the knowledge graph.

[0064] For each pair of entities mapped from the ontology that need to be judged in relation extraction, their respective joint feature representations are generated in the manner described above.

[0065] S34. Obtain the entity pair mapped from the ontology that participates in the relation determination, where the first entity is the potential head entity and the second entity is the potential tail entity. Combine the joint feature representations of the head entity and the tail entity to form a complete joint feature vector pair.

[0066] The joint feature vector pair is input into the relation classification subnetwork of the graph neural network model. The relation classification subnetwork is a multi-classifier containing one or more fully connected layers that map the input joint feature vector pair onto the dimension of the semantic relation type space. The multi-classifier generates a prediction score for each predefined semantic relation type through linear transformations and non-linear activation functions of the fully connected layers. The predefined semantic relation types include spatiotemporal relations, causal relations, influence relations, and inheritance relations.

[0067] The prediction scores of various semantic relationship types output by the multi-classifier are sorted from high to low, and the semantic relationship type with the highest prediction score is selected as the prediction result of the relationship type between the entities. The confidence score of this prediction result is also recorded for subsequent quality assessment and selection.

[0068] S35. Obtain the semantic relation type predicted in step five, and simultaneously obtain the head entity and tail entity participating in the relation prediction. Confirm that both the head entity and tail entity are entities after ontology mapping has been completed, and confirm that the semantic relation type is one of the predefined relation types.

[0069] Knowledge triples are generated according to the standard data structure of knowledge triples. The first part of the knowledge triple records the ontology concept identifier and entity name of the head entity, the second part records the predicted semantic relation type identifier and relation name, and the third part records the ontology concept identifier and entity name of the tail entity. The generated knowledge triples are added to the knowledge triple set, and the source data identifier and confidence information of the knowledge triples are recorded for subsequent quality verification and tracing. The above steps are repeated to extract relations from all entity pairs, and finally, a complete set of knowledge triples is output. These knowledge triples will be used for knowledge graph construction in subsequent steps.

[0070] Among them, semantic relationship types include spatiotemporal relationships, which refer to the association between entities in the time or space dimension, such as an event occurring in a certain dynasty or an artifact being unearthed in a certain location; causal relationships, which refer to the logical connection between cause and effect between entities, such as the causal chain between climate change and agricultural harvest; influence relationships, which refer to the relationship between entities exerting influence and receiving influence, such as the thought of a certain writer influencing the creative style of later generations; and inheritance relationships, which refer to the transmission and continuation of skills, knowledge, or culture between entities, such as the master-apprentice inheritance of intangible cultural heritage skills.

[0071] In this context, the head entity refers to the ontology-mapped entity in the knowledge triple that serves as the starting point of the relation. The head entity occupies an active position in the semantic relation expression, representing the agent or source of the relation. The tail entity refers to the ontology-mapped entity in the knowledge triple that serves as the ending point of the relation. The tail entity occupies a passive position in the semantic relation expression, representing the recipient or target of the relation.

[0072] The semantic encoding feature of a text paragraph refers to the vector representation obtained by encoding the text paragraphs associated with entities mapped from the ontology in the standardized intermediate data. This encoding is accomplished by inputting the text paragraphs into the text encoding subnetwork of a graph neural network model. The text encoding subnetwork in the graph neural network model converts each word in the text paragraph into a word embedding vector, and generates a paragraph-level semantic vector through a multi-layer encoder.

[0073] The preset hop count refers to the number of steps pre-set when defining the expansion range of local structural information in the cultural knowledge graph. The preset hop count represents the maximum number of steps required to traverse outwards along the edges of the graph from the central node. A single hop includes adjacent nodes and edges directly connected to the central node, and a second hop further includes adjacent nodes and edges of those adjacent nodes. The value of the preset hop count is set according to the density of the cultural knowledge graph.

[0074] In this context, a subgraph structure refers to a local graph structure extracted from the cultural knowledge graph after expanding outwards within a predetermined number of hops, with the entity mapped from the ontology as the central node. The subgraph structure contains a set of all nodes and edges within the extracted range. The node set includes type labels for each node, and the edge set includes direction information and relationship type labels for each edge.

[0075] In this context, the adjacency entity type refers to the entity category of the neighboring nodes directly connected to the central node in the subgraph structure. The adjacency entity type reflects the distribution of entity types directly associated with the central node in the knowledge graph.

[0076] In this context, adjacency type refers to the relationship category corresponding to the edge connecting the central node and its adjacent entities in the subgraph structure. Adjacency type reflects the distribution of direct semantic associations between the central node and other entities in the knowledge graph.

[0077] S4. Instantiate the knowledge triples according to the preset ontology model, store them in the graph database, and construct a cultural knowledge graph.

[0078] Optionally, the above technical solution also includes: S5. In response to external input of correction information for entities or relations in the cultural knowledge graph, the correction information is used as incremental training data to incrementally train the pre-trained language model and graph neural network model. The cultural knowledge graph is then updated based on the incrementally trained pre-trained language model and the incrementally trained graph neural network model. The specific implementation process is as follows: S50. Provide an interface for receiving correction information. External input consists of correction information submitted by domain experts through the interactive interface, targeting entities or relationships in the cultural knowledge graph. Upon receiving the correction information, the format of the correction information is first validated to check whether it contains valid target entity or target relationship identifiers, and whether the correction content conforms to the preset correction type specifications.

[0079] After format validation, the specific content of the correction information is parsed. When the correction information involves modifying entities in the cultural knowledge graph, the target entity identifier, correction operation type, and corrected entity name or entity category are extracted. Correction operation types include entity name correction, entity category adjustment, entity attribute supplementation, and entity deletion. When the correction information involves modifying relationships in the cultural knowledge graph, the target relationship identifier, correction operation type, and corrected relationship type are extracted. Correction operation types include relationship type correction, relationship deletion, and relationship addition.

[0080] The parsed correction information is indexed according to the target entity identifiers and target relationship identifiers in the cultural knowledge graph, establishing a mapping relationship between the correction information and existing knowledge units in the graph. Each correction information record includes a source identifier, used to mark the submission source and submission time of the correction information.

[0081] S51. Classify the received correction information and convert it into the corresponding incremental training data format according to the type of correction information.

[0082] For correction information involving entity recognition errors, obtain the original text content corresponding to the target entity in the correction information in the standardized intermediate data. Locate the specific position indicated by the correction information in the text content and extract the text fragments surrounding that position. Use the correct entity name provided in the correction information as the ground truth entity label for that position, and the correct entity category provided in the correction information as the ground truth category label for that position. Organize this text fragment along with the position label and category label into an incremental entity label sample. When the same correction information contains corrections for multiple entities, generate a corresponding incremental entity label sample for each entity.

[0083] For correction information involving relation extraction errors, obtain the original content text corresponding to the target relation in the standardized intermediate data. Extract the text paragraphs associated with the target relation from this content text. Use the correct relation type provided in the correction information as the true relation label for the entity pair. Organize the header entity identifier, tail entity identifier, associated text paragraphs, and corrected relation type into an incremental relation label sample. When the same correction information contains corrections for multiple relations, generate a corresponding incremental relation label sample for each relation.

[0084] All incremental entity annotation samples and incremental relation annotation samples generated by the transformation are aggregated to form an incremental training dataset.

[0085] S52. Load the complete parameter file of the pre-trained language model that has been fine-tuned with the cultural domain corpus, and set the model parameters to the initial state for incremental training. At the same time, load all incremental entity annotation samples in the incremental training dataset.

[0086] The text fragments from the incremental entity annotation samples are input into a pre-trained language model. The pre-trained language model performs word segmentation on the input text, converting each word into a word embedding vector, and then generates a semantic encoding vector for each word through a multi-layer Transformer encoder. The top-level linear classification layer of the pre-trained language model outputs the predicted probability distribution of each word belonging to different entity classes based on its semantic encoding vector. The difference between the entity class predicted by the model and the true entity class annotated in the incremental entity annotation samples is calculated to obtain the loss function value. The gradient is calculated based on the loss function value, and all parameters of the pre-trained language model are adjusted layer by layer using the backpropagation algorithm.

[0087] The learning rate for incremental training is set to a value lower than the initial training learning rate to prevent the model parameters from changing drastically during incremental training and forgetting existing knowledge. The pre-trained language model is trained iteratively multiple times using all incremental entity-labeled samples in the incremental training dataset. Each training round iterates through all incremental samples once, and after each iteration, the model's recognition accuracy on the incremental validation set is calculated. When the validation accuracy no longer improves after multiple consecutive training rounds, incremental training is stopped, and the pre-trained language model parameters after the current incremental training are saved.

[0088] S53. Load the complete parameter file of the currently used graph neural network model and set the model parameters to the initial state for incremental training. Simultaneously, load all incremental relation-labeled samples from the incremental training dataset.

[0089] The text paragraphs from the incremental relation annotation samples are input into the text encoding subnetwork of the graph neural network model to generate semantic encoding features for the text paragraphs. The identifiers of the head and tail entities from the incremental relation annotation samples are queried in the cultural knowledge graph to obtain the local structural information of each entity. When an entity does not exist in the cultural knowledge graph, the local structural information is set to null. The graph embedding features of the semantic encoding features and the local structural information are fused to generate a joint feature representation of the head and tail entities.

[0090] The joint feature representations of the head entity and the tail entity are combined and input into the relation classification sub-network of the graph neural network model. The relation classification sub-network outputs predicted scores for each semantic relation type, and the semantic relation type with the highest predicted score is selected as the prediction result. The difference between the relation type predicted by the model and the true relation type labeled in the incremental relation annotation samples is calculated to obtain the loss function value. The gradient is calculated based on the loss function value, and all parameters of the graph neural network model are adjusted layer by layer using the backpropagation algorithm. The learning rate for incremental training is set to a value lower than the initial training learning rate. The graph neural network model is trained iteratively multiple times using all incremental relation annotation samples in the incremental training dataset. Training stops when the verification accuracy no longer improves, and the parameters of the incrementally trained graph neural network model are saved.

[0091] S54. Load the pre-trained language model and the incrementally trained graph neural network model. Reprocess the data records in the standardized intermediate data that have been affected by the correction information. The scope of reprocessing is limited to the source data records corresponding to the entities involved in the correction information, and the source data records corresponding to the relations involved in the correction information, in order to control the computational cost of updating.

[0092] The pre-trained language model, trained incrementally, is used to re-identify entities in the text fields of these data records, generating new cultural domain entity recognition results. The newly identified cultural domain entities are linked to a pre-defined ontology model to generate new ontology-mapped entities. Finally, the incrementally trained graph neural network model is used to re-extract relations from the newly generated ontology-mapped entities, generating new knowledge triples.

[0093] The newly generated knowledge triples are compared with existing knowledge triples in the cultural knowledge graph. If the newly generated knowledge triple is identical to an existing knowledge triple, it remains unchanged. If the newly generated knowledge triple is inconsistent with an existing knowledge triple, it replaces the existing knowledge triple. If a newly generated knowledge triple does not have a corresponding existing knowledge triple in the cultural knowledge graph, it is added to the cultural knowledge graph. During the update process, the type of each change operation and the content before and after the change are recorded, generating a version update log for the cultural knowledge graph, used for subsequent change tracking and version rollback.

[0094] Optionally, the above technical solution also includes: A time validity label is added to each entity and relation in the knowledge triple. The time validity label contains start time and end time information. The start time information represents the valid start time of the entity or relation in the cultural knowledge graph, and the end time information represents the valid end time of the entity or relation in the cultural knowledge graph. In response to a query request for a target time point, entities and relations with start times no later than the target time point and end times no earlier than the target time point are selected from the cultural knowledge graph based on the time validity label, generating a graph snapshot corresponding to the target time point. The graph snapshot is stored in the graph database, and an index association is established between the graph snapshot and the target time point to support time-axis-based graph backtracking queries. Specifically: 1) During the generation of each knowledge triple, the construction of time validity labels is handled simultaneously. For the head and tail entities in the knowledge triple, the time label fields associated with the entities are obtained from standardized intermediate data. When the time label fields of the standardized intermediate data contain explicit time information, this time information is directly extracted as a reference for the entity's start time information. When the time label fields of the standardized intermediate data are empty or do not contain explicit time information, a default start time information is assigned to the entity based on the source identifier of the standardized intermediate data corresponding to the entity, combined with the time distribution pattern of similar entities in the cultural knowledge graph. The end time information of each entity is initially set to a preset maximum time value, indicating that the entity remains valid in the current knowledge state.

[0095] For relations within knowledge triples, their start time information is determined based on the specific semantic type and processing method expressed by the relation. When the relation type is spatiotemporal, the start time information is determined by the intersection of the time information of the head and tail entities connected by the relation. When the relation type is causal, influence, or inheritance, the start time information is determined by the temporal order of the entities involved in the relation within the cultural knowledge graph. The current processing time at the time of relation generation is also used as one of the reference bases for the relation's start time information. The termination time information of each relation is initially set to a preset maximum time value.

[0096] The completed start time and end time information are combined into a time validity label, which is then attached to the corresponding entity and relationship.

[0097] 2) When storing knowledge triples in the graph database, the time validity labels for each entity and each relation are simultaneously written as attribute data to the corresponding nodes and edges in the graph database. For entity nodes, start time and end time fields are added to the node attributes to store the start and end time information of the entity, respectively. For relation edges, start time and end time fields are added to the edge attributes to store the start and end time information of the relation, respectively.

[0098] After storing the knowledge triples, a time-based index structure is constructed on the cultural knowledge graph. This structure uses start and end times as keys to create a fast lookup mapping table from each time point to the corresponding entity node and relation edge identifiers. The time-based index structure is organized chronologically, arranging each entity node and relation edge according to the order of its start time, while a separate index is arranged according to the order of its end time. This dual-index structure allows for the rapid filtering of entities and relations whose start time is no later than the target time and whose end time is no earlier than the target time when a query request for the target time point is received.

[0099] 3) The open map backtracking query interface is used to receive externally submitted query requests for target time points. The query request includes a specified target time point. The target time point can be a specific date in a standardized time format, a combination of dynasty name and year, or a relative time identifier such as "current" or "latest".

[0100] Upon receiving a query request, the system first parses and standardizes the representation of the target time point. When the target time point is given in a standardized time format, that format is used directly for subsequent processing. When the target time point is given as a dynasty name plus year, a preset historical dynasty time lookup table is consulted to convert the dynasty name and year into the corresponding standardized time format date. When the target time point is given as a relative time identifier, the corresponding standardized time format date is determined based on the identifier's specific meaning. The standardized target time point obtained after parsing and conversion is used as the time reference for generating subsequent atlas snapshots.

[0101] 4) Using the start time index in the time index structure, quickly locate all entity nodes and relation edges whose start time information is no later than the target time point. A start time no later than the target time point means that the entity or relation has already become valid before or at the target time point. From this candidate result, further filter using the end time index in the time index structure to identify all entity nodes and relation edges whose end time information is no earlier than the target time point. An end time no earlier than the target time point means that the entity or relation has not yet expired after or at the target time point. Entities and relations that simultaneously satisfy both the conditions of start time no later than the target time point and end time no earlier than the target time point are considered valid at the target time point. Output the set of these filtered entities and relations as the content basis for generating the graph snapshot.

[0102] 5) Obtain all entities and relationships that are valid at the target time point. Construct a graph snapshot corresponding to the target time point using these entities and relationships as content.

[0103] The knowledge graph snapshot is constructed by creating an independent knowledge subgraph container. Each selected entity is copied into this container as a node, retaining core attributes such as the entity's name, entity category, and ontology concept identifier, but excluding time-related metadata such as time validity tags. Each selected relation is copied into this container as an edge, connecting the corresponding head entity node and tail entity node, retaining the relation's type identifier.

[0104] When constructing a knowledge graph snapshot, record the snapshot's generation metadata, including the target time point corresponding to the snapshot, the cultural knowledge graph version identifier used to generate the snapshot, and the number of entities and relationships contained in the snapshot. Encapsulate the completed knowledge graph snapshot as an independent knowledge subgraph.

[0105] 5) Write the generated graph snapshot corresponding to the target time point to a separate storage area in the graph database. The graph database allocates independent storage space for each graph snapshot to ensure that the graph snapshots do not cause data confusion with the main cultural knowledge graph. When storing the graph snapshot, each node and each edge in the snapshot is completely saved according to its association relationship in the snapshot.

[0106] After storage, an index association is established between the map snapshot and the target time point. This association is created by adding an index record to the snapshot index table. This record contains two fields: the first field stores the normalized time format value of the target time point, and the second field stores the storage location identifier of the map snapshot in the database. The normalized time format value of the target time point is used as the primary key for sorting and organizing the index table, allowing subsequent queries targeting the same time point to be retrieved directly using the primary key.

[0107] Simultaneously, a timeline index structure is established, organizing the index records of all stored graph snapshots in chronological order according to the target time points, forming a knowledge state sequence on the timeline. The timeline index structure supports batch retrieval of graph snapshots from multiple time points within a time range, used to display the evolution trend of the cultural knowledge graph over time. When a subsequent graph backtracking query request with the same target time point is received, the stored graph snapshot is directly returned through the target time point index association, eliminating the need to repeatedly perform filtering and generation operations.

[0108] In this context, time validity tags refer to the time metadata markers attached to entities and relations within knowledge triples. These tags declare the time interval during which the entity or relation is valid within the cultural knowledge graph. A time validity tag consists of two components: a start time and an end time. These two time boundaries jointly define the valid existence interval of the entity or relation on the timeline. A cultural knowledge graph with time validity tags can distinguish the knowledge states of different historical periods, supporting time-dimensional queries and retrospective analysis of cultural knowledge.

[0109] The target time point refers to the specific moment in the external query request when the desired state of the cultural knowledge graph is to be queried. Provided by the requesting party, the target time point indicates the knowledge state of the cultural knowledge graph at that point in time. The target time point can be expressed as a specific date, dynasty name plus year, or a relative time identifier. During query processing, all time expressions are uniformly converted into a standardized time format before matching.

[0110] A knowledge graph snapshot refers to a copy of the knowledge state of a cultural knowledge graph at a specific target point in time. A knowledge graph snapshot is created by selecting a subset of entities and relationships from the complete cultural knowledge graph at a specified target time point. This subset of entities and relationships represents the static composition of cultural knowledge at a specific historical moment, providing a time-slice view for further historical analysis and comparative studies.

[0111] Optionally, before calling the corresponding adaptive parser for parsing, the process further includes: identifying the data format type of each data item in the multi-source heterogeneous cultural data, including PDF, XML, JSON, image, and video formats; selecting an adaptive parser corresponding to the identified data format type from a preset parser mapping table, where each data format type is pre-configured with a mapping relationship between the corresponding parser; when the data format type is an image or video format, before calling the corresponding adaptive parser for parsing, a quality check is performed on the image or video format data, including resolution and sharpness checks, discarding data with a resolution lower than a preset resolution threshold or a sharpness lower than a preset sharpness threshold. The specific implementation process is as follows: 1) After acquiring multi-source heterogeneous cultural data, a data format type identification operation is performed on each independent data item in the dataset. For each data item, the file extension string is first read, converted to lowercase, and then matched against a preset format extension lookup table. The preset format extension lookup table records one or more common extensions corresponding to each data format type: PDF format corresponds to the extension pdf, XML format corresponds to the extension xml, JSON format corresponds to the extension json, image formats correspond to the extensions jpg, jpeg, png, bmp, tiff, and video formats correspond to the extensions mp4, avi, mov, mkv, wmv.

[0112] When the data format type cannot be determined by the file extension, the header byte sequence of the data file is read, and the format signature information in the file header is extracted. Different data format types store specific identifier byte sequences in the file header. For example, the header of a PDF file contains a character sequence starting with a percent sign (PDF), the header of an XML file contains a character sequence starting with an angle bracket question mark (xml), the header of a JSON file usually begins with a left curly brace or a left square bracket, and image and video formats each have specific file header magic numbers. The extracted file header format signature is compared with a preset format signature library, and the data format type of the data item is determined based on the comparison result.

[0113] After performing the above recognition operation on each data item, output the data format type identifier for each data item. The identifier value can be one of PDF format, XML format, JSON format, image format, or video format.

[0114] 2) Obtain the data format type identification result for each data item. Load the preset parser mapping table, which pre-configures the mapping relationship between each data format type and the corresponding adaptive parser. PDF format is mapped to the PDF adaptive parser, XML format to the XML adaptive parser, JSON format to the JSON adaptive parser, image format to the image adaptive parser, and video format to the video adaptive parser.

[0115] The data format type of each data item is used as the lookup key to perform a lookup operation in the parser mapping table. The lookup operation locates the mapping entry in the parser mapping table that matches the data format type and reads the corresponding adaptive parser identifier information from the mapping entry. The adaptive parser identifier information includes the class name and entry address of the parser program. The correspondence between each data item and its corresponding adaptive parser identifier is recorded to prepare for subsequent parsing calls.

[0116] 3) Check the data format type identifier for each data item. When the data format type is image or video, perform a quality check operation on the data item before calling the corresponding adaptive parser for parsing.

[0117] For each data item in image format, the decoding information of the image file is read, and the width and height in pixels are extracted from the decoding information. The width and height in pixels are multiplied to calculate the total number of pixels in the image, which is the measurement result of the resolution detection. The calculated total number of pixels is compared with a preset resolution threshold. If the total number of pixels is greater than or equal to the preset resolution threshold, the resolution detection is considered successful; if the total number of pixels is less than the preset resolution threshold, the resolution detection is considered unsuccessful.

[0118] After resolution detection, a sharpness detection is performed on the image data. The image is converted from color space to grayscale space to obtain the grayscale value of each pixel. The grayscale difference between each pixel and its neighboring pixels is calculated, specifically by calculating the grayscale change rate of each pixel in the horizontal and vertical directions. The grayscale change rates of all pixel locations are squared, summed, and then averaged to obtain the image's sharpness index. The calculated sharpness index is compared with a preset sharpness threshold. If the sharpness index is greater than or equal to the preset sharpness threshold, the sharpness detection is considered passed; if the sharpness index is less than the preset sharpness threshold, the sharpness detection is considered failed.

[0119] For each data item in video format, multiple keyframe images are extracted from the video file at preset time intervals. The resolution and sharpness detection operations described above are then performed on each extracted keyframe image. If both resolution and sharpness detection for all keyframe images pass, the video data is deemed to have passed the quality check. If any keyframe image fails either the resolution or sharpness detection, the video data is deemed to have failed the quality check.

[0120] 4) Obtain the quality inspection results for each image format and each video format. The quality inspection results include the pass / fail status for resolution detection and the pass / fail status for sharpness detection.

[0121] For image or video data that fails the resolution test, the data item is marked as substandard and discarded; it will not proceed to the subsequent adaptive parser processing. Similarly, for image or video data that fails the sharpness test, the data item is also marked as substandard and discarded; it will not proceed to the subsequent adaptive parser processing.

[0122] Data items marked as quality substandard are removed from the pending data queue. The data source identifier and reason for removal are recorded for each removed data item, specifying that the resolution is below a preset resolution threshold or the sharpness is below a preset sharpness threshold. Removal records are stored in the quality inspection log for subsequent data quality traceability and analysis. Image or video format data that passes resolution and sharpness detection are retained in the pending data queue, awaiting further parsing by the corresponding adaptive parser.

[0123] The pre-configured parser mapping table refers to a lookup table structure pre-configured during the design phase to record the correspondence between data format types and adaptive parsers. Each data format type in the parser mapping table is assigned a unique corresponding parser identifier. Once the data format type of a data item is identified, the identifier information of the adaptive parser that should be called to process that data item can be obtained by querying the parser mapping table. The parser mapping table is stored in key-value pairs, where the key is an enumeration value of the data format type, and the value is the program entry address or class name of the corresponding parser.

[0124] In the above embodiments, although the steps are numbered S1, S2, etc., they are only specific embodiments given by the present invention. Those skilled in the art can adjust the execution order of S1, S2, etc. according to the actual situation. The scheme after adjusting the order is also within the protection scope of the present invention. It can be understood that in some embodiments, some or all of the above embodiments may be included.

[0125] like Figure 2 As shown, an embodiment of the present invention provides a cultural database construction system based on knowledge graphs, which includes a data preprocessing module, an entity recognition and mapping module, a knowledge triple generation module, and a cultural knowledge graph construction module. The data preprocessing module is used to: acquire and preprocess multi-source heterogeneous cultural data to generate standardized intermediate data; The entity recognition and mapping module is used to: perform entity recognition based on a preset ontology model and a pre-trained language model finely tuned by a cultural domain corpus, identify cultural domain entities, and link the identified cultural domain entities to the preset ontology model to obtain the entities after ontology mapping. The knowledge triple generation module is used to: extract semantic relationships between entities after ontology mapping based on standardized intermediate data and the local structural information of entities in the knowledge graph using a graph neural network model, and generate knowledge triples. The cultural knowledge graph construction module is used to: instantiate knowledge triples according to a preset ontology model, store them in a graph database, and construct a cultural knowledge graph.

[0126] Optionally, the above technical solution also includes an update module, which is used to: respond to external input correction information for entities or relations in the cultural knowledge graph, use the correction information as incremental training data to incrementally train the pre-trained language model and the graph neural network model, and update the cultural knowledge graph according to the incrementally trained pre-trained language model and the incrementally trained graph neural network model.

[0127] Optionally, in the above technical solution, the data preprocessing module is specifically used for: Acquire multi-source heterogeneous cultural data, which includes at least one of the following: digitized ancient texts, archives of intangible cultural heritage projects, three-dimensional models of cultural relics, academic literature, maps, and audio-visual materials. Based on the respective data formats of the multi-source heterogeneous cultural data, the corresponding adaptive parser is called for parsing. The adaptive parser has a dedicated parsing process for PDF, XML, JSON, image and video formats. The parsed data is cleaned of noise and standardized in format, converting data from different sources into a unified encoding format and data structure; For unstructured text data, a large language model fine-tuned with cultural domain corpus is used for preliminary semantic understanding and summary generation to extract key descriptive fragments from the text. For image and video data, computer vision technology is used to perform content recognition and generate corresponding text descriptions. All data that has undergone parsing, noise cleaning, format standardization, semantic understanding and summary generation, and content recognition are mapped and restructured according to a pre-defined unified data model to generate standardized intermediate data containing a fixed set of fields. The fixed set of fields includes at least the data source identifier, the original data format identifier, the content text field, the time tag field, the geographic tag field, and the entity pre-labeling field.

[0128] Optionally, in the above technical solution, the knowledge triple generation module is specifically used for: obtaining text paragraphs associated with entities mapped from the ontology in standardized intermediate data; inputting the text paragraphs into a graph neural network model to generate semantic encoding features of the text paragraphs; obtaining local structural information of entities mapped from the ontology in the cultural knowledge graph, wherein the local structural information is a subgraph structure with the entities mapped from the ontology as the central node, extending outward within a preset number of hops in the cultural knowledge graph, and the subgraph structure includes the adjacent entity types and adjacency relationship types of the entities mapped from the ontology in the cultural knowledge graph; when the cultural knowledge graph does not contain ontology mapping... When mapping entities, local structural information is set to null values, and semantic encoding features are used as joint feature representations of entities mapped to the ontology. When the cultural knowledge graph already contains entities mapped to the ontology, semantic encoding features are fused with graph embedding features of local structural information to generate joint feature representations of entities mapped to the ontology. Based on the joint feature representations, the semantic relationship types between entities mapped to the ontology are predicted. The semantic relationship types include at least one of spatiotemporal relationship, causal relationship, influence relationship, and inheritance relationship. Based on the predicted semantic relationship types, knowledge triples containing head entities, relationship types, and tail entities are generated.

[0129] Optionally, in the above technical solution, the preset ontology model includes a core layer and an extension layer. The core layer defines general concepts and relationships across cultural domains, and the extension layer is used to dynamically add subdivided concepts and attributes of specific cultural subdomains. When cultural domain entities link to the preset ontology model, they prioritize matching the general concepts in the core layer. When a cultural domain entity cannot match any general concept in the core layer, it matches or adds subdivided concepts in the extension layer. The entity recognition mapping module is specifically used for: obtaining the entity names of cultural domain entities and their context information in standardized intermediate data; generating semantic feature vectors of cultural domain entities based on entity names and context information; performing a first similarity calculation between the semantic feature vectors and the feature vectors of various general concepts in the core layer; determining whether there are general concepts in the core layer that match the cultural domain entities based on the first ranking result of the first similarity calculation; when there are general concepts in the core layer that match the cultural domain entities, linking the cultural domain entities to the general concepts and recording the general concepts as the mapping result of the cultural domain entities; when there are no general concepts in the core layer that match the cultural domain entities, linking the semantic feature vectors to the feature vectors of various general concepts in the extended layer... The feature vectors of the subdivided concepts are used to perform a second similarity calculation. Based on the second ranking result of the second similarity calculation, it is determined whether there is a subdivided concept in the extension layer that matches the cultural domain entity. When there is a subdivided concept in the extension layer that matches the cultural domain entity, the cultural domain entity is linked to the subdivided concept, and the mapping result of the subdivided concept as the cultural domain entity is recorded. When there is no subdivided concept in the extension layer that matches the cultural domain entity, a new ontology concept and corresponding attribute definition are created for the cultural domain entity in the extension layer, and the cultural domain entity is linked to the newly created ontology concept. The newly created ontology concept is recorded as the mapping result of the cultural domain entity. The cultural domain entity is bound to the recorded mapping result to generate the entity after ontology mapping.

[0130] Optionally, the above technical solution also includes an application module, which is used to: add time validity tags to each entity and each relation in the knowledge triple, the time validity tags containing start time information and end time information, the start time information representing the valid start time of the entity or relation in the cultural knowledge graph, and the end time information representing the valid end time of the entity or relation in the cultural knowledge graph; in response to receiving a query request for a target time point, filter entities and relations from the cultural knowledge graph whose start time information is no later than the target time point and whose end time information is no earlier than the target time point according to the time validity tags, and generate a graph snapshot corresponding to the target time point; store the graph snapshot in the graph database, and establish an index association between the graph snapshot and the target time point to support graph backtracking queries based on the time axis.

[0131] Optionally, the above technical solution also includes a processing module, which is used to: identify the data format type of each data item in the multi-source heterogeneous cultural data before calling the corresponding adaptive parser for parsing; the data format types include PDF, XML, JSON, image, and video formats; select the adaptive parser corresponding to the data format type from a preset parser mapping table based on the identified data format type; the parser mapping table is pre-configured with the mapping relationship between each data format type and the corresponding parser; when the data format type is an image or video format, before calling the corresponding adaptive parser for parsing, perform quality detection on the image or video format data; the quality detection includes resolution detection and sharpness detection, and remove data with resolution lower than a preset resolution threshold or sharpness lower than a preset sharpness threshold.

[0132] The system of the present invention adopts a layered and modular design concept. In another embodiment, it specifically includes the following modules: 1) Multi-source Heterogeneous Cultural Data Acquisition and Preprocessing Module: This module is responsible for connecting and integrating multi-source heterogeneous cultural data. It utilizes computer vision technology and a large language model fine-tuned from cultural domain corpora for unstructured text to perform noise cleaning, format standardization, and key information extraction on the raw data. This module performs data format type identification for each acquired data item, including PDF, XML, JSON, image, and video formats. Based on the identified data format type, it selects an adaptive parser corresponding to the data format type from a preset parser mapping table. The adaptive parser has dedicated parsing processes for PDF, XML, JSON, image, and video formats. When the data format type is image or video, before calling the corresponding adaptive parser for parsing, it also performs quality checks on the image or video data, including resolution and sharpness checks, discarding data with resolution or sharpness below a preset threshold. For unstructured text data that has undergone parsing, noise removal, and format standardization, a large language model fine-tuned with a cultural domain corpus is used for preliminary semantic understanding and summary generation, extracting key descriptive fragments from the text. For image and video data, computer vision technology is used for content recognition to generate corresponding text descriptions. All processed data is then mapped to fields and restructured according to a pre-defined unified data model to generate standardized intermediate data containing a fixed set of fields. This module can automatically complete the collection and preliminary organization of raw cultural data, providing high-quality input for knowledge extraction. An adaptive parser is used, with dedicated parsing processes designed for data from different sources and formats, and a large language model fine-tuned with a cultural domain corpus is used for preliminary semantic understanding and summary generation of unstructured text.

[0133] 2) Domain-Adaptive Knowledge Extraction and Fusion Module: This module is responsible for extracting cultural domain entities and semantic relationships between entities from standardized intermediate data, specifically including: ① Entity Recognition and Linking Unit: This unit employs a domain-specific fine-tuning method based on pre-trained language models (such as BERT and ERNIE) combined with cue learning techniques to accurately identify cultural domain-specific entities, such as historical figures, artifact shapes, events, locations, and techniques. This unit performs entity recognition and linking based on a pre-defined ontology model. The pre-defined ontology model includes a core layer and an extension layer. The core layer defines general concepts and relationships across cultural domains, while the extension layer dynamically adds sub-concepts and attributes specific to a particular cultural subdomain. When a cultural domain entity is linked to the pre-defined ontology model, it prioritizes matching general concepts in the core layer. If a cultural domain entity cannot match any general concept in the core layer, matching or adding a new sub-concept occurs in the extension layer. The entity recognition and linking unit acquires the entity names of cultural domain entities and their contextual information in standardized intermediate data. Based on the entity names and contextual information, it generates semantic feature vectors for cultural domain entities. The semantic feature vectors are then compared with the feature vectors of various general concepts in the core layer using a first similarity calculation. Based on the first ranking result of the first similarity calculation, it determines whether a matching general concept exists in the core layer. If it does, it links to that general concept; otherwise, it performs a second similarity calculation with the feature vectors of various sub-concepts in the extension layer. If a matching sub-concept exists in the extension layer, it links to that sub-concept; otherwise, it creates a new ontology concept and its corresponding attribute definition in the extension layer. The cultural domain entities are then bound to the mapping results to generate entities after ontology mapping. By introducing a domain dictionary and an entity disambiguation algorithm, the mapping problem between historical terms and modern appellations is solved.

[0134] ② Context-Aware Relationship Extraction Unit: Employing a graph neural network-based model (such as graph neural networks or deep semantic matching relation extraction models), this unit not only focuses on the grammatical structure of sentences but also incorporates global contextual information of paragraphs and even documents, as well as the local structural information of entities within the cultural knowledge graph, to infer and extract complex semantic relationships between entities in the cultural domain. This unit acquires text paragraphs associated with entities mapped from the ontology from standardized intermediate data. These text paragraphs are then input into the graph neural network model to generate semantic encoding features. Simultaneously, it acquires the local structural information of the entities mapped from the ontology within the cultural knowledge graph. This local structural information consists of a subgraph structure extending outwards from the entity mapped from the ontology within a predetermined number of hops. When the cultural knowledge graph does not contain entities mapped from the ontology, the local structural information is set to null, and the semantic encoding features are used as a joint feature representation. When the cultural knowledge graph already contains entities mapped from the ontology, the semantic encoding features and the graph embedding features of the local structural information are fused to generate a joint feature representation. Based on the joint feature representation, the semantic relationship types between entities mapped from the ontology are predicted. These semantic relationship types include spatiotemporal relationships, causal relationships, influence relationships, and inheritance relationships. Based on the predicted semantic relation type, generate a knowledge triple containing a head entity, relation type, and tail entity.

[0135] This module automatically and accurately constructs "entity-relationship-entity" triples from multimodal data, forming the raw data for the knowledge graph. It introduces a "domain adaptation" mechanism, enabling the general model to quickly adapt to specific cultural subdomains; and employs "context-aware" technology to enhance the understanding of implicit relationships and complex expressions.

[0136] 3) Evolvable Cultural Knowledge Graph Construction and Management Module: This module is responsible for instantiating the generated knowledge triples into a predefined ontology model and persistently storing them as a knowledge graph. The predefined ontology model includes a core layer and an extension layer. The core layer defines general concepts and relationships across cultural domains, while the extension layer allows for the dynamic addition of specific sub-domain concepts and attributes, supporting continuous evolution and horizontal expansion of knowledge. The module instantiates the knowledge triples according to the predefined ontology model and stores them in a graph database to construct the cultural knowledge graph. A time validity label is added to each entity and relationship in the knowledge triple. The time validity label includes start and end time information. The start time information represents the valid start time of the entity or relationship in the cultural knowledge graph, and the end time information represents the valid end time of the entity or relationship in the cultural knowledge graph, thus recording the evolutionary history of cultural entities and relationships. The graph database provides structured storage, visualization, and graph query interfaces for knowledge. This module provides structured storage, visualization, and efficient graph query interfaces for knowledge. The ontology design adopts a "core layer + extension layer" architecture, supporting the continuous evolution and horizontal expansion of knowledge. In addition, it integrates a timeline management function, which can record the evolution of cultural entities and relationships.

[0137] 4) Intelligent Application and Interactive Feedback Module: This module provides intelligent services to upper-layer applications based on the constructed cultural knowledge graph and collects feedback during the application process to optimize the graph. The module receives external input correction information for entities or relationships in the cultural knowledge graph, uses this correction information as incremental training data to incrementally train the pre-trained language model and graph neural network model, and updates the cultural knowledge graph based on the incrementally trained pre-trained language model and graph neural network model. In this way, domain experts can directly verify, supplement, or correct entities and relationships in the graph through an interactive interface. This module provides application services such as intelligent semantic retrieval, cross-modal association recommendation, cultural phenomenon tracing analysis, knowledge question answering, and visual narrative. This module establishes a human-machine collaborative feedback process. Users can directly verify, supplement, or correct entities and relationships in the graph through an interactive interface. This high-quality feedback is used as incremental training data to periodically trigger incremental training of the knowledge extraction model, thereby achieving continuous improvement and dynamic updating of the knowledge graph quality.

[0138] The system workflow of this embodiment is as follows: 1) Data Aggregation and Preprocessing Stage: The system acquires multi-source heterogeneous cultural data. For each data item, data format type identification is performed, and an adaptive parser is selected from a pre-defined parser mapping table for parsing based on the identification results. The parsed data undergoes noise cleaning and format standardization. For unstructured text data, a large language model fine-tuned with cultural domain corpora is used for preliminary semantic understanding and summary generation. For image and video data, computer vision technology is used for content recognition to generate corresponding text descriptions. All processed data is then mapped to fields and restructured according to a pre-defined unified data model to generate standardized intermediate data.

[0139] 2) Automated Knowledge Construction Stage: Standardized intermediate data is fed into the domain-adaptive knowledge extraction and fusion module. Based on a pre-set ontology model, a pre-trained language model fine-tuned with cultural domain corpus is used for entity recognition, identifying cultural domain entities. The pre-set ontology model includes a core layer and an extension layer. When linking cultural domain entities, general concepts in the core layer are matched first. If no match can be found, matching is performed in the extension layer or additional sub-concepts are added to generate entities mapped from the ontology. Based on the standardized intermediate data and the local structural information of the ontology-mapped entities in the cultural knowledge graph, a graph neural network model is used for relation extraction, extracting semantic relationships between entities. Semantic relationship types include spatiotemporal relationships, causal relationships, influence relationships, and inheritance relationships, generating knowledge triples containing a head entity, relationship type, and tail entity.

[0140] 3) Graph Storage and Visualization Stage: The generated knowledge triples are imported into the Evolvable Cultural Knowledge Graph Construction and Management module. The knowledge triples are instantiated according to a preset ontology model and stored in the graph database to construct the cultural knowledge graph. A time validity label is added to each entity and relation in the knowledge triple, containing start and end time information. The system simultaneously generates a visual view of the cultural knowledge graph.

[0141] 4) Intelligent Service and Iterative Optimization Phase: Through the intelligent application and interactive feedback module, the front-end application calls the cultural knowledge graph service. Responding to external input correction information for entities or relationships in the cultural knowledge graph, the correction information is used as incremental training data to incrementally train the pre-trained language model and graph neural network model, and the cultural knowledge graph is updated based on the incrementally trained model.

[0142] To more clearly demonstrate the technical solution of this invention, the following specific embodiments illustrate how to apply the knowledge graph-based cultural database construction method and system to the digital practice of cultural heritage, especially in the specific implementation methods of comprehensive cultural resource platforms and thematic digital humanities research projects. This embodiment adopts a technical architecture of "domain-adaptive extraction + evolvable ontology," which can efficiently integrate and deeply semanticize multi-source heterogeneous cultural data, and construct a knowledge base that supports intelligent services and continuous growth.

[0143] Example 1: Regional Cultural Heritage Comprehensive Knowledge Base Platform: This example describes a regional cultural heritage comprehensive knowledge base platform for provincial museums and archives. It aims to integrate scattered data on cultural relics, ancient books, intangible cultural heritage, and historical geography within the jurisdiction, constructing a unified, queryable, and intelligent knowledge hub. The system architecture and implementation process are as follows: 1) Multi-Source Data Standardization Access and Preprocessing Service: This service is deployed on a cloud server and provides multiple standard data interfaces for receiving structured data tables (such as cultural relic catalogs), semi-structured documents (such as intangible cultural heritage application forms), and unstructured text (such as research papers and scanned copies of local chronicles) from partner organizations. For each acquired data item, data format type identification is performed. Based on the identification results, a corresponding adaptive parser is selected from a pre-defined parser mapping table for parsing. The parsed data undergoes noise cleaning and format standardization. For unstructured text, a large language model fine-tuned from cultural domain corpora (based on pre-trained models such as ERNIE) is used for preliminary semantic understanding and summary generation. Key entities such as people, times, places, and events, along with their descriptive fragments, are extracted in batches to form preliminary text vector representations and metadata.

[0144] 2) Domain-Enhanced Knowledge Extraction and Fusion Engine: This is the system's processing unit. Addressing the complexity of specialized terminology in the cultural domain, a predefined ontology model containing core cultural concepts (such as "cultural relics," "craftsmanship," "historical events," and "figures") is first loaded. This predefined ontology model comprises a core layer and an extension layer. The core layer defines general concepts and relationships across cultural domains, while the extension layer dynamically adds subdivided concepts and attributes specific to particular cultural subdomains. The knowledge extraction engine employs a "pre-training + prompting fine-tuning" strategy: pre-processed text fragments are combined with predefined entity type and relationship type prompt templates and input into a pre-trained language model fine-tuned with cultural domain corpus. This guides the model to accurately identify and classify entities and attributes such as "Sword of Goujian, King of Yue," "Bronze Sword Casting Techniques," and "Era: Late Spring and Autumn Period." For the same entity across data sources (such as "Yellow Crane Tower" mentioned in both cultural relics databases and local chronicles), an entity alignment algorithm is run using its attribute descriptions, contextual co-occurrence information, and semantic feature vectors to merge and disambiguate knowledge from different sources. When entities in the cultural domain are linked to a preset ontology model, they are first matched with general concepts in the core layer. If a match cannot be found, the matching is performed in the extension layer or a new subdivided concept is added to generate the entity after ontology mapping.

[0145] 3) Knowledge Storage and Inference Layer Based on Attribute Graph Model: Extracted and fused knowledge triples are imported into the graph database for persistent storage. The storage model strictly follows the core layer plus extension layer design of the preset ontology model, allowing the dynamic addition of new entity types (such as "archaeological site") or relation types (such as "artistic style influence"). The system has built-in basic inference rules at the graph database level. For example, if it is known that "Artifact A was unearthed at Site B" and "Site B is located in City C", it can automatically infer that "Artifact A and City C are geographically related", supporting one-click extended queries.

[0146] 4) Intelligent Application Interfaces and Feedback Processes for Multiple Scenarios: The platform provides data services to different front-end applications through a unified data interface. For example, the exhibition guide mini-program for the public can call the interface to achieve "historical exploration through objects" (searching all historical documents associated with a cultural relic) or "spatiotemporal map" (visualizing the distribution of a certain type of cultural relic in historical periods). Simultaneously, the platform provides researchers with a dedicated interactive knowledge exploration interface. Its "expert verification" function allows experts to directly correct relationships or supplement entities on the cultural knowledge graph visualization interface. Responding to external input corrections to entities or relationships in the cultural knowledge graph, the correction information is used as incremental training data to incrementally train the pre-trained language model and graph neural network model, which have been fine-tuned with cultural domain corpora. The cultural knowledge graph is then updated based on the incrementally trained pre-trained language model and graph neural network model, achieving continuous optimization of the graph quality.

[0147] The operation process is as follows: 1) Data source units submit raw data to the data access service via interfaces or files to obtain multi-source heterogeneous cultural data. Data format type identification is performed on each data item, and the corresponding adaptive parser is called to parse it, generating standardized intermediate data. 2) Based on a pre-set ontology model, a pre-trained language model fine-tuned with cultural domain corpus is used for entity recognition. Cultural domain entities are identified and linked to the pre-set ontology model, generating ontology-mapped entities. Based on the standardized intermediate data and the local structural information of the ontology-mapped entities in the cultural knowledge graph, a graph neural network model is used to extract relations, generating knowledge triples, which are then fused and aligned with the existing graph. 3) The fused knowledge triples are instantiated according to the pre-set ontology model, automatically updated to the graph database, constructing the cultural knowledge graph. Time validity labels are added to each entity and each relation, triggering a graph version snapshot. 4) End users access the latest graph data through various applications. Researchers' correction information is fed back through a dedicated channel to incrementally train the pre-trained language model and graph neural network model, initiating the next round of model updates.

[0148] Example 2, Intelligent Historical Document Association Research Platform: This example describes an intelligent historical document association research platform for academic research institutions. It aims to integrate various historical texts, local chronicles, archival documents, and academic research findings to construct a semantic knowledge network capable of revealing multi-dimensional relationships between historical events, figures, and geographical locations, providing intelligent analysis tools for historical research. System Architecture and Implementation Process: 1) Multi-level Document Data Integration and Structured Services: This service establishes a standardized historical document metadata framework, receiving historical document data in various formats through interfaces and batch import tools. For original scanned documents, an OCR engine is used for text recognition and layout analysis to generate structured text data. The system also integrates bibliographic metadata, citation relationship data, and content entity annotation data, forming a complete foundational layer of document information. Considering the unique characteristics of ancient texts, it includes preprocessing functions such as simplified / traditional Chinese conversion, variant character recognition, and time expression normalization.

[0149] 2) Spatiotemporally Aware Knowledge Extraction and Association Analysis Engine: This is the processing unit, specifically optimized for the characteristics of historical documents. The system loads a multi-layered historical pre-defined ontology model, including a core layer and an extension layer. The core layer defines universal concepts and relationships across cultural domains, while the extension layer defines core historical concepts (such as "historical events," "historical figures," "geographical evolution," and "official system") and their spatiotemporal attributes. The knowledge extraction engine adopts a multi-task learning architecture, simultaneously performing entity recognition, relationship extraction, and temporal representation analysis. By integrating a historical timeline model and a geographic information system, the system can accurately parse complex temporal expressions in documents (such as converting "Spring of the tenth year of Guangxu" into 1884-03 to 1884-05) and map geographical locations to historical administrative divisions. The entity alignment algorithm combines textual features, spatiotemporal information, and cultural knowledge graph structure information, enabling cross-document identification of name changes for the same entity at different periods.

[0150] 3) Temporal Knowledge Graph Storage and Causal Inference Layer: Knowledge is stored using a graph database that supports temporal attributes and version management. Each entity and relation is labeled with a time validity tag, containing start and end time information, supporting querying and analyzing historical evolution by time slice. The system incorporates a historical causal inference model, discovering potential historical causal relationship chains based on the temporal order, spatial adjacency, and semantic relevance of events. For example, by analyzing descriptions of climate anomalies, crop yields, and social unrest in multiple documents, the system can suggest a possible causal chain hypothesis of "climate change → agricultural decline → social unrest" for scholars to verify.

[0151] 4) Research-Oriented Intelligent Analysis Tools and Collaborative Knowledge Construction Interfaces: The platform provides dedicated research analysis interfaces, supporting complex historical spatiotemporal queries, correlation path discovery, and group relationship network analysis. Through RESTful APIs and a Python SDK, researchers are provided with flexible data access and customized analysis capabilities. The system includes a built-in collaborative knowledge editing environment, supporting research teams to collectively review, discuss, and supplement automatically extracted knowledge, forming consensus-based knowledge. All corrections are tagged with source and credibility, used for incremental training of pre-trained language models and graph neural network models, achieving a positive interaction between the research process and knowledge construction.

[0152] The operation process is as follows: 1) Researchers import historical document data into the platform through a standardized interface. The system automatically performs OCR recognition and basic preprocessing to obtain multi-source heterogeneous cultural data. It then calls the corresponding adaptive parser to parse the data and generate standardized intermediate data. 2) Based on a pre-set ontology model, a pre-trained language model fine-tuned with cultural domain corpus is used for entity recognition. Cultural domain entities are identified and linked to the pre-set ontology model to generate ontology-mapped entities. Based on the standardized intermediate data and the local structural information of ontology-mapped entities in the cultural knowledge graph, a graph neural network model is used to extract relations, generate knowledge triples, identify historical entities, events, and their spatiotemporal attributes, and construct knowledge units. 3) The extracted knowledge triples are instantiated according to the pre-set ontology model, aligned and fused, and stored in the graph database to construct a cultural knowledge graph. Time validity labels are added to each entity and each relation to generate versioned knowledge snapshots. 4) The research team explores the cultural knowledge graph through analysis tools, verifies hypotheses, discovers correlations, and improves the knowledge content through a collaborative interface. 5) The improved correction information is fed back to the training process to incrementally train the pre-trained language model and graph neural network model, continuously optimizing the knowledge extraction model.

[0153] This invention achieves a fundamental transformation of cultural data from information storage to knowledge service by constructing a cultural knowledge graph. The constructed cultural knowledge graph can deeply reveal the complex semantic relationships between cultural elements, integrating previously fragmented, multi-source, heterogeneous cultural data such as ancient books, artifacts, and intangible cultural heritage into an organic whole, providing a structured knowledge foundation for cultural heritage research. The cultural database based on the cultural knowledge graph possesses knowledge reasoning and intelligent service capabilities, supporting advanced functions such as cross-modal precise semantic retrieval, source analysis of cultural phenomena, and interactive knowledge question answering, breaking through the limitations of traditional databases that only support simple queries. Through the design of a core layer and extension layer included in the pre-defined ontology model, and by adding time-validation tags containing start and end time information to each entity and relation in the knowledge triple, dynamic tracing and reasoning of the cultural development trajectory are realized. This invention designs a sustainable knowledge growth process. By responding to external inputs that modify entities or relationships in a cultural knowledge graph, the modified information is used as incremental training data to incrementally train a pre-trained language model and a graph neural network model that have been fine-tuned with cultural domain corpus. The cultural knowledge graph is then updated based on the incrementally trained model. The system can continuously absorb expert knowledge and new data, dynamically optimize the knowledge extraction model, and update the graph content, ensuring the timeliness and accuracy of the cultural database.

[0154] In terms of knowledge extraction, this invention combines a fine-tuning method for a pre-trained language model finely tuned to cultural domain corpora, cue learning, and a graph neural network model. This enables the system to adapt to specialized terminology from different cultural subdomains and to understand textual context by incorporating local structural information from text paragraphs and cultural knowledge graphs. It achieves accurate and automated extraction of semantic relationship types from multi-source heterogeneous cultural data, generating knowledge triples containing head entities, relationship types, and tail entities. Regarding ontology modeling, a flexible and scalable pre-defined ontology model is designed. This model includes a core layer and an extension layer. The core layer defines general concepts and relationships across cultural domains, while the extension layer dynamically adds subdivided concepts and attributes specific to cultural subdomains, supporting vertical deepening and horizontal integration of knowledge. In terms of time-dimensional modeling, a time validity label is added to each entity and relationship in the knowledge triple. This label includes start and end time information, supporting dynamic tracing and reasoning of cultural development. In terms of continuous knowledge updates, a complete process has been established, from intelligent applications and information correction to automatic optimization of models and graphs. In response to external input of correction information for entities or relationships in the cultural knowledge graph, the correction information is used as incremental training data to incrementally train the pre-trained language model and graph neural network model that has been fine-tuned by cultural domain corpus. The cultural knowledge graph is then updated based on the incrementally trained model, enabling the system to have continuous learning and evolution capabilities, and ensuring the long-term effectiveness and high accuracy of the cultural database.

[0155] This invention is applicable to various cultural heritage protection institutions, digital humanities research institutions, cultural and creative enterprises, and public cultural service platforms. In terms of digital archiving of cultural heritage, it establishes structured and interconnected digital archives for cultural relics and intangible cultural heritage projects. In academic research, it supports scholars in conducting cross-documentary, cross-regional, and long-term analysis and contextualization of cultural phenomena. In public services, it supports the development of interactive experience applications based on cultural knowledge graphs, including smart guides and story-driven knowledge quizzes, while also providing the public with accurate cultural resource retrieval, personalized recommendations, and creative content generation services.

[0156] It should be noted that the beneficial effects of the knowledge graph-based cultural database construction system provided in the above embodiments are the same as those of the knowledge graph-based cultural database construction method described above, and will not be repeated here. Furthermore, the system provided in the above embodiments is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the system can be divided into different functional modules according to the actual situation to complete all or part of the functions described above. In addition, the system and method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process is detailed in the method embodiments, and will not be repeated here.

[0157] An electronic device according to an embodiment of the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements any of the above-mentioned methods for constructing a cultural database based on a knowledge graph.

[0158] An embodiment of the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements any of the above-described methods for constructing a cultural database based on a knowledge graph.

[0159] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.

Claims

1. A method for constructing a cultural database based on knowledge graphs, characterized in that, include: Acquire and preprocess multi-source heterogeneous cultural data to generate standardized intermediate data; Based on a preset ontology model, a pre-trained language model fine-tuned by a cultural domain corpus is used for entity recognition to identify cultural domain entities. The identified cultural domain entities are then linked to the preset ontology model to obtain entities mapped to the ontology. Based on the standardized intermediate data and the local structural information of the entities mapped from the ontology in the knowledge graph, a graph neural network model is used to extract the semantic relationships between the entities mapped from the ontology and generate knowledge triples. The knowledge triples are instantiated according to the preset ontology model and stored in the graph database to construct a cultural knowledge graph.

2. The method for constructing a cultural database based on knowledge graphs according to claim 1, characterized in that, Also includes: In response to external input of correction information for entities or relations in the cultural knowledge graph, the correction information is used as incremental training data to incrementally train the pre-trained language model and the graph neural network model, and the cultural knowledge graph is updated based on the incrementally trained pre-trained language model and the incrementally trained graph neural network model.

3. The method for constructing a cultural database based on knowledge graphs according to claim 1, characterized in that, The preprocessing of multi-source heterogeneous cultural data to generate standardized intermediate data includes: The multi-source heterogeneous cultural data is acquired, which includes at least one of the following: digitized ancient texts, archives of intangible cultural heritage projects, three-dimensional models of cultural relics, academic literature, maps, and audio-visual materials. Based on the respective data formats of the multi-source heterogeneous cultural data, the corresponding adaptive parser is invoked for parsing. The adaptive parser has a dedicated parsing process for PDF, XML, JSON, image and video formats respectively. The parsed data is cleaned of noise and standardized in format, converting data from different sources into a unified encoding format and data structure; For unstructured text data, a large language model fine-tuned with cultural domain corpus is used for preliminary semantic understanding and summary generation to extract key descriptive fragments from the text. For image and video data, computer vision technology is used to perform content recognition and generate corresponding text descriptions. All data that has undergone parsing, noise cleaning, format standardization, semantic understanding and summary generation, and content recognition are mapped and restructured according to a preset unified data model to generate standardized intermediate data containing a fixed set of fields. The fixed set of fields includes at least data source identifier, original data format identifier, content text field, time tag field, geographic tag field, and entity pre-labeling field.

4. The method for constructing a cultural database based on knowledge graphs according to claim 1, characterized in that, The method employs a graph neural network model for relation extraction, extracting semantic relationships between entities mapped from the ontology, and generating knowledge triples. This includes: acquiring text paragraphs associated with the entities mapped from the standardized intermediate data; inputting the text paragraphs into the graph neural network model to generate semantic encoding features of the text paragraphs; acquiring local structural information of the entities mapped from the ontology within the cultural knowledge graph, wherein the local structural information is a subgraph structure with the entities mapped from the ontology as the central node, extending outwards within a preset number of hops in the cultural knowledge graph; the subgraph structure includes the adjacent entity types and adjacency relationship types of the entities mapped from the ontology in the cultural knowledge graph; when the text... When the cultural knowledge graph does not contain entities mapped from the ontology, the local structural information is set to null, and the semantic encoding features are used as the joint feature representation of the entities mapped from the ontology. When the cultural knowledge graph already contains entities mapped from the ontology, the semantic encoding features are fused with the graph embedding features of the local structural information to generate a joint feature representation of the entities mapped from the ontology. Based on the joint feature representation, the semantic relationship type between entities mapped from the ontology is predicted, and the semantic relationship type includes at least one of spatiotemporal relationship, causal relationship, influence relationship, and inheritance relationship. According to the predicted semantic relationship type, the knowledge triple containing a head entity, a relationship type, and a tail entity is generated.

5. A knowledge graph-based cultural database construction system, characterized in that, It includes a data preprocessing module, an entity recognition and mapping module, a knowledge triple generation module, and a cultural knowledge graph construction module; The data preprocessing module is used to: acquire and preprocess multi-source heterogeneous cultural data to generate standardized intermediate data; The entity recognition and mapping module is used to: perform entity recognition based on a preset ontology model, using a pre-trained language model fine-tuned by a cultural domain corpus, identify cultural domain entities, and link the identified cultural domain entities to the preset ontology model to obtain entities after ontology mapping. The knowledge triple generation module is used to: extract semantic relationships between entities mapped from the ontology based on the standardized intermediate data and the local structural information of the entities in the knowledge graph using a graph neural network model, and generate knowledge triples. The cultural knowledge graph construction module is used to: instantiate the knowledge triples according to the preset ontology model, store them in the graph database, and construct a cultural knowledge graph.

6. The knowledge graph-based cultural database construction system according to claim 5, characterized in that, It also includes an update module, which is used to: respond to external input correction information for entities or relations in the cultural knowledge graph, use the correction information as incremental training data to incrementally train the pre-trained language model and the graph neural network model, and update the cultural knowledge graph according to the incrementally trained pre-trained language model and the incrementally trained graph neural network model.

7. A knowledge graph-based cultural database construction system according to claim 5, characterized in that, The data preprocessing module is specifically used for: The multi-source heterogeneous cultural data is acquired, which includes at least one of the following: digitized ancient texts, archives of intangible cultural heritage projects, three-dimensional models of cultural relics, academic literature, maps, and audio-visual materials. Based on the respective data formats of the multi-source heterogeneous cultural data, the corresponding adaptive parser is invoked for parsing. The adaptive parser has a dedicated parsing process for PDF, XML, JSON, image and video formats respectively. The parsed data is cleaned of noise and standardized in format, converting data from different sources into a unified encoding format and data structure; For unstructured text data, a large language model fine-tuned with cultural domain corpus is used for preliminary semantic understanding and summary generation to extract key descriptive fragments from the text. For image and video data, computer vision technology is used to perform content recognition and generate corresponding text descriptions. All data that has undergone parsing, noise cleaning, format standardization, semantic understanding and summary generation, and content recognition are mapped and restructured according to a preset unified data model to generate standardized intermediate data containing a fixed set of fields. The fixed set of fields includes at least data source identifier, original data format identifier, content text field, time tag field, geographic tag field, and entity pre-labeling field.

8. A knowledge graph-based cultural database construction system according to claim 5, characterized in that, The knowledge triple generation module is specifically used for: acquiring text paragraphs associated with the entities mapped from the standardized intermediate data, inputting the text paragraphs into the graph neural network model, and generating semantic encoding features of the text paragraphs; acquiring local structural information of the entities mapped from the ontology in the cultural knowledge graph, wherein the local structural information is a subgraph structure with the entities mapped from the ontology as the central node and extending outward within a preset number of hops in the cultural knowledge graph, and the subgraph structure includes the adjacent entity types and adjacency relationship types of the entities mapped from the ontology in the cultural knowledge graph; when the cultural knowledge graph does not contain the entities mapped from the ontology... When the entity is mapped, the local structural information is set to null, and the semantic encoding feature is used as the joint feature representation of the entity mapped by the ontology. When the cultural knowledge graph already contains the entity mapped by the ontology, the semantic encoding feature is fused with the graph embedding feature of the local structural information to generate the joint feature representation of the entity mapped by the ontology. Based on the joint feature representation, the semantic relationship type between the entities mapped by the ontology is predicted. The semantic relationship type includes at least one of spatiotemporal relationship, causal relationship, influence relationship, and inheritance relationship. According to the predicted semantic relationship type, the knowledge triple containing the head entity, relationship type, and tail entity is generated.

9. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the knowledge graph-based cultural database construction method according to any one of claims 1 to 4.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the knowledge graph-based cultural database construction method according to any one of claims 1 to 4.