A data classification method, device, apparatus and storage medium
By constructing a node similarity matrix and adjusting the embedding encoding features, the problem of low accuracy caused by the uncertainty of node relationships in graph data is solved, and the accuracy of data classification is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-08
- Publication Date
- 2026-03-27
AI Technical Summary
In existing technologies, the uncertainty of the relationships between nodes in graph data leads to low accuracy in node embedding representation, and existing data acquisition methods have defects and data inaccuracies.
By acquiring the node connection probability and neighbor node similarity in graph data, a node similarity matrix is constructed, and embedding encoding and decoding are performed. The node embedding encoding features are adjusted, and the feature accuracy is improved by using node similarity and feature deviation after decoding as constraints.
This improves the accuracy of node embedding representation in graph data, thereby enhancing the accuracy of data classification.
Smart Images

Figure CN116150685B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present specification relates to the technical field of data processing, and particularly relates to a data classification method and device, equipment and a storage medium. BACKGROUND
[0002] At present, graph data is widely used in various fields, and how to learn the embedding expression of the nodes contained in the graph data plays an extremely important role in data analysis and processing technology.
[0003] Due to the problems such as certain defects of the existing data acquisition method, ambiguous data source, and inaccurate data, the relationship between each node in the graph data is not determined, but contains a lot of uncertainties, including that the connection between the nodes cannot be determined, but there is a connection probability, the feature data corresponding to the nodes is inaccurate, etc., resulting in that the accuracy of the embedding expression extracted for the nodes in the graph data containing uncertain connections in the prior art is low. SUMMARY
[0004] The present specification provides a data classification method, device, equipment and storage medium to partially solve the above problems existing in the prior art.
[0005] The present specification adopts the following technical solutions:
[0006] The present specification provides a data classification method, which comprises:
[0007] Obtaining graph data, the graph data containing nodes, the edges between the nodes representing the connection probability between the nodes, and each node corresponding to different objects to be classified;
[0008] For each node contained in the graph data, determining the neighbor nodes of the node in the graph data, and determining the initial feature of the node according to the attribute information of the node;
[0009] According to the connection probability between the nodes and the similarity between the neighbor nodes of the nodes in the graph data, a node similarity matrix is determined, and the initial feature of each node is embedded and coded to obtain the embedding coding feature of each node;
[0010] Decoding the embedding coding feature of each node by a preset decoder to obtain the decoded feature;
[0011] adjust the embedding coding feature corresponding to each node according to the constraint condition that the higher the similarity of nodes in the node similarity matrix, the greater the similarity between the embedding coding features of the nodes, and the constraint condition that the smaller the deviation between the initial feature and the decoded feature corresponding to each node, to obtain an adjusted feature corresponding to each node;
[0012] classify each object to be classified according to the adjusted feature corresponding to each node.
[0013] Optionally, the graph data is obtained, and specifically includes:
[0014] The original data is obtained, and the original data includes attribute data of each object to be classified and association relationship data between the objects to be classified.
[0015] The graph data is constructed according to the attribute data of each object to be classified and the association relationship data between the objects to be classified, and different nodes in the graph data correspond to different objects to be classified, and edges between different nodes are used to represent association relationships between the different nodes.
[0016] Optionally, for each node included in the graph data, neighbor nodes of the node in the graph data are determined, and specifically includes:
[0017] For each node included in the graph data, a node having a connection relationship with the node in the graph data belonging to a specified order is determined as a neighbor node of the node in the graph data.
[0018] Optionally, the initial feature of each node is embedded and coded to obtain an embedding coding feature of each node, and specifically includes:
[0019] For each node, the initial feature of the node is input into a preset embedding model, so as to determine an uncertainty value of the node according to the initial feature of the node through the embedding model, and determine an embedding coding feature of the node according to the uncertainty value.
[0020] Optionally, the embedding coding feature of each node is adjusted according to the constraint condition that the higher the similarity of nodes in the node similarity matrix, the greater the similarity between the embedding coding features of the nodes, and specifically includes:
[0021] For each node, a plurality of nodes are randomly sampled from nodes corresponding to the node in the node similarity matrix and having a similarity lower than a preset threshold as sampling nodes corresponding to the node.
[0022] According to a similarity between the embedding code feature of each sampling node and the embedding code feature of the node corresponding to the sampling node in the node similarity matrix, the embedding code feature of the node is adjusted.
[0023] Optionally, according to a smaller deviation between the decoded feature and the initial feature corresponding to each node, the embedding code feature corresponding to each node is adjusted, and the adjustment specifically includes:
[0024] According to the embedding code feature corresponding to each node, an uncertainty value of the node is determined.
[0025] According to the uncertainty value of the node, a node deviation weight corresponding to the node is determined.
[0026] According to the node deviation weight corresponding to each node, according to a smaller deviation between the decoded feature and the initial feature corresponding to the node, the embedding code feature corresponding to the node is adjusted, and the smaller the node deviation weight corresponding to the node is, the smaller the adjustment of the embedding code feature corresponding to the node is.
[0027] Optionally, according to a larger similarity between the embedding code features of the nodes with a higher similarity in the node similarity matrix, and a smaller deviation between the decoded feature and the initial feature corresponding to each node, the embedding code feature corresponding to each node is adjusted, to obtain an adjusted feature corresponding to each node, and the adjustment specifically includes:
[0028] According to a similarity between the embedding code feature of each sampling node and the embedding code feature of the node corresponding to the sampling node in the node similarity matrix, the embedding code feature of the node is adjusted.
[0029] According to a deviation between the decoded feature and the initial feature corresponding to the node, a second loss corresponding to the node is determined.
[0030] According to a preset weight corresponding to the first loss and the second loss, a comprehensive loss corresponding to the node is determined, and according to a smaller comprehensive loss corresponding to the node, the embedding code feature corresponding to the node is adjusted to obtain an adjusted feature corresponding to the node.
[0031] The specification provides a data classification device, which includes:
[0032] An acquisition module is configured to acquire graph data, wherein the graph data comprises nodes, edges between the nodes represent connection probabilities between the nodes, and each node corresponds to a different object to be classified.
[0033] A determination module is configured to determine, for each node in the graph data, neighbor nodes of the node in the graph data, and determine an initial feature of the node according to attribute information of the node.
[0034] A feature extraction module is configured to determine a node similarity matrix according to connection probabilities between the nodes and similarities between the neighbor nodes of the node in the graph data, and perform embedding coding on the initial feature of each node to obtain an embedding coding feature of each node.
[0035] A decoding module is configured to decode the embedding coding feature of each node by using a preset decoder to obtain a decoded feature.
[0036] An adjustment module is configured to adjust the embedding coding feature of each node according to a constraint condition that the greater the similarity between the embedding coding features of the nodes with higher similarity in the node similarity matrix is, and a constraint condition that the smaller the deviation between the decoded feature and the initial feature corresponding to each node is, to obtain an adjusted feature corresponding to each node.
[0037] A classification module is configured to classify the objects to be classified according to the adjusted feature corresponding to each node.
[0038] Optionally, the acquisition module is specifically configured to acquire original data, wherein the original data comprises attribute data of the objects to be classified and association relationship data between the objects to be classified, construct graph data according to the attribute data of the objects to be classified and the association relationship data between the objects to be classified, and different objects to be classified correspond to different nodes in the graph data, and edges between different nodes represent association relationships between the different nodes.
[0039] Optionally, the determination module is specifically configured to determine, for each node in the graph data, nodes with a connection relationship belonging to a specified order between the node and the nodes in the graph data as neighbor nodes of the node in the graph data.
[0040] Optionally, the feature extraction module is specifically configured to input the initial feature of each node into a preset embedding model, determine an uncertainty value of the node according to the initial feature of the node by using the embedding model, and determine the embedding coding feature of the node according to the uncertainty value.
[0041] Optionally, the adjusting module is specifically configured to, for each node, randomly sample a plurality of nodes from nodes corresponding to a similarity of the node being lower than a preset threshold in the node similarity matrix, as the sampling nodes corresponding to the node; and adjust the embedding code feature corresponding to the node, with a constraint condition that the higher the similarity between the embedding code feature of a sampling node and the embedding code feature of the node in the node similarity matrix, the greater the similarity between the embedding code feature of the sampling node and the embedding code feature of the node.
[0042] Optionally, the adjusting module is specifically configured to, for each node, determine an uncertainty value of the node according to the embedding code feature corresponding to the node; determine a node deviation weight corresponding to the node according to the uncertainty value of the node; and for each node, adjust the embedding code feature corresponding to the node, with a constraint condition that the smaller the deviation between the decoded feature corresponding to the node and the initial feature, the smaller the node deviation weight corresponding to the node.
[0043] Optionally, the adjusting module is specifically configured to, for each node, determine a first loss corresponding to the node according to the similarity between the embedding code feature of the node and the embedding code feature of each other node in the node similarity matrix; and determine a second loss corresponding to the node according to the deviation between the decoded feature corresponding to the node and the initial feature; determine a comprehensive loss corresponding to the node according to a preset weight corresponding to the first loss and the second loss; and adjust the embedding code feature corresponding to the node, with a constraint condition that the smaller the comprehensive loss corresponding to the node, the smaller the adjustment of the embedding code feature corresponding to the node, to obtain an adjusted feature corresponding to the node.
[0044] The present specification provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the above data classification method.
[0045] The present specification provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the above data classification method when executing the program.
[0046] The above at least one technical solution adopted by the present specification can achieve the following beneficial effects:
[0047] In the data classification method provided in the specification, first, the graph data is obtained, wherein the graph data contains nodes, edges between the nodes representing the connection probability between the nodes, and each node corresponds to a different object to be classified. Then, for each node in the graph data, the neighbor nodes of the node in the graph data are determined, and the initial features of the node are determined according to the attribute information of the node. The node similarity matrix is determined according to the connection probability between the nodes and the similarity between the neighbor nodes of the node in the graph data. The initial features of each node are embedded and coded to obtain the embedded coding features of each node. The embedded coding features of each node are decoded by a preset decoder to obtain the decoded features. The similarity between the embedded coding features of the nodes with higher similarity in the node similarity matrix is greater as a constraint condition, and the deviation between the decoded features corresponding to each node and the initial features is smaller as a constraint condition. The embedded coding features corresponding to each node are adjusted to obtain the adjusted features corresponding to each node. The objects to be classified are classified according to the adjusted features corresponding to each node.
[0048] As can be seen from the above method, the deviation between the decoded features obtained by decoding the embedded coding features of each node in the graph data and the initial features of each node, and the structure features of each node in the graph data determined according to the neighbor nodes of each node in the graph data, are determined. Then, the embedded coding features corresponding to each node are adjusted according to the decoded features of each node and the structure features of each node in the graph data, to improve the accuracy of the features of each node obtained, and thus improve the accuracy of data classification. BRIEF DESCRIPTION OF DRAWINGS
[0049] The accompanying drawings used to provide further understanding of the specification, constitute a part of the specification, the illustrative embodiments of the specification and the description thereof are used to explain the specification, and do not constitute improper limitation on the specification. In the drawings:
[0050] Figure 1 A flowchart of a data classification method provided in the specification;
[0051] Figure 2 A schematic diagram of the graph data provided in the specification;
[0052] Figure 3 A schematic diagram of the similarity matrix provided in the specification;
[0053] Figure 4 A schematic diagram of a data classification device provided in the specification;
[0054] Figure 5 A schematic diagram of a data classification device provided in the specification;Figure 1 a schematic diagram of an electronic device. DETAILED DESCRIPTION
[0055] For the purposes of the present description, the technical solutions and advantages, the technical solutions of the present description will be described in detail below with reference to specific embodiments of the present description and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of the present description, not all embodiments. Based on the embodiments in the present description, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of protection of the present description.
[0056] The technical solutions provided by the embodiments of the present description will be described in detail below with reference to the drawings.
[0057] Figure 1 A flowchart of a data classification method provided in the present description includes the following steps:
[0058] S101: Obtain graph data, the graph data contains nodes, edges between the nodes represent connection probabilities between the nodes, and each node corresponds to a different object to be classified.
[0059] In the present description, the business platform can obtain each original data, and construct graph data according to each original data. The original data herein contains attribute data of each object to be classified and association relationship data between each object to be classified. The object to be classified herein can be determined according to the actual scene.
[0060] For example, if the business platform is a user paper management platform, the object to be classified described above can be a user, the attribute data of each object to be classified in the original data described above can be the attribute data of each user. The attribute data herein can be, for example, the number of papers of the user, the name of the paper, the username, etc. The association relationship data between each object to be classified in the original data described above can be the association relationship data between each user, such as the number of paper citations between users. When there is a case of mutual citation of papers between two users, it means that there is a citation association relationship between the two users.
[0061] Further, the business platform can construct graph data according to the attribute data of each object to be classified and the association relationship data between each object to be classified, as shown in Figure 2 .
[0062] Figure 2 A schematic diagram of the graph data provided in the present description.
[0063] In Figure 2In the above, the graph data contains five nodes corresponding to the five objects to be classified, i.e., A, B, C, D, and E. The edges between any two nodes represent the association relationship between the two nodes, and the number on the edge represents the connection probability between the two nodes, such as the connection probability between node A and node C is 0.632.
[0064] In the above, the connection probability between nodes can be determined according to the association relationship data. The following will take the number of citations of papers as an example to explain the above in detail.
[0065] Specifically, the server can determine the connection probability of the edge between the nodes corresponding to the two users in the graph data according to the number of papers cited by the two users, which can be specifically referred to as the following formula:
[0066]
[0067] In the above formula, p(x) is the connection probability between two nodes, and x is the number of papers cited by the two users.
[0068] It should be noted that the connection probability of the edge between the two nodes above is used to represent the probability of the existence of the association relationship between the two users corresponding to the two nodes, for example, the more the number of papers cited by the two users, the higher the probability of the existence of the association relationship between the two users, and the higher the connection probability of the edge between the two nodes corresponding to the two users in the graph data.
[0069] In this specification, the execution subject for implementing the data classification method can be a specified device such as a server, a business platform, a notebook computer, a desktop computer, a mobile phone, and the like. For the sake of description, the following will take the server as an example to explain the data classification method provided in this specification.
[0070] S102: For each node contained in the graph data, determine the neighbor nodes of the node in the graph data, and determine the initial features of the node according to the attribute information of the node.
[0071] Further, the server can determine, for each node contained in the graph data, the nodes having a connection relationship with the node in the graph data and belonging to a specified order as the neighbor nodes of the node in the graph data.
[0072] Here, the specified order refers to the order of the connection relationship with the given node. For example, if the specified order is first, then any other node directly connected to the given node is considered a first-order neighbor. As another example, if the specified order is second, then any node connected to a first-order neighbor is considered a second-order neighbor. Figure 2 In the diagram, the first-order neighbors of node A are nodes C and D, the second-order neighbors of node A are nodes C and D, and the first-order neighbors of nodes C and D are nodes B and E, and so on. The third-order neighbors, fourth-order neighbors, etc. of node A can be determined. This specification will not go into detail here.
[0073] In addition, the server can also perform initial encoding on the attribute information of each node based on the attribute information of each node in order to determine the initial characteristics of each node. Here, the attribute information of each node is the attribute information of the object to be classified corresponding to each node.
[0074] It should be noted that when the server obtains raw data, there may be defects in the data acquisition method or the data source may be unclear, which may lead to inaccurate raw data for each node. When the accuracy of the raw data for a node is low, the uncertainty value corresponding to the initial characteristics of that node determined by the server is higher.
[0075] S103: Based on the connection probability between each node and the similarity between each node's neighboring nodes in the graph data, determine the node similarity matrix, and embed the initial features of each node to obtain the embedding encoded features of each node.
[0076] Furthermore, the server can determine the node similarity matrix of the graph data based on the connection probability between each node and the similarity between each node's neighboring nodes in the graph data. The specific formula can be found in the following formula:
[0077]
[0078] In the above formula, P is the matrix of connection probabilities between nodes, c is a predefined parameter, and t is the specified order, which can be set to 1, 2, ..., i.e., first order, second order, ..., according to actual needs.
[0079] It can be seen from the above formula that the server can determine the node similarity matrix of the graph data according to the similarity between the neighbor nodes of a specified order of one of the two nodes and the neighbor nodes of a specified order of the other node, and the similarity between the connection probability between each neighbor node of a specified order of one of the two nodes and itself and the connection probability between each neighbor node of a specified order of the other node and itself, for each two nodes in the nodes.
[0080] It should be noted that in the node similarity matrix of the graph data, the higher the similarity between the neighbor nodes of any two nodes in the graph data, and the higher the similarity between the connection probability of each neighbor node of the two nodes and itself, the higher the similarity of the two nodes in the node similarity matrix of the graph data.
[0081] Specifically, the server can determine the similarity between the neighbor nodes of each node in the graph data and the neighbor nodes of each other node in the graph data to determine the node similarity matrix of the graph data, as shown in Figure 3 .
[0082] Figure 3 The schematic diagram of the similarity matrix provided in the specification.
[0083] In Figure 3 , the graph data contains five nodes A, B, C, D, and E, wherein the value 1 in the first row and the second column of the similarity matrix is the similarity between the neighbor nodes of node A in the graph data and the neighbor nodes of node B in the graph data, and so on.
[0084] In addition, the server can input the initial feature of each node into a preset embedding model to determine the uncertainty value of the node according to the initial feature of the node through the embedding model, and determine the embedding coding feature of the node according to the uncertainty value.
[0085] The embedding model can be a Gaussian embedding model, and the server can determine the uncertainty value of each node according to the initial feature of the node through the Gaussian embedding model, and determine the embedding mean vector and the embedding variance vector of the node in the Gaussian distribution space according to the uncertainty value, wherein the greater the uncertainty value of the node, the greater the embedding variance vector of the node in the Gaussian distribution space, which can be referred to as the following formula:
[0086]
[0087]
[0088] In the above, are trainable parameters of the Gaussian embedding model, μ (0) is an embedding mean vector of the node in the Gaussian distribution space, σ (0) is an embedding variance vector of the node in the Gaussian distribution space.
[0089] Further, the Gaussian embedding model can determine the embedding encoding feature of the node according to the embedding mean vector and the embedding variance vector of the node in the Gaussian distribution space.
[0090] S104: Decoding the embedding encoding feature of each node by using a preset decoder to obtain a decoded feature.
[0091] As can be seen from the above, when determining the embedding encoding feature corresponding to each node, the server can consider the uncertainty value of the initial feature of the node and determine the embedding encoding feature, so that when the embedding encoding feature of the node is decoded by using the preset decoder, there is a certain error between the decoded feature and the initial feature of the node.
[0092] Based on this, the server can adjust the embedding encoding feature corresponding to each node as a constraint condition that the smaller the deviation between the decoded feature and the initial feature corresponding to each node is, to obtain the adjusted feature corresponding to each node, and before this, the server can first decode the embedding encoding feature of each node by using the preset decoder to obtain the decoded feature.
[0093] S105: Adjusting the embedding encoding feature corresponding to each node as a constraint condition that the higher the similarity of the nodes in the node similarity matrix is, the greater the similarity between the embedding encoding features of the nodes is, and as a constraint condition that the smaller the deviation between the decoded feature and the initial feature corresponding to each node is, to obtain the adjusted feature corresponding to each node.
[0094] In this specification, the server can obtain each sampling node corresponding to each node by using a negative sampling method, and then can adjust the embedding encoding feature corresponding to each node as a constraint condition that the higher the similarity of the nodes in the node similarity matrix is, the greater the similarity between the embedding encoding features of the nodes is.
[0095] Specifically, the server can randomly sample a plurality of nodes from the nodes corresponding to the similarity of the node in the node similarity matrix being lower than the preset threshold value for each node, as the sampling nodes corresponding to the node, and adjust the embedding code feature corresponding to the node as a constraint condition that the higher the similarity of the sampling node corresponding to the node in the node similarity matrix is, the greater the similarity between the embedding code feature of the sampling node and the embedding code feature of the node is.
[0096] In addition, the server can determine the uncertainty value of the node according to the embedding code feature corresponding to the node, determine the node deviation weight corresponding to the node according to the uncertainty value of the node, and adjust the embedding code feature corresponding to the node as a constraint condition that the smaller the deviation between the decoded feature corresponding to the node and the initial feature is, for each node, wherein the smaller the node deviation weight corresponding to the node is, the smaller the adjustment of the embedding code feature corresponding to the node as a constraint condition that the smaller the deviation between the decoded feature corresponding to the node and the initial feature is.
[0097] It should be noted that the above two constraint conditions can be used alone or together, preferably, the server can adjust the embedding code feature corresponding to each node as a constraint condition that the higher the similarity of the nodes in the node similarity matrix is, the greater the similarity between the embedding code features is, and as a constraint condition that the smaller the deviation between the decoded feature corresponding to each node and the initial feature is, to obtain the adjusted feature corresponding to each node.
[0098] Specifically, the server can determine the first loss corresponding to the node according to the similarity between the embedding code feature of the node and the embedding code feature of each other node in the node similarity matrix, and determine the second loss corresponding to the node according to the deviation between the decoded feature corresponding to the node and the initial feature, determine the comprehensive loss corresponding to the node according to the preset weight corresponding to the first loss and the second loss, and adjust the embedding code feature corresponding to the node as a constraint condition that the smaller the comprehensive loss corresponding to the node is.
[0099] S106: Classify each to-be-classified object according to the adjusted feature corresponding to each node.
[0100] Further, the server can classify the to-be-classified objects corresponding to each node according to the similarity between the adjusted features corresponding to each node.
[0101] For example, assuming that each node is a user node, each user corresponding to each node can be classified into a machine learning user node, a natural language processing user node, a neural network user node, a robot technology user node, and the like according to the similarity of the adjusted features between each node.
[0102] It should be noted that the above classification method can also be to classify each object to be classified according to the adjusted features corresponding to each node by using a multi-layer perceptron (MLP).
[0103] As can be seen from the above, the server can determine the embedding encoding features corresponding to each node according to the uncertainty of the original data corresponding to each node by embedding the encoding model, and can determine the node similarity matrix according to the connection probability between nodes and the similarity between neighbor nodes of each node in the graph data, and then can adjust the embedding encoding features corresponding to each node with the two constraints that the similarity between the embedding encoding features of the nodes with higher similarity in the node similarity matrix is greater, and the deviation between the decoded features corresponding to each node and the initial features is smaller, to obtain the adjusted features corresponding to each node, thereby improving the accuracy of classifying each object to be classified according to the adjusted features corresponding to each node.
[0104] The above is a data classification method provided by one or more embodiments of the present specification, based on the same idea, the present specification also provides a corresponding data classification device, as shown in Figure 4 .
[0105] Figure 4 A schematic diagram of a data classification device provided by the present specification includes:
[0106] The acquisition module 401 is configured to acquire graph data, wherein the graph data contains nodes, the edges between the nodes are used to represent the connection probability between the nodes, and each node corresponds to different objects to be classified.
[0107] The determination module 402 is configured to determine, for each node contained in the graph data, neighbor nodes of the node in the graph data, and determine an initial feature of the node according to attribute information of the node.
[0108] The feature extraction module 403 is configured to determine a node similarity matrix according to the connection probability between nodes and the similarity between neighbor nodes of each node in the graph data, and to perform embedding coding on the initial feature of each node to obtain an embedding encoding feature of each node.
[0109] The decoding module 404 is configured to decode the embedding encoded feature of each node by a preset decoder to obtain a decoded feature.
[0110] The adjusting module 405 is configured to adjust the embedding encoded feature of each node under the constraint condition that the higher the similarity between the embedding encoded features of the nodes with higher similarity in the node similarity matrix, the greater the similarity, and the constraint condition that the smaller the deviation between the decoded feature corresponding to each node and the initial feature, the smaller the deviation.
[0111] The classification module 406 is configured to classify each object to be classified according to the adjusted feature corresponding to each node.
[0112] Optionally, the obtaining module 401 is specifically configured to obtain original data, wherein the original data includes attribute data of each object to be classified and association relationship data between the objects to be classified; and construct graph data according to the attribute data of each object to be classified and the association relationship data between the objects to be classified, wherein different objects to be classified correspond to different nodes in the graph data, and edges between different nodes are used to represent the association relationship between the different nodes.
[0113] Optionally, the determining module 402 is specifically configured to, for each node included in the graph data, determine the nodes with a connection relationship belonging to a specified order with the node in the graph data as neighbor nodes of the node in the graph data.
[0114] Optionally, the feature extraction module 403 is specifically configured to, for each node, input the initial feature of the node into a preset embedding model, so as to determine the uncertainty value of the node according to the initial feature of the node by the embedding model, and determine the embedding encoded feature of the node according to the uncertainty value.
[0115] Optionally, the adjusting module 405 is specifically configured to, for each node, randomly sample a plurality of nodes from the nodes corresponding to the node in the node similarity matrix and having a similarity lower than a preset threshold, as the sampling nodes corresponding to the node; and adjust the embedding encoded feature of the node under the constraint condition that the higher the similarity between the embedding encoded features of the sampling nodes corresponding to the node in the node similarity matrix and the embedding encoded feature of the node, the greater the similarity.
[0116] Optionally, the adjusting module 405 is specifically configured to, for each node, determine an uncertainty value of the node according to the embedding encoded feature corresponding to the node; determine a node bias weight corresponding to the node according to the uncertainty value of the node; and for each node, adjust the embedding encoded feature corresponding to the node according to a constraint condition that the smaller the bias between the decoded feature and the initial feature corresponding to the node is, wherein the smaller the node bias weight corresponding to the node is, the smaller the adjustment of the embedding encoded feature corresponding to the node according to the constraint condition that the smaller the bias between the decoded feature and the initial feature corresponding to the node is.
[0117] Optionally, the adjusting module 405 is specifically configured to, for each node, determine a first loss corresponding to the node according to the similarity between the embedding encoded feature of the node and the embedding encoded feature of each other node in the node similarity matrix, and determine a second loss corresponding to the node according to the bias between the decoded feature and the initial feature corresponding to the node; determine a comprehensive loss corresponding to the node according to a preset weight corresponding to the first loss and the second loss; and adjust the embedding encoded feature corresponding to the node according to a constraint condition that the smaller the comprehensive loss corresponding to the node is, to obtain an adjusted feature corresponding to the node.
[0118] The specification also provides a computer-readable storage medium storing a computer program, which can be used to execute the above Figure 1 The specification also provides a computer-readable storage medium storing a computer program, which can be used to execute the above
[0119] The specification also provides a computer-readable storage medium storing a computer program, which can be used to execute the above Figure 5 The specification also provides a computer-readable storage medium storing a computer program, which can be used to execute the above Figure 1 The specification also provides a computer-readable storage medium storing a computer program, which can be used to execute the above Figure 5 The specification also provides a computer-readable storage medium storing a computer program, which can be used to execute the above Figure 1 The specification also provides a computer-readable storage medium storing a computer program, which can be used to execute the above
[0120] Of course, in addition to the software implementation, the specification does not exclude other implementation manners, such as logic devices or a combination of software and hardware, that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or a logic device.
[0121] In the 1990s, it was quite obvious to distinguish whether an improvement in a technology was in hardware (e.g., improvement in circuit structures of diodes, transistors, switches, etc.) or in software (improvement in method flow). However, as technology has evolved, many improvements in method flow today can be considered as direct improvements in hardware circuit structures. Designers almost always obtain the corresponding hardware circuit structures by programming the improved method flow into hardware circuits. Therefore, it cannot be said that an improvement in a method flow cannot be implemented by hardware entity modules. For example, a programmable logic device (PLD) (e.g., a field programmable gate array (FPGA)) is an integrated circuit whose logic function is determined by user programming of the device. A digital system is "integrated" on a PLD by the designer programming it, rather than by asking a chip manufacturer to design and fabricate a custom integrated circuit chip. Moreover, instead of manually fabricating integrated circuit chips, this programming is now mostly implemented by "logic compiler" software, which is similar to software compilers used in program development, and the original code to be compiled is written in a specific programming language, which is called a hardware description language (HDL), and there are many such languages, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., and the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should be aware that, as long as the method flow is logically programmed in the above-mentioned hardware description languages and programmed into an integrated circuit, a hardware circuit implementing the logical method flow can be easily obtained.
[0122] The controller can be implemented in any suitable way, for example, the controller can take the form of a microprocessor or processor and a computer readable medium storing computer readable program code, such as software or firmware, executable by the (micro)processor, logic gates, switches, an application specific integrated circuit (ASIC), a programmable logic controller and an embedded microcontroller, examples of which include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320, the memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also know that, in addition to being implemented in pure computer readable program code, the controller can equally well be implemented to perform the same functions using logic gates, switches, an application specific integrated circuit, a programmable logic controller and an embedded microcontroller, etc. by means of a logical programming of the method steps. The controller can thus be considered as a hardware component, and the means comprised therein for performing the various functions can be considered as structures within the hardware component. Alternatively, the means for performing the various functions can even be considered as both a software module implementing the method and a structure within the hardware component.
[0123] The systems, apparatuses, modules or units illustrated by the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer can be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0124] For the sake of description, the above apparatuses are described in various units with functions respectively. Of course, the functions of the units can be implemented in one or more software and / or hardware in implementing the present specification.
[0125] Those skilled in the art will understand that the embodiments of the present specification can be provided as a method, a system or a computer program product. Therefore, the present specification can take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware aspects. Moreover, the present specification can take the form of a computer program product implemented on one or more computer usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.
[0126] The specification is presented with reference to flow diagrams and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the specification. It will be understood that each block of the flow diagrams and / or block diagrams, and combinations of blocks in the flow diagrams and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processing element or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flow diagrams and / or block diagrams block or blocks. Figure 1 The flow diagrams and / or block diagrams in the specification can present a method, apparatus or computer program product according to embodiments of the specification. Although the flow diagrams and / or block diagrams can present a method, apparatus or computer program product according to embodiments of the specification, it can be understood that each block in the flow diagrams and / or block diagrams and combinations of blocks in the flow diagrams and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processing element or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flow diagrams and / or block diagrams block or blocks. Figure 1 The flow diagrams and / or block diagrams in the specification can present a method, apparatus or computer program product according to embodiments of the specification. Although the flow diagrams and / or block diagrams can present a method, apparatus or computer program product according to embodiments of the specification, it can be understood that each block in the flow diagrams and / or block diagrams and combinations of blocks in the flow diagrams and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processing element or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flow diagrams and / or block diagrams block or blocks.
[0127] These computer program instructions can also be loaded into a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flow diagrams and / or block diagrams block or blocks. Figure 1 The flow diagrams and / or block diagrams in the specification can present a method, apparatus or computer program product according to embodiments of the specification. Although the flow diagrams and / or block diagrams can present a method, apparatus or computer program product according to embodiments of the specification, it can be understood that each block in the flow diagrams and / or block diagrams and combinations of blocks in the flow diagrams and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processing element or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flow diagrams and / or block diagrams block or blocks. Figure 1 The flow diagrams and / or block diagrams in the specification can present a method, apparatus or computer program product according to embodiments of the specification. Although the flow diagrams and / or block diagrams can present a method, apparatus or computer program product according to embodiments of the specification, it can be understood that each block in the flow diagrams and / or block diagrams and combinations of blocks in the flow diagrams and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processing element or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flow diagrams and / or block diagrams block or blocks.
[0128] These computer program instructions can also be loaded into a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flow diagrams and / or block diagrams block or blocks. Figure 1 The flow diagrams and / or block diagrams in the specification can present a method, apparatus or computer program product according to embodiments of the specification. Although the flow diagrams and / or block diagrams can present a method, apparatus or computer program product according to embodiments of the specification, it can be understood that each block in the flow diagrams and / or block diagrams and combinations of blocks in the flow diagrams and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processing element or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flow diagrams and / or block diagrams block or blocks. The flow diagrams and / or block diagrams in the specification can present a method, apparatus or computer program product according to embodiments of the specification. Although the flow diagrams and / or block diagrams can present a method, apparatus or computer program product according to embodiments of the specification, it can be understood that each block in the flow diagrams and / or block diagrams and combinations of blocks in the flow diagrams and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processing element or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flow diagrams and / or block diagrams block or blocks.
[0129] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0130] The memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) for example. Mass storage can include, in examples, EEPROM, flash memory or other non-volatile memory. The memory is an example of computer readable media.
[0131] Computer-readable media includes permanent and non-permanent, movable and non-movable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to a computing device. According to the definition herein, computer-readable media does not include transitory media such as modulated data signals and carriers.
[0132] It should also be noted that the terms "comprising", "containing", or any other variant thereof are intended to cover non-exclusive inclusion, such that a process, method, article or apparatus that comprises a list of elements does not only include those elements, but can also include other elements not expressly listed or inherent to such process, method, article or apparatus. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article or apparatus that includes the element.
[0133] Those skilled in the art will appreciate that embodiments of the present specification can be provided as methods, systems or computer program products. Therefore, the present specification can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Moreover, the present specification can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0134] The present specification can be described in the general context of computer-executable instructions, such as program modules, executed by computers. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The present specification can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in both local and remote computer storage media including storage devices.
[0135] The various embodiments described in this specification are described using a numbering of embodiments approach: these are each individually integrated contributions pertaining to different but related aspects of the description. Each of the various embodiments can stand on its own, and each can be combined with the subject matter of other embodiments to produce further embodiments. Where the same numbers appear in different embodiments, such numbers are used for the sake of ease of understanding only and do not imply that the embodiments in which such numbers appear are the same or similar.
[0136] The above description is embodied in the form of only a description of embodiments of the present specification, and is not intended to limit the present specification. Various changes and modifications can be made by those skilled in the art based on the present specification. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification should be included in the scope of the claims of the present specification.
Claims
1. A method of data classification, characterized by, The method comprises: obtaining graph data, wherein each node in the graph data comprises a connection probability between nodes, each node corresponds to a different object to be classified, the graph data is constructed according to attribute data of each user and association relationship data between the users, the attribute data comprises at least one of the number of papers, the name of the paper and the username of the user, and the association relationship data comprises the number of paper citations between the users; for each node in the graph data, determining the neighbor nodes of the node in the graph data, and determining the initial feature of the node according to the attribute information of the node; determining a node similarity matrix according to the connection probability between nodes and the similarity between neighbor nodes of each node in the graph data, and embedding and encoding the initial feature of each node to obtain the embedding and encoding feature of each node; wherein for each two nodes in the nodes, the node similarity matrix of the graph data is determined according to the similarity between the specified order neighbor nodes of one of the two nodes and the specified order neighbor nodes of the other node, and the similarity between the connection probability between one of the two nodes and each specified order neighbor node of itself and the connection probability between the other node and each specified order neighbor node of itself. decoding the embedding and encoding feature of each node by a preset decoder to obtain a decoded feature; adjusting the embedding and encoding feature of each node according to the constraint condition that the higher the similarity between the nodes in the node similarity matrix, the greater the similarity between the embedding and encoding features of the nodes, and the constraint condition that the smaller the deviation between the decoded feature and the initial feature corresponding to each node, to obtain the adjusted feature corresponding to each node; classifying each object to be classified according to the adjusted feature corresponding to each node.
2. The method of claim 1, wherein, Obtaining graph data, specifically comprising: obtaining each original data, wherein the original data comprises attribute data of each object to be classified and association relationship data between the objects to be classified; constructing graph data according to the attribute data of each object to be classified and the association relationship data between the objects to be classified, wherein different objects to be classified correspond to different nodes in the graph data, and the edges between different nodes are used to represent the association relationship between different nodes.
3. The method of claim 1, wherein, for each node in the graph data, determining the neighbor nodes of the node in the graph data, specifically comprising: for each node in the graph data, determining the nodes with a connection relationship belonging to a specified order between the node in the graph data as the neighbor nodes of the node in the graph data.
4. The method of claim 1, wherein, embedding and encoding the initial feature of each node to obtain the embedding and encoding feature of each node, specifically comprising: for each node, inputting the initial feature of the node into a preset embedding model to determine the uncertainty value of the node according to the initial feature of the node by the embedding model, and determining the embedding and encoding feature of the node according to the uncertainty value.
5. The method of claim 1, wherein, Adjust the embedding code feature corresponding to each node as a constraint condition that the higher the similarity of the nodes with higher similarity in the node similarity matrix is, the greater the similarity between the embedding code features of the nodes is, and the adjustment specifically includes: For each node, randomly sample a plurality of nodes from the nodes corresponding to the node in the node similarity matrix and having a similarity lower than a preset threshold, as the sampling nodes corresponding to the node; Adjust the embedding code feature corresponding to the node as a constraint condition that the higher the similarity of the sampling nodes corresponding to the node in the node similarity matrix is, the greater the similarity between the embedding code features of the sampling nodes and the embedding code feature of the node is.
6. The method of claim 1, wherein, Adjust the embedding code feature corresponding to each node as a constraint condition that the smaller the deviation between the decoded feature and the initial feature corresponding to each node is, and the adjustment specifically includes: For each node, determine the uncertainty value of the node according to the embedding code feature corresponding to the node; Determine the node deviation weight corresponding to the node according to the uncertainty value of the node; For each node, adjust the embedding code feature corresponding to the node as a constraint condition that the smaller the deviation between the decoded feature and the initial feature corresponding to the node is, and the smaller the node deviation weight corresponding to the node is, the smaller the adjustment of the embedding code feature corresponding to the node as a constraint condition is.
7. The method of claim 1, wherein, Adjust the embedding code feature corresponding to each node as a constraint condition that the smaller the deviation between the decoded feature and the initial feature corresponding to each node is, and the adjustment specifically includes: For each node, determine the first loss corresponding to the node according to the similarity between the embedding code feature of the node and the embedding code feature of each other node in the node similarity matrix; and Determine the second loss corresponding to the node according to the deviation between the decoded feature and the initial feature corresponding to the node; Determine the comprehensive loss corresponding to the node according to the weights corresponding to the preset first loss and second loss; Adjust the embedding code feature corresponding to the node as a constraint condition that the smaller the comprehensive loss corresponding to the node is, and obtain the adjusted feature corresponding to the node.
8. A data classification apparatus characterized by comprising: Comprise: An acquisition module is used to acquire graph data, wherein the graph data contains nodes, edges between the nodes are used to represent connection probability between the nodes, and each node corresponds to different objects to be classified; The graph data is constructed according to attribute data of each user and association relationship data between the users; The attribute data includes at least one of the number of papers, the name of the paper, and the username of the user, and the association relationship data includes the number of paper citations between the users; The determining module is configured to determine, for each node in the graph data, neighbor nodes of the node in the graph data, and determine an initial feature of the node according to attribute information of the node. The feature extraction module is configured to determine a node similarity matrix according to connection probabilities between nodes and similarities between neighbor nodes of each node in the graph data, and perform embedding coding on the initial feature of each node to obtain an embedding coding feature of each node. The decoding module is configured to decode the embedding coding feature of each node by using a preset decoder to obtain a decoded feature. The adjusting module is configured to adjust the embedding coding feature of each node according to a constraint condition that the higher the similarity between nodes in the node similarity matrix, the greater the similarity between the embedding coding features of the nodes, and a constraint condition that the smaller the deviation between the decoded feature and the initial feature corresponding to each node, to obtain an adjusted feature corresponding to each node. The classification module is configured to classify each object to be classified according to the adjusted feature corresponding to each node.
9. The apparatus of claim 8, wherein, The obtaining module is configured to obtain original data, wherein the original data includes attribute data of each object to be classified and association relationship data between the objects to be classified, and construct graph data according to the attribute data of each object to be classified and the association relationship data between the objects to be classified, wherein different objects to be classified correspond to different nodes in the graph data, and edges between different nodes represent association relationships between the nodes.
10. The apparatus of claim 8, wherein, The determining module is configured to determine, for each node in the graph data, nodes having a connection relationship with the node in the graph data and belonging to a specified order as neighbor nodes of the node in the graph data.
11. The apparatus of claim 8, wherein, The feature extraction module is configured to input the initial feature of each node into a preset embedding model, to determine an uncertainty value of the node according to the initial feature of the node by using the embedding model, and determine an embedding coding feature of the node according to the uncertainty value.
12. The apparatus of claim 8, wherein, The adjusting module is configured to, for each node, randomly sample a plurality of nodes from nodes corresponding to a similarity lower than a preset threshold in the node similarity matrix to obtain sampling nodes corresponding to the node, and adjust the embedding coding feature of the node according to a constraint condition that the higher the similarity between the embedding coding features of the sampling nodes corresponding to the node in the node similarity matrix, the greater the similarity between the embedding coding feature of the node and the embedding coding feature of the sampling nodes.
13. The apparatus of claim 8, wherein, The adjustment module is specifically configured to determine, for each node, an uncertainty value of the node according to the embedding code feature corresponding to the node; and determine a node bias weight corresponding to the node according to the uncertainty value of the node. For each node, the embedding code feature corresponding to the node is adjusted according to a constraint condition that the smaller the bias between the decoded feature and the initial feature corresponding to the node is, wherein the smaller the node bias weight corresponding to the node is, the smaller the adjustment of the embedding code feature corresponding to the node is according to the constraint condition that the smaller the bias between the decoded feature and the initial feature corresponding to the node is.
14. The apparatus of claim 8, wherein, The adjustment module is specifically configured to determine, for each node, a first loss corresponding to the node according to the similarity between the embedding code feature of the node and the embedding code feature of each other node in the node similarity matrix; and determine a second loss corresponding to the node according to the bias between the decoded feature and the initial feature corresponding to the node; determine a comprehensive loss corresponding to the node according to a preset weight corresponding to the first loss and the second loss; and adjust the embedding code feature corresponding to the node according to a constraint condition that the smaller the comprehensive loss corresponding to the node is, to obtain an adjusted feature corresponding to the node.
15. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, and the computer program is executed by the processor to implement the method in any one of claims 1-7.
16. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the program to implement the method in any one of claims 1-7.
Citation Information
Patent Citations
Method and device for discovering communities in graph sensitive to triangular structure
CN112784118A
Complex network topological graph representation learning method, prediction method and server
CN113065649A