A job recommendation method based on knowledge graph and ranking learning
Through the job recommendation method based on the knowledge graph and the improved RankNet sorting learning algorithm, the problems of cold start and outlier sensitivity in the existing technology are solved, and higher recommendation accuracy and stability are achieved.
Patent Information
- Application Number
- CN202210972187.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-12
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2042-08-12
AI Technical Summary
The existing job recommendation algorithm has cold start problems and is sensitive to outliers, which leads to low recommendation accuracy and is difficult to ensure the recommendation effect.
A job recommendation method based on knowledge graph and improved RankNet sorting learning algorithm is adopted. By crawling the job search website data to build a knowledge graph, using the TransE representation learning algorithm to extract user and job feature vectors, compute user-job similarity with cosine similarity, and finally use the improved RankNet algorithm for sorting and recommendation.
It effectively alleviates the cold start problem of traditional recommendation systems, improves the accuracy and stability of recommendations, avoids outlier errors, and enhances the model's prediction ability for single-document correlations.
Smart Images

Figure CN115221415B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of job recommendation, and in particular to a job recommendation method based on knowledge graph and ranking learning. Background Art
[0002] In today's era, due to the rapid development of Internet technology, the Internet has become an important way for people to obtain information and an indispensable part of people's lives. The rapid growth of Internet information has also led to a serious problem of information overload.
[0003] For college graduates, quickly and accurately obtaining the required job information from a large amount of recruitment data has become a major problem that bothers students.
[0004] The job recommendation algorithm is an effective method for filtering job resource information. Currently, the job recommendation algorithms mainly include:
[0005] (1) Content-based recommendation method. This method is one of the basic methods for job recommendation. Its core idea is to recommend jobs that are highly similar to users' interests and preferences. By obtaining the metadata of jobs and users (including attributes, features, historical interests, etc.), the job and user are represented based on the metadata. Based on the feature representation, the similarity between the job features and user preferences is calculated. A high similarity proves that the job matches the user preferences. Finally, the highly similar job is returned as the recommendation result.
[0006] (2) Recommendation method based on collaborative filtering. This method recommends jobs to the current user based on existing user information and job information. This method is mainly divided into three types: user-based collaborative filtering, the main idea is that users with similar historical job access records are also similar, so the similarity between users is calculated, and jobs that similar users are interested in are recommended to users; item-based collaborative filtering, the main idea is that jobs with similar user access records are also similar, so the similarity between jobs is calculated, and jobs similar to the jobs they have visited in the past are recommended to users; model-based collaborative filtering, its typical algorithm is matrix decomposition, by decomposing the user-job interaction rating matrix and then multiplying it to achieve matrix completion, recommending jobs with high user ratings to users.
[0007] (3) Hybrid recommendation method The core idea of this method is to combine several personalized recommendation methods to recommend knowledge points. Among the hybrid recommendation methods, the most popular one is to combine collaborative filtering and content-based recommendation methods. The simplest way is to obtain a recommended sequence of knowledge points by using collaborative filtering recommendation method and content-based method respectively, and then combine the two recommendation methods according to certain principles to generate the final knowledge point recommendation result.
[0008] Method (1) is basic and easy to understand. It is easy to implement for simple recommendations that do not require high relevance. However, it has high requirements for the information that needs to be collected on positions and users. For most ordinary users, their user attribute information is mostly missing, which leads to inaccurate recommended positions and serious user cold start problems. Method (2) relies on the historical interaction rating matrix of users and positions. It obtains unknown user-position interaction scores through user or position similarity to achieve recommendations, avoiding information acquisition and feature extraction of users and positions, but also ignores the consideration of user and position characteristics. There are deviations in the prediction of user preferences. At the same time, the user's rating behavior is difficult to obtain, and there are serious data sparsity and cold start problems. Method (3) can solve the cold start problem of knowledge points, but it still cannot solve the cold start problem of learners and data sparsity problems.
[0009] Due to the existing recommendation algorithms, there are cold start problems, and the recommendation accuracy is not high due to the problem of sensitivity to outliers when matching text similarity, so that the final recommendation effect is difficult to guarantee. Therefore, how to avoid the accuracy and cold start problems of recommendations is one of the urgent problems that need to be solved now. In this regard, the present invention provides a job recommendation method based on knowledge graph and ranking learning. The knowledge graph constructed based on the graph database can flexibly and accurately represent the job domain knowledge. The improved RankNet ranking algorithm can effectively accelerate the convergence speed of the algorithm, making the recommendation results more accurate and robust. Summary of the invention
[0010] Purpose of the invention: In view of the problems existing in the prior art, the present invention provides a job recommendation method based on knowledge graph and ranking learning, which constructs a knowledge graph based on a graph database and an improved RankNet ranking algorithm to achieve faster algorithm convergence speed and high-precision job recommendation.
[0011] Technical solution: The present invention provides a job recommendation method based on knowledge graph and ranking learning, comprising the following steps:
[0012] Step 1: Crawl job search websites to obtain user and job data, and construct a knowledge graph in the form of triples based on the obtained user and job data;
[0013] Step 2: Mining the knowledge graph through knowledge representation learning, vectorizing the triple information of the knowledge graph, and obtaining the user feature vector z user and position feature vector z post ;
[0014] Step 3: Use the cosine similarity method to measure the semantic similarity between the user feature vector and the job feature vector to obtain the user-job similarity set;
[0015] Step 4: Define the obtained similarity set and feature vector as document feature x and input them into the sorting model for training. The sorting model is trained by a neural network. The positions in the position set are sorted for the user based on the sorting model to obtain a Top-K recommendation list. The neural network is an improved RankNet sorting learning algorithm, which constructs a new loss function, specifically:
[0016] The cross entropy loss function is: C ij =-P ij logP ij -(1-P ij )log(1-P ij ), where P ij is the probability that document i is ranked before document j;
[0017] The constructed point-level loss formula is as follows:
[0018]
[0019] Among them, x t is the input document feature, f(x t ) is the predicted score of the document, y is the actual score of the document, and a is obtained by subtracting the actual score from the predicted score;
[0020] The new loss function formula constructed is as follows: The size of the weight k of the loss function is determined by the validation set.
[0021] Furthermore, the specific method of step 1 is:
[0022] Step 1.1: The user and position data include position information, user resume information and other data related to the position and the user;
[0023] Step 1.2: Structural processing is performed on the collected user and position data, and knowledge is extracted from the processed data, including the extraction of entities and their attributes, and the extraction of relations and relation attributes;
[0024] Step 1.3: Construct user information knowledge graph and job information knowledge graph based on the acquired entities and relationships, and store the constructed knowledge graph in the Neo4j graph database.
[0025] Furthermore, the specific method of step 2 is:
[0026] Step 2.1: Extract feature vectors from the content of the knowledge graph by using the TransE representation learning algorithm;
[0027] Step 2.2: Consider the user and job knowledge graph as a set of triples {z user , l, f} and {z post , l, f} and input them into the TransE model to randomly generate vectors of arbitrary dimensions to simulate this triple, where z user represents the user, z post represents a position, l represents a relationship, and f represents the tail entity;
[0028] Step 2.3: Shuffle the training data to generate positive example triplets and negative example triplets to form new training data;
[0029] Step 2.4: Calculate the loss function and use the gradient descent method to batch update the previously randomly generated vectors to obtain the user vector z user and position vector z post .
[0030] Furthermore, the specific method of step 3 is:
[0031] Step 3.1: Calculate the user feature vector z by using cosine similarity user and position feature vector z post The similarity matrix W(z)=sim(z user , z post );
[0032] Step 3.2: The obtained similarity matrix W(z) is further used to generate a data set D = sim(z user , z post ) as the training set for the learning-to-rank model.
[0033] Furthermore, the specific method of step 4 is:
[0034] Step 4.1: Use the improved RankNet ranking learning algorithm to train a ranking model, where the model trains a function f(x, w) for calculating a score for a document, where x is the input feature of the document and w is a parameter of the ranking model;
[0035] Step 4.2: Calculate the score s of document i and document j according to the scoring function f(x, w) i =f(x i , w), s j =f(x j , w); then the probability that document i is ranked before document j is:
[0036] The true probability that document i is ranked before document j is:
[0037] Step 4.3: Construct a new loss function for the RankNet algorithm and use this loss function to measure P ij right The degree of fit;
[0038] Step 4.4: Implement the RankNet algorithm using a three-layer neural network model. The input layer is the features of the sample, and the output layer is the score of the sample. The ranking function can be defined as:
[0039]
[0040] Among them, x is the input document feature; g i represents the transfer function of the i-th layer; w and v are the weights of the neurons from the hidden layer to the output layer and the weights of the neurons from the input layer to the hidden layer, respectively; b and b j Indicates the bias value after the hidden layer to the output layer neurons are superimposed and the bias after the input layer to the hidden layer neurons are superimposed;
[0041] Step 4.5: After calculating using the gradient descent method, we get the following relationship:
[0042] Step 4.6: The improved loss function is used to calculate the parameter v between the input layer and the hidden layer. ij Derivative, and then update the iterative model:
[0043]
[0044] Where Δv ij The i and j in the input layer represent the i-th node and the j-th node of the hidden layer, respectively. The parameters w of the hidden layer and the output layer are j Derivative, Δw j for:
[0045]
[0046] Update all weights v, w of the network: v = v-ηΔv, w = w-ηΔw;
[0047] Step 4.7: During the algorithm iteration process, the values of v and w are constantly modified in order to obtain the minimum loss function. Finally, the obtained similarity set W(z) and feature vector z are obtained. user and z post The ranking model is put into training to obtain the user-position score f(x), and then the final Top-K recommendation list is obtained.
[0048] Beneficial effects:
[0049] The present invention constructs user information knowledge graphs and job information knowledge graphs based on graph databases, while taking into account the semantic information between users and recommended content, thereby improving the utilization rate of human and job data and effectively alleviating the cold start problem of traditional recommendation systems. The present invention also avoids the problem of large errors in the original model for abnormal points by constructing a new loss function based on ranking learning as the basic model, while increasing the model's prediction of the correlation between single documents, thereby greatly improving the stability and accuracy of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 Flowchart of the job recommendation method based on knowledge graph and ranking learning;
[0051] Figure 2 This is the architecture diagram of the job recommendation method based on knowledge graph and ranking learning;
[0052] Figure 3 Schematic diagram of the 3-layer neural network of the ranking learning model. DETAILED DESCRIPTION
[0053] The present invention is further described in detail below in conjunction with the accompanying drawings:
[0054] like Figure 1 As shown, the present invention proposes a job recommendation method based on knowledge graph and ranking learning, which specifically includes the following steps:
[0055] Step 1: Crawl job search websites to obtain user and job data, and construct a knowledge graph in the form of triples based on the obtained user and job data:
[0056] Step 1.1: The user and position data include position information, user resume information and other data related to the position and the user.
[0057] Step 1.2: Structural processing is performed on the collected user and job data, and knowledge is extracted from the processed data, including the extraction of entities and their attributes, and the extraction of relations and relation attributes.
[0058] Step 1.3: Construct user information knowledge graph and job information knowledge graph based on the acquired entities and relationships, and store the constructed knowledge graph in the Neo4j graph database.
[0059] Step 2: Mining the knowledge graph through knowledge representation learning methods, vectorizing the triple information of the knowledge graph, and obtaining user feature vectors and job feature vectors:
[0060] Step 2.1: Extract feature vectors from the content of the knowledge graph by using the TransE representation learning algorithm.
[0061] Step 2.2: Consider the user and job knowledge graph as a set of triples {z user , l, f} and {z post , l, f} and input them into the TransE model to randomly generate vectors of arbitrary dimensions to simulate this triple, where z user represents the user, z post represents a position, l represents a relationship, and f represents the tail entity.
[0062] Step 2.3: Shuffle the training data to generate positive example triplets and negative example triplets to form new training data.
[0063] Step 2.4: Calculate the loss function and use the gradient descent method to batch update the previously randomly generated vectors to obtain the user vector z user and position vector z post .
[0064] Step 3: Use the cosine similarity method to measure the semantic similarity between the user feature vector and the job feature vector, and obtain the user-job similarity set:
[0065] Step 3.1: Calculate the user feature vector z by using cosine similarity user and position feature vector z post The similarity matrix W(z)=sim(z user , z post );
[0066] Step 3.2: The obtained similarity matrix W(z) is further used to generate a data set D = sim(z user , z post ) as the training set for the learning-to-rank model.
[0067] Step 4: Figure 2 As shown, the ranking model is trained through a neural network, and the obtained similarity set and feature vector are defined as document feature x as a whole and input into the ranking model for training. Based on the ranking model, the positions in the position set are ranked for the user to obtain the Top-K recommendation list:
[0068] Step 4.1: Use the improved RankNet ranking learning algorithm to train a ranking model, where the model trains a function f(x, w) for calculating a score for a document, where x is the input feature of the document and w is a parameter of the ranking model.
[0069] Step 4.2: Calculate the score s of document i and document j according to the scoring function f(x, w) i =f(x i , w), s j =f(x j, w); then the probability that document i is ranked before document j is:
[0070] The true probability that document i is ranked before document j is:
[0071] Step 4.3: Construct a new loss function for the RankNet algorithm and use this loss function to measure p ij right The degree of fitting, the cross entropy loss function is: C ij =-P ij logP ij -(1-P ij )log(1-P ij ), where P ij is the probability that document i is ranked before document j.
[0072] The constructed point-level loss formula is as follows:
[0073]
[0074] Among them, f(x t ) is the predicted score of the document, y is the actual score of the document, and a is obtained by subtracting the actual score from the predicted score.
[0075] The new loss function formula constructed is as follows: The size of the weight k of the loss function is determined by the validation set.
[0076] Step 4.4: If Figure 3 As shown in the figure, the RankNet algorithm is implemented using a three-layer neural network model. The input layer is the features of the sample, and the output layer is the score of the sample. The ranking function can be defined as:
[0077]
[0078] Among them, x is the input document feature; g i represents the transfer function of the i-th layer; w and v are the weights of the neurons from the hidden layer to the output layer and the weights of the neurons from the input layer to the hidden layer, respectively; b and b j It represents the bias value after the hidden layer neurons are superimposed to the output layer neurons and the bias value after the input layer neurons are superimposed to the hidden layer neurons.
[0079] After calculation using the gradient descent method, the following relationship is obtained:
[0080] The improved loss function is the parameter v between the input layer and the hidden layer ij Derivative, and then update the iterative model:
[0081]
[0082] Where Δv ij The i and j in the y denote the i-th node of the input layer and the j-th node of the hidden layer. j Derivative, Δw j for:
[0083]
[0084] Update all weights v, w of the network: v = v-ηΔv, w = w-ηΔw;
[0085] During the algorithm iteration process, the values of v and w are constantly modified in order to obtain the minimum loss function.
[0086] Finally, the obtained similarity set W(u) and feature vector u m and x n The ranking model is put into training to obtain the user-position score f(x), and then the final Top-K recommendation list is obtained.
[0087] The above embodiments are only for illustrating the technical concept and features of the present invention, and their purpose is to enable people familiar with the technology to understand the content of the present invention and implement it accordingly, and they cannot be used to limit the protection scope of the present invention. Any equivalent transformation or modification made according to the spirit of the present invention should be included in the protection scope of the present invention.
Claims
1. A job recommendation method based on knowledge graph and ranking learning, characterized in that: The following steps are involved: Step 1: Crawl job search websites to obtain user and job data, and construct a knowledge graph in the form of triples based on the obtained user and job data; Step 2: Mining the knowledge graph through knowledge representation learning, vectorizing the triple information of the knowledge graph, and obtaining the user feature vector z user and position feature vector z post ; Step 2.1: Extract feature vectors from the content of the knowledge graph by using the TransE representation learning algorithm; Step 2.2: Consider the user and job knowledge graph as a set of triples {z user ,l,f} and {z post ,l,f} and input them into the TransE model to randomly generate vectors of any dimension to simulate this triple, where z user represents the user, z post represents a position, l represents a relationship, and f represents the tail entity; Step 2.3: Shuffle the training data to generate positive example triplets and negative example triplets to form new training data; Step 2.4: Calculate the loss function and use the gradient descent method to batch update the previously randomly generated vectors to obtain the user vector z user and position vector z post ; Step 3: Use the cosine similarity method to measure the semantic similarity between the user feature vector and the job feature vector to obtain the user-job similarity set; Step 3.1: Calculate the user feature vector z by using cosine similarity user and position feature vector z post The similarity matrix W(z)=sim(z user ,z post ); Step 3.2: The obtained similarity matrix W(z) is further used to generate a data set D = sim(z user ,z post ) as the training set for the ranking learning model; Step 4: Define the obtained similarity set and feature vector as document feature x and input them into the sorting model for training. The sorting model is trained by a neural network. The positions in the position set are sorted for the user based on the sorting model to obtain a Top-K recommendation list. The neural network is an improved RankNet sorting learning algorithm, which constructs a new loss function, specifically: The cross entropy loss function is: C ij =-P ij logP ij -(1-P ij )log(1-P ij ), where P ij is the probability that document i is ranked before document j; The constructed point-level loss formula is as follows: Among them, x t is the input document feature, f(x t ) is the predicted score of the document, y is the actual score of the document, and a is obtained by subtracting the actual score from the predicted score; The new loss function formula constructed is as follows: The size of the weight k of the loss function is determined by the validation set.
2. The job recommendation method based on knowledge graph and ranking learning according to claim 1 is characterized in that: The specific method of step 1 is: Step 1.1: The user and position data include position information, user resume information and other data related to the position and the user; Step 1.2: Structural processing is performed on the collected user and position data, and knowledge is extracted from the processed data, including the extraction of entities and their attributes, and the extraction of relations and relation attributes; Step 1.3: Construct user information knowledge graph and job information knowledge graph based on the acquired entities and relationships, and store the constructed knowledge graph in the Neo4j graph database.
3. The job recommendation method based on knowledge graph and ranking learning according to claim 1 is characterized in that: The specific method of step 4 is: Step 4.1: Use the improved RankNet ranking learning algorithm to train a ranking model, where the model trains a function f(x,w) for calculating a score for a document, where x is the input feature of the document and w is a parameter of the ranking model; Step 4.2: Calculate the score s of document i and document j according to the scoring function f(x,w) i =f(x i ,w),s j =f(x j ,w); then the probability that document i is ranked before document j is: The true probability that document i is ranked before document j is: Step 4.3: Construct a new loss function for the RankNet algorithm and use this loss function to measure P ij right The degree of fit; Step 4.4: Implement the RankNet algorithm using a three-layer neural network model. The input layer is the features of the sample, and the output layer is the score of the sample. The ranking function can be defined as: Among them, x is the input document feature; g i represents the transfer function of the i-th layer; w and v are the weights of the neurons from the hidden layer to the output layer and the weights of the neurons from the input layer to the hidden layer, respectively; b and b j Indicates the bias value after the hidden layer to the output layer neurons are superimposed and the bias after the input layer to the hidden layer neurons are superimposed; Step 4.5: After calculating using the gradient descent method, we get the following relationship: Step 4.6: The improved loss function is used to calculate the parameter v between the input layer and the hidden layer. ij Derivative, and then update the iterative model: Where Δv ij The i and j in the input layer represent the i-th node and the j-th node of the hidden layer, respectively. The parameters w of the hidden layer and the output layer are j Derivative, Δw j for: Update all weights v, w of the network: v = v-ηΔv, w = w-ηΔw; Step 4.7: During the algorithm iteration process, the values of v and w are constantly modified in order to obtain the minimum loss function. Finally, the obtained similarity set W(z) and feature vector z are obtained. user and z post The ranking model is put into training to obtain the user-position score f(x), and then the final Top-K recommendation list is obtained.
Citation Information
Patent Citations
Method of and system for building search index using machine learning algorithm
US20200192920A1