A knowledge graph-based service recommendation method

By combining user interaction data with knowledge graphs to form a joint graph and recursively embedding and propagating it, the problem of accuracy in service recommendations among massive amounts of information is solved, enabling precise recommendations for self-developed software services for SMEs.

CN116108229BActive Publication Date: 2026-01-02TONGJI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211644346.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-20
Publication Date
2026-01-02
Estimated Expiration
2042-12-20

AI Technical Summary

Technical Problem

The accuracy of existing recommendation systems is insufficient, as it is difficult to accurately find the service information that users need from massive amounts of information.

Method used

By transforming user interaction matrix data into a bipartite graph, matching it with entities in the knowledge graph to form a joint graph, using knowledge graph embedding methods for parameterized representation, and recursively embedding and propagating through graph attention networks to calculate the weights of neighboring entities, the recommendation effect is optimized by combining the coupling concept.

Benefits of technology

It improves the accuracy of service recommendations, enabling more precise recommendations of self-developed software services for small and medium-sized enterprises that meet user preferences.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116108229B_ABST
    Figure CN116108229B_ABST
Patent Text Reader

Abstract

The application provides a service recommendation method based on a knowledge graph, comprising the following steps: S1, converting the interactive matrix data of a user into a two-part graph, and then matching the non-user entities in the two-part graph with the entities in a knowledge graph to form a joint graph in combination with the knowledge graph; S2, using a knowledge graph embedding method to parameterize the entities and relationship parameters of the joint graph into vector representations; S3, inputting the representations of the entities into a multi-layer graph attention network, using an attention mechanism to calculate the neighbor entity weight of each entity respectively, and performing weighting; S4, aggregating the representation of the node and the weighted result obtained in step 3; S5, repeating steps 3-4, so that each entity recursively aggregates its neighbor entities to obtain the final representation of the user and the entity; S6, predicting the probability of the user's service preference according to the final representation of the user and the entity. The method introduces auxiliary information of the knowledge graph, and improves the recommendation effect of the recommendation system.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of recommendation, uses knowledge graph and machine learning technology, is applied to the field of service recommendation, and specifically relates to a service recommendation method based on a knowledge graph. BACKGROUND

[0002] With the improvement of network communication technology, the popularity and performance upgrade of computers and smart phones, data and information have broken through the limitations of region and time from generation to dissemination, and the amount of information has increased exponentially, so the mobile Internet has developed rapidly. The Internet has penetrated into all aspects of people's life, and people's dependence on the Internet to obtain information has also become stronger. The Internet has greatly facilitated and enriched people's lives, but it has also brought some problems that cannot be ignored: the exponential growth of network information, and it is difficult for people to find the information they need in a short time. Therefore, information screening becomes particularly important, otherwise people will have difficulty obtaining the content they need in the vast amount of information.

[0003] A recommendation system emerges as the times require. The recommendation system models the characteristics of the project, such as category, function, etc., to understand the characteristics of the project. At the same time, according to the interaction characteristics of the user and the project, the most likely preferred content is recommended to the user from the vast amount of information, that is, different content is recommended to different users. Although it is a relatively mature technology, the recommendation system is still one of the research hotspots today. The recommendation system can effectively cope with the explosive growth, as a data screening tool, it constructs a user portrait based on the user's historical clicks and historical data, and recommends content consistent with the user's preferences, which can be goods or services, such as manufacturing services provided by some merchants, online courses, technology services, and various leisure and entertainment services.

[0004] A knowledge graph is a semantic network, which is generally presented in the structure of a graph, the nodes of the graph represent entities or concepts, and the edges of the graph represent various relations between entities / concepts or entity attributes. The knowledge graph includes rich semantic associations between entities, especially in the field of intelligent search, the knowledge graph provides potential information for the recommendation system.

[0005] Applying a knowledge graph to a recommendation system has become a current research hotspot. Commonly, the knowledge graph is used as auxiliary information, entity feature representation is obtained through knowledge graph embedding, and neighbor entity representation is aggregated in a graph neural network to enrich the features of users and recommended services. SUMMARY

[0006] The application provides a service recommendation method based on a knowledge graph.

[0007] A service recommendation method based on a knowledge graph comprises the following steps:

[0008] Step S1, converting the user interaction matrix data into a bipartite graph, and then matching the non-user entities in the bipartite graph with the entities in the knowledge graph to form a joint graph in combination with the knowledge graph;

[0009] Step S2, parameterizing the entities and relationship parameters of the joint graph into vector representations using a knowledge graph embedding method;

[0010] Step S3, inputting the representation of the entity into a multi-layer graph attention network, calculating the neighbor entity weight of each entity using an attention mechanism, and performing weighting;

[0011] Step S4, aggregating the representation of the node and the weighted result obtained in step 3;

[0012] Step S5, repeating steps 3 and 4 to make each entity recursively aggregate its neighbor entities to obtain the final representation of the user and the entity;

[0013] Step S6, predicting the probability of the user's preference for the service according to the final representation of the user and the entity. As a further improvement of the application, in step S2, the entity is mapped from the vector space to the relationship space, and the translated relationship head entity plus the relationship is equal to the tail entity, and the feature representation of the entity and the relationship is trained.

[0014] As a further improvement of the application, in step S3, when calculating the attention weight, the influence of the relationship on the weight is considered from the head entity and the tail entity in two directions.

[0015] As a further improvement of the application, in step S3, when calculating the attention weight, the higher the vector similarity, the greater the weight.

[0016] As a further improvement of the application, in step S4, a Bi-Interaction aggregator is used.

[0017] As a further improvement of the application, in step S6, the preference score is calculated using vector dot product.

[0018] In the present application, the knowledge graph is introduced into the service recommendation field, and the graph attention network recursive embedding propagation is adopted, which updates the embedding representation of the node based on the embedding representation of the neighbor node, and recursively performs the embedding. The attention mechanism is adopted to learn the weight of each neighbor in the propagation process, and based on the coupling idea, the influence of the relationship on the neighbor weight is considered from the head entity and the tail entity of the triple respectively, so that the recommendation effect of the recommendation system is improved. BRIEF DESCRIPTION OF DRAWINGS

[0019] Figure 1 A service recommendation method based on a knowledge graph is shown in the figure; DETAILED DESCRIPTION

[0020] In order to make the purpose, technical scheme and advantages of the present application clearer, the present application is further described in detail below in combination with the drawings and examples. The specific examples described herein are only used to explain the present application and do not limit the present application.

[0021] The technical problem to be solved by the present application is to provide a service recommendation technology based on a knowledge graph, which improves the accuracy of recommendation. In the present embodiment, the user refers to the user u who has interactive action with the service; the service in the present embodiment refers to the independent software service v of small and medium-sized enterprises s , such as production and manufacturing wire cutting cloud service, numerical control service, CAD electronic board cloud service for R&D design, etc.

[0022] EMBODIMENT

[0023] As shown in Figure 1 , a service recommendation method based on a knowledge graph of the present application comprises the following steps:

[0024] Step 1. The user in the present embodiment refers to the user u who has interactive action with the service; the service in the present embodiment refers to the independent software service v of small and medium-sized enterprises s , such as production and manufacturing wire cutting cloud service, numerical control service, CAD electronic board cloud service for R&D design, etc.

[0025] Step 1.1. The definition of the interaction matrix Y of the user u and the service v s is that when , it indicates that there is collection, click and other interactive behavior between the user u and the service v s ; when the value , it indicates that there is no interactive behavior between the user u and the service v s . According to the interaction matrix Y of the user u and the service v s , the interaction data is represented as a bipartite graph G1. Define G1 as {(u, r Interact , v s )|u∈U, v∈Vs}, U is the set of all users, Vs is the set of all services, rInteract User u and service v s The interaction relationship between them. When the value of the interaction matrix Y... At that time, it represents user u and service v. s There is r between them Interact Relationship; when the value of the interaction matrix Y At that time, it represents user u and service v. s There is no r between them Interact relation;

[0026] Step 1.2. Define the knowledge graph G2 as... Vs represents the collection of all services. Let R be the set of service relationships;

[0027] Step 1.3. Match the services in G1 with the services in G2 to form a new joint graph G = {(h, r, t) | h, t ∈ Vs ∪ U, r ∈ R ∪ {r Interact}}.

[0028] Step 2. Use the knowledge graph embedding method TransR to parameterize the entities in the joint graph G into vector representations; extract triples (h, r, t) as positive samples from the joint graph G, and extract negative sample triples (h, r, t′) from the joint graph G, where (h, r, t) ∈ G.

[0029] Step 2.1 Calculate the scoring function for both positive and negative samples: Among them W r ∈R k×d It is the transformation matrix of relation r, e h e r e t These are the vector forms of h, r, and t, respectively, where d is the dimension of the vector and k is the dimension of the relation space.

[0030] Step 2.2 Train the model based on the loss function, which is:

[0031] L KG =∑ (h,r,t,t′)∈T -lnσ(g(h,r,t′)-g(h,r,t)), where σ(·) is the sigmoid function.

[0032] Step 3. Define N h = {(h, r, t)|(h, r, t)∈G}, aggregate the neighboring entities of the head entity h using an attention mechanism;

[0033] Step 3.1. Calculate the weights: π(h, r, t) = λ1(W)r e t ) T tanh(W r e h +e r )+λ1(W r e t +e r ) T tanh(W r e h )+(1-2λ1)(W r e t -e r ) T W r e h Where λ1 is a hyperparameter, W r ∈R k×d It is the transformation matrix of relation r, e h e r e t These are the vector forms of h, r, and t, respectively, where d is the dimension of the vector and k is the dimension of the relation space.

[0034] Step 3.2. Then, normalize the weights π(h, r, t) using the softmax function:

[0035] Step 3.3. Calculation

[0036] Step 4. Use the Bi-Interaction aggregator to process e h And obtained in step 3.3 Perform aggregation, where e h It is the vector representation of the head entity h:

[0037]

[0038] Where W1, W2∈R d×d′ d and d′ are the vector dimensions, and ⊙ represents element-wise product.

[0039] Step 5. Repeat steps 3-4. At the end of the i-th execution of step 3-4, the vector of the head entity h is: in The formula for calculation is:

[0040] It is the vector of the tail entity t at the end of the (i-1)th execution of step 3-4.

[0041] Step 6. Predict user u's pairing with service v based on the final representation. s Preference scores;

[0042] Step 6.1. Connect each output vector of step 5 into one vector with a concatenation operation: where L represents the total number of times steps 3-4 are executed, represents the final vector of user u, represents the initial vector of user u to the Lth output vector, represents the final vector of service v s , represents the initial vector of service v s to the Lth output vector, and || represents a concatenation operation.

[0043] Step 6.2. Predict the preference score of user u for service v s :

[0044] In the present application, a knowledge graph is introduced into the field of service recommendation, and a graph attention network recursive embedding propagation is used, which updates the embedding representation of a node based on the embedding representation of neighboring nodes and recursively performs such embedding. Based on the attention aggregation of the coupling idea, it uses the attention mechanism to learn the weight of each neighbor in the propagation process, and considers the influence of the relationship on the neighbor weight from the head entity and the tail entity of the triple respectively, thereby improving the recommendation effect of the recommendation system.

Claims

1. A knowledge graph based service recommendation method, characterized in that, The method comprises the following steps: Step 1, converting the user interaction matrix data into a bipartite graph, and then matching the non-user entities in the bipartite graph with the entities in the knowledge graph to form a joint graph; Step 2, using a knowledge graph embedding method to parameterize the entities and relationships in the joint graph into vector representations; Step 3, inputting the representation of the entity into a multi-layer graph attention network, using an attention mechanism to calculate the neighbor entity weight of each entity, and performing weighting; Step 4, aggregating the representation of the node and the weighted result obtained in step 3; Step 5, repeating steps 3 and 4 to recursively aggregate the neighbor entities of each entity to obtain the final representation of the user and the entity; Step 6, predicting the probability of the user's service preference according to the final representation of the user and the entity. Step 3. Define N h = {(h, r, t) | (h, r, t) G}, aggregate neighbor entities of head entity h with attention mechanism; Step 3.

1. Compute weights: π(h, r, t) = λ1(W r e t ) T tanh(W r e h +e r )+λ1(W r e t +e r ) T tanh(W r e h )+(1-2λ1)(W r e t -e r ) T W r e h ; where λ1is a hyperparameter, W r ∈R k×d is the transformation matrix of relation r, e h , e r , e t are the vector forms of head entity h, relation r, tail entity t respectively, d is the dimension of vector, k is the dimension of relation space; Step 3.

2. The weights π(h, r, t) are then normalized by a softmax function: Step 3.

3. Calculation Step 4. Use Bi-Interaction aggregator on e h and e from Step 3.3 Nh perform aggregation, where e h is the vector representation of head entity h: where W1, W2∈R d×d′ , d and d' are vector dimensions, and represents element multiplication. Step 5. Steps 3-4 are repeatedly performed; at the end of the i-th performance of steps 3-4, the vector of head entities h is: wherein the calculation formula of is: is the vector of tail entities t at the end of the (i-1)th execution of step 3-4.

2. The knowledge graph-based service recommendation method according to claim 1, wherein, In step 2, the entity is mapped from the vector space to the relationship space, and the translated relationship head entity plus the relationship is equal to the tail entity, and the feature representation of the entity and the relationship is trained.

3. The knowledge graph-based service recommendation method according to claim 1, wherein, In step 3, when calculating the attention weight, the influence of the relationship on the weight is considered from the head entity and the tail entity according to the coupling idea; when calculating the attention weight, the vector similarity is considered, and the higher the similarity, the greater the weight. 4.The knowledge graph based service recommendation method of claim 1, wherein, In step 6, the preference score is calculated by vector dot product.

5. The knowledge graph-based service recommendation method according to claim 1, wherein, Step 1, the user is the user u who has an interaction action with the service; the service is the self-determination software service v of the small and medium-sized enterprise s ; Step 1.1 User u interacts with service v s The definition of the interaction matrix Y is that when Y(u, v) = 1, it means that there is a favorite, click, etc. interaction between user u and service v s ​ When value At that time, it represents user u and service v. s There is no interaction between them; based on user u and service v s The interaction matrix Y represents the interaction data as a bipartite graph G1; G1 is defined as {(u,r Interact ,v s Let r be the set of all users, v be the set of all services, and r be the set of all services. Interact User u and service v s The interaction relationship between them; when the value of the interaction matrix Y At that time, it represents user u and service v. s There is r between them Interact Relationship; when the value of the interaction matrix Y At that time, it represents user u and service v. s There is no r between them Interact relation; Step 1.2 defines the knowledge graph G2 as Vs is the set of all services, is the relationship between services, and R is the set of relationships between services. Step 1.3 Match the services in G1 with the services in G2, forming a new joint graph G = {(h, r, t) | h, t e Vs U U, r e R U {r Interact}}.

6. The knowledge graph-based service recommendation method according to claim 1, wherein, Step 2. Parameterize the entities in the joint graph G into vector representations using the knowledge graph embedding method TransR; extract triples (h, r, t) from the joint graph G as positive samples, and extract negative sample triples (h, r, t') from the joint graph G, where (h, r, t) G, Step 2.1 Calculate the score function for positive and negative samples respectively: where W r ∈R k×d is the transformation matrix of the relation r, e h , e r , e t are the vector forms of h, r, t respectively, d is the dimension of the vector, and k is the dimension of the relation space; Step 2.2, model training according to a loss function, the loss function is: L KG =∑ (h,r,t,t′)∈T -lnσ(g(h,r,t')-g(h,r,t)), where σ(·) is a sigmoid function.

7. The knowledge graph-based service recommendation method according to claim 1, wherein, Step 6. Compute the final representation of the predicted preference score of user u for service v s ; Step 6.

1. Connect each output vector of step 5 into one vector with a concatenation operation: where L denotes the total number of times steps 3-4 are executed, denotes the final vector for user u, denotes the initial vector for user u to the Lth output vector, denotes the final vector for service v s , denotes the initial vector for service v s to the Lth output vector, and || denotes a concatenation operation. Step 6.

2. Predicting a preference score of a user u for a service v: s ​

Citation Information

Patent Citations

  • Personalized recommendation method based on collaborative knowledge graph

    CN112149004A

  • Knowledge graph recommendation method based on propagation

    CN114637863A