An item recommendation method, device, system, and storage medium

By combining the TransH model and multilayer perceptron to train and analyze knowledge graph triples, the problem of low accuracy in existing recommendation methods is solved, achieving more accurate and diverse user preference recommendations and improving the accuracy and robustness of recommendations.

CN116415073BActive Publication Date: 2026-03-24GUILIN UNIV OF ELECTRONIC TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-23
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Existing recommendation methods cannot achieve more accurate, interpretable, and diverse user preference recommendations, and there is a conflict between data noise and data diversity, resulting in low recommendation accuracy.

Method used

The original knowledge graph triples are trained using the TransH model. By combining the scoring function, parameter update, initialization processing, multilayer perceptron analysis, and target loss function, the target TransH model and multilayer perceptron are obtained for project recommendation.

Benefits of technology

It enables more accurate, interpretable, and diverse user preference recommendations, mitigating the conflict between data noise and data diversity, and improving the accuracy and robustness of recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116415073B_ABST
    Figure CN116415073B_ABST
Patent Text Reader

Abstract

The application provides a project recommendation method, device, system and storage medium, and belongs to the field of item recommendation. The method comprises the following steps: training original knowledge graph triples by using a TransH model to obtain a scoring function; performing parameter update analysis on the TransH model according to the scoring function to obtain an initial loss function and an updated TransH model; and performing initialization processing on the original knowledge graph triples by using the updated TransH model to obtain an initialized project node vector, an initialized user node vector and an initialized relationship vector. The application realizes more accurate, interpretable and diversified user preference recommendation, alleviates the conflict between data noise and data diversity, and improves the accuracy and robustness of recommendation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates primarily to the field of item recommendation technology, specifically to an item recommendation method, apparatus, system, and storage medium. Background Technology

[0002] With the explosive growth of internet usage, recommendation methods have been widely deployed in real-life applications such as Twitter and Weibo to provide personalized recommendation services while addressing information overload. Recommendation methods aim to predict user preferences based on user-item interactions and by uncovering hidden higher-order relationships between users and items. However, existing recommendation methods fail to achieve more accurate, interpretable, and diverse user preference recommendations, and conflicts exist between data noise and data diversity, resulting in low accuracy. Summary of the Invention

[0003] The technical problem to be solved by the present invention is to provide a project recommendation method, apparatus, system and storage medium to address the shortcomings of the prior art.

[0004] The technical solution of this invention to solve the above-mentioned technical problems is as follows: A project recommendation method, comprising the following steps:

[0005] Multiple original knowledge graph triples are imported, and the TransH model is used to train each of the original knowledge graph triples to obtain the scoring function of each of the original knowledge graph triples.

[0006] Based on the scoring functions of all the original knowledge graph triples, the TransH model is analyzed for parameter updates to obtain the initial loss function and the updated TransH model.

[0007] The updated TransH model is used to initialize each of the original knowledge graph triples to obtain the initialized knowledge graph triples of each of the original knowledge graph triples. The initialized knowledge graph triples include an initialized item node vector, an initialized user node vector corresponding to the initialized item node vector, and an initialized relation vector.

[0008] By using a multilayer perceptron, the initial item node vectors of each original knowledge graph triple and the initial relation vectors corresponding to each initial item node vector are analyzed to obtain the target item node vectors of each original knowledge graph triple.

[0009] The probability values ​​of each original knowledge graph triplet are obtained by calculating the probability values ​​of the target item node vector of each original knowledge graph triplet and the initial user node vector corresponding to each initial item node vector.

[0010] The target loss function is obtained by analyzing the initial loss function and the probability values ​​of all the original knowledge graph triples.

[0011] The parameters of the updated TransH model and the multilayer perceptron are updated according to the target loss function to obtain the target TransH model and the target multilayer perceptron.

[0012] Import the triples of the knowledge graph to be recommended, and use the target TransH model and the target multilayer perceptron to recommend items to the triples of the knowledge graph to be recommended, and obtain the item recommendation results.

[0013] Another technical solution of the present invention to solve the above-mentioned technical problems is as follows: A project recommendation device, comprising:

[0014] The model training module is used to import multiple original knowledge graph triples and use the TransH model to train each of the original knowledge graph triples to obtain the scoring function of each of the original knowledge graph triples.

[0015] The parameter update analysis module is used to perform parameter update analysis on the TransH model based on the scoring function of all the original knowledge graph triples, so as to obtain the initial loss function and the updated TransH model.

[0016] An initialization module is used to initialize each of the original knowledge graph triples using the updated TransH model, to obtain an initialized knowledge graph triple for each of the original knowledge graph triples. The initialized knowledge graph triple includes an initialized item node vector, an initialized user node vector corresponding to the initialized item node vector, and an initialized relation vector.

[0017] The vector analysis module is used to analyze the initial item node vectors of each original knowledge graph triple and the initial relation vectors corresponding to each initial item node vector using a multilayer perceptron, so as to obtain the target item node vectors of each original knowledge graph triple.

[0018] The probability value calculation module is used to calculate the probability value of each original knowledge graph triple based on the target item node vector of each original knowledge graph triple and the initial user node vector corresponding to each initial item node vector.

[0019] The loss function analysis module is used to analyze the target loss function based on the initial loss function and the probability values ​​of all the original knowledge graph triples, and obtain the target loss function.

[0020] The parameter update module is used to update the parameters of the updated TransH model and the multilayer perceptron according to the target loss function, so as to obtain the target TransH model and the target multilayer perceptron.

[0021] The recommendation result acquisition module is used to import the triples of the knowledge graph to be recommended, and use the target TransH model and the target multilayer perceptron to recommend items to the triples of the knowledge graph to be recommended, thereby obtaining the item recommendation results.

[0022] Based on the above-mentioned project recommendation method, the present invention also provides a project recommendation system.

[0023] Another technical solution of the present invention to solve the above-mentioned technical problems is as follows: a project recommendation system, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the project recommendation method described above is implemented.

[0024] Based on the above-mentioned project recommendation method, the present invention also provides a computer-readable storage medium.

[0025] Another technical solution of the present invention to solve the above-mentioned technical problems is as follows: a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the project recommendation method as described above.

[0026] The beneficial effects of this invention are as follows: By training the original knowledge graph triples using the TransH model, a scoring function is obtained. Based on the scoring function, the parameters of the TransH model are updated and analyzed to obtain the initial loss function and the updated TransH model. The updated TransH model is used to initialize the original knowledge graph triples to obtain the initial item node vector, the initial user node vector, and the initial relation vector. The target item node vector is obtained by analyzing the initial item node vector and the initial relation vector using a multilayer perceptron. The probability value is obtained by calculating the probability values ​​of the target item node vector and the initial user node vector. The target loss function is obtained by analyzing the initial loss function and the target loss function of the probability value. The parameters of the updated TransH model and the multilayer perceptron are updated based on the target loss function to obtain the target TransH model and the target multilayer perceptron. The item recommendation result is obtained by using the target TransH model and the target multilayer perceptron to recommend the knowledge graph triples to be recommended. This achieves more accurate, interpretable, and diverse user preference recommendations, alleviates the conflict between data noise and data diversity, and improves the accuracy and robustness of the recommendation. Attached Figure Description

[0027] Figure 1 A flowchart illustrating a project recommendation method provided in an embodiment of the present invention;

[0028] Figure 2 This is a module block diagram of a project recommendation device provided in an embodiment of the present invention. Detailed Implementation

[0029] The principles and features of the present invention are described below with reference to the accompanying drawings. The examples given are only for explaining the present invention and are not intended to limit the scope of the present invention.

[0030] Figure 1 This is a flowchart illustrating a project recommendation method provided in an embodiment of the present invention.

[0031] like Figure 1 As shown, a project recommendation method includes the following steps:

[0032] Multiple original knowledge graph triples are imported, and the TransH model is used to train each of the original knowledge graph triples to obtain the scoring function of each of the original knowledge graph triples.

[0033] Based on the scoring functions of all the original knowledge graph triples, the TransH model is analyzed for parameter updates to obtain the initial loss function and the updated TransH model.

[0034] The updated TransH model is used to initialize each of the original knowledge graph triples to obtain the initialized knowledge graph triples of each of the original knowledge graph triples. The initialized knowledge graph triples include an initialized item node vector, an initialized user node vector corresponding to the initialized item node vector, and an initialized relation vector.

[0035] By using a multilayer perceptron, the initial item node vectors of each original knowledge graph triple and the initial relation vectors corresponding to each initial item node vector are analyzed to obtain the target item node vectors of each original knowledge graph triple.

[0036] The probability values ​​of each original knowledge graph triplet are obtained by calculating the probability values ​​of the target item node vector of each original knowledge graph triplet and the initial user node vector corresponding to each initial item node vector.

[0037] The target loss function is obtained by analyzing the initial loss function and the probability values ​​of all the original knowledge graph triples.

[0038] The parameters of the updated TransH model and the multilayer perceptron are updated according to the target loss function to obtain the target TransH model and the target multilayer perceptron.

[0039] Import the triples of the knowledge graph to be recommended, and use the target TransH model and the target multilayer perceptron to recommend items to the triples of the knowledge graph to be recommended, and obtain the item recommendation results.

[0040] It should be understood that the knowledge graph triple (h,r,t) (i.e., the original knowledge graph triple) is processed using the TransH model to obtain the entity and relation embeddings (i.e., the initialized item node vector and the initialized relation vector).

[0041] Specifically, the prediction layer calculates the cosine similarity between the user (i.e., the initialized user node vector) and the entity embedding (i.e., the target item node vector) to obtain a probability (i.e., the probability value), which represents how likely the user is to interact with the corresponding entity.

[0042] Specifically, the relevant symbols are defined as follows:

[0043] The relevant user set U = {u1, u2, u3, ..., u} n} indicates that there are n users in total.

[0044] Related item set I = {i1, i2, i3, ..., i} m} indicates that there are m items.

[0045] User-project interaction matrix IY = {y ui |u∈U,i∈I}, where when y ui =1 indicates observable user-project feedback, y ui =0 indicates no user-project feedback.

[0046] A knowledge graph G, G = (E, R), where E represents an entity, the head entity h and the tail entity w both belong to E, and the relation r ∈ R.

[0047] In the above embodiments, a scoring function is obtained by training the original knowledge graph triples using the TransH model. An initial loss function and an updated TransH model are obtained by analyzing the parameters of the TransH model based on the scoring function. The updated TransH model is then used to initialize the original knowledge graph triples, resulting in initial item node vectors, initial user node vectors, and initial relation vectors. A multilayer perceptron is used to analyze the target item node vectors of the initialized item node vectors and initial relation vectors, yielding the target item node vector. Probability values ​​are calculated based on the probability values ​​of the target item node vector and the initialized user node vector. A target loss function is obtained by analyzing the initial loss function and the target loss function based on the probability values. The parameters of the updated TransH model and the multilayer perceptron are updated based on the target loss function, resulting in the target TransH model and the target multilayer perceptron. Finally, the target TransH model and the target multilayer perceptron are used to recommend items from the knowledge graph triples to be recommended, achieving more accurate, interpretable, and diverse user preference recommendations. This alleviates the conflict between data noise and data diversity, improving the accuracy and robustness of the recommendations.

[0048] Optionally, as an embodiment of the present invention, the original knowledge graph triple includes a first original item node vector and a second original item node vector;

[0049] The process of training each of the original knowledge graph triples using the TransH model to obtain the scoring function for each of the original knowledge graph triples includes:

[0050] Map each of the first original project node vectors to a hyperplane to obtain the first mapping vector of each of the first original project node vectors;

[0051] Mapping each of the second original project node vectors onto a hyperplane yields a second mapping vector for each of the second original project node vectors.

[0052] Based on the first formula, the first scoring function is calculated according to the first mapping vector of each of the first original project node vectors and the second mapping vector of each of the second original project node vectors, to obtain the first scoring function of each of the original knowledge graph triples. The first formula is:

[0053] f r (h,t)=h ⊥ +d r -t ⊥ ,

[0054] Among them, f r (h,t) is the first scoring function, h ⊥ Let t be the first mapping vector. ⊥ Let d be the second mapping vector. r It is a translation vector on the plane;

[0055] Each of the original knowledge graph triples is randomly replaced to obtain the replaced knowledge graph triples, which include a first replaced item node vector and a second replaced item node vector.

[0056] The first replacement item node vector of each original knowledge graph triple is mapped onto a hyperplane to obtain the first mapped replacement item node vector of each original knowledge graph triple.

[0057] The second replacement item node vector of each of the original knowledge graph triples is mapped onto a hyperplane to obtain the second mapped replacement item node vector of each of the original knowledge graph triples.

[0058] Based on the second formula, the second scoring function is calculated according to the first and second mappings of the original knowledge graph triples, resulting in the second scoring function for each of the original knowledge graph triples. The second formula is:

[0059] f r′ (h′,t′)=h′ ⊥ +d r -t′ ⊥ ,

[0060] Among them, f r′ (h′,t′) is the second scoring function, h′ ⊥ Replace the project node vector after the first mapping, t′ ⊥ Replace the project node vector after the second mapping, d r It is a translation vector on the plane;

[0061] The scoring function of the original knowledge graph triple includes the first scoring function and the second scoring function of the original knowledge graph triple.

[0062] It should be understood that the TransH model is used to process the triples (h,r,t) (i.e., the original knowledge graph triples) to obtain the initial embeddings of entities and relations (i.e., the initial item node vector and the initial relation vector). The specific algorithm implementation is as follows:

[0063] For a triple, we need to map h (i.e., the first original item node vector) and t (i.e., the second original item node vector) onto the relation hyperplane to obtain the projection vector h. ⊥ (i.e., the first mapping vector) and t ⊥ (i.e., the second mapping vector), the specific formula is as follows:

[0064]

[0065]

[0066] Where ω r Represents the normal vector of a plane. This represents the transpose of the plane normal vector.

[0067] The scoring function is defined as follows:

[0068]

[0069] f r (h,t)=h ⊥ +d r -t ⊥

[0070] Where, d r h represents a translation vector on the plane. ⊥ and t ⊥ The projection vectors mentioned above indicate that a higher score is given if the relationships between the triples are correct, and a lower score is given if the relationships are incorrect.

[0071] In the above embodiments, the TransH model is used to train the original knowledge graph triples to obtain a scoring function. The scoring function can intuitively show whether the relationship between the triples is correct, laying the foundation for subsequent data processing and realizing more accurate, interpretable and diversified user preference recommendations.

[0072] Optionally, as an embodiment of the present invention, the process of performing parameter update analysis on the TransH model based on the scoring function of all the original knowledge graph triples to obtain the initial loss function and the updated TransH model includes:

[0073] Based on the third equation, the initial loss function is calculated using the first and second scoring functions of all the original knowledge graph triples, resulting in the initial loss function. The third equation is:

[0074]

[0075] in, Let f be the initial loss function. r (h,t) is the first scoring function, f r′ (h′,t′) is the second scoring function, S is the set of original knowledge graph triples, S′ is the set of replaced knowledge graph triples, and γ is the margin value.

[0076] The parameters of the TransH model are updated based on the initial loss function to obtain the updated TransH model.

[0077] It should be understood that, in order to achieve the initialization effect, the TransH model must be trained, and the model loss function is defined as follows:

[0078]

[0079] Where S represents the set of correct triples (i.e., the original knowledge graph triple set), S′ represents the set of negative examples (i.e., the replaced knowledge graph triple set), and γ is the margin value, used to distinguish between positive and negative examples.

[0080] In the above embodiments, the TransH model is analyzed by parameter update based on the scoring function of all original knowledge graph triples to obtain the initial loss function and the updated TransH model. By using the knowledge graph as auxiliary information, more accurate, interpretable and diversified user preference recommendations are achieved.

[0081] Optionally, as an embodiment of the present invention, the initialization of the project node vector includes a first initialization of the project node vector and a second initialization of the project node vector;

[0082] The process of using a multilayer perceptron to analyze the initial item node vectors of each of the original knowledge graph triples and the initial relation vectors corresponding to each of the initial item node vectors to obtain the target item node vectors of each of the original knowledge graph triples includes:

[0083] Based on the fourth equation, attention weights are calculated according to the first initial item node vector, the second initial item node vector, and the initial relation vector corresponding to each of the original knowledge graph triples. The fourth equation is as follows:

[0084] α(h″, r, t″)=softmax(α′(h″, r, t″)),

[0085] Among them, α′(h″, r, t″) = (ω r e t ) T tanh((ω r e h +e r ));

[0086] Based on the fifth equation, the item neighbor node vectors are calculated according to the attention weights of each of the original knowledge graph triples and the second initial item node vector, to obtain the item neighbor node vectors of each of the original knowledge graph triples. Then, all the item neighbor node vectors are combined to obtain the item neighbor node set. The fifth equation is:

[0087] e′ h =α(h″,r,t″)e t ,

[0088] Based on the sixth equation, the target item node vector is calculated according to the set of neighboring nodes of the item, the second initial item node vector of each original knowledge graph triple, and the attention weight, to obtain the target item node vector of each of the original knowledge graph triples. The sixth equation is:

[0089]

[0090] Among them, f use (α(h″,r,t″),e t,* |e t ) represents the target project node vector, * represents the set of neighboring project nodes, and W and Both are weight parameters, b and b f All are biased, ⊙ is the inner product operator, || is the conjunction operator, and e′ h Let α(h″, r, t″) be the neighbor node vector of the project, and e be the attention weight. t The second initialization item node vector is used, where softmax and tanh are both non-linear activation functions, α′(h″, r, t″) is the attention score, and e r To initialize the relation vector, e h Initialize the first project node vector, ωr It is the plane normal vector.

[0091] It should be understood that a new gating mechanism is used to process neighborhood entities, and the processed neighborhood nodes (i.e., the set of neighboring nodes of the project) are input into the aggregation layer.

[0092] Specifically, the aggregation layer completes the fusion of information through an aggregation strategy. The information includes historical interaction entities and processed neighboring nodes (i.e., the set of neighboring nodes of the project). The aggregated information is input into the MLP (Multilayer Perceptron) to obtain the final embedded representation of the entity (i.e., the target project node vector), and the entity embedding is transmitted to the prediction layer.

[0093] It should be understood that the formula for calculating attention weights is as follows:

[0094] α′(h, r, t)=(ω) r e t ) T tanh((ω r e h +e r ))

[0095] α(h, r, t)=softmax(α′(h, r, t))

[0096] Where, ω r Represents the embedding of plane normal vectors, e h e r e t These represent the head entity (i.e., the first initialized item node vector), the entity relationship (i.e., the initialized relationship vector), and the user embedding (i.e., the second initialized item node vector), respectively. tanh and softmax are both non-linear activation functions.

[0097] Specifically, a gated attention mechanism is used to aggregate neighbor information, and the information aggregation formula is as follows:

[0098] e′ h =g ω (h, r, t) = α(h, r, t)e t

[0099] Where α(h, r, t) represents the attention weight, represents the importance of the tail node t (i.e., t″) to r and h (i.e., h″), G is the set of triples in the knowledge graph (i.e., the initial knowledge graph triples), e h and e t These represent the embeddings of the head node (i.e., the first initialized item node vector) and the tail node (i.e., the second initialized item node vector), respectively.

[0100] It should be understood that each user's preferences can be learned from their historical set of interaction entities and the set of neighboring entities connected to the entity in the knowledge graph.

[0101] Specifically, after the aggregation layer, the aggregated information is passed to the MLP (Multilayer Perceptron) to fuse the aggregated information and adjust and update the interactive item embeddings (i.e., the target item node vectors) embedded in the metric space. The specific formula is as follows:

[0102]

[0103] Where * represents the set of neighboring nodes of the project (i.e., the set of neighboring nodes of the project), W and These are all weight parameters of the neurons, b f b represents the bias in the neuron, ⊙ is the inner product operator, || is the conjunction operator, and f use (α(h, r, t), e) t,* |e t (i.e., the fuse(α(h″,r,t″), e) t,* |e t )) indicates that project features and project embeddings are aggregated into a single vector.

[0104] In the above embodiments, the target item node vector is obtained by analyzing the target item node vector of the initialized item node vector and the target item node vector of the initialized relation vector using a multilayer perceptron. This allows the user's preferences to be learned from the historical interaction entity set and the set of neighboring entities connected to the entity in the knowledge graph, thereby improving the utilization of the dataset and the accuracy of the recommendation.

[0105] Optionally, as an embodiment of the present invention, the process of calculating the probability value of each of the original knowledge graph triples based on the target item node vector of each of the original knowledge graph triples and the initial user node vector corresponding to each of the initial item node vectors includes:

[0106] Project the target item node vectors of each of the original knowledge graph triples to obtain the projected item node vectors of each of the original knowledge graph triples.

[0107] Based on the seventh equation, the probability values ​​of each original knowledge graph triple are calculated by using the projected item node vectors of each original knowledge graph triple and the initialized user node vectors corresponding to each initialized item node vector. The seventh equation is:

[0108]

[0109] in, Let u be the probability value between the k-th initial user node vector and the i-th target item node vector. k To initialize the user node vector, e i is the project node vector after projection, n is the number of target project node vectors, and m is the number of initial user node vectors.

[0110] It should be understood that most other recommendation algorithms assume that user and item embeddings are in the same space, directly performing an inner product of the user embedding and item embedding to obtain the recommendation result. However, these two actually belong to embeddings in different spaces, so it is necessary to define a user preference matrix E. u This is to complete the operation of embedding the project into the user's embedding space.

[0111] Specifically, by calculating the cosine similarity between the projected item embedding (i.e., the projected item node vector) and the user embedding (i.e., the initialized user node vector), the probability (i.e., the probability value) that user k is interested in item entity i is predicted based on the cosine similarity. The cosine similarity formula is as follows:

[0112]

[0113] Among them, u k Represents the user embedding (i.e., the initialized user node vector), e h The item embedding (i.e., the projected item node vector) is represented by the item embedding projected into the user embedding space, and n represents the number of itemsets.

[0114] In the above embodiments, the probability value is calculated based on the probability value of the target item node vector and the probability value of the initialized user node vector, which enables the item embedding to be projected into the user embedding space, alleviates the conflict between data noise and data diversity, and improves the accuracy and robustness of the recommendation.

[0115] Optionally, as an embodiment of the present invention, the process of analyzing the target loss function based on the initial loss function and the probability values ​​of all the original knowledge graph triples to obtain the target loss function includes:

[0116] Based on Equation 8, the loss function is minimized by calculating the probability values ​​of all the original knowledge graph triples, resulting in the minimized loss function, which is Equation 8:

[0117]

[0118] Based on the ninth equation, the target loss function is calculated according to the minimized loss function and the initial loss function, and the target loss function is obtained. The ninth equation is:

[0119]

[0120] in, Let β be the target loss function, and β be the weights, where β ∈ (0, 1). To minimize the loss function, Let be the initial loss function, λ be the regularization coefficient, Θ be the model parameters, n be the number of target item node vectors, and m be the number of initial user node vectors. The probability values ​​for initializing the user node vector of the k-th node and the target item node vector of the i-th node are given. The probability values ​​for the k-th initialized user node vector and the j-th target item node vector.

[0121] It should be understood that the model is trained using the minimum soft-margin loss, as shown in the following formula:

[0122]

[0123] Where n and m represent the number of user sets and the number of project sets, respectively.

[0124] Specifically, the complete loss function is as follows:

[0125]

[0126] β is and The weights between them are β∈(0,1), λ is the regularization coefficient, and Θ is the model parameter.

[0127] In the above embodiments, the target loss function is obtained by analyzing the initial loss function and the target loss function of the probability value, which realizes more accurate, interpretable and diversified user preference recommendations, alleviates the conflict between data noise and data diversity, and improves the accuracy and robustness of the recommendations.

[0128] Optionally, as another embodiment of the present invention, the present invention uses the TransH model to obtain entity and relation embeddings from the triple (h, r, t); utilizes a novel gating mechanism to process neighborhood entities, and inputs the processed neighborhood nodes into the aggregation layer; the aggregation layer completes the information fusion through an aggregation strategy, wherein the information includes historical interaction entities and processed neighborhood nodes, and the aggregated information is input into an MLP (Multilayer Perceptron) to obtain the final embedded representation of the entity, and transmits the entity embedding to the prediction layer; the prediction layer calculates the cosine similarity between the user embedding and the entity embedding to obtain a probability, which represents how likely the user is to interact with the corresponding entity.

[0129] Optionally, as another embodiment of the present invention, the present invention utilizes knowledge graphs as auxiliary information to achieve more accurate, interpretable and diverse user preference recommendations; in the new gating mechanism, when processing neighborhood nodes, a new strategy is proposed to alleviate the conflict between data noise and data diversity, which can improve the accuracy and robustness of the recommendation model.

[0130] Alternatively, as another embodiment of the present invention, the present invention proposes a new gating mechanism to handle neighboring nodes. Currently, many models aggregate all entity information of an item without distinguishing the importance of the information, which will introduce interaction noise to some extent. If only the information of a single neighboring node is aggregated, the utilization rate of the dataset is low, which will also affect the accuracy of the recommendation.

[0131] Figure 2 This is a module block diagram of a project recommendation device provided in an embodiment of the present invention.

[0132] Alternatively, as another embodiment of the present invention, such as Figure 2 As shown, a project recommendation device includes:

[0133] The model training module is used to import multiple original knowledge graph triples and use the TransH model to train each of the original knowledge graph triples to obtain the scoring function of each of the original knowledge graph triples.

[0134] The parameter update analysis module is used to perform parameter update analysis on the TransH model based on the scoring function of all the original knowledge graph triples, so as to obtain the initial loss function and the updated TransH model.

[0135] An initialization module is used to initialize each of the original knowledge graph triples using the updated TransH model, to obtain an initialized knowledge graph triple for each of the original knowledge graph triples. The initialized knowledge graph triple includes an initialized item node vector, an initialized user node vector corresponding to the initialized item node vector, and an initialized relation vector.

[0136] The vector analysis module is used to analyze the initial item node vectors of each original knowledge graph triple and the initial relation vectors corresponding to each initial item node vector using a multilayer perceptron, so as to obtain the target item node vectors of each original knowledge graph triple.

[0137] The probability value calculation module is used to calculate the probability value of each original knowledge graph triple based on the target item node vector of each original knowledge graph triple and the initial user node vector corresponding to each initial item node vector.

[0138] The loss function analysis module is used to analyze the target loss function based on the initial loss function and the probability values ​​of all the original knowledge graph triples, and obtain the target loss function.

[0139] The parameter update module is used to update the parameters of the updated TransH model and the multilayer perceptron according to the target loss function, so as to obtain the target TransH model and the target multilayer perceptron.

[0140] The recommendation result acquisition module is used to import the triples of the knowledge graph to be recommended, and use the target TransH model and the target multilayer perceptron to recommend items to the triples of the knowledge graph to be recommended, thereby obtaining the item recommendation results.

[0141] Optionally, as an embodiment of the present invention, the original knowledge graph triple includes a first original item node vector and a second original item node vector;

[0142] The model training module is specifically used for:

[0143] Map each of the first original project node vectors to a hyperplane to obtain the first mapping vector of each of the first original project node vectors;

[0144] Mapping each of the second original project node vectors onto a hyperplane yields a second mapping vector for each of the second original project node vectors.

[0145] Based on the first formula, the first scoring function is calculated according to the first mapping vector of each of the first original project node vectors and the second mapping vector of each of the second original project node vectors, to obtain the first scoring function of each of the original knowledge graph triples. The first formula is:

[0146] f r (h,t)=h ⊥ +d r -t ⊥ ,

[0147] Among them, f r (h,t) is the first scoring function, h ⊥ Let t be the first mapping vector. ⊥ Let d be the second mapping vector. r It is a translation vector on the plane;

[0148] Each of the original knowledge graph triples is randomly replaced to obtain the replaced knowledge graph triples, which include a first replaced item node vector and a second replaced item node vector.

[0149] The first replacement item node vector of each original knowledge graph triple is mapped onto a hyperplane to obtain the first mapped replacement item node vector of each original knowledge graph triple.

[0150] The second replacement item node vector of each of the original knowledge graph triples is mapped onto a hyperplane to obtain the second mapped replacement item node vector of each of the original knowledge graph triples.

[0151] Based on the second formula, the second scoring function is calculated according to the first and second mappings of the original knowledge graph triples, resulting in the second scoring function for each of the original knowledge graph triples. The second formula is:

[0152] f r′ (h′,t′)=h′ ⊥ +d r -t′ ⊥ ,

[0153] Among them, f r′ (h′,t′) is the second scoring function, h′ ⊥ Replace the project node vector after the first mapping, t′ ⊥ Replace the project node vector after the second mapping, d r It is a translation vector on the plane;

[0154] The scoring function of the original knowledge graph triple includes the first scoring function and the second scoring function of the original knowledge graph triple.

[0155] Optionally, another embodiment of the present invention provides a project recommendation system, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the project recommendation method described above. This system can be a computer or similar system.

[0156] Optionally, another embodiment of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the project recommendation method as described above.

[0157] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0158] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described apparatus and unit can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0159] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.

[0160] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments of the present invention, depending on actual needs.

[0161] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0162] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0163] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A project recommendation method, characterized in that, Includes the following steps: Multiple original knowledge graph triples are imported, and the TransH model is used to train each of the original knowledge graph triples to obtain the scoring function of each of the original knowledge graph triples. Based on the scoring functions of all the original knowledge graph triples, the TransH model is analyzed for parameter updates to obtain the initial loss function and the updated TransH model. The updated TransH model is used to initialize each of the original knowledge graph triples to obtain the initialized knowledge graph triples of each of the original knowledge graph triples. The initialized knowledge graph triples include an initialized item node vector, an initialized user node vector corresponding to the initialized item node vector, and an initialized relation vector. By using a multilayer perceptron, the initial item node vectors of each original knowledge graph triple and the initial relation vectors corresponding to each initial item node vector are analyzed to obtain the target item node vectors of each original knowledge graph triple. The probability values ​​of each original knowledge graph triplet are obtained by calculating the probability values ​​of the target item node vector of each original knowledge graph triplet and the initial user node vector corresponding to each initial item node vector. The target loss function is obtained by analyzing the initial loss function and the probability values ​​of all the original knowledge graph triples. The parameters of the updated TransH model and the multilayer perceptron are updated according to the target loss function to obtain the target TransH model and the target multilayer perceptron. Import the triples of the knowledge graph to be recommended, and use the target TransH model and the target multilayer perceptron to recommend items to the triples of the knowledge graph to be recommended, and obtain the item recommendation results.

2. The project recommendation method according to claim 1, characterized in that, The original knowledge graph triplet includes a first original item node vector and a second original item node vector. The process of training each of the original knowledge graph triples using the TransH model to obtain the scoring function for each of the original knowledge graph triples includes: Map each of the first original project node vectors to a hyperplane to obtain the first mapping vector of each of the first original project node vectors; Mapping each of the second original project node vectors onto a hyperplane yields a second mapping vector for each of the second original project node vectors. Based on the first formula, the first scoring function is calculated according to the first mapping vector of each of the first original project node vectors and the second mapping vector of each of the second original project node vectors, to obtain the first scoring function of each of the original knowledge graph triples. The first formula is: f r (h,t)=h ⊥ +d r -t ⊥ , Among them, f r (h,t) is the first scoring function, h ⊥ Let t be the first mapping vector. ⊥ Let d be the second mapping vector. r It is a translation vector on the plane; Each of the original knowledge graph triples is randomly replaced to obtain the replaced knowledge graph triples, which include a first replaced item node vector and a second replaced item node vector. The first replacement item node vector of each original knowledge graph triple is mapped onto a hyperplane to obtain the first mapped replacement item node vector of each original knowledge graph triple. The second replacement item node vector of each of the original knowledge graph triples is mapped onto a hyperplane to obtain the second mapped replacement item node vector of each of the original knowledge graph triples. Based on the second formula, the second scoring function is calculated according to the first and second mappings of the original knowledge graph triples, resulting in the second scoring function for each of the original knowledge graph triples. The second formula is: f r′ (h ′ ,t ′ )=h ′ ⊥ +d r -t ′ ⊥ , Among them, f r′ (h ′ ,t ′ ) is the second scoring function, h ′ ⊥ Replace the project node vector after the first mapping, t ′ ⊥ Replace the project node vector after the second mapping, d r It is a translation vector on the plane; The scoring function of the original knowledge graph triple includes the first scoring function and the second scoring function of the original knowledge graph triple.

3. The project recommendation method according to claim 2, characterized in that, The process of performing parameter update analysis on the TransH model based on the scoring function of all the original knowledge graph triples to obtain the initial loss function and the updated TransH model includes: Based on the third equation, the initial loss function is calculated using the first and second scoring functions of all the original knowledge graph triples, resulting in the initial loss function. The third equation is: in, Let f be the initial loss function. r (h,t) is the first scoring function, f r′ (h ′ ,t ′ Let ) be the second scoring function, and S be the set of original knowledge graph triples. ′ The set of triples in the knowledge graph after replacement, where γ is the margin value; The parameters of the TransH model are updated based on the initial loss function to obtain the updated TransH model.

4. The project recommendation method according to claim 1, characterized in that, The initialized project node vector includes a first initialized project node vector and a second initialized project node vector. The process of using a multilayer perceptron to analyze the initial item node vectors of each of the original knowledge graph triples and the initial relation vectors corresponding to each of the initial item node vectors to obtain the target item node vectors of each of the original knowledge graph triples includes: Based on the fourth equation, attention weights are calculated according to the first initial item node vector, the second initial item node vector, and the initial relation vector corresponding to each of the original knowledge graph triples. The fourth equation is as follows: α(h″,r,t″)=softmax(α′(h″,r,t″)), Among them, α′(h″,r,t″)=(ω r e t ) T tanh((ω r e h +e r )); Based on the fifth equation, the item neighbor node vectors are calculated according to the attention weights of each of the original knowledge graph triples and the second initial item node vector, to obtain the item neighbor node vectors of each of the original knowledge graph triples. Then, all the item neighbor node vectors are combined to obtain the item neighbor node set. The fifth equation is: e′ h =α(h″,r,t″)e t , Based on the sixth equation, the target item node vector is calculated according to the set of neighboring nodes of the item, the second initial item node vector of each original knowledge graph triple, and the attention weight, to obtain the target item node vector of each of the original knowledge graph triples. The sixth equation is: Among them, f use (α(h″,r,t″),e t,* |e t ) represents the target project node vector, * represents the set of neighboring project nodes, and W and Both are weight parameters, b and b f All are biased, ⊙ is the inner product operator, || is the conjunction operator, and e′ h Let α(h″,r,t″) be the neighbor node vector of the project, and e be the attention weight. t The second initialization item node vector is used, where softmax and tanh are both non-linear activation functions, α′(μ″,r,t″) is the attention score, and e r To initialize the relation vector, e μ Initialize the first project node vector, ω r It is the plane normal vector.

5. The project recommendation method according to claim 1, characterized in that, The process of calculating the probability value of each original knowledge graph triple based on the target item node vector of each original knowledge graph triple and the initial user node vector corresponding to each initial item node vector includes: Project the target item node vectors of each of the original knowledge graph triples to obtain the projected item node vectors of each of the original knowledge graph triples. Based on the seventh equation, the probability values ​​of each original knowledge graph triple are calculated by using the projected item node vectors of each original knowledge graph triple and the initialized user node vectors corresponding to each initialized item node vector. The seventh equation is: in, Let u be the probability value between the k-th initial user node vector and the i-th target item node vector. k To initialize the user node vector, e i is the project node vector after projection, n is the number of target project node vectors, and m is the number of initial user node vectors.

6. The project recommendation method according to claim 5, characterized in that, The process of analyzing the target loss function based on the initial loss function and the probability values ​​of all the original knowledge graph triples to obtain the target loss function includes: Based on Equation 8, the loss function is minimized by calculating the probability values ​​of all the original knowledge graph triples, resulting in the minimized loss function, which is Equation 8: Based on the ninth equation, the target loss function is calculated according to the minimized loss function and the initial loss function, and the target loss function is obtained. The ninth equation is: in, Let β be the target loss function, and β be the weight, where β ∈ (0,1). To minimize the loss function, Let be the initial loss function, λ be the regularization coefficient, Θ be the model parameters, n be the number of target item node vectors, and m be the number of initial user node vectors. The probability values ​​for initializing the user node vector of the k-th node and the target item node vector of the i-th node are given. The probability values ​​for the k-th initialized user node vector and the j-th target item node vector.

7. A project recommendation device, characterized in that, include: The model training module is used to import multiple original knowledge graph triples and use the TransH model to train each of the original knowledge graph triples to obtain the scoring function of each of the original knowledge graph triples. The parameter update analysis module is used to perform parameter update analysis on the TransH model based on the scoring function of all the original knowledge graph triples, so as to obtain the initial loss function and the updated TransH model. An initialization module is used to initialize each of the original knowledge graph triples using the updated TransH model, to obtain an initialized knowledge graph triple for each of the original knowledge graph triples. The initialized knowledge graph triple includes an initialized item node vector, an initialized user node vector corresponding to the initialized item node vector, and an initialized relation vector. The vector analysis module is used to analyze the initial item node vectors of each original knowledge graph triple and the initial relation vectors corresponding to each initial item node vector using a multilayer perceptron, so as to obtain the target item node vectors of each original knowledge graph triple. The probability value calculation module is used to calculate the probability value of each original knowledge graph triple based on the target item node vector of each original knowledge graph triple and the initial user node vector corresponding to each initial item node vector. The loss function analysis module is used to analyze the target loss function based on the initial loss function and the probability values ​​of all the original knowledge graph triples, and obtain the target loss function. The parameter update module is used to update the parameters of the updated TransH model and the multilayer perceptron according to the target loss function, so as to obtain the target TransH model and the target multilayer perceptron. The recommendation result acquisition module is used to import the triples of the knowledge graph to be recommended, and use the target TransH model and the target multilayer perceptron to recommend items to the triples of the knowledge graph to be recommended, thereby obtaining the item recommendation results.

8. The project recommendation device according to claim 7, characterized in that, The original knowledge graph triplet includes a first original item node vector and a second original item node vector. The model training module is specifically used for: Map each of the first original project node vectors to a hyperplane to obtain the first mapping vector of each of the first original project node vectors; Mapping each of the second original project node vectors onto a hyperplane yields a second mapping vector for each of the second original project node vectors. Based on the first formula, the first scoring function is calculated according to the first mapping vector of each of the first original project node vectors and the second mapping vector of each of the second original project node vectors, to obtain the first scoring function of each of the original knowledge graph triples. The first formula is: f r (h,t)=h ⊥ +d r -t ⊥ , Among them, f r (h,t) is the first scoring function, h ⊥ Let t be the first mapping vector. ⊥ Let d be the second mapping vector. r It is a translation vector on the plane; Each of the original knowledge graph triples is randomly replaced to obtain the replaced knowledge graph triples, which include a first replaced item node vector and a second replaced item node vector. The first replacement item node vector of each original knowledge graph triple is mapped onto a hyperplane to obtain the first mapped replacement item node vector of each original knowledge graph triple. The second replacement item node vector of each of the original knowledge graph triples is mapped onto a hyperplane to obtain the second mapped replacement item node vector of each of the original knowledge graph triples. Based on the second formula, the second scoring function is calculated according to the first and second mappings of the original knowledge graph triples, resulting in the second scoring function for each of the original knowledge graph triples. The second formula is: f r′ (h′,t′)=h′ ⊥ +d r -t′ ⊥ , Among them, f r′ (h′,t′) is the second scoring function, h′ ⊥ Replace the project node vector after the first mapping, t′ ⊥ Replace the project node vector after the second mapping, d r It is a translation vector on the plane; The scoring function of the original knowledge graph triple includes the first scoring function and the second scoring function of the original knowledge graph triple.

9. A project recommendation system, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the project recommendation method as described in any one of claims 1 to 6.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the project recommendation method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Commodity information recommendation method and system, and storage medium

    CN113222711A

  • Credit assessment method and system based on knowledge graph and deep learning

    CN115358754A