A method for recommending scientific literature

By constructing a scientific literature knowledge graph and user interaction database, combined with SPARQL query statements, a knowledge representation learning and recommendation model is established, which solves the problem of insufficient semantic representation in the existing technology, and realizes the intelligence and rapidity of personalized scientific literature recommendations.

CN115658862BActive Publication Date: 2025-08-26CENT SOUTH UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211291535.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-19
Publication Date
2025-08-26
Estimated Expiration
2042-10-19

AI Technical Summary

Technical Problem

The existing scientific and technological literature recommendation methods ignore the semantic impact of human historical experience on the triplets of relationships, entities and facts, resulting in the semantic representation of knowledge being unable to express user characteristics and needs, limiting the effect of personalized recommendations.

Method used

Build a scientific and technological literature knowledge graph, collect user's historical behavior interaction data and natural language queries, build a knowledge representation learning model and recommendation model through SPARQL query statements, combine the balance function to train the user's preference model, integrate user interaction characteristics and knowledge representation, and generate a personalized recommendation list.

Benefits of technology

It improves the semantic representation of scientific and technological literature, realizes providing users with intelligent and fast personalized recommendation services in massive resources, and enhances the semantic relationship between users and scientific and technological literature.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115658862B_ABST
    Figure CN115658862B_ABST
Patent Text Reader

Abstract

The present invention provides a scientific literature recommendation method that constructs a scientific literature knowledge graph by collecting scientific literature-related data, collects and processes the interaction data generated by users in the system, and designs a recommendation model that integrates user behavior characteristics and knowledge representation. Compared with existing recommendation models, on the one hand, based on the natural language query raised by users for scientific literature resources, the semantic impact of user preferences on the scientific literature knowledge graph is analyzed, the relational semantic features implicit in user information are extracted, and a knowledge representation learning model that incorporates relational semantics is established to improve the semantic representation of knowledge such as scientific literature; on the other hand, based on the user's historical behavioral interaction data, combined with the knowledge representation learning model, the semantic impact of relations and entities on user preferences is deeply analyzed, and a multi-level preference-aware recommendation model is established to improve the semantic association between users and scientific literature.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of knowledge graph technology, and more specifically to a method for recommending scientific and technological literature, and more specifically to a method for recommending scientific and technological literature that integrates user interaction features and knowledge representation. Background Art

[0002] Scientific and technological literature, as one of the key vehicles for current scientific and technological innovation, embodies a nation's scientific and technological innovation capabilities. With the rapid development of science and technology, scientific and technological literature is emerging in an endless stream across various research fields, both domestically and internationally. Major literature databases and knowledge service platforms, such as China National Knowledge Infrastructure (CNKI), aggregate data from multiple sources and provide query and retrieval services to help users find the scientific and technological literature they need. However, with the continuous expansion in the number and scope of scientific and technological literature, simply providing query and retrieval methods based on string matching is unable to meet users' needs for fast and accurate access to scientific and technological literature, resulting in a poor user experience.

[0003] In addition, the existing recommendation models based on knowledge graphs ignore the semantic influence of human historical experience on the triples of relations, entities and facts, resulting in the semantic representation of knowledge being unable to express the characteristics and needs of users, while also limiting the application of knowledge graphs in personalized recommendation tasks.

[0004] In summary, there is an urgent need for a new scientific literature recommendation method to solve the problems existing in the existing technology. Summary of the Invention

[0005] The present invention aims to provide a method for recommending scientific and technological literature, and the specific technical solution is as follows:

[0006] A method for recommending scientific and technological literature comprises the following steps:

[0007] S1: Constructing a scientific literature knowledge graph: Crawl scientific literature resource data to obtain unstructured text data; extract entities and relationships related to scientific literature from the unstructured text data to obtain entity sets and relationship sets, and construct triple sets based on the entity sets and relationship sets. Combine the entity sets, relationship sets, and triple sets to construct a scientific literature knowledge graph;

[0008] S2: Build a user interaction database: collect historical behavioral interaction data of users on the scientific literature knowledge graph; collect natural language queries raised by users on the scientific literature knowledge graph and convert natural language queries into SPARQL query statements; store historical behavioral interaction data and SPARQL query statements;

[0009] S3: Build a user preference model based on the user's interactive database and scientific literature knowledge graph. The user preference model includes a knowledge representation learning model and a recommendation model. The user preference model construction process specifically includes:

[0010] S3-1: Construct a knowledge representation learning model based on SPARQL query statements combined with scientific literature knowledge graph;

[0011] S3-2: Build a recommendation model based on historical behavioral interaction data;

[0012] S4: Construct a balancing function to balance the entities in the knowledge representation learning model and the items in the recommendation model and train the knowledge representation learning model and the recommendation model at the same time to obtain user vector values ​​and entity vector values ​​that have both graph structure features and interactive semantic features, and generate a recommendation list based on the similarity between the user vector value and the entity vector value, arranged in descending order.

[0013] Preferably, the step S3-1 is specifically as follows:

[0014] S3-1-1: Analyze the temporal and frequency characteristics of binary predicates in SPARQL query statements and construct a relational semantic matrix, which is expressed as follows:

[0015]

[0016] Among them, S(r) represents the semantic weight value of relation r, It is the time trust growth factor; Represents a binary predicate group (P j ,P k ) in time frame τ i The frequency of occurrence of the SPARQL query statement set in the query; β is a hyperparameter that balances the total frequency of the infrequent predicate group; is the set of infrequent predicate groups, and FP is the set of frequent predicate groups;

[0017] S3-1-2: Take the relational semantic matrix as input and use the weighted encoder to calculate the relevance of each triple linked by different relations in the scientific literature knowledge graph. The expression of the relevance function is as follows:

[0018]

[0019] Among them, w(h,r,t) is the triple relevance function; (h,r,t) is a triple, h is the head entity, r is the relationship, and t is the tail entity; is a set of triples whose head entity is h;

[0020] S3-1-3: Based on the translation model and the triple relevance function, an energy function is constructed. The loss function of the relevance-aware knowledge representation learning model is constructed using the energy function. The loss function is iterated through gradient descent to obtain the vector values ​​of entities and relationships with knowledge graph structural characteristics, and the knowledge representation learning model is generated. The loss function of the knowledge representation learning model is expressed as follows:

[0021]

[0022] Among them, L kg is the loss function of the knowledge representation learning model, is a positive triple, that is, a triple that actually exists in the knowledge graph. is a negative triplet, that is, a triplet constructed by replacing the head entity or the tail entity, h' represents the replaced head entity, and t' represents the replaced tail entity; E(h,r,t) represents the distance score of the positive triplet of the translation model, E(h',r,t') represents the distance score of the negative triplet of the translation model, and γ is the boundary distance value.

[0023] Preferably, the step S3-2 is specifically as follows:

[0024] S3-2-1: Calculate the similarity between user u and item i in the historical behavior interaction data and the relationship r in the scientific literature knowledge graph of step S3-1; further calculate the attention weight distribution of relationship r in its relationship set and perform normalization to obtain the final value of the attention weight, multiply the attention weight by the corresponding relationship r, and establish a preference induction model for the specified user-item interaction pair and the relationship in the scientific literature knowledge graph. Its expression is as follows:

[0025]

[0026] in, Represents the preference induction model of the relationship between a specified user-item interaction pair and the scientific literature knowledge graph, represents the final value obtained by normalizing the attention weight of relation r in its relation set, u represents the user, i represents the item, represents the set of relationships directly associated with the interaction item i in the scientific literature knowledge graph;

[0027] S3-2-2: Calculate the similarity between user u and item i in the historical behavior interaction data and entity e in the scientific literature knowledge graph of step S3-1; calculate the attention weight distribution of entity e in its entity set and perform normalization to obtain the final value of the attention weight, multiply the attention weight by the corresponding entity e, and establish a preference induction model for user-item interaction pairs and entities in the scientific literature knowledge graph. Its expression is as follows:

[0028]

[0029] Among them, e represents an entity, which includes a head entity h and a tail entity t. represents the set of entities directly associated with interaction item i in the scientific literature knowledge graph;

[0030] S3-2-3: Based on the user preference induction model for relationships in step S3-2-1 and the user preference induction model for entities in step S3-2-2, a user preference model for items is established. The loss function of the recommendation model is constructed through the user preference model for items. The loss function is continuously iterated by gradient descent to obtain the vector value of the user and the vector value of the item with user interaction characteristics, and a recommendation model is generated. The expression of the loss function of the recommendation model is as follows:

[0031] L rs =∑ (u,i)∈y ∑ (u,i′)∈y′ -logσ[g(u,i′;p′)-g(u,i;p)];

[0032] Among them, L rs represents the loss function of the recommendation model, (u,i) represents the user-item interaction pair, (u,i′) represents the negative interaction pair constructed by randomly replacing the item, i′ represents the replaced item, logσ represents the BPR loss function calculation, y′ represents the set of negative interaction lists between users and items, y represents the set of interaction lists between users and items, g(u,i;p) represents the user's preference model for items, and g(u,i′;p′) represents the user's preference model for replaced items.

[0033] Preferably, the energy function expression in step S3-1-3 is as follows:

[0034]

[0035] Among them, E(h,r,t / w) represents the energy function and E(h,r,t) represents the translation model.

[0036] Preferably, the user's preference model expression for the item in step S3-2-3 is as follows:

[0037]

[0038] Among them, p represents the interaction relationship vector, represents the interactive relationship vector after aggregating users’ preferences for relationships, It represents the project after aggregating the user's preference for the entity. L1 refers to the L1 paradigm and L2 refers to the L2 paradigm.

[0039] Preferably, the balance function expression in step S4 is as follows:

[0040] L=λL rs +(1-λ)L kg ;

[0041] Among them, L is the balance function and λ is the hyperparameter.

[0042] The application of the technical solution of the present invention has the following beneficial effects:

[0043] (1) The scientific literature recommendation method provided by the present invention constructs a scientific literature knowledge graph by collecting scientific literature-related data, and at the same time collects and processes the interaction data generated by users in the system, and designs a recommendation model that integrates user behavior characteristics and knowledge representation. Compared with the existing recommendation model, the interaction data is divided into natural language queries raised by users for scientific literature resources and user historical behavior interaction data. On the one hand, based on the natural language queries raised by users for scientific literature resources, the semantic impact of user preferences on the scientific literature knowledge graph is analyzed, the relational semantic features implicit in user information are extracted, and a knowledge representation learning model that incorporates relational semantics is established to improve the semantic representation of knowledge such as scientific literature; on the other hand, based on the user's historical behavior interaction data, combined with the knowledge representation learning model, the semantic impact of relations and entities on user preferences is deeply analyzed, and a multi-level preference-aware recommendation model is established to improve the semantic association between users and scientific literature.

[0044] (2) The present invention also sets a balancing function. By jointly learning the knowledge representation learning model and the recommendation model, the information of entities, relationships and projects is shared and complemented in the learning process, so as to achieve modeling of users and scientific documents with richer semantic associations. Based on the similarity calculation between the user and scientific document vectors, a more intelligent and fast personalized recommendation service is provided to users in massive scientific document resources.

[0045] In addition to the above-described objects, features and advantages, the present invention has other objects, features and advantages. The present invention will be further described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] The accompanying drawings, which constitute part of this application, are intended to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are intended to explain the present invention and do not constitute an undue limitation of the present invention. In the accompanying drawings:

[0047] Figure 1 Flowchart of the scientific literature recommendation method according to the preferred embodiment 1 of the present invention

[0048] Figure 2 It is a schematic diagram of the connections between multiple relationships and entities of user-item interaction pairs in the scientific literature knowledge graph. DETAILED DESCRIPTION

[0049] The embodiments of the present invention are described in detail below with reference to the accompanying drawings. However, the present invention can be implemented in many different ways as defined and covered by the claims.

[0050] Example 1:

[0051] See also Figure 1 , a scientific literature recommendation method, comprising the following steps:

[0052] S1: Constructing a scientific literature knowledge graph: Crawl scientific literature resource data to obtain unstructured text data; extract entities and relationships related to scientific literature from the unstructured text data (for example, literature information such as the document name, publication year, keywords, and author information such as the author name, affiliation, and email address), obtain entity sets and relationship sets, and construct triple sets based on the entity sets and relationship sets. Combine the entity sets, relationship sets, and triple sets to construct a scientific literature knowledge graph;

[0053] S2: Build a user interaction database: collect historical behavioral interaction data of users on the scientific literature knowledge graph; collect natural language queries raised by users on the scientific literature knowledge graph and convert natural language queries into SPARQL query statements; store historical behavioral interaction data and SPARQL query statements;

[0054] The user's interaction database is the basic data source for implementing the scientific literature recommendation method. The present invention divides the interaction data generated by users on the system into two parts. On the one hand, it collects the user's historical behavior interaction data on the scientific literature knowledge graph, such as the user's collection or download of scientific literature in the knowledge graph; on the other hand, it collects the natural language queries raised by users for the scientific literature knowledge graph, such as the user's search for "the collection of papers published by Professor Liu Zhiyuan", and converts the natural language queries into the underlying SPARQL query statements. In the present invention, the user's historical behavior interaction data is represented as a set of user sets U = {u1,u2,...,u n}、A set of items I={i1,i2,...,i n} and a user-item interaction list set y = {(u,i)u∈U,i∈I}, where u represents the user and i represents the item;

[0055] At the same time, the natural language query data proposed by users for the scientific literature knowledge graph, namely the set of SPARQL query statements, is represented as L.

[0056] S3: Build a user preference model based on the user's interactive database and scientific literature knowledge graph. The user preference model includes a knowledge representation learning model and a recommendation model. The user preference model construction process specifically includes:

[0057] S3-1: Construct a knowledge representation learning model based on SPARQL query statements and scientific literature knowledge graph; specifically, it includes:

[0058] S3-1-1: Analyze the temporal and frequency characteristics of binary predicates in SPARQL query statements (multi-ary predicates can better describe the semantic associations between entities. The number of associations contained in a predicate is called the arity of the predicate. The predicate P(x1, x2, ..., x n ) is an n-ary predicate. Common ones include unigram predicate P(x) and binary predicate P(x,y). There are a large number of binary predicate associations in SPARQL query statements. Specifically, each raw data in the SPARQL query statement set L is formatted and converted, and the garbled SPARQL query statement is converted into a standard SPARQL query statement; at the same time, only the predicate in each standard SPARQL query statement is retained, and the subject and object are converted into variables to obtain a patterned SPARQL query statement Q i Finally, we get the set of patterned SPARQL query statements Q = {Q1, Q2, ..., Q n}; Traverse each patterned SPARQL query statement Q i , mining possible binary predicate groups (P j ,P k ), calculate each binary predicate group (P j ,P k ) appears in the SPARQL query set Q|(P j ,P k )|, the expression is as follows:

[0059]

[0060] Among them, count[Q i ,(P j ,P k )] function is used to determine the binary predicate group (P j ,P k ) exists in the query statement Q i , if exists, it is assigned a value of 1, if not exists, it is 0; in order to distinguish the frequency of binary predicate groups, this embodiment also sets a threshold δ, the value of the threshold δ is selected according to the needs, and the binary predicate group (P j ,P k ) is a frequent predicate. If |(P j ,P k )|≤δ, then (P j ,P k ) belongs to the frequent predicate set FP, otherwise (P j,P k ) belongs to the set of infrequent predicate groups

[0061] In particular, SPARQL queries have time series characteristics. The closer the historical query is to the current time, the greater the semantic influence of user information on the relationship. Therefore, considering the law of SPARQL query changes over time, the time is divided into t time frames, and each time frame τ i Set the corresponding time trust growth factor The sum of the time trust growth factors for all time frames is 1, and the expression is as follows:

[0062]

[0063]

[0064] Among them, as the SPARQL query time frame is closer to the current time, The larger the value, the higher the trustworthiness.

[0065] Based on the frequency statistics of predicates and the time series feature analysis of SPARQL queries, the semantic influence of users on relationships is modeled through weighted collaborative representation, that is, the relationship semantic matrix is ​​constructed, which is expressed as follows:

[0066]

[0067] Among them, S(r) represents the semantic weight value of relation r, It is the time trust growth factor; Represents a binary predicate group (P j ,P k ) in time frame τ i The frequency of occurrence of the SPARQL query statement set in the query; β is a hyperparameter that balances the total frequency of the infrequent predicate group; is the set of infrequent predicate groups, and FP is the set of frequent predicate groups;

[0068] S3-1-2: Take the relational semantic matrix as input and use the weighted encoder to calculate the relevance of each triple linked by different relations in the scientific literature knowledge graph. The expression of the relevance function is as follows:

[0069]

[0070] Among them, w(h,r,t) is the triple relevance function; (h,r,t) is a triple, h is the head entity, r is the relationship, and t is the tail entity; is a set of triples whose head entity is h;

[0071] S3-1-3: Based on the assumption that h + r ≈ t in the translation model (E(h, r, t) = ||h + rt||) and the association function of the triples, an energy function is constructed. The expression of the energy function is as follows:

[0072]

[0073] Among them, E(h,r,t / w) represents the energy function and E(h,r,t) represents the translation model.

[0074] The loss function of the association-aware knowledge representation learning model is constructed through the energy function. The vector value of the entity and the vector value of the relationship with the knowledge graph structure characteristics are obtained by continuously iterating the loss function through gradient descent, and the knowledge representation learning model is generated. The expression of the loss function of the knowledge representation learning model is as follows:

[0075]

[0076] Among them, L kg is the loss function of the knowledge representation learning model, is a positive triple (i.e., a triple that actually exists in the knowledge graph), is a negative triple (i.e., a triple constructed by replacing the head entity or the tail entity), h' represents the replaced head entity, and t' represents the replaced tail entity; E(h,r,t) represents the distance score of the positive triple of the translation model, and E(h′,r,t′) represents the distance score of the negative triple under the translation model; the lower the score of E(h,r,t), the more the representation of the entity and relationship conforms to the knowledge representation learning model framework, making the distance score of the positive triple lower than the distance score of the negative triple; w(h,r,t) is the triple association function, the higher the score, the more important the relationship r is, the greater the degree of semantic association between the entities linked by the relationship r, and the more it should be considered in the embedding process, and γ is the boundary distance value.

[0077] S3-2: Build a recommendation model based on historical behavioral interaction data combined with a knowledge representation learning model; specifically, it includes:

[0078] S3-2-1: Calculate the similarity between user u in the historical behavior interaction data and the relationship r in the scientific literature knowledge graph of step S3-1; the user's interaction with the project must have some intention. Combined with the scientific literature knowledge graph, the relationship may affect the user's choice. Users have different preferences for different relationships. For example, a user pays more attention to the keywords of scientific literature than the type of scientific literature. See Figure 2 Therefore, the definition It is used to measure the importance of relationship r to user u. The expression is as follows:

[0079]

[0080] Each historical interaction pair (u,i) of user-item contains multiple relations in the scientific literature knowledge graph, see Figure 1 , user-item interaction pair (user u, document i), for the entity document, the scientific and technological literature knowledge graph contains the relationship set {author, keyword, document type} associated with it. Therefore, for each interaction pair (u, i), the formula is defined: represents the set of relations directly associated with the interaction item i in the scientific literature knowledge graph; at the same time, for the interaction pair (u, i), the attention weight distribution of relation r in its relation set is further calculated and normalized to obtain the final value of the attention weight, which is expressed as follows:

[0081]

[0082] in, Represents the final value obtained by normalizing the attention weight of relation r in its relation set.

[0083] Different users have different preferences for relationships. For example, some users choose to download and view a document based on its keywords, while others choose it based on the author. Therefore, for each user-item interaction pair (u, i), the attention weight is multiplied by the corresponding relationship r to establish a preference induction model for the relationships in the scientific literature knowledge graph for a given user-item interaction pair. The expression is as follows:

[0084]

[0085] in, Represents the preference induction model of the relationship in the scientific literature knowledge graph by the specified user-item interaction, represents the final value obtained by normalizing the attention weight of relation r in its relation set, u represents the user, i represents the item, represents the set of relationships directly associated with the interaction item i in the scientific literature knowledge graph;

[0086] S3-2-2: Calculate the similarity between user u in the historical behavior interaction data and entity e in the scientific literature knowledge graph of step S3-1; not only the relationship in the scientific literature knowledge graph may affect the user's choice, but different entities under the same relationship also contribute to different degrees of user preference, and users have different preferences for different entities. For example, a user pays more attention to the keywords of the document than the document type. Therefore, define It is used to measure the importance of entity e to user u. The expression is as follows:

[0087]

[0088] The i in each historical interaction pair (u,i) of a user-item corresponds to multiple entities in the scientific literature knowledge graph, see Figure 1 , user-item interaction pair (user u, document i), for entity document 1, the scientific literature knowledge graph contains the entity set {author A1, author A2, recommendation algorithm, knowledge reasoning} associated with it. Therefore, for each interaction pair (u, i), define represents the set of entities directly associated with the interaction item i in the scientific literature knowledge graph; at the same time, for the interaction pair (u, i), the formula is defined to further calculate the attention weight distribution of entity e in its entity set and perform normalization to obtain the final value of the attention weight. The expression is as follows:

[0089]

[0090] Furthermore, different users have different preferences for entities. For example, some users may choose to download and view a document because they are interested in author A1, while others may choose to download and view it because of author A2. Therefore, for each user-item interaction pair (u, i), the attention weight is multiplied by the corresponding entity e to establish a preference induction model for user-item interaction pairs. The expression is as follows:

[0091]

[0092] Among them, e represents an entity, which includes a head entity h and a tail entity t. represents the set of entities directly associated with interaction item i in the scientific literature knowledge graph;

[0093] S3-2-3: For the triple (u, interact, i) of user-item interaction, the interaction relationship vector p is regarded as a translation operation from user u to item i, that is, if there is interaction between the user and the item, then: u+p≈i.

[0094] However, the relationships and entities in the scientific literature knowledge graph have different degrees of influence on the interaction between users and projects. Therefore, based on the user preference induction model for relationships in step S3-2-1 and the user preference induction model for entities in step S3-2-2, the user's preference for relationships is aggregated into the interaction relationship vector p, which is expressed as follows, to ensure that the user and the entities corresponding to the relationships with large weight values ​​are closer in the vector space:

[0095]

[0096] At the same time, the user's preference for entities is aggregated to item i, and its expression is as follows, ensuring that entities with large weights provide higher contributions to user generation:

[0097]

[0098] According to the concept of project and entity alignment, project i is the entity e in the aligned scientific literature knowledge graph.

[0099] Then, a user preference model for items is established. The user preference model for items is expressed as follows:

[0100]

[0101] Among them, p represents the interaction relationship vector, represents the interactive relationship vector after aggregating users’ preferences for relationships, It represents the project after aggregating the user's preference for the entity. L1 refers to the L1 paradigm, and L2 refers to the L2 paradigm. The lower the g(u,i;p) score, the more likely the user is to interact with the project.

[0102] The loss function of the recommendation model is constructed through the user's item preference model. The loss function is continuously iterated through gradient descent to obtain the vector value of the user and the vector value of the item with user interaction characteristics, and the recommendation model is generated. The expression of the loss function of the recommendation model is as follows:

[0103] L rs =∑ (u,i)∈y ∑ (u,i′)∈y′ -logσ[g(u,i′;p′)-g(u,i;p)];

[0104] Among them, L rs represents the loss function of the recommendation model, (u,i) represents the user-item interaction pair, (u,i′) represents the negative interaction pair constructed by randomly replacing the item, i′ represents the replaced item, logσ represents the BPR loss function calculation, y′ represents the set of negative interaction lists between users and items, y represents the set of interaction lists between users and items, g(u,i;p) represents the user's preference model for items, and g(u,i′;p′) represents the user's preference model for replaced items.

[0105] S4: Construct a balancing function to balance the entities in the knowledge representation learning model and the items in the recommendation model and train the knowledge representation learning model and the recommendation model simultaneously to obtain user vector values ​​and entity vector values ​​that have both graph structure features and interactive semantic features. Then, a recommendation list is generated based on the similarity between the user vector value and the entity vector value, arranged in descending order. The balancing function expression is as follows:

[0106] L=λL rs+(1-λ)L kg ;

[0107] Among them, L is the balance function and λ is a hyperparameter, which can be selected according to needs. The balance function makes the entities in the knowledge representation learning model correspond to the items in the recommendation model one-to-one, realizing the sharing and complementarity of semantic information between items and entities, which is used to enhance the recommendation effect and improve the accuracy of knowledge representation.

[0108] Experimental dataset

[0109] This chapter uses the Wikidata dataset as a knowledge graph dataset, which contains knowledge about directors, actors, and movie genres. Natalia et al. found that 95% of entities in datasets similar to FB15K-237 appeared in at least three training triples, but the original data of Wikidata is large and very sparse. Therefore, the present invention uses a filtered Wikidata dataset to retain only entities that appear in at least two triples. The Wikidata dataset is divided into two versions: Wikidata-300K and Wikidata-1000k, containing 300K and 1M triples respectively. The present invention divides these triplets into training set, validation set, and test set. Table 3-2 shows the statistics of the Wikidata dataset.

[0110] Table 1 Wikidata dataset

[0111] Datasets #Rel #Ent #Train #Valid #Test Wikidata-300k 294 36001 240000 23310 23373 Wikidata-1000k 394 104500 950000 18912 18984

[0112] In addition, the present invention collected the SPARQL historical query log set corresponding to the Wikidata knowledge graph from the SPARQL endpoint provided by the Wikipedia website, which includes a total of six periods of historical query logs. Each period counts SPARQL queries for 28 days. The statistical data of the SPARQL historical query logs are detailed in Table 3-3.

[0113] Table 2 SPARQL historical query dataset

[0114] Start-End #Total #Valid #Robotic #Organic 1 2017.06.12-2017.07.09 79,082,916 59,555,701 59,364,020 191,681 2 2017.07.10-2017.08.06 82,110,141 70,397,955 70,199,977 197,978 3 2017.08.07-2017.09.03 90,733,013 78,393,731 78,142,971 250,760 4 2018.01.01-2018.01.28 106,074,877 92,100,077 91,504,428 595,649 5 2018.01.29-2018.02.25 109,617,007 96,407,008 95,526,402 880,606 6 2018.02.26-2018.03.25 100,133,104 84,861,808 83,998,328 863,480

[0115] Malyshev et al., using the number of valid queries (Valid), discovered two types of queries: robotic and organic. Organic queries are dominated by queries from users seeking instant information and better reflect user needs. Therefore, this paper primarily analyzes and mines organic queries.

[0116] Parameter settings

[0117] During the training process, the present invention explored values ​​within different ranges for all parameters involved in the model. For the hyperparameter λ, the present invention explored values ​​within {0.1, 0.01, 0.001}; for the boundary distance value γ, the present invention explored values ​​within {1, 2, 4}; for the vector dimension d of relations and entities, the present invention explored values ​​within {20, 50, 100}; for the number of iterations epoch during training, the present invention explored values ​​within {200, 500, 1000}. In addition, the batch value of the mini-batch samples on each data set was 100, and the L2 norm was used to measure the distance. Based on the result of the minimum MeanRank of the association-aware knowledge representation learning model on the validation set, this section selects appropriate parameters. For the Wikidata_300k dataset, this paper uses the following parameter settings: hyperparameter λ = 0.001, boundary distance value γ = 1, vector dimension d = 100, and number of epochs = 200. For the Wikidata_1000k dataset, this paper uses the following parameters: hyperparameter λ = 0.1, boundary distance value γ = 1, vector dimension d = 200, and number of epochs = 500. To ensure fair comparison of experimental results, this paper uses the same parameter settings for all comparison models.

[0118] Evaluation indicators

[0119] Link prediction is often used to evaluate the effectiveness of knowledge representation learning algorithms. Its core idea is to predict the missing item given any two items in a triple (h, r, t). Taking tail entity prediction as an example (the operation for head entities is similar), the triples in the test set are first converted into incomplete triples (h, r, ?). The tail entity t is then replaced with any entity e from the entity set ε to form a new triple (h, r, e). Finally, the distance score of the triple is calculated using the score function f(h, r, e). A lower score indicates a more likely existence of the triple, and vice versa.

[0120] With reference to the experimental method in the paper by Bordes et al., the distance scores of all test triples are sorted in ascending order. Based on the ascending list, this chapter uses the average ranking MeanRank and hit rate Hits@N as evaluation indicators in the link prediction task. In the link prediction task, the lower the MeanRank and the higher the Hits@10, the better the knowledge representation learning model. In addition, the present invention adopts different negative sample filtering methods, one is the random filtering "Raw" method; the other is to filter out the negative triples that originally existed in the knowledge graph in the randomly generated negative samples, which is called the "Filter" method. At the same time, for the negative sample sampling method, the present invention uses two different random sampling methods, the sampling of uniformly replacing the head and tail entities "unif"; the sampling of different probabilities of replacement "bern".

[0121] Result Analysis

[0122] To validate the effectiveness of the proposed model, this chapter not only incorporates the relevance function into the translation model TransE to obtain the wTransE model (i.e., the knowledge representation learning model), but also similarly incorporates the relevance function into the TransH and TransR models to obtain the wTransH and wTransR models, conducting extensive experiments. The entity link prediction results for the Wikidata_300k dataset are shown in Tables 3-5.

[0123] Table 3 Comparison results of link prediction on the Wikidata_300k dataset

[0124]

[0125] Tables 3-5 show that the filtering and sampling methods for negative triples significantly impact the performance of knowledge representation learning in link prediction tasks. Both the proposed model and the classic translation-based knowledge representation learning model achieve better prediction performance using the filter method than the raw method. Furthermore, a comparison of Bernoulli sampling (bern) and uniform sampling (unif) reveals that replacing the head or tail entity with different probabilities yields better results than uniform replacement. This suggests that filtering out negative triples already present in the knowledge graph and sampling them with a certain probability can lead to more accurate knowledge representation and improve link prediction results.

[0126] The distinction in relational semantics affects the performance of knowledge representation learning in link prediction tasks to a certain extent; compared with the TransE, TransH and TransR models, the wTransE, wTransH and wTransR models proposed in this invention all show better results, with an improvement of about 2% to 3% in the Hits@10 indicator. This shows that different relations do have different semantic characteristics, and the semantic preferences for knowledge graph relations contained in human historical experience have greatly assisted in the modeling of relational semantic features, and users have different semantic influences on relations. The knowledge representation learning model based on SPARQL query statements proposed in this invention achieves better modeling of entities and relations by incorporating relational semantic features into the translation model, thereby improving the performance of link prediction.

[0127] Furthermore, both the proposed model and the classic translation model, TransH and TransR, exhibited no significant optimization results compared to the TransE model, or even worse results. This is because the majority of triples in the Wikidata dataset are simple one-to-one relationships, and the TransH and TransR models, which were optimized for complex many-to-many relationships, are not effective on this dataset.

[0128] Similarly, for the Wikidata_1000k dataset, the present invention also compares the differences between the three classic models. Through experiments on the Wikidata_300k dataset, the present invention only selects Bernoulli sampling for experiments on the Wikidata_1000k dataset. The entity link prediction results are shown in Tables 3-6.

[0129] Table 4 Comparison results of link prediction on the Wikidata_1000k dataset

[0130]

[0131] As can be seen from Tables 3-6, the wTransE, wTransH, and wTransR models all demonstrate superior entity prediction, with improvements of approximately 3% to 4% in the Hits@10 metric. The present invention found that the model's optimization results on the Wikidata_1000k dataset were significantly improved compared to those on the Wikidata_300k dataset, as the Wikidata_1000k dataset and relationship set are more than double those of Wikidata_300k. This improvement fully demonstrates that relationships have different semantic levels. Establishing a relevance-aware knowledge representation learning model on a dataset with more relationships can achieve more accurate entity modeling and significantly improve link prediction. Furthermore, the larger the data volume, the larger the MeanRank value.

[0132] Experimental results show that the knowledge representation learning model proposed in this invention improves the accuracy of knowledge representation, and thus can be used to improve the personalized recommendation effect in the field of scientific literature.

[0133] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection of the present invention.

Claims

1. A method for recommending scientific and technological literature, characterized in that: The following steps are involved: S1: Constructing a scientific literature knowledge graph: Crawl scientific literature resource data to obtain unstructured text data; extract entities and relationships related to scientific literature from the unstructured text data to obtain entity sets and relationship sets, and construct triple sets based on the entity sets and relationship sets. Combine the entity sets, relationship sets, and triple sets to construct a scientific literature knowledge graph; S2: Build a user interaction database: collect historical behavioral interaction data of users on the scientific literature knowledge graph; collect natural language queries raised by users on the scientific literature knowledge graph and convert natural language queries into SPARQL query statements; store historical behavioral interaction data and SPARQL query statements; S3: Build a user preference model based on the user's interactive database and scientific literature knowledge graph. The user preference model includes a knowledge representation learning model and a recommendation model. The user preference model construction process specifically includes: S3-1: Construct a knowledge representation learning model based on SPARQL query statements combined with scientific literature knowledge graph; S3-2: Build a recommendation model based on historical behavioral interaction data, specifically including: S3-2-1: Calculate the similarity between user u and item i in the historical behavioral interaction data and the relationship r in the scientific literature knowledge graph of step S3-1; further calculate the attention weight distribution of relationship r in its relationship set and perform normalization to obtain the final value of the attention weight, multiply the attention weight by the corresponding relationship r, and establish a preference induction model for the specified user-item interaction pair and the relationship in the scientific literature knowledge graph; S3-2-2: Calculate the similarity between user u and item i in the historical behavior interaction data and entity e in the scientific literature knowledge graph of step S3-1; calculate the attention weight distribution of entity e in its entity set and perform normalization to obtain the final value of the attention weight, multiply the attention weight by the corresponding entity e, and establish a preference induction model for user-item interaction pairs and entities in the scientific literature knowledge graph; S3-2-3: Based on the user preference induction model for relationships in step S3-2-1 and the user preference induction model for entities in step S3-2-2, a user preference model for items is established. The loss function of the recommendation model is constructed using the user preference model for items. The loss function is continuously iterated through gradient descent to obtain the vector value of the user and the vector value of the item with user interaction characteristics. S4: Construct a balancing function to balance the entities in the knowledge representation learning model and the items in the recommendation model and train the knowledge representation learning model and the recommendation model at the same time to obtain user vector values ​​and entity vector values ​​that have both graph structure features and interactive semantic features, and generate a recommendation list based on the similarity between the user vector value and the entity vector value, arranged in descending order.

2. The method for recommending scientific literature according to claim 1, wherein: The step S3-1 is specifically as follows: S3-1-1: Analyze the temporal and frequency characteristics of binary predicates in SPARQL query statements and construct a relational semantic matrix, which is expressed as follows: Among them, S(r) represents the semantic weight value of relation r, It is the time trust growth factor; Represents a binary predicate group (P j ,P k ) in time frame τ i The frequency of occurrence of the SPARQL query statement set in the query; β is a hyperparameter that balances the total frequency of the infrequent predicate group; is the set of infrequent predicate groups, and FP is the set of frequent predicate groups; S3-1-2: Take the relational semantic matrix as input and use the weighted encoder to calculate the relevance of each triple linked by different relations in the scientific literature knowledge graph. The expression of the relevance function is as follows: Among them, w(h,r,t) is the triple relevance function; (h,r,t) is a triple, h is the head entity, r is the relationship, and t is the tail entity; is a set of triples whose head entity is h; S3-1-3: Based on the translation model and the triple relevance function, an energy function is constructed. The loss function of the relevance-aware knowledge representation learning model is constructed through the energy function. The vector values ​​of entities and relationships with knowledge graph structural characteristics are obtained by continuously iterating the loss function through gradient descent. The loss function of the knowledge representation learning model is expressed as follows: Among them, L kg is the loss function of the knowledge representation learning model, is a positive triple, that is, a triple that actually exists in the knowledge graph. is a negative triplet, that is, a triplet constructed by replacing the head entity or the tail entity, h′ represents the replaced head entity, and t′ represents the replaced tail entity; E(h, r, t) represents the distance score of the positive triplet of the translation model, E(h′, r, t′) represents the distance score of the negative triplet of the translation model, and γ is the boundary distance value.

3. The method for recommending scientific literature according to claim 2, wherein: The preference induction model for the relationship between the user-item interaction pair and the scientific literature knowledge graph is expressed as follows: in, Represents the preference induction model of the relationship between a specified user-item interaction pair and the scientific literature knowledge graph, represents the final value obtained by normalizing the attention weight of relation r in its relation set, u represents the user, i represents the item, represents the set of relationships directly associated with the interaction item i in the scientific literature knowledge graph; The preference induction model of user-item interaction pairs and entities in the scientific literature knowledge graph is expressed as follows: Among them, e represents an entity, which includes a head entity h and a tail entity t. represents the set of entities directly associated with interaction item i in the scientific literature knowledge graph; The loss function of the recommendation model is expressed as follows: L rs =∑ (u,i)∈y ∑ (u,i′)∈y′ -logσ[g(u,i′;p′)-g(u,i;p)]; Among them, L rs represents the loss function of the recommendation model, (u,i) represents the user-item interaction pair, (u,i′) represents the negative interaction pair constructed by randomly replacing the item, i′ represents the replaced item, logσ represents the BPR loss function calculation, y′ represents the set of negative interaction lists between users and items, y represents the set of interaction lists between users and items, g(u,i;p) represents the user's preference model for items, and g(u,i′;p′) represents the user's preference model for replaced items.

4. The method for recommending scientific literature according to claim 3, wherein: The energy function expression in step S3-1-3 is as follows: Among them, E(h,r,t / w) represents the energy function and E(h,r,t) represents the translation model.

5. The method for recommending scientific literature according to claim 4, wherein: The user's preference model expression for items in step S3-2-3 is as follows: Among them, p represents the interaction relationship vector, represents the interactive relationship vector after aggregating users’ preferences for relationships, It represents the project after aggregating the user's preference for the entity. L1 refers to the L1 paradigm and L2 refers to the L2 paradigm.

6. The method for recommending scientific literature according to claim 5, characterized in that: The balance function expression in step S4 is as follows: L=λL rs +(1-λ)L kg ; Among them, L is the balance function and λ is the hyperparameter.

Citation Information

Patent Citations

  • Broadcasting and TV program recommendation method based on knowledge graph and user microcosmic behaviors

    CN112732936A

  • Water conservancy literature recommendation method and system based on automatic completion of knowledge graph

    CN113239210A