A method for digital storage of cultural information

By training entity embedding representations using the TransE model, the problem of inaccurate entity links in knowledge graphs is solved, achieving accurate storage and improved reliability of cultural information.

CN115658919BActive Publication Date: 2025-12-30ANHUI UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202211345692.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-31
Publication Date
2025-12-30
Estimated Expiration
2042-10-31

AI Technical Summary

Technical Problem

Existing technologies cannot accurately establish entity links, resulting in incomplete knowledge graph information and unreliable storage of cultural information.

Method used

The TransE model is used to design a loss function to train entity embedding representations in different knowledge graphs. Through similarity calculation and alignment processing, accurate entity links are established, stored in the MongoDB database, and integrated into the graph database Neo4j.

Benefits of technology

It achieves accurate entity links, improves the reliability of knowledge graph information, and enhances the reliability of digital storage of cultural information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115658919B_ABST
    Figure CN115658919B_ABST
Patent Text Reader

Abstract

The application discloses a culture information digital storage method, which comprises the following steps: acquiring multi-platform, multi-structure and multi-modal data of merchants in a certain region on a network; adopting different preprocessing methods for data with different structures; performing similarity calculation on embedded representations of entity sequences of different knowledge graphs, and performing alignment processing on two entities with similarity exceeding a similarity threshold, and storing the aligned entities and other entities in a MongoDB database; integrating triad information of entities and relations stored in the MongoDB database, and importing the triad information into a graph database Neo4j to obtain a knowledge graph of merchants in the certain region; and the culture information digital storage method has the advantages that entity links are accurately established, the obtained knowledge graph information is accurate, the reliability of stored culture information of merchants is high, and the culture information digital storage is realized.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of knowledge graph, and more particularly to a cultural information digital storage method. BACKGROUND

[0002] Since the 20th century, domestic and foreign scholars have carried out a series of researches on local culture, and a large number of academic papers and monographs have been published on cultural forms and phenomena. In terms of cultural protection, various measures have been taken to scientifically protect material and intangible cultural heritage, and local cultural ecological protection experimental zones have been established. Among them, Huizhou culture is the abbreviation of Huizhou culture, ranking among the top three cultures in China. Huizhou culture originated in Huizhou and also spread outside Huizhou. The resources of Huizhou merchants have a long history, and the earliest origin can be traced back to the Eastern Jin Dynasty. They flourished during the reign of Jiaqing and the reign of Wanli. From sea trade to large-scale investment in salt merchants, the scale and capital of their business have reached the peak of traditional commerce. Therefore, Huizhou merchants are one of the core components of Huizhou culture.

[0003] Although the above work has achieved great success, there are still some problems and challenges in the protection, inheritance and innovation of Huizhou merchant culture, taking Huizhou merchant culture as an example. At present, some material and intangible cultural heritage of Huizhou merchant culture is in a scattered state, and there is a lack of effective scientific and technological means in protection and inheritance. Huizhou merchant culture is facing the danger of extinction. Collecting, digging and constructing Huizhou merchant information in multiple periods, multiple dimensions and multiple modes, and then constructing Huizhou merchant cultural knowledge graph and realizing the digital storage of Huizhou merchant cultural information can not only systematically sort out, dig and integrate Huizhou merchant cultural heritage, but also serve the downstream new media cultural transmission.

[0004] In recent years, the way of constructing knowledge graph to display related cultural information has gradually become a research hotspot in the industry, which helps people to more fully and intuitively understand the related cultural information. Chinese patent publication No. CN109657068A discloses a method for generating and visualizing cultural relic knowledge graph for smart museum, which includes the following steps: step 1: design a cultural relic knowledge graph ontology model according to the application requirements of cultural relic guide; step 2: obtain cultural relic data; step 3: use knowledge extraction tools to extract entity, attribute, relationship and other information. Step 4: represent the data in step 3 by using knowledge graph description language; step 5: complete cultural relic knowledge storage; step 6: generate visual knowledge graph and interactive interface. Based on this method, the existing museum cultural relic data is sorted and a dynamic and interrelated cultural relic knowledge graph is generated, and the visual display and interactive browsing of cultural relic knowledge graph are realized.

[0005] Although the above patent documents give knowledge graph generation and visualization methods, in the knowledge extraction process, structured data can be directly used due to its fixed structure, while semi-structured and unstructured data have large quantity, low information density, and are difficult to effectively utilize, leading to inaccurate knowledge extraction, and thus incomplete information of the finally formed knowledge graph. Chinese Patent Publication No. CN113806563A discloses a method for constructing an architect knowledge graph for multi-source heterogeneous architectural human historical data, which adopts a method of lexical analysis, rule extraction and deep learning to extract different granularity of architect-related knowledge such as entities, relationships and events in semi-structured and unstructured multi-modal data in a hierarchical manner, and fuses the extracted multi-source heterogeneous knowledge. Finally, a modern architect knowledge graph composed of knowledge triples is obtained and stored in a graph database. It solves the extraction problem of semi-structured and unstructured data, making the finally formed knowledge graph information more complete. However, the knowledge expression information obtained through knowledge extraction has contradictions and ambiguities, such as different designations of the same entity in the text, or the same entity name in different contexts can refer to different entities, so it is necessary to integrate and accurately establish entity linking. However, the patent application does not consider the problem of contradictions and ambiguities in the knowledge expression information obtained through knowledge extraction, so it is impossible to establish accurate entity linking, and the finally obtained knowledge graph information is not accurate enough, resulting in weak reliability of the stored cultural information. SUMMARY

[0006] The technical problem to be solved by the present application is that the prior art knowledge graph construction method cannot establish accurate entity linking, and the finally obtained knowledge graph information is not accurate enough, resulting in weak reliability of the stored cultural information.

[0007] The present application solves the above technical problems by the following technical means: a cultural information digital storage method, the method comprising:

[0008] Step one: obtaining multi-platform, multi-structure and multi-modal data of merchants in a certain region on the network;

[0009] Step two: dividing the data into structured, semi-structured and unstructured data according to the type of data structure, and using different preprocessing methods for different structured data;

[0010] Step three: for the preprocessed data, designing a loss function based on the TransE model, training the embedding representation of the entities in different knowledge graphs, obtaining the embedding representation of the entities, calculating the similarity of the embedding representation of the entity sequence of different knowledge graphs, and aligning the two entities with a similarity exceeding a similarity threshold, and storing the aligned entities and other entities in the MongoDB database;

[0011] Step four: the triple information of the entities and the relations stored in the MongoDB database is integrated and imported into the graph database Neo4j to obtain the merchant knowledge graph of a certain region.

[0012] The application considers the problems of contradictions and ambiguities of knowledge expression information obtained by knowledge extraction, designs a loss function based on the TransE model, trains the embedding representation of entities in different knowledge graphs, obtains the embedding representation of entities, calculates the similarity of the embedding representation of entity sequences in different knowledge graphs, aligns two entities with a similarity exceeding a similarity threshold, accurately establishes entity linking, and obtains knowledge graph information accurately and stores merchant cultural information reliably, so that the digital storage of cultural information is realized.

[0013] Further, the step one comprises:

[0014] Step 101: multi-modal data related to merchants in a certain region is crawled through a focused network crawler;

[0015] Step 102: MongoDB database is used for data organization and storage.

[0016] Further, the step two comprises:

[0017] Step 201: for the structured data with fixed structure, the relational database is disclosed as a resource description framework through D2RQ;

[0018] Step 202: for semi-structured and unstructured data, pre-processing is performed, invalid text is filtered out, and long text is processed by sentence;

[0019] Step 203: the pre-processed sentence is used as the input of the BERT model, the entire sentence is encoded, and the hidden layer embedding of each word is obtained;

[0020] Step 204: decode the hidden layer embedding of each word, construct two binary classifiers to predict the start and end index positions of the entity, and calculate the probability of each word as the start position and end position of the entity;

[0021] Step 205: use the object marker to identify the corresponding object for each recognized entity, and calculate the probability of each word as the start position and end position of the object;

[0022] Step 206: save the triplets and context information extracted from semi-structured and unstructured data in the MongoDB database, and the information extracted based on the structured data constitutes a preliminary knowledge graph dataset.

[0023] More further, the step 203 comprises:

[0024] by formula

[0025] e0= SW s +W p

[0026] e α = Trans(e α-1 ), a e [1, N]

[0027] obtain the hidden layer embedding of each word;

[0028] where S is the one-hot vector matrix of the sub-word index in the input sentence, W s is the embedding matrix of the sub-word, W p is the position embedding matrix, p represents the position index in the input sequence, e α is the implicit state vector, i.e., the contextual representation of the input sentence at the a-th layer, Trans represents the Transformer module, and N is the number of Transformer modules.

[0029] Further, the step 204 comprises:

[0030] for each word, calculate the probability of its start position as an entity by formula ;

[0031] for each word, calculate the probability of its end position as an entity by formula ;

[0032] where and represent the probability of identifying the i-th token in the input sequence as the start and end position of an entity, respectively; x i is the encoded representation of the i-th token in the input sequence, i.e., x i = e N [i], W st , W ed represent weights, b st , b ed are biases, and sigma is a Sigmoid activation function.

[0033] Further, the step 205 comprises:

[0034] for each word, calculate the probability of its start position as an object by formula ;

[0035] for each word, calculate the probability of its end position as an object by formula ;

[0036] where and respectively represent the probability of identifying the i-th token in the input sequence as the start and end position of the object, represents the encoding representation vector of the k-th detected object, are weights, are biases.

[0037] Further, the step three comprises:

[0038] Step 301: initialize the similarity threshold to be 0.95;

[0039] Step 302: calculate the loss function J SE for the structural embedding information of the entity

[0040] Step 303: calculate the loss function J CE for the attribute character embedding of the entity

[0041] Step 304: calculate the loss function J SIM that the attribute character embedding helps the structural embedding to be trained in the same vector space, superimpose the loss function J SE , the loss function J CE and the loss function J SIM to obtain the overall objective function J, train the embedding representation of the entity by jointly learning the loss function J

[0042] Step 305: calculate the cosine similarity of the entity sequence of different knowledge graphs, and align the two entities whose similarity exceeds the similarity threshold, and store the aligned entities and other entities in the MongoDB database.

[0043] Still further, the step 302 comprises:

[0044] For a knowledge graph G, define the relationship triple as <h, r, t> and the attribute triple as <h, r, a>, where h represents the head entity, t represents the tail entity, r represents the relationship between the head entity and the tail entity, a is the attribute value of the head entity relative to the relationship, and h, r, t, a represent the vector representation of the corresponding elements, respectively;

[0045] The loss function J SE is calculated by the formula ;

[0046] wherein, count(r) is the number of occurrences of the relationship r, T is the total number of triples in the merged knowledge graph, f(t r ) = ||h + r - t||, t ris a valid relation triple, t' r is a corrupted sample formed by randomly replacing either the head entity h or the relation r in a valid relation triple, i.e., a negative sample; T r denotes a set of valid relation triples from the training set, T r denotes a set of relation triples of corrupted samples, and γ is a hyperparameter used to control the margin between positive and negative samples.

[0047] Further, the step 303 comprises:

[0048] The relation of each element in the triple is defined as h + r = f a (a), where f a (a) is a combination function, a is a character sequence of attribute values a = {c1, c2, c3,..., c t} and the combination function encodes the attribute values into a single vector and maps similar attribute values to similar vector representations, and the combination function is calculated by the formula

[0049]

[0050] where N represents the maximum value of the combination used in the N-gram combination, and t is the length of the attribute value;

[0051] The loss function J is calculated by the formula CE where T a is a set of valid attribute triples, T a ' is a set of corrupted attribute triples, t a denotes an element in T a , t' a denotes an element in T a ', and f(t a ) is a confidence score based on the embedding h of the head entity h, the embedding r of the relation r, and the vector representation of the attribute value calculated using the combination function f a (a), and f(t a ) = ||h + r - f a (a)||.

[0052] Further, the step 304 comprises:

[0053] The loss function J is calculated by the formula SIM where G1, G2 represent two knowledge graphs that need to be aligned, h se denotes a structural embedding vector, h ce denotes an attribute character embedding vector;

[0054] Using a joint learning method, the loss function JSE , loss function J CE and loss function J SIM Sum up to get the overall objective function J=J SE +J CE +J SIM , the embedding representation of the entity is trained, and the training is stopped when the overall objective function J is minimum, and the final embedding representation of the entity is obtained.

[0055] Further, the step 305 comprises:

[0056] The similarity of the entity sequence of different knowledge graphs is calculated by the formula , wherein h1 is the embedding representation of a specified entity of the knowledge graph G1, h2 is the embedding representation of all entities of the knowledge graph G2, and cos is the cosine similarity. The two entities with a similarity exceeding a similarity threshold are aligned to obtain an entity alignment pair sim >, and the aligned entity and other entities are stored in the MongoDB database.

[0057] The advantages of the present application are:

[0058] (1) The present application considers the problem of contradiction and ambiguity of knowledge expression information obtained by knowledge extraction, designs a loss function based on the TransE model, trains the embedding representation of the entity in different knowledge graphs, obtains the embedding representation of the entity, calculates the similarity of the embedding representation of the entity sequence of different knowledge graphs, aligns the two entities with a similarity exceeding a similarity threshold, accurately establishes entity linking, and obtains accurate knowledge graph information, so that the reliability of stored merchant culture information is strong, and the digital storage of culture information is realized.

[0059] (2) The present application uses a focused network crawler to obtain relevant data of a specific topic, and in the face of multi-modal Huishang data in the Internet, classifies the data according to the type of data structure, and performs data collection, cleaning, mining and other processes.

[0060] (3) The present application automatically extracts triple information through the entity relation joint extraction method based on BERT, improves the accuracy of entity and relation recognition, and reduces the size of work load and the dependence on related technical personnel.

[0061] (4) The present application collects and mines multi-period, multi-dimensional and multi-modal merchant information by establishing a Huishang knowledge graph, and realizes the digital storage of merchant culture information, which is beneficial to the excavation and protection of merchant culture. BRIEF DESCRIPTION OF DRAWINGS

[0062] Figure 1 A flowchart of a culture information digital storage method disclosed by the embodiments of the present application.

[0063] Figure 2 The algorithm principle diagram of a cultural information digital storage method disclosed by the embodiment of the present application. DETAILED DESCRIPTION

[0064] To make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described below in a clear and complete manner in combination with the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0065] As shown in Figure 1 and Figure 2 , a cultural information digital storage method is provided, taking the cultural information of Huizhou merchants as an example, and the method comprises the following steps.

[0066] S1: knowledge perception. The Huizhou merchant data is in a scattered state, has the characteristics of fragmentation and wide coverage, and therefore the Huizhou merchant data is mainly obtained from information sources such as network platforms and ancient literature. The obtained data has the characteristics of multi-modal, among which the text data is the most important data type, in addition to audio, picture and video file data. The multi-platform, multi-structure and multi-modal data of the Huizhou merchants on the network is obtained through a crawler, and the obtained data is stored in a MongoDB database. According to the type of data structure, the collected data is divided into structured, semi-structured and unstructured data, and different preprocessing methods and storage methods are used for different structures of data.

[0067] The specific process is as follows:

[0068] Step 101: selectively crawling multi-modal data related to Huizhou merchants through focused web crawlers. Specifically, based on a large amount of public data on the Internet, taking Huizhou merchants as the theme, a focused web crawler is used to collect multi-modal and multi-structured data information related to Huizhou merchants. The structured data includes existing public relational databases: such as China Historical Figures Biography Database (CBDB); the semi-structured data includes encyclopedias, XML, JSON, etc.; and the unstructured data includes pictures, audio, video, text, etc.

[0069] Step 102: In view of the large scale and multi-modal characteristics of the collected data, MongoDB database is used for the organization and storage of heterogeneous data. Specifically, Huizhou merchant data includes text, pictures, audio, video, spatial location information, etc. Among them, the majority of text information can be directly stored using MongoDB Chinese document format, and pictures, audio and video can be stored using MongoDB GridFS and added to the parent type file document in array form, which is beneficial to the horizontal expansion of the database and reduces the time overhead of querying the database.

[0070] S2: Knowledge extraction. Structured data can be directly used due to its fixed structure, so it only needs to be converted into corresponding triplets through D2RQ. For semi-structured and unstructured data, which have the characteristics of large quantity, low information density and difficulty in effective utilization, a BERT-based entity relationship joint extraction method can be used to train the model with massive data to obtain triplet information containing entities and their relationships, and then better extract entities and relationships in the data. The specific process is as follows:

[0071] Step 201: For structured data with fixed structure, the relational database (RDB) is exposed as a resource description framework (RDF) through D2RQ. Specifically, first, generate a corresponding mapping file according to the specific relational database, which describes the mapping between the tables and columns of the database and the classes and properties in the output ontology. Then, establish a D2RQ instance set by the mapping file, and wrap the instance as a Jena model to access the relational database in the form of a virtual RDF graph, and store the obtained triplets in the MongoDB database.

[0072] Step 202: For semi-structured and unstructured data, regular expressions are used for preprocessing to filter out invalid text, and long text is processed by sentence to facilitate efficient relationship extraction. The preprocessed data is temporarily stored in the database as input for the entity relationship joint extraction model.

[0073] Step 203: Use the Bidirectional Encoder Representations from Transformers (BERT) language framework to input the preprocessed sentences into the BERT model, encode the entire sentence, and obtain the hidden layer embedding of each word.

[0074] e0=SW s +W p

[0075] e α =Trans(e α-1), a e [1, N]

[0076] where S is a one-hot vector matrix of sub-word indices in the input sentence, W s is the embedding matrix of sub-words, W p is the position embedding matrix, p represents the position index in the input sequence, e α is the hidden state vector, i.e., the contextual representation of the input sentence at the a-th layer, Trans represents the Transformer module, and N is the number of Transformer modules.

[0077] Step 204: Decode the hidden embedding of the word obtained by the BERT encoder, construct two binary classifiers to predict the index position of the start (Start) and end (End) of the entity, and calculate the probability of each word as Start and End:

[0078]

[0079]

[0080] where, and represent the probability of identifying the i-th token in the input sequence as the start and end position of an entity, respectively; x i is the encoded representation of the i-th token in the input sequence, i.e., x i = e N [i], W st , W ed represent weights, b st , b ed are biases, and σ is the Sigmoid activation function. Compare the probability of each index position with a certain threshold. If it is greater than 1, mark it as 1, otherwise mark it as 0.

[0081] Step 205: For the extraction of entity relations, a high-level label module is used to identify objects related to the characteristics of the entities obtained at the low level, and all object markers are identified for each detected subject to identify the corresponding object. The specific operation is as follows:

[0082]

[0083]

[0084] where, and represent the probability of identifying the i-th token in the input sequence as the start and end position of an object, respectively, represents the encoded representation vector of the k-th detected object, are weights, are all biases. For each entity, the same decoding process is applied iteratively to it.

[0085] Step 206: The triples and their context information extracted from semi-structured and unstructured data are saved and stored together in a MongoDB database, and the information extracted based on structured data constitutes a preliminary knowledge graph dataset.

[0086] S3: Knowledge fusion. Since the knowledge expression information obtained by knowledge extraction has contradictions and ambiguities, for example, the same entity will have different designations in the text, or the same entity name in different contexts can refer to different entities, it is necessary to integrate them. The self-supervised entity alignment method is adopted to effectively mine the entity name item information, calculate the similarity between the entity name item and the entity concept, and accurately establish the entity link according to the entity context. The specific process is as follows:

[0087] Step 301: In order to make the relationship embedding have a unified vector space, so as to realize the joint learning of structure embedding and attribute feature embedding, the edit distance (Levenshtein Distance) of the last part of the relationship is calculated and 0.95 is set as the similarity threshold, and similar relationships are merged.

[0088] Step 302: For a knowledge graph G, define the relationship triple as <h, r, t> and the attribute triple as <h, r, a>, where h represents the head entity, t represents the tail entity, r represents the relationship between the head entity and the tail entity, and a is the attribute value of the head entity relative to the relationship. h, r, t, a represent the vector representation of the corresponding elements, respectively.

[0089] For the structure embedding information of the entity, the TransE model is used to learn the structure embedding of the entity, and the calculation is as follows:

[0090]

[0091]

[0092] where count(r) is the number of times the relationship r appears, T is the total number of triples in the merged knowledge graph, f(t r ) = ||h + r - t||, t r is the valid relationship triple, t′ r is a damaged sample formed by randomly replacing the head entity h or the relationship r in the relationship triple, i.e., a negative sample; T r represents the set of valid relationship triples from the training set, T r ' represents the set of relationship triples of damaged samples, and γ is a hyperparameter used to control the distance between positive and negative samples.

[0093] Step 303: For attribute character embedding, referring to the idea of TransE, the relation r is interpreted as a transition from the head entity h to the attribute a, the attribute value is encoded using a combination function, and the relation of each element in the attribute triple is defined as:

[0094] h+r=f a (a)

[0095] where f a (a) is a combination function, a is an attribute value a = {c1, c2, c3, …, c t} of a character sequence. The combination function encodes the attribute value into a single vector and maps similar attribute values to similar vector representations. The N-gram-based combination function is calculated as:

[0096]

[0097] where N represents the maximum value of N used in N-gram combination N = 10, t is the length of the attribute value, and the calculation is:

[0098]

[0099] where T a is a set of valid attribute triples, T a ' is a set of damaged attribute triples, t a represents an element in T a , t' a represents an element in T' a , f(t a ) is a confidence score of the vector representation of the attribute value calculated based on the embedding h of the head entity h, the embedding r of the relation r, and the combination function f a (a), and f(t a ) = ||h+r-f a (a)||.

[0100] Step 304: Help structure embedding h ce by attribute character embedding h se to train in the same vector space, calculate:

[0101]

[0102] where G1, G2 represent two knowledge graphs that need to be aligned, h se represents the structure embedding vector, h ce represents the attribute character embedding vector, and cos(h se , h ce ) is the vector h se and h cecosine similarity.

[0103] The overall objective function of joint learning of structure embedding and attribute feature embedding is:

[0104] J = J SE + J CE + J SIM

[0105] The embedding representation of the entity is trained using the joint learning method, and the training is stopped when the overall objective function J is minimized, to obtain the final embedding representation of the entity.

[0106] After the optimization process of the above objective function, similar entities will have similar vector representations, and the similarity of entities of different knowledge graphs that need to be aligned is calculated:

[0107]

[0108] Where h1 is the embedding representation of a specified entity of knowledge graph G1, h2 is the embedding representation of all entities of knowledge graph G2, and cos is the cosine similarity. The two entities with a similarity exceeding a similarity threshold are aligned to obtain an entity alignment pair <h1, h2>, and the aligned entities and other entities are stored in the MongoDB database. sim > is stored in the MongoDB database.

[0109] S4: Knowledge calculation. Based on the integrated knowledge information, the ontology of the knowledge graph is constructed, the obtained triples are stored in the graph database Neo4j, and the initialization of the knowledge graph is realized.

[0110] The above embodiments are only used to illustrate the technical solutions of the present application, but not limit them; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those skilled in the art that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for digitally storing cultural information, characterized by, The method comprises: Step one: obtaining the multi-platform, multi-structure and multi-modal data of merchants in a certain region on the network; Step two: dividing the data into structured, semi-structured and unstructured data according to the type of data structure, and adopting different preprocessing methods for data of different structures; Step 201: for structured data with fixed structure, the relational database is disclosed as a resource description framework through D2RQ; Step 202: for semi-structured and unstructured data, pre-processing is performed to filter out invalid text, and long text is processed by sentence; Step 203: the pre-processed sentence is input into the BERT model, and the entire sentence is encoded to obtain the hidden layer embedding of each word; the step 203 comprises: The hidden layer embedding of each word is obtained by formula Step 204: decoding the hidden layer embedding of each word to construct two binary classifiers to predict the index position of the start and end of the entity, and calculating the probability of each word as the start position and end position of an entity; wherein, is a matrix of one-hot vectors of sub-word indices in the input sentence, is a matrix of sub-word embeddings, is a matrix of position embeddings, represents the position index in the input sequence, is the hidden state vector, i.e. the contextual representation of the input sentence at the layer, denotes a Transformer module, is the number of Transformer modules; Step 205: using the object marker to identify the corresponding object for each recognized entity, and calculating the probability of each word as the start position and end position of an object; Step 206: saving the triplets and context information extracted from semi-structured and unstructured data in MongoDB database, and constructing a preliminary knowledge graph dataset based on the information extracted from structured data; Step three: based on the TransE model, the loss function is designed to train the embedding representation of entities in different knowledge graphs, and the embedding representation of entities is obtained, the embedding representation of entity sequences in different knowledge graphs is calculated, and the similarity of two entities exceeding the similarity threshold is aligned, and the aligned entities and other entities are stored in the MongoDB database; Step four: integrating the entity and relationship triplet information stored in the MongoDB database into the graph database Neo4j to obtain the knowledge graph of merchants in a certain region. The step one comprises:

2. The method for digital storage of cultural information according to claim 1, wherein, Step 101: obtaining multi-modal data related to merchants through focused web crawler; Step 102: using MongoDB database to organize and store data. The step 204 comprises:

3. The method for digital storage of cultural information according to claim 1, wherein, The step 205 comprises: For each word, the probability of its being the start of an entity is calculated by the formula P (start | word) = P (word | start) P (start) For each word, the probability of its end-of-entity position is calculated by the formula P (end-of-entity | word) = P (word | end-of-entity) P (end-of-entity) / P (word) where, and represent the probability of identifying the start and end position of an entity for the th token in the input sequence, respectively; is the th token in the input sequence, i.e. , , denotes the weight, , is the bias, is the Sigmoid activation function.

4. The method for digital storage of cultural information according to claim 3, wherein, The step three comprises: For each word, the probability of its start position as the object is calculated by the formula P (start position | word) = P (word | start position) * P (start position) For each word, the probability of its end position as the object is calculated by the formula P (end position | word) = (number of occurrences of the word at the end position) / (number of occurrences of wherein, and represent the probability of identifying the start and end position of an object, respectively, of the th token in the input sequence, represents an encoded representation vector of the th object detected, , are weights, , are biases.

5. The method for digital storage of cultural information according to claim 1, wherein, Step 301: initializing the similarity threshold to 0.95; Step 305: calculating the cosine similarity of entity sequences in different knowledge graphs, and aligning two entities with similarity exceeding the similarity threshold, and storing the aligned entities and other entities in the MongoDB database. Step 302: computing a loss function for the structural embedding information of the entity ; Step 303: computing a loss function for the attribute character embeddings of the entity ; Step 304: calculating the property character embedding helps the structure embedding in the same vector space to train the loss function , the superposition loss function , the loss function and the loss function get the overall objective function , train the embedding representation of the entity through the joint learning loss function , get the final embedding representation of the entity; The step 302 comprises:

6. The method for digital storage of cultural information according to claim 5, wherein, The step 303 comprises: For a knowledge graph , define a relation triple as , an attribute triple as wherein denotes a head entity, denotes a tail entity, denotes a relation between the head entity and the tail entity, is an attribute value of the head entity relative to the relation, denote vector representations of the corresponding elements, respectively; The loss function is calculated by the formula ;​ wherein, , is a relationship occurs, is the total number of triples in the merged knowledge graph, , is a valid relationship triple, is a corrupted sample, i.e. a negative sample, formed by randomly replacing the head entity or the relationship in a relationship triple; denotes a set of valid relationship triples from the training set, denotes a set of relationship triples of corrupted samples, is a hyperparameter used to control the margin between positive and negative samples.

7. The method for digital storage of cultural information according to claim 6, wherein, The step 304 and step 305 comprise: The relation of each element in a triple is defined as wherein is a combination function, is a property value a character sequence, the combination function encodes property values into a single vector and maps similar property values to similar vector representations, the combination function is computed as wherein, denotes the maximum value of combinations used in the N-gram combination, is the length of the attribute value; Through formula Calculate the loss function ,in, It is a set of valid attribute triples. It is a set of broken attribute triples. express The elements in express The elements in Based on head entity Embedded ,relation Embedded and the use of combination functions The confidence score is calculated as a vector representation of the attribute values, and .

8. The method for digital storage of cultural information according to claim 5, wherein, ​ The loss function is calculated by the formula wherein, denotes two knowledge graphs that need to be aligned, denotes a structural embedding vector, denotes an attribute character embedding vector;​ Using a joint learning method, a loss function , a loss function and a loss function are summed to obtain an overall objective function , the embedding representation of the entity is trained, and the training is stopped when the overall objective function is minimized, obtaining the final embedding representation of the entity; The similarity of the entity sequences of different knowledge graphs is calculated by the formula , wherein is the embedding representation of a specified entity of the knowledge graph , is the embedding representation of all entities of the knowledge graph , is the cosine similarity; two entities with a similarity exceeding a similarity threshold value are aligned to obtain an entity alignment pair The aligned entities and other entities are stored in a MongoDB database.

Citation Information

Patent Citations

  • Cultural relic knowledge map generation and visualization method for an intelligent museum

    CN109657068A

  • Architecture knowledge domain construction method oriented to multi-source heterogeneous architectural humanity historical materials

    CN113806563A

  • Entity alignment method in four-insurance-one-fund domain knowledge graphs

    CN112131404A

  • SG-CIM model-oriented entity alignment method

    CN114911946A