Recommendation method and device based on knowledge graph, equipment and storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- PING AN TECH (SHENZHEN) CO LTD
- Filing Date
- 2024-09-12
- Publication Date
- 2026-06-16
Smart Images

Figure CN119149697B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to a recommendation method, apparatus, device, and storage medium based on knowledge graphs. Background Technology
[0002] In the field of talent recommendation, existing systems mostly rely on resume keyword matching or rule-based algorithms. This approach struggles to fully uncover a candidate's potential and suitability, performs poorly in personalized recommendations, and fails to comprehensively consider a candidate's multi-dimensional characteristics (such as skills, experience, and cultural fit). Due to a lack of deep semantic analysis and relationship recognition capabilities, these systems often only provide recommendations based on surface features, making it difficult to meet the precise needs of financial institutions for highly skilled professionals.
[0003] Although Natural Language Processing (NLP) technology has been applied to the field of talent recommendation to some extent, existing semantic analysis models still suffer from insufficient accuracy. When processing long texts or complex contexts, these models often fail to accurately identify subtle differences in candidate information, leading to biased information interpretation and affecting the effectiveness of talent recommendation.
[0004] Current technologies still face challenges in integrating multi-source heterogeneous data and identifying relationships when constructing knowledge graphs. Traditional methods struggle to effectively extract and integrate complex relationships between candidates (such as project participation and collaboration experience), resulting in knowledge graphs that are insufficient in terms of accuracy and comprehensiveness.
[0005] While Graph Neural Networks (GNNs) have shown great potential in processing graph-structured data, their application in talent recommendation systems still faces many limitations. GNN models have high computational complexity, especially when dealing with large-scale knowledge graphs, resulting in long training times and high computational resource consumption. Furthermore, GNN model design often requires customization based on specific application scenarios, increasing the difficulty of development and deployment.
[0006] These issues limit the overall performance of talent recommendation systems, making it difficult to provide financial institutions with efficient and accurate recommendations. Therefore, there is an urgent need to address these key problems through technological innovation to improve the intelligence and personalization of talent recommendation systems. Summary of the Invention
[0007] The main objective of this invention is to provide a recommendation method, apparatus, device, and storage medium based on knowledge graphs, aiming to solve the technical problems in existing recommendation technologies that lack effective semantic analysis, relationship recognition, and complex network structure processing capabilities, resulting in insufficient accuracy and personalization of recommendation results.
[0008] To achieve the above objectives, this invention provides a knowledge graph-based recommendation method, comprising:
[0009] Acquire knowledge data in the target domain, and perform semantic analysis on the knowledge data using a bidirectional LSTM autoencoder to generate semantic vectors of the knowledge data;
[0010] By combining the generated semantic vectors, named entity recognition technology, and semantic role labeling technology, entities and relationships between entities are identified from the knowledge data, and triples containing subject, object, and predicate are constructed.
[0011] A structured knowledge graph is constructed based on the triples, and node features are extracted and embedded in the knowledge graph to generate a feature vector for each node.
[0012] By combining the feature vector of each node with the graph structure information in the knowledge graph, an initial graph neural network model is constructed.
[0013] The initial graph neural network model is trained and optimized to generate the target graph neural network model;
[0014] Based on the target graph neural network model, nodes representing entities within the target domain are scored and ranked, and nodes that meet the recommendation criteria are recommended as target objects within the target domain.
[0015] In one embodiment, semantic analysis of the knowledge data is performed using a bidirectional LSTM autoencoder to generate a semantic vector of the knowledge data, including:
[0016] The knowledge data is processed by text segmentation and word embedding to transform the text into fixed-dimensional word vectors;
[0017] The word vectors are input into the bidirectional LSTM autoencoder, which includes a forward LSTM network and a backward LSTM network.
[0018] The word vectors are processed sequentially from the beginning to the end of the sentence using a forward LSTM network, and sequentially from the end to the beginning of the sentence using a reverse LSTM network, generating forward hidden state and reverse hidden state respectively.
[0019] At each time step, the forward hidden state and the reverse hidden state are concatenated to form a bidirectional hidden state containing contextual information.
[0020] The concatenated bidirectional hidden states are processed by an activation function, and the processed output is concatenated or pooled to generate a global semantic vector.
[0021] The generated global semantic vector is input into the decoder, and the original input sentence is reconstructed by the decoder. The difference between the decoder output and the original sentence is calculated as the loss value.
[0022] By adjusting the model parameters based on the loss value using the backpropagation algorithm, the semantic representation capability of the model is optimized, and finally a semantic vector reflecting the semantics of the knowledge data is generated.
[0023] In one embodiment, by combining generated semantic vectors, named entity recognition technology, and semantic role labeling technology, entities and relationships between entities are identified from the knowledge data, and a triple containing a subject, an object, and a predicate is constructed, including:
[0024] Based on the generated semantic vectors, a hierarchical clustering algorithm is used to cluster the semantic vectors representing entity names, resulting in multiple name clusters;
[0025] Named entity recognition technology is used to identify entities that represent the same actual object by performing entity recognition on clustered name clusters.
[0026] Based on the generated semantic vectors, a hierarchical clustering algorithm is used to cluster the semantic vectors representing the relationships between entities, resulting in multiple relationship clusters;
[0027] Semantic role labeling technology is used to identify the relationships in the clustered relationship clusters, and relational statements that express the same semantic relationship or have the same syntactic structure are classified into a unified relationship type.
[0028] Based on the clustered entities and the unified relation type, a triplet containing subject, object and predicate is constructed.
[0029] In one embodiment, node feature extraction and embedding representation are performed in the knowledge graph to generate a feature vector for each node, including:
[0030] Extract the basic attributes of each node in the knowledge graph, including node type, number of connected edges, degree of the node, and information about neighboring nodes;
[0031] Set the step size and transition probability of the random walk, and perform multiple random walk operations on each node to generate multiple node sequences.
[0032] The word2vec method is used to train the generated node sequence using either a skip-gram model or a CBOW model to generate the feature vector for each node.
[0033] In one embodiment, an initial graph neural network model is constructed by combining the feature vector of each node with the graph structure information in the knowledge graph, including:
[0034] The feature vector of each node is multiplied by the pre-trained weight matrix to generate a preliminary score value for the node, and the preliminary score value is adjusted according to the graph structure information in the knowledge graph.
[0035] Calculate the weight value of each node and perform non-linear processing through an activation function to obtain the activated weight value;
[0036] The activated weight values are normalized so that the sum of the weight values of each node is 1, thus generating a normalized weight vector.
[0037] The initial score of a node is weighted and adjusted using the normalized weight vector and the in-degree of the node to generate the final feature representation of the node.
[0038] In each layer of the graph neural network, the intensity of information propagation is controlled by the final feature representation of the nodes and the normalized weight vector. Information is aggregated and updated through the network layers, and finally a complete initial graph neural network model is constructed.
[0039] In one embodiment, training and optimizing the initial graph neural network model to generate a target graph neural network model includes:
[0040] The mean squared error is used as the loss function to calculate the prediction error of the initial graph neural network model on the training set.
[0041] Using the calculated prediction error, the model parameters are adjusted using the Adam optimizer through the backpropagation algorithm to minimize the loss function;
[0042] The model is trained iteratively multiple times, and its performance is evaluated and adjusted using the validation set after each training round.
[0043] After multiple rounds of training and optimization, an optimized target graph neural network model is finally generated for prediction and recommendation tasks.
[0044] In one embodiment, based on the target graph neural network model, scoring and ranking nodes representing entities within the target domain includes:
[0045] Extract the final feature representation of each node from the target graph neural network model. The final feature representation is a vector generated through multi-layer network propagation and information aggregation process.
[0046] The centrality index of each node in the graph structure is calculated using algorithms such as degree centrality, proximity centrality, betweenness centrality, or eigenvector centrality.
[0047] Using a preset transformation function, the feature vector of each node is combined with the centrality index to generate a preliminary evaluation value for each node.
[0048] The connection strength between a node and its neighboring nodes is analyzed, and the preliminary evaluation value of each node is adjusted based on the analysis results to generate the final evaluation value.
[0049] The nodes representing entities within the target domain are sorted based on the final evaluation value of each node.
[0050] Furthermore, to achieve the above objectives, the present invention also provides a computer device, the computer device including a memory, a processor, and a knowledge graph-based recommendation program stored in the memory and executable on the processor, wherein the knowledge graph-based recommendation program, when executed by the processor, implements the steps of the knowledge graph-based recommendation method as described above.
[0051] Furthermore, to achieve the above objectives, the present invention also provides a computer storage medium storing a knowledge graph-based recommendation program, wherein the knowledge graph-based recommendation program, when executed by a processor, implements the steps of the knowledge graph-based recommendation method as described above.
[0052] Beneficial Effects: This invention relates to a knowledge graph-based recommendation method. It uses a bidirectional LSTM autoencoder to perform semantic analysis on knowledge data in the target domain, generating semantic vectors. Combining semantic vectors with named entity recognition (NAME) and semantic role labeling (SLA) techniques, it identifies entities and their relationships, constructs triples, and generates a structured knowledge graph. Node features are extracted and embedded within the knowledge graph. An initial graph neural network model is constructed using graph structure information. A target graph neural network model is generated through training and optimization. Nodes are scored and ranked to recommend target objects. This invention improves the accuracy and intelligence of recommendations, enhances the personalization and matching degree of recommendation results, and significantly improves the problem of inaccurate recommendation results in existing technologies. Attached Figure Description
[0053] The present invention will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings:
[0054] Figure 1 This is a flowchart illustrating an embodiment of the knowledge graph-based recommendation method of the present invention.
[0055] Figure 2 This is a schematic diagram of the functional modules of a preferred embodiment of the knowledge graph-based recommendation device of the present invention;
[0056] Figure 3 This is a schematic diagram of the hardware operating environment of the computer device involved in the embodiment of the present invention. Detailed Implementation
[0057] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.
[0058] In the field of talent recommendation, existing systems mostly rely on resume keyword matching or rule-based algorithms. This approach struggles to fully uncover a candidate's potential and suitability, performs poorly in personalized recommendations, and fails to comprehensively consider a candidate's multi-dimensional characteristics (such as skills, experience, and cultural fit). Due to a lack of deep semantic analysis and relationship recognition capabilities, these systems often only provide recommendations based on surface features, making it difficult to meet the precise needs of financial institutions for highly skilled professionals.
[0059] Although Natural Language Processing (NLP) technology has been applied to the field of talent recommendation to some extent, existing semantic analysis models still suffer from insufficient accuracy. When processing long texts or complex contexts, these models often fail to accurately identify subtle differences in candidate information, leading to biased information interpretation and affecting the effectiveness of talent recommendation.
[0060] Current technologies still face challenges in integrating multi-source heterogeneous data and identifying relationships when constructing knowledge graphs. Traditional methods struggle to effectively extract and integrate complex relationships between candidates (such as project participation and collaboration experience), resulting in knowledge graphs that are insufficient in terms of accuracy and comprehensiveness.
[0061] While Graph Neural Networks (GNNs) have shown great potential in processing graph-structured data, their application in talent recommendation systems still faces many limitations. GNN models have high computational complexity, especially when dealing with large-scale knowledge graphs, resulting in long training times and high computational resource consumption. Furthermore, GNN model design often requires customization based on specific application scenarios, increasing the difficulty of development and deployment.
[0062] These issues limit the overall performance of talent recommendation systems, making it difficult to provide financial institutions with efficient and accurate recommendations. Therefore, there is an urgent need to address these key problems through technological innovation to improve the intelligence and personalization of talent recommendation systems.
[0063] Please see Figure 1 , Figure 1 This is a flowchart illustrating an embodiment of the knowledge graph-based recommendation method provided by the present invention. It should be noted that although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here.
[0064] like Figure 1 As shown, the knowledge graph-based recommendation method proposed in this invention includes the following steps:
[0065] S10, acquire knowledge data in the target domain, perform semantic analysis on the knowledge data using a bidirectional LSTM autoencoder, and generate a semantic vector of the knowledge data;
[0066] In this embodiment, relevant knowledge data is acquired from the target domain and preprocessed as necessary. The target domain refers to an area that requires focused attention or application within a specific theme or industry. The scope of this domain is typically defined based on user needs or system objectives. The target domain can be a collection of knowledge and information related to a specific task, problem, or application. For example, the target domain could be any of the following:
[0067] The financial field involves knowledge of financial markets, stocks, bonds, investments, and corporate finance.
[0068] The medical field includes patient information, medical research, diagnostic and treatment methods, and drug data.
[0069] Technology research and development: This includes technological innovation, patents, academic papers, and technical standards.
[0070] Legal field: including legal provisions, precedents, court judgments, and other information.
[0071] Domain-specific knowledge data refers to a collection of important information within a specific domain. This data, after being collected, organized, and structured, can be used for subsequent analysis and recommendations. For example, in a talent recommendation system, domain-specific knowledge data might include expert information, research findings, and work experience related to that domain. Semantic analysis of knowledge data using a bidirectional LSTM autoencoder refers to using natural language processing techniques to perform deep analysis on textual data within the target domain, extracting semantic information and representing it as semantic vectors that computers can understand, for use in subsequent graph construction and recommendations.
[0072] In this embodiment and subsequent embodiments, talent recommendation is used as an example for illustration. The knowledge data of the target domain refers to all information and data related to a specific talent domain (e.g., finance, technology research and development, medicine, etc.). This data may include, but is not limited to:
[0073] Academic literature: Research papers, patent documents, technical reports, etc., related to this field. These documents contain the latest research results, technological innovations, and trend analyses in this field.
[0074] Industry data: Market analysis reports, industry trends, employment data, etc., related to this field. This data helps in understanding market demand, development trends, and talent needs in this area.
[0075] Social and professional network data: such as data from professional social networking platforms like LinkedIn, which includes professional information, skills, and work experience of industry experts, academics, and practitioners.
[0076] Educational background and training records: This includes information such as the educational background, training received, and professional certifications of practitioners in this field. This data helps to assess the knowledge level and professional competence of talents.
[0077] Work experience and project experience: This includes the candidate's work experience in the target field, the projects they participated in, their roles, and their achievements. This information comprehensively reflects the candidate's actual work ability and accumulated experience.
[0078] Company and organizational internal data: This includes internal human resources data, employee performance evaluations, talent development plans, etc., which can provide in-depth insights into employee capabilities, performance, and potential.
[0079] Domain-specific knowledge data is the process of specifically collecting and organizing various information related to talent within a particular field. By integrating data from multiple sources, a comprehensive and structured knowledge system can be constructed, reflecting the skill requirements, industry trends, and top professionals within the target domain. This data plays a crucial role in talent recommendation systems, helping them to more accurately match and recommend suitable candidates for target positions or projects.
[0080] In application scenarios, the accuracy and comprehensiveness of knowledge data directly impact the reliability and effectiveness of recommendation results. For example, in the financial sector, understanding a candidate's academic background, work experience, specific skill certifications, and their influence within the industry can help companies find the most suitable financial experts or management talent to meet their needs. Through in-depth analysis of this data, the system can better understand and predict the potential and adaptability of talent, thereby providing high-quality recommendation results.
[0081] These data may come from different sources and in different formats, therefore preprocessing is necessary to make them suitable for subsequent analysis steps. Preprocessing includes cleaning, word segmentation, and stop word removal to ensure data quality and consistency. The purpose of this step is to provide high-quality input data for subsequent semantic analysis.
[0082] A bidirectional LSTM autoencoder is a deep learning model specifically designed for processing sequential data. Through a bidirectional LSTM network, the model can process data simultaneously from the beginning to the end of a sentence and vice versa, thereby capturing contextual information within the text. This process generates hidden states representing the semantics of the text, which are ultimately used by the autoencoder to produce semantic vectors. These semantic vectors are compressed representations of the original text information, containing the core semantic features of the text.
[0083] Through processing by a bidirectional LSTM autoencoder, the original text data is transformed into semantic vectors. These semantic vectors are multi-dimensional real-number vectors that can compactly represent the semantic content of the text, providing support for subsequent entity recognition and relation extraction. The semantic vectors capture important information in the text, enabling subsequent steps to perform more complex analysis and reasoning based on these vectors.
[0084] In one specific implementation, when processing text data, the model introduces an attention mechanism to dynamically allocate weights to important words in the text, thereby enhancing the representational power of the semantic vectors. The attention mechanism dynamically adjusts the weight of each word based on the context of the text content, ensuring that important words occupy a larger proportion of the semantic vector generation, thus enhancing the semantic representation of the text. By strengthening keywords related to the main idea of the text through the attention mechanism, the generated semantic vectors can better reflect the core content of the text. By introducing the attention mechanism, semantic vectors can more accurately capture key information in complex texts, improving the semantic expressive power of the vectors.
[0085] In another specific implementation, convolutional layers are introduced into the bidirectional LSTM autoencoder. These convolutional neural networks capture local semantic features in the text, combining this with the global semantic extraction capabilities of the LSTM network. The convolutional layers extract local features from the text, capturing the semantic features of phrases or word groups, which are then combined with the global semantic features extracted by the LSTM network. The convolutional layers use different kernel sizes to perform multi-scale feature extraction, enabling the generated semantic vectors to simultaneously reflect both local and global semantic information. The introduction of convolutional layers improves the semantic vectors' ability to capture text details, especially when processing texts with obvious local features, where the generated semantic vectors more accurately reflect the overall semantic structure of the text.
[0086] By employing a bidirectional LSTM autoencoder to perform deep semantic analysis on knowledge data in the target domain, high-quality semantic vectors are generated. This enables more accurate capture of semantic information in text, providing a solid foundation for subsequent entity recognition and knowledge graph construction, thereby significantly improving the accuracy and intelligence level of the talent recommendation system.
[0087] S20, combining the generated semantic vectors, named entity recognition technology and semantic role labeling technology, entities and relationships between entities are identified from the knowledge data, and a triple containing subject, object and predicate is constructed;
[0088] In this embodiment, a bidirectional LSTM autoencoder is used to generate semantic vectors of the text, and named entity recognition technology is used to extract key entities from the semantic vectors. Semantic role labeling technology is used to annotate the relationships between these entities, and finally, triples composed of subject, object, and predicate are constructed. These triples serve as the foundation of the knowledge graph, providing data support for subsequent talent recommendation and relationship reasoning.
[0089] Semantic vectors are multi-dimensional real-number vectors generated by a bidirectional LSTM autoencoder, representing the core semantic information in the text. These generated semantic vectors serve as input, providing the semantic foundation for subsequent named entity recognition and semantic role labeling. These semantic vectors encompass the key concepts and relationships in the text, laying the data foundation for entity recognition and relation extraction.
[0090] Named Entity Recognition (NER) is a natural language processing technique used to identify entities mentioned in text, such as names of people, organizations, and places. NER combines semantic vectors to accurately extract entities with specific meanings from knowledge data. These entities may represent key talent-related elements such as people, companies, and skills. By classifying and labeling entity words in text, NER further enriches the representational capabilities of semantic vectors.
[0091] Semantic Role Labeling (SRL) is a technique for identifying and labeling different roles and their semantic relationships in text. SRL combines semantic vectors with entities extracted by Neural Entity Recognition (NER) to identify semantic relationships between entities in text, such as the actor, the affected party, location, and time. SRL provides the necessary semantic information for constructing triples, accurately labeling the role of each entity in a sentence by analyzing the grammatical structure and semantic relationships in the text.
[0092] A triple is a structure consisting of a subject, an object, and a predicate, used to represent relationships between entities. The subject represents the performer of an action, the object represents the recipient of the action, and the predicate describes the relationship between the subject and object. By combining NER and SRL techniques, these triples are extracted from knowledge data to construct a knowledge graph containing entities and their relationships. These triples are the basic building blocks of the knowledge graph, reflecting various associations between entities and providing structured data for subsequent reasoning and recommendation.
[0093] In one specific implementation, a deep neural network (DNN) is introduced during the semantic role labeling process to enhance the accuracy of relation extraction. The DNN model is used to further extract features from the semantic vectors, generating higher-dimensional representations that enable SRL to identify more complex semantic relationships. A multi-layered network structure is introduced into the DNN to capture semantic information in the text layer by layer, thereby better identifying complex entity relationships. By introducing a deep neural network, SRL can accurately identify multiple relationships between entities in complex sentence structures, improving the construction effect of triples.
[0094] In another specific implementation, a self-supervised learning mechanism is introduced during the construction of triples to enhance the model's generalization ability. Self-supervised learning methods are used to pre-train on a large amount of unlabeled data, generating semantic vectors with greater generalization ability, supporting NER and SRL. Contrastive learning techniques are employed to strengthen the ability to distinguish between entities and relations, enabling the model to accurately identify and label entity relationships even when faced with unseen data. The introduction of self-supervised learning effectively improves the model's adaptability to new data scenarios, making the construction of triples more robust across diverse data sources.
[0095] By combining generated semantic vectors, named entity recognition technology, and semantic role labeling technology, entities and their relationships in text can be identified efficiently and accurately, constructing structured triples. This improves the efficiency and accuracy of knowledge graph construction, provides a more precise data foundation for talent recommendation systems, and significantly addresses the shortcomings of existing technologies in complex relationship identification and knowledge representation.
[0096] S30, construct a structured knowledge graph based on the triples, extract and embed representations of node features in the knowledge graph, and generate a feature vector for each node;
[0097] In this embodiment, based on the constructed triples, a structured graph is formed by mapping each entity and relation to nodes and edges in the knowledge graph. Within the knowledge graph, feature extraction is performed on each node to obtain its degree, centrality, and other characteristic information. A node embedding method is then used to transform the extracted features and graph structure information into low-dimensional vectors, generating a feature vector for each node. The generated feature vectors can be used for downstream tasks such as node classification and relation prediction.
[0098] Triples are structured data consisting of a subject, an object, and a predicate, used to represent relationships between entities. In constructing knowledge graphs, triples serve as the basic unit of the graph; each triple represents an edge connecting two nodes (entities). Knowledge graphs integrate multiple triples to form a graph structure capable of representing a large number of entities and their relationships. Knowledge graphs built using triples can describe complex relationships between entities, providing an intuitive and structured way to store and represent knowledge.
[0099] Node feature extraction refers to extracting important information related to each node in a knowledge graph, such as the node's degree, the number of edges it connects to, and its centrality. These features reflect the node's position and importance within the entire graph. For example, a node's degree reflects its connections to other nodes, while centrality measures its relative importance within the network. By extracting these features, we can better understand the role and influence of each node in the knowledge graph.
[0100] Node embedding representation maps nodes in a knowledge graph to a low-dimensional vector space, allowing the topological information and node features of the graph structure to be expressed in vector form. Through embedding representation, complex graph structure information can be transformed into easily computed and analyzed vector forms. These vectors not only preserve the semantic and topological information of the original graph structure but can also be directly used in subsequent machine learning models, such as node classification and link prediction tasks. Commonly used node embedding methods include node2vec and DeepWalk.
[0101] In one specific implementation, an adaptive embedding technique is used during the node embedding representation process to dynamically adjust the node embedding vectors according to changes in the graph structure. Through an adaptive algorithm, changes in the graph structure are perceived, and the node embedding vectors are dynamically adjusted, enabling the node representation to reflect real-time changes in the graph structure. The introduction of multi-dimensional embedding technology allows the node embedding vectors to reflect various features and relationships of the node across different dimensions. The adaptive embedding technique enables the node's feature vectors to better adapt to the dynamically changing graph structure, improving the accuracy and flexibility of node representation.
[0102] By combining a knowledge graph constructed from triples, feature extraction and embedding representations of nodes can be performed, which can efficiently generate vector representations that reflect graph structure information and node features.
[0103] S40, combine the feature vector of each node with the graph structure information in the knowledge graph to construct the initial graph neural network model;
[0104] In this embodiment, the feature vector of each node is obtained through feature extraction and embedding representation, reflecting the node's basic attributes and local structural information in the knowledge graph. The graph structure information in the knowledge graph includes the connections between nodes, node degree, path information, etc. This graph structure information not only describes the relationships between nodes but also reveals the global topological structure of the graph. When constructing the initial graph neural network model, by combining the feature vector of each node with the graph structure information, the relative position and importance of the node in the entire knowledge graph can be captured. This combination ensures that the node's features not only depend on its own information but also fully utilize the relational information of its neighboring nodes, thereby enhancing the comprehensiveness and accuracy of the node representation.
[0105] The initial graph neural network model takes node feature vectors and graph structure information as input, propagates and aggregates them layer by layer, and gradually generates a global feature representation of the nodes. Graph neural network models can effectively perform machine learning tasks on graph-structured data. By propagating and aggregating node information through multiple layers, each node's representation includes not only its own features but also the features and relationship information of its neighboring nodes. In this way, the initial graph neural network model can capture complex graph structure features and generate high-quality node representations, laying the foundation for subsequent tasks such as classification and prediction.
[0106] In one specific implementation, a residual connection mechanism is introduced into the graph neural network model to improve the information transmission efficiency and stability of the model in deep networks. By adding residual connection paths to each layer of the graph neural network, the output of the previous layer is directly summed with the input of the current layer, reducing information loss. Residual connections effectively alleviate the vanishing gradient problem in deep models, ensuring that important information is effectively preserved and transmitted during the propagation process across multiple network layers. The introduction of residual connections enhances the stability and information transmission efficiency of the graph neural network model, especially when dealing with deep network structures, better maintaining the model's training effect and prediction performance.
[0107] An initial graph neural network model was constructed by combining the feature vectors of nodes with the graph structure information in the knowledge graph. This model effectively integrates the local features and global structural information of nodes, enabling the generated node representations to better reflect their position and importance in the graph. Compared with existing graph structure processing methods, it significantly improves the representational power and learning efficiency of graph neural networks, demonstrating superior performance when processing large-scale complex graphs.
[0108] S50, the initial graph neural network model is trained and optimized to generate the target graph neural network model;
[0109] In this embodiment, training and optimizing the initial graph neural network model aims to enable the model to better fit the training data and possess good generalization ability in practical applications. The training process involves inputting data from the training set into the model, calculating the difference between the model's output and the true value (i.e., the loss value), and adjusting the model parameters using the backpropagation algorithm to gradually reduce the loss value, ultimately optimizing the model's performance. The optimization process includes selecting an appropriate optimization algorithm, such as the Adam optimizer, and adjusting hyperparameters such as the learning rate to achieve an optimal balance between convergence speed and performance. After training and optimization, the generated target graph neural network model is better able to handle data tasks in practical applications.
[0110] In one specific implementation, the learning rate is dynamically adjusted during the training of the graph neural network model to improve the model's convergence speed and stability. Using a dynamic learning rate adjustment mechanism, the learning rate is adaptively adjusted based on the model's convergence progress during training, allowing the model to optimize more robustly as it approaches convergence. A larger learning rate is used in the early stages of training to accelerate convergence, and the learning rate is gradually reduced as the model approaches convergence to avoid excessively large step sizes that could cause model oscillations or divergence. This dynamic learning rate adjustment mechanism improves training efficiency, reduces training time, and enhances convergence stability, enabling the model to reach optimal performance more quickly.
[0111] By training and optimizing the initial graph neural network model, a target graph neural network model with superior performance was generated. This model can better fit the training data when processing complex graph structure data, and also has good generalization ability, making it suitable for a variety of tasks in practical applications.
[0112] S60, based on the target graph neural network model, the nodes representing entities in the target domain are scored and ranked, and the nodes that meet the recommendation conditions are recommended as target objects in the target domain.
[0113] In this embodiment, in the target graph neural network model, each node represents an entity within the target domain, and the connections between nodes represent the relationships between entities. The scoring process calculates the importance or suitability of each node using the graph neural network model. The scoring criteria may include factors such as the node's feature representation, centrality index, and the strength of its relationships with neighboring nodes. Ranking is then performed based on the scoring results, arranging the nodes from highest to lowest score, prioritizing the node with the highest score as the recommended candidate. In this way, the most suitable and outstanding talents can be selected from a large number of candidate nodes.
[0114] Based on scoring and ranking, nodes with higher scores are selected as recommended entities. These nodes typically represent entities with outstanding capabilities or features in a specific domain. During the recommendation process, the graph neural network model combines entity feature representations and graph structure information to ensure that the recommended results not only meet practical needs but also have high accuracy and reliability.
[0115] In one specific implementation, a reverse verification mechanism is introduced during the node recommendation process to validate and optimize the recommendation results. After the recommendation results are generated, the rationality of the recommendations is verified by comparing the relationships between nodes and their neighboring nodes, and adjustments are made to results that do not meet expectations. The reverse verification results are used as feedback to iteratively update the scoring and ranking mechanisms, gradually optimizing the performance of the recommendation model. The reverse verification mechanism improves the reliability of the recommendation results, avoids potential biases and errors in the scoring and ranking process, and ensures that the recommended personnel truly meet the needs of the target domain.
[0116] By scoring and ranking nodes based on a target graph neural network model, it is possible to effectively identify and screen out outstanding talents in the target field.
[0117] This invention relates to a knowledge graph-based recommendation method. It employs a bidirectional LSTM autoencoder to perform semantic analysis on knowledge data in a target domain, generating semantic vectors. Combining semantic vectors with named entity recognition (NAME) and semantic role labeling (SLA) techniques, it identifies entities and their relationships, constructs triples, and generates a structured knowledge graph. Within the knowledge graph, it extracts and embeds node features, builds an initial graph neural network model using graph structure information, and generates a target graph neural network model through training and optimization. The method then scores and ranks nodes to recommend outstanding talent. This invention improves the accuracy and intelligence of talent recommendations, enhances the personalization and matching degree of recommendation results, and significantly addresses the problem of inaccurate recommendation results in existing technologies.
[0118] In one embodiment, in S10 above, semantic analysis of the knowledge data is performed using a bidirectional LSTM autoencoder to generate a semantic vector of the knowledge data, including:
[0119] S101 performs text segmentation and word embedding on knowledge data, converting the text into fixed-dimensional word vectors;
[0120] S102, input the word vectors into the bidirectional LSTM autoencoder, which includes a forward LSTM network and a backward LSTM network;
[0121] S103, word vectors are processed sequentially from the beginning to the end of the sentence through a forward LSTM network, and word vectors are processed sequentially from the end to the beginning of the sentence through a reverse LSTM network, generating forward hidden state and reverse hidden state respectively;
[0122] S104, at each time step, the forward hidden state and the reverse hidden state are concatenated to form a bidirectional hidden state containing contextual information;
[0123] S105, apply an activation function to the concatenated bidirectional hidden state, and generate a global semantic vector from the processed output through concatenation or pooling operations;
[0124] S106, the generated global semantic vector is input into the decoder, and the original input sentence is reconstructed through the decoder. The difference between the decoder output and the original sentence is calculated as the loss value.
[0125] S107, the model parameters are adjusted based on the loss value using the backpropagation algorithm to optimize the semantic representation capability of the model, and finally a semantic vector reflecting the semantics of the knowledge data is generated.
[0126] In this embodiment, text segmentation divides the original text data into individual words to facilitate subsequent word embedding and semantic analysis. Word embedding converts these words into fixed-dimensional vector representations, enabling word computation within the model. By mapping to a high-dimensional space, word embedding maps semantically similar words to similar vectors, thus maintaining semantic consistency in the vector space.
[0127] A bidirectional LSTM network consists of a forward LSTM network and a backward LSTM network. The forward LSTM network processes word vectors sequentially from the beginning to the end of the sentence, generating a forward hidden state. The backward LSTM network processes word vectors sequentially from the end to the beginning of the sentence, generating a backward hidden state. By combining the forward and backward hidden states, the model can capture the dependencies between contextual relationships within a sentence.
[0128] At each time step, the forward hidden state and the backward hidden state are concatenated to form a bidirectional hidden state that includes contextual information. This concatenation method can integrate the contextual information of each word in the sentence, enhancing the expressive power of the semantic vector.
[0129] Activation functions (such as ReLU and Sigmoid) are used to perform nonlinear transformations on the concatenated bidirectional hidden states, enabling the semantic vector to better represent complex semantic relationships. The processed output is then concatenated or pooled to generate a global semantic vector, representing the semantic information of the entire sentence.
[0130] The decoder attempts to reconstruct the original sentence by taking the generated global semantic vector as input. A loss function calculates the difference between the decoder's output and the original sentence, used to measure the model's generation quality. Through backpropagation, the model parameters are optimized based on the loss value, thereby improving the model's semantic representation capability.
[0131] In one specific implementation, a multi-head self-attention mechanism from the Transformer is used to generate word vectors, allowing each word to consider the global context. A multi-head attention layer is introduced before the LSTM layer to enhance semantic capture by focusing on the relevance of different parts of the sentence. The ELU activation function is applied to preserve more information details during non-linear processing, resulting in more expressive semantic vectors. A discriminator from a GAN adversarial network is used to evaluate the generated semantic vectors, optimizing the semantic representation quality of the generator.
[0132] This embodiment uses a bidirectional LSTM autoencoder to perform semantic analysis on knowledge data, generating high-quality semantic vectors. Compared with traditional unidirectional models, bidirectional LSTM can capture contextual information within sentences, improving the accuracy and detail of semantic representation. It enhances the model's ability to capture complex semantic relationships, effectively addressing the shortcomings of existing technologies in semantic representation.
[0133] In one embodiment, S20 above includes:
[0134] S201, Based on the generated semantic vectors, a hierarchical clustering algorithm is used to cluster the semantic vectors representing entity names to obtain multiple name clusters;
[0135] S202, using named entity recognition technology to identify entities representing the same actual object from clustered name clusters;
[0136] S203, based on the generated semantic vectors, a hierarchical clustering algorithm is used to cluster the semantic vectors representing the relationships between entities to obtain multiple relationship clusters;
[0137] S204 uses semantic role labeling technology to identify the relationships in the clustered relationship clusters, and classifies the relationship statements that express the same semantic relationship or have the same syntactic structure into a unified relationship type.
[0138] S205 constructs a triplet containing subject, object, and predicate based on clustered entities and a unified relation type.
[0139] In this embodiment, semantic vectors are representations of text data in vector form, derived through semantic analysis. These vectors capture the semantic relationships between words in the text. A hierarchical clustering algorithm groups these semantic vectors, aggregating semantically similar vectors together to form name clusters. Each vector in a name cluster represents different expressions that may refer to the same entity.
[0140] Named Entity Recognition (NER) technology refers to the identification of entities with specific meanings from text, such as person names, place names, and organization names. After clustering, NER technology is used to further refine name clusters, identify the same actual object represented by different names, and unify them as a single entity.
[0141] Similar to entity names, semantic vectors representing relationships between entities can also be grouped using hierarchical clustering. Relationship clusters contain vectors of relational statements with similar semantics or structure.
[0142] Semantic role labeling (SRL) is used to identify predicates in a sentence and their associated semantic roles (such as subject, object, etc.). In clustered relation clusters, SRL technology is used to identify and unify relation statements that express the same semantic relations or have the same syntactic structure, classifying them into a unified relation type.
[0143] Finally, by combining the identified entities with a unified relation type, a knowledge representation in the form of triples is constructed. Triples consist of a subject (entity), an object (entity), and a predicate (relation), which can clearly represent the semantic relationships in knowledge data.
[0144] This embodiment, by combining generated semantic vectors, named entity recognition technology, and semantic role labeling technology, can accurately identify entities and their relationships from knowledge data, constructing clear and richly expressive triple-form knowledge. This significantly improves the efficiency and accuracy of knowledge graph construction, especially when dealing with domain-specific complex data, enabling the automatic and efficient generation of structured knowledge graphs.
[0145] In one embodiment, in S30 above, node feature extraction and embedding representation are performed in the knowledge graph to generate a feature vector for each node, including:
[0146] S301, Extract the basic attributes of each node in the knowledge graph, including node type, number of connected edges, degree of the node, and information of neighboring nodes;
[0147] S302, set the step size and transition probability of the random walk, and perform multiple random walk operations on each node to generate multiple node sequences;
[0148] S303 uses the word2vec method to train the generated node sequence using either a skip-gram model or a CBOW model, generating a feature vector for each node.
[0149] In this embodiment, the basic attributes of a node include node type (such as entity type, person, organization, location, etc.), the number of edges connected (i.e., how many other nodes the node is connected to), the degree of the node (the connectivity of the node, used to measure the degree of direct connection between a node and other nodes in the graph), and information about neighboring nodes (features of other nodes directly connected to the node). These basic attributes help to understand the position and role of a node in the knowledge graph, providing important information for subsequent feature extraction and representation.
[0150] In an undirected graph, the degree of a node is the total number of edges connected to that node. Each edge connects two nodes, so if a node is directly connected to 3 other nodes, its degree is 3. The degree of a node reflects the number of its directly connected neighbors in the graph. In a directed graph, the degree of a node can be divided into in-degree and out-degree. In-degree refers to the number of edges pointing to the node, while out-degree refers to the number of edges emanating from the node. The total degree is the sum of the in-degree and out-degree. In recommender systems, analyzing the degree of a node allows for a better understanding of the strength of association between a candidate and other nodes, leading to more accurate recommendations.
[0151] Random walks are techniques that simulate stochastic processes to traverse nodes in a graph. The step size refers to the length of a single movement in a random walk, while the transition probability determines the likelihood of moving from the current node to the next. Multiple random walks can generate multiple sequences of nodes that reflect local information within the graph structure and capture the relationships between nodes.
[0152] Word2vec is a technique for generating word vectors, commonly used in natural language processing. Skip-gram models learn the representation of the target word by predicting context words, while CBOW models predict the target word using context words. In graph neural networks, these models are used to learn the feature vectors of nodes. Based on the generated node sequence, word2vec is used to train each node, generating a vector representation that captures its local graph structure information.
[0153] In one specific implementation, the extraction of basic node attributes considers not only static information but also dynamically changing attributes, such as node activity or timestamps. This is particularly suitable for transaction networks, where the time and frequency of each transaction affect node importance. By introducing a weighted processing mechanism, the feature representation of nodes can be adjusted according to these dynamic attributes, improving the model's ability to capture node importance.
[0154] This embodiment enhances the representational power of nodes in the graph structure by extracting and embedding node features into the knowledge graph, generating feature vectors for each node. The random walk technique combined with the word2vec model captures both local and global information of nodes in the graph, resulting in more expressive feature vectors. It is particularly suitable for processing complex financial knowledge graphs, significantly improving the accuracy and efficiency of graph structure analysis.
[0155] In one embodiment, S40 includes:
[0156] S401, multiply the feature vector of each node by the pre-trained weight matrix to generate the preliminary score value of the node, and adjust the preliminary score value according to the graph structure information in the knowledge graph;
[0157] S402, calculate the weight value of each node, and perform non-linear processing through the activation function to obtain the activated weight value;
[0158] S403, normalize the activated weight values so that the sum of the weight values of each node is 1, and generate a normalized weight vector.
[0159] S404 uses the normalized weight vector and the in-degree of the node to weight and adjust the initial score value of the node to generate the final feature representation of the node.
[0160] S405, in each layer of the graph neural network, uses the final feature representation of the nodes and the normalized weight vector to control the intensity of information propagation, and aggregates and updates information through the network layers to finally construct a complete initial graph neural network model.
[0161] In this embodiment, the feature vector of each node is generated through prior node embedding representation, representing the node's attributes in the knowledge graph and its relationships with other nodes. A pre-trained weight matrix contains initial model parameters used to transform the feature vector into a score. By multiplying the feature vector by the weight matrix, the resulting preliminary score represents the node's initial importance or priority. Subsequently, based on the knowledge graph's structure information, such as the node's neighbor relationships and the number of edges, the preliminary score is adjusted to more accurately reflect the node's position and influence within the entire graph.
[0162] The weights are calculated based on the node's initial score and other relevant information (such as node features, number of connected edges, etc.). The activation function introduces non-linearity, making the weight distribution more uniform or conforming to the expected distribution. This non-linear processing step helps improve the model's expressive power, enabling it to handle more complex relationships and dependencies between nodes.
[0163] The purpose of normalization is to ensure that the sum of the weights of all nodes equals 1, thus ensuring a fair distribution of node influence throughout the graph structure. The generated normalized weight vector is used for subsequent weighted calculations, enabling the final feature representation of each node to reflect its actual importance in the graph.
[0164] In-degree refers to the number of other nodes a node is connected to in the graph. By considering in-degree, the status and influence of a node can be more accurately reflected. The final feature representation is the result of further weighting and adjusting the initial score values, combining the normalized weight vector and in-degree information. This feature representation will be used to construct each layer of the graph neural network.
[0165] In each layer of a graph neural network, the final feature representation of a node and its normalized weight vector together determine the information propagation path and intensity. The network layers are responsible for aggregating and updating information received from neighboring nodes, passing and processing information between nodes layer by layer, ultimately forming a complete graph neural network model. This model can efficiently capture and represent the complex relationships within the graph structure, providing support for subsequent tasks such as prediction and classification.
[0166] In one specific implementation, the weight matrix is no longer a static pre-trained matrix, but is dynamically updated based on the model feedback in each training round. By updating the weight matrix after each iteration, the complex relationships between nodes can be reflected more accurately, making the calculation of the initial score more closely reflect the actual situation.
[0167] This embodiment constructs an initial graph neural network model by combining the feature vectors of each node with the graph structure information in the knowledge graph. This model can efficiently capture complex relationships in the graph structure and generate accurate node feature representations. Through multi-layer network propagation and information aggregation, the model can gradually optimize node representations and model performance, ultimately forming a high-efficiency and accurate graph neural network model. This significantly improves the model's performance in tasks such as prediction and classification.
[0168] In one embodiment, the above S50 includes:
[0169] S501 uses mean squared error as the loss function to calculate the prediction error of the initial graph neural network model on the training set.
[0170] S502 uses the calculated prediction error to adjust the model parameters using the Adam optimizer through the backpropagation algorithm, minimizing the loss function;
[0171] S503 performs multiple iterations of training, and after each training round, the model performance is evaluated and adjusted using the validation set;
[0172] S504, after multiple rounds of training and optimization, finally generates an optimized target graph neural network model for prediction and recommendation tasks.
[0173] In this embodiment, mean squared error (MSE) is a commonly used loss function to measure the difference between the model's predicted values and the actual values. Specifically, MSE evaluates the model's performance by calculating the average of the squared differences between the predicted and actual values. The smaller the MSE, the closer the model's prediction is to the actual value. By using MSE as the loss function, the model's parameters can be effectively adjusted, resulting in more accurate predictions.
[0174] Backpropagation is a key algorithm for training neural networks, used to calculate the gradient of the loss function and update model parameters based on this gradient information. The Adam optimizer is an adaptive learning rate-based optimization algorithm that combines momentum and RMSProp methods to converge quickly and stably to the optimal solution. By combining the Adam optimizer and backpropagation, the model can continuously adjust its parameters, gradually reducing the value of the loss function, thereby improving the model's predictive ability.
[0175] Iterative training is a common method in neural network training. Through multiple training rounds, the model gradually adjusts its parameters and optimizes its performance. After each round, the model's performance is evaluated using a validation set (i.e., a dataset not used in training) to ensure that the model has not overfitted and can perform well in real-world applications. Through this process, the model can gradually approach its optimal state after multiple training rounds.
[0176] After multiple rounds of training and optimization, the model eventually converges to a stable state, i.e., the optimal graph neural network model. This optimized model possesses strong generalization ability and can be effectively applied to practical prediction and talent recommendation tasks. The model provides support for talent recommendation by capturing latent patterns and relationships in the data.
[0177] This embodiment trains and optimizes the initial graph neural network model to generate a target graph neural network model with high prediction accuracy and generalization ability. It can effectively capture complex patterns in data, adapt to different data distributions, and thus perform excellently in practical prediction and talent recommendation tasks, significantly improving the model's stability and accuracy.
[0178] In one embodiment, in S60 above, scoring and ranking the nodes representing entities within the target domain based on the target graph neural network model includes:
[0179] S601, Extract the final feature representation of each node from the target graph neural network model, wherein the final feature representation is a vector generated through multi-layer network propagation and information aggregation process;
[0180] S602 calculates the centrality index of the relative importance of each node in the graph structure using degree centrality, proximity centrality, betweenness centrality, or eigenvector centrality algorithms;
[0181] S603 uses a preset transformation function to combine the feature vector of each node with the centrality index to generate a preliminary evaluation value for each node.
[0182] S604 analyzes the connection strength between a node and its neighboring nodes, adjusts the preliminary evaluation value of each node based on the analysis results, and generates the final evaluation value.
[0183] S605, sort the nodes representing entities in the target domain based on the final evaluation value of each node.
[0184] In this embodiment, the final feature representation of a node is a vector generated through multi-layer network propagation and information aggregation processes in the target graph neural network model. These feature representations are a comprehensive description of the node in the graph structure, including the node's attribute information and its relationships with other nodes. These vectors represent the node's position in the graph and its connectivity and importance to other nodes.
[0185] Centrality metrics are a class of algorithms used to measure the importance or influence of a node within the overall graph structure. Degree centrality measures how many other nodes a node is connected to; proximity centrality assesses the shortest path distance from a node to all other nodes; betweenness centrality measures a node's criticality in the graph by calculating how many shortest paths a node is on; and eigenvector centrality considers the importance of a node and its neighbors. These centrality algorithms can generate metrics for each node that reflect its position within the graph structure.
[0186] Transformation functions combine a node's feature vectors with its centrality index to generate a preliminary evaluation value for the node. These functions can be linear or nonlinear, designed according to the specific task requirements. The preliminary evaluation value represents the relative importance or ranking of the node within the current graph neural network model.
[0187] Connection strength reflects the strength of the relationship between a node and its neighbors. This may include edge weights, relationship types, etc. After analyzing these connection strengths, the initial evaluation values are adjusted so that the final evaluation values more accurately reflect the node's position and influence in the entire graph.
[0188] The final evaluation value is used to rank the nodes. This ranking process arranges the nodes according to their relative importance or influence based on their final evaluation value, thereby determining which nodes have higher priority or recommendation value within the target domain.
[0189] In another specific implementation, when analyzing the connection strength between a node and its neighbors, not only are edge weights considered, but a time dimension is also incorporated to analyze the persistence and frequency of connections. This strategy can better identify the strength of relationships between nodes, thus allowing for more accurate adjustments to the initial evaluation values. When adjusting the initial evaluation values of nodes, external expert data or domain knowledge is combined to further optimize the final evaluation values of the nodes, making the model results more aligned with actual industry needs.
[0190] This embodiment scores and ranks nodes representing entities within a target domain using a target graph neural network model, effectively identifying and recommending key talent nodes within the domain. It not only comprehensively considers node feature representations and centrality indicators but also further optimizes node ranking through connection strength analysis. This multi-level, multi-dimensional analysis method makes talent recommendations more accurate, contributing to improved decision-making accuracy and efficiency.
[0191] This invention also provides a knowledge graph-based recommendation device, referring to... Figure 2 , Figure 2 This is a schematic diagram of the functional modules of a preferred embodiment of the knowledge graph-based recommendation device of the present invention. The knowledge graph-based recommendation device includes:
[0192] The data processing and semantic analysis module acquires knowledge data in the target domain, performs semantic analysis on the knowledge data using a bidirectional LSTM autoencoder, and generates semantic vectors for the knowledge data.
[0193] The entity recognition and relation extraction module, by combining the generated semantic vectors, named entity recognition technology and semantic role labeling technology, identifies entities and the relationships between entities from the knowledge data, and constructs triples containing subject, object and predicate;
[0194] The knowledge graph construction module constructs a structured knowledge graph based on the triples, extracts and embeds node features in the knowledge graph, and generates a feature vector for each node.
[0195] The graph neural network construction module combines the feature vectors of each node with the graph structure information in the knowledge graph to build an initial graph neural network model;
[0196] The graph neural network training module trains and optimizes the initial graph neural network model to generate the target graph neural network model;
[0197] The target recommendation module, based on the target graph neural network model, scores and ranks the nodes representing entities within the target domain, and recommends nodes that meet the recommendation criteria as target objects within the target domain.
[0198] The specific implementation of the knowledge graph-based recommendation device of the present invention is basically the same as the embodiments of the knowledge graph-based recommendation method described above, and will not be repeated here.
[0199] The present invention also provides a computer device, such as Figure 3 As shown, the computer device may include: a processor 1001, such as a CPU; a communication bus 1002; a user interface 1003; a network interface 1004; and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen and an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed RAM or non-volatile memory, such as a disk drive. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0200] Those skilled in the art will understand that Figure 3 The hardware structure of the computer device shown does not constitute a limitation on the computer device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0201] like Figure 3 As shown, the memory 1005, which serves as a storage medium, may include an operating system, a network communication module, a user interface module, and a knowledge graph-based recommendation program. The operating system is a program that manages and controls computer equipment and software resources, supporting the operation of the network communication module, the user interface module, the knowledge graph-based recommendation program, and other programs or software. The network communication module manages and controls the network interface 1004; the user interface module manages and controls the user interface 1003.
[0202] exist Figure 3In the computer device hardware structure shown, the network interface 1004 is mainly used to connect to the backend server and communicate data with the backend server; the user interface 1003 is mainly used to connect to the client and communicate data with the client; the processor 1001 can call the knowledge graph-based recommendation program stored in the memory 1005 and perform the same operations as the knowledge graph-based recommendation method.
[0203] The specific implementation of the computer device of the present invention is basically the same as the embodiments of the recommendation method based on knowledge graphs described above, and will not be repeated here.
[0204] Furthermore, this embodiment of the invention also proposes a computer storage medium storing a knowledge graph-based recommendation program. When the knowledge graph-based recommendation program is executed by a processor, it implements the steps of the knowledge graph-based recommendation method as described above.
[0205] The specific implementation of the computer storage medium of the present invention is basically the same as the embodiments of the above-described knowledge graph-based recommendation method, and will not be repeated here.
Claims
1. A recommendation method based on knowledge graphs, characterized in that, Includes the following steps: Acquire knowledge data in the target domain, and perform semantic analysis on the knowledge data using a bidirectional LSTM autoencoder to generate semantic vectors of the knowledge data; By combining the generated semantic vectors, named entity recognition technology, and semantic role labeling technology, entities and relationships between entities are identified from the knowledge data, and triples containing subject, object, and predicate are constructed. A structured knowledge graph is constructed based on the triples, and node features are extracted and embedded in the knowledge graph to generate a feature vector for each node. By combining the feature vectors of each node with the graph structure information in the knowledge graph, an initial graph neural network model is constructed, including: multiplying the feature vector of each node with a pre-trained weight matrix to generate a preliminary score value for the node, and adjusting the preliminary score value according to the graph structure information in the knowledge graph; calculating the weight value of each node and performing non-linear processing through an activation function to obtain the activated weight value; normalizing the activated weight value so that the sum of the weight values of each node is 1, generating a normalized weight vector; using the normalized weight vector and the in-degree of the node to perform weighted adjustment on the preliminary score value of the node, generating the final feature representation of the node; in each layer of the graph neural network, using the final feature representation of the node and the normalized weight vector, controlling the intensity of information propagation, and aggregating and updating information through network layers, finally constructing a complete initial graph neural network model; The initial graph neural network model is trained and optimized to generate the target graph neural network model; Based on the target graph neural network model, nodes representing entities within the target domain are scored and ranked, including: extracting the final feature representation of each node from the target graph neural network model, wherein the final feature representation is a vector generated through multi-layer network propagation and information aggregation; calculating the centrality index of each node's relative importance in the graph structure using degree centrality, proximity centrality, betweenness centrality, or eigenvector centrality algorithms; combining the feature vector of each node with the centrality index using a preset transformation function to generate a preliminary evaluation value for each node; analyzing the connection strength between the node and its neighboring nodes; adjusting the preliminary evaluation value of each node based on the analysis results to generate a final evaluation value; ranking the nodes representing entities within the target domain based on the final evaluation value of each node; and recommending nodes that meet the recommendation criteria as target objects within the target domain.
2. The knowledge graph-based recommendation method as described in claim 1, characterized in that, Semantic analysis of the knowledge data is performed using a bidirectional LSTM autoencoder to generate semantic vectors for the knowledge data, including: The knowledge data is processed by text segmentation and word embedding to transform the text into fixed-dimensional word vectors; The word vectors are input into the bidirectional LSTM autoencoder, which includes a forward LSTM network and a backward LSTM network. The word vectors are processed sequentially from the beginning to the end of the sentence using a forward LSTM network, and sequentially from the end to the beginning of the sentence using a reverse LSTM network, generating forward hidden state and reverse hidden state respectively. At each time step, the forward hidden state and the reverse hidden state are concatenated to form a bidirectional hidden state containing contextual information. The concatenated bidirectional hidden states are processed by an activation function, and the processed output is concatenated or pooled to generate a global semantic vector. The generated global semantic vector is input into the decoder, and the original input sentence is reconstructed by the decoder. The difference between the decoder output and the original sentence is calculated as the loss value. The model parameters are adjusted based on the loss value using the backpropagation algorithm to optimize the semantic representation capability of the model, and finally a semantic vector reflecting the knowledge data is generated.
3. The knowledge graph-based recommendation method as described in claim 1, characterized in that, By combining the generated semantic vectors, named entity recognition technology, and semantic role labeling technology, entities and relationships between entities are identified from the knowledge data, and triples containing subject, object, and predicate are constructed, including: Based on the generated semantic vectors, a hierarchical clustering algorithm is used to cluster the semantic vectors representing entity names, resulting in multiple name clusters; Named entity recognition technology is used to identify entities that represent the same actual object by performing entity recognition on clustered name clusters. Based on the generated semantic vectors, a hierarchical clustering algorithm is used to cluster the semantic vectors representing the relationships between entities, resulting in multiple relationship clusters; Semantic role labeling technology is used to identify the relationships in the clustered relationship clusters, and relational statements that express the same semantic relationship or have the same syntactic structure are classified into a unified relationship type. Based on the clustered entities and the unified relation type, a triplet containing subject, object and predicate is constructed.
4. The knowledge graph-based recommendation method as described in claim 1, characterized in that, In the knowledge graph, node features are extracted and embedded to generate a feature vector for each node, including: Extract the basic attributes of each node in the knowledge graph, including node type, number of connected edges, degree of the node, and information about neighboring nodes; Set the step size and transition probability of the random walk, and perform multiple random walk operations on each node to generate multiple node sequences. The word2vec method is used to train the generated node sequence using either a skip-gram model or a CBOW model to generate the feature vector for each node.
5. The knowledge graph-based recommendation method as described in claim 1, characterized in that, Training and optimizing the initial graph neural network model to generate the target graph neural network model includes: The mean squared error is used as the loss function to calculate the prediction error of the initial graph neural network model on the training set. Using the calculated prediction error, the model parameters are adjusted using the Adam optimizer through the backpropagation algorithm to minimize the loss function; The model is trained iteratively multiple times, and its performance is evaluated and adjusted using the validation set after each training round. After multiple rounds of training and optimization, an optimized target graph neural network model is finally generated for prediction and recommendation tasks.
6. A recommendation device based on a knowledge graph, characterized in that, The knowledge graph-based recommendation device includes: The data processing and semantic analysis module acquires knowledge data in the target domain, performs semantic analysis on the knowledge data using a bidirectional LSTM autoencoder, and generates semantic vectors for the knowledge data. The entity recognition and relation extraction module, by combining the generated semantic vectors, named entity recognition technology and semantic role labeling technology, identifies entities and the relationships between entities from the knowledge data, and constructs triples containing subject, object and predicate; The knowledge graph construction module constructs a structured knowledge graph based on the triples, extracts and embeds node features in the knowledge graph, and generates a feature vector for each node. The graph neural network construction module combines the feature vectors of each node with the graph structure information in the knowledge graph to build an initial graph neural network model. This includes: multiplying the feature vector of each node with a pre-trained weight matrix to generate a preliminary score for the node, and adjusting the preliminary score based on the graph structure information in the knowledge graph; calculating the weight value of each node and performing non-linear processing through an activation function to obtain the activated weight value; normalizing the activated weight value so that the sum of the weight values of each node is 1, generating a normalized weight vector; using the normalized weight vector and the in-degree of the node to weight-adjust the preliminary score value of the node, generating the final feature representation of the node; and in each layer of the graph neural network, using the final feature representation of the node and the normalized weight vector to control the intensity of information propagation, and aggregating and updating information through network layers, ultimately constructing a complete initial graph neural network model. The graph neural network training module trains and optimizes the initial graph neural network model to generate the target graph neural network model; The target recommendation module, based on the target graph neural network model, scores and ranks nodes representing entities within the target domain. This includes: extracting the final feature representation of each node from the target graph neural network model (the final feature representation is a vector generated through multi-layer network propagation and information aggregation); calculating the centrality index of each node's relative importance in the graph structure using degree centrality, proximity centrality, betweenness centrality, or eigenvector centrality algorithms; combining the feature vector of each node with the centrality index using a preset transformation function to generate a preliminary evaluation value for each node; analyzing the connection strength between the node and its neighbors and adjusting the preliminary evaluation value of each node based on the analysis results to generate a final evaluation value; ranking the nodes representing entities within the target domain based on the final evaluation value of each node; and recommending nodes that meet the recommendation criteria as target objects within the target domain.
7. A computer device, characterized in that, The computer device includes a memory, a processor, and a knowledge graph-based recommendation program stored in the memory and executable on the processor, wherein the knowledge graph-based recommendation program, when executed by the processor, implements the steps of the knowledge graph-based recommendation method as described in any one of claims 1-5.
8. A computer storage medium, characterized in that, The storage medium stores a knowledge graph-based recommendation program, which, when executed by a processor, implements the steps of the knowledge graph-based recommendation method as described in any one of claims 1-5.