Method, device and computer equipment for determining vector representation of a group in a network
By generating the target group sequence and inputting a word vector model, the lack of group vector representation learning in the network is solved, and the determination of similarity between groups and the accuracy of network tasks is achieved.
Patent Information
- Application Number
- CN201910982737.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-10-16
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2039-10-16
AI Technical Summary
The prior art lacks a vector representation learning method for groups in the network, and cannot effectively determine the similarity between groups, affecting the accuracy of classification and clustering tasks in the network.
By obtaining objects and groups in the network, the target transfer matrix between objects and groups is generated, the threshold is obtained and the target group sequence is generated, and the sequence is finally input into the word vector model to obtain the vector representation of each group.
It is realized that each group in the network is converted into a corresponding vector representation, and the similarity between groups can be determined, thereby improving the accuracy of classification and clustering tasks in the network.
Smart Images

Figure CN110807130B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, apparatus, computer-readable storage medium and computer device for determining a vector representation of a group in a network. Background Art
[0002] As an important way to represent information, network structure has been widely studied and applied in many fields, such as social network analysis, bioinformatics, etc. The distance between two closely connected node vectors in the vector space will be very close, so using network representation learning to map the data elements in the network into low-dimensional vector representations can solve various application tasks in the network, such as classification tasks, clustering tasks, etc.
[0003] The similarity between nodes, between nodes and groups, and between groups in the network has a great impact on research in social network analysis and bioinformatics networks. Currently, there are various network representation learning methods for nodes, which convert nodes into vector representations to determine the similarity between nodes, but there is no corresponding representation learning method for groups in the network. Summary of the invention
[0004] Based on this, it is necessary to provide a method, apparatus, computer-readable storage medium and computer device for determining a vector representation of a group in a network in response to the technical problems in the background technology.
[0005] A method for determining a vector representation of a group in a network, the method comprising:
[0006] Obtaining objects and groups in the network, wherein the objects are nodes or basic graphs; the basic graphs are generated by selecting a preset number of nodes from the groups;
[0007] generating a target transfer matrix between the objects according to the objects;
[0008] generating a transfer matrix between the object and the group according to the object and the group;
[0009] Obtaining a threshold, and generating a target group sequence according to the threshold, a target transfer matrix between the objects, and a transfer matrix between the object and the group;
[0010] The target group sequence is input into a word vector model to obtain a vector representation of each group in the network.
[0011] An apparatus for determining a vector representation of a group in a network, the apparatus comprising:
[0012] An acquisition module, used to acquire objects and groups in the network, wherein the objects are nodes or basic graphs;
[0013] A first generating module, used for generating a target transfer matrix between the objects according to the objects;
[0014] A second generating module, configured to generate a transfer matrix between the object and the group according to the object and the group;
[0015] A third generating module, configured to obtain a threshold value, and generate a target group sequence according to the threshold value, a target transfer matrix between the objects, and a transfer matrix between the object and the group;
[0016] The output module is used to input the target group sequence into the word vector model to obtain the vector representation of each group in the network.
[0017] A computer-readable storage medium stores a computer program, which, when executed by a processor, causes the processor to perform the following steps:
[0018] Obtaining objects and groups in the network, wherein the objects are nodes or basic graphs; the basic graphs are generated by selecting a preset number of nodes from the groups;
[0019] generating a target transfer matrix between the objects according to the objects;
[0020] generating a transfer matrix between the object and the group according to the object and the group;
[0021] Obtaining a threshold, and generating a target group sequence according to the threshold, a target transfer matrix between the objects, and a transfer matrix between the object and the group;
[0022] The target group sequence is input into a word vector model to obtain a vector representation of each group in the network.
[0023] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the following steps:
[0024] Obtaining objects and groups in the network, wherein the objects are nodes or basic graphs; the basic graphs are generated by selecting a preset number of nodes from the groups;
[0025] generating a target transfer matrix between the objects according to the objects;
[0026] generating a transfer matrix between the object and the group according to the object and the group;
[0027] Obtaining a threshold, and generating a target group sequence according to the threshold, a target transfer matrix between the objects, and a transfer matrix between the object and the group;
[0028] The target group sequence is input into a word vector model to obtain a vector representation of each group in the network.
[0029] The above method, device, computer-readable storage medium and computer equipment for determining the vector representation of a group in a network obtain objects and groups in the network, the object being a node or a basic graph; the basic graph is generated by selecting a preset number of nodes from the group, generating a target transfer matrix between the objects based on the object, generating a transfer matrix between the object and the group based on the object and the group, obtaining a threshold, generating a target group sequence based on the threshold, the target transfer matrix between the objects and the transfer matrix between the object and the group, inputting the target group sequence into a word vector model, and obtaining a vector representation of each group in the network. The present solution can realize the conversion of each group in the network into a corresponding vector representation, and can determine the similarity between the groups in the network, thereby improving the accuracy of the classification task and clustering task in the network through the similarity between the groups. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 A diagram of an application environment of a method for determining a vector representation of a group in a network in one embodiment;
[0031] Figure 2 A schematic flow chart of a method for determining a vector representation of a group in a network in one embodiment;
[0032] Figure 3 A flowchart of steps for generating a target transfer matrix between objects in one embodiment;
[0033] Figure 4 is a flow chart of the steps of obtaining a target transfer matrix between objects in another embodiment;
[0034] Figure 5 A schematic flow chart of steps for generating a target group sequence in one embodiment;
[0035] Figure 6 A schematic flow chart of steps for generating a basic graph corresponding to each group in one embodiment;
[0036] Figure 7 A flowchart of steps for converting an object into a corresponding vector representation in one embodiment;
[0037] Figure 8 is the type of basic graph in one embodiment;
[0038] Fig. 9 A schematic flow chart of a method for determining a vector representation of a group in a network in one embodiment;
[0039] Fig.10 is a structural diagram of a network in an embodiment;
[0040] Fig.11 is a schematic diagram of a group vector representation obtained based on two group similarities in one embodiment;
[0041] Fig.12 A structural block diagram of an apparatus for determining a vector representation of a group in a network in another embodiment;
[0042] Fig.13 FIG. 4 is a structural block diagram of a computer device in one embodiment. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0044] Figure 1 FIG. 1 is an application environment diagram of a method for determining a vector representation of a group in a network in one embodiment. Figure 1 The method for determining the vector representation of a group in a network is applied to a system for determining the vector representation of a group in a network. The system for determining the vector representation of a group in a network includes a terminal 110 and a server 120. The terminal 110 and the server 120 are connected via a network. The terminal 110 may be a desktop terminal or a mobile terminal, and the mobile terminal may be at least one of a mobile phone, a tablet computer, a laptop computer, etc. The server 120 may be implemented as an independent server or a server cluster consisting of multiple servers.
[0045] In this embodiment, the terminal 110 can obtain a network whose vector representation of a group needs to be determined, and send the network to the server 120. The server 120 receives the network and obtains objects and groups in the network, where the object is a node or a basic graph. The basic graph is generated by selecting a preset number of nodes in the group. Then, the server 120 generates a target transfer matrix between the objects based on the object, and generates a transfer matrix between the object and the group based on the object and the group. Then, the server 120 obtains a threshold, and generates a target group sequence based on the threshold, the target transfer matrix between the objects, and the transfer matrix between the object and the group. Then, the server 120 inputs the target group sequence into the word vector model to obtain the vector representation of each group in the network.
[0046] In other embodiments, the terminal 110 may directly obtain objects and groups in the network, where the object is a node or a basic graph. The basic graph is generated by selecting a preset number of nodes from the group. Then, the terminal 110 generates a target transfer matrix between objects based on the object, and generates a transfer matrix between the object and the group based on the object and the group. Then, the terminal 110 obtains a threshold, and generates a target group sequence based on the threshold, the target transfer matrix between objects, and the transfer matrix between objects and the group. Then, the terminal 110 inputs the target group sequence into a word vector model to obtain a vector representation of each group in the network.
[0047] like Figure 2 As shown, in one embodiment, a method for determining a vector representation of a group in a network is provided. This embodiment mainly applies this method to the above Figure 1 The terminal 110 in FIG. Figure 2 , the method for determining the vector representation of a group in a network specifically comprises the following steps:
[0048] Step 202, obtaining objects and groups in the network, where the objects are nodes or basic graphs; the basic graph is generated by selecting a preset number of nodes in the group.
[0049] Among them, the network refers to online social networks, academic networks, networks in the field of bioinformatics, and networks in the field of cheminformatics. Online social networks can specifically be networks composed of data such as user group relationships, active group relationships, discussion groups, sending and receiving messages, publishing content (articles, status, social pictures and videos, etc.), liking / comments for others or content, sending / receiving red envelopes, user-associated geographic locations, and user ages as objects. The network in the field of bioinformatics can specifically be a protein interaction network, and the network in the field of cheminformatics can specifically be a molecular structure network, but is not limited to this. An object refers to a node or a basic graph. A basic graph refers to a graph composed of nodes and edges connecting nodes. A group refers to a group of nodes in a network and the edges within them.
[0050] Specifically, the terminal obtains a network represented by a vector of a group to be determined, and obtains all groups in the network. Then, the terminal randomly selects a preset number of nodes from each group to generate a basic graph corresponding to each group. Furthermore, the terminal may randomly select a preset number of nodes from the group multiple times to generate a basic graph, so that each group corresponds to a specified number of basic graphs.
[0051] Step 204: Generate a target transfer matrix between objects based on the objects.
[0052] Among them, the target transfer matrix between objects refers to the matrix composed of the possibility of each object transferring to another object. For example, when the object is a node, the target transfer matrix between objects refers to the matrix composed of the possibility of each node in the network transferring to another node. When the object is a basic graph, the target transfer matrix between objects refers to the matrix composed of the possibility of each basic graph transferring to another basic graph.
[0053] Specifically, the terminal can obtain all objects in the network and calculate the possibility of each object transferring to another object in the network, thereby obtaining the target transfer matrix between objects. For example, there are 100 objects in the network, which can form a 100*100 target transfer matrix. The elements in the target transfer matrix can be represented by a ij Indicates that a ij represents the element in the i-th row and j-th column of the target matrix, and the element a ij It represents the possibility of transferring from the i-th node to the j-th node.
[0054] In this embodiment, when the object is a node, the terminal may first construct a relationship matrix between nodes in the network, and calculate the possibility of each node in the network transferring to another node, thereby obtaining a target transfer matrix between nodes.
[0055] In this embodiment, when the object is a basic graph, the terminal may first construct a relationship matrix between the basic graphs, and calculate the possibility of each basic graph transferring to another basic graph, thereby obtaining a target transfer matrix between the basic graphs.
[0056] Step 206: Generate a transfer matrix between the object and the group according to the object and the group.
[0057] The transfer matrix between the object and the group may include: a transfer matrix from the object to the group and a transfer matrix from the group to the object. The transfer matrix from the object to the group refers to a matrix formed by the possibility of the object to the group transfer, and the transfer matrix from the group to the object refers to a matrix formed by the possibility of the group to the object transfer.
[0058] Specifically, the terminal determines the number of groups in the network and the number of objects contained in each group. Then, the terminal calculates the possibility of each object transferring to each group, and obtains the transfer matrix from the object to the group. Furthermore, the terminal calculates the possibility of each group transferring to each object, and obtains the transfer matrix from the group to the object.
[0059] In this embodiment, when the object is a node, the terminal determines the number of nodes included in each group. When the object is a basic graph, the terminal determines the number of basic graphs corresponding to each group.
[0060] Step 208 , obtaining a threshold, and generating a target group sequence according to the threshold, a target transfer matrix between objects, and a transfer matrix between objects and groups.
[0061] The threshold value refers to a value selected from a preset interval. Each element in the target group sequence is a group, which refers to a sequence composed of groups as elements. Furthermore, when the object is a node, the target group sequence refers to a sequence obtained by deleting the node, retaining the group, and taking the retained group as an element of the sequence. When the object is a basic graph, the target group sequence refers to a sequence obtained by deleting the basic graph, retaining the group, and taking the retained group as an element of the sequence.
[0062] Specifically, the terminal selects a value from a preset interval as a threshold, and then selects groups and objects as sequence elements to generate a target group sequence according to the threshold, the target transfer matrix between objects, the transfer matrix from objects to groups, and the transfer matrix from groups to objects according to preset rules.
[0063] Step 210: input the target group sequence into a word vector model to obtain a vector representation of each group in the network.
[0064] The word vector model is an unsupervised learning model for learning word vectors. Given a corpus, the word vector model can capture the similarity between words with similar sequence distances to learn word vectors. The word vector model can be a Skip-gram model.
[0065] Specifically, the terminal inputs the target group sequence corresponding to each group into the word vector model, which can capture the similarity between words with close distances in the sequence to learn the word vector. Nodes that are close to each other on the network are more likely to be located in the same random walk sequence and are also close in position in the sequence. Therefore, by inputting the generated target group sequence into the skip-gram model, the similarity between nodes can be captured to obtain the group vector representation.
[0066] The above method for determining the vector representation of a group in a network obtains an object and a group in the network, the object is a node or a basic graph, the basic graph is generated by selecting a preset number of nodes from the group, a target transfer matrix between the objects is generated according to the object, a transfer matrix between the object and the group is generated according to the object and the group, a threshold is obtained, a target group sequence is generated according to the threshold, the target transfer matrix between the objects, and the transfer matrix between the object and the group, the target group sequence is input into a word vector model, and a vector representation of each group in the network is obtained. The present solution can realize the conversion of each group in the network into a corresponding vector representation, so that the similarity between the groups in the network can be determined, thereby improving the accuracy of the classification task and clustering task in the network through the similarity between the groups.
[0067] In one embodiment, Figure 3 As shown, the target transfer matrix between objects is generated according to the objects, including:
[0068] Step 302: convert the object into a corresponding vector representation.
[0069] Specifically, the terminal may convert each object in the network into a corresponding vector representation. When the object is a node, each node in the network is converted into a vector representation corresponding to each node. When the object is a basic graph, the basic graph corresponding to each group is converted into a vector representation corresponding to each basic graph.
[0070] In this example, when the object is a node, the terminal can run the DeepWalk model on the network, first perform a random walk on the network to generate multiple node sequences, and then input the node sequences into the trained skip-gram model. The skip-gram model can output the vector representation corresponding to each node.
[0071] Step 304: Determine the similarity between every two objects according to the vector representations of the two objects.
[0072] Specifically, the terminal may first construct a relationship matrix between objects in the network. For example, if there are 100 objects in the network, a 100*100 relationship matrix may be constructed. Then, the terminal may represent the vectors corresponding to each two objects as inner products to obtain the similarity between the two objects.
[0073] Step 306: Obtain a target transfer matrix between objects according to the similarity between each two objects.
[0074] Specifically, the terminal replaces the elements of the corresponding two objects in the relationship matrix with the similarity between each two objects to obtain the target transfer matrix between the objects. For example, the elements in the relationship matrix can be represented by a ij Indicates that i and j here both represent objects, a ij represents the element in the i-th row and j-th column of the relationship matrix. The terminal then takes the inner product of the vector representation of the i-th object and the vector representation of the j-th object to obtain the similarity between the i-th object and the j-th object, and uses the similarity to replace the element in the i-th row and j-th column of the relationship matrix, that is, replaces a with the similarity between the i-th object and the j-th object. ij . Change a in the relationship matrix ij After all are replaced with the corresponding similarities, the target transfer matrix between objects can be obtained.
[0075] In this embodiment, after replacing the elements of each two objects in the relationship matrix with the similarity between each two objects, the method further includes: normalizing the replaced matrix to obtain a target transfer matrix between the objects.
[0076] The above method for determining the vector representation of a group in a network converts the object into a corresponding vector representation, determines the similarity between each two objects based on the vector representation of the objects, and obtains the target transfer matrix between the objects based on the similarity between the two objects. It can measure the similarity between objects in the network and clearly express the correlation between objects.
[0077] In one embodiment, when the objects are nodes, generating a target transfer matrix between objects according to the objects includes:
[0078] Determine the network adjacency matrix; normalize the adjacency matrix to obtain the target transfer matrix between nodes.
[0079] Among them, the adjacency matrix (Adjacency Matrix): is a matrix that represents the adjacent relationship between vertices.
[0080] Specifically, the terminal can obtain nodes and edges in the network and determine the number of nodes and the number of edges. The terminal can determine the nodes corresponding to the two ends of each edge, take each edge as the starting point, generate an adjacency list based on the nodes at both ends of each edge, and then convert the adjacency list into the adjacency matrix of the network. By determining the network adjacency matrix, the target transfer matrix between nodes can be determined simply and quickly.
[0081] In one embodiment, Figure 4 As shown, the target transfer matrix between objects is obtained according to the similarity between each two objects, including:
[0082] Step 402: obtaining an initial transfer matrix between objects according to the similarity between each two objects.
[0083] Specifically, the terminal may first construct a relationship matrix between objects in the network. For example, if there are 100 objects in the network, a 100*100 relationship matrix may be constructed. Then, the terminal may represent the vectors corresponding to each two objects as inner products to obtain the similarity between the two objects. The terminal replaces the elements corresponding to each two objects in the relationship matrix with the similarity between the two objects to obtain the initial transfer matrix between the objects.
[0084] Step 404 : Select a preset number of elements from the values of the elements in the initial transfer matrix between the objects, and replace the values of the remaining elements other than the selected preset number of elements with 0.
[0085] Step 406: Use the transfer matrix obtained after replacement as the target transfer matrix between objects.
[0086] Specifically, when there are many objects in the network, the initial transfer matrix obtained will be very dense. Then the terminal can select the values of a preset number of elements from each row of the initial transfer matrix and retain the values of the selected elements. Then, the terminal replaces the values of the elements in each row of the initial transfer matrix except the selected elements with 0. The transfer matrix obtained after the replacement is the target transfer matrix between objects.
[0087] The above method for determining the vector representation of a group in a network obtains an initial transfer matrix between objects based on the similarity between each two objects, selects a preset number of elements from the values of the elements in the initial transfer matrix between objects, replaces the values of the remaining elements other than the selected preset number of elements with 0, and uses the transfer matrix obtained after the replacement as the target transfer matrix between objects, which can reduce the amount of calculation and save memory space.
[0088] In one embodiment, selecting a preset number of elements from the values of elements in the initial transfer matrix between objects, and replacing the values of the remaining elements other than the selected preset number of elements with 0, comprises:
[0089] A preset number of elements are selected from the values of the elements in each row of the initial transfer matrix between the objects from high to low, and the values of the remaining elements in each row except the selected preset number of elements are replaced with 0.
[0090] Specifically, after the terminal obtains the initial transfer matrix between the objects, for each row in the initial transfer matrix, a preset number of elements are selected from high to low according to the value of the element. The values of the selected elements in each row are retained, and the values of the remaining elements except the selected elements are replaced with 0, thereby obtaining the target transfer matrix between the objects. By retaining the largest values in each row of the initial transfer matrix, the key information of the elements in each row can be retained to the maximum extent, and the values of other elements are replaced with 0, which can reduce the amount of calculation, thereby improving the efficiency of converting the groups in the network into corresponding vector representations.
[0091] In one embodiment, the transfer matrix obtained after the replacement is used as the target transfer matrix between the objects, including:
[0092] The transfer matrix obtained after replacement is normalized to obtain the target transfer matrix between objects.
[0093] Among them, normalization can transform a K-dimensional vector containing any real number into another K-dimensional real vector, so that each element ranges between 0 and 1, and the sum of all elements is 1.
[0094] Specifically, the values of some elements in the transfer matrix obtained after replacement are relatively large, so the amount of calculation is also large. In order to reduce the amount of calculation and achieve the same effect as the original value, the values of the elements in the matrix can be normalized by row to obtain the normalized transfer matrix, that is, the target transfer matrix between objects. Further, the terminal can determine the maximum value of each row of elements in the replaced matrix, and divide the value of each row of elements by the maximum value of the row, thereby realizing the normalization of the matrix. By normalizing the transfer matrix obtained after replacement, the target transfer matrix between objects is obtained, so that the target transfer matrix still retains the key information of the original data and can effectively reduce the amount of calculation.
[0095] In one embodiment, the transfer matrix between the object and the group includes a transfer matrix from the group to the object and a transfer matrix from the object to the group;
[0096] The step of generating a transfer matrix between the object and the group according to the object and the group includes:
[0097] A transfer matrix from the group to the object is generated according to the group and the object; and a transfer matrix from the group to the object is transposed to obtain a transfer matrix from the object to the group.
[0098] Specifically, the terminal obtains all groups and objects in the network, and can label the groups in the network and label each object in the network. The group labels and object labels can be digital labels or letter labels. Then, the terminal determines the relationship between the groups and objects, that is, determines which objects are included in each group. And according to the group labels, each group is used as a row of the matrix, and according to the object labels, each object is used as a column of the matrix, so as to obtain the transfer matrix from the group to the object.
[0099] In this embodiment, when the object is a node, the terminal can determine which nodes are included in each group in the network. According to the relationship between the node and the group, each group in the network is used as a row of the matrix according to the group number, and each node is used as a column of the matrix according to the node number, so as to obtain a transfer matrix from the group to the node.
[0100] In this embodiment, when the object is a basic graph, the terminal can determine which basic graphs each group in the network corresponds to. According to the correspondence between the basic graph and the group, each group in the network is used as a row of the matrix according to the number of the group, and each basic graph is used as a column of the matrix according to the number of the basic graph, thereby obtaining a transfer matrix from the group to the basic graph.
[0101] Next, the terminal transposes the transfer matrix from the group to the object to obtain the transfer matrix from the object to the group. Further, after the terminal transposes the transfer matrix from the group to the object, it can perform normalization processing to obtain the transfer matrix from the object to the group to reduce the amount of calculation.
[0102] The above method for determining the vector representation of the group in the network can obtain the possibility of the group-to-object transfer by generating a group-to-object transfer matrix according to the group and the object, and the possibility of the group-to-object transfer is represented by the transfer matrix, making the data more intuitive. By transposing the group-to-object transfer matrix to obtain the object-to-group transfer matrix, the possibility of the group-to-object transfer can be quickly and accurately obtained.
[0103] In one embodiment, generating a transfer matrix from a group to an object according to the group and the object includes:
[0104] According to the belonging relationship between the object and the group, the relationship matrix between the group and the object is determined; and the relationship matrix is used as the transfer matrix from the group to the object.
[0105] The belonging relationship between an object and a group refers to the objects included in the group or the objects corresponding to the group.
[0106] Specifically, the terminal obtains all groups and objects in the network, and can label the groups in the network and label each object in the network. Then, the terminal determines the relationship between the groups and objects, that is, determines which objects are included in each group. And according to the group label, each group is used as the row of the matrix, and according to the object label, each object is used as the column of the matrix, and the matrix is normalized to obtain the transfer matrix from group to object.
[0107] In this embodiment, the method for determining the vector representation of a group in a network determines the relationship matrix between the group and the object based on the belonging relationship between the object and the group. The relationship matrix is used as the transfer matrix from the group to the object, and the possibility of the transfer from the group to the object can be obtained. The possibility of the transfer from the group to the object is represented by the transfer matrix, making the data more intuitive.
[0108] In one embodiment, the relationship matrix is used as a transfer matrix from the group to the object, including:
[0109] When all elements in the relationship matrix are 0 or 1, determine the elements with a value of 1 in the relationship matrix; determine the word weight corresponding to the element with a value of 1, replace the 1 of the element in the relationship matrix with the corresponding word weight, and obtain the transfer matrix from group to object.
[0110] Specifically, the relationship matrix of the group to the object can be a 0,1 matrix, that is, the elements in the relationship matrix are all 0 or 1. That is, if the i-th group contains the j-th node, the corresponding element in the i-th row and j-th column in the relationship matrix is 1, otherwise it is 0. Then, the terminal can determine the elements with a value of 1 in the relationship matrix, and calculate the word weight corresponding to the element with a value of 1, and replace the 1 of the element in the relationship matrix with the corresponding word weight. The word weight of an element can be the TF-IDF (termfrequency-inverse document frequency) value of the element. TF refers to term frequency, and IDF refers to inverse document frequency.
[0111] For example, if the element in the i-th row and j-th column is 1, the terminal calculates the TF-IDF value of the element in the i-th row and j-th column, and replaces the 1 corresponding to the element in the i-th row and j-th column with the calculated TF-IDF value. After all 1s in the relationship matrix are replaced with the TF-IDF values of the corresponding elements, the transfer matrix from group to object can be obtained.
[0112] In this embodiment, when the object is a node, the terminal may calculate the word weight of the element with a value of 1 in the relationship matrix, and replace 1 in the relationship matrix with the word weight to obtain a transfer matrix from the group to the node.
[0113] In this embodiment, when the object is a basic graph, the terminal may calculate the word weights of the elements with a value of 1 in the relationship matrix, and replace 1 in the relationship matrix with the word weights to obtain a transfer matrix from the group to the basic graph.
[0114] In this implementation, the matrix obtained after replacement may be normalized to obtain a transfer matrix from the group to the object.
[0115] In the method for determining the vector representation of a group in the network in this embodiment, when all elements in the relationship matrix are 0 or 1, determine the element with a value of 1 in the relationship matrix, determine the word weight corresponding to the element with a value of 1, replace the 1 of the element in the relationship matrix with the corresponding word weight, and obtain the transfer matrix from the group to the object. The relationship between the group and the object is simply and intuitively represented by the 0, 1 relationship matrix, and the possibility of the transfer from the group to the object can be more accurately represented by replacing the 1 in the relationship matrix with the word vector.
[0116] In one embodiment, Figure 5 As shown, the target group sequence is generated according to the threshold, the target transfer matrix between objects, and the transfer matrix between objects and groups, including:
[0117] Step 502: select any group or object as the first element of the initial group sequence, and the first element is used as the current element.
[0118] The elements in the initial group sequence are groups or objects.
[0119] Specifically, the terminal may select any object or group in the network as the first element of the initial group sequence, and use the first element as the current element.
[0120] Step 504: when the current element is a group, an object is extracted as the next element of the initial group sequence according to the transfer matrix from the group to the object.
[0121] Specifically, when the terminal obtains a group as the current element, the terminal obtains a transfer matrix from the group to the object, and extracts any element from the transfer matrix from the group to the object. The rows in the transfer matrix from the group to the object represent the objects contained in each group, and the columns in the transfer matrix from the group to the object represent the ranking of each object in each group. Then, the terminal detects which group the extracted element belongs to in the network, and determines the ranking of the object corresponding to the element in the group, and uses the object as the next element of the initial group sequence. For example, the element extracted by the terminal from the transfer matrix from the group to the object is a 36 , indicating that the element is the sixth object in the third group, the sixth object in the third group is taken as the next element of the initial group sequence.
[0122] Furthermore, the terminal may obtain a value corresponding to the extracted element, and use the value corresponding to the element as the next element of the initial group sequence.
[0123] Step 506: When the current element is an object, a value within a preset range is generated.
[0124] Specifically, when the terminal obtains the object as the current element, the terminal obtains a preset interval and randomly selects a real number within the preset interval. For example, if the preset interval is [0,1], the terminal randomly obtains a real number from the [0,1] interval. Alternatively, the terminal can automatically generate a real number within a preset interval.
[0125] Step 508: compare the value with a threshold, and determine the next element of the initial group sequence according to the comparison result between the value and the threshold.
[0126] Specifically, the terminal compares the generated value with a preset threshold, and obtains a corresponding operation according to the comparison result between the value and the threshold, so as to obtain the next element of the initial group sequence.
[0127] Step 510: Stop selecting elements until the length of the initial group sequence reaches a preset length.
[0128] Specifically, each time the terminal determines an element in the initial group sequence, the element is used as the current element, and the operations from step 504 to step 508 are continued to be performed. In addition, each time the terminal determines an element in the initial group sequence, the length of the initial group sequence at this time is detected. The terminal obtains a preset length, compares the length of the initial group sequence at this time with the preset length, and when the length of the initial group sequence is less than the preset length, the operations from step 504 to step 508 are continued to be performed to determine the next element of the initial group sequence. When the length of the initial group sequence reaches the preset length, the element selection is stopped to obtain the final initial group sequence.
[0129] Step 512: Acquire the groups in the initial group sequence to obtain a target group sequence.
[0130] The target group sequence is a sequence composed of groups.
[0131] Specifically, the terminal obtains groups from the initial group sequence, and sorts the obtained groups according to the sorting of the groups in the initial group sequence to obtain a target group sequence.
[0132] In this embodiment, the terminal may take each group in the network as the first element of the initial group sequence in turn, and obtain a target group sequence corresponding to each group as the first element.
[0133] In this embodiment, the terminal may take each object in the network as the first element of the initial group sequence in turn, and obtain a target group sequence corresponding to each object as the first element.
[0134] The above method for determining the vector representation of a group in a network, by selecting any group or object as the first element of the initial group sequence, the first element as the current element, and selecting the next element of the initial group sequence from the target transfer matrix between objects, the transfer matrix from the object to the group, the transfer matrix from the group to the object or the preset interval according to the conditions satisfied by the current element, can guarantee the randomness of the data with a high probability, thereby making the selected data more credible. And when the current element meets different conditions, different methods are used to obtain the next element of the sequence, providing a variety of possible situations, which can better meet the needs of practical applications. When the length of the initial group sequence reaches the preset length, the group in the initial group sequence is retained to obtain the target group sequence, so that the elements in the target group sequence are more in line with the randomness of the data during actual processing, and the reliability of the data is enhanced.
[0135] In one embodiment, comparing the value with a threshold, and determining the next element of the initial group sequence according to the comparison result between the value and the threshold, comprises:
[0136] When the value is greater than the threshold, an object is extracted as the next element of the initial group sequence according to the target transfer matrix between objects; when the value is less than or equal to the threshold, a group is extracted as the next element of the initial group sequence according to the transfer matrix from object to group.
[0137] Specifically, when the terminal detects that the generated value is greater than the threshold, the target transfer matrix between the objects is obtained. Then, the terminal randomly extracts an element from the target transfer matrix between the objects, and uses the object corresponding to the element as the next element of the initial group sequence. Further, the terminal uses the value of the element as the next element of the initial group sequence.
[0138] When the terminal detects that the generated value is less than or equal to the threshold, the object-to-group transfer matrix is obtained. The rows in the object-to-group transfer matrix represent the order of each object in each group, and the columns in the group-to-object transfer matrix represent the objects contained in each group. Then, the terminal randomly extracts an element from the object-to-group transfer matrix, and uses the group corresponding to the element as the next element of the initial group sequence. Furthermore, the terminal uses the value of the extracted element as the next element of the initial group sequence. For example, the element extracted by the terminal from the group-to-object transfer matrix is a 36 , indicating that the element is the third object in the sixth group, the sixth group is taken as the next element of the initial group sequence.
[0139] The above method for determining the vector representation of a group in a network generates a value within a preset interval when the current element is an object. When the value is greater than a threshold, an object is extracted as the next element of the initial group sequence according to the target transfer matrix between objects. When the value is less than or equal to the threshold, a group is extracted as the next element of the initial group sequence according to the transfer matrix from the object to the group. Thus, the next element of the initial group sequence can be determined according to the conditions satisfied by the current element, and different ways of selecting elements are provided for different conditions satisfied by the current element, thereby ensuring the randomness of the data and being able to better meet various situations that occur in practical applications.
[0140] In one embodiment, obtaining the groups in the initial group sequence to obtain the target group sequence includes:
[0141] The objects in the initial group sequence are deleted, or the groups in the initial group sequence are filtered out to obtain a target group sequence.
[0142] Specifically, the initial group sequence includes groups and nodes, and the target group sequence is a sequence composed of groups. Therefore, in order to obtain the target group, the terminal can delete the objects in the initial group sequence, thereby obtaining the target group sequence. Further, the terminal can delete only the objects in the initial group sequence according to the order of each element of the initial group sequence, retain the groups, and maintain the order of each group.
[0143] In one embodiment, the terminal may filter out the groups in the initial group sequence to obtain the target group sequence. Further, the terminal may filter out the groups according to the order of the elements of the initial group sequence and maintain the order of the groups. For example, if the target group sequence is AaBbCcDcEe, the objects are a, b, c, d and e, and the groups are A, B, C, D and E, then the sequence obtained by deleting the objects in the initial group sequence or filtering out the groups in the initial group sequence is ABCDE, and the sequence ABCDE is the target group sequence.
[0144] In this embodiment, when the object is a node, the nodes in the initial group sequence are deleted, or the groups in the initial group sequence are screened out to obtain a target group sequence.
[0145] In this embodiment, when the object is a basic graph, the basic graph in the initial group sequence is deleted, or the groups in the initial group sequence are screened out to obtain a target group sequence.
[0146] The above method for determining the vector representation of a group in a network can obtain a target group sequence simply and quickly by deleting objects in the initial group sequence or filtering out groups in the initial group sequence.
[0147] In one embodiment, when the object is a node, the threshold is a first threshold, and the target group sequence is generated according to the threshold, the target transfer matrix between the objects, and the transfer matrix between the object and the group, including:
[0148] Select any group or node as the first element of the initial group sequence, and use the first element as the current element.
[0149] When the current element is a group, a node is extracted as the next element of the initial group sequence according to the transfer matrix from the group to the node.
[0150] When the current element is a node, a value within a preset range is generated.
[0151] When the value is greater than the first threshold, a node is extracted as the next element of the initial group sequence according to the target transfer matrix between the nodes.
[0152] When the value is less than or equal to the first threshold, a group is extracted according to the node-to-group transfer matrix as the next element of the initial group sequence.
[0153] When the length of the initial group sequence reaches a preset length, stop selecting elements.
[0154] Nodes in the initial group sequence are deleted, or groups in the initial group sequence are filtered out to obtain a target group sequence.
[0155] The above method for determining the vector representation of a group in a network can ensure the randomness of the data with a high probability by selecting any group or node as the first element of the initial group sequence, the first element as the current element, and selecting the next element of the initial group sequence from the target transfer matrix between objects, the transfer matrix from objects to groups, the transfer matrix from groups to objects, or a preset interval according to the conditions satisfied by the current element, so that the randomness of the data can be guaranteed with a high probability, thereby making the selected data more credible. When the length of the initial group sequence reaches the preset length, the groups in the initial group sequence are retained to obtain the target group sequence, so that the elements in the target group sequence are more consistent with the randomness of the data during actual processing, thereby enhancing the reliability of the data.
[0156] In one embodiment, when the object is a basic graph, the threshold is a second threshold, and the target group sequence is generated according to the threshold, the target transfer matrix between objects, and the transfer matrix between the object and the group, including:
[0157] Select any group or basic graph as the first element of the initial group sequence, and the first element is used as the current element;
[0158] When the current element is a group, a basic graph is extracted as the next element of the initial group sequence according to the transfer matrix from the group to the basic graph;
[0159] When the current element is a basic graph, a value within a preset range is generated;
[0160] When the value is greater than the second threshold, extracting a basic graph as the next element of the initial group sequence according to the target transfer matrix between the basic graphs;
[0161] When the value is less than or equal to the second threshold, extracting a group as the next element of the initial group sequence according to the transfer matrix from the basic graph to the group;
[0162] When the length of the initial group sequence reaches a preset length, stop selecting elements;
[0163] The basic graph elements in the initial group sequence are deleted, or the groups in the initial group sequence are screened out to obtain a target group sequence.
[0164] The above method for determining the vector representation of a group in a network can ensure the randomness of the data source by selecting any group or basic graph as the first element of the initial group sequence, the first element as the current element, and selecting the next element of the initial group sequence from the target transfer matrix between objects, the transfer matrix from objects to groups, the transfer matrix from groups to objects, or a preset interval according to the conditions satisfied by the current element, so that the selected data is more credible. And when the current element meets different conditions, different methods are used to obtain the next element of the sequence, providing a variety of possible situations, which can better meet the needs of practical applications. When the length of the initial group sequence reaches the preset length, the groups in the initial group sequence are retained to obtain the target group sequence, so that the elements in the target group sequence are more in line with the randomness of the data during actual processing, and the reliability of the data is enhanced.
[0165] In one embodiment, the first threshold corresponding to the node and the second threshold corresponding to the basic graph can be the same threshold selected from the same preset interval, that is, the first threshold and the second threshold are the same, or can be different thresholds selected from different preset intervals, that is, the first threshold and the second threshold are different.
[0166] In one embodiment, when the object is a basic graph, obtaining objects and groups in the network includes:
[0167] Obtaining groups in the network; obtaining a preset number of nodes from each group in the network to generate a basic graph corresponding to each group.
[0168] Specifically, the terminal obtains groups in the network, and then obtains a preset number of nodes from each group to generate a basic graph. Further, the terminal randomly extracts a preset number of nodes from each group multiple times, and each time the extracted nodes generate a basic graph, thereby obtaining multiple basic graphs corresponding to each group.
[0169] In this embodiment, by obtaining groups in the network, a preset number of nodes are obtained from each group in the network to generate a basic graph corresponding to each group. The preset number of nodes is obtained to ensure the randomness of the data. At the same time, the basic graph generated by the nodes obtained from a group still corresponds to the group, which clarifies the relationship between the basic graph and the group.
[0170] In one embodiment, Figure 6 As shown, obtaining a preset number of nodes from each group in the network to generate a basic graph corresponding to each group includes:
[0171] Step 602: For each group, randomly select a preset number of nodes from the group.
[0172] Step 604: Determine the connection relationship between a preset number of nodes.
[0173] Step 606: Generate a basic graph corresponding to the group according to a preset number of nodes and the connection relationship.
[0174] Specifically, a group includes a set of nodes and edges connecting the nodes internally. The terminal randomly extracts a preset number of nodes from a group and determines the connection relationship between the extracted preset number of nodes. The connection relationship between the nodes is expressed as the edges connecting the nodes. The extracted preset number of nodes are connected according to the connection relationship to obtain a basic graph, which corresponds to the group. Then, the terminal randomly extracts a preset number of nodes from the group again, determines the connection relationship between the preset number of nodes, and generates a basic graph. Repeat the above steps until the group corresponds to the specified number of basic graphs. The same process is performed for each group, and each group corresponds to the specified number of basic graphs.
[0175] In this embodiment, a preset number of nodes are obtained, which ensures the randomness of the obtained nodes and the randomness of the generated basic graph. The connection relationship between the preset number of nodes is clarified, and the basic graph corresponding to the group is generated according to the preset number of nodes and the connection relationship, so that the basic graph generated by the nodes obtained from a group still corresponds to the group, and the relationship between the basic graph and the group is clarified. The same operation is performed for each group, the corresponding relationship between each basic graph and each group is clarified, and the consistency of the data acquisition method is guaranteed.
[0176] In one embodiment, Figure 7 As shown, when the object is a basic graph, the object is converted into a corresponding vector representation, including:
[0177] Step 702: For each group, randomly select a preset number of nodes from the group.
[0178] Step 704: determine the connection relationship between a preset number of nodes.
[0179] Step 706: Generate a basic graph according to the preset number of nodes and the connection relationship.
[0180] Specifically, a group includes a set of nodes and edges connecting the nodes. The terminal randomly extracts a preset number of nodes from a group and determines the connection relationship between the extracted preset number of nodes. The connection relationship between the nodes is represented by the edges connecting the nodes. The extracted preset number of nodes are connected according to the connection relationship to obtain a basic graph, which corresponds to the group.
[0181] Step 708, repeatedly performing the operation of randomly selecting a preset number of nodes from the group until a basic graph is generated.
[0182] Specifically, for each group, the terminal repeatedly performs the operation of randomly extracting a preset number of nodes from the group until a basic graph is generated, so that each group corresponds to multiple basic graphs. Furthermore, the terminal adopts a replacement sampling method, and does not exclude the nodes and edges obtained from the group, and each time extracts a preset number of nodes from the original group to generate a basic graph.
[0183] Step 710: When the number of basic graphs reaches a specified number, the basic graphs are sorted according to the order in which the nodes are extracted to obtain a basic graph sequence corresponding to the group.
[0184] Specifically, for each group, the terminal detects the number of basic graphs of the group. When the number of basic graphs corresponding to the group reaches a specified number, the corresponding generated basic graphs are sorted according to the order of node extraction to obtain a basic graph sequence corresponding to the group. Furthermore, the terminal can use each basic graph as an element of the basic graph sequence when generating a basic graph, so that when the number of basic graphs reaches a specified number, the basic graph sequence corresponding to the group is obtained. The basic graph sequence contains a specified number of elements.
[0185] Step 712: input the basic graph sequence corresponding to the group into the word vector model to obtain the vector representation corresponding to each basic graph.
[0186] Specifically, the terminal inputs the basic graph sequence corresponding to each group into the word vector model, and obtains the vector representation corresponding to each basic graph output by the word vector model.
[0187] In this embodiment, a preset number of nodes are obtained to ensure data randomness. The connection relationship between the preset number of nodes is clarified, and the basic graph corresponding to the group is generated according to the preset number of nodes and the connection relationship, so that the basic graph generated by the nodes obtained from which group still corresponds to the group, and the relationship between the basic graph and the group is clarified. The same operation is performed for each group, the correspondence between each basic graph and each group is clarified, and the consistency of the data acquisition method is ensured. The same operation is repeated until the number of basic graphs reaches the specified number to obtain the basic graph sequence corresponding to the group. The basic graph sequence corresponding to the group is input into the word vector model to obtain the vector representation corresponding to each basic graph, thereby converting the basic graph into the corresponding vector, and the information represented by the basic graph can be represented by the vector.
[0188] like Figure 8 As shown, there are four types of basic graphs in one embodiment. Figure 8(a), (b), (c) and (d) are four basic graphs of size 3. In this embodiment, a basic graph of size 3 is selected, and a transfer matrix between these basic graphs needs to be generated. Each element of the matrix represents the transfer possibility of the corresponding basic graph. To generate the matrix, it is first necessary to sample the basic graph within each group, and generate a sequence of basic graphs according to the sampling order. The sampling can be random sampling, that is, randomly selecting three nodes within the group, and determining the connection relationship between the three nodes within the group. The basic graph formed by these three nodes and the connection relationship between them is which basic graph among (a), (b), (c) and (d), and the basic graph is added to the sequence. Markov chain sampling can also be used, that is, first randomly sampling a basic graph as the starting element of the basic graph sequence, and then randomly removing several nodes constituting this basic graph, and then randomly selecting the same number of nodes from the group to supplement it, so that a new set of node combinations is obtained, and the node combination is which basic graph among (a), (b), (c) and (d), and the basic graph is added to the sequence. In this way, several sequences can be sampled in each group, and these sequences can be input into the skip-gram model to learn a vector representation for each basic graph in the sequence. The vector representations of the basic graphs are taken as inner products to obtain their similarity, and then the similarity matrix is row normalized to obtain the transfer matrix between the basic graphs.
[0189] like Fig. 9As shown, it is a flow chart of a method for determining a vector representation of a group in a network in one embodiment. Two types of group similarities are summarized in this embodiment. The first similarity is based on the path distance between nodes. If two groups have more common nodes, or the distance between the nodes contained in the two groups is closer, then the first similarity of the two groups is greater. The first similarity is based on the path distance between nodes. If two groups have more common nodes, or the distance between the nodes contained in the two groups is closer, then the first similarity of the two groups is greater. Before learning group representation, it is necessary to select a group similarity. If the first group similarity is selected, it is necessary to generate a transfer matrix between nodes; then, it is necessary to generate a transfer matrix between groups and nodes; if the second group similarity is selected, then a transfer matrix between basic graphs is generated, and a transfer matrix between groups and basic graphs is generated. A threshold is selected in the interval [0,1]. According to the preset rules, the generated transfer matrix and the threshold are used to generate a group sequence. If the first group similarity is selected, the first group sequence is generated according to the threshold, the transfer matrix between nodes, and the transfer matrix between groups and nodes. The generated first group sequence is input into the trained skip-gram model, and the learned group vector is output, which is obtained based on the first group similarity. If the second group similarity is selected, the second group sequence is generated based on the threshold, the transfer matrix between the basic graphs, and the transfer matrix between the group and the basic graph. The generated second group sequence is input into the trained skip-gram model, and the learned group vector is output, which is obtained based on the second group similarity.
[0190] In one embodiment, after two group vectors are obtained by using two group similarities respectively, the two group similarities may be concatenated, and the concatenated vector is used as the final group vector.
[0191] In this implementation, a simple network is used as an example to illustrate how to perform unsupervised representation learning of groups. Given a network (V, E) and groups G = (g1, g2, g3, g4) on the network and necessary hyperparameters. V represents all nodes on the network, E represents all edges on the network, G represents all groups on the network, and the number of groups is marked as M. The network structure is as follows Fig.10 As shown. The network contains 23 nodes and 4 groups (g1, g2, g3, g4). Two types of group similarity are summarized in this embodiment. The first similarity is based on the path distance between nodes. If two groups have more common nodes, or the distance between the nodes contained in the two groups is close, then the first similarity of the two groups is greater. For example Fig.10If we consider the first similarity, the similarity between g2 and g1, and between g4 and g1 is greater than the similarity between g3 and g1. The second similarity is based on the internal topological structure of the group. If the internal topological structures of two groups are similar, the second similarity of the two groups is greater. For example Fig.10 If we consider the second similarity, g2 and g4 are more similar, and g1 and g3 are more similar, because the internal structures of g2 and g4 are similar to "star", while the internal structures of g1 and g3 are similar to "net". Before learning the unsupervised representation of groups, we must first select a similarity, and then learn based on the selected similarity.
[0192] Will Fig.10 The four groups shown in the figure are represented by vectors learned based on two group similarities, and are displayed in Fig.11 middle. Fig.11 e in 1 is the vector representation learned based on the first similarity, e 2 It is a vector representation learned based on the second similarity. In this scheme, the learned group vector can be output, and the vector representation of the group can be used for various applications, such as visualization, group classification, clustering, etc.
[0193] In one embodiment, a method for vector representation of a group in a network is provided, comprising:
[0194] The terminal obtains objects and groups in the network, where the object is a node or a basic graph; the basic graph is generated by selecting a preset number of nodes from the group.
[0195] The terminal converts the object to its corresponding vector representation.
[0196] The terminal determines the similarity between each two objects according to the vector representations of each two objects.
[0197] The terminal obtains an initial transfer matrix between the objects according to the similarity between each two objects.
[0198] The terminal selects a preset number of elements from the values of the elements in each row of the initial transfer matrix between the objects from high to low, and replaces the values of the remaining elements in each row except the selected preset number of elements with 0.
[0199] The terminal normalizes the transfer matrix obtained after replacement to obtain the target transfer matrix between the objects.
[0200] The transfer matrix between the object and the group includes a transfer matrix from the group to the object and a transfer matrix from the object to the group. The terminal determines a relationship matrix between the group and the object according to the belonging relationship between the object and the group.
[0201] The terminal uses the relationship matrix as a transfer matrix from the group to the object.
[0202] When all elements in the relationship matrix are 0 or 1, the terminal determines the element whose value is 1 in the relationship matrix.
[0203] The terminal determines the word weight corresponding to the element with a value of 1, replaces the 1 of the element in the relationship matrix with the corresponding word weight, and obtains a transfer matrix from the group to the object.
[0204] The terminal performs transposition processing on the transfer matrix from the group to the object to obtain a transfer matrix from the object to the group.
[0205] The terminal obtains a threshold value, selects any group or object as the first element of the initial group sequence, and the first element is used as the current element.
[0206] When the current element is a group, the terminal extracts an object as the next element of the initial group sequence according to the transfer matrix from the group to the object.
[0207] When the current element is an object, the terminal generates a value within a preset range.
[0208] When the value is greater than the threshold, the terminal extracts an object as the next element of the initial group sequence according to the target transfer matrix between the objects.
[0209] When the value is less than or equal to the threshold, the terminal extracts a group as the next element of the initial group sequence according to the transfer matrix from the object to the group.
[0210] When the length of the initial group sequence reaches a preset length, stop selecting elements.
[0211] The terminal deletes the objects in the initial group sequence, or filters out the groups in the initial group sequence, to obtain a target group sequence.
[0212] The terminal inputs the target group sequence into the word vector model to obtain a vector representation of each group in the network.
[0213] The above method for determining the vector representation of a group in a network obtains objects and groups in the network, where the object is a node or a basic graph, and the basic graph is generated by selecting a preset number of nodes in the group. The similarity between each two objects is determined based on the vector representation of each two objects, and the target transfer matrix between the objects is obtained based on the similarity between each two objects, which can measure the similarity between objects in the network and clearly indicate the correlation between the objects.
[0214] According to the similarity between each two objects, an initial transfer matrix between objects is obtained, a preset number of elements are selected from the values of the elements in each row of the initial transfer matrix between objects from high to low, and the values of the remaining elements other than the selected preset number of elements are replaced with 0, and the transfer matrix obtained after replacement is normalized to obtain a target transfer matrix, which can reduce the amount of calculation and save memory space, thereby improving the efficiency of converting groups in the network into corresponding vector representations.
[0215] The relationship between the group and the object is simply and intuitively represented by a 0, 1 relationship matrix, and the possibility of the transfer from the group to the object can be more accurately represented by replacing the 1 in the relationship matrix with the word weight.
[0216] By selecting any group or object as the first element of the initial group sequence, the first element is used as the current element, and according to the conditions satisfied by the current element, the next element of the initial group sequence is selected from the target transfer matrix between objects, the transfer matrix from the object to the group, the transfer matrix from the group to the object, or the preset interval, the randomness of the data can be guaranteed with a high probability, so that the selected data is more credible. And when the current element meets different conditions, different methods are used to obtain the next element of the sequence, providing a variety of possible situations, which can better meet the needs of practical applications. When the length of the initial group sequence reaches the preset length, the group in the initial group sequence is retained to obtain the target group sequence, so that the elements in the target group sequence are more in line with the randomness of the data during actual processing, and the reliability of the data is enhanced.
[0217] By deleting objects in the initial group sequence, or filtering out groups in the initial group sequence, the target group sequence can be obtained simply and quickly.
[0218] By inputting the target group sequence into the word vector model, the vector representation of each group in the network can be quickly and accurately obtained. This solution can realize the conversion of each group in the network into a corresponding vector representation, so as to determine the similarity between the groups in the network.
[0219] Figure 2-Figure 8 FIG. 1 is a flow chart of a method for determining a vector representation of a group in a network in one embodiment. It should be understood that although Figure 2-Figure 8The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2-Figure 8 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0220] In one embodiment, Fig.12 As shown, a device for determining a vector representation of a group in a network is provided, the device comprising: an acquisition module 1202 , a first generation module 1204 , a second generation module 1206 , a third generation module 1208 and an output module 1210 .
[0221] The acquisition module 1202 is used to acquire objects and groups in the network, where the objects are nodes or basic graphs.
[0222] The first generating module 1204 is used to generate a target transfer matrix between the objects according to the objects.
[0223] The second generating module 1206 is configured to generate a transfer matrix between the object and the group according to the object and the group.
[0224] The third generating module 1208 is used to obtain a threshold value, and generate a target group sequence according to the threshold value, the target transfer matrix between the objects, and the transfer matrix between the object and the group.
[0225] The output module 1210 is used to input the target group sequence into the word vector model to obtain the vector representation of each group in the network.
[0226] The above-mentioned device for determining the vector representation of a group in a network obtains an object and a group in the network, the object is a node or a basic graph, the basic graph is generated by selecting a preset number of nodes from the group, generates a target transfer matrix between the objects according to the object, generates a transfer matrix between the object and the group according to the object and the group, obtains a threshold, generates a target group sequence according to the threshold, the target transfer matrix between the objects, and the transfer matrix between the object and the group, inputs the target group sequence into a word vector model, and obtains a vector representation of each group in the network. The present solution can realize the conversion of each group in the network into a corresponding vector representation, thereby determining the similarity between the groups in the network.
[0227] In one embodiment, the first generation module 1204 is further used to: convert the object into a corresponding vector representation; determine the similarity between each two objects based on the vector representation of each two objects; and obtain a target transfer matrix between the objects based on the similarity between each two objects.
[0228] The above-mentioned device for determining the vector representation of a group in a network converts the object into a corresponding vector representation, determines the similarity between each two objects based on the vector representation of each two objects, and obtains the target transfer matrix between the objects based on the similarity between each two objects. It can measure the similarity between objects in the network and clearly express the correlation between objects.
[0229] In one embodiment, the first generation module 1204 is also used to: obtain an initial transfer matrix between the objects based on the similarity between each two objects; select a preset number of elements from the values of the elements in the initial transfer matrix between the objects, and replace the values of the remaining elements other than the selected preset number of elements with 0; and use the transfer matrix obtained after the replacement as the target transfer matrix between the objects.
[0230] The above-mentioned device for determining the vector representation of a group in a network obtains an initial transfer matrix between objects based on the similarity between each two objects, selects a preset number of elements from the values of the elements in the initial transfer matrix between objects, replaces the values of the remaining elements other than the selected preset number of elements with 0, and uses the transfer matrix obtained after the replacement as the target transfer matrix between objects, which can reduce the amount of calculation and save memory space.
[0231] In one embodiment, the first generation module 1204 is further used to select a preset number of elements from the values of the elements in each row of the initial transfer matrix between the objects from high to low, and replace the values of the remaining elements in each row except the selected preset number of elements with 0. By retaining the largest values in each row of the initial transfer matrix, the key information of the elements in each row can be retained to the maximum extent, and the values of other elements are replaced with 0, which can reduce the amount of calculation, thereby improving the efficiency of converting the groups in the network into corresponding vector representations.
[0232] In one embodiment, the first generation module 1204 is further used to: normalize the transfer matrix obtained after replacement to obtain the target transfer matrix between the objects. By normalizing the transfer matrix obtained after replacement to obtain the target transfer matrix between the objects, the target transfer matrix still retains the key information of the original data and can effectively reduce the amount of calculation.
[0233] In one embodiment, the transfer matrix between the object and the group includes a transfer matrix from the group to the object and a transfer matrix from the object to the group; the second generation module 1206 is also used to: generate a transfer matrix from the group to the object based on the group and the object; transpose the transfer matrix from the group to the object to obtain a transfer matrix from the object to the group.
[0234] The above-mentioned device for determining the vector representation of a group in a network can obtain the possibility of group-to-object transfer by generating a group-to-object transfer matrix according to the group and the object, and express the possibility of group-to-object transfer through the transfer matrix, making the data more intuitive. By transposing the group-to-object transfer matrix to obtain the object-to-group transfer matrix, the possibility of group-to-object transfer can be quickly and accurately obtained.
[0235] In one embodiment, the second generating module 1206 is further used to: determine a relationship matrix between the group and the object according to the belonging relationship between the object and the group; and use the relationship matrix as a transfer matrix from the group to the object.
[0236] In this embodiment, a device for determining a vector representation of a group in a network determines a relationship matrix between the group and the object based on the relationship between the object and the group. The relationship matrix is used as a transfer matrix from the group to the object, and the possibility of the group transferring to the object can be obtained. The possibility of the group transferring to the object is represented by the transfer matrix, making the data more intuitive.
[0237] In one embodiment, the second generation module 1206 is further used to: when all elements in the relationship matrix are 0 or 1, determine the element with a value of 1 in the relationship matrix; determine the word weight corresponding to the element with a value of 1, replace the 1 of the element in the relationship matrix with the corresponding word weight, and obtain the transfer matrix from the group to the object. The relationship between the group and the object is simply and intuitively represented by the 0, 1 relationship matrix, and the possibility of the transfer from the group to the object can be more accurately represented by replacing the 1 in the relationship matrix with the word vector.
[0238] In one embodiment, the third generation module 1208 is also used to: select any group or object as the first element of the initial group sequence, and the first element as the current element; when the current element is a group, extract an object as the next element of the initial group sequence according to the transfer matrix from the group to the object; when the current element is an object, generate a numerical value within a preset interval; compare the numerical value with the threshold, and determine the next element of the initial group sequence according to the comparison result between the numerical value and the threshold; stop selecting elements until the length of the initial group sequence reaches a preset length; obtain the groups in the initial group sequence to obtain the target group sequence.
[0239] The above-mentioned device for determining the vector representation of a group in a network, by selecting any group or object as the first element of the initial group sequence, the first element as the current element, and according to the conditions satisfied by the current element, selecting the next element of the initial group sequence from the target transfer matrix between objects, the transfer matrix from the object to the group, the transfer matrix from the group to the object or the preset interval, can guarantee the randomness of the data with a high probability, thereby making the selected data more credible. And when the current element meets different conditions, different methods are used to obtain the next element of the sequence, providing a variety of possible situations, which can better meet the needs of practical applications. When the length of the initial group sequence reaches the preset length, the group in the initial group sequence is retained to obtain the target group sequence, so that the elements in the target group sequence are more in line with the randomness of the data during actual processing, and the reliability of the data is enhanced.
[0240] In one embodiment, the third generating module 1208 is further configured to: when the value is greater than the threshold, extract an object as the next element of the initial group sequence according to the target transfer matrix between the objects.
[0241] When the value is less than or equal to the threshold, a group is extracted as the next element of the initial group sequence according to the transfer matrix from the object to the group.
[0242] The above-mentioned device for determining the vector representation of a group in a network generates a value within a preset interval when the current element is an object. When the value is greater than a threshold, an object is extracted as the next element of the initial group sequence according to the target transfer matrix between objects. When the value is less than or equal to the threshold, a group is extracted as the next element of the initial group sequence according to the transfer matrix from the object to the group. Thus, the next element of the initial group sequence can be determined according to the conditions satisfied by the current element, and different ways of selecting elements are provided for different conditions satisfied by the current element, thereby ensuring the randomness of the data and being able to better meet various situations that occur in practical applications.
[0243] In one embodiment, the third generation module 1208 is further used to: delete objects in the initial group sequence, or filter out groups in the initial group sequence, to obtain a target group sequence. By deleting objects in the initial group sequence, or filtering out groups in the initial group sequence, the target group sequence can be obtained simply and quickly.
[0244] In one embodiment, when the object is a basic graph, the acquisition module 1202 is further used to: acquire groups in the network; and acquire a preset number of nodes from each group in the network to generate a basic graph corresponding to each group.
[0245] In this embodiment, by obtaining groups in the network, a preset number of nodes are obtained from each group in the network to generate a basic graph corresponding to each group. The preset number of nodes is obtained to ensure the randomness of the data. At the same time, the basic graph generated by the nodes obtained from a group still corresponds to the group, which clarifies the relationship between the basic graph and the group.
[0246] In one embodiment, the acquisition module 1202 is further used to: for each group, randomly extract a preset number of nodes from the group; determine the connection relationship between the preset number of nodes; and generate a basic graph corresponding to the group according to the preset number of nodes and the connection relationship.
[0247] In this embodiment, a preset number of nodes are obtained, which ensures the randomness of the obtained nodes and the randomness of the generated basic graph. The connection relationship between the preset number of nodes is clarified, and the basic graph corresponding to the group is generated according to the preset number of nodes and the connection relationship, so that the basic graph generated by the nodes obtained from a group still corresponds to the group, and the relationship between the basic graph and the group is clarified. The same operation is performed for each group, the corresponding relationship between each basic graph and each group is clarified, and the consistency of the data acquisition method is guaranteed.
[0248] In one embodiment, when the object is a basic graph, the first generation module 1204 is also used to: for each group, randomly extract a preset number of nodes from the group; determine the connection relationship between the preset number of nodes; generate a basic graph based on the preset number of nodes and the connection relationship; repeatedly execute the operation of randomly extracting a preset number of nodes from the group until a basic graph is generated; when the number of the basic graph reaches a specified number, sort the basic graph according to the extraction order of the nodes to obtain a basic graph sequence corresponding to the group; input the basic graph sequence corresponding to the group into the word vector model to obtain a vector representation corresponding to each basic graph.
[0249] In this embodiment, a preset number of nodes are obtained to ensure data randomness. The connection relationship between the preset number of nodes is clarified, and the basic graph corresponding to the group is generated according to the preset number of nodes and the connection relationship, so that the basic graph generated by the nodes obtained from which group still corresponds to the group, and the relationship between the basic graph and the group is clarified. The same operation is performed for each group, the correspondence between each basic graph and each group is clarified, and the consistency of the data acquisition method is ensured. The same operation is repeated until the number of basic graphs reaches the specified number to obtain the basic graph sequence corresponding to the group. The basic graph sequence corresponding to the group is input into the word vector model to obtain the vector representation corresponding to each basic graph, thereby converting the basic graph into the corresponding vector, and the information represented by the basic graph can be represented by the vector.
[0250] Fig.13The internal structure diagram of a computer device in one embodiment is shown. The computer device may specifically be Figure 1 The terminal 110 (or server 120) in FIG. Fig.10 As shown, the computer device includes a processor, a memory, a network interface, an input device and a display screen connected through a system bus. Among them, the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program. When the computer program is executed by the processor, the processor can implement a method for determining a vector representation of a group in a network. The internal memory may also store a computer program. When the computer program is executed by the processor, the processor can execute a method for determining a vector representation of a group in a network. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covered on the display screen, or a key, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.
[0251] Those skilled in the art will understand that Fig.13 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0252] In one embodiment, the apparatus for determining the vector representation of a group in a network provided by the present application can be implemented in the form of a computer program, which can be used in Fig.13 The computer device shown in the figure is run. The memory of the computer device can store various program modules constituting the device for determining the vector representation of the group in the network, for example, Fig.12 The acquisition module 1202, the first generation module 1204, the second generation module 1206, the third generation module 1208 and the output module 1210 are shown. The computer program composed of various program modules enables the processor to execute the steps of the method for determining the vector representation of a group in a network in various embodiments of the present application described in this specification.
[0253] For example, Fig.13 The computer device shown can be Fig.12The acquisition module 1202 in the device for determining the vector representation of a group in a network shown executes the step of acquiring objects and groups in the network, the object being a node or a basic graph. The computer device can execute the step of generating a target transfer matrix between the objects according to the object through the first generation module 1204. The computer device can execute the step of generating a transfer matrix between the object and the group according to the object and the group through the second generation module 1206. The computer device can execute the step of acquiring a threshold through the third generation module 1208, and generating a target group sequence according to the threshold, the target transfer matrix between the objects, and the transfer matrix between the object and the group. The computer device can execute the step of inputting the target group sequence into a word vector model through the output module 1210 to obtain the vector representation of each group in the network.
[0254] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method for determining the vector representation of a group in a network. The steps of the method for determining the vector representation of a group in a network here may be the steps of the method for determining the vector representation of a group in a network in each of the above embodiments.
[0255] In one embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the processor executes the steps of the method for determining the vector representation of a group in a network. The steps of the method for determining the vector representation of a group in a network here may be the steps of the method for determining the vector representation of a group in a network in each of the above embodiments.
[0256] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0257] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0258] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for determining a vector representation of a group in a network, characterized in that The method comprises: Obtaining objects and groups in a protein interaction network, wherein the objects are nodes or basic graphs, and the basic graphs are generated by selecting a preset number of nodes from the groups; generating a target transfer matrix between the objects according to the objects, wherein the target transfer matrix represents the similarity between the objects; Generate a transfer matrix between the object and the group according to the object and the group, wherein the transfer matrix represents the belonging relationship between the object and the group, and the transfer matrix between the object and the group includes a transfer matrix from the group to the object and a transfer matrix from the object to the group; Get a threshold value, select any group or object as the first element of the initial group sequence, and use the first element as the current element; When the current element is a group, extracting an object as the next element of the initial group sequence according to the transfer matrix from the group to the object; When the current element is an object, a value within a preset range is generated; When the value is greater than the threshold, extracting an object as the next element of the initial group sequence according to the target transfer matrix between the objects; When the value is less than or equal to the threshold, a group is extracted as the next element of the initial group sequence according to the transfer matrix from the object to the group, and the selection of elements is stopped when the length of the initial group sequence reaches a preset length; Acquire the groups in the initial group sequence to obtain a target group sequence; Inputting the target group sequence into a word vector model to obtain a vector representation of each group in the protein interaction network; Clustering the groups in the protein interaction network is performed according to the vector representation of each group in the protein interaction network.
2. The method according to claim 1, characterized in that Generating a target transfer matrix between the objects according to the objects includes: Convert the object into a corresponding vector representation; Determine the similarity between each two objects according to the vector representations of each two objects; A target transfer matrix between the objects is obtained according to the similarity between each two objects.
3. The method according to claim 2, characterized in that The step of obtaining a target transfer matrix between the objects according to the similarity between each two objects includes: Obtaining an initial transfer matrix between the objects according to the similarity between each two objects; Selecting a preset number of elements from the values of the elements in the initial transfer matrix between the objects, and replacing the values of the remaining elements other than the selected preset number of elements with 0; The transfer matrix obtained after replacement is used as the target transfer matrix between the objects.
4. The method according to claim 3, characterized in that The step of selecting a preset number of elements from the values of the elements in the initial transfer matrix between the objects, and replacing the values of the remaining elements other than the selected preset number of elements with 0, comprises: A preset number of elements are selected from the values of the elements in each row of the initial transfer matrix between the objects from high to low, and the values of the remaining elements in each row except the selected preset number of elements are replaced with 0.
5. The method according to claim 1, characterized in that: The step of generating a transfer matrix between the object and the group according to the object and the group includes: generating a transfer matrix from the group to the object according to the group and the object; The transfer matrix from the group to the object is transposed to obtain a transfer matrix from the object to the group.
6. The method according to claim 5, characterized in that The step of generating a transfer matrix from the group to the object according to the group and the object comprises: Determining a relationship matrix between the group and the object according to the belonging relationship between the object and the group; The relationship matrix is used as the transfer matrix from the group to the object.
7. The method according to claim 6, characterized in that The step of using the relationship matrix as a transfer matrix from the group to the object includes: When all elements in the relationship matrix are 0 or 1, determining the elements whose values in the relationship matrix are 1; Determine the word weight corresponding to the element with a value of 1, replace 1 of the element in the relationship matrix with the corresponding word weight, and obtain the transfer matrix from the group to the object.
8. The method according to claim 1, characterized in that When the object is a basic graph, the step of obtaining objects and groups in a protein interaction network includes: Get groups in protein interaction networks; A preset number of nodes are obtained from each group in the protein interaction network to generate a basic graph corresponding to each group.
9. The method according to claim 8, characterized in that The step of acquiring a preset number of nodes from each group in the protein interaction network to generate a basic graph corresponding to each group includes: For each group, randomly selecting a preset number of nodes from the group; Determining a connection relationship between the preset number of nodes; A basic graph corresponding to the group is generated according to the preset number of nodes and the connection relationship.
10. The method according to claim 2, characterized in that When the object is a basic graph, converting the object into a corresponding vector representation includes: For each group, randomly selecting a preset number of nodes from the group; Determining a connection relationship between the preset number of nodes; Generate a basic graph according to the preset number of nodes and the connection relationship; Repeating the operation of randomly selecting a preset number of nodes from the group until a basic graph is generated; When the number of the basic graphs reaches a specified number, sorting the basic graphs according to the extraction order of the nodes to obtain a basic graph sequence corresponding to the group; The basic graph sequence corresponding to the group is input into the word vector model to obtain the vector representation corresponding to each basic graph.
11. A device for determining a vector representation of a group in a network, characterized in that The device comprises: An acquisition module, used for acquiring objects and groups in the protein interaction network, wherein the objects are nodes or basic graphs, and the basic graphs are generated by selecting a preset number of nodes from the group; A first generating module, configured to generate a target transfer matrix between the objects according to the objects, wherein the target transfer matrix represents the similarity between the objects; A second generating module is used to generate a transfer matrix between the object and the group according to the object and the group, wherein the transfer matrix represents the belonging relationship between the object and the group, and the transfer matrix between the object and the group includes a transfer matrix from the group to the object and a transfer matrix from the object to the group; The third generation module is used to obtain a threshold value, select any group or object as the first element of the initial group sequence, and the first element is used as the current element; when the current element is a group, an object is extracted as the next element of the initial group sequence according to the transfer matrix from the group to the object; when the current element is an object, a value within a preset interval is generated; when the value is greater than the threshold value, an object is extracted as the next element of the initial group sequence according to the target transfer matrix between the objects; when the value is less than or equal to the threshold value, a group is extracted as the next element of the initial group sequence according to the transfer matrix from the object to the group, until the length of the initial group sequence reaches the preset length, stop selecting elements; obtain the groups in the initial group sequence to obtain the target group sequence; An output module, used to input the target group sequence into a word vector model to obtain a vector representation of each group in the protein interaction network; A module for clustering groups in the protein interaction network according to the vector representation of each group in the protein interaction network.
12. The device according to claim 11, characterized in that The first generation module is further used to convert the object into a corresponding vector representation; determine the similarity between each two objects according to the vector representation of each two objects; and obtain the target transfer matrix between the objects according to the similarity between each two objects.
13. The device according to claim 12, characterized in that The first generation module is also used to obtain the initial transfer matrix between the objects based on the similarity between each two objects; select a preset number of elements from the values of the elements in the initial transfer matrix between the objects, and replace the values of the remaining elements other than the selected preset number of elements with 0; and use the transfer matrix obtained after the replacement as the target transfer matrix between the objects.
14. The device according to claim 13, characterized in that The first generating module is further used to select a preset number of elements from the values of the elements in each row of the initial transfer matrix between the objects from high to low, and replace the values of the remaining elements in each row except the selected preset number of elements with 0.
15. The device according to claim 11, characterized in that The second generating module is further used to generate a transfer matrix from the group to the object according to the group and the object; and to perform transposition processing on the transfer matrix from the group to the object to obtain a transfer matrix from the object to the group.
16. The device according to claim 15, characterized in that The second generating module is further used to determine a relationship matrix between the group and the object according to the belonging relationship between the object and the group; and use the relationship matrix as a transfer matrix from the group to the object.
17. The device according to claim 16, characterized in that The second generating module is further configured to determine the element whose value is 1 in the relationship matrix when all elements in the relationship matrix are 0 or 1; Determine the word weight corresponding to the element with a value of 1, replace 1 of the element in the relationship matrix with the corresponding word weight, and obtain the transfer matrix from the group to the object.
18. The device according to claim 11, characterized in that The acquisition module is further used to acquire groups in the protein interaction network; and to acquire a preset number of nodes from each group in the protein interaction network to generate a basic graph corresponding to each group.
19. The device according to claim 18, characterized in that The acquisition module is further used to randomly extract a preset number of nodes from each group; determine the connection relationship between the preset number of nodes; and generate a basic graph corresponding to the group according to the preset number of nodes and the connection relationship.
20. The device according to claim 12, characterized in that The first generating module is further used to randomly extract a preset number of nodes from each group; determine the connection relationship between the preset number of nodes; and generate a basic graph according to the preset number of nodes and the connection relationship; Repeat the operation of randomly extracting a preset number of nodes from the group until a basic graph is generated; when the number of the basic graphs reaches a specified number, sort the basic graphs according to the extraction order of the nodes to obtain a basic graph sequence corresponding to the group; input the basic graph sequence corresponding to the group into a word vector model to obtain a vector representation corresponding to each basic graph.
21. A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 10.
22. A computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Interest group dividing method and device, medium and calculating device
CN108287864A
Data processing method and device, electronic equipment and storage medium
CN109597856A