Merge the mode identification method towards diagram data of topological characteristic
Technical field
The present invention relates to technical field of data processing, and in particular, to merges the mode towards diagram data of topological characteristic
Recognition methods.
Background technique
As human society marches toward the information age, the status of data is also had become increasingly important.Nowadays, all the time, generation
All whether there is or not the generations of several data in boundary, and spread in the world by Internet technology.The magnanimity of data scale and
The complication and diversification of content, structure type, so that common structural data form is increasingly difficult to support that people are various
The demand of change.In order to preferably express the relationship between data, people begin trying to indicate data using the structure of figure.Figure
It is a kind of powerful data representation format, the node with attribute for being included and side, it can be with a kind of intuitive and general side
Formula shows the internal relation between different entities, to construct a data network.For example, in field of data storage, such as
The appearance of the chart databases such as Neo4j opens the new gate of a fan for the storage of diagram data.
Analysis and utilization for diagram data always are the hot spot of people's research in recent years.Enterprise can pass through analysis
The behavioral data of user obtains the dynamic of user, understands the hobby and demand of user, customizes accordingly to different user push
Information, to obtain potential profit.Wherein, for the classification of diagram data and pattern-recognition, an exactly wherein important ring.?
In many specific application scenarios, people need to classify to magnanimity diagram data, or to judge whether it meets certain specific
Mode, to carry out statistics to diagram data or be prevented accordingly abnormal situation.However, for towards diagram data
The research of classification and mode identification technology, is still in the starting stage, there is many difficult points at present.
Firstly, figure is a kind of irregular data structure form, any number of node and side can be possessed.Secondly, figure
In node there is certain property arranged side by side, it means that each node is difficult to find that one reasonably puts in order in figure.Two
In a different figure, it is difficult to form an effective matching between node.In addition, figure also possesses other types data and does not have
Topological characteristic.
Currently, the existing technical solution for carrying out classification with pattern-recognition to diagram data using neural network, mainly there is base
In the method for spectral graph theory and based on two kinds of method for scheming to standardize.Both methods is suitable for different application scenarios, and
All there is certain shortcomings.
Some researchers are dedicated to realizing the mapping of diagram data and domain space.Kipf T N., Welling M. exist
In Semi-Supervised Classification with Graph Convolutional Networks (ICLR 2017)
The method of a set of entitled GCN (Graph Convolutional Networks) is proposed, this method utilizes the La Pula of figure
Figure is projected domain space and is operated by this matrix, and the eigenmatrix of a figure is generated in each convolution operation, and will be given birth to
At input of the eigenmatrix as convolution operation next time.But this method is mainly used for fixed figure interior joint rank
(node-level) classification, the classification for diagram data collection need to carry out certain due to the difference of different node of graph and number of edges amount
The pondization operation of kind form, is converted into the feature vector of regular length (fixed-size).In the classification field of set of graphs, the party
The generalization of method leaves a question open, and can not be generalized to the digraph field with side attribute well.
In addition, some researchers use for reference the thought of CNN (Convolutional Neural Network), advised using figure
Generalized is extracted the characteristic tensor of diagram data.Niepert M., Ahmed M., Kutzkov K. are in Learning
A kind of entitled PATCHY-SAN is proposed in Convolutional Neural Networks for Graphs (ICML 2016)
Method.This method is extracted the characteristic node in figure, and using for reference CNN is that each characteristic node constructs receptive field
(Receptive Field), and nodal community is injected into the receptive field matrix of all characteristic nodes of acquisition, as convolution
The input of neural network.This method can be suitable for different size of diagram data, but not advantageously take into account figure
The global characteristics of local topology attribute and figure.
Summary of the invention
For the defects in the prior art, the object of the present invention is to provide a kind of fusion topological characteristics towards diagram data
Mode identification method.
A kind of mode identification method towards diagram data of the fusion topological characteristic provided according to the present invention, comprising:
Figure switch process: it will be rebuild in graph form in memory with the diagram data of database or document form storage;
Data prediction step: the diagram data in memory is projected into vector space and is converted to one group by feature extraction
The characteristic tensor and feature vector of fixed size;
Neural network step: characteristic tensor is trained and is classified with feature vector using neural network.
Preferably, the figure switch process includes:
Diagram data reads sub-step: reading the diagram data stored with database or document form;
Diagram data memory rebuilds sub-step: the diagram data of reading is rebuild in graph form in memory.
Preferably, the data prediction step includes:
Characteristic node extracts sub-step: obtaining the characteristic node sequence of regular length in the figure of reconstruction;
Receptive field constructs sub-step: constructing corresponding receptive field for each characteristic node;
Figure feature extraction sub-step: the self attributes information and topological characteristic information of the figure of receptive field and reconstruction, group are extracted
Synthesize the input for neural network learning.
Preferably, the figure feature extraction sub-step includes:
Node diagnostic extracts: extracting the local topology characteristic information of characteristic node and self attributes information in receptive field and infuses
Enter into receptive field the local feature tensor of formation figure;
Global characteristics extract: extracting the Global Topological characteristic information of figure and the global characteristics vector of formation figure.
Preferably, the neural network step includes:
Local feature convolution substep: receiving and handles the input of the local feature tensor;
Global characteristics connect sub-step entirely: receiving and handle the input of the global characteristics vector;
Fusion Features sub-step: by the output of the local feature convolution unit and the full connection unit of the global characteristics into
Row fusion;
Data classification exports sub-step: the data that fusion obtains are classified and trained.
Preferably, the local topology characteristic information includes the local feature amount that can indicate node topology attribute, including
But it is not limited to:
Empty node label position (Dummy Flag), the degree (Degree) of node, node mean value neighbour's degree (Average
Neighbor Degree), the centrality (Centrality) of node or cluster coefficients (Clustering Coefficient).
Preferably, the Global Topological characteristic information includes the characteristic quantity that can indicate figure Global Topological attribute, including but
It is not limited to:
Node number (Node Number), the density (Density) of figure, is averagely gathered the item number (Edge Number) on side
Class coefficient (Average Neighbor Degree) or global efficiency (Global Efficiency).
Compared with prior art, the present invention have it is following the utility model has the advantages that
The present invention, which passes through, extracts the local topology characteristic quantity of each node and the Global Topological characteristic quantity of figure in receptive field,
So that the input of neural network can topological structure for figure and feature have relatively sharp statement, to improve towards figure number
According to pattern-recognition accuracy rate.The present invention especially opens up the pattern recognition and classification task towards diagram data to figure
The flutterring feature-sensitive of the task has good application value.In actual application scenarios, above-mentioned topological characteristic amount can be passed through
Extraction, improve diagram data collection pattern-recognition accuracy rate.
Detailed description of the invention
Upon reading the detailed description of non-limiting embodiments with reference to the following drawings, other feature of the invention,
Objects and advantages will become more apparent upon:
Fig. 1 is configuration diagram of the invention;
Fig. 2 is local feature tensor schematic diagram;
Fig. 3 is the expansion of local feature tensor and convolution schematic diagram;
Fig. 4 is characterized Vector Fusion schematic diagram.
Specific embodiment
The present invention is described in detail combined with specific embodiments below.Following embodiment will be helpful to the technology of this field
Personnel further understand the present invention, but the invention is not limited in any way.It should be pointed out that the ordinary skill of this field
For personnel, without departing from the inventive concept of the premise, several changes and improvements can also be made.These belong to the present invention
Protection scope.
As shown in Figure 1, a kind of mode identification method towards diagram data for merging topological characteristic provided by the invention, packet
It includes:
Figure switch process: it will be rebuild in graph form in memory with the diagram data of database or document form storage;
Data prediction step: the diagram data in memory is projected into vector space and is converted to one group by feature extraction
The characteristic tensor and feature vector of fixed size;
Neural network step: characteristic tensor is trained and is classified with feature vector using neural network.
Specifically, figure switch process includes:
Diagram data reads sub-step: reading the diagram data stored with database or document form;
Diagram data memory rebuilds sub-step: the diagram data of reading is rebuild in graph form in memory.
Data prediction step includes:
Characteristic node extracts sub-step: obtaining the characteristic node sequence of regular length in the figure of reconstruction;Characteristic node sequence
Refer to the node set sequence of fixed quantity in the top in node importance sequence in individual figure, to describe figure each region
The local feature of core.
Receptive field constructs sub-step: constructing corresponding receptive field for each characteristic node;Receptive field refers to each feature section
The neighbor domain of node of fixed size centered on point includes characteristic node itself and closer node collection adjacent with characteristic node
It closes, for portraying the character representation of characteristic node and its peripheral region.
Figure feature extraction sub-step: the self attributes information and topological characteristic information of the figure of receptive field and reconstruction, group are extracted
Synthesize the input for neural network learning.
Figure feature extraction sub-step includes:
Node diagnostic extracts: extracting the local topology characteristic information of characteristic node and self attributes information in receptive field and infuses
Enter into receptive field the local feature tensor of formation figure;Local topology characteristic information includes the office that can indicate node topology attribute
Portion's characteristic quantity, including but not limited to: empty node label position (Dummy Flag), the degree (Degree) of node, the mean value of node are adjacent
Spend the centrality (Centrality) or cluster coefficients (Clustering of (Average Neighbor Degree), node
Coefficient) etc..Wherein: empty node label position indicates whether node is sky node, and degree and mean value neighbour degree indicate that node is facing
In near field and the incidence relation of other nodes, centrality indicate that significance level of the node in figure, cluster coefficients indicate node
Aggregation extent in its neighborhood.Empty node refers to during extracting characteristic node and receptive field since number of nodes deficiency is specified
Size and the dummy node filled.These sky nodes are for the vector of complementary features node and the vector of receptive field, so that not
Same diagram data can be converted into the size of the identical input for neural network module identification.
Global characteristics extract: extracting the Global Topological characteristic information of figure and the global characteristics vector of formation figure, Global Topological
Characteristic information includes the characteristic quantity that can indicate figure Global Topological attribute, including but not limited to: node number (Node
Number), the item number (Edge Number) on side, the density (Density) of figure, average cluster coefficient (Average Neighbor
) or global efficiency (Global Efficiency) etc. Degree.Wherein, the entirety for the figure that the item number on node number and side indicates
Scale, the density of figure illustrate the dense degree of figure, and average cluster coefficient is the calculation of the Local Clustering coefficient of each node in figure
Art is average, and global efficiency defines the ability of information exchange in whole network.
Neural network step includes:
Local feature convolution substep: receiving and handles the input of local feature tensor;
Global characteristics connect sub-step entirely: receiving and handle the input of global characteristics vector;
Fusion Features sub-step: the output of local feature convolution unit and the full connection unit of global characteristics is merged;
Data classification exports sub-step: the data that fusion obtains are classified and trained.
Characteristic node extracts sub-step by certain priority orders (such as Betweenness Centrality) to each in individual figure
Node is ranked up, so that before node of high importance comes the relatively low node of importance.The unit selection ranking
The characteristic node of forward fixed quantity, and the important area of figure is represented with its neighborhood, be converted to the tensor table of fixed size
Show.
Receptive field constructs sub-step by the neighbor node of fixed quantity around each characteristic node of selection, with these nodes
Receptive field of the neighborhood of the fixed size constituted with its own as special characteristic node.It is extracted in every figure of the unit
All characteristic nodes construct receptive field.Each receptive field is considered as the vector of a regular length, by each feature
The receptive field vector longitudinal arrangement of node, so that it may which a figure is converted to the matrix of a fixed size.
Figure feature extraction sub-step interior joint feature extraction is by extracting opening up for each node included in above-mentioned matrix
Characteristic information is flutterred, and the attribute carried with node itself is combined, the characteristic information total as node.In each receptive field
Node is owned by the characteristic information vector for belonging to it.These vectors will be injected into above-mentioned matrix, and it is big to form a fixation
Three small rank tensors.The other topological characteristic information of node level blends the nodal community carried with figure interior joint, forms one
A feature vector for indicating node diagnostic.These vectors will be injected into the corresponding position in receptive field eigenmatrix, form one
It polymerize three rank tensors of each node local feature in figure;The topological characteristic information of figure rank would be combined into an expression figure macroscopic view
The feature vector of feature indicates the global characteristics of figure with this.It indicates the characteristic tensor of figure local feature and indicates that figure is global
The feature vector of feature will together make up the character representation of figure, the foundation as neural metwork training.
Global characteristics extract the Global Topological characteristic information by counting and extracting whole figure in figure feature extraction sub-step,
By the characteristic quantity for including in Global Topological characteristic information be arranged in feature that one can represent diagram data macroscopic view topology information to
Amount.This feature vector and above-mentioned three ranks tensor together constitute the character representation of figure from whole and part angle respectively, and make
For the input of aftermentioned neural network.
As shown in Fig. 2, receptive field vector of the three rank tensors of description figure local topology characteristic information by all characteristic nodes
Vertical stack forms, and is considered as the node two-dimensional matrix comprising each nodal community vector.Wherein, every a line of matrix
Represent the receptive field vector an of characteristic node.Priority longitudinal arrangement of the receptive field vector according to its core feature node.If
There are feature point number N, receptive field size K then to constitute the eigenmatrix of N × K size.Each point in matrix represents impression
One node of Yezhong.Due to the extraction in node diagnostic extraction unit to node topology attribute, the local feature tensor institute of figure
The content for including has obtained corresponding expansion from nodal community, joined the topological attribute of node.Above-mentioned node diagnostic extracts
Unit is extracted the self attributes and topological attribute of node, and is injected into matrix, forms one and includes node topology attribute
Representative figure local feature set three rank tensors.
As shown in figure 3, above-mentioned three ranks tensor is passed into local feature convolution unit as input.Due to receptive field endwise piling
It is folded, thus for the first time convolution when need to carry out convolution to tensor using the convolution kernel of 1 × K size.If being rolled up using D convolution kernel
Product then can get the convolution results of N × 1 × D size, and wherein D is the port number of matrix.It is further after for convenience
Convolution and pondization operate, and the result is unfolded in the present invention, form the matrix of a size of N × D × 1.The matrix can be
Convolution is carried out using the convolution kernel of common square matrix size in subsequent step, and local feature set is obtained by full articulamentum
Vector indicates.
As shown in figure 4, by the feature vector of local feature convolution unit treated local feature set with by complete
Treated that global characteristics vector is merged in Fusion Features unit for office's feature full connection unit, and exports in data classification single
By the length of connection scaling entirely to classification quantity in member, to carry out classification output to diagram data, realize towards diagram data
Classification and pattern-recognition.
On the basis of the technical solution of the present embodiment, corresponding system prototype is realized to be verified, and pass through reality
It tests and is tested and assesses.It is demonstrated experimentally that the mode identification technology towards diagram data that the present embodiment proposes can be effectively
Pattern-recognition is carried out to diagram data, the extraction on topological characteristic attribute and improvement and the optimization for neural network structure,
Also the accuracy rate of identification can be further increased on the basis of original method.In classification and mode of the reality towards diagram data
In the task of identification, especially for the pattern-recognition of the data set of topological characteristic sensitivity, this scheme, which will possess, more preferably to be known
Other effect.
Specific embodiments of the present invention are described above.It is to be appreciated that the invention is not limited to above-mentioned
Particular implementation, those skilled in the art can make a variety of changes or modify within the scope of the claims, this not shadow
Ring substantive content of the invention.In the absence of conflict, the feature in embodiments herein and embodiment can any phase
Mutually combination.