Method, device, medium and equipment for labeling emergency event data

By constructing an event correlation graph and using a combined model of a graph neural network and a classification network, the problem of neglected correlations in the labeling of emergency event data in the existing technology is solved, and more accurate labeling prediction of event data is achieved.

CN118332346BActive Publication Date: 2024-09-13ROPEOK TECHNOLOGY GROUP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410771058.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-14
Publication Date
2024-09-13
Estimated Expiration
2044-06-14

AI Technical Summary

Technical Problem

The existing technology ignores the correlation between event data in labeling emergency event data, resulting in low accuracy of labeling results and making it difficult to accurately identify the correlation between different event data.

Method used

By constructing an event association graph and using a combined model of graph neural network and classification network, node representations are generated based on the association between event data, and label prediction is performed. The attention mechanism is used to update the weights of nodes and edges to improve labeling results. accuracy.

Benefits of technology

By identifying the correlation between different event data, the accuracy of labeling results is significantly improved and accurate label prediction of event data is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118332346B
    Figure CN118332346B
Patent Text Reader

Abstract

The present disclosure provides a labeling method, device, medium and equipment for emergency event data, the method comprising: obtaining and preprocessing event data corresponding to a number of emergency events; using each preprocessed event data as a graph node, and generating edges according to the association relationship between the event data corresponding to each graph node, to obtain an event association graph; labeling each graph node to obtain label information corresponding to each graph node; generating node representations of each graph node according to the event data and label information corresponding to each graph node; inputting the event association graph and the node representations of each graph node into a pre-built event labeling model to train the event labeling model, and obtaining a target event labeling model to label and predict the event data corresponding to a new emergency event. The technical solution of the embodiment of the present application can accurately identify the association relationship between different event data, thereby improving the accuracy of the labeling result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure belongs to the field of data processing technology, and in particular relates to a method, device, medium and equipment for labeling emergency event data. Background Art

[0002] Emergency events usually refer to events that occur suddenly and require immediate action to prevent or mitigate their negative impact. These events may include natural disasters, accidents, public health incidents, or social security incidents.

[0003] In order to quickly identify key information such as the nature, severity, and scope of impact of emergency events, the current technical solutions often use traditional machine learning-based methods to label the event data of emergency events. This method relies on manually designed feature extractors to extract features from event data, and then uses classifiers to predict labels for the extracted features. However, the above methods often ignore the correlation between event data, which leads to low accuracy of the labeling results. Therefore, how to accurately identify the correlation between different event data and improve the accuracy of labeling results has become a technical problem that needs to be solved urgently. Summary of the invention

[0004] The embodiments of the present application provide a method, apparatus, medium and device for labeling emergency event data, which can accurately identify the association between different event data to at least a certain extent, thereby improving the accuracy of the labeling results.

[0005] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.

[0006] According to one aspect of an embodiment of the present application, a method for labeling emergency event data is provided, comprising: acquiring and preprocessing event data corresponding to a number of emergency events; using each of the preprocessed event data as a graph node, and generating edges based on the association relationship between the event data corresponding to each of the graph nodes to obtain an event association graph; labeling each of the graph nodes based on the event data corresponding to each of the graph nodes in the event association graph to obtain label information corresponding to each of the graph nodes; generating a node representation of each of the graph nodes based on the event data and the label information corresponding to each of the graph nodes; inputting the event association graph and the node representation of each of the graph nodes into a pre-constructed event labeling model to train the event labeling model to obtain a target event labeling model; using the target event labeling model to perform labeled prediction on the event data corresponding to a new emergency event; the event labeling model comprises a connected graph neural network and a classification network; wherein the graph neural network is used to determine each of the event nodes based on the event association graph. The neighbor nodes of the graph node and the node representation of the neighbor node; based on the node representation of each graph node and the node representation of the neighbor node corresponding to the graph node, the node representation of the graph node is updated; the classification network is used to classify the labels of each graph node according to the updated node representation of each graph node, and output the predicted label corresponding to each graph node; the graph neural network includes a multi-layer graph convolutional neural network layer and an activation function, each of which includes a node update function and an edge update function to update the node representation of the graph node and the edge representation of the edge; the node update function adopts an attention mechanism to calculate the similarity between the graph node and the neighbor node to adjust the first weight corresponding to the neighbor node; and based on the adjusted first weight of each neighbor node, the node representation of the graph node is updated; the edge update function adopts an attention mechanism to determine and update the second weight corresponding to the edge connecting the graph node and the neighbor node, and the second weight is used to characterize the contribution of each neighbor node to the updated node representation of the graph node.

[0007] According to a further embodiment of the present application, the label information includes at least one event label sorted in a hierarchical manner; a node representation of each graph node is generated based on the event data and the label information corresponding to each graph node, including: extracting features of the event data corresponding to each graph node to obtain a data feature vector corresponding to each graph node; encoding the label information corresponding to each graph node to obtain a label feature vector corresponding to each graph node; and respectively concatenating the data feature vector and the label feature vector corresponding to each graph node to obtain a node representation corresponding to each graph node.

[0008] According to a further embodiment of the present application, the event label includes one or more of an event type label, a nature label, a status label, a location label, a time label, a crowd-involved label, an object-involved label, and a casualty label.

[0009] According to a further embodiment of the present application, there is provided a method for using the target event labeling model to perform labeling prediction on event data corresponding to new emergency events, including: generating a target event association graph based on event data corresponding to a number of new emergency events; inputting the target event association graph into the target event labeling model, so that the target event labeling model outputs an event label corresponding to each of the new emergency events.

[0010] According to one aspect of an embodiment of the present application, a device for labeling emergency event data is provided, comprising: an acquisition module for acquiring and preprocessing event data corresponding to a number of emergency events; a first generation module for treating each of the preprocessed event data as a graph node, and generating edges according to the association relationship between the event data corresponding to each of the graph nodes to obtain an event association graph; a labeling module for labeling each of the graph nodes according to the event data corresponding to each of the graph nodes in the event association graph to obtain label information corresponding to each of the graph nodes; a second generation module for generating a node representation of each of the graph nodes according to the event data and the label information corresponding to each of the graph nodes; a training module for inputting the event association graph and the node representation of each of the graph nodes into a pre-constructed event labeling model to train the event labeling model to obtain a target event labeling model; a processing module for using the target event labeling model to perform labeled prediction on the event data corresponding to a new emergency event; the event labeling model comprises a connected graph neural network and a classification network; wherein, The graph neural network is used to determine the neighbor nodes of each graph node and the node representation of the neighbor node according to the event association graph; based on the node representation of each graph node and the node representation of the neighbor node corresponding to the graph node, the node representation of the graph node is updated; the classification network is used to classify the labels of each graph node according to the updated node representation of each graph node, and output the predicted label corresponding to each graph node; the graph neural network includes multiple layers of graph convolutional neural network layers and activation functions, each of which includes a node update function and an edge update function to update the node representation of the graph node and the edge representation of the edge; the node update function adopts an attention mechanism to calculate the similarity between the graph node and the neighbor node to adjust the first weight corresponding to the neighbor node; and based on the adjusted first weight of each neighbor node, the node representation of the graph node is updated; the edge update function adopts an attention mechanism to determine and update the second weight corresponding to the edge connecting the graph node and the neighbor node, and the second weight is used to characterize the contribution of each neighbor node to the updated node representation of the graph node.

[0011] According to one aspect of an embodiment of the present application, a computer-readable medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for labeling emergency event data as described in the above embodiment is implemented.

[0012] According to one aspect of an embodiment of the present application, an electronic device is provided, comprising: one or more processors; a storage device for storing one or more programs, which, when the one or more programs are executed by the one or more processors, enables the one or more processors to implement the method for labeling emergency event data as described in the above embodiments.

[0013] According to one aspect of an embodiment of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes a computer instruction, and the computer instruction is stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the labeling method of emergency event data provided in the above embodiment.

[0014] In the technical solutions provided by some embodiments of the present application, by acquiring and preprocessing event data corresponding to a number of emergency events, each preprocessed event data is used as a graph node, and edges are generated according to the association relationship between the event data corresponding to the graph nodes, to obtain an event association graph, and according to the event data corresponding to each graph node in the event association graph, each graph node is labeled to obtain the label information corresponding to each graph node; then, according to the event data and label information corresponding to each graph node, a node representation of each graph node is generated, and the event association graph and the node representation of each graph node are input into a pre-constructed event labeling model, and the event labeling model is trained to obtain a target event labeling model to perform labeling prediction on the event data corresponding to the new event. Thus, by constructing an event association graph, the association relationship between different event data can be accurately identified, and then a labeled prediction can be performed, thereby ensuring the accuracy of the labeling result.

[0015] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0017] Figure 1 A schematic flow chart of a method for labeling emergency event data according to an embodiment of the present application is shown.

[0018] Figure 2 A block diagram of an apparatus for labeling emergency event data according to an embodiment of the present application is shown.

[0019] Figure 3 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown. DETAILED DESCRIPTION

[0020] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be more comprehensive and complete and fully convey the concept of the example embodiments to those skilled in the art.

[0021] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the application.

[0022] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0023] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.

[0024] Figure 1 A schematic flow chart of a method for labeling emergency event data according to an embodiment of the present application is shown.

[0025] It should be noted that the method can be applied to a terminal device or a server, wherein the terminal device may include but is not limited to one or more of a smart phone, a tablet computer, a portable computer, and a desktop computer; the server may be a physical server or a cloud server.

[0026] like Figure 1 As shown, the method for labeling emergency event data includes at least steps S110 to S160, which are described in detail as follows (the method is applied to a server as an example for explanation).

[0027] In step S110, event data corresponding to a number of emergency events are acquired and pre-processed.

[0028] The event data may be used to describe relevant information of the event, such as the event location, event time, event characters, etc.

[0029] In this embodiment, the server can obtain the event data of several emergency events stored historically from its own storage space or a third-party device. Then, the server can pre-process the obtained event data for subsequent use.

[0030] In one example, the preprocessing may include but is not limited to data cleaning and formatting, that is, the server may first clean the event data to remove duplicate data and noise in the event data, and then format the event data into a specified format for subsequent processing.

[0031] In step S120, each of the preprocessed event data is used as a graph node, and edges are generated according to the association relationship between the event data corresponding to each graph node to obtain an event association graph.

[0032] In this embodiment, when generating an event association graph, the server can generate a graph node according to each preprocessed event data, and determine the edges between the graph nodes according to the association relationship between the event data, that is, if there is a certain association relationship between any two graph nodes, the two graph nodes can be connected to obtain an event association graph. Therefore, based on the generated event association graph, the association relationship between the event data of different events can be accurately identified.

[0033] In one example, the association relationship may include, but is not limited to, one or more of time association, geographic space association, personnel association, vehicle association, means association, and target object association. The aforementioned "means" may be the method or measure used by personnel to implement or prevent the emergency event in the event of an emergency.

[0034] It should be noted that the “association” mentioned in the present application may be the same or similar attribute information. For example, although the occurrence time of different events is different, they are all in the same time period, then it can be determined that there is a time association between the two.

[0035] In step S130, each graph node in the event association graph is labeled according to the event data corresponding to each graph node to obtain label information corresponding to each graph node.

[0036] In this embodiment, after the event association graph is generated, each graph node can be labeled manually or semi-automatically based on the event data corresponding to each graph node. Specifically, the management personnel can determine different types of event labels in advance according to actual implementation needs for selection during labeling.

[0037] In one example, the event label may include, but is not limited to, one or more of an event type label, a nature label, a status label, a location label, a time label, a crowd-involved label, an item-involved label, and a casualty label.

[0038] For each type of event tag, the administrator can preset multiple sub-tags for selection. That is, when labeling, the user can select a specific sub-tag from the sub-tags corresponding to each type of event tag to label, so as to ensure the accuracy of labeling.

[0039] For example, for the type label of an event, its corresponding sub-labels may include various event types; for the nature label of an event, its corresponding sub-labels may include but are not limited to one or more of emergency events, general events, emergencies, severe weather events, holiday events, large-scale events, and public health emergencies; for the status label of an event, its corresponding sub-labels may include but are not limited to one or more of being processed, closed, unprocessed, under appeal, reinvestigated, and completed; for the location label of an event, its corresponding sub-labels may include but are not limited to one or more of streets, communities, neighborhoods, commercial areas, residential areas, public places, transportation hubs, schools, hospitals, relevant departments, and villages; For the time label of the event, its corresponding sub-labels may include but are not limited to one or more of date (year, month, day), time period (morning, morning, noon, afternoon, evening), day of the week, season (spring, summer, autumn, winter) and holidays; for the label of the people involved in the event, its corresponding sub-labels may include various types of people, such as adults, minors, the elderly, students or immigrants, etc.; for the label of the objects involved in the event, its corresponding sub-labels may include but are not limited to one or more of vehicles, documents, electronic equipment, gold and silver jewelry and cultural relics; for the label of the casualties of the event, its corresponding sub-labels may include but are not limited to one or more of no injuries, minor injuries, serious injuries, missing and trapped.

[0040] In one embodiment of the present application, the management personnel can also determine the levels corresponding to different types of event labels based on prior experience, and different levels correspond to different data granularities. Therefore, after the graph nodes are labeled, the server can sort the event labels corresponding to each graph node according to the corresponding levels to obtain the label information corresponding to the graph node.

[0041] In one example, the levels can be divided into high level, middle level and low level, where the data granularity of the high level is the coarsest, the data granularity of the middle level is the second, and the data granularity of the low level is the most detailed. In this way, the event data can be better organized so that the features of different data granularities can be learned at different levels in the future.

[0042] Please continue to refer to Figure 1 In step S140, a node representation of each graph node is generated according to the event data and the label information corresponding to each graph node.

[0043] In this embodiment, after acquiring the label information corresponding to each graph node, the server may generate a corresponding node representation according to the event data and label information corresponding to each graph node in accordance with a predetermined rule.

[0044] In one embodiment, step S140 includes: extracting features from event data corresponding to each of the graph nodes to obtain a data feature vector corresponding to each of the graph nodes; encoding label information corresponding to each of the graph nodes to obtain a label feature vector corresponding to each of the graph nodes; and concatenating the data feature vector and the label feature vector corresponding to each of the graph nodes to obtain a node representation corresponding to each of the graph nodes.

[0045] In this embodiment, the server can extract features from the event data corresponding to each graph node to obtain a corresponding data feature vector. Then, the tag information corresponding to each graph node is encoded to obtain a corresponding tag feature vector. In one example, each event tag can be encoded using an embedded vector representation, that is, each event tag is mapped to a vector of a specific dimension.

[0046] Taking the aforementioned hierarchical structure of "high-level labels - middle-level labels - low-level labels" as an example, assuming that the feature encoding of the event labels corresponding to each layer can be expressed as follows:

[0047] high-level labels → [1, 0, 1, 0, 0, 0, 0, ..., 0];

[0048] Middle-level labels → [1, 0, 1, 0, 1, 0, 0, ..., 0];

[0049] Low-level labels → [1, 0, 1, 0, 1, 0, 1, ..., 0].

[0050] Concatenating these codes gives us the corresponding label feature vector: [1, 0, 1, 0, 0, 0, 0,..., 0,1, 0, 1, 0, 1, 0, 0, ..., 0,1, 0, 1, 0, 1, 0, 1, ..., 0].

[0051] After obtaining the data feature vector and the label feature vector corresponding to each graph node, the server can concatenate the two to obtain the node representation corresponding to each graph node.

[0052] It is worth noting that the above method combines event labels at different levels with the data feature vector of event data through encoding to obtain the corresponding node representation, thereby eliminating the need to introduce new nodes, which not only avoids the increase in the number of nodes, but also makes full use of the information of event labels at different levels to form a richer node representation, thereby improving the performance and effect of subsequent models (i.e., the event labeling model described later), reducing computational costs and model complexity. At the same time, the simplicity and interpretability of the model can be maintained, making the model easier to understand and apply.

[0053] In step S150, the event association graph and the node representation of each graph node are input into a pre-built event labeling model to train the event labeling model to obtain a target event labeling model.

[0054] In this embodiment, a person skilled in the art can pre-construct an event labeling model, which is used to output corresponding label information according to event data. The server can input the event association graph obtained based on the above method and the node representation of each graph node in the event association graph into the pre-constructed event labeling model, thereby training the event labeling model to obtain a target event labeling model, so that the target event labeling model can output correct label information based on the event data.

[0055] In one embodiment of the present application, the event labeling model includes a connected graph neural network and a classification network; wherein the graph neural network is used to determine the neighbor nodes of each graph node and the node representation of the neighbor nodes according to the event association graph; based on the node representation of each graph node and the node representation of the neighbor nodes corresponding to the graph node, the node representation of the graph node is updated.

[0056] The classification network is used to perform label classification on each of the graph nodes according to the updated node representation of each of the graph nodes, and output a predicted label corresponding to each of the graph nodes.

[0057] In this embodiment, the pre-built event labeling model includes a connected graph neural network and a classification network. The graph neural network can learn the node representation of each graph node in the event association graph and extract rich feature information through the connection relationship between the nodes.

[0058] Specifically, the graph neural network can determine the corresponding neighbor nodes for each graph node according to the event association graph, and obtain the node representation of the corresponding neighbor nodes. The neighbor nodes can be other graph nodes connected to the graph node, so the number of neighbor nodes corresponding to each graph node can be the same or different.

[0059] Then, for each graph node, the graph neural network can aggregate and update the node representation of the graph node based on the node representation of the graph node and the node representations of its corresponding neighbor nodes, so as to obtain a richer and more representative node representation.

[0060] After the graph neural network completes updating the node representation of each graph node, the updated node representation can be used as the input of the classification network. The classification network can classify the labels of each graph node based on the updated node representation of each graph node to output the predicted label corresponding to each graph node.

[0061] In one example, the classification network may include a fully connected layer and a softmax function, and the category of the event label and the loss function are set to a multi-classification cross entropy loss.

[0062] In this fully connected layer, each node is connected to all nodes in the previous layer, and its representation formula can be as follows:

[0063]

[0064] in, x It is the output of the previous layer, that is, the output of the graph neural network. W is the weight matrix of the fully connected layer, and its size is n × m ,in n is the number of nodes in the fully connected layer, m is the number of nodes in the previous layer. b is the bias vector, whose magnitude is n . y It is the output of the fully connected layer, which is the prediction result of the event label.

[0065] The Softmax function is a normalization function that can map multiple input values ​​to the (0, 1) interval so that the sum of all output values ​​is equal to 1. In multi-classification problems, the Softmax function is used to convert the output of the neural network into the probability distribution of each category for classification. Its calculation formula is as follows:

[0066]

[0067] in, z i is the input vector z No. i elements, i ranges from 1 to n, n is the number of nodes in the fully connected layer, and K is the total number of categories.

[0068] In one embodiment of the present application, the graph neural network includes multiple layers of graph convolutional neural network layers and activation functions, and each of the graph convolutional neural network layers includes a node update function and an edge update function to update the node representation of the graph nodes and the edge representation of the edges.

[0069] Specifically, the node update function can consider the node representations and weights of multiple neighbor nodes of the graph node to better capture the local information and global information between nodes. The node update function calculates the similarity between the graph node and the neighbor nodes by adopting the attention mechanism, and dynamically adjusts the first weight corresponding to the neighbor node according to the similarity, and then updates the node representation of the corresponding graph node based on the adjusted first weights of multiple neighbor nodes.

[0070] In one example, the formula of the node update function may be as follows:

[0071]

[0072] in, W is a learnable weight matrix used to linearly transform node features so that nodes are aggregated in different feature spaces. It determines how to map input features to new representations. is the weight matrix of the lth layer;

[0073] σ is an activation function, which is used to introduce nonlinearity so that the model can learn and express more complex features and patterns. It performs nonlinear transformation on the results of linear transformation so that the model can handle more complex data distributions and decision boundaries.

[0074] N ( v i ) is a graph node v i The set of neighbor nodes of For graph nodes v i In the l The node representation of the layer, Representing a graph node v i Updated in l +1 layer node representation;

[0075] Representing a graph node v i and neighbor nodes v j The attention weight between (i.e., the first weight) indicates the neighbor node v j For graph nodes v iThe importance of i and j should be understood. In neural networks, i and j are often used to represent the index of the node, rather than the counting number. The calculation formula is as follows:

[0076]

[0077] in, a is a learnable parameter vector, T represents the transpose operation of the vector, and is the weight matrix; Neighbor node v j In the l The node representation of the layer; || represents the splicing operation, LeakyReLU represents a linear rectification function with a negative slope.

[0078] Therefore, according to the above node update function, the information of the neighbor nodes of the graph node can be aggregated, and combined with the information of the current graph node itself, a new node representation can be calculated.

[0079] In the edge update function, it can enrich the representation ability of the edge by introducing additional edge attribute information or edge weight information. It combines the information of multiple neighbor nodes of the current graph node (i.e., node representation) and dynamically adjusts the contribution of different neighbor nodes through the learned edge weights (i.e., second weights).

[0080] The edge update function can be based on the graph attention mechanism to dynamically aggregate information of different neighbor nodes. In one example, the formula of the edge update function can be as follows:

[0081]

[0082] Among them, ReLU represents the activation function; For the l The weight matrix of the layer; N ( e ij ) is the edge e ij The set of neighbor nodes of For edge e ij In the l The edge representation of the layer, For edge e ij Updated in Edge representation of layers; Neighbor node v k In the l Node representation of the layer; Represents edge e ijand neighbor nodes v k The attention weight between (i.e., the second weight) is calculated as follows:

[0083] in, a is the learned parameter vector, and is the weight matrix, || represents the concatenation operation, Indicates that the edge e ij The eigenvector of and neighbor nodes v k Node representation For splicing, it should be noted that For edge e ij An initial feature vector of , which may include features such as the distance or time interval between common locations; k Represents edge e ij A specific neighbor node of Represents the traversal variable for all neighbor nodes, which is used to indicate that when calculating the normalized attention weight, the edges are traversed. e ij All neighbor nodes. LeakyReLU represents a linear rectification function with a negative slope.

[0084] In one example, after determining the output results of the node update function and the edge update function, the outputs of the two functions can be integrated first, that is, the updated edge representation and the updated node representation are weighted and processed to generate a unified node representation, which is then input into the classification network for classification. It should be understood that the integrated node representation is more comprehensive and contains global information of nodes and edges.

[0085] Based on the aforementioned embodiments, the event labeling model provided in this application can be divided into the following levels.

[0086] (1) Input level: The input level includes the data feature vector of the event data and the label feature vector after hierarchical label encoding and splicing. The data feature vector is various attribute information about the event data, such as time, location, and persons involved. The label feature vector is the feature vector after hierarchical encoding of the event label, reflecting the classification information of the event data at different levels.

[0087] (2) Neighborhood level: In the event labeling model, the neighbor nodes of each graph node can be regarded as another level. The information of the neighbor level is transmitted and aggregated through the graph structure, so that each graph node can obtain the information of the surrounding nodes. In one example, these neighbor nodes can be other graph nodes related to the current node, or other types of nodes, such as person nodes or location nodes.

[0088] (3) Hidden layer: The hidden layer is the middle layer in the event labeling model, which is used to learn the node representation of the graph nodes. In the hidden layer, the information of the input layer and the neighbor layer is aggregated and updated through the graph convolution operation to obtain a richer and more representative node representation. The node representation of the hidden layer can be used to predict the label of the emergency event or perform other tasks.

[0089] (4) Output layer: The output layer is used to generate the final prediction results or perform other tasks. In the event labeling task, the output layer can generate accurate predictions of event labels by learning the node representations of the hidden layer.

[0090] Based on the foregoing embodiment, after the event labeling model is constructed, it is necessary to set the hyperparameters of the graph neural network, including the size of the hidden layer, the learning rate, the activation function, etc. Among them, the size of the hidden layer determines the number of nodes in each hidden layer in the graph neural network. The size of the hidden layer can be set according to the complexity of the task and the size of the data set. The larger the size of the hidden layer, the larger the capacity of the model, but it is also prone to overfitting. The learning rate determines the speed of parameter update, that is, the amplitude of parameter update in each iteration. A learning rate that is too small will cause the model to converge slowly, and a learning rate that is too large will cause the model to oscillate or diverge. The activation function is used to introduce nonlinear factors and increase the expressive power of the model. Those skilled in the art can adjust the hyperparameters by methods such as cross-validation to optimize model performance.

[0091] During the training process of the event labeling model, the loss function can be minimized through the back-propagation algorithm and the stochastic gradient descent optimizer to update the model parameters. For the trained event labeling model, the validation data set can be used to evaluate it, and the performance and generalization ability of the model can be evaluated by calculating evaluation indicators such as accuracy, precision, and recall.

[0092] Please continue to refer to Figure 1 In step S160, the target event labeling model is used to perform labeling prediction on the event data corresponding to the new emergency event.

[0093] In this embodiment, after the target event labeling model is obtained, it can be deployed to the actual system to perform labeling prediction on the event data of the new emergency event. The present application can provide a friendly user interface for police officers or system administrators to use. The deployed target event labeling model can automatically predict and mark the category of the emergency event through the event data of the new emergency event, that is, output the corresponding event label.

[0094] In one embodiment, step S160 includes: generating a target event association graph based on event data corresponding to a number of new emergency events; inputting the target event association graph into the target event labeling model so that the target event labeling model outputs target label information corresponding to each of the new emergency events.

[0095] In this embodiment, the server can generate a corresponding target event association graph based on the event data corresponding to the newly accessed new emergency events, and then input the target event association graph into the deployed target event labeling model, so that the target event labeling model can perform labeling prediction on the event data corresponding to each new emergency event to obtain the corresponding event label. In this way, the event data can be understood more accurately, and more accurate labeling prediction can be performed based on this, thereby improving the accuracy of the labeling results.

[0096] In one embodiment, the target event labeling model can also be regularly updated, that is, the target event labeling model is regularly trained and parameterized based on event data of new emergency events. By continuously monitoring the model performance and changes in event data, the model parameters and structure are adjusted in a timely manner to adapt to the dynamic changes of event data.

[0097] The following describes an apparatus embodiment of the present application, which can be used to execute the method for labeling emergency event data in the above-mentioned embodiment of the present application. For details not disclosed in the apparatus embodiment of the present application, please refer to the embodiment of the method for labeling emergency event data in the above-mentioned embodiment of the present application.

[0098] Figure 2 A block diagram of an apparatus for labeling emergency event data according to an embodiment of the present application is shown.

[0099] Reference Figure 2As shown, according to an embodiment of the present application, a device for labeling emergency event data includes: an acquisition module for acquiring and preprocessing event data corresponding to a number of emergency events; a first generation module for treating each of the preprocessed event data as a graph node, and generating edges according to the association relationship between the event data corresponding to each of the graph nodes to obtain an event association graph; a labeling module for labeling each of the graph nodes according to the event data corresponding to each of the graph nodes in the event association graph to obtain label information corresponding to each of the graph nodes; a second generation module for generating a node representation of each of the graph nodes according to the event data and the label information corresponding to each of the graph nodes; a training module for inputting the event association graph and the node representation of each of the graph nodes into a pre-constructed event labeling model to train the event labeling model to obtain a target event labeling model; a processing module for using the target event labeling model to perform labeled prediction on the event data corresponding to a new emergency event. The event labeling model includes a connected graph neural network and a classification network; wherein the graph neural network is used to determine the neighbor nodes of each graph node and the node representation of the neighbor node according to the event association graph; based on the node representation of each graph node and the node representation of the neighbor node corresponding to the graph node, the node representation of the graph node is updated; the classification network is used to classify the labels of each graph node according to the updated node representation of each graph node, and output the predicted label corresponding to each graph node; the graph neural network includes a multi-layer graph convolutional neural network layer and an activation function, each of which includes a node update function and an edge update function to update the node representation of the graph node and the edge representation of the edge; the node update function adopts an attention mechanism to calculate the similarity between the graph node and the neighbor node to adjust the first weight corresponding to the neighbor node; and based on the adjusted first weight of each neighbor node, the node representation of the graph node is updated; the edge update function adopts an attention mechanism to determine and update the second weight corresponding to the edge connecting the graph node and the neighbor node, and the second weight is used to characterize the contribution of each neighbor node to the updated node representation of the graph node.

[0100] Figure 3 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown.

[0101] It should be noted that Figure 3 The computer system of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0102] like Figure 3As shown, the computer system includes a central processing unit (CPU) 301, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 302 or the program loaded from the storage part 308 to the random access memory (RAM) 303, such as executing the method described in the above embodiment. In RAM 303, various programs and data required for system operation are also stored. CPU 301, ROM 302 and RAM 303 are connected to each other through bus 304. Input / output (I / O) interface 305 is also connected to bus 304.

[0103] The following components are connected to the I / O interface 305: an input section 306 including a keyboard, a mouse, etc.; an output section 307 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 308 including a hard disk, etc.; and a communication section 309 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 309 performs communication processing via a network such as the Internet. A drive 310 is also connected to the I / O interface 305 as needed. A removable medium 311, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 310 as needed so that a computer program read therefrom is installed into the storage section 308 as needed.

[0104] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part 309, and / or installed from a removable medium 311. When the computer program is executed by a central processing unit (CPU) 301, various functions defined in the system of the present application are executed.

[0105] It should be noted that the computer-readable medium shown in the embodiment of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier, which carries a computer-readable computer program. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0106] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0107] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.

[0108] As another aspect, the present application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by an electronic device, the electronic device implements the method described in the above embodiment.

[0109] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.

[0110] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software, or by combining software with necessary hardware. Therefore, the technical solution according to the implementation method of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation method of the present application.

[0111] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the embodiments disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application.

[0112] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A method for labeling emergency event data, characterized in that: include: Acquire and pre-process event data corresponding to several emergency events; Each of the preprocessed event data is used as a graph node, and edges are generated according to the association relationship between the event data corresponding to each of the graph nodes to obtain an event association graph; According to the event data corresponding to each graph node in the event association graph, label each graph node to obtain label information corresponding to each graph node; Generate a node representation of each of the graph nodes according to the event data and the label information corresponding to each of the graph nodes; Inputting the event association graph and the node representation of each graph node into a pre-built event labeling model to train the event labeling model to obtain a target event labeling model; Using the target event labeling model to perform labeling prediction on event data corresponding to the new emergency event; The event labeling model includes a connected graph neural network and a classification network; The graph neural network is used to determine the neighbor nodes of each graph node and the node representation of the neighbor node according to the event association graph; based on the node representation of each graph node and the node representation of the neighbor node corresponding to the graph node, the node representation of the graph node is updated; The classification network is used to perform label classification on each of the graph nodes according to the updated node representation of each of the graph nodes, and output a predicted label corresponding to each of the graph nodes; The graph neural network includes multiple layers of graph convolutional neural network layers and activation functions, each of the graph convolutional neural network layers includes a node update function and an edge update function to update node representations of graph nodes and edge representations of edges; The node update function uses an attention mechanism to calculate the similarity between the graph node and the neighbor node to adjust the first weight corresponding to the neighbor node; and updates the node representation of the graph node based on the adjusted first weight of each of the neighbor nodes; The edge update function adopts an attention mechanism to determine and update a second weight corresponding to an edge connecting a graph node and a neighboring node, wherein the second weight is used to characterize the contribution of each neighboring node to the updated node representation of the graph node.

2. The method according to claim 1, characterized in that The tag information includes at least one event tag sorted in a hierarchical order; Generating a node representation of each of the graph nodes according to the event data and the label information corresponding to each of the graph nodes, including: Perform feature extraction on the event data corresponding to each of the graph nodes to obtain a data feature vector corresponding to each of the graph nodes; Encoding the label information corresponding to each of the graph nodes to obtain a label feature vector corresponding to each of the graph nodes; The data feature vectors and label feature vectors corresponding to each of the graph nodes are concatenated respectively to obtain the node representation corresponding to each of the graph nodes.

3. The method according to claim 2, characterized in that The event label includes one or more of an event type label, a nature label, a status label, a location label, a time label, a label of people involved, a label of items involved, and a label of casualties.

4. The method according to claim 1, characterized in that: The target event labeling model is used to perform labeling prediction on the event data corresponding to the new emergency event, including: Generate a target event association graph based on event data corresponding to a number of new emergency events; The target event association graph is input into the target event labeling model, so that the target event labeling model outputs an event label corresponding to each of the new emergency events.

5. A device for labeling emergency event data, characterized in that: include: An acquisition module, used to acquire and pre-process event data corresponding to a number of emergency events; A first generating module, used to use each of the preprocessed event data as a graph node, and generate edges according to the association relationship between the event data corresponding to each of the graph nodes to obtain an event association graph; A labeling module, used to label each graph node in the event association graph according to the event data corresponding to each graph node, so as to obtain label information corresponding to each graph node; A second generating module, configured to generate a node representation of each of the graph nodes according to the event data and the label information corresponding to each of the graph nodes; A training module, used for inputting the event association graph and the node representation of each graph node into a pre-built event labeling model to train the event labeling model and obtain a target event labeling model; A processing module, used to use the target event labeling model to perform labeling prediction on event data corresponding to the new emergency event; The event labeling model includes a connected graph neural network and a classification network; The graph neural network is used to determine the neighbor nodes of each graph node and the node representation of the neighbor node according to the event association graph; based on the node representation of each graph node and the node representation of the neighbor node corresponding to the graph node, the node representation of the graph node is updated; The classification network is used to perform label classification on each of the graph nodes according to the updated node representation of each of the graph nodes, and output a predicted label corresponding to each of the graph nodes; The graph neural network includes multiple layers of graph convolutional neural network layers and activation functions, each of the graph convolutional neural network layers includes a node update function and an edge update function to update node representations of graph nodes and edge representations of edges; The node update function uses an attention mechanism to calculate the similarity between the graph node and the neighbor node to adjust the first weight corresponding to the neighbor node; and updates the node representation of the graph node based on the adjusted first weight of each of the neighbor nodes; The edge update function adopts an attention mechanism to determine and update a second weight corresponding to an edge connecting a graph node and a neighboring node, wherein the second weight is used to characterize the contribution of each neighboring node to the updated node representation of the graph node.

6. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for labeling emergency event data according to any one of claims 1 to 4 is implemented.

7. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the method for labeling emergency event data as described in any one of claims 1 to 4.