A scholar search method and device based on cooperative network

By introducing a method based on word embedding and product quantization model in the scholar's retrieval system, the semantic information and topological properties in the scholar's cooperative network are used to solve the problem of existing systems ignoring cooperative relationships, and achieving higher retrieval accuracy and efficiency.

CN112732889BActive Publication Date: 2025-03-04SOUTHEAST UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202011420372.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-07
Publication Date
2025-03-04
Estimated Expiration
2040-12-07

AI Technical Summary

Technical Problem

The existing scholar search system only considers scholar attributes and paper information, ignores scholars' cooperative relationships, resulting in insufficient search accuracy.

Method used

A scholar search method based on word embedding is adopted, by constructing a scholar's cooperative network and adding network topological properties, a product quantization model is used to search scholar vectors to improve the search accuracy.

Benefits of technology

On the premise of ensuring the accuracy rate, the complete rate of search is significantly improved and the accuracy and efficiency of scholars' searches are enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FDA0005150993660000021
    Figure FDA0005150993660000021
  • Figure FDA0005150993660000041
    Figure FDA0005150993660000041
  • Figure GDA0002995886150000141
    Figure GDA0002995886150000141
Patent Text Reader

Abstract

The present invention relates to a scholar search method based on a cooperation network, and the method comprises the following steps: step one: constructing a scholar cooperation network; step two: optimizing the structure of the scholar cooperation network; step three: training a scholar node representation model; step four: establishing a scholar vector index; step five: searching scholars; the scheme realizes a search model based on word embedding, and compared with the traditional keyword search method, the search model based on word embedding can make full use of semantic information and improve the recall rate of the search.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a retrieval method and device, and in particular to a scholar retrieval method based on a cooperative network, and belongs to the technical field of information retrieval. Background Art

[0002] Innovation is the source of economic growth in modern countries or regions. The main problem of regional innovation is the introduction of talents. Scholars in universities undertake scientific research projects and apply high-value scientific and technological achievements in production, which can promote industrial upgrading and enhance competitiveness. How to accurately find scholars in massive information will become the key to talent introduction.

[0003] Scholar search plays an important role in the process of talent introduction. Scholars are experts in one or more cutting-edge fields who have mastered the latest scientific research trends and have a large number of personal connections. They can provide guidance to the R&D and production of enterprises. By analyzing the characteristics of the fields of scholars' scientific research data and building a scholar search model, we can help governments and enterprises locate scholars and complete talent introduction work.

[0004] Scholar retrieval has received extensive attention and in-depth research from experts in various fields, and the research results have been successfully applied to various systems, such as Aminer, Baidu Academic, etc. However, existing systems and models only consider scholar attributes or paper information. Scholars' cooperative relationships also imply a lot of information. Applying cooperative relationships to scholar retrieval can improve the accuracy of retrieval. Summary of the invention

[0005] The present invention is aimed at the problems existing in the prior art, and provides a scholar retrieval method based on a cooperative network. The technical solution proposes a scholar retrieval method based on word embedding. The word embedding model can learn semantic information, and the network topology attributes are added to the model, which can improve the accuracy in the retrieval model. The scholar retrieval process includes scholar node representation and scholar vector retrieval. First, a scholar cooperation network is constructed, and network topology information is added to the word embedding model to obtain a scholar node representation vector. The scholar vector is composed of a text vector and a node vector. The text vector is generated by the text of the current node and the adjacent nodes, while the node vector is generated by the adjacent nodes. The product quantization model is then used to retrieve the scholar vector and return the relevant scholars. It has been tested that the word embedding retrieval model can improve the recall rate while ensuring the precision rate compared to the traditional model.

[0006] In order to achieve the above object, the technical solution of the present invention is as follows: a scholar search method based on a collaborative network, the method comprising the following steps:

[0007] Step 1: Building a cooperative network of scholars;

[0008] Step 2: Optimize the structure of scholars’ cooperation network;

[0009] Step 3: Scholar node representation model training;

[0010] Step 4: Establish the scholar vector index;

[0011] Step 5: Scholar search.

[0012] As an improvement of the present invention, step 1: building a scholar cooperation network; specifically, reading scholar data and scholar cooperation output data from a database, including scholar data (ID, author, institution, age, title, introduction);

[0013] Scholars’ collaborative output data (ID, title, author, institution, abstract, journal, year, keywords); after reading the data, the data needs to be preprocessed to construct a scholar collaboration network. The scholar collaboration network uses scholars as nodes and the number of scholars’ collaborative outputs as edge weights. The construction process of the scholar collaboration network mainly uses the networkx toolkit. First, input the scholars’ collaborative outputs, such as papers, patents and other data. Then, based on the number of input statistical scholars, initialize the adjacency matrix of the scholar collaboration, and then loop through the participants of each paper or project, update the adjacency matrix, and finally output the adjacency matrix, which is the scholar collaboration network.

[0014] As an improvement of the present invention, step 2: optimizing the scholar cooperation network structure is as follows:

[0015] Step 1) Use logarithm to normalize the edge weights,

[0016] Step 2) Calculate the topological similarity, text similarity and path distance between scholars pairwise.

[0017] Step 3) Calculate the total similarity between scholars and sort them according to the similarity.

[0018] Step 4) Select the scholar relationships that rank in the top 10% of similarity between scholars and add scholar cooperation relationships.

[0019] Step 5) Select the scholar relationships that rank in the bottom 10% of similarity between scholars and delete the scholar collaboration relationships.

[0020] Step 6) Update the scholar collaboration network and the adjacency matrix.

[0021] In step 1), the normalized edge is to narrow the gap in the number of collaborations between different scholars. Scholars with more collaborations have higher similarity, and the distance between scholars should be smaller. The calculation formula is shown in 1:

[0022] p ij =1 / ln(p ij +1) (1)

[0023] where p ij is the weight of the edge.

[0024] Topology-based Similarity refers to the similarity between nodes in the graph in terms of topological structure. If two nodes have common neighbor nodes, they are more likely to be similar and have a cooperative relationship. The calculation formula is shown in 2:

[0025] topoSim(H, v)=2*|N(u)∩N(v)| / (d(u)+d(v)) (2)

[0026] Where N(u) is the collaborator of scholar u, N(u)∩N(v) is the common collaborator of scholar u and scholar v, d(u) is the degree of scholar u, and d(v) is the degree of scholar v;

[0027] Text similarity indicates the similarity of papers between scholars. The more similar the papers published by scholars are, the more potential cooperation there is. The calculation formula is shown in 3:

[0028]

[0029] where x u is the text vector of scholar u. This paper uses the BERT model to encode text information.

[0030] Scholar similarity is composed of the network topology, node attribute information and path distance between scholars. The calculation formula is shown in 4:

[0031] authorSim(u, v)=textSim(u, v)*topoSim(u, v) / dist(u, v) (4)

[0032] Among them, authorSim(u, v) is the similarity between scholars, dist(u, v) is the shortest path distance between scholar u and scholar v. When calculating the shortest path between scholar u and scholar v, if there is already a path between the scholar nodes, the current edge should be deleted and then the shortest path between the nodes should be calculated.

[0033] By using the algorithm to delete scholar collaborations with low similarity and add scholar collaborations with high similarity, the optimized collaboration network is closer to the real scholar community. In the tests of the scholar representation model and the scholar community discovery model, better results can be achieved.

[0034] As an improvement of the present invention, step three: scholar node representation model training; specifically as follows:

[0035] The CANE model integrates text context information into the network embedding vector, improving the model's ability to represent nodes in the network. However, the model focuses on mining the network topology information of nodes, while text information only serves as a supplement to network information. Therefore, the CANE model is suitable for network-related tasks such as community discovery and link prediction, but is difficult to apply to information retrieval. In addition, CANE uses a bag-of-words model, ignoring word order information.

[0036] This paper uses the BERT model and draws on the CANE model to propose a scholar node representation model suitable for information retrieval. The network topology information of scholars is added to the original word embedding model to obtain the scholar representation vector, which more accurately represents the scholar. Suppose the scholar collaborator network G = (V, E), where each vertex represents a scholar and each edge e =<u,v> Represents the relationship between scholar u and scholar v. The input of the model is {Tu, Tv, Su, Sv}, which respectively represent scholar u text information, scholar v text information, scholar u node and scholar v node. The calculation process of the model is as follows:

[0037] (1) Encode the text information of scholar u, the text information of scholar v, the scholar u node, and the scholar v node respectively, where the text information of scholars u and v is encoded using BERT, and the initial encoding of the scholar node is randomly generated;

[0038] (2) Send the encoded information to the convolution layer to obtain the convolution matrix;

[0039] (3) Concatenate the convolution matrices to obtain matrix T;

[0040] (4) Matrix T is encoded by self-attention to obtain matrix M. Transformer learns the implicit information between texts, nodes, and texts;

[0041] (5) Finally, multiply the matrix M by the weights and output u t 、v t 、u s 、v s , representing the text vector of scholar u, the text vector of scholar v, the network structure vector of scholar u and the network structure vector of scholar v respectively.

[0042] Unlike the CANE model, which learns text embedding and node embedding separately, the node representation model implemented in this paper can learn text information and network structure information at the same time through the self-attention layer. The text and network structure information can be mapped to the same vector space. During the model training process, the scholar pairs u and v are input to update the model. In addition, special data, that is, empty node pairs, are added to the input of the training model, such as scholar u and empty node, scholar v and empty node pairs, so that scholars can be encoded separately.

[0043] Secondly, the loss function of the CANE model focuses more on the network information of the node rather than the text information. The model implemented in this paper focuses on the text information as the optimization target. The optimization target of the model is shown in Formula 5:

[0044] ε=∑ e∈E L(e) (5)

[0045] The scholar vector is composed of the paper information vector and the network structure vector. s (e), L t (e) are the optimization targets based on network structure and text, respectively. The calculation formula is shown in 6:

[0046] L(e)=L s (e)+L t (e) (6)

[0047] For the optimization target L of the network structure s (e), adjacent nodes have similar structures. Suppose there is an edge between scholar nodes u and v. s is the structural vector of node v, the specific formula is shown in 7:

[0048] L s (e) = w u,v *log p(v s |u a ) (7)

[0049] For the text optimization target L t (e) The model takes scholar u and paper p as input to predict whether u has written paper p. The purpose is to make the node representation of the scholar closer to its text representation, and the current scholar's paper information also has a certain similarity with the co-author's paper. The specific formula is shown in 10:

[0050] L p (e) = w u,v log p(v t |v s ) (8)

[0051] L tt (e) = w u,v log p(v t |u t ) (9)

[0052] L t (e) = a*L tt (e)+β*L p (e) (10)

[0053] where v tand u t are the text representations of scholars v and u respectively. The loss function of the model implemented in this paper focuses more on the text information of scholars rather than network information. In actual tests, the scholar node representation of this model can achieve better results in retrieval.

[0054] As an improvement of the present invention, step 4: establishing the scholar vector index is as follows:

[0055] Scholars' retrieval is mainly achieved through vector retrieval. The time complexity of calculating vector similarity using cosine value is: O(n)=n*D, where n is the number of vectors and D is the dimension of the vector. When n and D are large, the complexity is higher. Establishing a vector index can compress the vector and speed up the retrieval.

[0056] (1) Scholar node vector index;

[0057] This paper adopts Milvus integrated product quantization

[37] The scholar vector is indexed by the method. The principle of the algorithm is to divide the original vector space into different subspaces, cluster each subspace, and then use the cluster center of each subspace to represent the original vector. The similarity of different subspaces can be calculated to get the similarity of the original vector.

[0058] The main calculation process of model training includes: vector clustering, distance calculation between cluster centers, and mapping of original vectors to cluster centers. Vector clustering uses the Kmeans algorithm. According to the principle of Kmeans, the time complexity of clustering is shown in Formula 11:

[0059] O(n)=(1*n*k*d) (11)

[0060] Where 1 is the number of iterations, n is the number of vectors, k is the number of cluster centers, and d is the dimension of the vector.

[0061] From the vector distance calculation formula, we can know that the time complexity of the distance between cluster centers is O(n)=(k*k*d), and the time complexity of calculating the cluster center corresponding to the original vector is O(n)=(n*k*d); there are a total of m subspaces for training, D is the dimension of the original vector. From this, we can see that the total complexity of training is shown in Formula 12:

[0062] O(n)=m*(l*n*k*D / m)+m*(k*k*D / m)+m*(n*k*D / d)

[0063] =D*k*(n*l+k+n)(12);

[0064] It can be seen from formula 12 that when the number of iterations 7 and the cluster center k in the clustering model are constants, the time complexity can be simplified to O(n)=D*n. Therefore, the time complexity of product quantization model training is only related to the vector dimension and the number of vectors. After the model training is completed, the clustering models of different subspaces are saved, and the distances between cluster centers are stored in the table for query during vector retrieval.

[0065] As an improvement of the present invention, step 5: scholar vector retrieval is as follows:

[0066] After the scholar vector index is established, the user enters the search topic and the system returns relevant scholars. The specific search steps are as follows:

[0067] (1) Vectorize the user's search topic through the scholar representation model and output the search vector Q;

[0068] (2) Read the scholar vector index and the cluster center trained by the model;

[0069] (3) Divide the search vector Q into m subspaces and find the cluster centers corresponding to different subspaces;

[0070] (4) Query the approximate distance between the search vector and the searched vector Q in the m subspaces through the index lookup table;

[0071] (5) The sum of the approximate distances of all subspaces is the approximate distance between the search vector Q and the searched scholar;

[0072] (6) Sort the approximate distances of all scholars and return the first n results.

[0073] Based on the above, we can know that the time complexity of product quantization retrieval is: 0(n)=n*m. When D is much larger than m, the time complexity of product quantization is much smaller than directly calculating the cosine value.

[0074] A device for scholar retrieval method based on a cooperative network, the device includes a data storage module, a background management module and a user retrieval module; wherein the data storage module stores the data required by the system. Scholar vector data used for scholar retrieval and unstructured data used to display scholars, institutions and achievements. According to the characteristics of the data, the storage of data can be divided into two modules: one is the milvus component for storing vector indexes; the other is the ES component for storing unstructured data; the background management module pre-processes the collected scholars and the scientific research data of scholars, builds a scholar cooperation network, trains models, and establishes data indexes. The data pre-processing component reads new data from the database, and its main tasks include data cleaning and scholar cooperation network construction. The model training component trains the scholar node representation model and generates scholar vectors. When indexing the component, the scholar vector is quantized by the product model to generate a vector index; the user retrieval module has the main functions of scholar retrieval and information display. The retrieval component is responsible for calculating similarity and sorting, and the visualization component copies information display and user interaction functions.

[0075] Compared with the prior art, the present invention has the following advantages:

[0076] 1) This solution implements a retrieval model based on word embedding. Compared with the traditional keyword retrieval method, the retrieval model based on word embedding can make full use of semantic information and improve the recall rate of retrieval.

[0077] 2) This solution implements a scholar retrieval model based on a collaborative network. The traditional text-based scholar retrieval model only considers text information and ignores the collaborative relationship between scholars. The scholar retrieval model based on a collaborative network has better results.

[0078] 3) This solution uses a synthetic quantization algorithm to establish a vector index, which takes up less space and has a faster retrieval speed than traditional vector retrieval. BRIEF DESCRIPTION OF THE DRAWINGS

[0079] Figure 1 It is a schematic diagram of the algorithm process;

[0080] Figure 2 Create a flow chart for the scholar collaboration network;

[0081] Figure 3 A partial diagram of the scholar collaboration network;

[0082] Figure 4 Schematic diagram of the model for scholar nodes;

[0083] Figure 5 Training flow chart for vector index;

[0084] Figure 6 This is a pseudo code diagram of the product quantization algorithm;

[0085] Figure 7 It is a pseudo code diagram of the product quantization similarity calculation algorithm;

[0086] Figure 8 It is the system functional structure diagram;

[0087] Fig. 9 Implement a class diagram for the system;

[0088] Fig.10 A comparison chart of the models for scholar node representation;

[0089] Fig.11 This is a comparison chart of PR curves for different query models;

[0090] Fig.12 Check the comparison chart of each model indicator;

[0091] Fig.13 Retrieve time comparison graph for the model; DETAILED DESCRIPTION

[0092] In order to deepen the recognition and understanding of the present invention, the present invention is further described below with reference to the accompanying drawings and embodiments.

[0093] Embodiment 1: A method for constructing scholar search based on a collaborative network, the method comprising the following steps:

[0094] Step 1: Build a cooperative network of scholars.

[0095] Step 2: Optimize the structure of scholars’ cooperation network.

[0096] Step 3: Scholar node representation model training.

[0097] Step 4: Establish the scholar vector index.

[0098] Step 5: Scholar search.

[0099] The algorithm process diagram is as follows: Figure 1 shown.

[0100] Each step is described in detail below.

[0101] Step 1: Constructing a scholar cooperation network, as follows:

[0102] Read scholar data and scholar collaboration data from the database, including:

[0103] Scholar data (ID, author, institution, age, title, introduction);

[0104] Scholars’ collaborative output data (ID, title, author, institution, abstract, journal, year, keyword); after reading the data, it is necessary to pre-process the data and build a scholar collaboration network. The scholar collaboration network uses scholars as nodes and the number of scholars’ collaborative outputs as the weight of the edge. The construction process of the scholar collaboration network mainly uses the networkx toolkit. The construction process is as follows: Figure 2 shown.

[0105] from Figure 2 It can be seen that the output of scholars’ cooperation is first input, such as papers, patents and other data. Then, according to the number of input statistical scholars, the adjacency matrix of scholars’ cooperation is initialized. Then, the participants of each paper or project are processed in a loop and the adjacency matrix is ​​updated. The final output adjacency matrix is ​​the scholars’ cooperation network. The effect of scholars’ cooperation network construction is as follows: Figure 3 shown.

[0106] Step 2: Optimize the scholar cooperation network structure, as follows:

[0107] The scholar cooperation network generated by the original data has problems such as missing data and noise, which makes the constructed scholar cooperation network unable to reflect the real scholar community. In the original cooperation network, the network structure is optimized according to the node similarity algorithm, adding cooperation relationships between scholars with high similarity and deleting cooperation relationships between scholars with low similarity. The algorithm combines the topological structure of the network, node attribute information and path distance between scholars. The specific process of implementation is as follows:

[0108] Step 1) Logarithmically normalize edge weights.

[0109] Step 2) Calculate the topological similarity, text similarity and path distance between scholars pairwise.

[0110] Step 3) Calculate the total similarity between scholars pairwise and sort them according to the similarity.

[0111] Step 4) Select the scholar relationships that rank in the top 10 percent in similarity between scholars and add scholar cooperation relationships.

[0112] Step 5) Select the scholar relationships that rank in the bottom 10 percent of similarity between scholars and delete the scholar collaboration relationships.

[0113] Step 6) Update the scholar collaboration network and the adjacency matrix.

[0114] In step 1), the normalized edge is to narrow the gap in the number of collaborations between different scholars. Scholars with more collaborations have higher similarity, and the distance between scholars should be smaller. The calculation formula is shown in 1:

[0115] p ij =1 / ln(p ij+1) (1)

[0116] where p ij is the weight of the edge.

[0117] Topology-based Similarity indicates the similarity between nodes in the graph in terms of topological structure. If two nodes have common neighbor nodes, they are more likely to be similar and have a cooperative relationship. The calculation formula is shown in 2:

[0118] topoSim(u, v)=2*|N(u)∩N(v)| / (d(u)+d(v)) (2)

[0119] Where N(u) is the collaborator of scholar u, N(u)∩N(v) is the common collaborator of scholar u and scholar v, d(u) is the degree of scholar u, and d(v) is the degree of scholar v.

[0120] Text similarity indicates the similarity of papers between scholars. The more similar the papers published by scholars are, the more potential cooperation there is. The calculation formula is shown in 3:

[0121]

[0122] where x u is the text vector of scholar u. This paper uses the BERT model to encode text information.

[0123] Scholar similarity is composed of the network topology, node attribute information and path distance between scholars. The calculation formula is shown in 5-4:

[0124] authorSim(u, v)=textSim(u, v)*topoSim(u, v) / dist(u, v) (4)

[0125] Among them, authorSim(u, v) is the similarity between scholars, dist(u, v) is the shortest path distance between scholar u and scholar v. When calculating the shortest path between scholar u and scholar v, if there is already a path between the scholar nodes, the current edge should be deleted and then the shortest path between the nodes should be calculated.

[0126] By using the algorithm to delete scholar collaborations with low similarity and add scholar collaborations with high similarity, the optimized collaboration network is closer to the real scholar community. In the tests of the scholar representation model and the scholar community discovery model, better results can be achieved.

[0127] Step 3: Scholar node representation model training, as follows:

[0128] The CANE model integrates text context information into the network embedding vector, improving the model's ability to represent nodes in the network. However, the model focuses on mining the network topology information of nodes, while text information only serves as a supplement to network information. Therefore, the CANE model is suitable for network-related tasks such as community discovery and link prediction, but is difficult to apply to information retrieval. In addition, CANE uses a bag-of-words model, ignoring word order information.

[0129] This paper uses the BERT model and draws on the CANE model to propose a scholar node representation model suitable for information retrieval. The network topology information of scholars is added to the original word embedding model to obtain the scholar representation vector, which represents the scholar more accurately. Assume that the scholar collaborator network G = (V, E), where each vertex represents a scholar and each edge e =<u,v> Represents the relationship between scholar u and scholar v. The model is as follows Figure 4 As shown in the figure, the input of the model is {Tu, Tv, Su, Sv}, which respectively represent the text information of scholar u, the text information of scholar v, the node of scholar u and the node of scholar v. The calculation process of the model is as follows:

[0130] (1) Encode the text information of scholar u, the text information of scholar v, the scholar u node and the scholar v node respectively, where the text information of scholars u and v is encoded using BERT, and the initial encoding of the scholar node is randomly generated.

[0131] (2) The encoded information is sent to the convolution layer to obtain the convolution matrix.

[0132] (3) Concatenate the convolution matrices to obtain matrix T.

[0133] (4) The matrix M is obtained by encoding the matrix T through self-attention. Transformer can learn the implicit information between texts, nodes, and texts.

[0134] (5) Finally, multiply the matrix M by the weights and output u t 、v t 、u s 、v s , representing the text vector of scholar u, the text vector of scholar v, the network structure vector of scholar u and the network structure vector of scholar v respectively.

[0135] Unlike the CANE model, which learns text embedding and node embedding separately, the node representation model implemented in this paper can learn text information and network structure information at the same time through the self-attention layer. The text and network structure information can be mapped to the same vector space. During the model training process, the scholar pairs u and v are input to update the model. In addition, special data, that is, empty node pairs, are added to the input of the training model, such as scholar u and empty node, scholar v and empty node pairs, so that scholars can be encoded separately.

[0136] Secondly, the loss function of the CANE model focuses more on the network information of the node rather than the text information. The model implemented in this paper focuses on the text information as the optimization target. The optimization target of the model is shown in Formula 5:

[0137] ε=∑ e∈E L(e) (5)

[0138] The scholar vector is composed of the paper information vector and the network structure vector. s (e), L t (e) are the optimization targets based on network structure and text, respectively. The calculation formula is shown in 6:

[0139] L(e)=L s (e)+L t (e) (6)

[0140] For the optimization target L of the network structure s (e), adjacent nodes have similar structures. Suppose there is an edge between scholar nodes u and v. s is the structural vector of node v, the specific formula is shown in 7:

[0141] L s (e) = w u,v *log p(v s |u s ) (7)

[0142] For the text optimization target L t (e). The model takes scholar u and paper p as input to predict whether u has written paper p. The purpose is to make the node representation of the scholar closer to its text representation, and the current scholar's paper information also has a certain similarity with the co-author's paper. The specific formula is shown in 10:

[0143] L p (e) = w u,v log p(v t |v s ) (8)

[0144] L tt (e) = wu,v log p(v t |u t ) (9)

[0145] L t (e) = α*L tt (e)+β*L p (e) (10)

[0146] where v t and u t are the text representations of scholars v and u respectively. The loss function of the model implemented in this paper focuses more on the text information of scholars rather than network information. In actual tests, the scholar node representation of this model can achieve better results in retrieval.

[0147] Step 4: Establish the scholar vector index, as follows:

[0148] Scholars' retrieval is mainly achieved through vector retrieval. The time complexity of calculating vector similarity by cosine value is: 0(n) = n*D, where n is the number of vectors and D is the dimension of the vector. The complexity is higher when n and D are large. Establishing vector index can compress vectors and speed up retrieval.

[0149] (1) Scholar node vector index

[0150] This paper adopts Milvus integrated product quantization

[37] The scholar vector is indexed by the method. The principle of the algorithm is to divide the original vector space into different subspaces, cluster each subspace, and then use the cluster center of each subspace to represent the original vector. The similarity of different subspaces can be calculated to get the similarity of the original vector.

[0151] The process of vector index training is as follows Figure 5 As shown in Figure 1, the main calculation process of model training includes: vector clustering, distance calculation between cluster centers, and mapping of original vectors to cluster centers. Vector clustering uses the Kmeans algorithm. According to the principle of Kmeans, the time complexity of clustering is shown in Formula 11:

[0152] O(n)=(1*n*k*d) (11)

[0153] Where 1 is the number of iterations, n is the number of vectors, k is the number of cluster centers, and d is the dimension of the vector.

[0154] From the vector distance calculation formula, we can know that the time complexity of the distance between cluster centers is O(n)=(k*k*d), while the time complexity of calculating the cluster center corresponding to the original vector is O(n)=(n*k*d). There are a total of m subspaces for training. D is the dimension of the original vector. It can be seen that the total complexity of training is shown in formula 12:

[0155] O(n)=m*(l*n*k*D / m)+m*(k*k*D / m)+m*(n*k*D / d)

[0156] =D*k*(n*l+k+n)(12)

[0157] From formula 12, we can see that when the number of iterations 1 and the cluster center k in the clustering model are constants, the time complexity can be simplified to O(n) = D*n, so the time complexity of the product quantization model training is only related to the vector dimension and the number of vectors. After the model training is completed, the clustering models of different subspaces are saved, and the distances between cluster centers are stored in a table for query during vector retrieval.

[0158] Algorithm 1 The pseudo code of the product quantization algorithm is as follows Figure 6 shown.

[0159] Step 5: Scholar vector retrieval, as follows:

[0160] After the scholar vector index is established, the user enters the search topic and the system returns relevant scholars. The specific search steps are as follows:

[0161] (1) The user’s search topic is vectorized through the scholar representation model, and the search vector Q is output.

[0162] (2) Read the scholar vector index and the cluster center trained by the model.

[0163] (3) Divide the search vector Q into m subspaces and find the cluster centers corresponding to different subspaces.

[0164] (4) The approximate distance between the search vector and the searched vector Q in the m subspaces is found through the index table lookup.

[0165] (5) The sum of the approximate distances of all subspaces is the approximate distance between the search vector Q and the searched scholar.

[0166] (6) Sort the approximate distances of all scholars and return the first n results.

[0167] Based on the above, we can know that the time complexity of product quantization retrieval is: O(n)=n*m. When D is much larger than m, the time complexity of product quantization is much smaller than directly calculating the cosine value.

[0168] Algorithm 2 The pseudo code of the product quantization similarity calculation algorithm is as follows Figure 7 shown.

[0169] Example 2: See Figure 8, a scholar search construction device based on a collaborative network, the overall functional structure of the system is designed as follows Figure 8 As shown in the figure, according to the function, it can be divided into data storage module, background management module and user retrieval module. This section will explain the functional design of the three modules.

[0170] 1. Data storage module. The data required by the storage system. Scholar vector data for scholar retrieval and unstructured data for displaying scholars, institutions and achievements. According to the data characteristics, data storage can be divided into two modules: one is the milvus component for storing vector indexes; the other is the ES component for storing unstructured data.

[0171] 2. Backend management module. Collect scholars and their scientific research data for preprocessing, build a scholar cooperation network, train models, and establish data indexes. The data preprocessing component reads new data from the database, and its main tasks include data cleaning and scholar cooperation network construction. The model training component trains the scholar node representation model and generates scholar vectors. When indexing the component, the scholar vector is quantized by the product model to generate a vector index.

[0172] 3. User retrieval module. The main functions include scholar retrieval and information display. The retrieval component is responsible for calculating similarity and sorting, and the visualization component replicates information display and user interaction functions.

[0173] The following describes the specific functions of each class:

[0174] 1. The main function of the View class is to parse data, render the data into a visual page, and present the data to the user.

[0175] 2. The main function of the Controller class is to receive user request parameters, parse the parameters and call related services in the system, and return the results to the View class.

[0176] 3. The function of the User class is to encapsulate user data, control user login registration and authority control.

[0177] 4. The function of the TextPreprocese class is to preprocess data, such as data consistency checking, scholar collaboration network construction, etc.

[0178] 5. The Model class is mainly responsible for model training and storage.

[0179] 6.The function of the Index class is to control the model version and load the model.

[0180] 7.Timer system scheduled tasks, such as model training and updating.

[0181] 8. The Connect class is responsible for connecting and reading data, such as connecting to databases such as MySQL and ES.

[0182] 9.The Index class is responsible for loading models and indexes.

[0183] 10. The Retrieval class is the focus of retrieval and is mainly responsible for calculating similarities and sorting results.

[0184] Experimental design and result analysis:

[0185] In order to prove the advancement of the retrieval method based on scholar cooperation network, a control experiment was designed to compare the experimental results.

[0186] Test environment:

[0187] 1. Hardware environment

[0188] CPU model:Inter(R)Core(TM)i5-6500CPU

[0189] Memory capacity: 16.0GB

[0190] Hard disk information: 240GB SSD

[0191] 2. Software environment

[0192] Operating system: Microsoft Windows 10

[0193] Database: Milvus, MySQL, ES

[0194] Development tools: PyCharm (Python IDE)

[0195] Programming language: Python 3.6

[0196] Browser: Chrome 75.0.3770.100

[0197] 3. Test tools and data

[0198] Testing tools: pytest, BurnInTest, jmeter, etc.

[0199] cora dataset: 2277 nodes, 2277 text information, 5214 edges

[0200] Datasets collected by the system: 60,000 scholars, 1.61 million scientific research outputs (including papers, patents, projects, etc.), 800,000 scholar partnerships

[0201] System algorithm test:

[0202] The purpose of system algorithm testing is to verify the advancement and feasibility of the algorithm. The main algorithms tested are: scholar node representation model and scholar retrieval model based on word embedding.

[0203] (1) Scholar node representation model test

[0204] The purpose of the scholar node vector representation model test is to verify whether the model can accurately represent scholars. The data set for the model test is the data set collected by the system. In the word embedding model, words with similar meanings are also distributed relatively close in space. Therefore, in the vector space, the quality of the model can be judged by the spatial distribution of scholars. The silhouette coefficient is one of the evaluation methods, which combines the two factors of cohesion and separation to evaluate the model. The calculation formula for the silhouette coefficient of a vector i in the cluster is shown in 11:

[0205] S(i)=(b(i)-a(i)) / max{a(i), b(i)} (11)

[0206] Where a(i) is the average distance from vector i to other points in the same cluster, and b(i) is the minimum distance from vector i to other clusters. It can be seen that the value of the silhouette coefficient is between [-1, 1]. The closer it is to 1, the better the cohesion and separation. The average value of the silhouette coefficient of all vectors is calculated, which is the evaluation index of the model.

[0207] Table 1 is a comparative experiment between the scholar node representation model implemented in this paper and other models. Under different dimensions of the vector, a higher silhouette coefficient can be achieved, indicating that it has a better clustering effect than other models.

[0208] Table 1 Contour coefficient comparison table

[0209]

[0210] The TSNE algorithm reduces the vector space to two dimensions, making it easier to observe the model effect. Fig.10 As shown in the figure, scholars from different disciplines are distributed in clusters in the vector space, automatically forming a clustering effect. Compared with the BERT model, the model implemented in this paper has a better clustering effect on scholars under the same topic, with a lower overlap and greater differentiation between scholars from different disciplines. The model implemented in this paper adds node information on the basis of word embedding, so that scholars from the same discipline have more cooperative relationships. Therefore, scholars from the same discipline are closer in space in the vector representation, and the clustering effect is better.

[0211] (2) Scholar retrieval model based on word embedding;

[0212] The purpose of the scholar retrieval model test based on word embedding is to verify whether the model can guarantee the retrieval accuracy and speed compared with the traditional retrieval method. The test data of the model is the data set collected by the system. In a query test, the results can be divided into four categories: relevant RR retrieved, irrelevant RN retrieved, relevant NR not retrieved, and irrelevant NN not retrieved. The precision and recall of the retrieval results can be defined, and the calculation formulas are shown in 12 and 13:

[0213]

[0214]

[0215] Based on the given evaluation indicators, this paper designs comparative experiments on the scholar retrieval model based on word embedding and the traditional retrieval model. The precision rate or recall rate alone does not reflect the performance of the retrieval, while the PR curve can comprehensively evaluate the model by combining the precision rate and the recall rate. The PR curve can accurately show the performance of the retrieval. The test results are as follows: Fig.11 As shown in the figure. The experimental results show that the word embedding-based retrieval method is better than or equal to the traditional retrieval method under different conditions when the precision rate is almost the same. As the recall rate increases, the precision rate can still be maintained at a high level. In general, the system performance represented by the upper curve in the PR curve is more superior.

[0216] The P@5, P@10, and P@20 of the query results are calculated respectively. P@n is the precision of the first n returned results, and R-pre is the recall. The experimental results are as follows Fig.12 The experimental results show that the word embedding-based retrieval method can guarantee a higher accuracy rate when the number of retrieval results is different, and the recall rate is better than other models.

[0217] The performance of different models is verified using different data scales. The test results are as follows: Fig.13 As shown in Figure 2, although the retrieval time of the word embedding-based retrieval model is slightly higher than that of other models, it can still meet user needs.

[0218] Through the comparison of the above three experiments, the retrieval method based on word embedding can meet the accuracy and improve the recall rate of retrieval, but the retrieval speed is slightly insufficient. The traditional retrieval model uses the keyword matching method and the bag-of-words model, which cannot retrieve different but related data. The scholar retrieval model based on word embedding uses the word embedding method and makes full use of semantic information to retrieve relevant data and improve the recall rate of the retrieval model.

[0219] It should be noted that the above embodiments are merely preferred embodiments of the present invention and are not intended to limit the protection scope of the present invention. Equivalent replacements or substitutions made on the basis of the above technical solutions all fall within the protection scope of the invention.

Claims

1. A scholar search method based on a collaborative network, characterized in that: The method comprises the following steps: Step 1: Building a cooperative network of scholars; Step 2: Optimize the structure of scholars’ cooperation network; Step 3: Scholar node representation model training; Step 4: Establish the scholar vector index; Step 5: Scholar search, Among them, step 1: scholar cooperation network construction; the details are as follows: read scholar data and scholar cooperation output data from the database, including: scholar data ID, author, institution, age, title, and introduction; The data of scholars’ cooperation output includes ID, title, author, institution, abstract, journal, year, and keywords. After reading the data, the data needs to be preprocessed to build a scholar cooperation network. The scholar cooperation network uses scholars as nodes and the number of scholars’ cooperation output as the weight of the edge. The construction process of the scholar cooperation network mainly uses the networkx toolkit. First, the scholars’ cooperation output is input, and then the adjacency matrix of the scholars’ cooperation is initialized according to the number of input statistical scholars. Then, the participants of each paper or project are processed in a loop, and the adjacency matrix is ​​updated. The final output adjacency matrix is ​​the scholar cooperation network. Step 2: Optimize the scholar cooperation network structure, as follows: Step 1) Use logarithm to normalize the edge weights, Step 2) Calculate the topological similarity, text similarity and path distance between scholars pairwise. Step 3) Calculate the total similarity between scholars and sort them according to the similarity. Step 4) Select the scholar relationships that rank in the top 10% of similarity between scholars and add scholar cooperation relationships. Step 5) Select the scholar relationships that rank in the bottom 10% of similarity between scholars and delete the scholar collaboration relationships. Step 6) Update the scholar collaboration network and the adjacency matrix. In step 1), the normalized edge is to narrow the gap in the number of collaborations between different scholars. Scholars with more collaborations have higher similarity, and the distance between scholars should be smaller. The calculation formula is shown in 1: pp ij =1 / ln(p ij +1) (1) where p ij is the weight of the edge; Topology-based Similarity refers to the similarity between nodes in the graph in terms of topological structure. If two nodes have common neighbor nodes, they are similar and have a cooperative relationship. The calculation formula is shown in 2: topoSim(u,v)=2*|N(u)∩N(v)| / (d(u)+d(v)) (2) Where N(u) is the collaborator of scholar u, N(u)∩N(v) is the common collaborator of scholar u and scholar v, d(u) is the degree of scholar u, and d(v) is the degree of scholar v; Text similarity indicates the similarity of papers between scholars, and the calculation formula is shown in 3: where x u is the text vector of scholar u. This paper adopts the BERT model to encode text information; Scholar similarity is composed of the network topology, node attribute information and path distance between scholars. The calculation formula is shown in 4: authorSim(u,v)=textSim(u,v)*topoSim(u,v) / dist(u,v) (4) Where authorSim(u,v) is the similarity between scholars, dist(u,v) is the shortest path distance between scholar u and scholar v. When calculating the shortest path between scholar u and scholar v, if there is already a path between the scholar nodes, delete the current edge and then calculate the shortest path between the nodes. Step 3: Scholar node representation model training; details are as follows: The network topology information of scholars is added to the original word embedding model to obtain the scholar representation vector, which more accurately represents the scholar. Suppose the scholar collaborator network G = (V, E), where each vertex represents a scholar and each edge e =<u,v> Represents the relationship between scholar u and scholar v. The input of the model is {Tu, Tv, Su, Sv}, which respectively represent scholar u text information, scholar v text information, scholar u node and scholar v node. The calculation process of the model is as follows: (1) Encode the text information of scholar u, the text information of scholar v, the scholar u node, and the scholar v node respectively, where the text information of scholars u and v is encoded using BERT, and the initial encoding of the scholar node is randomly generated; (2) Send the encoded information to the convolution layer to obtain the convolution matrix; (3) Concatenate the convolution matrices to obtain matrix T; (4) Matrix T is encoded by self-attention to obtain matrix M. Transformer learns the implicit information between texts, nodes, and texts; (5) Finally, multiply the matrix M by the weights and output u t 、v t 、u s 、v s , respectively represent the text vector of scholar u, the text vector of scholar v, the network structure vector of scholar u and the network structure vector of scholar v; The model implemented in this paper focuses on text information as the optimization target. The optimization target of the model is shown in Formula 5: ε=∑ e∈E L(e) (5) The scholar vector is composed of the paper information vector and the network structure vector. s (e), L t (e) are the optimization targets based on network structure and text, respectively. The calculation formula is shown in 6: L(e)=L s (e)+Lt(e) (6) For the optimization target L of the network structure s (e), adjacent nodes have similar structures. Suppose there is an edge between scholar nodes u and v. s is the structural vector of node v, the specific formula is shown in 7: L s (e)=w u,v *logp(v s |u s ) (7) For the text optimization target L t (e) The model takes scholar u and paper p as input to predict whether u has written paper p. The specific formula is shown in 10: L p (e)=w u,v logp(v t |v s ) (8) L tt (e)=w u,v logp(v t |u t ) (9) L t (e)=α*L tt (e)+β*L p (e) (10) where v t and u t are the text representations of scholars v and u respectively; Step 4: Establish the scholar vector index, as follows: Scholars’ retrieval is mainly realized through vector retrieval. The time complexity of calculating vector similarity by cosine value is: O(n)=n*D, where n is the number of vectors and D is the dimension of the vector. (1) Scholar node vector index; This paper uses the product quantization method of Milvus integration to index scholar vectors. The algorithm principle is to divide the original vector space into different subspaces, cluster each subspace, and then use the cluster center of each subspace to represent the original vector. By calculating the similarity of different subspaces, the similarity of the original vector can be obtained. The main calculation process of model training includes: vector clustering, distance calculation between cluster centers, and mapping of original vectors to cluster centers. Vector clustering uses the Kmeans algorithm. The time complexity of clustering is shown in Formula 11: O(n)=(l*n*k*d) (11) Where l is the number of iterations, n is the number of vectors, k is the number of cluster centers, and d is the dimension of the vector. From the vector distance calculation formula, we can know that the time complexity of the distance between cluster centers is O(n)=(k*k*d), and the time complexity of calculating the cluster center corresponding to the original vector is O(n)=(n*k*d); there are a total of m subspaces for training, D is the dimension of the original vector, and the total complexity of training is shown in Formula 12: O(n)=m*(l*n*k*D / m)+m*(k*k*D / m)+m*(n*k*D / d) =D*k*(n*l+k+n)(12); It can be seen from Formula 12 that when the number of iterations l and the cluster center k in the clustering model are constants, the time complexity is simplified to O(n) = D*n. Therefore, the time complexity of product quantization model training is only related to the vector dimension and the number of vectors. After the model training is completed, the clustering models of different subspaces are saved, and the distances between the cluster centers are stored in the table for query during vector retrieval.

2. The scholar search method based on a collaborative network according to claim 1, characterized in that: Step 5: Scholar search, as follows: After the scholar vector index is established, the user enters the search topic and the system returns relevant scholars. The specific search steps are as follows: (1) Vectorize the user's search topic through the scholar representation model and output the search vector Q; (2) Read the scholar vector index and the cluster center trained by the model; (3) Divide the search vector Q into m subspaces and find the cluster centers corresponding to different subspaces; (4) Query the approximate distance between the search vector and the searched vector Q in the m subspaces through the index lookup table; (5) The sum of the approximate distances of all subspaces is the approximate distance between the search vector Q and the searched scholar; (6) Sort the approximate distances of all scholars and return the top N results; Based on the above, we can know that the time complexity of product quantization retrieval is: O(n)=n*m.

3. A device for implementing the scholar search method based on a collaborative network as described in any one of claims 1-2, characterized in that: The device includes a data storage module, a background management module and a user retrieval module; The data storage module stores the data needed by the system, the scholar vector data used for scholar retrieval, and the unstructured data used to display scholars, institutions, and achievements. According to the data characteristics, the data storage is divided into two modules: one is the milvus component that stores vector indexes; the other is the ES component that stores unstructured data; The backend management module collects scholars and pre-processes their scientific research data, builds a scholar cooperation network, trains models, and establishes data indexes. The data pre-processing component reads new data from the database. Its main tasks include data cleaning and scholar cooperation network construction. The model training component trains the scholar node representation model and generates scholar vectors. When indexing, the scholar vector is quantized by the product model to generate a vector index. The user retrieval module has the following main functions: scholar retrieval and information display. The retrieval component is responsible for calculating similarity and sorting, and the visualization component is responsible for copying information display and user interaction functions.

Citation Information

Patent Citations

  • Academic team construction method based on network representation learning training

    CN110717043A