CN111881303A - Graph network structure method for classifying urban heterogeneous nodes - Google Patents

Graph network structure method for classifying urban heterogeneous nodes Download PDF

Info

Publication number
CN111881303A
CN111881303A CN202010736888.0A CN202010736888A CN111881303A CN 111881303 A CN111881303 A CN 111881303A CN 202010736888 A CN202010736888 A CN 202010736888A CN 111881303 A CN111881303 A CN 111881303A
Authority
CN
China
Prior art keywords
subgraph
graph
central
representation
local
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010736888.0A
Other languages
Chinese (zh)
Inventor
高扬
韩晓宇
王竞
王丹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inner Mongolia Zhongcheng Information Technology Co ltd
Original Assignee
Inner Mongolia Zhongcheng Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inner Mongolia Zhongcheng Information Technology Co ltd filed Critical Inner Mongolia Zhongcheng Information Technology Co ltd
Priority to CN202010736888.0A priority Critical patent/CN111881303A/en
Publication of CN111881303A publication Critical patent/CN111881303A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/36Creation of semantic tools, e.g. ontology or thesauri
    • G06F16/367Ontology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/26Government or public services

Abstract

The invention discloses a graph network structure method for classifying urban heterogeneous nodes, and belongs to the technical field of big data and smart urban network construction. By creating a city abnormal graph, a graph convolution-based neural network and structural information are introduced for training, and the method comprises the following steps: acquiring data and label information required for constructing a city heterogeneous graph and constructing the city heterogeneous graph; preprocessing the city heterogeneous graph to obtain a set of input data; constructing a pre-training model according to the obtained input data set; the front pre-training model part is transferred into a rear pre-training model, and the rear pre-training model is constructed according to an input data set; and integrally transferring the post-pre-training model into a fine-tuning model and constructing the fine-tuning model according to the input data set. The method solves the problem of insufficient labels in urban event classification, realizes the effect of carrying out comprehensive event classification by using different types of data sources, and has wide application prospect in urban event classification.

Description

Graph network structure method for classifying urban heterogeneous nodes
Technical Field
The invention relates to a graph network structure method for classifying urban heterogeneous nodes, and belongs to the technical field of big data and smart urban network construction.
Background
In the construction of smart cities, it is an important ring to establish a public service system for event processing. The system is applied to government platforms such as a captain private line and the like, and various problems reflected by citizens are accepted. The specific flow of the system comprises that for the daily reflected events, related personnel classify the events according to the content and the properties of the events, and then the events are dispatched to corresponding departments according to the categories. However, the manual classification method has low classification accuracy and efficiency, and thus, there is a challenge on how to efficiently classify events.
The current automatic classification method for urban events is mainly based on text data, and does not comprehensively consider other types of data, such as urban location data, website data, mobile APP data and video data for monitoring and capturing. On the other hand, urban events have the characteristic of dynamic change, and lead to the fact that the latest events are layered endlessly, and because the label data of the events are insufficient, and the existing classification method needs a large amount of label data to train a model, a higher accuracy rate cannot be obtained when the latest events are processed.
In summary, although the existing automatic classification technology for urban events has higher efficiency than the manual classification method, when the latest events are processed, the technical defects of single processing data and insufficient tag data still exist.
Disclosure of Invention
The invention aims to solve the problem of poor classification accuracy caused by single processing data and insufficient label data of the existing urban event classification system, and provides a graph network structure method for urban heterogeneous node classification.
The invention is realized by the following technical scheme:
the graph network structure method for classifying the urban heterogeneous nodes comprises the following steps:
the method comprises the following steps: the method comprises the following steps of obtaining data and label information required by constructing the city heterogeneous graph and constructing the city heterogeneous graph:
step 1.1: collecting relevant data of citizens of the complaint event and a geographical position coordinate sequence of all active facilities in the region range of the citizens;
the relevant data of citizens comprise complaint event types, microblogs or account numbers of various map software; types of active facilities include, but are not limited to, hospitals, parks, corporations, and city surveillance cameras;
step 1.2: acquiring trajectory data of citizens based on the microblogs or LBS of various map software in the step 1.1;
wherein, LBS is mobile location service, and the action track of citizen in the track data is represented by a location sequence composed of longitude and latitude;
step 1.3: collecting label information of corresponding facilities according to the geographic position coordinates of all active facilities in the step 1.1;
wherein, corresponding facilities include but are not limited to hospitals, parks, companies and city cameras; the label of the corresponding facility is specifically as follows: the label information of the hospital includes but is not limited to whether the price is for the citizen; the park label information includes but is not limited to whether the indescription phenomenon is serious or not and whether the infrastructure is perfect or not; company's label information includes, but is not limited to, whether or not there is a delinquent payroll phenomenon; the label information of the urban camera includes but is not limited to whether the traffic is congested or not and whether the stealing problem is prominent or not;
step 1.4: abstracting citizens in the track data in the step 1.2 and active facilities in the step 1.3 into user nodes and position nodes respectively, and constructing a city abnormal map based on the track data;
the specific construction process of the city abnormal map comprises the following steps: edges between the user nodes and the position nodes and between the position nodes are constructed based on the track data, and the event types and the label data of the active facilities are respectively corresponding to the specific nodes;
step two: preprocessing the city heterogeneous graph to obtain a set of input data, and specifically comprises the following substeps:
step 2.1: in the city abnormal graph, taking a user node as a center and R as a radius to extract a local subgraph;
wherein, R is a value set artificially and used for determining the size of a local subgraph;
step 2.2: extracting the labels of all nodes in the local subgraph to form a node label set corresponding to the local subgraph, and classifying the labels in the node label set into two types of labels;
the node label set comprises labels of known events and labels of latest events;
setting a threshold value N, if the number of labels of a certain event in the local subgraph is more than or equal to N, classifying the labels into two types of labels, and if not, classifying the labels into the labels of the latest event;
step 2.3: combining the local subgraph extracted in the step 2.1 and the node label set formed in the step 2.2 into a data pair;
step 2.4: repeating the steps 2.1 to 2.3 for K-1 times to obtain an input data set containing K data pairs;
wherein the value range of K is more than or equal to 1000;
thus, through the first step and the second step, an input data set is obtained for subsequent pre-training and fine adjustment;
step three: constructing a pre-training model according to the obtained input data set;
the function of the pre-training model is as follows: mining structural information between nodes in an automatic supervision mode;
the constructed pre-training model comprises a graph segmentation module, a central sub-graph feature extraction module, a context sub-graph feature extraction module and a self-supervision learning module;
the central subgraph feature extraction module comprises a GCN3 coding unit and a central node extraction unit; the context subgraph feature extraction module comprises a GCN4 coding unit and a pooling unit; both GCN3 and GCN4 are atlas neural network models;
the connection relation of each module in the pre-training model is as follows:
the output of the graph segmentation module is respectively connected with the input of the central sub-graph feature extraction module and the input of the context sub-graph feature extraction module, and the output of the central sub-graph feature extraction module and the output of the context sub-graph feature extraction module are both connected with the input of the self-supervision learning module;
the functions of each module in the pre-training model are as follows:
the graph segmentation module has the function of carrying out batch processing on all local subgraphs in the input data set and segmenting each graph into a central subgraph and a context subgraph; the function of the self-supervision learning module is to encode the structural information by optimizing a loss function; the central subgraph feature extraction module has the functions of carrying out coding representation on all the central subgraphs after batch processing and extracting the feature representation of each central subgraph; the context subgraph feature extraction module has the function of coding all the context subgraphs after batch processing and extracting the feature representation of each context subgraph;
the central subgraph is a part which takes the user node as the center and has the radius less than or equal to r in the local subgraph; the context subgraph is a part which takes the user node as the center and has a radius larger than or equal to r in the local subgraph; the feature representation of the central subgraph is the feature representation of the user node; the feature representation of the context subgraph is the average of the feature representations of all nodes with the distance r from the user node; r is a radius value set artificially for determining the size of the central sub-graph and the context sub-graph and 0< R;
the pre-training model before construction specifically comprises the following sub-steps:
step 3.1: calling a graph segmentation module to perform batch processing on the local subgraphs and outputting the batch processed central subgraphs and context subgraphs;
step 3.2: calling a central subgraph feature extraction module, and extracting feature representations of all central subgraphs in each batch processing process based on the batch processing central subgraphs obtained in the step 3.1;
wherein calling the GCN3 cell encodes the central subgraph; calling a central node extraction unit to obtain the feature representation of the central subgraph;
step 3.3: calling a context subgraph feature extraction module, and extracting feature representations of all context subgraphs in each batch processing process based on the batch processing context subgraphs obtained in the step 3.1;
wherein the GCN4 unit is called to encode a context subgraph; calling a pooling unit to obtain a feature representation of the context sub-graph;
step 3.4: calculating the loss L based on the feature representation of the central subgraph and the feature representation of the context subgraph obtained in the step 3.2 and the step 3.31The calculation formula is shown as formula (1):
Figure BDA0002605307960000051
wherein L is1Is the loss when the central subgraph and the context subgraph are from the same local subgraph G respectively;
Figure BDA0002605307960000061
and cvRespectively representing the characteristics of a central subgraph and a context subgraph from the same local subgraph G, wherein v represents a central node of the local subgraph G, and K represents the current K-th layer of the graph neural network;
step 3.5: calculating the loss L based on the feature representation of the central subgraph and the feature representation of the context subgraph obtained in the step 3.2 and the step 3.32The calculation formula is shown in formula (2):
Figure BDA0002605307960000062
wherein L is2Is the loss when the central subgraph and the context subgraph are from different local subgraphs G and G', respectively;
Figure BDA0002605307960000063
the method comprises the following steps that a feature representation of a central subgraph of a local subgraph G is carried out, v represents a central node of the local subgraph G, and K represents the current position in a Kth graph neural network layer;
Figure BDA0002605307960000064
is a feature representation of a context sub-graph of the local sub-graph G ', v ' represents a central node of the local sub-graph G ';
step 3.6: the loss values L obtained in step 3.4 and step 3.51And L2Substituting the formula (3), calling a self-supervision learning module, calculating loss L, and updating parameters of the two feature extraction modules in the steps 3.2 to 3.3 by using a random gradient descent method;
L=L1+αL2(3)
wherein L is a combination of L1And L2The overall loss of; alpha is a manually set hyper-parameter, and the value range is between 0 and 1;
step 3.7: jumping back to the step 3.1 to continue training until L is basically unchanged, jumping out of the loop, and jumping to the step four;
so far, from step 3.1 to step 3.7, the construction of the pre-training model is completed;
step four: the front pre-training model part is transferred into a rear pre-training model, and the rear pre-training model is constructed according to an input data set;
the post-pre-training model comprises a feature extraction module, a linear layer module and a softmax layer module; the feature extraction module comprises a GCN2 coding unit, a central node extraction unit and a pooling unit;
the connection relation of each module in the post-pre-training model is as follows:
the characteristic extraction module is connected with the linear layer module; the linear layer module is connected with the softmax layer module;
the post pre-training model learns and predicts the known events in a supervision mode, and the functions of all modules in the post pre-training model are as follows:
the feature extraction module is used for carrying out batch processing coding representation on all local subgraphs in the input data set and extracting graph feature representation and central node representation of each local subgraph; the function of the linear layer is to further encode the resulting graph feature representation and the representation of the central node; the softmax layer has the function of carrying out normalization calculation on the characteristics output by the linear layer to obtain the probability that the events to be predicted belong to different types;
wherein, the characteristic representation of the graph is the average of the characteristic representations of all the nodes in the local subgraph; the representation of the central node is the feature representation of the central node of the local subgraph.
The pre-training model after construction comprises the following sub-steps:
step 4.1: extracting parameters of a GCN3 coding unit in the front pre-training model, and initializing a GCN2 coding unit in the rear pre-training model by using the parameters to realize partial migration from the front pre-training model to the rear pre-training model;
step 4.2: the characteristic extraction module carries out batch coding on all local heterogeneous graphs in the input data and extracts characteristic representation of a central node of each local heterogeneous graph and graph characteristic representation of a local subgraph;
step 4.3: the linear layer module encodes the vector after splicing the feature representation of the central node and the graph feature representation of the local subgraph to obtain a new feature representation;
step 4.4: the softmax layer normalizes the characteristic representation output by the linear layer, calculates the probability, and outputs the category with the maximum probability as the predicted event type;
step 4.5: calculating a predicted loss based on the predicted event type obtained in step 4.4 and the labels of the known events in the input dataset, and updating the parameters in steps 4.2 to 4.4 based on the predicted loss;
step 4.6: jumping back to the step 4.2 to continue training until the loss predicted in the step 4.5 is basically kept unchanged, and jumping out to the step five;
thus, the pre-training task is completed through the third step and the fourth step;
step five: integrally transferring the post-pre-training model into a fine-tuning model, and then constructing the fine-tuning model according to the input data set;
the fine tuning model comprises a feature extraction module, a linear layer module and a softmax layer module; the feature extraction module comprises a GCN1 coding unit, a central node extraction unit and a pooling unit;
the connection relation of each module in the fine tuning model is as follows:
the characteristic extraction module is connected with the linear layer module; the linear layer module is connected with the softmax layer module;
the fine tuning model learns and predicts the latest event in a supervision mode, and the functions of each module in the fine tuning model are as follows:
the feature extraction module is used for carrying out batch processing coding representation on all local subgraphs in the input data set and extracting the graph feature representation of each local subgraph and the feature representation of a central node; the function of the linear layer is to further encode the graph feature representation of the local subgraph and the representation of the central node; the softmax layer has the function of carrying out normalization calculation on the characteristics output by the linear layer to obtain the probability that the events with the prediction belong to different types;
wherein, the characteristic representation of the graph is the average of the characteristic representations of all the nodes in the local subgraph; the representation of the central node is the characteristic representation of the central node of the local subgraph;
the method for constructing the fine tuning model specifically comprises the following substeps:
step 5.1: extracting parameters of all modules in the post-pre-training model, and initializing the parameters of all modules in the fine-tuning model by using the parameters to realize the whole transfer learning from the post-pre-training model to the fine-tuning model;
step 5.2: the feature extraction module carries out batch coding on all local heterogeneous graphs in the input data and extracts the representation of the central node of each local heterogeneous graph and the graph feature representation of a local subgraph;
step 5.3: the linear layer module encodes the vector after splicing the representation of the central node and the graph feature representation of the local subgraph to obtain a new feature representation;
step 5.4: the softmax layer normalizes the characteristic representation output by the linear layer, calculates the probability, and outputs the category with the maximum probability as the predicted event type;
step 5.5: calculating a predicted loss based on the predicted event type obtained in step 5.4 and the label of the latest event in the input dataset, and updating the parameters in steps 5.2 to 5.4 based on the predicted loss;
step 5.6: and jumping back to the step 5.2 to continue training until the loss predicted in the step 5.5 is basically kept unchanged, and ending the method.
Advantageous effects
Compared with the existing urban event classification method, the graph network structure method for urban heterogeneous node analysis has the following beneficial effects:
1. in the process of urban event classification, the classification method creates the urban heterogeneous graph to realize the communication among the data sources of different types, further realizes the effect of carrying out comprehensive event classification by using the data sources of different types, and finally improves the accuracy of urban event classification;
2. the method introduces the pre-training technology in the natural language processing field into the smart city field, solves the problem of insufficient labeled data caused by dynamic change of events, and realizes the prediction of the latest event type;
3. in a front pre-training model of the method, structural information between nodes is excavated in a self-supervision learning mode, then the front pre-training model is partially transferred to a rear pre-training model, a prediction model of a known event is obtained through the supervision learning mode, finally the rear pre-training model is integrally transferred to a fine-tuning model, and the prediction model of the latest information is obtained through the supervision learning mode, so that the defect that the pre-training model lacks a model for modeling the structural information is overcome, and the purpose of blending the structural information in the model pre-training process is further achieved, and the accuracy of event prediction is further improved.
Drawings
Fig. 1 is a schematic flow chart of a graph network structure method and an embodiment of the urban heterogeneous node analysis according to the present invention;
FIG. 2 is a schematic diagram of a city heteromorphic graph according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a process for preprocessing an urban heterogeneous graph to obtain a local heterogeneous subgraph according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a pre-training model according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a post-pre-training model according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a fine-tuning model according to an embodiment of the present invention.
Detailed Description
The following describes a graph network structure method for urban heterogeneous node analysis in detail by referring to the accompanying drawings and embodiments.
Example 1
In this example, the location where the urban event was collected was located as the taiyuan city, with a time range defined between 5 months in 2019 and 8 months in 2019. The urban event refers to related problems such as park environment problems, government department work efficiency problems and the like which are fed back by citizens through a civic service hotline, a government website, mobile communication equipment and the like.
Fig. 1 is a flowchart of a graph network structure method for urban heterogeneous node analysis in the embodiment of the present invention, which specifically includes the following steps:
step A: acquiring data and label information required by building a Taiyuan city heterogeneous graph, and building the city heterogeneous graph, wherein the method specifically comprises the following substeps;
step A.1: collecting the identity id of the taiyuan citizen who complains the urban problem and the account number of the microblog or various map software in the period from 5 months in 2019 to 8 months in 2019 based on a city leader service hotline, a government website, mobile communication equipment and the like, and recording the type of the citizen complaint event;
step A.2: acquiring track data of the citizen based on account information of the microblog or various map software of the taiyuan citizen obtained in the step A.1 and LBS (location based service) carried by the software;
wherein, LBS is mobile location service, and the action track of citizen in the track data is represented by a location sequence composed of longitude and latitude;
step A.3: GPS positioning service based on software such as a Baidu map or Tencent map collects position information of active facilities such as hospitals, parks, government departments, companies, city monitoring cameras and the like in the Taiyuan city area. The selection mode of the urban camera includes but is not limited to judging whether the traffic jam condition of one week in the monitoring range exceeds 10 times, if so, selecting, otherwise, not selecting;
wherein, the position information of the active facilities is mainly represented by the longitude and the latitude of the active facilities;
step A.4: citizens in the collected trace data of step a.2 and active facilities in step a.3 are abstracted as user nodes and location nodes, respectively. Judging based on the acquired track data, and if the number of the incoming and outgoing records between the user node and the position node exceeds 30, constructing an edge between the two nodes; if more than 50 users pass through two position nodes at the same time, establishing an edge between the two position nodes;
step A.5: establishing a corresponding relation between the nodes and label data, for example, the label of the user node is the event type of complaints of the user node, and the label of the hospital node is whether the price of the medicine is a parent or not; fig. 2 is a schematic diagram of a city heteromorphic graph. As shown, this city heterogeneous graph includes: nodes abstracted from different types of data such as people, companies, hospitals and the like, wherein the people represent user nodes; companies, hospitals, etc. represent location nodes; the edges between user nodes and location nodes may have different meanings depending on the type of node, e.g., an edge between a person and a hospital means that the person looks at the hospital, and an edge between a person and a company means that the person is working at the company. Similarly, the position node and the edge between the position nodes can be obtained;
and B: and preprocessing the city heterogeneous graph to obtain a set of input data. The method specifically comprises the following substeps:
step B.1: in the city abnormal graph, taking a user node as a center and R as a radius to extract a local subgraph;
wherein, R is a value set artificially and used for determining the size of a local subgraph;
fig. 3 is a schematic diagram of a process of extracting a local subgraph in a city heteromorphic graph. As shown in the figure, a local subgraph is extracted by taking the human node at the lower right corner as the center and taking R-2 as the radius;
step B.2: extracting the labels of all nodes in the local subgraph to form a node label set corresponding to the local subgraph, and classifying the labels in the node label set into two types of labels;
the node label set comprises labels of known events and labels of latest events;
setting a threshold value N, if the number of labels of a certain event in the local subgraph is more than or equal to N, classifying the labels into two types of labels, and if not, classifying the labels into the labels of the latest event;
step B.3: combining the local subgraph extracted in the step B.1 and the node label set formed in the step 2.2 into a data pair;
step B.4: repeating the steps B.1 to B.3 for K-1 times to obtain input data pairs containing K;
wherein the value range of K is more than or equal to 1000;
thus, through the steps A and B, an input data set for pre-training and fine-tuning is obtained;
and C: constructing a pre-training model according to the obtained input data set;
the function of the pre-training model is as follows: mining structural information between nodes in an automatic supervision mode;
FIG. 4 is a schematic diagram of a structure of a pre-training model, and the structure and the processing flow of the pre-training model are described below with reference to FIG. 4;
the constructed pre-training model comprises a graph segmentation module, a central sub-graph feature extraction module, a context sub-graph feature extraction module and a self-supervision learning module;
the central subgraph feature extraction module comprises a GCN3 coding unit and a central node extraction unit; the context subgraph feature extraction module comprises a GCN4 coding unit and a pooling unit; GCN3 and GCN4 are two map convolutional neural network models;
the connection relation of each module in the pre-training model is as follows:
the output of the graph segmentation module is respectively connected with the input of the central sub-graph feature extraction module and the input of the context sub-graph feature extraction module, and the output of the central sub-graph feature extraction module and the output of the context sub-graph feature extraction module are both connected with the input of the self-supervision learning module;
the functions of each module in the pre-training model are as follows:
the graph segmentation module has the function of carrying out batch processing on all local subgraphs in the input data set and segmenting each graph into a central subgraph and a context subgraph; the function of the self-supervision learning module is to encode the structural information by optimizing a loss function; the central subgraph feature extraction module has the functions of carrying out coding representation on all the central subgraphs after batch processing and extracting the feature representation of each central subgraph; the context subgraph feature extraction module has the function of coding all the context subgraphs after batch processing and extracting the feature representation of each context subgraph;
the central subgraph is a part which takes the user node as the center and has the radius less than or equal to r in the local subgraph; the context subgraph is a part which takes the user node as the center and has a radius larger than or equal to r in the local subgraph; the feature representation of the central subgraph is the feature representation of the user node; the feature representation of the context subgraph is the average of the feature representations of all nodes with the distance r from the user node; r is a radius value set artificially to determine the size of the central and context subgraphs and 0< R.
The pre-training model before construction specifically comprises the following sub-steps:
step C.1: calling a graph segmentation module to perform batch processing on the local subgraphs and outputting the batch processed central subgraphs and context subgraphs;
step C.2: c.1, calling a central subgraph feature extraction module, and extracting feature representations of all central subgraphs in each batch processing process based on the batch processing central subgraphs obtained in the step C.1;
wherein calling the GCN3 cell encodes the central subgraph; calling a central node extraction unit to obtain the feature representation of the central subgraph;
step C.3: c.1, calling a context subgraph feature extraction module, and extracting feature representations of all context subgraphs in each batch processing process based on the batch processing context subgraphs obtained in the step C.1;
wherein calling the GCN4 cell encodes the central subgraph; calling a pooling unit to obtain a feature representation of the context sub-graph;
step C.4: calculating the loss L based on the feature representation of the central subgraph and the feature representation of the context subgraph obtained in the step C.2 and the step C.31The calculation formula is shown in formula (4):
Figure BDA0002605307960000151
wherein L is1Is the loss when the central subgraph and the context subgraph are from the same local subgraph G respectively;
Figure BDA0002605307960000152
and cvRespectively representing the characteristics of a central subgraph and a context subgraph from the same local subgraph G, wherein v represents a central node of the local subgraph G, and K represents the current K-th layer of the graph neural network;
step C.5: calculating the loss L based on the feature representation of the central subgraph and the feature representation of the context subgraph obtained in the step C.2 and the step C.32The calculation formula is shown in formula (5):
Figure BDA0002605307960000161
wherein L is2Is the loss when the central subgraph and the context subgraph are from different local subgraphs G and G', respectively;
Figure BDA0002605307960000162
the method comprises the following steps that a feature representation of a central subgraph of a local subgraph G is carried out, v represents a central node of the local subgraph G, and K represents the current position in a Kth graph neural network layer;
Figure BDA0002605307960000163
is a feature representation of a context sub-graph of the local sub-graph G ', v ' represents a central node of the local sub-graph G ';
step C.6: the loss values L obtained in step C.4 and step C.51And L2Substituting the formula (6), calling a self-supervision learning module, calculating loss L, and updating parameters of the feature extraction modules in the steps C.2 to C.3 by using a random gradient descent method;
L=L1+αL2(6)
wherein L is a combination of L1And L2The overall loss of; alpha is a manually set hyper-parameter, and the value range is between 0 and 1;
step C.7: and C.1, jumping back to the step C.1, continuing training until L is basically unchanged, jumping out of a loop, and jumping to the step D.
So far, through the step C, the pre-trained model has the capability of mining the structural information between the nodes, and the problem that the accuracy of event prediction is poor due to the fact that the traditional pre-training method cannot capture the structural information is solved.
Step D: the front pre-training model part is transferred into a rear pre-training model, and the rear pre-training model is constructed according to an input data set;
FIG. 5 is a schematic diagram of a post-pre-training model, and the post-pre-training model and the processing flow are described below with reference to FIG. 5;
as shown in fig. 5, the post-pre-training model includes a feature extraction module, a linear layer module, and a softmax layer module; the feature extraction module comprises a GCN2 coding unit, a central node extraction unit and a pooling unit;
the connection relation of each module in the post-pre-training model is as follows:
the characteristic extraction module is connected with the linear layer module; the linear layer module is connected with the softmax layer module;
the post pre-training model learns and predicts the known events in a supervision mode, and the functions of all modules in the post pre-training model are as follows:
the feature extraction module is used for carrying out batch processing coding representation on all local subgraphs in the input data set and extracting graph feature representation and central node representation of each local subgraph; the function of the linear layer is to further encode the resulting graph feature representation and the representation of the central node; the softmax layer has the function of carrying out normalization calculation on the characteristics output by the linear layer to obtain the probability that the events to be predicted belong to different types;
the graph feature representation is the average of feature representations of all nodes in the local subgraph; the representation of the central node is the feature representation of the central node of the local subgraph.
The pre-training model after construction comprises the following sub-steps:
step D.1: extracting parameters of a GCN3 coding unit in the front pre-training model, and initializing a GCN2 coding unit in the rear pre-training model by using the parameters to realize partial migration from the front pre-training model to the rear pre-training model;
step D.2: the feature extraction module carries out batch coding on all local heterogeneous graphs in the input data and extracts the representation of the central node of each local heterogeneous graph and the graph feature representation of a local subgraph;
step D.3: the linear layer module encodes the vector after splicing the representation of the central node and the graph feature representation of the local subgraph to obtain a new feature representation;
step D.4: the softmax layer normalizes the characteristic representation output by the linear layer, calculates the probability, and outputs the category with the maximum probability as the type of the predicted event;
step D.5: calculating a prediction loss based on the predicted event type obtained in step D.4 and the labels of the known events in the input dataset; and updating the parameters in steps d.2 to d.4 based on the predicted loss;
step D.6: and (4) jumping back to the step D.2 to continue training until the loss predicted in the step D.5 is basically kept unchanged, and jumping out to the step five.
Thus, through the step C and the step D, the pre-training task is completed;
step E: firstly, integrally transferring a post-pre-training model into a fine-tuning model, and then constructing the fine-tuning model according to an input data set;
FIG. 6 is a schematic diagram of a fine-tuning model, and the fine-tuning model and the process flow are described below with reference to FIG. 6;
as shown in fig. 6, the fine tuning model includes a feature extraction module, a linear layer module, and a softmax layer module; the feature extraction module comprises a GCN1 coding unit, a central node extraction unit and a pooling unit;
the connection relation of each module in the fine tuning model is as follows:
the characteristic extraction module is connected with the linear layer module; the linear layer module is connected with the softmax layer module;
the fine tuning model learns and predicts the latest event in a supervision mode, and the functions of each module in the fine tuning model are as follows:
the feature extraction module is used for carrying out batch processing coding representation on all local subgraphs in the input data set and extracting the graph feature representation of each local subgraph and the feature representation of a central node; the function of the linear layer is to further encode the graph feature representation of the local subgraph and the feature representation of the central node; the softmax layer has the function of carrying out normalization calculation on the characteristics output by the linear layer to obtain the probability that the events with the prediction belong to different types;
wherein, the characteristic representation of the graph is the average of the characteristic representations of all the nodes in the local subgraph; the representation of the central node is the characteristic representation of the central node of the local subgraph;
the method for constructing the fine tuning model specifically comprises the following substeps:
step E.1: extracting parameters of all modules in the post-pre-training model, and initializing the parameters of all modules in the fine-tuning model by using the parameters to realize the whole transfer learning from the post-pre-training model to the fine-tuning model;
step E.2: the characteristic extraction module carries out batch processing coding on all local heterogeneous graphs in the input data and extracts the representation of the central node of each local heterogeneous graph and the characteristic representation of the graph;
step E.3: the linear layer module encodes the vector after splicing the representation of the central node and the feature representation of the graph to obtain a new feature representation;
step E.4: the softmax layer normalizes the characteristic representation output by the linear layer, calculates the probability, and outputs the category with the maximum probability as the type of the predicted event;
step E.5: calculating a predicted loss based on the predicted event type obtained in step E.4 and the label of the true latest event type in the input data; and updating the parameters in step e.2 to step e.5 based on the predicted loss;
step E.6: and E.2, jumping back to the step E.2 to continue training until the loss predicted in the step E.5 is basically kept unchanged, and ending the method.
So far, through steps a to E, the graph network structure method for urban heterogeneous node analysis provided by the application is completed. Experiments prove that the method can effectively improve the accuracy of the latest event prediction.
In summary, the above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A graph network structure method for classifying urban heterogeneous nodes is characterized in that: the method comprises the following steps:
the method comprises the following steps: acquiring data and label information required for constructing a city heterogeneous graph and constructing the city heterogeneous graph;
the first step specifically comprises the following substeps:
step 1.1: collecting relevant data of citizens of the complaint event and a geographical position coordinate sequence of all active facilities in the region range of the citizens;
the relevant data of citizens comprise complaint event types, microblogs or account numbers of various map software;
step 1.2: acquiring trajectory data of citizens based on the microblogs or LBS of various map software in the step 1.1;
step 1.3: collecting label information of corresponding facilities according to the geographic position coordinates of all active facilities in the step 1.1;
step 1.4: abstracting citizens in the track data in the step 1.2 and active facilities in the step 1.3 into user nodes and position nodes respectively, and constructing a city abnormal map based on the track data;
step two: preprocessing the city heterogeneous graph to obtain a set of input data, and specifically comprises the following substeps:
step 2.1: in the city abnormal graph, taking a user node as a center and R as a radius to extract a local subgraph;
step 2.2: extracting the labels of all nodes in the local subgraph to form a node label set corresponding to the local subgraph, and classifying the labels in the node label set into two types of labels;
the node label set comprises labels of known events and labels of latest events;
step 2.3: combining the local subgraph extracted in the step 2.1 and the node label set formed in the step 2.2 into a data pair;
step 2.4: repeating the steps 2.1 to 2.3 for K-1 times to obtain an input data set containing K data pairs;
thus, through the first step and the second step, an input data set is obtained for subsequent pre-training and fine adjustment;
step three: constructing a pre-training model according to the obtained input data set;
the function of the pre-training model is as follows: mining structural information between nodes in an automatic supervision mode;
the constructed pre-training model comprises a graph segmentation module, a central sub-graph feature extraction module, a context sub-graph feature extraction module and a self-supervision learning module;
the central subgraph feature extraction module comprises a GCN3 coding unit and a central node extraction unit; the context subgraph feature extraction module comprises a GCN4 coding unit and a pooling unit; both GCN3 and GCN4 are atlas neural network models;
the connection relation of each module in the pre-training model is as follows:
the output of the graph segmentation module is respectively connected with the input of the central sub-graph feature extraction module and the input of the context sub-graph feature extraction module, and the output of the central sub-graph feature extraction module and the output of the context sub-graph feature extraction module are both connected with the input of the self-supervision learning module;
the functions of each module in the pre-training model are as follows:
the graph segmentation module has the function of carrying out batch processing on all local subgraphs in the input data set and segmenting each graph into a central subgraph and a context subgraph; the function of the self-supervision learning module is to encode the structural information by optimizing a loss function; the central subgraph feature extraction module has the functions of carrying out coding representation on all the central subgraphs after batch processing and extracting the feature representation of each central subgraph; the context subgraph feature extraction module has the function of coding all the context subgraphs after batch processing and extracting the feature representation of each context subgraph;
the central subgraph is a part which takes the user node as the center and has the radius less than or equal to r in the local subgraph; the context subgraph is a part which takes the user node as the center and has a radius larger than or equal to r in the local subgraph; the feature representation of the central subgraph is the feature representation of the user node; the feature representation of the context subgraph is the average of the feature representations of all nodes with the distance r from the user node; r is a radius value set artificially for determining the size of the central sub-graph and the context sub-graph and 0< R;
the pre-training model before construction specifically comprises the following sub-steps:
step 3.1: calling a graph segmentation module to perform batch processing on the local subgraphs and outputting the batch processed central subgraphs and context subgraphs;
step 3.2: calling a central subgraph feature extraction module, and extracting feature representations of all central subgraphs in each batch processing process based on the batch processing central subgraphs obtained in the step 3.1;
wherein calling the GCN3 cell encodes the central subgraph; calling a central node extraction unit to obtain the feature representation of the central subgraph;
step 3.3: calling a context subgraph feature extraction module, and extracting feature representations of all context subgraphs in each batch processing process based on the batch processing context subgraphs obtained in the step 3.1;
wherein the GCN4 unit is called to encode a context subgraph; calling a pooling unit to obtain a feature representation of the context sub-graph;
step 3.4: calculating the loss L based on the feature representation of the central subgraph and the feature representation of the context subgraph obtained in the step 3.2 and the step 3.31The calculation formula is shown as formula (1):
Figure FDA0002605307950000031
wherein L is1Is the loss when the central subgraph and the context subgraph are from the same local subgraph G respectively;
Figure FDA0002605307950000032
and cvRespectively representing the characteristics of a central subgraph and a context subgraph from the same local subgraph G, wherein v represents a central node of the local subgraph G, and K represents the current K-th layer of the graph neural network;
step 3.5: calculating the loss L based on the feature representation of the central subgraph and the feature representation of the context subgraph obtained in the step 3.2 and the step 3.32The calculation formula is shown in formula (2):
Figure FDA0002605307950000033
wherein L is2Is the loss when the central subgraph and the context subgraph are from different local subgraphs G and G', respectively;
Figure FDA0002605307950000034
the method comprises the following steps that a feature representation of a central subgraph of a local subgraph G is carried out, v represents a central node of the local subgraph G, and K represents the current position in a Kth graph neural network layer;
Figure FDA0002605307950000035
office of ChinaThe characteristic of the context subgraph of the partial subgraph G ' is represented, and v ' represents the central node of the partial subgraph G ';
step 3.6: the loss values L obtained in step 3.4 and step 3.51And L2Substituting the formula (3), calling a self-supervision learning module, calculating loss L, and updating parameters of the two feature extraction modules in the steps 3.2 to 3.3 by using a random gradient descent method;
L=L1+αL2(3)
wherein L is a combination of L1And L2The overall loss of; alpha is a manually set hyper-parameter, and the value range is between 0 and 1;
step 3.7: jumping back to the step 3.1 to continue training until L is basically unchanged, jumping out of the loop, and jumping to the step four;
so far, from step 3.1 to step 3.7, the construction of the pre-training model is completed;
step four: the front pre-training model part is transferred into a rear pre-training model, and the rear pre-training model is constructed according to an input data set;
the post-pre-training model comprises a feature extraction module, a linear layer module and a softmax layer module; the feature extraction module comprises a GCN2 coding unit, a central node extraction unit and a pooling unit;
the connection relation of each module in the post-pre-training model is as follows:
the characteristic extraction module is connected with the linear layer module; the linear layer module is connected with the softmax layer module;
the post pre-training model learns and predicts the known events in a supervision mode, and the functions of all modules in the post pre-training model are as follows:
wherein, the characteristic representation of the graph is the average of the characteristic representations of all the nodes in the local subgraph; the representation of the central node is the characteristic representation of the central node of the local subgraph;
the pre-training model after construction comprises the following sub-steps:
step 4.1: extracting parameters of a GCN3 coding unit in the front pre-training model, and initializing a GCN2 coding unit in the rear pre-training model by using the parameters to realize partial migration from the front pre-training model to the rear pre-training model;
step 4.2: the characteristic extraction module carries out batch coding on all local heterogeneous graphs in the input data and extracts characteristic representation of a central node of each local heterogeneous graph and graph characteristic representation of a local subgraph;
step 4.3: the linear layer module encodes the vector after splicing the feature representation of the central node and the graph feature representation of the local subgraph to obtain a new feature representation;
step 4.4: the softmax layer normalizes the characteristic representation output by the linear layer, calculates the probability, and outputs the category with the maximum probability as the predicted event type;
step 4.5: calculating a predicted loss based on the predicted event type obtained in step 4.4 and the labels of the known events in the input dataset, and updating the parameters in steps 4.2 to 4.4 based on the predicted loss;
step 4.6: jumping back to the step 4.2 to continue training until the loss predicted in the step 4.5 is basically kept unchanged, and jumping out to the step five;
thus, the pre-training task is completed through the third step and the fourth step;
step five: integrally transferring the post-pre-training model into a fine-tuning model, and then constructing the fine-tuning model according to the input data set;
the fine tuning model comprises a feature extraction module, a linear layer module and a softmax layer module; the feature extraction module comprises a GCN1 coding unit, a central node extraction unit and a pooling unit;
the connection relation of each module in the fine tuning model is as follows:
the characteristic extraction module is connected with the linear layer module; the linear layer module is connected with the softmax layer module;
the fine tuning model learns and predicts the latest event in a supervision mode, and the functions of each module in the fine tuning model are as follows:
the feature extraction module is used for carrying out batch processing coding representation on all local subgraphs in the input data set and extracting the graph feature representation of each local subgraph and the feature representation of a central node; the function of the linear layer is to further encode the graph feature representation of the local subgraph and the representation of the central node; the softmax layer has the function of carrying out normalization calculation on the characteristics output by the linear layer to obtain the probability that the events with the prediction belong to different types;
wherein, the characteristic representation of the graph is the average of the characteristic representations of all the nodes in the local subgraph; the representation of the central node is the characteristic representation of the central node of the local subgraph;
the method for constructing the fine tuning model specifically comprises the following substeps:
step 5.1: extracting parameters of all modules in the post-pre-training model, and initializing the parameters of all modules in the fine-tuning model by using the parameters to realize the whole transfer learning from the post-pre-training model to the fine-tuning model;
step 5.2: the feature extraction module carries out batch coding on all local heterogeneous graphs in the input data and extracts the representation of the central node of each local heterogeneous graph and the graph feature representation of a local subgraph;
step 5.3: the linear layer module encodes the vector after splicing the representation of the central node and the graph feature representation of the local subgraph to obtain a new feature representation;
step 5.4: the softmax layer normalizes the characteristic representation output by the linear layer, calculates the probability, and outputs the category with the maximum probability as the predicted event type;
step 5.5: calculating a predicted loss based on the predicted event type obtained in step 5.4 and the label of the latest event in the input dataset, and updating the parameters in steps 5.2 to 5.4 based on the predicted loss;
step 5.6: and jumping back to the step 5.2 to continue training until the loss predicted in the step 5.5 is basically kept unchanged, and ending the method.
2. The method of claim 1, wherein the method comprises the steps of: in step 1.1, the types of active facilities include, but are not limited to, hospitals, parks, companies, and city surveillance cameras.
3. The method of claim 1, wherein the method comprises the steps of: in step 1.2, LBS is mobile location service, and the action track of citizen in the track data is represented by a location sequence composed of longitude and latitude.
4. The method of claim 1, wherein the method comprises the steps of: the label of the corresponding facility in the step 1.3 specifically comprises the following steps: the label information of the hospital includes but is not limited to whether the price is for the citizen; the park label information includes but is not limited to whether the indescription phenomenon is serious or not and whether the infrastructure is perfect or not; company's label information includes, but is not limited to, whether or not there is a delinquent payroll phenomenon; the label information of the city camera includes but is not limited to whether the traffic is congested or not and whether the theft problem is prominent or not.
5. The method of claim 1, wherein the method comprises the steps of: in step 1.3, corresponding facilities include, but are not limited to, hospitals, parks, companies, and city cameras.
6. The method of claim 1, wherein the method comprises the steps of: in step 1.4, the specific construction process of the city heterogeneous map is as follows: and constructing edges between the user node and the position node and between the position node and the position node based on the track data, and respectively corresponding the event type and the label data of the active facilities to the specific nodes.
7. The method of claim 1, wherein the method comprises the steps of: in step 2.1, R is an artificially set value for determining the size of the local subgraph.
8. The method of claim 1, wherein the method comprises the steps of: in step 2.2, the classification decision is two types of labels, specifically, a threshold value N is set, if the number of labels of a certain event in the local subgraph is greater than or equal to N, the label is classified as the label of the known event, otherwise, the label is classified as the label of the latest event.
9. The method of claim 1, wherein the method comprises the steps of: in step 2.4, the value range of K is more than or equal to 1000.
10. The method of claim 1, wherein the method comprises the steps of: the feature extraction module in the fourth step has the function of carrying out batch processing coding representation on all local subgraphs in the input data set, and extracting graph feature representation and central node representation of each local subgraph; the function of the linear layer is to further encode the resulting graph feature representation and the representation of the central node; the softmax layer has the function of carrying out normalization calculation on the characteristics output by the linear layer to obtain the probability that the events to be predicted belong to different types.
CN202010736888.0A 2020-07-28 2020-07-28 Graph network structure method for classifying urban heterogeneous nodes Pending CN111881303A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010736888.0A CN111881303A (en) 2020-07-28 2020-07-28 Graph network structure method for classifying urban heterogeneous nodes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010736888.0A CN111881303A (en) 2020-07-28 2020-07-28 Graph network structure method for classifying urban heterogeneous nodes

Publications (1)

Publication Number Publication Date
CN111881303A true CN111881303A (en) 2020-11-03

Family

ID=73200774

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010736888.0A Pending CN111881303A (en) 2020-07-28 2020-07-28 Graph network structure method for classifying urban heterogeneous nodes

Country Status (1)

Country Link
CN (1) CN111881303A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112418792A (en) * 2020-11-19 2021-02-26 魏垠 City refined information processing method, device and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107818337A (en) * 2017-10-09 2018-03-20 中国电子科技集团公司第二十八研究所 Accident classification method and device based on depth convolutional neural networks
CN109325116A (en) * 2018-08-23 2019-02-12 武大吉奥信息技术有限公司 A kind of Urban Event based on deep learning is classified distributing method and device automatically
CN109635280A (en) * 2018-11-22 2019-04-16 园宝科技(武汉)有限公司 A kind of event extraction method based on mark
CN109697395A (en) * 2017-10-24 2019-04-30 华为技术有限公司 Thingness prediction technique, device and equipment
CN110930008A (en) * 2019-11-15 2020-03-27 中国矿业大学 Mine disaster event detection method based on convolutional neural network

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107818337A (en) * 2017-10-09 2018-03-20 中国电子科技集团公司第二十八研究所 Accident classification method and device based on depth convolutional neural networks
CN109697395A (en) * 2017-10-24 2019-04-30 华为技术有限公司 Thingness prediction technique, device and equipment
CN109325116A (en) * 2018-08-23 2019-02-12 武大吉奥信息技术有限公司 A kind of Urban Event based on deep learning is classified distributing method and device automatically
CN109635280A (en) * 2018-11-22 2019-04-16 园宝科技(武汉)有限公司 A kind of event extraction method based on mark
CN110930008A (en) * 2019-11-15 2020-03-27 中国矿业大学 Mine disaster event detection method based on convolutional neural network

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112418792A (en) * 2020-11-19 2021-02-26 魏垠 City refined information processing method, device and system
CN112418792B (en) * 2020-11-19 2022-12-20 魏垠 City refinement information processing method, device and system

Similar Documents

Publication Publication Date Title
CN111444848A (en) Specific scene model upgrading method and system based on federal learning
CN106355289B (en) Scenic spot passenger flow volume prediction method based on position service
CN103116825B (en) Intelligent city management
US11803173B2 (en) Preset management methods of gas pipeline network for smart gas and internet of things systems thereof
CN106021508A (en) Sudden event emergency information mining method based on social media
CN109872535A (en) A kind of current prediction technique of wisdom traffic, device and server
CN109117745B (en) Cloud face recognition and positioning method based on building information model
Yabe et al. A framework for evacuation hotspot detection after large scale disasters using location data from smartphones: case study of kumamoto earthquake
CN110442715A (en) A kind of conurbation geographical semantics method for digging based on polynary big data
CN111080501B (en) Real crowd density space-time distribution estimation method based on mobile phone signaling data
CN111813835A (en) Public activity center identification system based on mobile phone signaling and POI data
CN115775085A (en) Smart city management method and system based on digital twin
CN113283824A (en) Comprehensive management method and system for intelligent park data
CN111966746A (en) Meteorological disaster prevention and reduction flow monitoring system and monitoring method thereof
CN112766119A (en) Method for accurately identifying strangers and constructing community security based on multi-dimensional face analysis
CN111914780A (en) Wisdom street management platform
CN113673839B (en) Intelligent base event gridding automatic dispatch method and base event processing system
CN111881303A (en) Graph network structure method for classifying urban heterogeneous nodes
CN113256978A (en) Method and system for diagnosing urban congestion area and storage medium
CN114662774A (en) City block vitality prediction method, storage medium and terminal
CN111310340A (en) Urban area interaction abnormal relation identification method and equipment based on human movement
CN106056515A (en) Community grid event cluster feature extraction method
CN113516850B (en) Pipeline traffic flow data acquisition method based on space syntactic analysis
Cerqueira et al. Integrative analysis of traffic and situational context data to support urban mobility planning
Sun et al. Automatic building age prediction from street view images

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
AD01 Patent right deemed abandoned
AD01 Patent right deemed abandoned

Effective date of abandoning: 20231110