Intelligent enterprise recommendation algorithm based on knowledge graph and graph attention

By building a multimodal knowledge graph and introducing graph attention, the problem of multimodal data fusion and personalized matching in the recommendation system is solved, and accurate enterprise intelligent recommendation is achieved.

CN120386925APending Publication Date: 2025-07-29QINGDAO MENGDOU NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510472979.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-15
Publication Date
2025-07-29

AI Technical Summary

Technical Problem

In existing recommendation systems, multimodal data fusion and personalized matching are difficult to achieve, resulting in inaccurate recommendation effects.

Method used

Using an enterprise intelligent recommendation algorithm based on knowledge graph and graph attention, the fusion and personalized matching of multimodal data is achieved by constructing multimodal knowledge graphs, data alignment, knowledge representation learning and attention embedding propagation.

Benefits of technology

Effectively integrate a variety of data types from enterprises, users, demanders, suppliers and experts to achieve accurate recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure BDA0005360478050000031
    Figure BDA0005360478050000031
  • Figure BDA0005360478050000071
    Figure BDA0005360478050000071
  • Figure FDA0005360478010000021
    Figure FDA0005360478010000021
Patent Text Reader

Abstract

The invention relates to the technical field of intelligent recommendation, in particular to an enterprise intelligent recommendation algorithm based on a knowledge graph and graph attention. The enterprise intelligent recommendation algorithm based on the knowledge graph and the graph attention comprises the steps of multi-modal knowledge graph construction, multi-modal data alignment, knowledge representation learning, attention embedding propagation, model prediction and the like. According to the enterprise intelligent recommendation algorithm based on the knowledge graph and the graph attention provided by the invention, the problems of multi-modal data fusion and personalized matching in a recommendation system are solved, various data types of enterprises, users, demand sides, suppliers and experts are effectively integrated, and accurate recommendation is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of intelligent recommendation, and specifically provides an enterprise intelligent recommendation algorithm based on knowledge graph and graph attention. Background Technique

[0002] Currently, most of the Internet, especially the industrial Internet, is researching at the level of the Internet of Things. Through the form of the Internet of Things, interconnection is formed, and it is necessary to achieve popularity and standardization on the hardware basis, which takes a long time, has weak popularity, and the linked content has limitations. What can truly achieve the rapid interconnection of all things is the link of the data world that is separated from the physical world. Based on this idea, the application of multi-source data is carried out, and through the AI technology base, combined with blockchain to realize the data Internet, and decentralized data interconnection, data co-construction, and sharing are carried out. Users create data, use data, and share data value. The first-generation Internet is one-way search, "searching for a needle in a haystack"-style information acquisition. The second-generation Internet is limited one-way interconnection, "information cocoon"-style information acquisition. The decentralized celestial weaving galaxy is the "starry sea"-style self-growing Internet model of the third-generation Internet

[0003] Business Model: Link various industrial platforms and industry platforms to the global industrial chain, supply chain, and innovation chain through data. Realize the upgrade of the industrial cluster supported by data. Through data linkage, automatic tendering and price comparison are realized, centralized procurement is automatically formed, enterprises are assisted in cost reduction, and sunshine procurement is realized. It can be used by individual users, and thousands of industries are empowered in a linked manner.

[0004] In the current recommendation system, it is difficult to achieve multi-modal data fusion and personalized matching. Based on this, the present invention provides an enterprise intelligent recommendation algorithm based on knowledge graph and graph attention to solve the above-mentioned technical problems. Summary of the Invention

[0005] The purpose of the present invention is to provide an enterprise intelligent recommendation algorithm based on knowledge graph and graph attention, which solves the problems of multi-modal data fusion and personalized matching in the recommendation system.

[0006] To achieve the above purpose, the present invention provides the following technical solutions:

[0007] The present invention provides an enterprise intelligent recommendation algorithm based on knowledge graph and graph attention, including the following steps:

[0008] Construct a multi-modal knowledge graph;

[0009] According to the constructed multi-modal knowledge graph, align the multi-modal data in the multi-modal knowledge graph;

[0010] Knowledge representation learning;

[0011] In the construction of the knowledge graph, knowledge-aware attention is introduced, and attention embedding propagation is adopted;

[0012] The output representations of each layer of the enterprise nodes and product nodes are respectively concatenated to form the final nodes, and the inner product calculation is performed on the embedding representations of the finally obtained user nodes and item nodes to obtain the predicted preference score of the user for the item.

[0013] The present invention is further configured as follows: The process of constructing the multimodal knowledge graph is as follows:

[0014] Data acquisition: Extract multimodal data from different data sources;

[0015] Entity recognition: For the metadata with inherent attribute structuring, entities are directly extracted manually; for the data of descriptive long texts, natural language processing technology is used to perform word segmentation on the descriptive documents to identify key entities; for image data, image recognition technology is adopted to extract the objects or logos in the images as entities;

[0016] Relationship extraction: For the clear business relationships existing between key entities, relationships are defined manually; for the text description data of enterprise supply and demand, the similarity relationship between themes is defined by analyzing the word distribution distance of the text themes.

[0017] The present invention is further configured as follows: The process of aligning the multimodal data in the multimodal knowledge graph is as follows:

[0018] Image encoding: Use a 12-layer ViT-B / 16 model to encode the image data, and perform feature extraction on the image input to obtain the image v cls ;

[0019] Text encoding: Use the first 6 layers of transformers of the BERT model to encode the text data, extract text features, and obtain the text w cls ;

[0020] Feature projection: Project the obtained image v cls and the text w cls , through the projection of the fully connected layer, to obtain the normalized image vector g v and the text vector g w , and calculate the similarity between the image and the text;

[0021] Image-text contrast loss calculation: Calculate the cosine similarity between the normalized image vector g v and the text vector g w , and use the temperature coefficient τ to adjust the smoothness of the score, where:

[0022]

[0023] Define y i2t(I) and y t2i(T) as the corresponding true label, and then use the image-text contrast loss objective function to train the alignment embedding. Among them, the image-text contrast loss objective function is

[0024] The further setting of the present invention is that the calculation formula of the similarity is

[0025] The further setting of the present invention is that the process of the knowledge representation learning is as follows:

[0026] Vector dimension unification: Unify the vector dimensions of the constructed multi-modal knowledge graph;

[0027] TransD embedding: Use the vector after dimension unification as the initial input triple of the TransD model, denoted as (h, r, t). Then, construct projection matrices M rh and M rt :

[0028] In the formula, M rh and M rt are the mapping matrices of entity h and t respectively, h p , t p and relationship r p are projection vectors, and I m×n represents the identity matrix;

[0029] Project the head entity h and the tail entity t into the relationship space to obtain the corresponding projection vectors: In the formula, h ⊥ and t ⊥ are the projection vectors of the head and tail entities respectively;

[0030] Calculate the vector distance after projection of the head entity and the tail entity, that is, the TransD distance, to measure the correlation degree between the head and tail entities. Among them, the TransD distance metric formula is

[0031] The further setting of the present invention is that the process of the attention embedding propagation is as follows:

[0032] Information propagation: In the information propagation stage, use the entities included in multiple triples as the bridge connecting the triples, and transmit the node information in the multi-modal knowledge graph to its neighbor nodes through information propagation. Among them, the formula for information propagation is where (h, r, t) represents the amount of information propagated from the head entity t to the tail entity h under the condition of relation r, which is the attention score of neighbor nodes and is used to control the attenuation factor of each propagation, and π(h, r, t)(W r e t ) T tanh(W r e h + e r ), where tanh is the activation function;

[0033] Knowledge-aware attention: In the construction of the knowledge graph, knowledge-aware attention is introduced to capture graph structure and context information;

[0034] Information aggregation: In the information aggregation stage, the new embedding representation of the current node h is obtained by aggregating the current node representation e h and the neighbor node representations , that is The aggregation method adopts a two-way interaction method and is aggregated by addition and dot product: where W1 and W2 are weight matrices, and ⊙ represents the dot product operation.

[0035] The present invention is further configured that: the formation of the final node representation is where || represents the vector concatenation operation, L represents the number of layers of the attention embedding propagation layer, is the final enterprise node representation, is the final product node representation, represents the output of the enterprise nodes of each layer, represents the output of the product nodes of each layer.

[0036] The present invention is further configured that: the predicted preference score value is

[0037] Compared with the prior art, the beneficial effects of the present invention are:

[0038] The enterprise intelligent recommendation algorithm based on the knowledge graph and graph attention provided by the present invention solves the problems of multi-modal data fusion and personalized matching in the recommendation system, effectively integrates various data types of enterprises, users, demand sides, supply sides, and experts, and realizes accurate recommendation. Specific Embodiments

[0039] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0040] Example:

[0041] This embodiment provides an enterprise intelligent recommendation algorithm based on a knowledge graph and graph attention, including the following steps:

[0042] Step 1: Construct a multimodal knowledge graph.

[0043] Among them, the process of constructing a multimodal knowledge graph is as follows:

[0044] Data acquisition: Extract multimodal data from different data sources;

[0045] Entity recognition: For metadata with inherent attribute structuring, directly manually extract entities; for descriptive long-text data, use natural language processing technology to perform word segmentation on the descriptive document to identify key entities; for image data, use image recognition technology to extract objects or signs in the image as entities;

[0046] Relationship extraction: For key entities with clear business relationships, manually define relationships; for text description data of enterprise supply and demand, define the similarity relationship between topics by analyzing the word distribution distance of text topics.

[0047] In this embodiment, it should be noted that extracting multimodal data such as text and images from different data sources mainly includes the following data sources:

[0048] Database: Basic information of enterprises, users, demand parties, supply parties, experts, etc. is usually stored in databases such as MySQL and MongoDB. Through SQL queries or API interfaces, each entity and its basic information are extracted.

[0049] File storage system: Some data (such as images, PDF documents) are stored in the file system. Through file paths or metadata indexes, images and related text content are associated with corresponding entities. At the same time, during entity recognition, for metadata of enterprises, products, experts, etc. with inherent attribute structuring, directly manually extract entities; for descriptive long-text data, use natural language processing technology to perform word segmentation on the descriptive document to identify key entities, such as enterprise names, product names, users, demand categories, etc. For image data, use image recognition technology to extract objects or signs in the image as entities. And for key entities such as enterprises, users, demand parties, supply parties, etc. with clear business relationships (such as product supply, demand provision, expert evaluation, etc.), relationships can be directly manually defined. For text description data of enterprise supply and demand (such as product descriptions, demand specifications), the similarity relationship between topics can be defined by analyzing the word distribution distance of text topics.

[0050] Step 2: According to the constructed multimodal knowledge graph, align the multimodal data in the multimodal knowledge graph.

[0051] Among them, the process of aligning the multimodal data in the multimodal knowledge graph is as follows:

[0052] Image encoding: Use a 12-layer ViT-B / 16 model to encode the image data, extract features from the image input, and obtain the image v cls ;

[0053] Text encoding: Use the first 6 layers of transformers of the BERT model to encode the text data, extract text features, and obtain the text w cls ;

[0054] Feature projection: Project the obtained image v cls and text w cls , through the projection of the fully connected layer, to obtain the normalized image vector g v and text vector g w , and calculate the similarity between the image and the text;

[0055] Image-text contrast loss calculation: Calculate the cosine similarity between the normalized image vector g v and text vector g w , and use the temperature coefficient τ to adjust the smoothness of the score, where:

[0056]

[0057] Define y i2t(I) and y t2i(T) as the corresponding true labels, and then use the image-text contrast loss objective function to train the aligned embeddings, where the image-text contrast loss objective function is

[0058] Furthermore, the calculation formula for similarity is

[0059] Step 3: Knowledge representation learning.

[0060] Among them, the process of knowledge representation learning is as follows:

[0061] Vector dimension unification: Unify the vector dimensions of the constructed multimodal knowledge graph;

[0062] TransD embedding: Use the vector after dimension unification as the initial input triple of the TransD model, denoted as (h, r, t), and then construct projection matrices M rh and M rt associated with the relationship r for the head entity h and the tail entity t respectively:

[0063] In the formula, M rh and M rt are the mapping matrices of entities h and t respectively, and h p , t p and relation r p are projection vectors, and I m×n represents the identity matrix;

[0064] Project the head entity h and the tail entity t into the relation space to obtain the corresponding projection vectors: In the formula, h ⊥ and t ⊥ are the projection vectors of the head and tail entities respectively;

[0065] Calculate the vector distance between the projected vectors of the head entity and the tail entity, that is, the TransD distance, to measure the association degree between the head and tail entities. Among them, the TransD distance metric formula is

[0066] In this embodiment, it should be noted that when the vector dimensions are unified, since different models are used to obtain multi-modal entity vectors in the constructed multi-modal knowledge graph. Therefore, principal component analysis (PCA) is used to reduce the dimensions of multi-modal entities with different dimensions (such as text and image vectors). For non-multi-modal entity nodes, the Xavier initialization method is used to ensure that the variances of the input and output of each layer are equal, avoiding the problems of gradient disappearance or explosion.

[0067] In addition, to optimize the learning effect of the model, a loss function is defined to compare positive and negative samples. The positive sample is the triple in the multi-modal knowledge graph, and the negative sample is the triple constructed by randomly replacing the tail node with other nodes. The loss function is as follows

[0068] Step Four: In the construction of the knowledge graph, introduce knowledge-aware attention and adopt attention embedding propagation.

[0069] Among them, the process of attention embedding propagation is as follows:

[0070] Information propagation: In the information propagation stage, the entities included in multiple triples are used as the bridges connecting the triples, and the node information in the multi-modal knowledge graph is transmitted to its neighbor nodes through information propagation. Among them, the formula for information propagation is In the formula, (h, r, t) represents the amount of information propagated from the head entity t to the tail entity h under the condition of relation r. is the attention score of the neighbor node, which is a decay factor used to control each propagation, and π(h, r, t)(W r e t ) T tanh(Wr e h +e r )), where tanh is the activation function;

[0071] Knowledge-aware attention: In the construction of the knowledge graph, knowledge-aware attention is introduced to capture graph structure and context information;

[0072] Information aggregation: In the information aggregation stage, the new embedding representation of the current node h is obtained by aggregating the current node representation e h and the neighbor node representations as follows The aggregation method adopts a two-way interaction method and aggregates by addition and dot product: In the formula, W1 and W2 are weight matrices, and ⊙ represents the dot product operation.

[0073] In this embodiment, it should be noted that the purpose of information propagation is to transfer the features of nodes in the graph structure so that the features of nodes can reflect the information of their neighbor nodes and learn the dependency relationships between nodes. In the information propagation stage, the entities included in multiple triples are used as the bridges connecting the triples, and the node information in the multi-modal knowledge graph is transferred to its neighbor nodes through information propagation, thereby enhancing the information representation of product nodes and enabling enterprise nodes to obtain the information of product nodes.

[0074] In the construction of the knowledge graph, knowledge-aware attention is introduced to capture graph structure and context information. The knowledge-aware attention coefficient measures the degree of association between nodes and is determined by calculating the similarity of node pairs. The core of the attention mechanism lies in assigning weights to different neighbor nodes, thereby determining how much information to transfer and enhancing the interpretability of the system.

[0075] In addition, π(h, r, t)(W r e t ) T tanh(W r e h +e r ), where tanh is the activation function, enabling closer entities to propagate more information, and controlling the attention score through the distance between the head entity e h and the tail entity e t in the relation r space. Then, for multiple triples connected to the head entity, the softmax function is used to normalize the coefficients of all triples connected to e h :

[0076] The purpose of information aggregation is to aggregate the features of nodes in the graph structure to generate a new node feature representation.

[0077] Step 5: Concatenate the output representations of each layer of the enterprise nodes and product nodes respectively to form the final nodes, and perform an inner product calculation on the embedded representations of the finally obtained user nodes and item nodes to obtain the predicted preference score of the user for the item.

[0078] Among them, the formation of the final node representation is In the formula, || represents the vector concatenation operation, L represents the number of layers of the attention embedding propagation layer, is the final enterprise node representation, is the final product node representation, represents the output of the enterprise nodes at each layer, represents the output of the product nodes at each layer.

[0079] The predicted preference score is

[0080] In this embodiment, it should be noted that after multiple layers of attention embedding propagation, the system obtains the representations of the enterprise nodes and product nodes at each level. Since different layers contain different levels of information, from simple features in the shallower layers to complex semantic relationships in the deeper layers, these level information jointly affect the prediction results of the model. Therefore, concatenate the output representations of each layer of the enterprise nodes and product nodes respectively to form the final node representation: Perform an inner product calculation on the embedded representations of the finally obtained user nodes and item nodes to obtain the predicted preference score of the user for the item Thereby judging the user's preference for the item. Use the Bayesian Personalized Ranking (BPR) loss function to optimize the ranking of products by the enterprise by analyzing the historical behavior data of the enterprise. If enterprise u prefers product i over j, it is expected that the model will give i a higher score. The BPR loss function is defined as follows: Among them, O = {(u, i, j)|(u, i) ∈ R + , (u, j) ∈ R -} represents the training set, R + represents the real interaction data, R represents the virtual interaction data, σ(.) represents the Sigmoid function, λ θ represents the regularization parameter of the loss function, that is, the weight of the regularization term, represents the set of all parameters in the model, and L2 represents the square of the norm

[0081] In the description of this specification, the descriptions referring to the terms "one embodiment", "example", "specific example", etc. mean that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in a suitable manner in any one or more embodiments or examples.

[0082] The preferred embodiments of the present invention disclosed above are only used to help explain the present invention. The preferred embodiments do not describe all the details in detail, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and variations can be made according to the content of this specification. These embodiments are selected and specifically described in this specification in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can understand and utilize the present invention well. The present invention is only limited by the claims and their full scope and equivalents.

Claims

1. An enterprise intelligent recommendation algorithm based on knowledge graph and graph attention, characterized in that, Including the following steps: Construct a multi-modal knowledge graph; According to the constructed multi-modal knowledge graph, align the multi-modal data in the multi-modal knowledge graph; Knowledge representation learning; In the construction of the knowledge graph, introduce knowledge-aware attention and adopt attention embedding propagation; Concatenate the output representations of each layer of the enterprise nodes and product nodes respectively to form the final nodes, and perform inner product calculation on the embedding representations of the finally obtained user nodes and item nodes to obtain the predicted preference score of the user for the item.

2. The enterprise intelligent recommendation algorithm based on knowledge graph and graph attention according to claim 1, wherein, The process of constructing the multi-modal knowledge graph is as follows: Data acquisition: Extract multi-modal data from different data sources; Entity recognition: For the metadata with inherent attribute structuring, directly extract entities manually; for the data of descriptive long texts, use natural language processing technology to perform word segmentation on the description documents to identify key entities; for image data, use image recognition technology to extract the objects or logos in the images as entities; Relationship extraction: For the clear business relationships existing between key entities, define the relationships manually; for the text description data of enterprise supply and demand, define the similarity relationships between topics by analyzing the word distribution distances of the text topics.

3. The enterprise intelligent recommendation algorithm based on knowledge graph and graph attention according to claim 1 is characterized in that: The process of aligning the multi-modal data in the multi-modal knowledge graph is as follows: Image Encoding: Use a 12-layer ViT-B / 16 model to encode the image data, extract features from the image input, and obtain image v cls ; Text encoding: The first 6 layers of transformers in the BERT model are used to encode the text data, extract text features, and obtain text w cls ; Feature projection: The obtained image v cls and text w cls , after projection through the fully connected layer, the normalized image vector g is obtained v and text vector g w , and calculate the similarity between image and text; Calculation of text-image contrastive loss: Calculate the cosine similarity between the image vector g v after image normalization and the text vector g w , and use the temperature coefficient τ to adjust the smoothness of the score, where: Define y i2t(I) and y t2i(T) as the corresponding true label, and then use the image-text contrastive loss objective function to train the alignment embedding, where the image-text contrastive loss objective function is 4. An enterprise intelligent recommendation algorithm based on a knowledge graph and graph attention according to claim 3, characterized in that, The calculation formula for the similarity is as follows 5. An enterprise intelligent recommendation algorithm based on a knowledge graph and graph attention according to claim 1, characterized in that, The process of knowledge representation learning is as follows: Vector dimension unification: Unify the vector dimensions of the constructed multi-modal knowledge graph; TransD embedding: The vectors with unified dimensions are used as the initial input triples of the TransD model, denoted as (h, r, t). Then, projection matrices M rh and M rt : Where M rh With M rt are the mapping matrices of entities h and t, respectively. p ,t p With the relationship r p is the projection vector, I m×n represents the identity matrix; Project the head entity \(h\) and the tail entity \(t\) into the relational space to obtain the corresponding projection vectors: where \(h\) ⊥ and \(t\) ⊥ are the projection vectors of the head and tail entities, respectively; Calculate the vector distance after projecting the head entity and the tail entity, that is, the TransD distance, to measure the association degree between the head and tail entities. Among them, the TransD distance metric formula is 6. The enterprise intelligent recommendation algorithm based on knowledge graph and graph attention according to claim 1, characterized in that The process of attention embedding propagation is as follows: Information dissemination: In the information dissemination stage, the entities included in multiple triples are used as bridges to connect triples, and the node information in the multimodal knowledge graph is transmitted to its neighbor nodes through information dissemination. The formula for information dissemination is where (h, r, t) represents the amount of information propagated from the head entity t to the tail entity h under the condition of the relationship r, which is the attention score of the neighbor node and is used to control the attenuation factor of each propagation, π(h, r, t)(W r e t ) T tanh(W r e h +e r ), and tanh is the activation function; Knowledge-aware attention: In the construction of the knowledge graph, introduce knowledge-aware attention to capture the graph structure and context information; Information aggregation: In the information aggregation stage, the new embedding representation of the current node h is obtained by aggregating the current node representation e h and the neighbor node representations , that is The aggregation method adopts a two-way interaction method and aggregates through addition and dot product: In the formula, W1 and W2 are weight matrices, and ⊙ represents the dot product operation.

7. An enterprise intelligent recommendation algorithm based on a knowledge graph and graph attention according to claim 1, characterized in that The final node is represented as In the formula, || represents the vector concatenation operation, L represents the number of attention embedding propagation layers, is the final enterprise node representation, is the final product node representation, Represents the output of enterprise nodes at each layer, Represents the output of the product node at each layer.

8. The enterprise intelligent recommendation algorithm based on knowledge graph and graph attention according to claim 1, characterized in that, The predicted value of the preference score is