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 inaccurate service recommendation caused by data sparsity and cold start problems in the existing technology is solved, and more efficient user demand mining and recommendation accuracy is achieved.
Patent Information
- Application Number
- CN202510287598.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-12
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2045-03-12
AI Technical Summary
Existing service recommendation methods are susceptible to data sparsity, have cold start problems, and insufficient user requirements lead to low accuracy in service discovery.
A multi-user recommendation system based on knowledge graph path reasoning and attention mechanism is adopted to integrate user behavior information and external knowledge sources to build a dynamically updated knowledge graph, and path reasoning is performed through entity nodes and relationships, combining self-attention mechanisms and multi-head attention mechanisms to allocate weights to the recommendation items to improve the accuracy of recommendations.
By accurately exploring potential users' interests and needs, dynamic weight allocation, and improving the accuracy of recommendations, data sparsity and cold start problems are solved, ensuring that the most relevant recommended content is output.
Smart Images

Figure CN119782630A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of data processing technology, and specifically relates to a multi-user recommendation system based on knowledge graph path reasoning and attention mechanism. Background Art
[0002] With the development of knowledge economy, the intelligence of service platform will be more reflected in the platform's ability to master, apply and innovate knowledge. Service platform is a new type of application that integrates multiple services (such as open API). For the development of service platform, the quality of selected services is extremely important. However, with the rapid development of Internet technology, the number of services has increased dramatically. It has become unrealistic to manually select suitable services from a huge number of services.
[0003] At present, the methods of obtaining services on service platforms can be roughly divided into two types: service recommendation and service discovery. Service recommendation is a method of actively recommending services to users based on historical usage records and service information when the user does not have a clear demand; service discovery is a method of passively discovering services based on the user's needs when there is a clear demand. In recent years, many studies have proposed many service recommendation and service discovery methods to obtain high-quality services, and have achieved good results. However, existing research still has the following shortcomings: (1) Most of the existing service recommendation methods are based on collaborative filtering algorithms, which are easily affected by data sparsity; (2) When there is a lack of historical service usage records, many existing service recommendation methods have the problem of cold start. 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 problem of service recommendation without usage records or clear needs in the existing technology.
[0005] The above information disclosed in this background technology is only used to increase the understanding of the background technology of the present invention and therefore, it may include information that does not constitute the prior art known to a person 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 technology.
[0007] To achieve the above object, the present invention provides the following technical solutions: A multi-user recommendation system based on knowledge graph path reasoning and attention mechanism, including: knowledge graph construction and update module, path reasoning module, attention mechanism module, multi-user collaborative filtering module, recommendation sorting and output module, user behavior information collection module, feedback learning module, system monitoring 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 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 assign different weights to different recommendation items according to the user behavior information and path reasoning results; 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; 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.
[0008] 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.
[0009] Preferably, the knowledge graph construction and update module is also used to use the user behavior information and platform service information as the entity nodes to construct the knowledge graph, 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 source through natural language processing and data mining techniques, and regularly update the knowledge graph in combination with the 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.
[0010] Preferably, the path reasoning module is also used to use natural language processing to analyze the words and sentences input by the user, and extract the entity nodes and question types in the words and sentences; based on the above-mentioned entity nodes and question types, query qualified candidate entity nodes from the knowledge graph; use a 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.
[0011] Preferably, the attention mechanism module is also used to dynamically assign different weights to different recommendation items according to the user behavior information and path reasoning results through a self-attention mechanism; a multi-head attention mechanism is introduced based on the semantic overlay layer, the attention scores of multiple platform services are calculated in parallel, and the platform service with the highest attention score other than the current platform service is selected as a substitute item.
[0012] Preferably, the multi-user collaborative filtering module is also used to construct call matrices based on the user behavior information and 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 the platform matrix similarity; a user recommendation set and a platform recommendation set corresponding to the candidate recommendation set are generated using a collaborative filtering-based method; the above two sets are saved in the storage location of the candidate recommendation set, and the contents of the two sets are continuously updated.
[0013] Preferably, the recommendation sorting and output module is also used to normalize the similarities of 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, the above two sets of recommendation lists are merged and sorted to form a final recommendation list, and the final recommendation list is displayed.
[0014] Preferably, the user behavior information collection module is also used to capture user behavior information in real time through Flink stream processing and perform real-time 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.
[0015] Preferably, 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 user feedback data to fine-tune the algorithm, and adaptively optimize the system based on online learning.
[0016] Preferably, the system monitoring module is also used to monitor the performance of the system, log each recommended input, output, and system status information; and provide a data analysis interface to help system administrators perform troubleshooting and performance optimization.
[0017] Compared with the prior art, the present invention has the following beneficial effects: The present invention integrates user behavior information with external knowledge sources to build and maintain a dynamically updated knowledge graph, accurately mines users' potential interests and needs based on path reasoning between 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, and further strengthens the interaction and association between users by mining the similarities between different users. The recommendation results are optimized and sorted according to the weight and similarity analysis of the recommendation items, ensuring the output of the most relevant recommendation content that best meets user needs.
[0018] The above summary is for illustrative purposes only 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 accompanying drawings and the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 This is a framework diagram of the multi-user recommendation system based on knowledge graph path reasoning and attention mechanism of the present invention. DETAILED DESCRIPTION
[0020] 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.
[0021] Embodiment 1:
[0022] See also Figure 1 As shown, a multi-user recommendation system based on knowledge graph path reasoning and attention mechanism includes: knowledge graph construction and update module, path reasoning module, attention mechanism module, multi-user collaborative filtering module, recommendation sorting and output module, user behavior information collection module, feedback learning module, and system monitoring module; The knowledge graph construction and update module is used to build and maintain the knowledge graph, integrate user behavior information and external knowledge sources, and form a structured knowledge base; 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 assign different weights to different recommendation items based on user behavior information and path reasoning results; 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; The recommendation sorting and output module is used to sort the recommended items according to their weights and similarity analysis, and finally output the most relevant and interesting recommended items for users.
[0023] The user behavior information collection module is used to collect user behavior information and store it in the 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.
[0024] The knowledge graph construction and update module is also used to construct the knowledge graph using user behavior information and platform service information as entity nodes, and 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 platform services with higher text similarity as functional similarity relationships, and add them to the knowledge graph as a semantic overlay layer.
[0025] The path reasoning module is also used to use natural language processing to analyze the words and sentences input by the user, extract the entity nodes and question types in the words and sentences; based on the above entity nodes and question types, query qualified candidate entity nodes from the knowledge graph; 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 entity vectors, and select entity vectors with higher similarity to generate a candidate recommendation set.
[0026] Based on the platform service information, it helps users quickly complete the word and sentence input process and makes the word and sentence input tend to the word and sentence combination structure supported by the platform. This also provides certain information support for subsequent operations such as selection and merging of recommendation sets, and can adjust and restrict the recommended content analysis and processing operations in combination with users setting their own recommendation preferences and filtering conditions.
[0027] The formula for calculating the cosine similarity between two entity vectors is as follows:
[0028] Where d is the dimension of the entity vector, and Represent two entity vectors respectively.
[0029] The candidate entity nodes are mapped to a low-dimensional vector space using a representation learning algorithm, where the purpose of representation learning is to find the representation of entity features and reflect the characteristics of the knowledge graph structure in a low-dimensional form. At the same time, due to the reduction of dimensionality, the complexity of calculation 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.
[0030] ① Sampling of node sequences Before learning the representation vector, it is necessary to sample the node sequence of the knowledge graph. The purpose is to make the representation vectors of nodes in the same functional type similar, or to make the representations of nodes with similar structural features similar. The sampling is performed using a breadth-first random walk method. Suppose the source node is , by the source node The probability of jumping to the next node is calculated as follows:
[0031] In the formula, Representation Node The next hop node, Expressed as the normalized transition probability, represents the normalization parameter, As a random walk sampling, its calculation formula is as follows:
[0032] In the formula, Represents source node The distance between two neighboring nodes. When the distance is 0, it means that the node jumps back to the node of the previous jump. The parameter p represents the jump back parameter, which indicates the probability of the node jumping back to the original direction. When the distance is 1, it indicates that the previous jump node and the next jump node are connected in the knowledge graph. At this time, the jump is still around the previous jump node. When the distance is 2, it means that the next jump is gradually moving away from the previous jump node. The parameter q represents the long jump parameter, which indicates the probability of the next jump node moving away from the previous jump node.
[0033] ②Node vector representation By sampling the knowledge graph nodes in the previous step, we can obtain a sequence set of nodes. , the obtained node sequence is learned, and the goal of the optimization result is to maximize the co-occurrence probability of node v and its neighboring nodes. The formula is as follows:
[0034] Where f is the mapping function, It means mapping the representation vector of node v into another d-dimensional vector space. Represents the set of neighboring nodes of node v.
[0035] The attention mechanism module is also used to dynamically assign different weights to different recommendation items according to user behavior information and path reasoning results through the self-attention mechanism; a multi-head attention mechanism is introduced based on the semantic overlay layer to 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.
[0036] The multi-user collaborative filtering module is also used to construct call matrices based on user behavior information and 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 the platform matrix similarity; a user recommendation set and a platform recommendation set corresponding to the candidate recommendation set are generated using a collaborative filtering-based method; the above two sets are saved in the storage location of the candidate recommendation set, and the contents of the two sets are continuously updated.
[0037] The recommendation sorting and output module is also used to normalize the similarities of 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 recommendation preferences and filtering conditions set by the user, the above two sets of recommendation lists are merged and sorted to form a final recommendation list, and the final recommendation list is displayed.
[0038] Embodiment 2: See also Figure 1 As shown, this embodiment is basically the same as the above embodiment, except that the user behavior information collection module is also used to capture user behavior information in real time through Flink stream processing and perform real-time 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.
[0039] The feedback learning module is also used to verify the effectiveness of the recommendation system through A / B testing and offline experiments, and to collect real feedback from users; it uses user feedback data to fine-tune the algorithm and adaptively optimize the system based on online learning.
[0040] The system monitoring module is also used to monitor the performance of the system, and log the input, output, and system status information of each recommendation; it provides a data analysis interface to help system administrators troubleshoot and optimize performance.
[0041] The system supports multiple push channels to send recommendation results to users; it uses cache technology to store recommendation lists, allowing users to quickly retrieve previously generated recommendation results when they visit repeatedly, reducing the consumption of computing resources and response time, while collecting user feedback on recommendation results and optimizing the screening of recommended content.
[0042] When generating the final recommendation list, there may be situations where the scores are the same. Based on actual data analysis, services in the recommendation list based on platform services will be given priority. If the scores are the same and both belong to the recommendation list based on platform services, the service that has been used more times will be selected.
[0043] The system uses information resource integration to centralize scattered resources and turn disordered resources into ordered resources, that is, to organize discrete data into data that can serve users, making it easier for users to find information and for information to serve users. With the help of data visualization technology to display the results of behavioral analysis, users can more intuitively see the overall rules and development trends revealed by big data.
[0044] From the above, we can see that we 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 of data dilution. We dynamically assign different weights to different recommendation items through the self-attention mechanism, introduce a multi-head attention mechanism, and calculate the attention scores of multiple platform services in parallel to obtain replacement recommendation items. We normalize and sort them by similarity to obtain the final recommendation set, provide users with specific recommendations, and enable users without a service usage record to obtain service recommendations to solve the cold start problem.
[0045] Embodiment 3: The embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, each process of the above-mentioned recommendation system embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated 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 a computer-readable instruction, a data structure, a module of a program, or other data.
[0046] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction 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 any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples, unless they are contradictory.
[0047] The present invention is described with reference to 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, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to generate a program, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A way to specify functions in one or more boxes.
[0048] In the drawings of the embodiments disclosed in the present invention, only the structures involved in the embodiments disclosed in the present invention are involved, and other structures can refer to the general design. In the absence of conflict, the same embodiment and different embodiments of the present invention can be combined with each other.
[0049] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that 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 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 assign different weights to different recommendation items according to the user behavior information and path reasoning results; 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 knowledge graph construction and update module is also used for: The user behavior information and platform service information are used as the entity nodes to construct the knowledge graph, and a service feature node is introduced to describe the platform service 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; The text similarity between the platform services is calculated based on the Word2Vec model, the platform services with higher text similarity are set as functional similarity relationships, and are added to the knowledge graph as a semantic overlay layer.
3. According to claim 2, 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 a candidate recommendation set.
4. According to claim 3, a multi-user recommendation system based on knowledge graph path reasoning and attention mechanism is characterized in that: The attention mechanism module is also used to: Dynamically assign different weights to different recommendation items according to the user behavior information and path reasoning results through a self-attention mechanism; 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 except the current platform service is selected as a substitute.
5. According to claim 4, 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.
6. According to claim 5, a multi-user recommendation system based on knowledge graph path reasoning and attention mechanism is characterized in that: 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.
7. A multi-user recommendation system based on knowledge graph path reasoning and attention mechanism according to claim 6, 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.
8. A multi-user recommendation system based on knowledge graph path reasoning and attention mechanism according to claim 7, 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.
9. A multi-user recommendation system based on knowledge graph path reasoning and attention mechanism according to claim 8, 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 content recommendation method for text travel fusion
CN115687637A
Group-fused collaborative knowledge graph network recommendation method
CN116304372A
Knowledge graph attention network recommendation method based on graph collaborative filtering
CN116340648A
Personalized recommendation system and method based on knowledge graph and collaborative filtering
CN118227884A
Cited By
Intelligent laundry room environment monitoring and control method
CN121660093A
Data retrieval method and device for knowledge graph, equipment and storage medium
CN122309717A