A Multi-User Recommendation System Based on Knowledge Graph Path Reasoning and Attention Mechanism

By introducing knowledge graph path reasoning and attention mechanisms into the service recommendation system, the problem of service recommendation in the prior art being susceptible to data sparsity and cold start is solved, and more efficient service recommendation and user needs matching are achieved.

CN119782630BActive Publication Date: 2025-06-27厦门工学院
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510287598.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-12
Publication Date
2025-06-27
Estimated Expiration
2045-03-12

AI Technical Summary

Technical Problem

Existing service recommendation methods are susceptible to data sparsity, have cold start problems, and insufficient user requirements lead to low accuracy in service discovery.

Method used

A multi-user recommendation system based on knowledge graph path reasoning and attention mechanism is adopted to build and update the knowledge graph, and use path reasoning and attention mechanisms to recommend users.

Benefits of technology

It improves the accuracy of service recommendations, solves the cold start problem, and enhances the interaction and correlation between users to ensure that the recommended content that is most relevant and most in line with user needs is output.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119782630B_ABST
    Figure CN119782630B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of data processing, and specifically discloses a multi-user recommendation system based on knowledge graph path reasoning and attention mechanism, including: a knowledge graph construction and update module, a path reasoning module, an attention mechanism module, a multi-user collaborative filtering module, and a recommendation sorting and output module; the knowledge graph construction and update module is used to construct and maintain a knowledge graph, integrate user behavior information and external knowledge sources, and form a structured knowledge base; by integrating user behavior information and external knowledge sources, the present invention constructs and maintains a dynamically updated knowledge graph, precisely mines the potential interests and needs of users through path reasoning based on entity nodes and relationships, introduces a self-attention mechanism and a multi-head attention mechanism, assigns different weights to different recommendation items, optimizes and sorts the recommendation results according to the weights and similarity analysis of the recommendation items, and ensures the output of the most relevant and user-demand-compliant recommendation content.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of data processing, and particularly relates to a multi-user recommendation system based on knowledge graph path reasoning and attention mechanism. Background Art

[0002] With the development of the knowledge economy, the intelligence of service platforms will be more reflected in the platform's ability to master, apply, and innovate knowledge. A service platform is a new type of application program that integrates multiple services (such as open APIs). For the development of service platforms, the quality of the selected services is extremely important. However, with the rapid development of Internet technology, the number of services has increased sharply. It has become unrealistic to manually select suitable services from a large number of services.

[0003] Currently, the methods for obtaining services on service platforms can generally be divided into two types - service recommendation and service discovery. Service recommendation is a method of actively recommending services to users only based on historical usage records and service information when the user has no clear needs; service discovery is a method of passively discovering services according to the user's needs when there are clear needs. In recent years, many methods for service recommendation and service discovery have been proposed to obtain high-quality services, and good results have been achieved. However, the existing research still has the following deficiencies: (1) Most of the existing service recommendation methods are based on collaborative filtering algorithms and are extremely vulnerable to the influence of data sparsity; (2) When there is a lack of service historical usage records, many existing service recommendation methods have the cold start problem. In addition, the needs proposed by users are often not precise enough, resulting in low accuracy of service discovery.

[0004] Therefore, it is necessary to propose a multi-user recommendation system based on knowledge graph path reasoning and attention mechanism to solve the service recommendation problem in the existing technology without usage records or without clear needs.

[0005] The above information disclosed in this background art is only used to increase the understanding of the background art of the present invention. Therefore, it may include prior art that is not known to those of ordinary skill in the art. Summary of the Invention

[0006] The purpose of the present invention is to provide a multi-user recommendation system based on knowledge graph path reasoning and attention mechanism to solve the problems raised in the above background art.

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

[0008] A multi - user recommendation system based on knowledge graph path reasoning and attention mechanism, including: a knowledge graph construction and update module, a path reasoning module, an attention mechanism module, a multi - user collaborative filtering module, a recommendation ranking and output module, a user behavior information collection module, a feedback learning module, and a system monitoring module;

[0009] The knowledge graph construction and update module is used to construct and maintain a knowledge graph, integrate user behavior information and external knowledge sources, and form a structured knowledge base;

[0010] The path reasoning module is used to infer users' potential interests and needs based on entity nodes and relationships in the knowledge graph;

[0011] The attention mechanism module is used to assign different weights to different recommendation items according to the user behavior information and path reasoning results;

[0012] The multi - user collaborative filtering module is used to mine the similarity between different users and generate interactions and associations between users based on collaborative filtering;

[0013] The recommendation ranking and output module is used to rank the recommendation items according to the weights and similarity analysis of the recommendation items, and finally output the most relevant and interesting recommendation items for the user.

[0014] The user behavior information collection module is used to collect users' behavior information and store it in a database;

[0015] The feedback learning module is used to collect users' feedback information in real - time and continuously optimize the recommendation method according to the feedback information;

[0016] The system monitoring module is used to monitor the running status of the recommendation system, record system logs and user interaction operations.

[0017] Preferably, the knowledge graph construction and update module is also used to construct the knowledge graph by using the user behavior information and platform service information as the entity nodes, introduce service feature nodes to describe the platform services corresponding to the user behavior information; extract the entity nodes and relationships from the external knowledge sources through natural language processing and data mining technologies, and regularly update the knowledge graph in combination with new user behavior information; calculate the text similarity between the platform services based on the Word2Vec model, set the platform services with higher text similarity as functional similarity relationships, and add them to the knowledge graph as a semantic overlay layer.

[0018] Preferably, the path reasoning module is further configured to analyze the words and sentences input by the user using natural language processing, extract the entity nodes and question types in the words and sentences; query the eligible candidate entity nodes from the knowledge graph according to the above entity nodes and question types; use a representation learning algorithm to map the candidate entity nodes into a low-dimensional vector space to obtain entity vectors; calculate the cosine similarity between the entity vectors, and select the entity vectors with higher similarity to generate a candidate recommendation set.

[0019] Preferably, the attention mechanism module is further configured to dynamically assign different weights to different recommendation items according to the user behavior information and the path reasoning result through a self-attention mechanism; introduce a multi-head attention mechanism based on the semantic superposition layer, calculate the attention scores of multiple platform services in parallel, and select the platform service with the highest attention score except the current platform service as a substitute item.

[0020] Preferably, the multi-user collaborative filtering module is further configured to respectively construct a call matrix based on the user behavior information and a call matrix based on the platform service information to obtain a user call matrix and a platform call matrix; based on the above user call matrix and platform call matrix, calculate the user matrix similarity and the platform matrix similarity using the Jaccard similarity coefficient; use a collaborative filtering-based method to generate a user recommendation set and a platform recommendation set corresponding to the candidate recommendation set; save the above two sets in the storage location of the candidate recommendation set and continuously update the content of the two sets.

[0021] Preferably, the recommendation sorting and output module is further configured to perform similarity normalization processing on the above two sets respectively, and merge them into a recommendation list based on the user behavior information and a recommendation list based on the platform service information; according to the recommendation preferences and filtering conditions set by the user, sort the above two merged recommendation lists to form a final recommendation list, and display the finally formed recommendation list.

[0022] Preferably, the user behavior information collection module is further configured to capture the user's behavior information in real time through Flink stream processing and perform real-time processing; clean the user behavior information, remove noise, and aggregate the user behavior information by time or frequency; store the user behavior information in a NoSQL database and encrypt the user's sensitive information.

[0023] Preferably, the feedback learning module is further configured to verify the effect of the recommendation system through A / B testing and offline experiments, and collect the real feedback of users; use the user feedback data for algorithm fine-tuning and perform adaptive optimization on the system based on online learning.

[0024] Preferably, the system monitoring module is further configured to monitor the performance of the system, record the input, output, and system status information of each recommendation; provide a data analysis interface to assist system administrators in troubleshooting and performance optimization.

[0025] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0026] By integrating user behavior information and external knowledge sources, the present invention constructs and maintains a dynamically updated knowledge graph, precisely mines users' potential interests and needs through path reasoning based on entity nodes and relationships, introduces self-attention mechanism and multi-head attention mechanism, assigns different weights to different recommendation items, thereby improving the accuracy of recommendations. By mining the similarity between different users, the interaction and association between users are further strengthened, and the recommendation results are optimized and sorted according to the weights and similarity analysis of the recommendation items to ensure that the most relevant and user-demand-compliant recommendation content is output.

[0027] The above summary is only for the purpose of the specification and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments, and features described above, further aspects, embodiments, and features of the present invention will be readily apparent by reference to the drawings and the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 FIG. is a framework diagram of a multi-user recommendation system based on knowledge graph path reasoning and attention mechanism of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0029] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all 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.

[0030] Embodiment 1:

[0031] Please refer to Figure 1 As shown, a multi-user recommendation system based on knowledge graph path reasoning and attention mechanism includes: a knowledge graph construction and update module, a path reasoning module, an attention mechanism module, a multi-user collaborative filtering module, a recommendation ranking and output module, a user behavior information collection module, a feedback learning module, and a system monitoring module;

[0032] The knowledge graph construction and update module is used to construct and maintain a knowledge graph, integrate user behavior information and external knowledge sources to form a structured knowledge base;

[0033] The path inference module is used to infer the potential interests and needs of users based on the entity nodes and relationships in the knowledge graph;

[0034] The attention mechanism module is used to assign different weights to different recommended items according to the user behavior information and the path inference results;

[0035] The multi-user collaborative filtering module is used to mine the similarities between different users and generate interactions and associations between users based on collaborative filtering;

[0036] The recommendation sorting and output module is used to sort the recommended items according to the weights and similarity analysis of the recommended items, and finally output the most relevant and interesting recommended items for the user.

[0037] The user behavior information collection module is used to collect the user behavior information and store it in the database;

[0038] The feedback learning module is used to collect the user feedback information in real time and continuously optimize the recommendation method according to the feedback information;

[0039] The system monitoring module is used to monitor the running status of the recommendation system and record the system logs and user interaction operations.

[0040] The knowledge graph construction and update module is also used to construct a knowledge graph using the user behavior information and platform service information as entity nodes, introduce service feature nodes to describe the platform services corresponding to the user behavior information; extract entity nodes and relationships from external knowledge sources through natural language processing and data mining techniques, and regularly update the knowledge graph in combination with new user behavior information; calculate the text similarity between platform services based on the Word2Vec model, set the platform services with higher text similarity as functional similarity relationships, and add them to the knowledge graph as a semantic overlay layer.

[0041] The path inference module is also used to analyze the words and sentences input by the user using natural language processing, extract the entity nodes and question types in the words and sentences; query the candidate entity nodes that meet the conditions from the knowledge graph according to the above entity nodes and question types; use the representation learning algorithm to map the candidate entity nodes to a low-dimensional vector space to obtain entity vectors; calculate the cosine similarity between the entity vectors, and select the entity vectors with higher similarity to generate a candidate recommendation set.

[0042] Helping the user quickly complete the word and sentence input process based on the platform service information, and making the input situation of the words and sentences tend to the word and sentence combination structure supported by the platform, which also provides certain information support for subsequent operations such as the selection and merging of the recommendation set, and can adjust and limit the recommendation content analysis and processing operations in combination with the user's set recommendation preferences and filtering conditions.

[0043] The formula for calculating the cosine similarity between two entity vectors is as follows:

[0044]

[0045] where d is the dimension of the entity vector, and represent two entity vectors respectively.

[0046] The representation learning algorithm is used to map candidate entity nodes into a low-dimensional vector space. The purpose of representation learning is to find the representation of entity features and reflect the characteristics in the knowledge graph structure in a low-dimensional form. At the same time, due to the reduction of dimensions, the computational complexity can be greatly reduced. The representation learning of entity nodes mainly includes two parts, namely, the sampling of node sequences and the representation learning of feature vectors.

[0047] ① Sampling of node sequences

[0048] Before learning the representation vector, it is necessary to sample the node sequences of the knowledge graph. The purpose is to make the node representation vectors within the same functional type similar, or the node representations with similar structural features similar. The breadth-first random walk method is used for sampling. Let the source node be , and the probability calculation formula for jumping from the source node to the next node is as follows:

[0049]

[0050] where represents the next-hop node of node , represents the normalized transition probability, represents the normalization parameter, As the random walk sampling, its calculation formula is as follows:

[0051]

[0052] where represents the distance between two adjacent nodes based on the source node . When the distance is 0, it means that the node jumps back to the previous-hop node. The parameter p represents the jump-back parameter, indicating the probability that the node jumps back to the original direction. When the distance is 1, it means that there is a connection between the previous-hop node and the next-hop node on the knowledge graph, and the jump at this time is still around the previous-hop node. When the distance is 2, it means that the next-hop node is gradually far away from the previous-hop node. The parameter q represents the long-jump parameter, indicating the probability that the next-hop node is far away from the previous-hop node.

[0053] ② Node vector representation

[0054] Through the knowledge graph node sampling sequence in the previous step, a set of node sequences can be obtained , learn from the obtained node sequences, and the goal of optimizing the result is to maximize the co-occurrence probability of node v and its neighbor nodes. Its formula is as follows:

[0055]

[0056] In the formula, f is a mapping function, represents mapping the representation vector of node v into another d-dimensional vector space, represents the set of neighbor nodes of node v.

[0057] The attention mechanism module is also used to dynamically assign different weights to different recommended items according to user behavior information and path inference results through the self-attention mechanism; introduce the multi-head attention mechanism based on the semantic superposition layer, calculate the attention scores of multiple platform services in parallel, and select the platform service with the highest attention score except the current platform service as the substitute item.

[0058] The multi-user collaborative filtering module is also used to construct a call matrix based on user behavior information and a call matrix based on platform service information respectively, to obtain a user call matrix and a platform call matrix; based on the above user call matrix and platform call matrix, calculate the user matrix similarity and platform matrix similarity using the Jaccard similarity coefficient; generate a user recommendation set and a platform recommendation set corresponding to the candidate recommendation set in a collaborative filtering manner; save the above two sets in the storage location of the candidate recommendation set and continuously update the content of the two sets.

[0059] The recommendation sorting and output module is also used to perform similarity normalization processing on the above two sets respectively, and merge them into a recommendation list based on user behavior information and a recommendation list based on platform service information; according to the recommended preferences and filtering conditions set by the user, merge and sort the above two recommendation lists to form a final recommendation list, and display the finally formed recommendation list.

[0060] Embodiment 2:

[0061] Please refer to Figure 1 As shown, this embodiment is basically the same as the above embodiment. The difference is that the user behavior information collection module is also used to capture and process the user's behavior information in real time through Flink stream processing; clean the user behavior information, remove noise, and aggregate the user behavior information by time or frequency; store the user behavior information in a NoSQL database and encrypt the user's sensitive information.

[0062] The feedback learning module is also used to verify the effectiveness of the recommendation system through A / B testing and offline experiments, and collect real feedback from users; use the user feedback data for algorithm fine-tuning, and perform adaptive optimization on the system based on online learning.

[0063] The system monitoring module is also used to monitor the performance of the system, record the input, output, and system status information of each recommendation in the log; provide a data analysis interface to help system administrators troubleshoot faults and optimize performance.

[0064] The system supports multiple push channels to send recommendation results to users; uses caching technology to store the recommendation list, allowing users to quickly retrieve the previously generated recommendation results when accessing repeatedly, reducing the consumption of computing resources and response time, and at the same time collecting user feedback on the recommendation results to optimize the screening of recommended content.

[0065] When generating the final recommendation list, there may be a situation where the scores are the same. According to the actual data analysis, give priority to selecting the services in the recommendation list based on platform services. If the scores are the same and both belong to the recommendation list based on platform services, then select the service with more usage times.

[0066] The system uses information resource integration to concentrate scattered resources and turn disordered resources into ordered resources, that is, organize discrete data into data that can serve users, making it convenient for users to search for information and for information to serve users. With the help of data visualization technology to present the results of behavior analysis, users can more intuitively see the overall laws and development trends revealed by big data.

[0067] As can be seen from the above, use user behavior information and platform service information as entities to construct a knowledge graph, analyze the deep associations of services through the knowledge graph, use a representation learning algorithm to map the entities in the knowledge graph to a low-dimensional vector space, and calculate the similarity between entity vectors to reduce the adverse effects brought by data dilution. Dynamically assign different weights to different recommendation items through a self-attention mechanism, introduce a multi-head attention mechanism, calculate the attention scores of multiple platform services in parallel, obtain the replacement recommendation items, perform similarity normalization processing and sorting to obtain the final recommendation set, provide specific recommendations for users, and enable users without service usage records to also obtain service recommendations to solve the cold start problem.

[0068] Embodiment 3:

[0069] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements each process of the above-mentioned recommendation system embodiment and can achieve the same technical effect. To avoid repetition, it will not be elaborated here. Among them, the computer-readable medium includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data.

[0070] In the description of this specification, the description with reference to terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples" means 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 can be combined in a suitable manner in any one or more embodiments or examples. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0071] The present invention is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram can be implemented by computer program instructions, and the combination of processes and / or blocks in the flowchart and / or block diagram can also be implemented. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a program, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a method for implementing the specified functions in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0072] In the attached drawings of the disclosed embodiments of the present invention, only the structures related to the disclosed embodiments of the present invention are involved. Other structures can refer to the general design. Without conflict, the same embodiment and different embodiments of the present invention can be combined with each other.

[0073] Although the embodiments of the present invention have been shown and described, for those of ordinary skill in the art, it can be understood that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present invention. The scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A multi-user recommendation system based on knowledge graph path reasoning and attention mechanism, characterized in that: include: Knowledge graph construction and update module, path reasoning module, attention mechanism module, multi-user collaborative filtering module, recommendation sorting and output module; The knowledge graph construction and update module is used to construct and maintain the knowledge graph, integrate user behavior information and external knowledge sources, and form a structured knowledge base; The user behavior information and platform service information are used as entity nodes to construct the knowledge graph, and service feature nodes are introduced to describe the platform services corresponding to the user behavior information; Extract the entity nodes and relationships from the external knowledge source through natural language processing and data mining technology, and regularly update the knowledge graph in combination with new user behavior information; Calculate the text similarity between the platform services based on the Word2Vec model, set the platform services with higher text similarity as functional similarity relationships, and add them to the knowledge graph as a semantic overlay layer; The path reasoning module is used to infer the user's potential interests and needs based on the entity nodes and relationships in the knowledge graph; The attention mechanism module is used to dynamically assign different weights to different recommendation items through a self-attention mechanism according to the user behavior information and the path reasoning result; Based on the semantic overlay layer, a multi-head attention mechanism is introduced to calculate the attention scores of multiple platform services in parallel, and the platform service with the highest attention score other than the current platform service is selected as a substitute; The multi-user collaborative filtering module is used to mine similarities between different users and generate interactions and associations between users based on collaborative filtering; Constructing a call matrix based on the user behavior information and a call matrix based on the platform service information respectively, to obtain a user call matrix and a platform call matrix; Based on the above user call matrix and platform call matrix, the Jaccard similarity coefficient is used to calculate the user matrix similarity and platform matrix similarity; Generate a user recommendation set and a platform recommendation set corresponding to the candidate recommendation set by using a collaborative filtering-based approach; The two sets are stored in the storage location of the candidate recommendation set, and the contents of the two sets are continuously updated; The recommendation ranking and output module is used to sort the recommendation items according to the weights and similarity analysis of the recommendation items, and finally output the recommendation items that are most relevant and of greatest interest to the user.

2. According to claim 1, a multi-user recommendation system based on knowledge graph path reasoning and attention mechanism is characterized in that: The path reasoning module is also used for: Analyze the words and sentences input by the user by using natural language processing to extract the entity nodes and question types in the words and sentences; According to the above entity nodes and query types, querying the candidate entity nodes that meet the conditions from the knowledge graph; Using a representation learning algorithm to map the candidate entity node to a low-dimensional vector space to obtain an entity vector; The cosine similarity between the entity vectors is calculated, and the entity vectors with higher similarity are selected to generate the candidate recommendation set.

3. According to claim 2, a multi-user recommendation system based on knowledge graph path reasoning and attention mechanism is characterized in that: The recommendation sorting and output module is also used for: The two sets of collections are respectively normalized for similarity, and merged into a recommendation list based on the user behavior information and a recommendation list based on the platform service information; According to the recommendation preferences and filtering conditions set by the user, the above two groups of recommendation lists are merged and sorted to form a final recommendation list, and the final recommendation list is displayed.

4. According to claim 3, a multi-user recommendation system based on knowledge graph path reasoning and attention mechanism is characterized by: The system also includes a user behavior information collection module, a feedback learning module, and a system monitoring module; The user behavior information collection module is used to collect user behavior information and store it in a database; The feedback learning module is used to collect user feedback information in real time and continuously optimize the recommendation method based on the feedback information; The system monitoring module is used to monitor the running status of the recommendation system and record system logs and user interaction operations.

5. According to claim 4, a multi-user recommendation system based on knowledge graph path reasoning and attention mechanism is characterized in that: The user behavior information collection module is also used for: Capture user behavior information in real time and process it in real time through Flink stream processing; Clean user behavior information, remove noise, and aggregate user behavior information by time or frequency; Store user behavior information in a NoSQL database and encrypt user sensitive information.

6. A multi-user recommendation system based on knowledge graph path reasoning and attention mechanism according to claim 5, characterized in that: The feedback learning module is also used for: Verify the effectiveness of the recommendation system through A / B testing and offline experiments, and collect real feedback from users; Use user feedback data to fine-tune the algorithm and adaptively optimize the system based on online learning.

7. A multi-user recommendation system based on knowledge graph path reasoning and attention mechanism according to claim 6, characterized in that: The system monitoring module is also used for: Monitor system performance and log each recommended input, output, and system status information; Provides a data analysis interface to help system administrators troubleshoot and optimize performance.

Citation Information

Patent Citations

  • Multi-user recommendation system based on knowledge graph path reasoning

    CN114820139A

  • Knowledge graph attention network recommendation method based on graph collaborative filtering

    CN116340648A