Multi-modal knowledge graph fusion method, system and equipment based on data enhancement and medium
Through the knowledge expansion module of entity multimodal data enhancement and multimodal feature guidance, combined with graph neural network, the sparsity and heterogeneity problems in the multimodal knowledge graph are solved, and effective representation and multi-structure features are realized. Effective fusion of modal knowledge graphs.
Patent Information
- Application Number
- CN202411071279.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-06
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2044-08-06
AI Technical Summary
The existing multimodal knowledge graph fusion method fails to effectively solve the sparsity and heterogeneity problems in the knowledge graph, and ignores the multimodal information in the entity neighborhood, resulting in the inability to effectively represent the multimodal knowledge graph. Isomeric entities affect the fusion effect.
Through solid multimodal data enhancement, the multimodal pre-trained model CLIP extracts visual features and text features, designs a knowledge expansion module for multimodal feature guidance, mining multimodal feature similarity and attribute information, and combining with graph neural network aggregation Entity neighbor feature realizes the effective representation of entity structural features and the fusion of multimodal features.
The representation effect of entity features in the multimodal knowledge graph is improved, the heterogeneity problem is solved, the entity alignment performance is enhanced, and effective multimodal knowledge graph fusion is achieved.
Smart Images

Figure CN118966339A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of multimodal learning and knowledge graph technology, and more specifically to a multimodal knowledge graph fusion method, system, device and medium based on data enhancement. Background Art
[0002] Compared with traditional knowledge graphs, multimodal knowledge graphs contain both semantic relationships between entities and multimodal data such as images and text. However, there are certain non-aligned entities between multimodal knowledge graphs built based on different data sources. The redundancy problem of such knowledge graphs makes it difficult to fully apply complete knowledge to downstream tasks. Therefore, effective fusion of multimodal knowledge graphs is very important for the application of knowledge graphs.
[0003] To address this problem, there are some related methods for multimodal knowledge graph fusion at home and abroad. Patent 202310699235.3 designs a multimodal knowledge graph entity alignment method and system based on inter-modal interaction, which uses a low-rank multimodal fusion method to model the interaction between modalities for each single-modal feature, and then uses a cross-modal attention mechanism to make the single-modal features learn the interaction between modalities in parallel to the low-rank fusion modality, generating an overall feature representation of the entity, which fully considers the interaction and constraints between different modalities; Patent 202211630607.9 proposes an entity alignment method based on multimodal collaborative representation learning. The BERT model and deep residual network extract the initial semantic information of text and image, and project the text and image features into the same semantic space to perform entity alignment of multimodal knowledge graphs, thus reducing the heterogeneity between different modalities. Patent 202110950895.5 discloses a multimodal entity alignment method based on triple screening fusion, which uses an unsupervised triple screening module to quantify the importance of triples, and filters some invalid triples based on the importance score, and then generates the visual features and structural features of the entity respectively for entity alignment. However, the existing multimodal knowledge graph fusion methods do not consider the sparsity problem that is common in knowledge graphs. The scarcity of knowledge associated with many entities makes it difficult to effectively represent the structural features of entities by directly using existing knowledge. At the same time, it is difficult for existing methods to effectively solve the heterogeneity problem between different modal data when fusing different modal features of entities. In addition, the current method only uses graph structural features to learn the structural features of entities, ignoring the multimodal information of other entities in the entity neighborhood, resulting in the inability to effectively represent heterogeneous entities in the multimodal knowledge graph, affecting the effect of multimodal knowledge graph fusion.
[0004] Therefore, how to provide a multimodal knowledge graph fusion method and system based on data enhancement is an urgent problem that technical personnel in this field need to solve. Summary of the invention
[0005] In view of this, the present invention provides a multimodal knowledge graph fusion method, system, device and medium based on data enhancement, which effectively represents the structural characteristics of entities, effectively solves the heterogeneity problem between different modal data, and realizes effective multimodal knowledge graph fusion.
[0006] In order to achieve the above object, the present invention adopts the following technical solution:
[0007] A multimodal knowledge graph fusion method based on data enhancement, the specific steps are as follows:
[0008] Step 1: Perform entity multimodal data enhancement on entity images and entity text descriptions;
[0009] Step 2: Based on the enhanced entity multimodal data, the visual features and text features of each entity are extracted through the multimodal pre-training model CLIP;
[0010] Step 3: Design a knowledge expansion module guided by multimodal features, and mine the multimodal feature similarities and the association of the same attribute information between different entities based on visual features and text features, thereby realizing entity semantic expansion enhanced by multimodal features and obtaining an expanded knowledge graph;
[0011] Step 4: Based on the expanded knowledge graph obtained in step 3, the multimodal features of the entity neighbors are aggregated through the graph neural network to obtain the entity structure features that integrate multimodal information;
[0012] Step 5: Fuse the entity multimodal features including the entity’s visual features and text features obtained in step 2 with the entity’s structural features obtained in step 4, perform entity alignment, and complete the multimodal knowledge graph fusion.
[0013] Preferably, the specific process of step 1 is:
[0014] For each entity image, the image description model is used to generate the corresponding text. For the text description of the entity, the stable diffusion model is used to generate the corresponding image, thereby achieving multimodal data enhancement of the entity.
[0015] Preferably, the specific method of step 2 is:
[0016] The image obtained after data enhancement is input into the VIT encoder of the CLIP model to obtain the visual features of each entity, and the text obtained after data enhancement is input into the BERT encoder of the CLIP model to obtain the text features of each entity.
[0017] Preferably, a knowledge expansion module guided by multimodal features is designed. In step 3, the visual features and text features of the entities are clustered respectively by the DBSCAN algorithm, and the visual feature similarity matrix and text feature similarity matrix between different entities are calculated in each cluster. For each attribute, the visual feature similarity is higher than the threshold TH. v The number of pairs of visual features with the same attribute value #ev i The similarity with the text feature is higher than the threshold TH t The number of pairs of text features with the same attribute value #et i , and for each attribute, the visual feature similarity is counted above the threshold TH v Number of entity pairs #EV i The similarity with the text feature is higher than the threshold TH t Number of entity pairs #ET i ;
[0018] Furthermore, the feature similarity co-occurrence confidence corresponding to the attribute can be calculated:
[0019]
[0020] Among them, Conf v Represents the co-occurrence confidence of the visual feature similarity of the i-th attribute, Conf t Indicates the co-occurrence confidence of the text feature similarity of the i-th attribute, #ev i and #et i Respectively represent the number of co-existing pairs of visual features and text features of the i-th attribute, #EV i and #ET i They represent the number of entity pairs whose visual feature similarity of the i-th attribute is higher than the threshold and the number of entity pairs whose text feature similarity is higher than the threshold respectively;
[0021] Thus, the co-occurrence pattern of multimodal feature similarity and attributes can be mined, which represents the co-occurrence confidence Conf of the visual feature similarity of attribute p. v Above the threshold TC v , for two visual features with similarity higher than the threshold T v Entity e1 and entity e2, entity e1 has a triple (e1, p, t) containing attribute p. At this time, based on feature similarity and attribute co-occurrence pattern, the triple (e2, p, t) can be completed for entity e2. Similarly, based on text feature similarity and attribute co-occurrence pattern, the pattern indicates that if the text feature similarity co-occurrence confidence of attribute p is t Above the threshold TC t , for two text features with similarity higher than the threshold T tFor entities e1 and e2, entity e1 has a triple (e1, p, t) containing attribute p. At this time, based on feature similarity and attribute co-occurrence pattern, the triple (e2, p, t) can be completed for entity e2 to achieve multimodal feature-guided entity semantic expansion and obtain the expanded knowledge graph.
[0022] Preferably, the graph neural network used to extract structural features of entity e in step 4 is represented as:
[0023] n i =ReLU(w[X vni ;X tni ; r ni ] T )
[0024]
[0025] Among them, n i represents the hidden vector of the ith neighbor of the entity; w represents the learnable parameter vector; [X vni ;X tni ; r ni ] T is the entity visual feature X of the i-th neighbor vni , text feature X tni and the relation vector r ni Transpose of the concatenated vector; a i represents the attention weight of the i-th neighbor, exp(·) represents the natural exponential function; W and b represent the learnable parameter matrix and parameter vector; N(e) is the entity structure feature of entity e.
[0026] Preferably, the step 5 specifically includes:
[0027] The entity multimodal features and entity structural features containing the entity's visual features and text features are fused to obtain the entity's multimodal fusion features, which are expressed as:
[0028] MF(e)=N(e)+β1X ve +β2X te
[0029] Among them, MF(e) represents the multimodal fusion feature of entity e, X ve and X te Represent the visual features and text features of entity e respectively, β1 and β2 are the weight coefficients of visual features and text features in the entity multimodal fusion features;
[0030] For the entities e taken from the two knowledge graphs, K1 and e K2, calculate the multimodal fusion features of the two entities, and normalize the multimodal fusion features to obtain and
[0031] The normalized multimodal fusion features corresponding to the two entities are calculated by cosine similarity and The similarity between entities is calculated to align entities above the similarity threshold, completing the fusion of multimodal knowledge graphs.
[0032] A multimodal knowledge graph fusion system based on data enhancement, comprising:
[0033] Multimodal data enhancement module: used to perform entity multimodal data enhancement on entity images and entity text descriptions;
[0034] Multimodal feature extraction module: used to extract visual features and text features of each entity based on the enhanced entity multimodal data through the multimodal pre-training model CLIP;
[0035] Entity semantic expansion module: used to design a knowledge expansion module guided by multimodal features, and mine the multimodal feature similarities and the association of the same attribute information between different entities based on visual features and text features, thereby realizing entity semantic expansion enhanced by multimodal features and obtaining an expanded knowledge graph;
[0036] Multimodal information fusion module: It is used to aggregate the multimodal features of entity neighbors through the graph neural network based on the expanded knowledge graph to obtain the entity structure features that integrate multimodal information;
[0037] Multimodal knowledge graph fusion module: used to fuse entity multimodal features and entity structural features including entity visual features and text features, perform entity alignment, and complete multimodal knowledge graph fusion.
[0038] A computer device comprises: a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the computer program, the steps of the method are implemented.
[0039] A computer-readable storage medium stores a computer program, which implements the steps of a method when executed by a processor.
[0040] It can be seen from the above technical solutions that, compared with the prior art, the present invention discloses a multimodal knowledge graph fusion method, system, device and medium based on data enhancement, which has the following advantages:
[0041] (1) Through multimodal feature enhancement and multimodal feature-guided knowledge expansion modules, we can supplement the multimodal data of entities and entity-related triple knowledge in the multimodal knowledge graph, and improve the representation effect of entity features in the sparse knowledge graph;
[0042] (2) The multimodal pre-trained CLIP model is used to extract the image and text features of the entity, so that the image and text features are in the same representation space, which solves the heterogeneity between different modal data and can effectively improve the effect of entity multimodal feature fusion;
[0043] (3) The present invention fully integrates the multimodal features of the entity itself and the structural features containing multimodal information, improves the entity alignment performance of the multimodal knowledge graph, and realizes effective multimodal knowledge graph fusion. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0045] Figure 1 The accompanying drawing is a flow chart of a multimodal knowledge graph fusion method based on data enhancement provided by the present invention;
[0046] Figure 2 The accompanying figure is a block diagram of a multimodal knowledge graph system based on data enhancement provided by the present invention. DETAILED DESCRIPTION
[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0048] The embodiment of the present invention discloses a multimodal knowledge graph fusion method based on data enhancement, such as Figure 1 As shown, including:
[0049] Step 1: Perform entity multimodal data enhancement on entity images and entity text descriptions;
[0050] Step 2: Based on the enhanced entity multimodal data, the multimodal pre-trained model CLIP is used to extract the visual features and text features of each entity respectively;
[0051] Step 3: Design a knowledge expansion module guided by multimodal features, and mine the multimodal feature similarities and the association of the same attribute information between different entities based on visual features and text features, thereby realizing entity semantic expansion enhanced by multimodal features and obtaining an expanded knowledge graph;
[0052] Step 4: Based on the expanded knowledge graph obtained in step 3, the multimodal features of the entity neighbors are aggregated through the graph neural network to obtain the entity structure features that integrate multimodal information;
[0053] Step 5: Fuse the entity multimodal features including the entity’s visual features and text features obtained in step 2 with the entity’s structural features obtained in step 4, perform entity alignment, and complete the multimodal knowledge graph fusion.
[0054] In this embodiment, the specific steps of step 1 are: for each entity image, an image description model such as a BLIP model is used to generate corresponding text, and data enhancement in the form of image-to-text is performed; at the same time, a stable diffusion model is used to generate a corresponding image for the text description of the entity, and data enhancement in the form of text-to-image is performed to achieve multimodal data enhancement of the entity. At this time, the same entity has corresponding multiple images and text information.
[0055] In this embodiment, the specific steps of step 2 are: inputting multiple images of an entity obtained after data enhancement into the VIT encoder of the CLIP model respectively, and calculating the mean of all image feature vectors output by the encoder; at the same time, inputting multiple text descriptions of an entity into the BERT encoder of the CLIP model respectively, and calculating the mean of all text feature vectors output by the encoder, so as to obtain the visual feature X of each entity. v and text feature X t ,In particular, the visual features and text features obtained here ,through data enhancement and feature averaging can enhance the correlation between ,multimodal data from different data sources.
[0056] In this embodiment, the specific steps of step 3 are: designing a knowledge expansion module guided by multimodal features, clustering the visual features and text features of the entities respectively through the DBSCAN algorithm, calculating the visual feature similarity matrix and text feature similarity matrix between different entities in each cluster, and counting the visual feature similarity above the threshold TH for each attribute. v The number of pairs of visual features with the same attribute value #ev i The similarity with the text feature is higher than the threshold TH t The number of pairs of text features with the same attribute value #et i , and for each attribute, the visual feature similarity is counted above the threshold TH vNumber of entity pairs #EV i The similarity with the text feature is higher than the threshold TH t Number of entity pairs #ET i , thus calculating the feature similarity co-occurrence confidence corresponding to the attribute as:
[0057]
[0058] Among them, Conf v Represents the co-occurrence confidence of the visual feature similarity of the i-th attribute, Conf t Indicates the co-occurrence confidence of the text feature similarity of the i-th attribute, #ev i and #et i Respectively represent the number of co-existing pairs of visual features of the ith attribute and the number of co-existing pairs of text features of the ith attribute, #EV i and #ET i They represent the number of entity pairs whose visual feature similarity of the i-th attribute is higher than the threshold and the number of entity pairs whose text feature similarity of the i-th attribute is higher than the threshold;
[0059] Thus, the co-occurrence pattern of multimodal feature similarity and attributes can be mined, which represents the co-occurrence confidence Conf of the visual feature similarity of attribute p. v Above the threshold TC v , for two visual features with similarity higher than the threshold T v Entity e1 and entity e2, entity e1 has a triple (e1, p, t) containing attribute p. At this time, based on feature similarity and attribute co-occurrence pattern, the triple (e2, p, t) can be completed for entity e2. Similarly, based on text feature similarity and attribute co-occurrence pattern, the pattern indicates that if the text feature similarity co-occurrence confidence of attribute p is t Above the threshold TC t , for two text features with similarity higher than the threshold T t For entities e1 and e2, entity e1 has a triple (e1, p, t) containing attribute p. At this time, based on feature similarity and attribute co-occurrence pattern, the triple (e2, p, t) can be completed for entity e2 to achieve multimodal feature-guided entity semantic expansion and obtain the expanded knowledge graph.
[0060] In this embodiment, the specific steps of step 4 are: based on the knowledge graph after entity semantic expansion, the multimodal features of the entity neighbors are aggregated through the graph neural network to extract the multimodal features most relevant to the entity semantic context, and obtain the entity structure features that integrate multimodal information; the graph neural network used to extract the structural features of entity e is represented as follows:
[0061] ni =ReLU(w[X vni ;X tni ; r ni ] T
[0062]
[0063] Among them, n i represents the hidden vector of the ith neighbor of the entity; w represents the learnable parameter vector; [X vni ;X tni ; r ni ] T is the entity visual feature X of the i-th neighbor vni , text feature X tni and the relation vector r ni Transpose of the concatenated vector; a i represents the attention weight of the ith neighbor, exp(·) represents the natural exponential function; W and b represent the learnable parameter matrix and parameter vector; N(e) is the neighbor encoding representation of entity e, that is, the structural feature of entity e, and m is the number of entity neighbors. The larger its value, the more neighborhood information can be integrated, but at the same time a certain amount of noise will be introduced. Here, the preferred value of m is 20.
[0064] In this embodiment, the specific steps of step 5 are: fusing the entity multimodal features and the entity structure features to obtain the entity multimodal fusion features, which can be expressed as:
[0065] MF(e)=N(e)+β1X ve +β2X te
[0066] Among them, MF(e) represents the multimodal fusion feature of entity e, X ve and X te Represent the visual features and text features of entity e respectively, β1 and β2 are the weight coefficients of visual features and text features in entity multimodal fusion features, and the preferred values of β1 and β2 are both 0.5. Then, the entities e taken out from the two knowledge graphs are K1 and e K2 , calculate the multimodal fusion features of the two entities, and normalize the multimodal fusion features to obtain and
[0067] During the training process, the model is optimized through the following loss function:
[0068]
[0069] Where e1 and e2 are two aligned entities in the labeled entity pair set S, and e'1 and e'2 are two non-aligned entities in the negative sample entity pair set that randomly replace e1 or e2 with another entity. Represents the multimodal fusion features of entity e1 And entity e2 multimodal fusion features The Manhattan distance of the difference, Representing entity e'1 multimodal fusion features and entity e'2 multimodal fusion features The Manhattan distance of the difference; γ is the marginal parameter, where the preferred value of γ is 1.0, and max(x,0) represents the maximum value between x and 0.
[0070] During the reasoning process, the multimodal fusion features of two entities are calculated by cosine similarity. and The similarity between entities is calculated to align entities above the similarity threshold and complete the fusion of multimodal knowledge graphs.
[0071] This embodiment provides a multimodal knowledge graph fusion system based on data enhancement, such as Figure 2 As shown, including:
[0072] Multimodal data enhancement module: used to perform entity multimodal data enhancement on entity images and entity text descriptions;
[0073] Multimodal feature extraction module: used to extract visual features and text features of each entity based on the enhanced entity multimodal data through the multimodal pre-training model CLIP;
[0074] Entity semantic expansion module: used to design a knowledge expansion module guided by multimodal features, and mine the multimodal feature similarities and the association of the same attribute information between different entities based on visual features and text features, thereby realizing entity semantic expansion enhanced by multimodal features and obtaining an expanded knowledge graph;
[0075] Multimodal information fusion module: It is used to aggregate the multimodal features of entity neighbors through the graph neural network based on the expanded knowledge graph to obtain the entity structure features that integrate multimodal information;
[0076] Multimodal knowledge graph fusion module: used to fuse entity multimodal features and entity structural features including entity visual features and text features, perform entity alignment, and complete multimodal knowledge graph fusion.
[0077] In this embodiment, the specific execution steps of the multimodal data enhancement module are as follows: for each entity image, an image description model such as a BLIP model is used to generate corresponding text, and data enhancement in the form of image-to-text is performed; at the same time, a stable diffusion model is used to generate a corresponding image for the text description of the entity, and data enhancement in the form of text-to-image is performed, thereby realizing multimodal data enhancement of the entity. At this time, the same entity has corresponding multiple images and text information.
[0078] In this embodiment, the specific execution steps of the multimodal feature extraction module are as follows: inputting multiple images of an entity obtained after data enhancement into the VIT encoder of the CLIP model respectively, and calculating the mean of all image feature vectors output by the encoder; at the same time, inputting multiple text descriptions of an entity into the BERT encoder of the CLIP model respectively, and calculating the mean of all text feature vectors output by the encoder, so as to obtain the visual feature X of each entity. v and text feature X t ,In particular, the visual features and text features obtained here ,through data enhancement and feature averaging can enhance the correlation between ,multimodal data from different data sources.
[0079] In this embodiment, the specific execution steps of the entity semantic expansion module are: clustering the visual features and text features of the entity respectively through the DBSCAN algorithm, calculating the visual feature similarity matrix and text feature similarity matrix between different entities in each cluster, and counting the visual feature similarity above the threshold TH for each attribute. v The number of pairs of visual features with the same attribute value #ev i The similarity with the text feature is higher than the threshold TH t The number of pairs of text features with the same attribute value #et i , and for each attribute, the visual feature similarity is counted above the threshold TH v Number of entity pairs #EV i The similarity with the text feature is higher than the threshold TH t Number of entity pairs #ET i , thus calculating the feature similarity co-occurrence confidence corresponding to the attribute as:
[0080]
[0081] Among them, Conf v Represents the co-occurrence confidence of the visual feature similarity of the i-th attribute, Conf t Indicates the co-occurrence confidence of the text feature similarity of the i-th attribute, #ev i and #et iRespectively represent the number of co-existing pairs of visual features and text features of the i-th attribute, #EV i and #ET i They represent the number of entity pairs whose visual feature similarity of the i-th attribute is higher than the threshold and the number of entity pairs whose text feature similarity is higher than the threshold respectively;
[0082] Thus, the co-occurrence pattern of multimodal feature similarity and attributes can be mined, which represents the co-occurrence confidence Conf of the visual feature similarity of attribute p. v Above the threshold TC v , for two visual features with similarity higher than the threshold T v Entity e1 and entity e2, entity e1 has a triple (e1, p, t) containing attribute p. At this time, based on feature similarity and attribute co-occurrence pattern, the triple (e2, p, t) can be completed for entity e2. Similarly, based on text feature similarity and attribute co-occurrence pattern, the pattern indicates that if the text feature similarity co-occurrence confidence of attribute p is t Above the threshold TC t , for two text features with similarity higher than the threshold T t For entities e1 and e2, entity e1 has a triple (e1, p, t) containing attribute p. At this time, based on feature similarity and attribute co-occurrence pattern, the triple (e2, p, t) can be completed for entity e2 to achieve multimodal feature-guided entity semantic expansion and obtain the expanded knowledge graph.
[0083] In this embodiment, the specific execution steps of the multimodal information fusion module are: based on the knowledge graph after entity semantic expansion, the multimodal features of the entity neighbors are aggregated through the graph neural network to extract the multimodal features most relevant to the entity semantic context, and obtain the entity structure features that integrate the multimodal information; the graph neural network used to extract the structural features of entity e is represented as follows:
[0084] n i =ReLU(w[X vni ;X tni ; r ni ] T )
[0085]
[0086] Among them, n i represents the hidden vector of the ith neighbor of the entity; w represents the learnable parameter vector; [X vni ;X tni ; r ni ] T is the entity visual feature X of the i-th neighborvni , text feature X tni and the relation vector r ni Transpose of the concatenated vector; a i represents the attention weight of the ith neighbor, exp(·) represents the natural exponential function; W and b represent the learnable parameter matrix and parameter vector; N(e) is the neighbor encoding representation of entity e, that is, the structural feature of entity e, and m is the number of entity neighbors. The larger its value, the more neighborhood information can be integrated, but at the same time a certain amount of noise will be introduced. Here, the preferred value of m is 20.
[0087] In this embodiment, the specific execution steps of the multimodal knowledge graph fusion module are: fusing the entity multimodal features and the entity structure features to obtain the multimodal fusion features of the entity, which can be expressed as:
[0088] MF(e)=N(e)+β1X ve +β2X te
[0089] Among them, MF(e) represents the multimodal fusion feature of entity e, X ve and X te Represent the visual features and text features of entity e respectively, β1 and β2 are the weight coefficients of visual features and text features in entity multimodal fusion features, and the preferred values of β1 and β2 are both 0.5. Then, the entities e taken out from the two knowledge graphs are K1 and e K2 , calculate the multimodal fusion features of the two entities, and normalize the multimodal fusion features to obtain and
[0090] During the training process, the model is optimized through the following loss function:
[0091]
[0092] Where e1 and e2 are two aligned entities in the labeled entity pair set S, and e'1 and e'2 are two non-aligned entities in the negative sample entity pair set that randomly replace e1 or e2 with another entity. Represents the multimodal fusion features of entity e1 And entity e2 multimodal fusion features The Manhattan distance of the difference, Representing entity e'1 multimodal fusion features And entity e2 multimodal fusion features The Manhattan distance of the difference; γ is the marginal parameter, where the preferred value of γ is 1.0, and max(x,0) represents the maximum value between x and 0.
[0093] During the reasoning process, the multimodal fusion features of two entities are calculated by cosine similarity. and The similarity between entities is calculated to align entities above the similarity threshold and complete the fusion of multimodal knowledge graphs.
[0094] This embodiment provides a computer device, including: a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the computer program, the steps of a multimodal knowledge graph fusion method based on data enhancement are implemented.
[0095] This embodiment provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of a multimodal knowledge graph fusion method based on data enhancement are implemented.
[0096] A person of ordinary skill in the art can understand that: all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, etc. Various media that can store program codes.
[0097] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0098] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A multimodal knowledge graph fusion method based on data enhancement, It is characterized in that The specific steps are as follows: Step 1: Perform entity multimodal data enhancement on the entity image and the entity text description; Step 2: Based on the enhanced entity multimodal data, the visual features and text features of each entity are extracted through the multimodal pre-training model CLIP; Step 3: Design a knowledge expansion module guided by multimodal features, and mine the multimodal feature similarities and the association of the same attribute information between different entities based on visual features and text features, thereby realizing entity semantic expansion enhanced by multimodal features and obtaining an expanded knowledge graph; Step 4: Based on the expanded knowledge graph, the multimodal features of the entity neighbors are aggregated through the graph neural network to obtain the entity structure features that integrate multimodal information; Step 5: Fuse the entity multimodal features and entity structural features including the entity’s visual features and text features, perform entity alignment, and complete the multimodal knowledge graph fusion.
2. According to the multimodal knowledge graph fusion method based on data enhancement according to claim 1, It is characterized in that The specific process of step 1 is as follows: For each entity image, the image description model is used to generate the corresponding text. For the text description of the entity, the stable diffusion model is used to generate the corresponding image, thereby achieving multimodal data enhancement of the entity.
3. According to the multimodal knowledge graph fusion method based on data enhancement according to claim 2, It is characterized in that The specific method of step 2 is: The image obtained after data enhancement is input into the VIT encoder of the CLIP model to obtain the visual features of each entity, and the text obtained after data enhancement is input into the BERT encoder of the CLIP model to obtain the text features of each entity.
4. According to the multimodal knowledge graph fusion method based on data enhancement according to claim 3, It is characterized in that Design a knowledge expansion module guided by multimodal features. In step 3, the visual features and text features of the entity are clustered separately by the DBSCAN algorithm. In each cluster, the visual feature similarity matrix and text feature similarity matrix between different entities are calculated. For each attribute, the visual feature similarity above the threshold TH is counted. v The number of pairs of visual features with the same attribute value #ev i , the text feature similarity is higher than the threshold TH t The number of pairs of text features with the same attribute value #et i , and for each attribute, the visual feature similarity is counted above the threshold TH v Number of entity pairs #EV i The similarity with the text feature is higher than the threshold TH t Number of entity pairs #ET i ; Calculate the feature similarity co-occurrence confidence corresponding to the attribute: Among them, Conf v Represents the co-occurrence confidence of the visual feature similarity of the i-th attribute, Conf t Indicates the co-occurrence confidence of the text feature similarity of the i-th attribute, #ev i and #et i Respectively represent the number of co-existing pairs of visual features of the ith attribute and the number of co-existing pairs of text features of the ith attribute, #EV i and #ET i They represent the number of entity pairs whose visual feature similarity of the i-th attribute is higher than the threshold and the number of entity pairs whose text feature similarity of the i-th attribute is higher than the threshold respectively; According to the co-occurrence pattern of visual feature similarity and attributes, the pattern indicates that if the visual feature similarity co-occurrence confidence Conf of attribute p v Above the threshold TC v , for two visual features with similarity higher than the threshold T v Entity 1 and entity e 2 , entity e 1 A triple (e 1 , p, t), then, based on the feature similarity and attribute co-occurrence pattern, entity e 2 Complete triples (e 2 , p, t); According to the text feature similarity and attribute co-occurrence pattern, the pattern indicates that if the text feature similarity co-occurrence confidence of attribute p t Above the threshold TC t , for two text features with similarity higher than the threshold T t Entity 1 and entity e 2 , entity e 1 A triple (e 1 , p, t), then, based on the feature similarity and attribute co-occurrence pattern, entity e 2 Complete triples (e 2 , p, t), realize the entity semantic expansion guided by multimodal features and obtain the expanded knowledge graph.
5. According to the multimodal knowledge graph fusion method based on data enhancement according to claim 4, It is characterized in that The graph neural network used to extract the structural features of entity e in step 4 is represented as follows: n i =ReLU(W[X vni !X tni 4 r ni ] T ) Among them, n i represents the hidden vector of the ith neighbor of the entity; w represents the learnable parameter vector; [X vni ;X tni ; r ni ] T is the entity visual feature X of the i-th neighbor vni , text feature X tni and the relation vector r ni Transpose of the concatenated vector; a i represents the attention weight of the i-th neighbor, exp(·) represents the natural exponential function; W and b represent the learnable parameter matrix and parameter vector; N(e) is the entity structure feature of entity e; m is the number of entity neighbors.
6. According to the multimodal knowledge graph fusion method based on data enhancement according to claim 5, It is characterized in that The step 5 specifically includes: The entity multimodal features and entity structural features containing the entity's visual features and text features are fused to obtain the entity's multimodal fusion features, which are expressed as: MF(e)=N(e)+β 1 X ve +b 2 X te Among them, MF(e) represents the multimodal fusion feature of entity e, X ve and X te Represent the visual features and text features of entity e respectively, β 1 and β 2 are the weight coefficients of visual features and text features in entity multimodal fusion features; The above formula is used to calculate the two entities e extracted from the two knowledge graphs respectively. K1 and e K2 The corresponding multimodal fusion features are normalized to obtain and The normalized multimodal fusion features corresponding to the two entities are calculated by cosine similarity and The similarity between entities is calculated to align entities above the similarity threshold, completing the fusion of multimodal knowledge graphs.
7. A multimodal knowledge graph fusion system based on data enhancement, It is characterized in that include: Multimodal data enhancement module: used to perform entity multimodal data enhancement on entity images and entity text descriptions; Multimodal feature extraction module: used to extract visual features and text features of each entity based on the enhanced entity multimodal data through the multimodal pre-training model CLIP; Entity semantic expansion module: used to design a knowledge expansion module guided by multimodal features, and mine the multimodal feature similarities and the association of the same attribute information between different entities based on visual features and text features, thereby realizing entity semantic expansion enhanced by multimodal features and obtaining an expanded knowledge graph; Multimodal information fusion module: used to aggregate the multimodal features of entity neighbors through the graph neural network based on the expanded knowledge graph to obtain entity structure features that integrate multimodal information; Multimodal knowledge graph fusion module: used to fuse entity multimodal features and entity structural features including entity visual features and text features, perform entity alignment, and complete multimodal knowledge graph fusion.
8. A computer device, It is characterized in that include: A memory and a processor, wherein a computer program that can be run on the processor is stored in the memory, and when the processor executes the computer program, the steps of any one of the methods of claims 1 to 6 are implemented.
9. A computer-readable storage medium, It is characterized in that The storage medium stores a computer program, which, when executed by a processor, implements the steps of any one of the methods of claims 1 to 6.
Citation Information
Patent Citations
Entity alignment method and system based on image generation algorithm and multi-modal large model
CN117725230A
Multi-modal model optimization retrieval training method and storage medium
CN118094216A
Knowledge graph entity alignment method based on multi-modal data supervision
CN118211646A
Multi-modal knowledge graph completion method and system based on cross-view comparative learning
CN118364901A
Cited By
Method for judging illegal behaviors after examination based on multiple modes in open education system
CN119274239A
A multimodal post-exam violation judgment method in the open education system
CN119274239B
Government affair knowledge graph construction method based on data fusion driving
CN119474382A
Small sample learning data expansion method and system based on multi-modal information fusion
CN119783041A
Knowledge graph completion method and device and medium
CN120123435A
