Emergency recognition model training method, recognition method and device

The method addresses graph data heterogeneity and structure noise in emergency event recognition by using federated graph structure learning to align local and global graph structures, improving recognition accuracy and robustness.

CN119249258AActive Publication Date: 2025-01-03BEIJING UNIV OF POSTS & TELECOMM

Patent Information

Application Number
CN202411079785.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-07
Publication Date
2025-01-03
Estimated Expiration
2044-08-07

AI Technical Summary

Technical Problem

Existing graph neural network models for emergency event recognition in social platforms face challenges due to graph data heterogeneity and structure noise, leading to poor generalization and deviation in recognition performance.

Method used

A method for training an emergency event recognition model using federated graph structure learning, involving local classifier training, global aggregation, and optimization through knowledge distillation and contrastive learning to minimize representation differences and structural noise.

Benefits of technology

Improves the robustness and accuracy of emergency event recognition by aligning local and global graph structures, enhancing representation learning and reducing model deviation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119249258A_ABST
    Figure CN119249258A_ABST
Patent Text Reader

Abstract

The invention provides an emergency identification model training method, an emergency identification method and an emergency identification device. A global classifier is pre-trained based on a federated learning architecture, local structure information is extracted from a local graph of each client through a random block model and aggregated, a local view with the global information is reconstructed, and the global information is extracted through a knowledge distillation mode. A local view with global information is utilized to guide model optimization training under a local view angle, and the representation difference under two graph structures is minimized; a contrast learning method is utilized, graph data are disturbed and expanded, an enhanced view is constructed, representations of corresponding nodes in an original graph and the enhanced view are selected as positive samples, representations of different nodes are selected as negative samples, the representation distance between the positive samples and the negative samples is restrained, and the representation learning ability and robustness of the model are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to an emergency event recognition model training method, a recognition method and a device. Background Art

[0002] The effectiveness of deep learning models is highly correlated with the quality and quantity of data. Models can learn useful knowledge from high-quality, representative data centers. However, high-quality data is usually held by many companies, organizations, and devices. Due to factors such as privacy, regulations, and interests, these data cannot flow freely among all parties and are difficult to centralize to train models.

[0003] In recent years, graph neural networks (GNNs) have been widely used in social networks, traffic modeling, recommendation systems, and drug discovery due to their powerful modeling capabilities for complex graph structured data. Similar to machine learning tasks in other fields, training a graph neural network model with good performance requires not only sufficient training data, but also independent and identically distributed data. In reality, data owners are limited to their own fields and cannot observe the global distribution. They usually collect limited and biased graphs. In order to improve the generalization performance of the model, multi-party collaborative training is required. However, the data is stored in the local data owner, and due to data privacy issues, it is not possible to conduct centralized training by directly transferring data between clients. Federated learning (FL) aims to train machine learning models with data distributed in multiple local systems to solve the problem of information islands. Federated learning shows its advantages in improving the performance and generalization ability of collaboratively trained models without sharing any original data. For example, FL is designed in computer vision (CV) and natural language processing (NLP), allowing powerful and generalizable deep convolutional neural networks and language models to be jointly trained on separately stored image and text datasets.

[0004] In the prior art, the recognition of emergencies in social platforms is based on the semantic expression of graph data nodes generated in social platforms by graph neural networks and further classification and recognition. However, social platforms have the problem of heterogeneity of graph data. Existing graph federated learning algorithms have proposed a large number of solutions to the problem of heterogeneity of graph data, mainly including improving the adaptive ability of local models or learning a powerful global federated model based on model interpolation, adding regularization constraints to local losses, meta-learning and other methods. However, most of these federated graph learning methods only consider the deviation of node features, and lack in-depth research on the graph structure differences unique to graph data. Existing graph neural networks usually rely on the assumption that the original graph structure is of high quality. However, the graph structure in the implementation data inevitably has noise, and it will have a negative impact on downstream tasks. Therefore, a new solution is continued to solve the impact of graph data heterogeneity and graph structure noise in the recognition of emergencies on social platforms. Summary of the invention

[0005] In view of this, the embodiments of the present invention provide an emergency event recognition model training method, recognition method and device to eliminate or improve one or more defects existing in the prior art, and eliminate the influence of graph data heterogeneity and graph structure noise when the prior art recognizes emergencies.

[0006] One aspect of the present invention provides a method for training an emergency event recognition model based on federated graph structure learning, the method being executed based on a global server and multiple clients, and comprising the following steps:

[0007] Each client obtains local emergency text data by setting a social platform, wherein the keywords of the emergency text data include user information, text posted by the user, event type, topic identifier, like and forward relationship, time and place elements, and co-occurrence relationship between the keywords, and constructs an event heterogeneous graph according to the emergency text data. According to the meta-path in the event heterogeneous graph, the event heterogeneous graph is converted into a text-based homogeneous graph to obtain an isolated subgraph of each client;

[0008] Each client independently trains a local classifier based on a graph neural network using the local isolated subgraph, and the global server aggregates the local classifiers of each client, minimizes the aggregation risk, and optimizes the parameters to obtain a global classifier;

[0009] Extracting local graph structure information of the isolated subgraph of each client using a random block model and performing aggregation; reconstructing a local graph with global information on the client;

[0010] Based on the knowledge distillation method, the difference in the representation of the isolated subgraph and the reconstructed local graph corresponding to each client through the global classifier is minimized, and the debiasing parameters of the global classifier are optimized; and the reconstructed local graph is used as an enhanced view. Based on the contrastive learning method, the representation of the corresponding nodes in the isolated subgraph in each client and the enhanced view is used as positive samples, and the representation between non-corresponding nodes is used as negative samples. By constraining the distance between the positive and negative samples, the parameters of the global classifier are optimized to obtain the emergency recognition model.

[0011] In some embodiments, the homogeneous graph is initially represented using a text embedding model Bert.

[0012] In some embodiments, minimizing the aggregate risk and performing parameter optimization to obtain a global classifier includes:

[0013] The problem is transformed into finding the global classifier parameter θ that minimizes the aggregate risk. * , the expression is:

[0014]

[0015] Wherein, F represents the global classifier, R represents the aggregate risk, M represents the number of clients, and F i (θ) represents the classification result of the local classifier of the i-th client under parameter θ; is the experience loss function of the i-th client, expressed as:

[0016]

[0017] Where l represents the hinge loss function, |V i | represents the number of nodes in the isolated subgraph of the i-th client, Represents the local classifier of the i-th client under the parameter θ, and its isolated subgraph The classification result of the vth node in y v Represents an isolated subgraph The event type of the vth node in .

[0018] In some embodiments, the local graph structure information of the isolated subgraph of each client is extracted by using a random block model and aggregated; and the reconstructed local graph with global information is reconstructed on the client, including:

[0019] Assume that the N nodes of the original isolated subgraph in the client can be divided into K communities, and each node i belongs to a community z i ;

[0020] Define a K×K matrix Ω, Ω ab represents the connection probability between community a and community b;

[0021] Set community c i The node v i and community c j The node v j The probability that there is an edge between Based on Determine node v i With node v j Is there a connection? Given Ω, the prediction result Z and the label Y, the probability of generating the reconstructed local graph A is formalized as:

[0022]

[0023] Among them, P(A|Ω, Z, Y) represents the probability of the edge, A ij Represents node v i and node v j The connection probability of represents the annotation set, y i For node v i Annotated event classification, z i For node v i Predicted event classification; c i Represents the node v i classification of events identified during reconstruction;

[0024] In some embodiments, the method further comprises:

[0025] The original isolated subgraph and node features are input into the pre-trained graph neural network of the global classifier, and the i-th layer node h i Construct a k-nearest neighbor graph as the observation value O i , and form the observation set O = {A, O0, ..., O l};

[0026] The observation set O, the classification recognition result Z of the node and the label Y are put into the graph estimator, and the observation probability of the observation set O is calculated, and the expression is:

[0027]

[0028] In the formula, E ij represents the number of times the edge between nodes i and j appears in the observation set, M represents the total number of observation samples; α represents the true positive probability, that is, an edge appears in both the observation set and the actual optimal graph structure G. * β represents the probability of false positive, that is, the probability that an edge is not in the optimal graph structure but is observed;

[0029] Optimal graph structure G based on Bayesian formula * The probability is expressed as:

[0030]

[0031] Among them, P(Ω) represents the community matrix probability; P(G * |Ω,Z,Y L ) represents the probability distribution of graph generation, P(O, Z, Y L ) represents the probability of observed data, P(α) represents the probability of variable α, and P(β) represents the probability of variable β;

[0032] The community adjacency matrix Q is estimated by the expectation maximization algorithm, and the structural information is aggregated by weighting each client Q. Finally, the formula Estimate the link probability of the client graph nodes and estimate the local graph structure S from a global perspective by setting a threshold ∈.

[0033] In some embodiments, the difference in representations of the isolated subgraph and the reconstructed local graph corresponding to each client through the global classifier is minimized, and in the debiasing parameter optimization of the global classifier, the difference in representations is measured using mean square error or KL divergence.

[0034] In some embodiments, the global classifier is optimized by constraining the positive and negative sample representation distances, including:

[0035] Construct contrast loss to optimize the parameters of the global classifier. The contrast loss expression is:

[0036]

[0037] Among them, z l,i represents the i-th node information in the original isolated subgraph of the client, z g,i represents the i-th node information in the enhanced view of the client, z g,j represents the j-th node information in the enhanced view of the client; τ represents the temperature coefficient, and sim represents the cosine similarity.

[0038] On the other hand, the present invention also provides a method for identifying emergencies based on federated graph structure learning, the method comprising the following steps:

[0039] By setting up a social platform to obtain text data of emergencies to be processed, the keywords of the text data of emergencies to be processed include user information, text posted by users, event type, topic identifier, like and forward relationship, and time and place elements; constructing a heterogeneous graph of events to be processed according to the co-occurrence relationship between the keywords, and converting the heterogeneous graph of events to be processed into a text-based homogeneous graph to be processed according to the meta-path in the heterogeneous graph of events to be processed;

[0040] The homogeneous graph to be processed is input into the emergency event recognition model in the above-mentioned emergency event recognition model training method based on federated graph structure learning, and the emergency event recognition results of each node in the homogeneous graph to be processed are output; wherein, after the emergency event recognition model semantically represents each node through a graph neural network, the K-Mean clustering algorithm is used to cluster and identify the type of emergency events.

[0041] On the other hand, the present invention further provides a computer-readable storage medium having a computer program / instruction stored thereon, which implements the steps of the above method when the computer program / instruction is executed by a processor.

[0042] On the other hand, the present invention also provides a computer program product, comprising a computer program / instruction, which implements the steps of the above method when executed by a processor.

[0043] The beneficial effects of the present invention are at least:

[0044] The emergency event recognition model training method, recognition method and device described in the present invention pre-train a global classifier based on a federated learning architecture, extract and aggregate local structural information from the local graph of each client through a random block model, reconstruct a local view with global information, and use knowledge distillation to guide model optimization training from a local perspective using the local view with global information to minimize the representation difference between the two graph structures; use a contrastive learning method to perturb and expand the graph data to construct an enhanced view, select the representation of corresponding nodes in the original image and the enhanced view as positive samples, and the representation of different nodes as negative samples, constrain the representation distance between the positive and negative samples, and improve the representation learning ability and robustness of the model.

[0045] Additional advantages, purposes, and features of the present invention will be described in part in the following description, and will become apparent to those skilled in the art after studying the following, or may be learned from the practice of the present invention. The purposes and other advantages of the present invention may be achieved and obtained by the structures specifically indicated in the specification and the accompanying drawings.

[0046] Those skilled in the art will appreciate that the objectives and advantages that can be achieved with the present invention are not limited to the above specific description, and the above and other objectives that can be achieved by the present invention will be more clearly understood from the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] The drawings described herein are used to provide a further understanding of the present invention, constitute a part of the present application, and do not constitute a limitation of the present invention. In the drawings:

[0048] Figure 1 The present invention is a flowchart of a method for training an emergency event recognition model based on federated graph structure learning according to an embodiment of the present invention.

[0049] Figure 2 A schematic diagram of the training process of the model in the event recognition method based on federated graph structure learning described in another embodiment of the present invention. DETAILED DESCRIPTION

[0050] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments and the accompanying drawings. Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.

[0051] It should also be noted that, in order to avoid obscuring the present invention due to unnecessary details, only structures and / or processing steps closely related to the solutions according to the present invention are shown in the accompanying drawings, while other details that are not closely related to the present invention are omitted.

[0052] It should be emphasized that the term “include / comprises” when used herein refers to the presence of features, elements, steps or components, but does not exclude the presence or addition of one or more other features, elements, steps or components.

[0053] The purpose of the present invention is to solve the data heterogeneity problem of emergency event recognition under the federated learning framework during the training of the social network emergency event recognition scenario model. Specifically, in the federated scenario, the training data is collected independently by each client. Due to issues such as data privacy, the training set cannot be shared between clients. There are structural differences in the graph structure data of each client, which leads to the problem of event recognition model deviation and poor generalization ability.

[0054] Specifically, the present invention provides a method for training an emergency event recognition model based on federated graph structure learning, wherein the method is executed based on a global server and multiple clients, such as Figure 1 As shown, the method includes the following steps S101 to S104:

[0055] Step S101: Each client obtains local emergency text data by setting a social platform. The keywords of the emergency text data include user information, text posted by users, event type, topic identifier, like and forward relationship, time and place elements and co-occurrence relationship between keywords. An event heterogeneous graph is constructed based on the emergency text data. According to the meta-path in the event heterogeneous graph, the event heterogeneous graph is converted into a text-based homogeneous graph to obtain an isolated subgraph of each client.

[0056] Step S102: Each client independently trains a local classifier based on a graph neural network using a local isolated subgraph, and the global server aggregates the local classifiers of each client, minimizes the aggregation risk, and optimizes parameters to obtain a global classifier.

[0057] Step S103: extract the local graph structure information of the isolated subgraphs of each client using a random block model, and perform aggregation; reconstruct the local graph with global information on the client.

[0058] Step S104: Based on the knowledge distillation method, minimize the representation difference between the isolated subgraphs corresponding to each client and the reconstructed local graph through the global classifier, and optimize the debiasing parameters of the global classifier; and, take the reconstructed local graph as the enhanced view, based on the contrastive learning method, take the representation of the corresponding nodes in the isolated subgraphs and the enhanced view in each client as positive samples, and the representation between non-corresponding nodes as negative samples, and optimize the parameters of the global classifier by constraining the representation distance of positive and negative samples to obtain the emergency recognition model.

[0059] In step S101, different types of nodes and edges in the heterogeneous graph represent different entities and relationships, for example, user nodes, text nodes, keyword nodes and the publishing, liking, forwarding, and co-occurrence relationships between them. In order to simplify the processing, the complex heterogeneous graph is converted into a homogeneous graph. According to the meta-path contained in the graph, for example: text-user-text (Text-User-Text) relationship chain: through this relationship chain, the relationship between different texts published by the same user can be found. Through these meta-paths, the relationship in the heterogeneous graph is converted into a homogeneous text-text relationship, and a new text-text homogeneous graph is constructed. In the homogeneous graph, each node represents a text. Use the text embedding model BERT (Bidirectional Encoder Representations from Transformers) to embed each text and convert the text content into a high-dimensional vector representation.

[0060] This step constructs a homogeneous graph based on sudden events on social platforms, successfully realizing the transformation from heterogeneous data to a homogeneous graph structure. The BERT model is used for node initialization to improve the quality of node representation and the retention of text semantic information.

[0061] This step integrates multi-source information such as user behavior, text content, time and place, uses the BERT model to semantically embed text, optimizes graph node representation, simplifies complex heterogeneous graph structures through meta-path transformation, and constructs comprehensive homogeneous event graph data, thereby improving the ability to track and analyze emergencies and improving the timeliness and accuracy of event detection and response.

[0062] In step S102, the pre-training of the graph model follows the basic graph federated learning method. In order to obtain a global classifier, each client first trains the local classifier using local data and then aggregates it. Among them, the goal of graph neural networks (GNNs) is to learn the representation of the graph. A classic graph node embedding includes two steps: message propagation and aggregation. Each node in the graph uses its own information to iteratively collect information from its neighbors to update and improve its own representation.

[0063] During the aggregation process, the global classifier is obtained by minimizing the aggregation risk and optimizing the parameters, including:

[0064] The problem form is transformed into finding the global classifier parameter θ* that minimizes the aggregate risk, expressed as:

[0065]

[0066] Where F represents the global classifier, R represents the aggregate risk, M represents the number of clients, and F i(θ) represents the classification result of the local classifier of the i-th client under the parameter θ; is the experience loss function of the i-th client, expressed as:

[0067]

[0068] Where l represents the hinge loss function, |V i | represents the number of nodes in the isolated subgraph of the i-th client, It represents the local classifier of the i-th client under the parameter θ, and its isolated subgraph The classification result of the vth node in y v Represents an isolated subgraph The event type of the vth node in .

[0069] In step S103, the local graph structure information of the isolated subgraph of each client is extracted by using a random block model and aggregated; and a reconstructed local graph with global information is reconstructed on the client, including:

[0070] Assume that the N nodes of the original isolated subgraph in the client can be divided into K communities, and each node i belongs to a community z i ;

[0071] Define a K×K matrix Ω, Ω ab represents the connection probability between community a and community b;

[0072] Set community c i The node v i and community c j The node v j The probability that there is an edge between Based on Determine node v i With node v j Is there a connection? Given Ω, the prediction result Z and the label Y, the probability of generating the reconstructed local graph A is formalized as:

[0073]

[0074] Among them, P(A|Ω, Z, Y) represents the probability of the edge, A ij Represents node v i and node v j The connection probability of represents the annotation set, y i For node v i Annotated event classification, z i For node v i Predicted event classification; c i Represents the node v iclassification of events identified during reconstruction;

[0075] In some embodiments, the method further comprises:

[0076] The original isolated subgraph and node features are input into the pre-trained graph neural network of the global classifier, and the i-th layer node h i Construct a k-nearest neighbor graph as the observation value O i , and form the observation set O = {A, O0, ..., O l};

[0077] The observation set O, the classification recognition result Z of the node and the label Y are put into the graph estimator, and the observation probability of the observation set O is calculated, and the expression is:

[0078]

[0079] In the formula, E ij represents the number of times the edge between nodes i and j appears in the observation set, M represents the total number of observation samples; α represents the true positive probability, that is, an edge appears in both the observation set and the actual optimal graph structure G. * β represents the probability of false positive, that is, the probability that an edge is not in the optimal graph structure but is observed;

[0080] Optimal graph structure G based on Bayesian formula * The probability is expressed as:

[0081]

[0082] Among them, P(Ω) represents the community matrix probability; P(G * |Ω,Z,Y L ) represents the probability distribution of graph generation, P(O, Z, Y L ) represents the probability of observed data, P(α) represents the probability of variable α, and P(β) represents the probability of variable β.

[0083] The community adjacency matrix Q is estimated by the expectation maximization algorithm, and the structural information is aggregated by weighting each client Q. Finally, the formula Estimate the link probability of the client graph nodes and estimate the local graph structure S from a global perspective by setting a threshold ∈.

[0084] In step S104, the knowledge distillation process specifically includes: training the teacher model, in the global graph structure G global Train the teacher model to get the node representation Initialize the student model in the local graph structure G local Train the student model to get the initial node representation Distillation training, the output of the student model (local representation ) and the output of the teacher model (global representation ) for comparison. By minimizing the designed loss function (MSE or KL divergence), the parameters of the student model are continuously adjusted so that its output gradually approaches the output of the teacher model.

[0085] Contrastive Learning is an unsupervised learning method whose main idea is to enhance the robustness of the model to data representation by constructing positive and negative sample pairs and optimizing their representation. Specifically, contrastive learning learns more discriminative feature representations by shortening the representation distance of positive sample pairs and increasing the representation distance of negative sample pairs. In contrastive learning, data augmentation is to enhance the robustness of the model by perturbing the data (such as adding noise, transforming, etc.) to generate different views. In graph structure learning, this perturbation can be achieved by reconstructing the graph structure.

[0086] The reconstructed graph structure is a reconstruction result based on a global perspective, representing the distribution of graph data from a global perspective. Using this reconstructed graph structure as an enhanced view can introduce more global information, thereby improving representation learning under local graph structures.

[0087] Under the two graph structures (the original local graph structure and the reconstructed global graph structure), the representations of the corresponding nodes are selected as positive sample pairs. In each batch, the representations of other nodes are selected as negative samples.

[0088] In some embodiments, the representation difference between the isolated subgraphs and the reconstructed local graphs corresponding to each client through the global classifier is minimized, and the debiasing parameters of the global classifier are optimized, and the representation difference adopts the mean square error or KL divergence.

[0089] In some embodiments, by constraining the distance between positive and negative sample representations, the global classifier is optimized in parameters, including:

[0090] Construct contrast loss to optimize the parameters of the global classifier. The contrast loss expression is:

[0091]

[0092] Among them, z l,i Indicates the information of the i-th node in the original isolated subgraph of the client, z g,j represents the i-th node information in the client's enhanced view, z g,j represents the j-th node information in the client's enhanced view; τ represents the temperature coefficient, and sim represents the cosine similarity.

[0093] On the other hand, the present invention also provides a method for identifying emergencies based on federated graph structure learning, the method comprising the following steps S201-S202:

[0094] Step S201: Acquire text data of unprocessed emergencies by setting up a social platform, where the keywords of the text data of unprocessed emergencies include user information, text posted by users, event type, topic identifier, like and forward relationship, and time and place elements; construct a heterogeneous graph of unprocessed events based on the co-occurrence relationship between the keywords, and convert the heterogeneous graph of unprocessed events into a text-based homogeneous graph based on unprocessed events based on the meta-path in the heterogeneous graph of unprocessed events.

[0095] Step S202: Input the homogeneous graph to be processed into the emergency event recognition model in the emergency event recognition model training method based on federated graph structure learning described in the above steps S101 to S104, and output the emergency event recognition results of each node in the homogeneous graph to be processed; wherein, the emergency event recognition model uses a K-Mean clustering algorithm to cluster and identify the type of emergency after semantically representing each node through a graph neural network.

[0096] On the other hand, the present invention further provides a computer-readable storage medium having a computer program / instruction stored thereon, which implements the steps of the above method when the computer program / instruction is executed by a processor.

[0097] On the other hand, the present invention also provides a computer program product, comprising a computer program / instruction, which implements the steps of the above method when executed by a processor.

[0098] The present invention is described below in conjunction with a specific embodiment:

[0099] This embodiment provides an event recognition method based on federated graph structure learning. It extracts local graph structure information by designing a graph structure learning method, reconstructs the local graph structure based on mixed global information, and realizes federated model alignment for structural differences by comparing the original graph and the reconstructed graph. The above graph structure comparison learning is applied in a federated scenario, which is compatible with heterogeneous data across clients and realizes robust semantic modeling of event text and event text cluster recognition.

[0100] like Figure 2As shown, the training process of the model mainly includes five parts: graph data construction, pre-training, graph structure learning based on random block model, federated graph comparative learning, and emergency event recognition. Specifically, the present invention proposes a federated graph structure information sharing framework for emergency event recognition, which first collects text data from social platforms, then constructs a graph according to rules, extracts local structural information through graph structure learning methods (such as random block model, SBM) and aggregates it, and uses the aggregated structural information to reconstruct a local view with global information on the client, uses a local model to calculate node representations on the local graph and the reconstructed graph, and aligns the global and local representations through methods such as distillation or comparative learning to reduce model offsets caused by structural differences.

[0101] 1) Construction of emergency graph data

[0102] The method first collects potential event-related text data on social platforms, which includes users, texts posted by users, events, topic tags (Hash Tags), likes and forwarding, time and place, etc. The event heterogeneous graph is constructed based on the posting, likes, and forwarding relationships between users and texts, and the co-occurrence relationship between keywords contained in the data. Then, based on the meta-paths contained in the graph, such as the text-user-text relationship chain, the complex heterogeneous graph is converted into a text-text homogeneous graph. The initial representation of the graph nodes Initialize with the text embedding model Bert.

[0103] 2) Pre-training

[0104] The graph model pre-training step follows the basic graph federated learning method, usually given the structure and feature information of the graph Among them, V, A and X represent nodes, adjacency matrix and node features respectively. The goal of graph neural networks (GNNs) is to learn the representation of graphs. A classic graph node embedding includes two steps: message propagation and aggregation. Each node in the graph iteratively collects information from its neighbors with its own information to update and improve its own representation.

[0105] Generally speaking, a l-layer GNN can be expressed as:

[0106]

[0107] In federated graph learning, the global graph identity is marked as There is a global server S and M clients. is the client subgraph. There are no common nodes between client subgraphs, which can be expressed as The federated learning framework is used to collaboratively learn on the isolated subgraphs of all data owners without the need to share the original graph data. To obtain the global node classifier F, the learnable weights θ in F are calculated based on the client subgraph G. iOptimize. The problem is formalized as finding θ* that minimizes the aggregate risk:

[0108]

[0109] Wherein, F represents the global classifier, R represents the aggregate risk, M represents the number of clients, and F i (θ) represents the classification result of the local classifier of the i-th client under parameter θ; is the experience loss function of the i-th client, expressed as:

[0110]

[0111] Where l represents the hinge loss function, |V i | represents the number of nodes in the isolated subgraph of the i-th client, Represents the local classifier of the i-th client under the parameter θ, and its isolated subgraph The classification result of the vth node in y v Represents an isolated subgraph The event type of the vth node in .

[0112] 3) Graph structure learning based on random block model

[0113] The random block model assumes that the probability of edges between nodes depends only on their communities. For example, community c i The node v i and node v of community cj j The probability that there is an edge between Therefore, Ω represents the probability of intra-community and inter-community connections. Given the parameter Ω, the probability of predicting Z and label Y to generate graph A is formalized as:

[0114]

[0115] Among them, P(A|Ω, Z, Y) represents the probability of the edge, A ij Represents node v i and node v j The connection probability of represents the annotation set, y i For node v i Annotated event classification, z i For node v i Predicted event classification; c i Represents the node v i Classification of events identified during reconstruction.

[0116] The original graph A and node features X are input into the pre-trained GNN model. Given that node representations at different layers reveal multi-order neighborhood information, the node representation h of each layer is used to i Construct a k-nearest neighbor graph as the observation value O of the optimal graph i , combined with the original graph A, to form the observation set O = {A, O0, ..., O l Then, these observations 0, model node classification results Z and labels Y are put into the graph estimator. By modeling the graph structure with a random block model, the probability of observing 0 can be expressed as P(O|G, α, β), where α represents the true positive probability, that is, an edge appears in both the observation set and the actual optimal graph structure G. * , β represents the false positive probability, that is, the probability that an edge is not in the optimal graph structure but is observed. The specific expression of the observation probability is as follows:

[0117]

[0118] In the formula, M represents the number of times the edge between nodes i and j appears in the observation set, M represents the total number of observation samples; α represents the true positive probability, that is, an edge appears in both the observation set and the actual optimal graph structure G * β represents the false positive probability, that is, the probability that an edge is not in the optimal graph structure but is observed.

[0119] The intermediate goal of this example is to infer the optimal graph structure G based on the observation O and the predicted label Z. * , the probability of the optimal graph structure based on the Bayesian formula can be expressed as:

[0120]

[0121] where P(O|G,α,β) is the probability of these observations O given the optimal graph G and model parameters α and β.

[0122] The graph generates a probability distribution P(G|Ω,Z,YL), where Ω represents the parameters of SBM. SBM assumes that the probability of edges between nodes depends only on their communities. For example, i The node v i and have community c j The node v j The probability that there is an edge between them is Ω ci cj . P(Ω), P(α), P(β), and P(O,Z,YL) are the parameters and the probability of the observed data.

[0123] P(O,Z,YL) represents the joint probability of the observation graph and node label classification recognition result Z and label Y.

[0124] Finally, the community adjacency matrix Q is estimated by the expectation maximization (EM) algorithm. The aggregation of structural information is achieved by simply weighting each client Q. Finally, the link probability of the client graph node is estimated by formula (4), and the local graph structure S from a global perspective is estimated by setting a threshold ∈.

[0125] 4) Federated Graph Contrastive Learning

[0126] The goal of this embodiment is to achieve model debiasing by aligning global representations and local representations. Here, we mainly consider knowledge distillation and contrastive learning methods. For the graph structure under the global perspective reconstructed by structural learning, the mean square error (MAE) or KL divergence of the representations under the two graph structures is minimized through the knowledge distillation method to achieve model debiasing. The contrastive learning method mainly achieves data expansion by perturbing the data, and improves the robustness of representation learning by constraining the distance between positive and negative sample representations. The reconstructed graph structure is used as an enhanced view, and the representations of the corresponding nodes under the two graph structures are used as positive samples z i , select other nodes in each batch as negative samples z j , and construct the following contrast loss:

[0127]

[0128] Among them, z l,i represents the i-th node information in the original isolated subgraph of the client, z g,i represents the i-th node information in the enhanced view of the client, z g,j represents the j-th node information in the enhanced view of the client; τ represents the temperature coefficient, and sim represents the cosine similarity.

[0129] 5) Time recognition based on graph learning

[0130] The specific problem solved by this embodiment is the data heterogeneity problem in emergency event recognition under the federated learning framework. Based on the above-mentioned federated graph comparative learning method, a robust semantic representation of each text is obtained, and finally a clustering algorithm such as K-Mean is used to realize the recognition of emergency event text clusters.

[0131] This embodiment migrates the traditional graph learning-based event recognition method to the federated scenario to solve the model offset problem caused by data heterogeneity. The local features estimated by the traditional random block model are aggregated in a federated manner, and the structure is reconstructed through the aggregated information to achieve the sharing of federated graph structure information. The above-mentioned federated graph structure learning is used as a data enhancement method to achieve the alignment of global and local features, improve the convergence efficiency of model training, and improve the accuracy of event recognition.

[0132] Corresponding to the above method, the present invention also provides an apparatus / system, which includes a computer device, the computer device includes a processor and a memory, the memory stores computer instructions, the processor is used to execute the computer instructions stored in the memory, and when the computer instructions are executed by the processor, the apparatus / system implements the steps of the method described above.

[0133] The embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the aforementioned edge computing server deployment method are implemented. The computer-readable storage medium can be a tangible storage medium, such as a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a floppy disk, a hard disk, a removable storage disk, a CD-ROM, or any other form of storage medium known in the technical field.

[0134] In summary, the emergency event recognition model training method, recognition method and device described in the present invention pre-train a global classifier based on the architecture of federated learning, extract and aggregate local structural information from the local graph of each client through a random block model, reconstruct a local view with global information, and use knowledge distillation to guide model optimization training from a local perspective using the local view with global information to minimize the representation difference between the two graph structures; use a contrastive learning method to perturb and expand the graph data to construct an enhanced view, and select the representation of corresponding nodes in the original image and the enhanced view as positive samples, and the representation of different nodes as negative samples, constrain the representation distance between positive and negative samples, and improve the representation learning ability and robustness of the model.

[0135] It should be understood by those skilled in the art that the exemplary components, systems and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software or a combination of the two. Whether it is performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present invention are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link via a data signal carried in a carrier.

[0136] It should be clear that the present invention is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present invention.

[0137] In the present invention, features described and / or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, and / or combined with features of other embodiments or replace features of other embodiments.

[0138] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the embodiments of the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for training an emergency event recognition model based on federated graph structure learning, characterized in that: The method is performed based on a global server and multiple clients, and includes the following steps: Each client obtains local emergency text data by setting a social platform, wherein the keywords of the emergency text data include user information, text posted by the user, event type, topic identifier, like and forward relationship, time and place elements, and co-occurrence relationship between the keywords, and constructs an event heterogeneous graph according to the emergency text data. According to the meta-path in the event heterogeneous graph, the event heterogeneous graph is converted into a text-based homogeneous graph to obtain an isolated subgraph of each client; Each client independently trains a local classifier based on a graph neural network using the local isolated subgraph, and the global server aggregates the local classifiers of each client, minimizes the aggregation risk, and optimizes the parameters to obtain a global classifier; Extracting local graph structure information of the isolated subgraph of each client using a random block model and performing aggregation; reconstructing a local graph with global information on the client; Based on the knowledge distillation method, the difference in the representation of the isolated subgraph and the reconstructed local graph corresponding to each client through the global classifier is minimized, and the debiasing parameters of the global classifier are optimized; and the reconstructed local graph is used as an enhanced view. Based on the contrastive learning method, the representation of the corresponding nodes in the isolated subgraph in each client and the enhanced view is used as positive samples, and the representation between non-corresponding nodes is used as negative samples. By constraining the distance between the positive and negative samples, the parameters of the global classifier are optimized to obtain the emergency recognition model.

2. The method for training an emergency event recognition model based on federated graph structure learning according to claim 1, characterized in that: The homogeneous graph is initially represented using the text embedding model Bert.

3. The method for training an emergency event recognition model based on federated graph structure learning according to claim 1, characterized in that: Minimize the aggregation risk and optimize the parameters to get the global classifier, including: The problem is transformed into finding the global classifier parameter θ that minimizes the aggregate risk. * , the expression is: Wherein, F represents the global classifier, R represents the aggregate risk, M represents the number of clients, F i(θ) represents the classification result of the local classifier of the i-th client under parameter θ; is the experience loss function of the i-th client, expressed as: Where l represents the hinge loss function, |V i | represents the number of nodes in the isolated subgraph of the i-th client, Represents the local classifier of the i-th client under the parameter θ, and its isolated subgraph The classification result of the vth node in y v Represents an isolated subgraph The event type of the vth node in .

4. The method for training an emergency event recognition model based on federated graph structure learning according to claim 1, characterized in that: The local graph structure information of the isolated subgraph of each client is extracted by using a random block model, and then aggregated; and a reconstructed local graph with global information is reconstructed on the client, including: Assume that the N nodes of the original isolated subgraph in the client can be divided into K communities, and each node i belongs to a community z i ; Define a K×K matrix Ω, Ω ab represents the connection probability between community a and community b; Set community c i The node v i and community c j The node v j The probability that there is an edge between Based on Determine node v i With node v j Is there a connection? Given Ω, the prediction result Z and the label Y, the probability of generating the reconstructed local graph A is formalized as: Among them, P(A|Ω, Z, Y) represents the probability of the edge, A ij Represents node v i and node v j The connection probability of represents the annotation set, y i For node v i Annotated event classification, z i For node v i Predicted event classification; c i Represents the node v i Classification of events identified during reconstruction.

5. The method for training an emergency event recognition model based on federated graph structure learning according to claim 4, characterized in that: The method further comprises: The original isolated subgraph and node features are input into the pre-trained graph neural network of the global classifier, and the i-th layer node h i Construct a k-nearest neighbor graph as the observation value O i , and form the observation set O = {A, O0, ..., O l }; The observation set O, the classification recognition result Z of the node and the label Y are put into the graph estimator, and the observation probability of the observation set O is calculated, and the expression is: In the formula, E ij represents the number of times the edge between nodes i and j appears in the observation set, M represents the total number of observation samples; α represents the true positive probability, that is, an edge appears in both the observation set and the actual optimal graph structure G. * β represents the probability of false positive, that is, the probability that an edge is not in the optimal graph structure but is observed; Optimal graph structure G based on Bayesian formula * The probability is expressed as: Among them, P(Ω) represents the community matrix probability; P(G * |Ω,Z,Y L ) represents the probability distribution of graph generation, P(O, Z, Y L ) represents the probability of observed data, P(α) represents the probability of variable α, and P(β) represents the probability of variable β; The community adjacency matrix Q is estimated by the expectation maximization algorithm, and the structural information is aggregated by weighting each client Q. Finally, the formula Estimate the link probability of the client graph nodes and estimate the local graph structure S from a global perspective by setting a threshold ∈.

6. The method for training an emergency event recognition model based on federated graph structure learning according to claim 1, characterized in that: Minimize the representation difference between the isolated subgraph and the reconstructed local graph corresponding to each client through the global classifier, and optimize the debiasing parameters of the global classifier, wherein the representation difference adopts mean square error or KL divergence.

7. The method for training an emergency event recognition model based on federated graph structure learning according to claim 1, characterized in that: By constraining the positive and negative sample representation distances, the global classifier is optimized in parameters, including: Construct contrast loss to optimize the parameters of the global classifier. The contrast loss expression is: Among them, z l,i represents the i-th node information in the original isolated subgraph of the client, z g,i represents the i-th node information in the enhanced view of the client, z g,j represents the j-th node information in the enhanced view of the client; τ represents the temperature coefficient, and sim represents the cosine similarity.

8. A method for identifying emergencies based on federated graph structure learning, characterized in that: The method comprises the following steps: By setting up a social platform to obtain text data of emergencies to be processed, the keywords of the text data of emergencies to be processed include user information, text posted by users, event type, topic identifier, like and forward relationship, and time and place elements; constructing a heterogeneous graph of events to be processed according to the co-occurrence relationship between the keywords, and converting the heterogeneous graph of events to be processed into a text-based homogeneous graph to be processed according to the meta-path in the heterogeneous graph of events to be processed; The homogeneous graph to be processed is input into the emergency event recognition model in the emergency event recognition model training method based on federated graph structure learning as described in any one of claims 1 to 7, and the emergency event recognition results of each node in the homogeneous graph to be processed are output; wherein, after the emergency event recognition model semantically represents each node through a graph neural network, the K-Mean clustering algorithm is used to cluster and identify the type of emergency events.

9. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method as claimed in any one of claims 1 to 7 are implemented.

10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Heterogeneous graph data node embedded feature extraction model training method, embedded feature extraction method and node classification method and device

    CN117272017A

  • Graph contrast learning quotation network node classification method and system based on global and local information enhancement

    CN118395116A

Cited By

  • Factory equipment fault prediction method and system fusing causal inference

    CN122153574A