Method and system for cognizing heterogeneous graph structure in public safety scene

By using cognitive fusion model to disrupt and train heterogeneous graphs in public safety scenarios, the problem of heterogeneous graphs being susceptible to interference in public safety scenarios is solved, and a more reasonable risk assessment result is achieved.

CN119128415AActive Publication Date: 2024-12-13BEIJING UNIV OF POSTS & TELECOMM
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410968447.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-18
Publication Date
2024-12-13
Estimated Expiration
2044-07-18

AI Technical Summary

Technical Problem

Existing graph-based network structures are susceptible to interference in public safety scenarios, especially heterogeneous graphs are more susceptible to interference, resulting in the influence of model and downstream tasks. There are differences in the cognitive perspective of the data model, resulting in experimental results. Unable to compare horizontally.

Method used

Using the cognitive fusion model, by obtaining pre-built heterogeneous graph structures, using semantic information and topological information to construct metapathic paths, decompose the graph into multiple neighbor subgraphs, and use the standardized Laplace matrix to disrupt the metapaths. , combine spectrum model and multi-layer perceptron for training to achieve risk assessment of public safety scenarios.

Benefits of technology

The subjective differences brought about by researchers' different cognitive angles of data models were overcome, and through adversarial attacks and metacognitive control, the model's understanding of public safety scenarios was improved, and the risk assessment results generated were more reasonable.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119128415A_ABST
    Figure CN119128415A_ABST
Patent Text Reader

Abstract

The invention provides a method and system for cognizing a heterogeneous graph structure in a public safety scene, and the method comprises the steps: obtaining a cognition fusion model which is pre-built for the public safety scene, and the cognition fusion model comprises a heterogeneous graph which is pre-built for objects contained in the public safety scene and the relation between the objects; constructing a meta path based on semantic information and topological information contained in the heterogeneous graph, and decomposing the heterogeneous graph into a plurality of neighbor sub-graphs; turning over the selected preset number of meta-paths by using a standardized Laplacian matrix so as to disturb the neighbor sub-graphs and obtain a plurality of neighbor sub-graphs with noise; a spectrogram model contained in the cognitive fusion model is used for carrying out meta-cognitive control on neighbor sub-graphs with noise in a node prediction task, a multi-layer perceptron is used for training the cognitive fusion model in the node prediction task, and the trained cognitive fusion model is used for risk assessment in a public safety scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of public safety scene recognition technology, and in particular to a method and system for recognizing heterogeneous graph structures in public safety scenes. Background Art

[0002] Public scenes refer to open spaces or places for public use or participation. Maintaining the safety of public scenes is crucial for individuals, communities, institutions and countries. With the rapid development of science and technology and the improvement of living standards, complex things in public safety scenes, such as social platforms, online payment platforms, e-commerce platforms, and transportation platforms, are playing an increasingly important role in people's lives. These platforms provide various public services, resources and information through network technology and information dissemination, providing people with convenience and channels for communication. In this process, a large amount of non-Euclidean data is generated, and traditional machine learning cannot capture the complex relationship structure. Therefore, it has become a common practice to use graph representation to learn relevant knowledge, represent entities in the scene as nodes, represent the relationship between entities as edges, and store them in the form of a network structure containing a large amount of information for understanding and analysis. It has achieved very successful breakthroughs and applications in social media, bioinformatics, and recommendation systems. For example, in social networks, users, comments, blog posts and other things can be used as nodes of the graph structure. There are various relationships between different types of nodes. Analyzing the implicit relationships can avoid risks and prevent emergencies from endangering the public. Among them, non-Euclidean data refers to data that does not follow the traditional Euclidean space geometry rules.

[0003] Existing graph-based network structures include homogeneous information networks and heterogeneous information networks, which have been widely used in practical work by social institutions such as governments and companies. However, a large number of studies have shown that these network structures are easily disturbed, and even small disturbances can have a profound impact on the model and downstream tasks, which is harmful to maintaining public order. Compared with homogeneous graphs, heterogeneous graphs contain multiple types of nodes and edges and are more susceptible to interference. This interference can be divided into adversarial and non-adversarial in nature. The former is a hazard unique to public safety scenarios and is more subjective; the latter exists objectively. Therefore, from the perspective of the country or corporate organization, not only advanced models are needed to capture the complex relationships in the real society, but also the model needs to have the ability to understand the risks involved.

[0004] In addition, most current scientific research experiments assume that the data model is in a safe scenario and lack in-depth research on the data model itself. When dealing with specific tasks, there is a problem of cognitive confusion. For example, in the face of large and complex data structures, different choices of data sets, data preprocessing methods, models, etc. may result in similar research results that cannot be compared horizontally. The most fundamental reason is that researchers have different perspectives on data models during the experiment. Summary of the invention

[0005] In view of this, an embodiment of the present invention provides a method and system for recognizing heterogeneous graph structures in a public safety scenario, so as to eliminate or improve one or more defects existing in the prior art.

[0006] One aspect of the present invention provides a method for recognizing heterogeneous graph structures in public safety scenarios, the method comprising the following steps: obtaining a cognitive fusion model pre-built for the public safety scenario, the cognitive fusion model comprising a heterogeneous graph pre-built for things and relationships between things contained in the public safety scenario; constructing a meta-path based on semantic information and topological information contained in the heterogeneous graph, and decomposing the heterogeneous graph into multiple neighbor sub-graphs; using a standardized Laplace matrix to flip a preset number of selected meta-paths, thereby disrupting the neighbor sub-graphs and obtaining multiple noisy neighbor sub-graphs; using a spectral graph model included in the cognitive fusion model to perform metacognitive control on the noisy neighbor sub-graphs in a node prediction task, using a multi-layer perceptron to train the cognitive fusion model in the node prediction task, and the trained cognitive fusion model is used for risk assessment in public safety scenarios.

[0007] In some embodiments of the present invention, the heterogeneous graph uses things in the public safety scenario as nodes and the relationships between things as edges, and stores safety-related information in the public safety scenario in the heterogeneous graph; the spectral graph model included in the cognitive fusion model belongs to a machine learning model, and downstream task decisions are made through the trained spectral graph model.

[0008] In some embodiments of the present invention, the step of constructing a meta-path based on the semantic information and topological information contained in the heterogeneous graph and decomposing the heterogeneous graph into multiple neighbor sub-graphs includes: obtaining multiple meta-paths from the heterogeneous graph based on the semantic information and topological information contained in the heterogeneous graph, and decomposing the heterogeneous graph into multiple neighbor sub-graphs through the adjacency relationship between the meta-path and the nodes.

[0009] In some embodiments of the present invention, the step of flipping a preset number of selected meta-paths using a standardized Laplace matrix includes: using a standardized Laplace matrix to convert the perturbation of a neighbor subgraph into a linear transformation of the graph, and flipping the preset number of selected meta-paths; the flipping step includes adding or deleting edges in the neighbor subgraph within a given budget.

[0010] In some embodiments of the present invention, the process of flipping each meta-path includes: calculating the generalized feature vector of the neighbor subgraph; retaining at least one random edge for each node of the neighbor subgraph to prevent the existence of isolated points, and the remaining edges form a candidate edge set; randomly sampling in the candidate edge set to select candidate edges; by calculating the complexity, a preset number of meta-paths at the top are selected based on the selected candidate edges for flipping, thereby achieving disturbance of the neighbor subgraph.

[0011] In some embodiments of the present invention, the spectral graph model includes an attention mechanism layer and a multi-layer perceptron, and the attention mechanism layer includes a misled node-level attention mechanism and a misled semantic attention mechanism; the step of using the spectral graph model included in the cognitive fusion model to perform metacognitive control on the noisy neighbor subgraph in the node prediction task also includes: using the attention mechanism layer to adjust the weight parameters of different meta-paths, and performing fusion semantic embedding based on the weight parameters of the different meta-paths to obtain an embedded representation of the noisy neighbor subgraph, so that the multi-layer perceptron trains the cognitive fusion model in the node prediction task based on the embedded representation of the noisy neighbor subgraph.

[0012] In some embodiments of the present invention, the method also includes: reading data using a meta-path to build a public safety incident quality data set, the public safety incident quality data set including the number of nodes, the number of edges, the number of relationships and the number of eigenvalues, as well as the number of training sets, validation sets and test sets, and listing the selected meta-paths, the cognitive fusion model combines the public safety incident quality data set to recognize the semantic changes of non-Euclidean data in public safety scenarios.

[0013] Another aspect of the present invention provides a system for recognizing heterogeneous graph structures in public safety scenarios, the system comprising a processor, a memory, and a computer program / instructions stored in the memory, the processor being used to execute the computer program / instructions, and when the computer program / instructions are executed, the system implements the steps of the method described in any one of the above embodiments.

[0014] Another aspect of the present invention provides a computer-readable storage medium having a computer program / instruction stored thereon, which implements the steps of the method described in any one of the above embodiments when the computer program / instruction is executed by a processor.

[0015] Another aspect of the present invention provides a computer program product, comprising a computer program / instruction, which implements the steps of the method described in any one of the above embodiments when executed by a processor.

[0016] The method and system for recognizing heterogeneous graph structures in public safety scenarios proposed in the present invention propose a method for attacking heterogeneous graph structures. This method regards the structural changes of the graph as describing a certain state of motion. While keeping the data features basically unchanged, it disrupts the different semantics of heterogeneous information networks in a targeted manner. At the same time, the noisy neighbor subgraph is learned and trained based on the machine learning model contained in the cognitive fusion model. During the learning process, the degree of understanding of the public safety scenario by the cognitive fusion model is promoted. The trained cognitive fusion model can perform risk assessment on public safety scenarios in node prediction tasks. The method proposed in this application overcomes the subjective differences in the data model caused by different cognitive perspectives of researchers during the experiment, and is triggered from the perspective of the heterogeneous graph, making the risk assessment results of the cognitive fusion model more reasonable.

[0017] 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.

[0018] 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

[0019] 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:

[0020] Figure 1 The present invention is a flowchart of a method for recognizing heterogeneous graph structures in a public safety scenario according to an embodiment of the present invention.

[0021] Figure 2 Schematic diagram of a heterogeneous graph cognition method with a decision maker as the cognitive perspective in one embodiment of the present invention.

[0022] Figure 3 Schematic diagram of a process for promoting cognitive heterogeneous graph structures in a public safety scenario in one embodiment of the present invention. DETAILED DESCRIPTION

[0023] 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.

[0024] 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.

[0025] 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.

[0026] It should also be noted that, unless otherwise specified, the term “connection” herein may refer not only to a direct connection but also to an indirect connection involving an intermediate.

[0027] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. In the accompanying drawings, the same reference numerals represent the same or similar components, or the same or similar steps.

[0028] The fundamental reason for the problems of the prior art mentioned in the background technology section is that researchers have different perspectives on data models during the experiment. In order to overcome the problems of the prior art, this application studies how graphs are applied to the real world from the perspective of applying heterogeneous graphs (i.e., from the perspective of decision makers) to make it more reasonable in different scenarios of processing specific tasks.

[0029] The present invention constructs a cognitive fusion model for cognitive public safety scenarios. The model regards the complex relationships in the scenario as heterogeneous graph structures, and is committed to mining the relationships between data from the perspective of decision makers. In the cognitive learning process, strategies such as adversarial attacks are used to promote the model's understanding of cognition. The cognitive fusion model is constructed using graph algorithms as tools. In the cognitive fusion model, how to recognize the relationships formed by various things in the graph is discussed in detail. Through the downstream tasks of graph learning, the risks in the cognitive public safety environment are achieved, and the complex associations in the graph are fully understood and captured, providing more accurate and in-depth information for public safety decision-making, and assisting decision makers in making decisions. Among them, public safety scenarios refer to places or environments involving public interests and public safety, which are used by multiple users. They can be real places or virtual network spaces. For example, public scenarios can be social platforms, online payment platforms, e-commerce platforms, transportation platforms, etc.

[0030] Other basic concepts are summarized as follows:

[0031] (1) Metacognitive monitoring: During the cognitive process, the agent perceives and evaluates its own cognitive state, learning progress, and task completion.

[0032] (2) Metacognitive control: The stage in which the agent improves learning and cognitive outcomes by selecting appropriate learning strategies, adjusting attention, and so on.

[0033] (3) Cognitive environment / cognitive state: The cognitive environment refers to the external system or actual situation in which the agent interacts. The set of learning states that the agent appears in during the cognitive learning process is called the cognitive state, which can be discrete or continuous.

[0034] (4) Learning strategy: Learning strategy is the method, technique or behavior that the agent consciously selects and uses in the process of cognitive learning, aiming to promote effective learning and knowledge acquisition. In the scheme proposed in the present invention, in order to recognize things in public safety scenarios, two main learning strategies are given here, mainly referring to the spectral model based on the dual attention mechanism.

[0035] Figure 1 The flowchart of a method for recognizing heterogeneous graph structures in a public safety scenario in one embodiment of the present invention includes the following steps:

[0036] Step S110: Acquire a cognitive fusion model pre-built for a public safety scenario, wherein the cognitive fusion model includes a heterogeneous graph pre-built for objects included in the public safety scenario and relationships between objects.

[0037] In the specific implementation process, the heterogeneous graph uses objects in the public safety scene as nodes and the relationships between objects as edges, and stores the security-related information in the public safety scene in the heterogeneous graph. In addition, the spectral model included in the cognitive fusion model belongs to a machine learning model, and downstream task decisions are made through the trained spectral model. Among them, the cognitive fusion model (agent) refers to a conceptual model that describes and explains the thinking process and structure of humans or other intelligent agents when processing information, understanding and cognizing the world, and is generally composed of multiple algorithms and multiple machine learning models.

[0038] Step S120: constructing a meta-path based on the semantic information and topological information contained in the heterogeneous graph, and decomposing the heterogeneous graph into a plurality of neighbor sub-graphs.

[0039] In the specific implementation process, in step S120, a meta-path is constructed based on the semantic information and topological information contained in the heterogeneous graph, and the step of decomposing the heterogeneous graph into multiple neighbor sub-graphs includes: obtaining multiple meta-paths from the heterogeneous graph based on the semantic information and topological information contained in the heterogeneous graph, and decomposing the heterogeneous graph into multiple neighbor sub-graphs through the adjacency relationship between the meta-path and the node.

[0040] Step S130: using a standardized Laplacian matrix to flip the selected preset number of element paths, thereby disturbing the neighbor subgraph and obtaining a plurality of neighbor subgraphs with noise.

[0041] In a specific implementation process, the step of using a standardized Laplace matrix to flip a preset number of selected meta-paths in step S130 includes: (1) using a standardized Laplace matrix to convert the disturbance of the neighbor subgraph into a linear transformation of the graph, and flipping the preset number of selected meta-paths; (2) the flipping step includes adding or deleting edges in the neighbor subgraph within a given budget range.

[0042] Step S140: Use the spectral graph model included in the cognitive fusion model to perform metacognitive control on the noisy neighbor subgraph in the node prediction task, use the multilayer perceptron to train the cognitive fusion model in the node prediction task, and the trained cognitive fusion model is used for risk assessment in public safety scenarios.

[0043] By adopting the method of recognizing heterogeneous graph structures in public safety scenarios proposed in the present invention, the structural changes of the graph are regarded as describing a certain state of motion. While keeping the data features basically unchanged, the different semantics of the heterogeneous information network are disrupted in a targeted manner. At the same time, the noisy neighbor subgraph is learned and trained based on the machine learning model contained in the cognitive fusion model. During the learning process, the degree of understanding of the public safety scenario by the cognitive fusion model is promoted. The trained cognitive fusion model can perform risk assessment on public safety scenarios in node prediction tasks. The method proposed in this application overcomes the subjective differences in the data model caused by different cognitive perspectives of researchers during the experiment, and is triggered from the perspective of the heterogeneous graph, making the risk assessment results of the cognitive fusion model more reasonable.

[0044] In some embodiments of the present invention, the process of flipping each meta-path includes: (1) calculating the generalized feature vector of the neighbor subgraph; (2) retaining at least one random edge for each node of the neighbor subgraph to prevent the existence of isolated points, and the remaining edges form a candidate edge set; (3) randomly sampling in the candidate edge set to select candidate edges; (4) by calculating the complexity, a preset number of meta-paths at the top are selected based on the selected candidate edges for flipping, thereby achieving the disturbance of the neighbor subgraph.

[0045] In some other embodiments of the present invention, the spectral graph model includes an attention mechanism layer and a multi-layer perceptron, and the attention mechanism layer includes a misled node-level attention mechanism and a misled semantic attention mechanism. Furthermore, the step of using the spectral graph model included in the cognitive fusion model to perform metacognitive control on the noisy neighbor subgraph in the node prediction task also includes: (1) using the attention mechanism layer to adjust the weight parameters of different meta-paths; (2) based on the weight parameters of the different meta-paths, fusing semantic embedding to obtain an embedded representation of the noisy neighbor subgraph, so that the multi-layer perceptron trains the cognitive fusion model in the node prediction task based on the embedded representation of the noisy neighbor subgraph.

[0046] In some further embodiments of the present invention, the method further includes: reading data using a meta-path to build a public safety incident quality data set, the public safety incident quality data set including the number of nodes, the number of edges, the number of relationships and the number of eigenvalues, as well as the number of training sets, validation sets and test sets, and listing the selected meta-paths, the cognitive fusion model combining the public safety incident quality data set to recognize the semantic changes of non-Euclidean data in public safety scenarios.

[0047] In public scenarios, management and planning often need to consider basic factors such as safety, convenience, sustainability, and public interest. However, these factors are not enough to deal with various objective interference factors in the real-world working environment. Especially in public safety scenarios, there are also malicious adversarial factors that can disrupt the correct cognition of people and public institutions and cause serious losses.

[0048] Take real-life examples as examples, Figure 2 The following is a schematic diagram of a heterogeneous graph recognition method with decision makers as the cognitive perspective in one embodiment of the present invention. Taking the risk assessment of quantified public safety events on the Sina Weibo platform as an example, the problem to be solved is to help decision makers (also known as intelligent agents) recognize the risks in public safety scenarios, with decision makers as the cognitive perspective. First, some raw data is obtained from Sina Weibo to form the features of the heterogeneous graph, such as bloggers, time of posting Weibo, topics involved, blog posts, platforms for posting, number of reposts, posting locations, number of likes and comments, etc. Then, based on prior knowledge or the results of simple machine learning model operations, some nodes and labels that can quantify the risks of public safety events in Sina Weibo are obtained, such as topic popularity, event popularity, security events, blog post popularity and event categories, etc. In this process, in order to better mine the relationship between data, decision makers can use some algorithms to reduce the complexity of the model, such as constructing meta-paths, studying malicious noise, using graphs to represent learning models, etc. Finally, the downstream tasks of graph learning are used to achieve the purpose of recognizing risks in the public safety environment and assisting decision makers in making decisions.

[0049] Optionally, a meta-path refers to a path consisting of multiple nodes and edges in a complex network. It is a path established based on high-order relationships between nodes. Meta-path is a concept for heterogeneous networks that helps discover hidden relationships in complex networks. The method of constructing a meta-path usually includes the following steps: (1) Determine the types of nodes and edges: In a heterogeneous network, it is first necessary to clarify the different types of nodes and edges in the network. (2) Define meta-path patterns: Based on domain knowledge and actual needs, define one or more meta-path patterns. These patterns specify the types of nodes and edges in the meta-path and their connection order. (3) Extract meta-path instances: According to the defined meta-path pattern, extract meta-path instances that meet the pattern from the network. (4) Analysis and application: Analyze the extracted meta-path instances to discover hidden relationships or patterns in the network and apply them to actual scenarios.

[0050] However, it is not enough to understand the risks in public safety by constructing heterogeneous graph models that quantify the risk level of public safety events. So far, researchers have created many graph-related algorithms. There are important challenges in fully utilizing and combining this knowledge so that the model can deeply explore more complex associations in the graph.

[0051] Table 1. Example of Public Safety Event Quantification (PSEQ) dataset

[0052]

[0053] In some embodiments of the present invention, a public safety incident quality data set for public safety cognition can be specially built, and the data contained in the data set uses a meta-path to read the data. Table 1 provides an example of a public safety incident quantification (PSEQ) data set, including the number of nodes, edges, relationships, eigenvalues, and the number of training sets, validation sets, and test sets of this data set, and also lists the selected meta-path.

[0054] By adopting the embodiment of the invention, experiments can be conducted to explore the security and robustness of the proxy model for various data models in public safety scenarios. At the same time, the transferability of the perturbation algorithm proposed in the present invention to most spectral graph models can be expanded. This will help to deeply understand the adaptability of the proxy model to different data models and evaluate the effectiveness and transferability of the perturbation algorithm in the present invention in different scenarios. At present, the heterogeneous graph dataset combined with specific downstream tasks is itself a complex data model, and there is no research in the prior art on how to build a secure and robust data structure.

[0055] Figure 3Schematic diagram of a process for promoting cognitive heterogeneous graph structures in a public safety scenario in one embodiment of the present invention. Figure 3 (a) shows the steps of perturbing the graph structure based on meta-paths in the process of decision makers as cognitive perspectives. First, heterogeneous graphs contain rich semantic and topological information. By constructing meta-paths, the heterogeneous graphs are decomposed into several neighbor subgraphs. Then, these decomposed neighbor subgraphs are perturbed (for example, adding or deleting edges) to generate noisy neighbor subgraphs. In the node prediction task, the decision maker can achieve "metacognitive control" of the heterogeneous graph by using the spectral graph model (MLP). Finally, the graph task is processed by a multilayer perceptron to obtain the final risk assessment result. Among them, the node prediction task refers to the task of classifying or regressing the newly added nodes in the graph by using the existing node and edge information in the graph data structure through a machine learning algorithm. Multilayer Perceptron (MLP) is a basic feedforward artificial neural network model, which is widely used to solve classification and regression problems.

[0056] Figure 3 In the cognitive fusion model shown in , the key part is to construct various objects and relationships in public safety scenarios into a heterogeneous graph structure, and to promote the cognitive process of the cognitive fusion model on public safety scenarios by constructing adversarial noise (adversarial attack). Figure 3 In the embodiment of the invention shown, based on the graph Laplace method in spectral graph theory, the complex motion process in the graph structure is converted into a linear transformation of the graph, and the spectrum of the Laplace matrix and other related theories are used to disrupt the graph model and its related downstream tasks, thereby realizing transferable adversarial attacks. Figure 3 (a) shows the process of trying to use various learning strategies to promote cognition in a public safety scenario for better cognitive learning. Specifically, in a public safety scenario, a data model of a heterogeneous graph is constructed according to the actual task, and the topological structure information and semantic information in the heterogeneous graph are stored in the form of an adjacency matrix. This paper uses the meta-path method to add or delete edges in the original graph (collectively referred to as flipping) within a given budget, and uses two attention mechanisms and a multi-layer perceptron to mislead the model's perception process, thereby accelerating the agent's cognitive process.

[0057] Next, we discuss how to add perturbations to the neighborhood subgraph, i.e., conduct adversarial attacks.

[0058] Assume that there are two kinds of motions in a given heterogeneous graph G(V,E,T): graph structure adversarial attack and graph embedding. In order to describe the motion trajectory, any two nodes (a,b) in the graph are represented as a standardized adjacency matrix:

[0059]

[0060] Where L = ID -1 / 2 WD -1 / 2 , is the standardized Laplace matrix, which describes the displacement or change of the motion. This motion can be expressed as W is a real symmetric (weight) matrix and D is a diagonal (degree) matrix.

[0061] For any node a in different meta-paths φ i The neighboring nodes (including node a) may be of different categories, which can be solved by a The feature vectors of different dimensions are mapped to the same dimension to solve it, that is:

[0062]

[0063] where h a and h a ′ are the eigenvectors of the (target) central node a before and after the transformation, and the transformation matrix is Each meta-path based transformation matrix Corresponding to a subgraph SubG i,i∈(1,n) Then the adversarial perturbation of a given subgraph is formulated as the following two-level optimization problem:

[0064]

[0065] in is the loss of the model after being disturbed, Z i SubG i The embedding representation of Z * Aggregate the following graph for all meta paths The best embedding result of ; f is the entries of the original neighbor subgraph that are modified during the perturbation process. In this process, the embedding loss of the model should be minimized while maximizing the model structure loss as much as possible. Since the graph structure itself is discrete, and the heterogeneous graph has more diverse structures and semantics, the difficulty of the problem will increase when combined with the above two-level optimization problem.

[0066] Neighborhood subgraph SubG i The embedding process of Factorization of :

[0067]

[0068] Among them, Vol(·) is the volume of the subgraph, T is the sampling size of the embedding model, and b is the number of negative samples. Then the embedding representation You can use The SVD (Singular Value Decomposition) decomposes the top-Klargest singular values / vectors. However, due to the difficulty of calculating the SVD method in the graph representation learning model, such as Figure 3 As shown in (b), suppose a neighbor subgraph SubG of a heterogeneous graph i It can be represented as a matrix with m rows and n columns. The SVD decomposition result of this matrix is ​​a matrix with m rows and m columns, a matrix with m rows and n columns, and a matrix with n rows and n columns. This calculation method and storage cost are very troublesome. On the one hand, even for a very small heterogeneous graph dataset, the amount of information it carries is very huge. On the other hand, even for the matrix represented by a homogeneous graph, it is difficult to use SVD for back propagation. Therefore, the idea of ​​eigenvalue perturbation theory is used for approximate processing. In this case, the loss of the disturbed graph can be expressed as

[0069]

[0070] in is the adjacency matrix of the disturbed graph, vol(A)=∑ i,j A ij , S is the size of the convolution kernel, b is the number of negative samples, Δω ij =(1-2A ij ) represents edge flip, σ is a constant.

[0071]

[0072] Algorithm 1 shows how to use a meta-path-based approach to disrupt heterogeneous graph structures in public safety environments. The attack aims to mislead agents in three ways: 1) Assuming that there are n meta-paths in the target heterogeneous graph, the algorithm selects relations where k of the meta-paths are located for perturbation; 2) The perturbation budgets for different meta-paths are different; 3) For a relation where a meta-path is located, flip the edge between a node and its neighbor under a specified budget. At the beginning of the disruption, the algorithm selects k from the n meta-paths and generates an eigenvector for the adjacency submatrix corresponding to each meta-path. In order to prevent isolated points in the graph, a random edge is retained for each node to form a set of candidate edges and randomly sampled. Finally, by calculating the complexity, the top f flip operations are selected for perturbation.

[0073] Next, we discuss metacognitive control based on graph learning.

[0074] In the cognitive fusion model proposed in this paper, once the attack method is used to promote cognitive progress, it is necessary to perceive and adjust the data structure constructed in the public security environment. This process is called Graph Metacognitive Control (GMC), such as Figure 3 As shown in (a), in this process, the metapath-based transferable flip method promotes agent cognitive errors from two aspects. Figure 3 (c) Further elaboration.

[0075] The dual attention mechanism includes the misguided node-level attention mechanism (Misguided Node-levelAttention) and the misguided semantic attention mechanism (Misguided Semantic Attention).

[0076] (1) Misled node-level attention mechanism: For a heterogeneous graph structure with adversarial noise, in different meta-paths φ i The transformation vector h of node a a ′Using the self-attention mechanism to calculate the weight, the misled attention value between a given node pair (a, b) is:

[0077]

[0078] Among them, att node Represents the attention of the node, that is, for a node a, in different meta-paths φ i The weights of neighbor nodes in are shared; σ is the sigmoid activation function; is the misled node-level attention vector; then the weight coefficients of the feature vectors of the k meta-paths involved in node a are normalized through the softmax operation:

[0079]

[0080] The final embedding of node a is calculated as follows:

[0081]

[0082] Among them, m is a multi-head attention mechanism, and the size of M controls the degree of cognitive misleading. Then for a given set of meta-paths {φ1, φ2, …, φ} n}, we can get n groups of semantically related embeddings, that is,

[0083] (2) Misguided Semantic Attention: The above different semantic embeddings are combined through semantic level attention. Assume Corresponding to a weight set {β1,β2,…,β n}, then the attention neural network attsem(·) for computing the semantic level can be abstractly expressed as:

[0084]

[0085] Specifically, we first pass a fully connected layer After conversion, the importance of each meta-path is expressed by the similarity between the converted embedding and the attention vector q at the semantic level. The calculation formula is as follows:

[0086]

[0087] Where W is the weight matrix, b is the bias vector, q, W, b are all learnable parameters and are shared by all meta-paths. φ The normalized weight parameter calculation formula of the meta-path is as follows:

[0088]

[0089] Semantic-level attention expresses the importance of a meta-path in a specific task, which means that the weight of a meta-path may be different for different tasks. Then the prediction formula for all nodes is expressed as follows:

[0090]

[0091] Finally, the final representation vector of the node is input into the graph task to obtain the result of metacognitive control.

[0092]

[0093] Algorithm 2 shows the process of metacognitive control based on graph models, in which the selection of graph models and graph tasks can be based on the existing experience in metacognitive knowledge and combined with specific task selection. When the selected graph model is the GAT model, lines 2-9 in the algorithm form the HAN model. Among them, metacognitive knowledge refers to the basic knowledge accumulation / strategy that the agent already has before completing the learning goal.

[0094] Using the above Figure 3 The illustrated embodiments of the invention can achieve more accurate recognition of heterogeneous graph structures in public safety scenarios.

[0095] Corresponding to the above method, the present invention also provides a system for recognizing heterogeneous graph structures in public safety scenarios, the system comprising a computer device, the computer device comprising a processor and a memory, the memory storing computer instructions, the processor being used to execute the computer instructions stored in the memory, and when the computer instructions are executed by the processor, the system implements the steps of the method described above.

[0096] The method and system for recognizing heterogeneous graph structures in public safety scenarios proposed in the present invention propose a method for attacking heterogeneous graph structures. This method regards the structural changes of the graph as describing a certain state of motion. While keeping the data features basically unchanged, it disrupts the different semantics of heterogeneous information networks in a targeted manner. At the same time, the noisy neighbor subgraph is learned and trained based on the machine learning model contained in the cognitive fusion model. During the learning process, the degree of understanding of the public safety scenario by the cognitive fusion model is promoted. The trained cognitive fusion model can perform risk assessment on public safety scenarios in node prediction tasks. The method proposed in this application overcomes the subjective differences in the data model caused by different cognitive perspectives of researchers during the experiment, and is triggered from the perspective of the heterogeneous graph, making the risk assessment results of the cognitive fusion model more reasonable.

[0097] Specifically, the solution proposed by the present invention has the following key points:

[0098] (1) A method for interfering with heterogeneous graph structures (or attacking heterogeneous graph structures) is proposed. This method regards the structural changes of the graph as describing a certain state of motion, and while keeping the data features basically unchanged, it specifically disrupts the different semantics of heterogeneous information networks.

[0099] (2) A fusion model for cognitive public safety scenarios was constructed. The model regards the complex relationships in the scenarios as heterogeneous graph structures and uses strategies such as adversarial attacks during the learning process to improve the model's cognitive understanding.

[0100] (3) A public safety event quality dataset named Public Safety Events Quality (PSEQ) was constructed to help understand the effectiveness of the proposed model. In other words, the proposed fusion model is able to recognize the semantic changes of non-Euclidean data in public safety scenarios.

[0101] (4) In the step of recognizing risks, three parts can be used to recognize the risks in the scenario: metacognitive facilitation, metapath-based perturbation, and graph-based metacognitive control.

[0102] 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.

[0103] 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.

[0104] 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.

[0105] 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.

[0106] 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 recognizing heterogeneous graph structures in public safety scenarios, characterized in that: The method comprises the following steps: Acquire a cognitive fusion model pre-built for a public safety scenario, wherein the cognitive fusion model includes a heterogeneous graph pre-built for objects and relationships between objects included in the public safety scenario; Constructing a meta-path based on semantic information and topological information contained in the heterogeneous graph, and decomposing the heterogeneous graph into a plurality of neighbor subgraphs; The selected preset number of meta-paths are flipped using a standardized Laplacian matrix, thereby disturbing the neighbor subgraph and obtaining multiple neighbor subgraphs with noise; The spectral graph model included in the cognitive fusion model is used to perform metacognitive control on the noisy neighbor subgraph in the node prediction task. The multilayer perceptron is used to train the cognitive fusion model in the node prediction task. The trained cognitive fusion model is used for risk assessment in public safety scenarios.

2. The method according to claim 1, characterized in that The heterogeneous graph uses objects in the public safety scenario as nodes and relationships between objects as edges, and stores security-related information in the public safety scenario in the heterogeneous graph; The spectral model included in the cognitive fusion model belongs to a machine learning model, and downstream task decisions are made through the trained spectral model.

3. The method according to claim 1, characterized in that: The step of constructing a meta-path based on the semantic information and topological information contained in the heterogeneous graph and decomposing the heterogeneous graph into a plurality of neighbor subgraphs comprises: Based on the semantic information and topological information contained in the heterogeneous graph, multiple meta-paths are decomposed from the heterogeneous graph, and the heterogeneous graph is decomposed into multiple neighbor sub-graphs through the adjacency relationship between the meta-path and the nodes.

4. The method according to claim 1, characterized in that The step of flipping the selected preset number of element paths using the standardized Laplace matrix includes: The perturbation of the neighborhood subgraph is converted into a linear transformation of the graph using a normalized Laplacian matrix, flipping a selected preset number of meta-paths; The flipping step consists of adding or removing edges in the neighbor subgraph within a given budget.

5. The method according to claim 4, characterized in that The process of flipping each element path includes: Compute the generalized eigenvector of the neighborhood subgraph; Keep at least one random edge for each node in the neighbor subgraph to prevent the existence of isolated nodes, and the remaining edges form a candidate edge set; Randomly sample from the candidate edge set to select a candidate edge; By calculating the complexity, a preset number of meta-paths at the top are selected based on the selected candidate edges to be flipped, thereby achieving the perturbation of the neighbor subgraph.

6. The method according to claim 1, characterized in that The spectrogram model comprises an attention mechanism layer and a multi-layer perceptron, wherein the attention mechanism layer comprises a misled node-level attention mechanism and a misled semantic attention mechanism; The steps of using the spectral graph model included in the cognitive fusion model to perform metacognitive control on the noisy neighbor subgraph in the node prediction task also include: The attention mechanism layer is used to adjust the weight parameters of different meta-paths, and fusion semantic embedding is performed based on the weight parameters of the different meta-paths to obtain an embedding representation of a neighbor subgraph with noise, so that a multi-layer perceptron can train a cognitive fusion model in a node prediction task based on the embedding representation of a neighbor subgraph with noise.

7. The method according to claim 1, characterized in that The method also includes: reading data using a meta-path to build a public safety incident quality data set, wherein the public safety incident quality data set includes the number of nodes, the number of edges, the number of relationships and the number of eigenvalues, as well as the number of training sets, validation sets and test sets, and lists the selected meta-paths, and the cognitive fusion model combines the public safety incident quality data set to recognize the semantic changes of non-Euclidean data in public safety scenarios.

8. A system for recognizing heterogeneous graph structures in public safety scenarios, comprising a processor, a memory, and a computer program / instructions stored in the memory, characterized in that: The processor is used to execute the computer program / instructions, and when the computer program / instructions are executed, the system implements the steps of the method according to any one of claims 1 to 7.

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

  • Construction method of universal embedding framework of multi-semantic heterogeneous graph

    CN112989842A

  • Heterogeneous graph information extraction method and device based on meta-path subgraph

    CN113569906A

  • Social network influence prediction method and device based on heterogeneous network

    CN114090902A

  • Security event identification method and system based on heterogeneous graph

    CN115086004A

  • Prediction method and system based on heterogeneous graph neural network model

    WO2021179838A1